@nebula.js/sn-table 6.63.0 → 6.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-table v6.
|
|
2
|
+
* @nebula.js/sn-table v6.64.0
|
|
3
3
|
* Copyright (c) 2026 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -99,7 +99,7 @@ function Ki(e,t){let n;return n=t?Pi(e).withConfig({displayName:t.label,shouldFo
|
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the MIT license found in the
|
|
101
101
|
* LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/function SR(){if(bR)return KS;bR=1,Object.defineProperty(KS,"__esModule",{value:!0}),KS.default=function(t){return(0,e.createStyles)(t)};var e=xR;return KS}var wR,CR,ER={},RR={};function AR(){if(wR)return RR;wR=1;var e=zl();Object.defineProperty(RR,"__esModule",{value:!0}),RR.default=void 0;var t=(0,e(VS()).default)();return RR.default=t,RR}function IR(){if(CR)return ER;CR=1;var e=zl();Object.defineProperty(ER,"__esModule",{value:!0}),ER.default=void 0;var t=e(gu()),n=xR,r=e(AR());var o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return ER.default=o,ER}var MR,kR,DR={},PR={};function TR(){if(MR)return PR;MR=1;var e=zl();Object.defineProperty(PR,"__esModule",{value:!0}),PR.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},PR.getUnit=n,PR.toUnitless=r,PR.convertLength=function(e){return function(t,o){var i=n(t);if(i===o)return t;var a=r(t);if("px"!==i)if("em"===i)a=r(t)*r(e);else if("rem"===i)return a=r(t)*r(e),t;var s=a;if("px"!==o)if("em"===o)s=a/r(e);else{if("rem"!==o)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+o}},PR.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,o=r+n;return t-r<o-t?r:o},PR.fontGrid=function(e){var t=e.lineHeight,n=e.pixels,r=e.htmlFontSize;return n/(t*r)},PR.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,o=e.max,i=e.unit,a=void 0===i?"rem":i,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(o-r)/l[l.length-1];return l.forEach(function(e){var o=r+p*e;null!==c&&(o=c(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*o)/1e4).concat(a))}),d};var t=e(ay());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return PR}function qR(){if(kR)return DR;kR=1;var e=zl();Object.defineProperty(DR,"__esModule",{value:!0}),DR.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,a=void 0===i?["sm","md","lg"]:i,s=o.disableAlign,l=void 0!==s&&s,u=o.factor,c=void 0===u?2:u,d=o.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map(function(e){return f.breakpoints.values[e]});return p.forEach(function(e){var o=h[e],i=parseFloat(m(o.fontSize,"rem"));if(!(i<=1)){var a=i,s=1+(a-1)/c,u=o.lineHeight;if(!(0,r.isUnitless)(u)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},o,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(gu()),n=Uv,r=TR();return DR}var OR,LR={};function NR(){if(OR)return LR;OR=1;var e=zl();Object.defineProperty(LR,"__esModule",{value:!0}),LR.default=void 0;var t=e(gu()),n=xR,r=e(AR()),o=function(e){var o=(0,n.styled)(e);return function(e,n){return o(e,(0,t.default)({defaultTheme:r.default},n))}};return LR.default=o,LR}var jR,_R={};function zR(){if(jR)return _R;jR=1;var e=zl();Object.defineProperty(_R,"__esModule",{value:!0}),_R.default=function(){return(0,t.useTheme)()||n.default};var t=xR;e(w);var n=e(AR());return _R}var FR,$R={};function BR(){if(FR)return $R;FR=1;var e=zl();Object.defineProperty($R,"__esModule",{value:!0}),$R.default=void 0;var t=e(gu()),n=xR,r=e(AR());var o=function(e,o){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return $R.default=o,$R}var HR,VR,WR={};function UR(){if(HR)return WR;HR=1;var e=zl();Object.defineProperty(WR,"__esModule",{value:!0}),WR.default=void 0;var t=xR,n=e(AR()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return WR.default=r,WR}function GR(){return VR||(VR=1,function(e){var t=zl(),n=(Rv||(Rv=1,function(e){var t;e.exports=function(e,n){if(!n&&e&&e.__esModule)return e;var r,o,i=Object.defineProperty,a={__proto__:null,default:e};if(Object(e)!==e)return a;if(t||"function"!=typeof WeakMap||(t=new WeakMap),t){if(t.has(e))return t.get(e);t.set(e,a)}for(o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&((r=i&&Object.getOwnPropertyDescriptor(e,o))&&(r.get||r.set)?i(a,o,r):a[o]=e[o]);return a},e.exports.__esModule=!0,e.exports.default=e.exports}(Iv)),Iv.exports);Object.defineProperty(e,"__esModule",{value:!0});var r={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return i.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return m.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return m.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return m.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return m.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}});var o=Gv();Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))});var i=n(VS()),a=t(GS()),s=t(SR()),l=t(IR()),u=t(qR()),c=t(NR()),d=zS();Object.keys(d).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))});var p=t(zR()),f=t(BR()),h=t(UR()),m=xR}(Av)),Av}var KR=GR();KR.alpha(Tt.GREYSCALE_0,.05),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let o,i;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(o!==(e=e||"")){try{i=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}o=e}return i},u=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(u)?u.then(l):l(u)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,r)=>l(e,e=>{let o;try{o=JSON.parse(e||"",null==n?void 0:n.reviver)}catch(e){o=r}t(o)})))}();const YR=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),XR=new WeakMap,JR=()=>{};function ZR(e,n=JR){return((e,t,n)=>{const r=YR(()=>new WeakMap,XR,t);return YR(e,r,n)})(()=>{const r=new WeakMap,o=new WeakMap,i=$g(0),a=$g([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])},"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(i.debugPrivate=!0,a.debugPrivate=!0);const s=$g(t=>{let l;t(i);try{l=t(s)}catch(e){}const u=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(u))return{v:u};if(u!==(null==l?void 0:l.p)&&u.then(e=>{o.set(u,e);const[n]=t(a);n()},e=>{r.set(u,e);const[n]=t(a);n()}),r.has(u)){if(l&&"e"in l&&l.p===u)return l;const e=r.get(u);return l&&"v"in l?{p:u,e:e,v:l.v}:{p:u,e:e}}return o.has(u)?{p:u,v:o.get(u)}:l&&"v"in l?{p:u,f:n(l.v),v:l.v}:{p:u,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),$g(e=>{const t=e(s);if("e"in t)throw t.e;return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}const QR=new WeakMap;function eA(e,t){const n=Ug(t),r=tA(n);for(const[o,...i]of e)r.has(o)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(o),n.set(o,...i))}const tA=e=>{let t=QR.get(e);return t||(t=new WeakSet,QR.set(e,t)),t};function nA(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}const rA="INTERNAL_getBuildingBlocksRev",oA=Number(Object.keys(_g).find(e=>e.startsWith(rA))?.slice(29));if(Number.isNaN(oA))throw new Error("jotai-compat: unsupported jotai internals revision");const iA=_g,aA=`INTERNAL_getBuildingBlocksRev${oA}`,sA=iA[`INTERNAL_initializeStoreHooksRev${oA}`],lA=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(oA>=4)for(const[e,t]of lA)if(iA[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const uA={};lA.forEach(([e,t],n)=>{uA[`INTERNAL_KEY_${e}`]=oA>=4?t:n});const{INTERNAL_KEY_mountedMap:cA,INTERNAL_KEY_changedAtoms:dA,INTERNAL_KEY_storeHooks:pA,INTERNAL_KEY_ensureAtomState:fA,INTERNAL_KEY_flushCallbacks:hA,INTERNAL_KEY_recomputeInvalidatedAtoms:mA,INTERNAL_KEY_readAtomState:gA,INTERNAL_KEY_invalidateDependents:bA,INTERNAL_KEY_writeAtomState:vA,INTERNAL_KEY_mountDependencies:yA,INTERNAL_KEY_setAtomStateValueOrPromise:xA}=uA,SA=iA[aA],wA=new WeakMap;function CA(e){const t=$g(()=>[]),n=$g(function(e){const[r,o,i]=e(t);i.has(n)&&(r.forEach(e),++o.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=(e=>{const t=SA(e);let n=wA.get(t);return n||(n=Array.isArray(t)?[]:{},lA.forEach(([e,r],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[o],enumerable:!0};Object.defineProperty(n,o,i),Object.defineProperty(n,r,i)}),wA.set(t,n)),n})(e),o=r[cA],i=r[dA],a=sA(r[pA]),s=r[fA],l=r[hA],u=r[mA],c=r[gA],d=r[bA],p=r[vA],f=r[yA],h=r[xA],m=new Set;let g,b=0,v=!1,y=!1,x=!1;function S(){if(b)return;m.clear();let t=!0;const w=i=>{if(x)return e.get(i);if(i===n){const t=s(r,e,i);if(!lg(t)){if(!ag(i))throw new Error("no atom init");h(r,e,i,i.init)}return ug(t)}const a=c(r,e,i);try{return ug(a)}finally{C.d.set(i,a.n),o.get(i)?.t.add(n),t?m.add(i):o.has(i)&&(f(r,e,n),u(r,e),l(r,e))}};w.peek=e.get;const E=(o,...c)=>{const m=s(r,e,o);try{if(++b,o===n){if(!ag(o))throw new Error("atom not writable");const t=m.n,n=c[0];return h(r,e,o,n),f(r,e,o),void(t!==m.n&&(i.add(o),a.c?.(o),d(r,e,o)))}return p(r,e,o,c)}finally{t||(u(r,e),l(r,e)),--b}};E.recurse=(t,...o)=>{if(x){if(nA())throw new Error("set.recurse is not allowed in cleanup")}else try{return v=!0,f(r,e,n),E(t,...o)}finally{u(r,e),v=!1,y&&(y=!1,S())}};try{g?.();const e=n.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!b)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{C.d.set(t,s(r,e,t).n)}),f(r,e,n),u(r,e)}}const w=function(e,t){let n=EA.get(e);n||(n=new Set,EA.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),C=s(r,e,n);C.v=void 0,Object.assign(e.get(t),[m,C,o]),a.c.add(n,function(){i.delete(n)}),a.m.add(n,function(){w.add(S),g&&w.delete(g)}),a.u.add(n,function(){w.delete(S),g&&w.add(g)}),a.c.add(n,function(){v?y=!0:w.add(S)})},nA()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const EA=new WeakMap;const RA=async(e,t,n)=>{if("dimension"===e.type)if(e.isAlternative)try{await t.moveDimensionFromAlternative(e.id)}catch(t){n.error({msg:`Failed to move dimension ${e.id} from alternative`,payload:t})}else try{await t.moveDimensionToAlternative(e.id)}catch(t){n.error({msg:`Failed to move dimension ${e.id} to alternative`,payload:t})}if("measure"===e.type)if(e.isAlternative)try{await t.moveMeasureFromAlternative(e.id)}catch(t){n.error({msg:`Failed to move measure ${e.id} from alternative`,payload:t})}else try{await t.moveMeasureToAlternative(e.id)}catch(t){n.error({msg:`Failed to move measure ${e.id} to alternative`,payload:t})}},AA=e=>{const{items:t,handler:n,model:r,handlerQueue:o,logToSentry:i}=e;void 0!==n&&void 0!==r&&o&&o.add(async()=>{for(const e of t)await RA(e,n,i)})},IA=$g(),MA=$g(),kA=$g(),DA=$g(e=>e(kA)?.translate??(e=>e)),PA=$g(e=>t=>e(kA)?.getBooleanFlag(t,!1)??!1),TA=$g(""),qA=$g(e=>{const t=e(TA).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)});class OA{#e=[];#t=!1;#n=!1;#r;#o;#i;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#o=void 0,this.#i=void 0,this.#a=void 0}pause(){this.#o&&(clearTimeout(this.#a),this.#i?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#o=e,this.#i=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#i;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#i&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#i?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#o)await this.#o;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const LA=$g(null),NA=CA((e,t)=>{const n=e(IA),r=e(MA),o=new OA({onQueueCompleted:async()=>{if(!n||!r)return;const e=r.properties.qHyperCubeDef,t=Date.now();e.qDimensions.length&&Object.assign(e.qDimensions[0],{patchTimeStamp:t}),e.qMeasures.length&&Object.assign(e.qMeasures[0],{patchTimeStamp:t}),await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(LA,o);const i=()=>{o.pause()},a=()=>{o.continue(500)},s=()=>{o.abort()};return n?.Invalidated?.bind(i),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{o.abort(),n?.Invalidated?.unbind(i),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),jA=e=>e.qDef?.cId,_A=(e=[])=>new Set(e.map(jA).filter(e=>void 0!==e)),zA=({effectiveActive:e,effectiveExcluded:t,currentKnown:n})=>{const r=_A(n),o=_A([...e,...t]),i=new Set,a=n.filter(e=>{const t=jA(e);return!(!t||o.has(t)||i.has(t))&&(i.add(t),!0)}),s=t.flatMap((e,t)=>{const n=jA(e);return void 0===n||r.has(n)?[]:[t]});return{kept:t.filter((e,t)=>!s.includes(t)),missing:a,removedIndexes:s}},FA=(e,t)=>{if(!("qHyperCubeDef"in t))return e;const n=e.qHyperCubeDef,r=t.qHyperCubeDef,o=n.qLayoutExclude?.qHyperCubeDef,i=r.qLayoutExclude?.qHyperCubeDef,a=zA({effectiveActive:n.qDimensions??[],effectiveExcluded:o?.qDimensions??[],currentKnown:[...r.qDimensions??[],...i?.qDimensions??[]]}),s=zA({effectiveActive:n.qMeasures??[],effectiveExcluded:o?.qMeasures??[],currentKnown:[...r.qMeasures??[],...i?.qMeasures??[]]});if(![a,s].some(({missing:e,removedIndexes:t})=>e.length>0||t.length>0))return e;const l=[...a.kept,...a.missing],u=[...s.kept,...s.missing],c=((e,t)=>{if(!e)return;const n=new Set(t),r=Object.entries(e).filter(([e])=>n.has(e)).sort((e,t)=>e[1]-t[1]).map(([e])=>e),o=new Set(r),i=[...n].filter(e=>!o.has(e));return Object.fromEntries([...r,...i].map((e,t)=>[e,t]))})(n.qLayoutExclude?.allColumnOrder,[..._A(n.qDimensions??[]),..._A(n.qMeasures??[]),..._A(l),..._A(u)]);return{...e,qHyperCubeDef:{...n,qLayoutExclude:{...n.qLayoutExclude,...c&&{allColumnOrder:c},qHyperCubeDef:{...n.qLayoutExclude?.qHyperCubeDef,qDimensions:l,qMeasures:u}}}}},$A=e=>7005!==e.qError?.qErrorCode,BA=new WeakMap,HA={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},VA=ZR($g(async e=>{const t=e(IA),n=e(bb);if(t){if(BA.has(t))return BA.get(t);try{const e=await t.app.createSessionObject(HA);return BA.set(t,e),e}catch(e){return void n.error({msg:"Error creating alternative layout model",payload:e})}}})),WA=$g(null),UA=$g(),GA=CA((e,t)=>{const n=e(IA),r=e(VA),o=e(bb),i=e(PA),a=e(MA);let s=0,l=!1;if(!n||!r)return;const u=async()=>{s++;try{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const o=structuredClone(await n.getEffectiveProperties()),s=i("VNA-760-show-added-columns-exploration")?FA(o,await n.getProperties()):o;await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qMeasures??[])}]);const l=await r.getLayout();s!==o&&a?.setProperties(structuredClone(s)),t(UA,{layout:structuredClone(e),properties:s,altLayout:structuredClone(l)}),t(WA,null)}catch(e){o.error({msg:"Failed to synchronize table layout",payload:e})}finally{s--,0===s&&l&&(l=!1,c())}},c=async()=>{if(s>0)return void(l=!0);const e=await r.getLayout();t(UA,t=>({...t,altLayout:structuredClone(e)}))};return u(),n.Invalidated.bind(u),r.Invalidated.bind(c),()=>{n.Invalidated.unbind(u),r.Invalidated.unbind(c)}}),KA=$g(e=>e(UA)?.layout),YA=$g(e=>e(UA)?.altLayout),XA=$g(e=>e(UA)?.properties),JA=$g(e=>void 0===e(KA)||void 0===e(XA)),ZA=$g(e=>{const t=e(UA)?.layout;return t?.qHyperCube.qDimensionInfo.filter($A)??[]}),QA=$g(e=>{const t=e(UA)?.layout;return t?.qHyperCube.qMeasureInfo.filter($A)??[]}),eI=$g(e=>{const t=[...e(ZA),...e(QA)].map(e=>e.cId);return new Set(t)}),tI=$g(new Set),nI=$g(new Set),rI=$g(e=>{const t=e(tI),n=e(nI);return e(eI).difference(n).union(t)}),oI=CA((e,t)=>{e(eI),t(tI,new Set),t(nI,new Set)}),iI=$g(e=>e(rI),(e,t,n)=>{if("string"!=typeof n.id)return;const r=e(rI).has(n.id),o=new Set(e(nI)),i=new Set(e(tI));r?(o.add(n.id),i.delete(n.id)):(i.add(n.id),o.delete(n.id)),t(nI,o),t(tI,i),AA({items:[n],handler:e(MA),model:e(IA),handlerQueue:e(LA),logToSentry:e(bb)})}),aI=({props:e,children:t})=>(eA([[IA,e.args.model],[kA,e.args.apis],[MA,e.args.handler]]),Qg(GA),Qg(NA),Qg(oI),t);function sI(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function lI(e){return"write"in e}const uI="INTERNAL_getBuildingBlocksRev";var cI;const dI=Number(null==(cI=Object.keys(_g).find(e=>e.startsWith(uI)))?void 0:cI.slice(29));if(Number.isNaN(dI))throw new Error("jotai-compat: unsupported jotai internals revision");const pI=_g,fI=`INTERNAL_getBuildingBlocksRev${dI}`,hI=pI[`INTERNAL_buildStoreRev${dI}`];const mI=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(dI>=4)for(const[e,t]of mI)if(pI[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const gI={};mI.forEach(([e,t],n)=>{gI[e]=dI>=4?t:n});const{atomStateMap:bI,mountedMap:vI,invalidatedAtoms:yI,changedAtoms:xI,mountCallbacks:SI,unmountCallbacks:wI,storeHooks:CI,atomRead:EI,atomWrite:RI,atomOnInit:AI,atomOnMount:II,ensureAtomState:MI,flushCallbacks:kI,recomputeInvalidatedAtoms:DI,readAtomState:PI,invalidateDependents:TI,writeAtomState:qI,mountDependencies:OI,mountAtom:LI,unmountAtom:NI,setAtomStateValueOrPromise:jI,storeGet:_I,storeSet:zI,storeSub:FI,enhanceBuildingBlocks:$I,abortHandlersMap:BI,registerAbortHandler:HI,abortPromise:VI,storeEpochHolder:WI}=gI,UI=pI[fI],GI=new WeakMap,KI=new WeakMap,YI={},{read:XI,write:JI}=$g(null);function ZI(e,t,n){const[r,o,i,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=o.get(t);return r||(r=[nM(e,t,n),n],o.set(t,r)),r}const l=n??YI;let u=i.get(l);u||(u=new WeakMap,i.set(l,u));let c=u.get(t);if(!c){const[r,o]=a?ZI(a,t,n):[t];c=[t.read===XI?r:nM(e,t,o),o],u.set(t,c)}return c}function QI(e){for(const t of e[5])t()}function eM(e,t,n,r,o){if(n.read===XI&&lI(n)&&lI(t)&&n.write!==JI&&e!==r){const{write:i}=n;return t.write=tM(e,n.write.bind(n),r,o),()=>{t.write=i}}}function tM(e,t,n,r=n){return function(o,i,...a){return t(function(t){const[r]=ZI(e,t,n);return o(r)},function(t,...o){const[a]=ZI(e,t,n),s=eM(e,a,t,n,r);try{return i(a,...o)}finally{null==s||s()}},...a)}}function nM(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const o=Object.getPrototypeOf(t),i=Object.create(o,r);return i.read!==XI&&(i.read=function(e,t,n){return function(r,o){return t(function(t){const[o]=ZI(e,t,n);return r(o)},o)}}(e,t.read.bind(t),n)),lI(i)&&lI(t)&&i.write!==JI&&(i.write=tM(e,t.write.bind(t),n)),i}function rM({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const o=new WeakSet(e),i=KI.get(n),a=(null==i?void 0:i[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,i,new Set,void 0],l=s[0],u=s[5],c=function(e){const t=e[3],n=oM((e=>{const t=UI(e);let n=GI.get(t);return n||(n=Array.isArray(t)?[]:{},mI.forEach(([e,r],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[o],enumerable:!0};Object.defineProperty(n,o,i),Object.defineProperty(n,r,i)}),GI.set(t,n)),n})(t)),r=n,o=r[gI.storeGet],i=r[gI.storeSet],a=r[gI.storeSub],s={};let l,u;return r[gI.storeGet]=m(o),r[gI.storeSet]=f,r[gI.storeSub]=m(a),n[gI.enhanceBuildingBlocks]=function(e){return l??(l=g(e[gI.atomStateMap],c)),u??(u=Object.assign(oM(e),{...e,[gI.atomStateMap]:l,[gI.mountedMap]:g(e[gI.mountedMap],d),[gI.invalidatedAtoms]:g(e[gI.invalidatedAtoms]),[gI.changedAtoms]:b(e[gI.changedAtoms]),[gI.mountCallbacks]:e[gI.mountCallbacks],[gI.unmountCallbacks]:e[gI.unmountCallbacks],[gI.storeHooks]:y(e[gI.storeHooks]),[gI.atomRead]:m(e[gI.atomRead]),[gI.atomWrite]:m(e[gI.atomWrite]),[gI.atomOnInit]:m(e[gI.atomOnInit]),[gI.atomOnMount]:m(e[gI.atomOnMount]),[gI.ensureAtomState]:p(l,e[gI.ensureAtomState]),[gI.flushCallbacks]:(t,...r)=>e[gI.flushCallbacks](n,...r),[gI.recomputeInvalidatedAtoms]:(t,...r)=>e[gI.recomputeInvalidatedAtoms](n,...r),[gI.readAtomState]:m(e[gI.readAtomState]),[gI.invalidateDependents]:m(e[gI.invalidateDependents]),[gI.writeAtomState]:m(e[gI.writeAtomState]),[gI.mountDependencies]:m(e[gI.mountDependencies]),[gI.mountAtom]:m(e[gI.mountAtom]),[gI.unmountAtom]:m(e[gI.unmountAtom]),[jI]:m(e[jI]),[gI.storeGet]:m(e[gI.storeGet]),[gI.storeSet]:m(e[gI.storeSet]),[gI.storeSub]:m(e[gI.storeSub]),[gI.enhanceBuildingBlocks]:()=>e})),u},function(e){if(dI<4){const t=e?Object.values(e):[];return hI(...t)}const t=Array.isArray(e)?Object.fromEntries(mI.map(([t,n],r)=>[n,e[r]])):e;return hI(t)}(n);function c(t){const n=new WeakMap;return function(r){let o=n.get(r);if(o)return o;const i=t(r);if(!i)return;let a,s;return o=new Proxy(i,{get:(t,n)=>"d"===n?a??(a=g(i.d,function(t){return n=>t(ZI(e,n)[0])})):"p"===n?s??(s=b(i.p)):Reflect.get(i,n)}),n.set(r,o),o}}function d(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const o=e(n);return o?(r={...o,d:b(o.d),t:b(o.t),get u(){return o.u},set u(e){o.u=e}},t.set(n,r),r):void 0}}function p(e,t){const n=m(t);return function(t,r,o){const i=e.get(o);if(i)return i;const a=n(t,r,o);return e.set(o,a),e.get(o)}}function f(t,n,r,...o){const[a,s]=ZI(e,r),l=eM(e,a,r,s,e);try{return i(t,n,a,...o)}finally{null==l||l()}}function h(t,n){return function(r,...o){const[i]=ZI(e,r);return(n?n(t):t)(i,...o)}}function m(t){return function(r,o,i,...a){const[s]=ZI(e,i);return t(n,o,s,...a)}}function g(e,t){const n={get:h(e.get.bind(e),t),set:h(e.set.bind(e)),has:h(e.has.bind(e)),delete:h(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function b(t){return{get size(){return t.size},add:h(t.add.bind(t)),has:h(t.has.bind(t)),delete:h(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(h(e)),*[Symbol.iterator](){for(const n of t)yield ZI(e,n)[0]}}}function v(t){if(!t)return;const n=h(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[o]=ZI(e,n);return t.add(o,r)},n}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>s[t]??(s[t]=v(e[t])),set(n){delete s[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:r}),KI.set(c,s);for(const t of new Set(e))l.set(t,[nM(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[nM(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!o.has(t)&&l.delete(t):l.set(t,[nM(s,t,s),s])});u.add(t)}return c}function oM(e){return Array.isArray(e)?[...e]:{...e}}const iM=function(e,t){return function(n){const{atoms:r=[],atomFamilies:o=[],children:i,scope:a,name:s}=n,l=t(),u=Array.from(r,e=>Array.isArray(e)?e[0]:e);function c(){return[a??rM({atoms:u,atomFamilies:o,parentStore:l,name:s}),function(e){return l!==e.parentStore||!sI(u,e.atoms)||!sI(o,e.atomFamilies)||a!==e.providedScope}]}const[[d,p],f]=k(c);if(p({atoms:u,atomFamilies:o,parentStore:l,providedScope:a})){const e=KI.get(d);e&&QI(e),f(c)}return eA(Array.from(r).filter(Array.isArray),{store:d}),q(()=>{const e=KI.get(d);return()=>{e&&QI(e)}},[d]),C(e,{store:d,children:i})}}(Gg,Ug);var aM=Object.defineProperty,sM=Object.defineProperties,lM=Object.getOwnPropertyDescriptors,uM=Object.getOwnPropertySymbols,cM=Object.prototype.hasOwnProperty,dM=Object.prototype.propertyIsEnumerable,pM=(e,t,n)=>t in e?aM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fM=(e,t)=>{for(var n in t||(t={}))cM.call(t,n)&&pM(e,n,t[n]);if(uM)for(var n of uM(t))dM.call(t,n)&&pM(e,n,t[n]);return e},hM=(e,t)=>sM(e,lM(t));function mM(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function gM(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function bM(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function vM(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(bM(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const u=Object.entries(e);let c,d,p=-1,f=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(c=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&bM(i)){const r=null==i.initialGroup?void 0:gM(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:gM(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return hM(fM({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return hM(fM({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=gM(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==c||null==d||c===d&&p===f){if(null!=c&&c===d&&p===f&&bM(i)){const t=null==i.group?void 0:gM(e,i.group),r=null!=i.group&&t!==c,o=i.index!==p;if(r||o){const r=null==i.group?c:t;if(null!=r){if(c===r)return hM(fM({},e),{[c]:n(e[c],p,i.index)});const t=e[c][p];return hM(fM({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(c===d)return hM(fM({},e),{[c]:n(e[c],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[c][p];return hM(fM({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,mM)}function yM(e,t){let n=null;const r=new Map,o=new Set;function i(o){let s;if(void 0===t)s=r.get(o);else for(const[e,n]of r)if(t(e,o)){s=n;break}if(void 0!==s){if(!n?.(s[1],o))return s[0];i.remove(o)}const l=e(o);return r.set(o,[l,Date.now()]),a("CREATE",o,l),l}function a(e,t,n){for(const r of o)r({type:e,param:t,atom:n})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>r.keys(),i.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[o]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,o);break}},i.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,o]]of r)n(o,e)&&(r.delete(e),a("REMOVE",e,t))},i}const xM=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,SM=$g(),wM=$g(e=>e(SM)?.numberOfSections??0),CM=$g(e=>e(SM)?.numberOfItemsInSection??[]),EM=$g(e=>e(SM)?.keyExtractor??xM),RM=$g(e=>e(SM)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),AM=$g(e=>e(SM)?.onDragEnd),IM=$g(e=>e(SM)?.onDragOver),MM=$g(e=>e(SM)?.itemRenderer),kM=$g(e=>e(SM)?.headerRenderer),DM=$g(e=>e(SM)?.dragOverlayRenderer),PM=$g(e=>e(SM)?.onClick),TM=$g(e=>{const t=e(wM),n=e(CM),r=e(EM),o={};for(let e=0;e<t;e++)o[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return o}),qM=$g(null),OM=$g(e=>e(qM),(e,t,n)=>{if(null===n)return void t(qM,null);const r=e(qM);t(qM,{...r,...n})}),LM=yM(e=>$g(null,(t,n,r)=>{let o;"over"===e?o=t(IM):"end"===e&&(o=t(AM),n(OM,null));const{source:i,target:a}=r.operation;if("start"===e)return void n(OM,{id:i.id,startSection:i.data.sectionKey,startIndex:i.data.itemIndex,startSectionIndex:i.data.sectionIndex});if(null===a)return void n(OM,{toIndex:void 0,toSectionIndex:void 0});const s=i.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=vM(t(TM),r)[a.data.sectionIndex].indexOf(i.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(OM)?.startIndex;n(OM,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}o?.({id:i.id,toIndex:l,toSection:a.data.sectionKey,fromSection:i.data.sectionKey,startSection:t(OM)?.startSection??i.data.sectionKey,event:r})})),NM=[SM,wM,CM,EM,RM,AM,MM,kM,PM,OM],jM=[LM],_M=({props:e,children:t})=>{const n=eb(SM);return j(()=>{n(e)},[e,n]),t};var zM=Symbol.for("preact-signals");function FM(){if(UM>1)UM--;else{var e,t=!1;for(!function(){var e=XM;for(XM=void 0;void 0!==e;){var t=e.S;if(t.v===e.v)for(var n=t.t;void 0!==n;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}}();void 0!==WM;){var n=WM;for(WM=void 0,GM++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&tk(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(GM=0,UM--,t)throw e}}function $M(e){if(UM>0)return e();YM=++KM,UM++;try{return e()}finally{FM()}}var BM,HM=void 0;function VM(e){var t=HM,n=BM;HM=void 0,BM=void 0;try{return e()}finally{HM=t,BM=n}}var WM=void 0,UM=0,GM=0,KM=0,YM=0,XM=void 0,JM=0;function ZM(e){if(void 0!==HM){var t=e.n;if(void 0===t||t.t!==HM)return t={i:0,S:e,p:HM.s,n:void 0,t:HM,e:void 0,x:void 0,r:t},void 0!==HM.s&&(HM.s.n=t),HM.s=t,e.n=t,32&HM.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=HM.s,t.n=void 0,HM.s.n=t,HM.s=t),t}}function QM(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function ek(e,t){return new QM(e,t)}function tk(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function nk(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function rk(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function ok(e,t){QM.call(this,void 0,t),this.x=e,this.s=void 0,this.g=JM-1,this.f=4}function ik(e,t){return new ok(e,t)}function ak(e){var t=e.m;if(e.m=void 0,"function"==typeof t){UM++;var n=HM;HM=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,sk(e),t}finally{HM=n,FM()}}}function sk(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ak(e)}function lk(e){if(HM!==this)throw new Error("Out-of-order effect");rk(this),HM=e,this.f&=-2,8&this.f&&sk(this),FM()}function uk(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name,BM&&BM.push(this)}function ck(e,t){var n=new uk(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}QM.prototype.brand=zM,QM.prototype.h=function(){return!0},QM.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:VM(function(){var e;null==(e=t.W)||e.call(t)}))},QM.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&VM(function(){var e;null==(e=t.Z)||e.call(t)}))}},QM.prototype.subscribe=function(e){var t=this;return ck(function(){var n=t.value;VM(function(){return e(n)})},{name:"sub"})},QM.prototype.valueOf=function(){return this.value},QM.prototype.toString=function(){return this.value+""},QM.prototype.toJSON=function(){return this.value},QM.prototype.peek=function(){var e=this;return VM(function(){return e.value})},Object.defineProperty(QM.prototype,"value",{get:function(){var e=ZM(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(GM>100)throw new Error("Cycle detected");!function(e){0!==UM&&0===GM&&e.l!==YM&&(e.l=YM,XM={S:e,v:e.v,i:e.i,o:XM})}(this),this.v=e,this.i++,JM++,UM++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{FM()}}}}),ok.prototype=new QM,ok.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===JM)return!0;if(this.g=JM,this.f|=1,this.i>0&&!tk(this))return this.f&=-2,!0;var e=HM;try{nk(this),HM=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return HM=e,rk(this),this.f&=-2,!0},ok.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}QM.prototype.S.call(this,e)},ok.prototype.U=function(e){if(void 0!==this.t&&(QM.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},ok.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(ok.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ZM(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),uk.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},uk.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ak(this),nk(this),UM++;var e=HM;return HM=this,lk.bind(this,e)},uk.prototype.N=function(){2&this.f||(this.f|=2,this.u=WM,WM=this)},uk.prototype.d=function(){this.f|=8,1&this.f||sk(this)},uk.prototype.dispose=function(){this.d()};var dk,pk,fk,hk,mk,gk,bk,vk,yk,xk,Sk,wk,Ck,Ek,Rk,Ak,Ik,Mk,kk,Dk,Pk=Object.create,Tk=Object.defineProperty,qk=Object.defineProperties,Ok=Object.getOwnPropertyDescriptor,Lk=Object.getOwnPropertyDescriptors,Nk=Object.getOwnPropertySymbols,jk=Object.prototype.hasOwnProperty,_k=Object.prototype.propertyIsEnumerable,zk=e=>{throw TypeError(e)},Fk=(e,t,n)=>t in e?Tk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$k=(e,t)=>Tk(e,"name",{value:t,configurable:!0}),Bk=["class","method","getter","setter","accessor","field","value","get","set"],Hk=e=>void 0!==e&&"function"!=typeof e?zk("Function expected"):e,Vk=(e,t,n,r,o)=>({kind:Bk[e],name:t,metadata:r,addInitializer:e=>n._?zk("Already initialized"):o.push(Hk(e||null))}),Wk=(e,t)=>{return Fk(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},Uk=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},Gk=(e,t,n,r,o,i)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=Bk[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&Ok(d<4?o:{get[n](){return Xk(this,i)},set[n](e){return Zk(this,i,e)}},n));d?f&&d<4&&$k(i,(d>2?"set ":d>1?"get ":"")+n):$k(o,n);for(var y=r.length-1;y>=0;y--)u=Vk(d,n,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>Yk(o,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?Xk:Qk)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>Zk(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?Hk(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?zk("Object expected"):(Hk(a=s.get)&&(v.get=a),Hk(a=s.set)&&(v.set=a),Hk(a=s.init)&&g.unshift(a));return d||Wk(e,o),v&&Tk(o,n,v),f?4^d?i:v:o},Kk=(e,t,n)=>t.has(e)||zk("Cannot "+n),Yk=(e,t)=>Object(t)!==t?zk('Cannot use the "in" operator on this value'):e.has(t),Xk=(e,t,n)=>(Kk(e,t,"read from private field"),n?n.call(e):t.get(e)),Jk=(e,t,n)=>t.has(e)?zk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Zk=(e,t,n,r)=>(Kk(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Qk=(e,t,n)=>(Kk(e,t,"access private method"),n);function eD(e,t){if(t){let n;return ik(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return ik(e)}function tD(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!tD(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=n.some(n=>!tD(e[n],t[n]));return!o}return!1}function nD({get:e},t){return{init:e=>ek(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function rD(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=eD(e.bind(this)),n.set(this,t)),t.value}}function oD(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>qk(e,Lk(t)))(((e,t)=>{for(var n in t||(t={}))jk.call(t,n)&&Fk(e,n,t[n]);if(Nk)for(var n of Nk(t))_k.call(t,n)&&Fk(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function iD(...e){const t=e.map(e=>ck(e));return()=>t.forEach(e=>e())}gk=[nD],mk=[nD],hk=[nD],fk=[oD()],pk=[oD()],dk=[oD()];var aD,sD=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Uk(bk,5,this),Jk(this,wk),Jk(this,vk,Uk(bk,8,this)),Uk(bk,11,this),Jk(this,Ck,Uk(bk,12,this)),Uk(bk,15,this),Jk(this,Ik,Uk(bk,16,this)),Uk(bk,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Xk(this,wk,kk)}get initial(){return Xk(this,wk,xk)}get previous(){return Xk(this,wk,Rk)}set current(e){const t=VM(()=>Xk(this,wk,kk));e&&t&&this.equals(t,e)||$M(()=>{Xk(this,wk,xk)||Zk(this,wk,e,Sk),Zk(this,wk,t,Ak),Zk(this,wk,e,Dk)})}reset(e=this.defaultValue){$M(()=>{Zk(this,wk,void 0,Ak),Zk(this,wk,e,Sk),Zk(this,wk,e,Dk)})}};function lD(e){return VM(()=>{const t={};for(const n in e)t[n]=e[n];return t})}bk=[,,,Pk(null)],vk=new WeakMap,wk=new WeakSet,Ck=new WeakMap,Ik=new WeakMap,yk=Gk(bk,20,"#initial",gk,wk,vk),xk=yk.get,Sk=yk.set,Ek=Gk(bk,20,"#previous",mk,wk,Ck),Rk=Ek.get,Ak=Ek.set,Mk=Gk(bk,20,"#current",hk,wk,Ik),kk=Mk.get,Dk=Mk.set,Gk(bk,2,"current",fk,sD),Gk(bk,2,"initial",pk,sD),Gk(bk,2,"previous",dk,sD),Wk(bk,sD);aD=new WeakMap;var uD,cD,dD,pD,fD,hD=Object.create,mD=Object.defineProperty,gD=Object.getOwnPropertyDescriptor,bD=Object.getOwnPropertySymbols,vD=Object.prototype.hasOwnProperty,yD=Object.prototype.propertyIsEnumerable,xD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),SD=e=>{throw TypeError(e)},wD=Math.pow,CD=(e,t,n)=>t in e?mD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ED=["class","method","getter","setter","accessor","field","value","get","set"],RD=e=>void 0!==e&&"function"!=typeof e?SD("Function expected"):e,AD=(e,t,n,r,o)=>({kind:ED[e],name:t,metadata:r,addInitializer:e=>n._?SD("Already initialized"):o.push(RD(e||null))}),ID=(e,t,n,r,o,i)=>{for(var a,s,l,u,c=7&t,d=ED[c+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,gD(o,n)),h=r.length-1;h>=0;h--)(l=AD(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,RD(a)&&(f[d]=a);return f&&mD(o,n,f),o},MD=(e,t,n)=>t.has(e)||SD("Cannot "+n),kD=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},DD=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:o,width:i,height:a,scale:s}=this,l=new e(o+t,r+n,i,a);return l.scale=((e,t)=>{for(var n in t||(t={}))vD.call(t,n)&&CD(e,n,t[n]);if(bD)for(var n of bD(t))yD.call(t,n)&&CD(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:o,bottom:i}=this;return{width:e,height:t,left:n,top:r,right:o,bottom:i}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new kD((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:o,height:i}=this;return n===t.left&&r===t.top&&o===t.width&&i===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:o}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=o}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:o}){return new e(n,t,r,o)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],o="x"===t?e.left:e.top,i="x"===t?e.width:e.height;return"start"==r?o:"end"==r?o+i:o+i/2};return kD.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var PD,TD=class extends(dD=sD,cD=[rD],uD=[rD],dD){constructor(e){var t,n,r;super(kD.from(e),(e,t)=>kD.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(fD,5,this),t=this,r=0,(n=pD).has(t)?SD("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return kD.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=kD.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(MD(a=this,s=pD,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);$M(()=>{((e,t,n)=>{MD(e,t,"write to private field"),t.set(e,n)})(this,pD,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(kD.from(e)),this.velocity={x:0,y:0}}};function qD({x:e,y:t},n){const r=Math.abs(e),o=Math.abs(t);return"number"==typeof n?Math.sqrt(wD(r,2)+wD(o,2))>n:"x"in n&&"y"in n?r>n.x&&o>n.y:"x"in n?r>n.x:"y"in n&&o>n.y}fD=(e=>{var t;return[,,,hD(null!=(t=null==e?void 0:e[xD("metadata")])?t:null)]})(dD),pD=new WeakMap,ID(fD,2,"delta",cD,TD),ID(fD,2,"direction",uD,TD),PD=fD,CD(TD,xD("metadata"),PD[3]);var OD,LD,ND,jD,_D=(e=>(e.Horizontal="x",e.Vertical="y",e))(_D||{}),zD=Object.values(_D),FD=Object.create,$D=Object.defineProperty,BD=Object.defineProperties,HD=Object.getOwnPropertyDescriptor,VD=Object.getOwnPropertyDescriptors,WD=Object.getOwnPropertySymbols,UD=Object.prototype.hasOwnProperty,GD=Object.prototype.propertyIsEnumerable,KD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),YD=e=>{throw TypeError(e)},XD=(e,t,n)=>t in e?$D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JD=(e,t)=>{for(var n in t||(t={}))UD.call(t,n)&&XD(e,n,t[n]);if(WD)for(var n of WD(t))GD.call(t,n)&&XD(e,n,t[n]);return e},ZD=(e,t)=>BD(e,VD(t)),QD=(e,t)=>$D(e,"name",{value:t,configurable:!0}),eP=(e,t)=>{var n={};for(var r in e)UD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&WD)for(var r of WD(e))t.indexOf(r)<0&&GD.call(e,r)&&(n[r]=e[r]);return n},tP=e=>{var t;return[,,,FD(null!=(t=null==e?void 0:e[KD("metadata")])?t:null)]},nP=["class","method","getter","setter","accessor","field","value","get","set"],rP=e=>void 0!==e&&"function"!=typeof e?YD("Function expected"):e,oP=(e,t,n,r,o)=>({kind:nP[e],name:t,metadata:r,addInitializer:e=>n._?YD("Already initialized"):o.push(rP(e||null))}),iP=(e,t)=>XD(t,KD("metadata"),e[3]),aP=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},sP=(e,t,n,r,o,i)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=nP[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&HD(d<4?o:{get[n](){return cP(this,i)},set[n](e){return pP(this,i,e)}},n));d?f&&d<4&&QD(i,(d>2?"set ":d>1?"get ":"")+n):QD(o,n);for(var y=r.length-1;y>=0;y--)u=oP(d,n,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>uP(o,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?cP:fP)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>pP(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?rP(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?YD("Object expected"):(rP(a=s.get)&&(v.get=a),rP(a=s.set)&&(v.set=a),rP(a=s.init)&&g.unshift(a));return d||iP(e,o),v&&$D(o,n,v),f?4^d?i:v:o},lP=(e,t,n)=>t.has(e)||YD("Cannot "+n),uP=(e,t)=>Object(t)!==t?YD('Cannot use the "in" operator on this value'):e.has(t),cP=(e,t,n)=>(lP(e,t,"read from private field"),n?n.call(e):t.get(e)),dP=(e,t,n)=>t.has(e)?YD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pP=(e,t,n,r)=>(lP(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fP=(e,t,n)=>(lP(e,t,"access private method"),n);function hP(e,t){return{plugin:e,options:t}}function mP(e){return t=>hP(e,t)}function gP(e){return"function"==typeof e?{plugin:e,options:void 0}:e}OD=[nD];var bP=class{constructor(e,t){this.manager=e,this.options=t,dP(this,ND,aP(LD,8,this,!1)),aP(LD,11,this),dP(this,jD,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return VM(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=ck(e.bind(this));return cP(this,jD).add(t),t}destroy(){cP(this,jD).forEach(e=>e())}static configure(e){return hP(this,e)}};LD=tP(null),ND=new WeakMap,jD=new WeakMap,sP(LD,4,"disabled",OD,bP,ND),iP(LD,bP);var vP,yP=class extends bP{},xP=class{constructor(e){this.manager=e,this.instances=new Map,dP(this,vP,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(gP).reduce((e,t)=>{const n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(const e of cP(this,vP))if(!n.includes(e)){if(e.prototype instanceof yP)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);pP(this,vP,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function SP(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}vP=new WeakMap;var wP,CP,EP,RP,AP,IP,MP,kP,DP,PP,TP,qP,OP=[],LP=class extends bP{constructor(e){super(e),dP(this,wP),dP(this,CP),this.computeCollisions=this.computeCollisions.bind(this),pP(this,CP,ek(OP)),this.destroy=iD(()=>{const e=this.computeCollisions(),t=VM(()=>this.manager.dragOperation.position.current);if(e!==OP){const e=cP(this,wP);if(pP(this,wP,t),e&&t.x==e.x&&t.y==e.y)return}else pP(this,wP,void 0);cP(this,CP).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){VM(()=>{e?cP(this,CP).value=this.computeCollisions():pP(this,wP,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:o,shape:i,status:a}=r;if(!a.initialized||!i)return OP;const s=[],l=[];for(const i of null!=e?e:n.droppables){if(i.disabled)continue;if(o&&!i.accepts(o))continue;const e=null!=t?t:i.collisionDetector;if(!e)continue;l.push(i),i.shape;const n=VM(()=>e({droppable:i,dragOperation:r}));n&&(null!=i.collisionPriority&&(n.priority=i.collisionPriority),s.push(n))}return 0===l.length?OP:(s.sort(SP),s)}get collisions(){return cP(this,CP).value}};wP=new WeakMap,CP=new WeakMap,AP=[nD],RP=[nD],EP=[nD];var NP=class e{constructor(e,t){dP(this,DP,aP(kP,8,this)),aP(kP,11,this),dP(this,PP),dP(this,TP,aP(kP,12,this)),aP(kP,15,this),dP(this,qP,aP(kP,16,this)),aP(kP,19,this);const{effects:n,id:r,data:o={},disabled:i=!1,register:a=!0}=e;let s=r;pP(this,PP,ek(r)),this.manager=t,this.data=o,this.disabled=i,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return s=e,null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=cP(this,PP).value;return null!=(n=null==(t=e.pendingIdChanges)?void 0:t.get(this))?n:r}set id(t){var n,r;t!==(null!=(r=null==(n=e.pendingIdChanges)?void 0:n.get(this))?r:cP(this,PP).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return fP(t=e,IP,MP).call(t)})),e.pendingIdChanges.set(this,t))}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};kP=tP(null),IP=new WeakSet,MP=function(){const e=NP.pendingIdChanges;NP.pendingIdChanges=null,e&&$M(()=>{for(const[t,n]of e)cP(t,PP).value=n})},DP=new WeakMap,PP=new WeakMap,TP=new WeakMap,qP=new WeakMap,sP(kP,4,"manager",AP,NP,DP),sP(kP,4,"data",RP,NP,TP),sP(kP,4,"disabled",EP,NP,qP),dP(NP,IP),iP(kP,NP),NP.pendingIdChanges=null;var jP,_P,zP,FP,$P,BP,HP,VP,WP,UP,GP,KP,YP,XP,JP,ZP,QP,eT,tT,nT,rT,oT,iT,aT,sT=NP,lT=class{constructor(){this.map=ek(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),o=()=>this.unregister(e,t);if(r===t)return o;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const i=new Map(n);for(const[r,o]of n)if(o===t&&r!==e){i.delete(r);break}i.set(e,t),this.map.value=i;const a=iD(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const o=new Map(n);o.delete(e),this.map.value=o}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},uT=class extends(HP=sT,BP=[nD],$P=[nD],FP=[nD],zP=[rD],_P=[rD],jP=[rD],HP){constructor(e,t){var n=e,{modifiers:r,type:o,sensors:i,plugins:a,effects:s}=n,l=eP(n,["modifiers","type","sensors","plugins","effects"]);super(ZD(JD({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const n of t){const{plugin:t}=gP(n);e.registry.plugins.register(t)}}]}}),t),aP(VP,5,this),dP(this,WP,aP(VP,8,this)),aP(VP,11,this),dP(this,UP,aP(VP,12,this)),aP(VP,15,this),dP(this,GP,aP(VP,16,this,this.isDragSource?"dragging":"idle")),aP(VP,19,this),this.type=o,this.sensors=i,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=gP(t);if(n.plugin===e)return n.options}}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};VP=tP(HP),WP=new WeakMap,UP=new WeakMap,GP=new WeakMap,sP(VP,4,"type",BP,uT,WP),sP(VP,4,"modifiers",$P,uT,UP),sP(VP,4,"status",FP,uT,GP),sP(VP,2,"isDropping",zP,uT),sP(VP,2,"isDragging",_P,uT),sP(VP,2,"isDragSource",jP,uT),iP(VP,uT);var cT=class extends(eT=sT,QP=[nD],ZP=[nD],JP=[nD],XP=[nD],YP=[nD],KP=[rD],eT){constructor(e,t){var n=e,{accept:r,collisionDetector:o,collisionPriority:i,type:a}=n;super(eP(n,["accept","collisionDetector","collisionPriority","type"]),t),aP(tT,5,this),dP(this,nT,aP(tT,8,this)),aP(tT,11,this),dP(this,rT,aP(tT,12,this)),aP(tT,15,this),dP(this,oT,aP(tT,16,this)),aP(tT,19,this),dP(this,iT,aP(tT,20,this)),aP(tT,23,this),dP(this,aT,aP(tT,24,this)),aP(tT,27,this),this.accept=r,this.collisionDetector=o,this.collisionPriority=i,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};tT=tP(eT),nT=new WeakMap,rT=new WeakMap,oT=new WeakMap,iT=new WeakMap,aT=new WeakMap,sP(tT,4,"accept",QP,cT,nT),sP(tT,4,"type",ZP,cT,rT),sP(tT,4,"collisionDetector",JP,cT,oT),sP(tT,4,"collisionPriority",XP,cT,iT),sP(tT,4,"shape",YP,cT,aT),sP(tT,2,"isDropTarget",KP,cT),iP(tT,cT);var dT=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},pT=class extends dT{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function fT(e,t=!0){let n=!1;return ZD(JD({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var hT,mT,gT,bT,vT,yT,xT,ST,wT,CT,ET=class extends yP{constructor(e){super(e);let t=[];this.destroy=iD(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:o}=n;if(n.isDisabled())return;if(sT.pendingIdChanges)return;const i=fT({collisions:o});if(r.dispatch("collision",i),i.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(o,t))return;t=o;const[a]=o;VM(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},RT=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(RT||{}),AT=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(AT||{});ST=[nD],xT=[rD],yT=[rD],vT=[rD],bT=[rD],gT=[rD],mT=[rD],hT=[rD];var IT=class{constructor(){aP(wT,5,this),dP(this,CT,aP(wT,8,this,"idle")),aP(wT,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializationPending(){return"initialization-pending"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};wT=tP(null),CT=new WeakMap,sP(wT,4,"value",ST,IT,CT),sP(wT,2,"current",xT,IT),sP(wT,2,"idle",yT,IT),sP(wT,2,"initializationPending",vT,IT),sP(wT,2,"initializing",bT,IT),sP(wT,2,"initialized",gT,IT),sP(wT,2,"dragging",mT,IT),sP(wT,2,"dropped",hT,IT),iP(wT,IT);var MT,kT=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return VM(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=fT({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return VM(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:o}=e;$M(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(o)});const i=fT({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",i),i.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&$M(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return VM(()=>{var t,n;const{dragOperation:r}=this.manager,{status:o,controller:i}=r;if(!o.dragging||!i||i.signal.aborted)return;const a=fT({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,o,i,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(i=null==(o=e.by)?void 0:o.y)?i:0)};r.position.current=l})})}stop(e={}){return VM(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:o}=r;if(!o||o.signal.aborted)return;let i;o.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=VM(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===o&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=ck(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return i=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),i?i.then(a).catch(()=>r.reset()):a()})}},DT=class extends bP{constructor(e,t){super(e,t),this.manager=e,this.options=t}},PT=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},TT=class{constructor(e){this.options=e,dP(this,MT)}set controller(e){pP(this,MT,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=cP(this,MT))||t.activate(e)}};MT=new WeakMap;var qT,OT,LT,NT,jT,_T,zT,FT,$T,BT,HT,VT,WT,UT,GT,KT,YT,XT,JT,ZT=class extends bP{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},QT=class{constructor(e){this.draggables=new lT,this.droppables=new lT,this.plugins=new xP(e),this.sensors=new xP(e),this.modifiers=new xP(e)}register(e,t){if(e instanceof uT)return this.draggables.register(e.id,e);if(e instanceof cT)return this.droppables.register(e.id,e);if(e.prototype instanceof ZT)return this.modifiers.register(e,t);if(e.prototype instanceof DT)return this.sensors.register(e,t);if(e.prototype instanceof bP)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof sT)return e instanceof uT?this.draggables.unregister(e.id,e):e instanceof cT?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof ZT)return this.modifiers.unregister(e);if(e.prototype instanceof DT)return this.sensors.unregister(e);if(e.prototype instanceof bP)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};$T=[rD],FT=[nD],zT=[nD],_T=[nD],jT=[nD],NT=[nD],LT=[rD],OT=[rD],qT=[rD];var eq=class{constructor(e){aP(WT,5,this),dP(this,BT),dP(this,HT),dP(this,VT,new sD(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new IT,dP(this,UT,aP(WT,8,this,!1)),aP(WT,11,this),dP(this,GT,aP(WT,12,this,null)),aP(WT,15,this),dP(this,KT,aP(WT,16,this,null)),aP(WT,19,this),dP(this,YT,aP(WT,20,this,null)),aP(WT,23,this),dP(this,XT,aP(WT,24,this,[])),aP(WT,27,this),this.position=new TD({x:0,y:0}),dP(this,JT,{x:0,y:0}),pP(this,BT,e)}get shape(){const{current:e,initial:t,previous:n}=cP(this,VT);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?cP(this,VT).current=e:cP(this,VT).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=cP(this,BT).registry.draggables.get(t);return n&&pP(this,HT,n),null!=(e=null!=n?n:cP(this,HT))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=cP(this,BT).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(ZD(JD({},this.snapshot()),{transform:n}));return pP(this,JT,n),n}snapshot(){return VM(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:cP(this,JT),shape:this.shape?lD(this.shape):null,position:lD(this.position),status:lD(this.status),canceled:this.canceled}))}reset(){$M(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,cP(this,VT).reset(),this.position.reset({x:0,y:0}),pP(this,JT,{x:0,y:0}),this.modifiers=[]})}};WT=tP(null),BT=new WeakMap,HT=new WeakMap,VT=new WeakMap,UT=new WeakMap,GT=new WeakMap,KT=new WeakMap,YT=new WeakMap,XT=new WeakMap,JT=new WeakMap,sP(WT,2,"shape",$T,eq),sP(WT,4,"canceled",FT,eq,UT),sP(WT,4,"activatorEvent",zT,eq,GT),sP(WT,4,"sourceIdentifier",_T,eq,KT),sP(WT,4,"targetIdentifier",jT,eq,YT),sP(WT,4,"modifiers",NT,eq,XT),sP(WT,2,"source",LT,eq),sP(WT,2,"target",OT,eq),sP(WT,2,"transform",qT,eq),iP(WT,eq);var tq={get rendering(){return Promise.resolve()}};function nq(e,t){return"function"==typeof e?e(t):null!=e?e:t}var rq=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=nq(n.plugins,[]),o=nq(n.sensors,[]),i=nq(n.modifiers,[]),a=null!=(t=n.renderer)?t:tq,s=new pT(this),l=new QT(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new kT(this),this.dragOperation=new eq(this),this.collisionObserver=new LP(this),this.plugins=[ET,...r],this.modifiers=i,this.sensors=o;const{destroy:u}=this,c=iD(()=>{var e,t,n;const r=VM(()=>this.dragOperation.modifiers),o=this.modifiers;for(const e of r)o.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=gP(e);return new t(this,n)}))?n:o});this.destroy=()=>{c(),u()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},oq=e=>{throw TypeError(e)},iq=(e,t,n)=>t.has(e)||oq("Cannot "+n),aq=(e,t,n)=>(iq(e,t,"read from private field"),t.get(e)),sq=(e,t,n)=>t.has(e)?oq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),lq=(e,t,n,r)=>(iq(e,t,"write to private field"),t.set(e,n),n),uq=(e,t,n)=>(iq(e,t,"access private method"),n);function cq(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function dq(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,o=(cq(n)?n.getKeyframes():[]).filter(t);o.length>0&&(r=[o[o.length-1],e])}return r}function pq(e){const{width:t,height:n,top:r,left:o,bottom:i,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:o,bottom:i,right:a}}function fq(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function hq(e){return"nodeType"in e}function mq(e){var t,n,r;return e?fq(e)?e:hq(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function gq(e){const{Document:t}=mq(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function bq(e){return!(!e||fq(e))&&(e instanceof mq(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function vq(e){return e instanceof mq(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function yq(e){return e?fq(e)?e.document:hq(e)?gq(e)?e:bq(e)||vq(e)?e.ownerDocument:document:document:document}function xq(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===o}function Sq(e,t=e.getBoundingClientRect(),n=0){var r,o,i,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(r=u.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!xq(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),o=n*(e.bottom-e.top),i=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+o),left:Math.max(l.left,e.left-i),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=c.visualViewport,f=null!=(o=null==p?void 0:p.offsetTop)?o:0,h=null!=(i=null==p?void 0:p.offsetLeft)?i:0,m=null!=(a=null==p?void 0:p.width)?a:c.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:c.innerHeight,b=n*g,v=n*m;return l={top:Math.max(l.top,f-b),right:Math.min(l.right,h+m+v),bottom:Math.min(l.bottom,f+g+b),left:Math.max(l.left,h-v),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function wq(e){return{x:e.clientX,y:e.clientY}}var Cq="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Eq(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...Eq(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const o=r.parent;o&&o.document&&o.document!==e&&n.push(...Eq(o.document,t))}}catch(e){}return n}function Rq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Aq(){var e,t;const n=Rq()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function Iq(e){return!(!e||!hq(e))&&e instanceof mq(e).ShadowRoot}function Mq(e){if(e&&hq(e)){let t=e.getRootNode();if(Iq(t))return t;if(t instanceof Document)return t}return yq(e)}function kq(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function Dq(e){return"value"in e}function Pq(e){return"CANVAS"===e.tagName}function Tq(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:o,top:i}=r.getBoundingClientRect();return Tq(e,{x:t-o,y:n-i})}}return r}var qq=new WeakMap;var Oq=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],o=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:i}=t,a=[e,t];e.addEventListener(n,r,i),this.entries.add(a),o.push(a)}const i=this.entries;return function(){for(const e of o){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o),i.delete(e)}}}};function Lq(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function Nq(e,t){const n=()=>performance.now();let r,o;return function(...i){const a=this;o?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,i),o=n()},t-(n()-o))):(e.apply(a,i),o=n())}}var jq,_q="undefined"!=typeof ResizeObserver?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},zq=class extends _q{constructor(e){super(t=>{aq(this,jq)?e(t,this):lq(this,jq,!0)}),sq(this,jq,!1)}};jq=new WeakMap;var Fq,$q,Bq,Hq,Vq,Wq,Uq,Gq,Kq,Yq,Xq,Jq=Array.from({length:100},(e,t)=>t/100),Zq=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,sq(this,Kq),this.disconnect=()=>{var e,t,n;lq(this,Uq,!0),null==(e=aq(this,Bq))||e.disconnect(),null==(t=aq(this,Hq))||t.disconnect(),aq(this,Vq).disconnect(),null==(n=aq(this,Wq))||n.remove()},sq(this,Fq,!0),sq(this,$q),sq(this,Bq),sq(this,Hq),sq(this,Vq),sq(this,Wq),sq(this,Uq,!1),sq(this,Gq,Nq(()=>{var e,t,n;const{element:r}=this;if(null==(e=aq(this,Hq))||e.disconnect(),aq(this,Uq)||!aq(this,Fq)||!r.isConnected)return;const o=null!=(t=r.ownerDocument)?t:document,{innerHeight:i,innerWidth:a}=null!=(n=o.defaultView)?n:window,s=r.getBoundingClientRect(),l=Sq(r,s),{top:u,left:c,bottom:d,right:p}=l,f=-Math.floor(u),h=-Math.floor(c),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(i-d)}px ${h}px`;this.boundingClientRect=s,lq(this,Hq,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:DD.intersectionRatio(n,Sq(r)))&&aq(this,Gq).call(this)},{threshold:Jq,rootMargin:m,root:o})),aq(this,Hq).observe(r),uq(this,Kq,Yq).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),lq(this,Fq,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=Sq(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const o=e.ownerDocument;(null==n?void 0:n.debug)&&(lq(this,Wq,document.createElement("div")),aq(this,Wq).style.background="rgba(0,0,0,0.15)",aq(this,Wq).style.position="fixed",aq(this,Wq).style.pointerEvents="none",o.body.appendChild(aq(this,Wq))),lq(this,Vq,new IntersectionObserver(t=>{var n,r;const o=t[t.length-1],{boundingClientRect:i,isIntersecting:a}=o,{width:s,height:l}=i,u=aq(this,Fq);lq(this,Fq,a),(s||l)&&(u&&!a?(null==(n=aq(this,Hq))||n.disconnect(),this.callback(null),null==(r=aq(this,Bq))||r.disconnect(),lq(this,Bq,void 0),aq(this,Wq)&&(aq(this,Wq).style.visibility="hidden")):aq(this,Gq).call(this),a&&!aq(this,Bq)&&(lq(this,Bq,new zq(aq(this,Gq))),aq(this,Bq).observe(e)))},{threshold:Jq,root:o})),aq(this,Fq)&&!n.skipInitial&&this.callback(this.boundingClientRect),aq(this,Vq).observe(e)}};Fq=new WeakMap,$q=new WeakMap,Bq=new WeakMap,Hq=new WeakMap,Vq=new WeakMap,Wq=new WeakMap,Uq=new WeakMap,Gq=new WeakMap,Kq=new WeakSet,Yq=function(){aq(this,Uq)||(uq(this,Kq,Xq).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,aq(this,$q))||(this.callback(this.boundingClientRect),lq(this,$q,this.boundingClientRect)))},Xq=function(){if(aq(this,Wq)){const{top:e,left:t,width:n,height:r}=Sq(this.element);aq(this,Wq).style.overflow="hidden",aq(this,Wq).style.visibility="visible",aq(this,Wq).style.top=`${Math.floor(e)}px`,aq(this,Wq).style.left=`${Math.floor(t)}px`,aq(this,Wq).style.width=`${Math.floor(n)}px`,aq(this,Wq).style.height=`${Math.floor(r)}px`}};var Qq,eO,tO,nO,rO=new WeakMap,oO=new WeakMap;function iO(e,t){let n=rO.get(e);if(!n){const t=new Zq(e,t=>{const n=rO.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),rO.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(rO.delete(e),n.disconnect())}}var aO=class{constructor(e,t,n){this.callback=t,sq(this,Qq),sq(this,eO,!1),sq(this,tO),sq(this,nO,Nq(e=>{if(!aq(this,eO)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of aq(this,tO))if(e.target.contains(t)){this.callback(aq(this,Qq).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=Lq(e);for(;n;)t.add(n),n=Lq(n);return t}(e),o=function(e,t){const n=new Set;for(const r of e){const e=iO(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),i=function(e,t){var n;const r=e.ownerDocument;if(!oO.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),oO.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:o,disconnect:i}=null!=(n=oO.get(r))?n:{};return o&&i?(o.add(t),()=>{o.delete(t),0===o.size&&(i(),oO.delete(r))}):()=>{}}(e,aq(this,nO));lq(this,tO,r),lq(this,Qq,new Zq(e,t,n)),this.disconnect=()=>{aq(this,eO)||(lq(this,eO,!0),o(),i(),aq(this,Qq).disconnect())}}};function sO(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function lO(e){try{sO(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function uO(e){return!(!Cq||!e)&&e===yq(e).scrollingElement}function cO(e){var t,n;const r=mq(e),o=uO(e)?function(e){var t,n,r,o;const{documentElement:i}=yq(e),a=mq(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:i.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:i.clientHeight,u=null!=(r=null==a?void 0:a.offsetTop)?r:0,c=null!=(o=null==a?void 0:a.offsetLeft)?o:0;return{top:u,left:c,right:c+s,bottom:u+l,width:s,height:l}}(e):pq(e),i=r.visualViewport,a=uO(e)?{height:null!=(t=null==i?void 0:i.height)?t:r.innerHeight,width:null!=(n=null==i?void 0:i.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:o,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function dO(e,t,n=cO(e)){const{isTop:r,isBottom:o,isLeft:i,isRight:a,position:s}=n,{x:l,y:u}=null!=t?t:{x:0,y:0},c=!r&&s.current.y+u>0,d=!o&&s.current.y+u<s.max.y,p=!i&&s.current.x+l>0,f=!a&&s.current.x+l<s.max.x;return{top:c,bottom:d,left:p,right:f,x:p||f,y:c||d}}Qq=new WeakMap,eO=new WeakMap,tO=new WeakMap,nO=new WeakMap;var pO=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},fO=new pO(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),hO=new pO(e=>setTimeout(e,50)),mO=new Map,gO=mO.clear.bind(mO);function bO(e,t=!1){if(!t)return vO(e);let n=mO.get(e);return n||(n=vO(e),mO.set(e,n),hO.schedule(gO),n)}function vO(e){return mq(e).getComputedStyle(e)}var yO={excludeElement:!0,escapeShadowDOM:!0};function xO(e,t=yO){const{limit:n,excludeElement:r,escapeShadowDOM:o}=t,i=new Set;return e?function t(a){if(null!=n&&i.size>=n)return i;if(!a)return i;if(gq(a)&&null!=a.scrollingElement&&!i.has(a.scrollingElement))return i.add(a.scrollingElement),i;if(o&&Iq(a))return t(a.host);if(!bq(a))return vq(a)?t(a.parentElement):i;if(i.has(a))return i;const s=bO(a,!0);if(r&&a===e||function(e,t=bO(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&i.add(a),function(e,t=bO(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&i.add(e),i}return t(a.parentNode)}(e):i}function SO(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=Lq(e);for(;r;){if(r===t)return n;const e=pq(r),{x:o,y:i}=wO(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*o,n.scaleY=n.scaleY*i,r=Lq(r)}return n}function wO(e,t=pq(e)){const n=Math.round(t.width),r=Math.round(t.height);if(bq(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const o=bO(e,!0);return{x:(parseFloat(o.width)||n)/n,y:(parseFloat(o.height)||r)/r}}function CO(e){if(!e||"none"===e)return null;const[t,n,r="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function EO(e){var t,n,r,o,i,a,s,l,u;const{scale:c,transform:d,translate:p}=e,f=function(e){if(!e||"none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(c),h=CO(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,b=null!=(n=null==f?void 0:f.y)?n:1,v=null!=(r=null==h?void 0:h.x)?r:0,y=null!=(o=null==h?void 0:h.y)?o:0,x=null!=(i=null==m?void 0:m.x)?i:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:v+x,y:y+S,z:null!=(u=null==h?void 0:h.z)?u:0,scaleX:g*w,scaleY:b*C}}var RO=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(RO||{}),AO={x:.2,y:.2},IO={x:10,y:10};function MO(e,t,n,r=25,o=AO,i=IO,a=cO(e)){const{x:s,y:l}=t,{rect:u,isTop:c,isBottom:d,isLeft:p,isRight:f}=a,h=SO(e),m=EO(bO(e,!0)),g=null!==m&&(null==m?void 0:m.scaleX)<0,b=null!==m&&(null==m?void 0:m.scaleY)<0,v=new DD(u.left*h.scaleX+h.x,u.top*h.scaleY+h.y,u.width*h.scaleX,u.height*h.scaleY),y={x:0,y:0},x={x:0,y:0},S=v.height*o.y,w=v.width*o.x;return S>0&&(!c||b&&!d)&&l<=v.top+S&&1!==(null==n?void 0:n.y)&&s>=v.left-i.x&&s<=v.right+i.x?(y.y=b?1:-1,x.y=r*Math.abs((v.top+S-l)/S)):S>0&&(!d||b&&!c)&&l>=v.bottom-S&&-1!==(null==n?void 0:n.y)&&s>=v.left-i.x&&s<=v.right+i.x&&(y.y=b?-1:1,x.y=r*Math.abs((v.bottom-S-l)/S)),w>0&&(!f||g&&!p)&&s>=v.right-w&&-1!==(null==n?void 0:n.x)&&l>=v.top-i.y&&l<=v.bottom+i.y?(y.x=g?-1:1,x.x=r*Math.abs((v.right-w-s)/w)):w>0&&(!p||g&&!f)&&s<=v.left+w&&1!==(null==n?void 0:n.x)&&l>=v.top-i.y&&l<=v.bottom+i.y&&(y.x=g?1:-1,x.x=r*Math.abs((v.left+w-s)/w)),{direction:y,speed:x}}function kO(e,{block:t="nearest",inline:n="nearest"}={}){if(!bq(e))return;const r=xO(e),o=[];for(const i of r){if(!bq(i))continue;const{top:r,left:a}=PO(e,i);let s=r,l=a;for(const e of o)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<i.scrollTop;n!==s+e.offsetHeight>i.scrollTop+i.clientHeight&&(i.scrollTop="center"===t?s-i.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-i.clientHeight)}if("none"!==n){const t=l<i.scrollLeft;t!==l+e.offsetWidth>i.scrollLeft+i.clientWidth&&(i.scrollLeft="center"===n?l-i.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-i.clientWidth)}o.push(i)}}function DO(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!bq(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function PO(e,t){const n=DO(e),r=DO(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function TO({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function qO(e,t=bO(e).translate,n=!0){if(n){const t=dq(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=CO(e);if(t)return t}}}if(t){const e=CO(t);if(e)return e}return{x:0,y:0,z:0}}var OO=new pO(e=>setTimeout(e,0)),LO=new Map,NO=LO.clear.bind(LO);function jO(e,t){const n=function(e){const t=e.ownerDocument;let n=LO.get(t);if(n)return n;n=t.getAnimations(),LO.set(t,n),OO.schedule(NO);const r=n.filter(t=>cq(t.effect)&&t.effect.target===e);return LO.set(e,r),n}(e).filter(e=>{var n,r;if(cq(e.effect)){const{target:o}=e.effect;if(null==(r=o&&(null==(n=t.isValidTarget)?void 0:n.call(t,o)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var _O=class extends DD{constructor(e,t={}){var n,r,o,i;const{frameTransform:a=SO(e),ignoreTransforms:s,getBoundingClientRect:l=pq}=t,u=jO(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||Rq())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=bO(e),b=EO(g),v={x:null!=(n=null==b?void 0:b.scaleX)?n:1,y:null!=(r=null==b?void 0:b.scaleY)?r:1},y=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,o,i,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=cq(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:u}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(o=l,a=!0),"string"==typeof u&&u&&(i=u,a=!0)}return a?EO({transform:null!=r?r:t.transform,translate:null!=o?o:t.translate,scale:null!=i?i:t.scale}):null}(e,g);null==u||u(),b&&(d=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left-i-(1-r)*parseFloat(n),l=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,c=o?e.height/o:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(c,b,g.transformOrigin),(s||y)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(o=null==d?void 0:d.width)?o:h,height:null!=(i=null==d?void 0:d.height)?i:m};if(y&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left+i+(1-r)*parseFloat(n),l=e.top+a+(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width*r:e.width,c=o?e.height*o:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(d,y,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,v.x=y.scaleX,v.y=y.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=v,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function zO(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var FO=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(zO(n))for(const[r,o]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof o?o:`${o}px`)}}remove(e,t=""){const{element:n}=this;if(zO(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(zO(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function $O(e){return!!e&&(e instanceof mq(e).Element||hq(e)&&e.nodeType===Node.ELEMENT_NODE)}function BO(e){if(!e)return!1;const{KeyboardEvent:t}=mq(e.target);return e instanceof t}var HO={};function VO(e){const t=null==HO[e]?0:HO[e]+1;return HO[e]=t,`${e}-${t}`}var WO=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/kD.distance(t.shape.center,n),type:AT.PointerIntersection,priority:RT.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=kD.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:AT.ShapeIntersection,priority:RT.Normal}}return null})(e)},UO=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:o}=t;if(!n.shape)return null;const i=r?DD.from(r.current.boundingRectangle).corners:void 0,a=DD.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+kD.distance(kD.from(t),null!=(r=null==i?void 0:i[n])?r:o.current)},0),s=a/4;return{id:n.id,value:1/s,type:AT.Collision,priority:RT.Normal}},GO=Object.create,KO=Object.defineProperty,YO=Object.defineProperties,XO=Object.getOwnPropertyDescriptor,JO=Object.getOwnPropertyDescriptors,ZO=Object.getOwnPropertySymbols,QO=Object.prototype.hasOwnProperty,eL=Object.prototype.propertyIsEnumerable,tL=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),nL=e=>{throw TypeError(e)},rL=(e,t,n)=>t in e?KO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oL=(e,t)=>{for(var n in t||(t={}))QO.call(t,n)&&rL(e,n,t[n]);if(ZO)for(var n of ZO(t))eL.call(t,n)&&rL(e,n,t[n]);return e},iL=(e,t)=>YO(e,JO(t)),aL=(e,t)=>KO(e,"name",{value:t,configurable:!0}),sL=(e,t)=>{var n={};for(var r in e)QO.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ZO)for(var r of ZO(e))t.indexOf(r)<0&&eL.call(e,r)&&(n[r]=e[r]);return n},lL=e=>{var t;return[,,,GO(null!=(t=null==e?void 0:e[tL("metadata")])?t:null)]},uL=["class","method","getter","setter","accessor","field","value","get","set"],cL=e=>void 0!==e&&"function"!=typeof e?nL("Function expected"):e,dL=(e,t,n,r,o)=>({kind:uL[e],name:t,metadata:r,addInitializer:e=>n._?nL("Already initialized"):o.push(cL(e||null))}),pL=(e,t)=>rL(t,tL("metadata"),e[3]),fL=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},hL=(e,t,n,r,o,i)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=uL[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&XO(d<4?o:{get[n](){return bL(this,i)},set[n](e){return yL(this,i,e)}},n));d?f&&d<4&&aL(i,(d>2?"set ":d>1?"get ":"")+n):aL(o,n);for(var y=r.length-1;y>=0;y--)u=dL(d,n,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>gL(o,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?bL:xL)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>yL(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?cL(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?nL("Object expected"):(cL(a=s.get)&&(v.get=a),cL(a=s.set)&&(v.set=a),cL(a=s.init)&&g.unshift(a));return d||pL(e,o),v&&KO(o,n,v),f?4^d?i:v:o},mL=(e,t,n)=>t.has(e)||nL("Cannot "+n),gL=(e,t)=>Object(t)!==t?nL('Cannot use the "in" operator on this value'):e.has(t),bL=(e,t,n)=>(mL(e,t,"read from private field"),n?n.call(e):t.get(e)),vL=(e,t,n)=>t.has(e)?nL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),yL=(e,t,n,r)=>(mL(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),xL=(e,t,n)=>(mL(e,t,"access private method"),n),SL="button",wL="draggable",CL="dnd-kit-description",EL="dnd-kit-announcement",RL={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},AL={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function IL(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}function ML(e){var t;return"button"===(null!=(t=e.getAttribute("role"))?t:"button")}var kL=["dragover","dragmove"],DL=class extends bP{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=CL,announcement:o=EL}={},announcements:i=AL,screenReaderInstructions:a=RL,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:VO(r),u=n?`${o}-${n}`:VO(o);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>fO.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),b=Object.entries(i).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const o=p;if(!o)return;const i=null==t?void 0:t(n,r);i&&o.nodeValue!==i&&(f=i,kL.includes(e)?g():(m(),g.cancel()))})),v=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(c)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(u),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function x(){for(const e of y)e()}this.registerEffect(()=>{var e;y.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){c&&d||y.add(v),IL(n)&&!Rq()||n.hasAttribute("tabindex")||y.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||y.add(()=>n.setAttribute("role",SL)),n.hasAttribute("aria-roledescription")||y.add(()=>n.setAttribute("aria-roledescription",wL)),n.hasAttribute("aria-describedby")||y.add(()=>n.setAttribute("aria-describedby",l));const e=ML(n)?["aria-pressed","aria-grabbed"]:["aria-grabbed"];for(const r of e){const e=String(t.isDragging);n.getAttribute(r)!==e&&y.add(()=>n.setAttribute(r,e))}const r=String(t.disabled);n.getAttribute("aria-disabled")!==r&&y.add(()=>n.setAttribute("aria-disabled",r))}}y.size>0&&fO.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),b.forEach(e=>e())}}};var PL,TL,qL,OL,LL,NL,jL,_L,zL,FL,$L,BL,HL,VL,WL,UL,GL=new Map;function KL(e){return Iq(e)?e.host.isConnected:null!=e.defaultView}var YL=class extends(NL=yP,LL=[nD],OL=[nD],qL=[rD],TL=[rD],PL=[rD],NL){constructor(e,t){super(e,t),fL(jL,5,this),vL(this,BL),vL(this,_L,fL(jL,8,this,new Map)),fL(jL,11,this),vL(this,zL,fL(jL,12,this,new Set)),fL(jL,15,this),vL(this,FL,new Set),vL(this,$L,new Map),this.registerEffect(xL(this,BL,HL))}register(e,t){return VM(()=>{var n;const r=new Map(this.registeredRules);r.set(e,null!=(n=null==t?void 0:t.retain)&&n),this.registeredRules=r}),()=>{VM(()=>{const t=new Map(this.registeredRules);t.delete(e),this.registeredRules=t})}}addRoot(e){return VM(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{VM(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return Mq(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return Mq(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter(e=>null!=e);return new Set([...e,...this.additionalRoots])}return new Set}destroy(){for(const e of bL(this,$L).values())for(const t of e.values())t();bL(this,$L).clear(),bL(this,FL).clear(),super.destroy()}};jL=lL(NL),_L=new WeakMap,zL=new WeakMap,FL=new WeakMap,$L=new WeakMap,BL=new WeakSet,HL=function(){const{roots:e,registeredRules:t}=this;for(const t of e)bL(this,FL).add(t);const n=new Map;for(const r of bL(this,FL)){const o=e.has(r);if(o||KL(r))for(const[e,i]of t){if(!o&&!i)continue;let t=n.get(r);t||(t=new Set,n.set(r,t)),t.add(e)}else bL(this,FL).delete(r)}for(const[e,t]of bL(this,$L)){const r=n.get(e);for(const[e,n]of t)(null==r?void 0:r.has(e))||(n(),t.delete(e));0===t.size&&bL(this,$L).delete(e)}for(const[e,t]of n){let n=bL(this,$L).get(e);n||(n=new Map,bL(this,$L).set(e,n));for(const r of t)n.has(r)||n.set(r,xL(this,BL,VL).call(this,e,r))}},VL=function(e,t){let n=GL.get(e);n||(n=new Map,GL.set(e,n));let r=n.get(t);if(!r){const o=gq(e)?xL(this,BL,WL).call(this,e,n,t):xL(this,BL,UL).call(this,e,n,t);if(!o)return()=>{};r=o,n.set(t,r)}r.refCount++;let o=!1;return()=>{o||(o=!0,r.refCount--,0===r.refCount&&r.cleanup())}},WL=function(e,t,n){var r;const o=e.createElement("style"),{nonce:i}=null!=(r=this.options)?r:{};i&&o.setAttribute("nonce",i),o.textContent=n,e.head.prepend(o);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===o)return void e.head.prepend(o)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),o.remove(),t.delete(n),0===t.size&&GL.delete(e)}}},UL=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=r?r:{};if(!o)return null;const i=new o;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{var r;if(Iq(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(i);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&GL.delete(e)}}},hL(jL,4,"registeredRules",LL,YL,_L),hL(jL,4,"additionalRoots",OL,YL,zL),hL(jL,2,"sourceRoot",qL,YL),hL(jL,2,"targetRoot",TL,YL),hL(jL,2,"roots",PL,YL),pL(jL,YL),YL.configure=mP(YL);var XL=YL,JL="data-dnd-",ZL=`${JL}dropping`,QL="--dnd-",eN=`${JL}dragging`,tN=`${JL}placeholder`,nN=[eN,tN,"popover","aria-pressed","aria-grabbing"],rN=["view-transition-name"],oN=`\n :is(:root,:host) [${eN}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${QL}top, 0px) !important;\n left: var(${QL}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${QL}width, auto);\n max-width: var(${QL}width, auto);\n height: var(${QL}height, auto);\n max-height: var(${QL}height, auto);\n transform: var(${QL}transform, none) !important;\n transition: var(${QL}transition) !important;\n }\n\n :is(:root,:host) [${tN}] {\n transition: none;\n }\n\n :is(:root,:host) [${tN}='hidden'] {\n visibility: hidden;\n }\n\n [${eN}] * {\n pointer-events: none !important;\n }\n\n [${eN}]:not([${ZL}]) {\n translate: var(${QL}translate) !important;\n }\n\n [${eN}][style*='${QL}scale'] {\n scale: var(${QL}scale) !important;\n transform-origin: var(${QL}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${eN}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${eN}]::backdrop, [${JL}overlay]:not([${eN}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function iN(e,t="hidden"){return VM(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const o=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${JL}${VO("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),i=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(Dq(e)&&Dq(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),Pq(e)&&Pq(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,o]of e){if(!r.element)continue;const e=`[${o}]`,i=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(o),!i)continue;const a=r.element;r.proxy=i,i.removeAttribute(o),qq.set(a,i),n.push(()=>{qq.delete(a),r.proxy=void 0})}}(o,a,i),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(tN,t)}(a,t),a.remove=()=>{i.forEach(e=>e()),s.call(a)},a})}function aN(e,t){return e===t||Lq(e)===Lq(t)}function sN(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&$O(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>lO(t))}function lN(e){return"TR"===e.tagName}var uN,cN,dN,pN,fN,hN,mN,gN=250,bN="ease";var vN=class extends(cN=bP,uN=[nD],cN){constructor(e,t){super(e,t),vL(this,fN),vL(this,pN,fL(dN,8,this)),fL(dN,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(XL),r=null==n?void 0:n.register(oN,{retain:!0});if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(xL(this,fN,hN).bind(this,n)),this.registerEffect(xL(this,fN,mN))}};dN=lL(cN),pN=new WeakMap,fN=new WeakSet,hN=function(e){const{overlay:t}=this;if(!t||!e)return;const n=Mq(t);return n?e.addRoot(n):void 0},mN=function(){var e,t,n,r,o,i,a;const{state:s,manager:l,options:u}=this,{dragOperation:c}=l,{position:d,source:p,status:f}=c;if(f.idle)return s.current={},void(s.initial={});if(!p)return;const{element:h}=p,m=p.pluginConfig(vN),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==u?void 0:u.feedback)?t:"default",b="function"==typeof g?g(p,l):g;if(!h||"none"===b||!f.initialized||f.initializing)return;const{initial:v}=s,y=null!=(n=this.overlay)?n:h,x=SO(y),S=SO(h),w=!aN(h,y),C=new _O(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,R=S.scaleY/x.scaleY;let{width:A,height:I,top:M,left:k}=C;w&&(A/=E,I/=R);const D=new FO(y),P=bO(h),{transition:T,translate:q,boxSizing:O,paddingBlockStart:L,paddingBlockEnd:N,paddingInlineStart:j,paddingInlineEnd:_,borderInlineStartWidth:z,borderInlineEndWidth:F,borderBlockStartWidth:$,borderBlockEndWidth:B}=P,H=T.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),V=EO(P),W=P.transform,U="clone"===b,G="content-box"===O,K=G?parseInt(j)+parseInt(_)+parseInt(z)+parseInt(F):0,Y=G?parseInt(L)+parseInt(N)+parseInt($)+parseInt(B):0,X="move"===b||this.overlay?null:iN(p,U?"clone":"hidden"),J=VM(()=>BO(l.dragOperation.activatorEvent));if(!v.translate)if(this.overlay&&V)v.translate={x:V.x,y:V.y};else if("none"!==q){const e=CO(q);e&&(v.translate=e)}if(!v.transformOrigin){const e=VM(()=>d.current),t=k+(null!=(r=null==V?void 0:V.x)?r:0),n=M+(null!=(o=null==V?void 0:V.y)?o:0);v.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(A*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(I*x.scaleY)}}const{transformOrigin:Z}=v,Q=M*x.scaleY+x.y,ee=k*x.scaleX+x.x;if(!v.coordinates&&(v.coordinates={x:ee,y:Q},1!==E||1!==R)){const{scaleX:e,scaleY:t}=S,{x:n,y:r}=Z;v.coordinates.x+=(A*e-A)*n,v.coordinates.y+=(I*t-I)*r}v.dimensions||(v.dimensions={width:A,height:I}),v.frameTransform||(v.frameTransform=x);const te=v.coordinates.x-ee,ne=v.coordinates.y-Q,re=(v.dimensions.width*v.frameTransform.scaleX-A*x.scaleX)*Z.x,oe=(v.dimensions.height*v.frameTransform.scaleY-I*x.scaleY)*Z.y,ie={x:te/x.scaleX+re,y:ne/x.scaleY+oe},ae=k+ie.x,se=M+ie.y;y.setAttribute(eN,"true");const le=VM(()=>c.transform),ue=null!=(i=v.translate)?i:{x:0,y:0},ce=le.x*x.scaleX+ue.x,de=le.y*x.scaleY+ue.y,pe=Aq();if(D.set({width:A-K,height:I-Y,top:se+pe.y,left:ae+pe.x,translate:`${ce}px ${de}px 0`,transform:this.overlay?"none":W,transition:H?`${H}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${R}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},QL),X&&(h.insertAdjacentElement("afterend",X),null==u?void 0:u.rootElement)){("function"==typeof u.rootElement?u.rootElement(p):u.rootElement).appendChild(h)}let fe,he,me;sO(y)&&(y.hasAttribute("popover")||y.setAttribute("popover","manual"),lO(y),y.addEventListener("beforetoggle",sN));const ge=(be={placeholder:X,element:h,feedbackElement:y,frameTransform:x,transformOrigin:Z,width:A,height:I,top:M,left:k,widthOffset:K,heightOffset:Y,delta:ie,styles:D,dragOperation:c,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new _O(be.placeholder,{frameTransform:be.frameTransform,ignoreTransforms:!0}),o=null!=(e=be.transformOrigin)?e:{x:1,y:1},i=(be.width-r.width)*o.x+be.delta.x,a=(be.height-r.height)*o.y+be.delta.y,s=Aq();if(be.styles.set({width:r.width-be.widthOffset,height:r.height-be.heightOffset,top:be.top+a+s.y,left:be.left+i+s.x},QL),null==(t=be.getElementMutationObserver())||t.takeRecords(),lN(be.element)&&lN(be.placeholder)){const e=Array.from(be.element.cells),t=Array.from(be.placeholder.cells);be.getSavedCellWidths()||be.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(n=be.getTranslate())?n:{x:0,y:0},u=be.left+i+s.x+l.x,c=be.top+a+s.y+l.y,d=r.width-be.widthOffset,p=r.height-be.heightOffset,f=be.frameTransform;be.dragOperation.shape=new DD(u*f.scaleX+f.x,c*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var be;const ve=new _O(y);VM(()=>c.shape=ve);const ye=mq(y),xe=e=>{this.manager.actions.stop({event:e})},Se=kq(ye);J&&ye.addEventListener("resize",xe),"idle"===VM(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,n){const r=new MutationObserver(r=>{let o=!1;for(const n of r){if(n.target!==e){o=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||nN.includes(r))continue;const i=e.getAttribute(r);if("style"===r){if(zO(e)&&zO(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(rN.includes(e)||e.startsWith(QL))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==i?t.setAttribute(r,i):t.removeAttribute(r)}o&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(h,X,U),he=function(e,t,n){const r=new MutationObserver(r=>{for(const o of r)if(0!==o.addedNodes.length)for(const r of Array.from(o.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void lO(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void lO(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),lO(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,y));const we=null==(a=l.dragOperation.source)?void 0:a.id,Ce=()=>{var e;if(!J||null==we)return;const t=l.registry.draggables.get(we),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;bq(n)&&n.focus()},Ee=()=>{null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ye.removeEventListener("resize",xe),sO(y)&&(y.removeEventListener("beforetoggle",sN),y.removeAttribute("popover")),y.removeAttribute(eN),D.reset();const e=()=>{var e;if(me&&lN(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}p.status="idle";const t=null!=s.current.translate,n=c.status.dragging;X&&(!n&&t||X.parentElement!==y.parentElement)&&y.isConnected&&X.replaceWith(y),null==X||X.remove()};y===this.overlay?setTimeout(e,0):e()},Re=null==u?void 0:u.dropAnimation,Ae=this,Ie=iD(()=>{var e,t,n;const{transform:r,status:o}=c;if((r.x||r.y||s.current.translate)&&o.dragging){const o=null!=(e=v.translate)?e:{x:0,y:0},i={x:r.x/x.scaleX+o.x,y:r.y/x.scaleY+o.y},a=s.current.translate,l=VM(()=>c.modifiers),d=VM(()=>{var e;return null==(e=c.shape)?void 0:e.current}),p=null==u?void 0:u.keyboardTransition,f=J&&!Se&&null!==p?`${null!=(t=null==p?void 0:p.duration)?t:250}ms ${null!=(n=null==p?void 0:p.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(D.set({transition:H?`${H}, translate ${f}`:`translate ${f}`,translate:`${i.x}px ${i.y}px 0`},QL),null==fe||fe.takeRecords(),d&&d!==ve&&a&&!l.length){const e=kD.delta(i,a);c.shape=DD.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else c.shape=new _O(y);s.current.translate=i}},function(){if(c.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==Ae.dropAnimation?Ae.dropAnimation:Re;let t=s.current.translate;const n=null!=t;if(t||h===y||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,n,r,o;const{animation:i}=e;if("function"==typeof i){const t=i({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=gN,easing:s=bN}=null!=i?i:{};lO(e.feedbackElement);const[,l]=null!=(t=dq(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(n=e.placeholder)?n:e.element,c={frameTransform:aN(e.feedbackElement,u)?null:void 0},d=new _O(e.feedbackElement,c),p=null!=(r=CO(bO(e.feedbackElement).translate))?r:e.translate,f=new _O(u,c),h=DD.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,b=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},v=Math.round(d.intrinsicWidth)!==Math.round(f.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},QL),e.feedbackElement.setAttribute(ZL,""),null==(o=e.getElementMutationObserver())||o.takeRecords(),TO({element:e.feedbackElement,keyframes:iL(oL(oL({},b),v),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:kq(mq(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(ZL),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:y,placeholder:X,translate:t,moved:n,transition:T,alignment:p.alignment,styles:D,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Ie()}},hL(dN,4,"overlay",uN,vN,pN),pL(dN,vN),vN.configure=mP(vN);var yN,xN,SN,wN,CN,EN,RN,AN=vN,IN=!0;SN=[nD],wN=RO.Forward,yN=[nD],xN=RO.Reverse;var MN=class{constructor(){vL(this,EN,fL(CN,8,this,IN)),fL(CN,11,this),vL(this,RN,fL(CN,12,this,IN)),fL(CN,15,this)}isLocked(e){return e!==RO.Idle&&(null==e?this[RO.Forward]===IN&&this[RO.Reverse]===IN:this[e]===IN)}unlock(e){e!==RO.Idle&&(this[e]=false)}};CN=lL(null),EN=new WeakMap,RN=new WeakMap,hL(CN,4,wN,SN,MN,EN),hL(CN,4,xN,yN,MN,RN),pL(CN,MN);var kN,DN,PN,TN,qN,ON,LN=[RO.Forward,RO.Reverse],NN=class{constructor(){this.x=new MN,this.y=new MN}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},jN=class extends bP{constructor(e){super(e);const t=ek(new NN);let n=null;this.signal=t,ck(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new NN);const{delta:o}=e.dragOperation.position;if(n){const e={x:_N(o.x,n.x),y:_N(o.y,n.y)},r=t.peek();$M(()=>{for(const t of zD)for(const n of LN)e[t]===n&&r[t].unlock(n);t.value=r})}n=o})}get current(){return this.signal.peek()}};function _N(e,t){return Math.sign(e-t)}var zN=class extends(DN=yP,kN=[nD],DN){constructor(e){super(e),vL(this,TN,fL(PN,8,this,!1)),fL(PN,11,this),vL(this,qN),vL(this,ON,()=>{if(!bL(this,qN))return;const{element:e,by:t}=bL(this,qN);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var n;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return yL(this,qN,void 0),!1;const{position:o}=this.manager.dragOperation,i=null==o?void 0:o.current;if(i){const{by:o}=null!=e?e:{},a=o?{x:FN(o.x),y:FN(o.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of r){const r=cO(e),l=dO(e,o,r);if(l.x||l.y){const{speed:l,direction:u}=MO(e,i,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold,void 0,r);if(s)for(const e of zD)s[e].isLocked(u[e])&&(l[e]=0,u[e]=0);if(u.x||u.y){const{x:t,y:r}=null!=o?o:u,i=t*l.x,a=r*l.y;if(i||a){const t=null==(n=bL(this,qN))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!i||t.y&&!a)continue}return yL(this,qN,{element:e,by:{x:i,y:a}}),fO.schedule(bL(this,ON)),!0}}}}}return yL(this,qN,void 0),!1};let t=null,n=null;const r=eD(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const o=Tq(Mq(null==r?void 0:r.element),n.current);return o&&(t=o),null!=o?o:t}),o=eD(()=>{const t=r.value,{documentElement:o}=yq(t);if(!t||t===o){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=xO(r,{excludeElement:!1});return n=e,e}}if(t){const e=xO(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},tD);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new jN(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&BO(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function FN(e){return e>0?RO.Forward:e<0?RO.Reverse:RO.Idle}PN=lL(DN),TN=new WeakMap,qN=new WeakMap,ON=new WeakMap,hL(PN,4,"autoScrolling",kN,zN,TN),pL(PN,zN);var $N=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),BN=class extends bP{constructor(e,t){super(e,t);const n=e.registry.plugins.get(zN);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=ck(()=>{var t,r,o;if(this.disabled)return;const{position:i,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(r=this.options)?void 0:r.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(o=this.options)?void 0:o.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>$N.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};BN.configure=mP(BN);var HN,VN=BN,WN={capture:!0,passive:!0},UN=class extends yP{constructor(e){super(e),vL(this,HN),this.handleScroll=()=>{null==bL(this,HN)&&yL(this,HN,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),yL(this,HN,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=ck(()=>{var e,n,r;if(t.status.dragging){const o=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return o.addEventListener("scroll",this.handleScroll,WN),()=>{o.removeEventListener("scroll",this.handleScroll,WN)}}})}};HN=new WeakMap;function GN(){var e;null==(e=document.getSelection())||e.removeAllRanges()}function KN(e,t){const n=XN(e.key);return t.some(e=>XN(e)===n)}var YN=new Set(["alt","altgraph","backspace","capslock","control","delete","end","enter","escape","home","insert","meta","pagedown","pageup","pause","printscreen","shift","space","tab","arrowdown","arrowleft","arrowright","arrowup","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12"]);function XN(e){if(" "===e||"Spacebar"===e)return"space";if(/^Key[A-Z]$/.test(e))return e.slice(3).toLowerCase();if(/^Digit[0-9]$/.test(e))return e.slice(5);if(1===e.length)return e.toLowerCase();const t=e.toLowerCase();return YN.has(t)?t:e}var JN,ZN=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),QN=class extends DT{constructor(e,t){super(e),this.manager=e,this.options=t,vL(this,JN,[]),this.listeners=new Oq,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!$O(e.target))return;if(t.disabled)return;const{keyboardCodes:r=ZN.keyboardCodes,preventActivation:o=ZN.preventActivation}=null!=n?n:{};KN(e,r.start)&&this.manager.dragOperation.status.idle&&((null==o?void 0:o(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=ck(()=>{var n;const r=null!=(n=e.handle)?n:e.element,o=n=>{BO(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),kO(r);const{center:o}=new _O(r);if(this.manager.actions.start({event:e,coordinates:{x:o.x,y:o.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const i=yq(r),a=[this.listeners.bind(i,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];bL(this,JN).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=ZN.keyboardCodes}=null!=n?n:{};if(KN(e,[...r.end,...r.cancel])){e.preventDefault();const t=KN(e,r.cancel);return void this.handleEnd(e,t)}KN(e,r.up)?this.handleMove("up",e):KN(e,r.down)&&this.handleMove("down",e),KN(e,r.left)?this.handleMove("left",e):KN(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:o}=this.manager.dragOperation,i=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:ZN.offset;if("number"==typeof s&&(s={x:s,y:s}),o){switch(e){case"up":a={x:0,y:-s.y*i};break;case"down":a={x:0,y:s.y*i};break;case"left":a={x:-s.x*i,y:0};break;case"right":a={x:s.x*i,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(VN);!1===(null==e?void 0:e.disabled)&&(e.disable(),bL(this,JN).push(()=>{e.enable()}))}cleanup(){bL(this,JN).forEach(e=>e()),yL(this,JN,[])}destroy(){this.cleanup(),this.listeners.clear()}};JN=new WeakMap,QN.configure=mP(QN),QN.defaults=ZN;var ej,tj,nj,rj=QN;ej=new WeakMap;tj=new WeakMap,nj=new WeakMap;var oj=class{};oj.Delay=class extends TT{constructor(){super(...arguments),vL(this,tj),vL(this,nj)}onEvent(e){switch(e.type){case"pointerdown":yL(this,nj,wq(e)),yL(this,tj,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!bL(this,nj))return;const{x:t,y:n}=wq(e);qD({x:t-bL(this,nj).x,y:n-bL(this,nj).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){bL(this,tj)&&(clearTimeout(bL(this,tj)),yL(this,nj,void 0),yL(this,tj,void 0))}},oj.Distance=class extends TT{constructor(){super(...arguments),vL(this,ej)}onEvent(e){switch(e.type){case"pointerdown":yL(this,ej,wq(e));break;case"pointermove":if(!bL(this,ej))return;const{x:t,y:n}=wq(e),r={x:t-bL(this,ej).x,y:n-bL(this,ej).y},{tolerance:o}=this.options;if(o&&qD(r,o))return void this.abort();qD(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){yL(this,ej,void 0)}};var ij,aj=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:o}=e;if("mouse"!==r||!$O(o)||t.handle!==o&&!(null==(n=t.handle)?void 0:n.contains(o)))return"touch"===r?[new oj.Delay({value:250,tolerance:5})]:function(e){if(!$O(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(o)&&!e.defaultPrevented?[new oj.Delay({value:200,tolerance:0})]:[new oj.Delay({value:200,tolerance:10}),new oj.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;if(r===t.element)return!1;if(r===t.handle)return!1;if(!$O(r))return!1;if(null==(n=t.handle)?void 0:n.contains(r))return!1;const o=r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ');return o!==t.element&&Boolean(o)}}),sj=class extends DT{constructor(e,t){super(e),this.manager=e,this.options=t,vL(this,ij,new Set),this.listeners=new Oq,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=aj.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=ck(()=>{var n;const r=new AbortController,{signal:o}=r,i=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=mq(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(pj(e.ownerDocument.defaultView),e.addEventListener("pointerdown",i,{signal:o}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!$O(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=aj.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:o}=e,i=bq(o)&&o.draggable&&"true"===o.getAttribute("draggable"),a=SO(t.element),{x:s,y:l}=wq(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,n);e.sensor=this;const c=new PT(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=Eq(),p=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:i?this.handleCancel:uj,options:{capture:!0}}]);bL(this,ij).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;!1===(null==(n=this.controller)?void 0:n.activated)&&(null==(r=this.controller)||r.onEvent(e));const{status:o}=this.manager.dragOperation;if(o.initializing||o.dragging){const n=wq(e),r=SO(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,o.dragging&&fO.schedule(this.handleMove)}}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized,r=yq(e.target),o=r.defaultView;if(!n&&o){const e=e=>{e.target===r.body&&e.detail>0&&(e.preventDefault(),e.stopImmediatePropagation())};o.addEventListener("click",e,!0),o.setTimeout(()=>{o.removeEventListener("click",e,!0)},0)}this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;const o=n.actions.start({coordinates:r,event:t,source:e});if(o.signal.aborted)return this.cleanup();t.preventDefault();const i=yq(t.target).body;try{i.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const a=$O(t.target)?[t.target,i]:i,s=this.listeners.bind(a,[{type:"touchmove",listener:uj,options:{passive:!1}},{type:"click",listener:uj},{type:"contextmenu",listener:uj},{type:"keydown",listener:this.handleKeyDown}]);bL(this,ij).add(s),n.renderer.rendering.then(()=>{!o.signal.aborted&&n.dragOperation.status.dragging&&fO.schedule(this.handleMove)})}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},bL(this,ij).forEach(e=>e()),bL(this,ij).clear()}destroy(){this.cleanup(),this.listeners.clear()}};ij=new WeakMap,sj.configure=mP(sj),sj.defaults=aj;var lj=sj;function uj(e){e.preventDefault()}function cj(){}var dj=new WeakSet;function pj(e){e&&!dj.has(e)&&(e.addEventListener("touchmove",cj,{capture:!1,passive:!1}),dj.add(e))}var fj,hj,mj,gj,bj,vj,yj,xj,Sj,wj,Cj,Ej,Rj,Aj,Ij,Mj,kj={modifiers:[],plugins:[DL,VN,class extends bP{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(XL),o=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(o){const e=this.destroy.bind(this);this.destroy=()=>{o(),e()}}}},AN,class extends bP{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(XL),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=ck(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return GN(),document.addEventListener("selectionchange",GN,{capture:!0}),()=>{document.removeEventListener("selectionchange",GN,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[lj,rj]},Dj=class extends rq{constructor(e={}){const t=nq(e.plugins,kj.plugins),n=nq(e.sensors,kj.sensors),r=nq(e.modifiers,kj.modifiers);super(iL(oL({},e),{plugins:[UN,zN,XL,...t],sensors:n,modifiers:r}))}},Pj=class extends(mj=uT,hj=[nD],fj=[nD],mj){constructor(e,t){var n=e,{element:r,effects:o=()=>[],handle:i}=n,a=sL(n,["element","effects","handle"]);super(oL({effects:()=>[...o(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(gP))?t:[...n.sensors]).map(e=>{const t=e instanceof DT?e:n.registry.register(e.plugin),r=e instanceof DT?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),vL(this,bj,fL(gj,8,this)),fL(gj,11,this),vL(this,vj,fL(gj,12,this)),fL(gj,15,this),this.element=r,this.handle=i}};gj=lL(mj),bj=new WeakMap,vj=new WeakMap,hL(gj,4,"handle",hj,Pj,bj),hL(gj,4,"element",fj,Pj,vj),pL(gj,Pj);var Tj=class extends(Sj=cT,xj=[nD],yj=[nD],Sj){constructor(e,t){var n=e,{element:r,effects:o=()=>[]}=n,i=sL(n,["element","effects"]);const{collisionDetector:a=WO}=i,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new _O(n),o=VM(()=>this.shape);return r&&(null==o?void 0:o.equals(r))?o:(this.shape=r,r)},l=ek(!1);super(iL(oL({},i),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new aO(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),vL(this,Ij),vL(this,Cj,fL(wj,8,this)),fL(wj,11,this),vL(this,Mj,fL(wj,12,this)),fL(wj,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){yL(this,Ij,e,Aj)}get element(){var e;return null!=(e=this.proxy)?e:bL(this,Ij,Rj)}};function qj(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}wj=lL(Sj),Cj=new WeakMap,Ij=new WeakSet,Mj=new WeakMap,Ej=hL(wj,20,"#element",xj,Ij,Cj),Rj=Ej.get,Aj=Ej.set,hL(wj,4,"proxy",yj,Tj,Mj),pL(wj,Tj);var Oj="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?j:q;function Lj(){const e=k(0)[1];return L(()=>{e(e=>e+1)},[e])}function Nj(e,t=[],n=!1){const r=D(e);return r.current=e,function(e,t=!1){const n=D(e.peek()),r=D(!1),o=Lj();return Oj(()=>ck(()=>{const i=n.current,a=e.value;if(i!==a){if(n.current=a,!r.current)return;t?U(o):o()}}),[e,t,o]),{get value(){return r.current=!0,e.peek()}}}(M(()=>eD(()=>r.current()),t),n)}function jj(e){const t=D(e);return Oj(()=>{t.current=e},[e]),t}function _j(e,t){const n=Lj(),r=jj(t),o=M(()=>{const t=new Map;return{tracked:t,propertyCount:ek(0),active:!1,proxy:e?new Proxy(e,{get(e,n){const r=e[n];return t.has(n)||t.set(n,r),r}}):e}},[e]);return Oj(()=>{o.propertyCount.value=o.tracked.size}),Oj(()=>{if(!e)return;const{tracked:t,propertyCount:i}=o;o.active=!0;const a=ck(()=>{i.value;let a=!1,s=!1;for(const[n,o]of t){const i=e[n];Object.is(o,i)||(a=!0,t.set(n,i),s=!0===VM(()=>{var e;return null==(e=r.current)?void 0:e.call(r,n,o,i)})||s)}a&&(s?queueMicrotask(()=>{o.active&&U(n)}):n())});return()=>{o.active=!1,a()}},[e,o,n,r]),o.proxy}function zj(e,t){e()}function Fj(e,t,n=q,r=Object.is){const o=D(e);n(()=>{const n=o.current;r(e,n)||(o.current=e,t(e,n))},[t,e])}function $j(e,t){const n=D(qj(e));Oj(()=>{const r=qj(e);r!==n.current&&(n.current=r,t(r))})}var Bj=Object.defineProperty,Hj=Object.defineProperties,Vj=Object.getOwnPropertyDescriptors,Wj=Object.getOwnPropertySymbols,Uj=Object.prototype.hasOwnProperty,Gj=Object.prototype.propertyIsEnumerable,Kj=(e,t,n)=>t in e?Bj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yj=new Dj,Xj=P(Yj),Jj=z(F(({children:e},t)=>{const[n,r]=k(0),o=D(null),i=D(null),a=M(()=>({renderer:{get rendering(){var e;return null!=(e=o.current)?e:Promise.resolve()}},trackRendering(e){o.current||(o.current=new Promise(e=>{i.current=e})),$(()=>{e(),r(e=>e+1)})}}),[]);return Oj(()=>{var e;null==(e=i.current)||e.call(i),o.current=null},[e,n]),B(t,()=>a),null})),Zj=[void 0,tD];function Qj(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:o,onDragStart:i,onDragMove:a,onDragOver:s,onDragEnd:l}=t,u=((e,t)=>{var n={};for(var r in e)Uj.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Wj)for(var r of Wj(e))t.indexOf(r)<0&&Gj.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const c=D(null),{plugins:d,modifiers:p,sensors:f}=u,h=nq(d,kj.plugins),m=nq(f,kj.sensors),g=nq(p,kj.modifiers),b=jj(o),v=jj(i),y=jj(s),x=jj(a),S=jj(l),w=jj(r),C=function(e){const t=D(null);t.current||(t.current=e());return _(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=u.manager)?e:new Dj(u)});return q(()=>{if(!c.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=c.current,{monitor:n}=C;C.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=b.current;n&&t(()=>n(e,C))}),n.addEventListener("dragstart",e=>{var t;return null==(t=v.current)?void 0:t.call(v,e,C)}),n.addEventListener("dragover",e=>{const n=y.current;n&&t(()=>n(e,C))}),n.addEventListener("dragmove",e=>{const n=x.current;n&&t(()=>n(e,C))}),n.addEventListener("dragend",e=>{const n=S.current;n&&t(()=>n(e,C))}),n.addEventListener("collision",e=>{var t;return null==(t=w.current)?void 0:t.call(w,e,C)})];return()=>r.forEach(e=>e())},[C]),Fj(h,()=>C&&(C.plugins=h),...Zj),Fj(m,()=>C&&(C.sensors=m),...Zj),Fj(g,()=>C&&(C.modifiers=g),...Zj),Yt.jsxs(Xj.Provider,{value:C,children:[Yt.jsx(Jj,{ref:c,children:n}),n]})}function e_(){return N(Xj)}function t_(e){var t;const n=null!=(t=e_())?t:void 0,[r]=k(()=>e(n));return r.manager!==n&&(r.manager=n),Oj(r.register,[n,r]),r}function n_({children:e,className:t,dropAnimation:n,style:r,tag:o,disabled:i}){var a;const s=D(null),l=e_(),u=null!=(a=Nj(()=>null==l?void 0:l.dragOperation.source,[l]).value)?a:null,c="function"==typeof i?i(u):i;q(()=>{if(!s.current||!l||c)return;const e=l.plugins.find(e=>e instanceof AN);return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0},[l,c]),q(()=>{if(!l)return;const e=l.plugins.find(e=>e instanceof AN);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[l,n]);const d=M(()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?r_:e[t]});return new Proxy(l,{get:(t,n)=>"registry"===n?e:t[n]})},[l]);return Yt.jsx(Xj.Provider,{value:d,children:C(o||"div",{ref:s,className:t,style:r,"data-dnd-overlay":!0},function(){if(!u||c)return null;if("function"==typeof e)return Yt.jsx(o_,{source:u,children:e});return e}())})}function r_(){return()=>{}}function o_({children:e,source:t}){return e(_j(t))}var i_,a_,s_,l_,u_,c_=Object.create,d_=Object.defineProperty,p_=Object.getOwnPropertyDescriptor,f_=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),h_=e=>{throw TypeError(e)},m_=["class","method","getter","setter","accessor","field","value","get","set"],g_=e=>void 0!==e&&"function"!=typeof e?h_("Function expected"):e,b_=(e,t,n,r,o)=>({kind:m_[e],name:t,metadata:r,addInitializer:e=>n._?h_("Already initialized"):o.push(g_(e||null))}),v_=(e,t,n,r,o,i)=>{for(var a,s,l,u,c=7&t,d=m_[c+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,p_(o,n)),h=r.length-1;h>=0;h--)(l=b_(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,g_(a)&&(f[d]=a);return f&&d_(o,n,f),o},y_=(e,t,n)=>t.has(e)||h_("Cannot "+n),x_=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},S_=class extends(s_=sD,a_=[rD],i_=[rD],s_){constructor(e){var t,n,r;super(x_.from(e),(e,t)=>x_.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(u_,5,this),t=this,r=0,(n=l_).has(t)?h_("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return x_.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=x_.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(y_(a=this,s=l_,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);$M(()=>{((e,t,n)=>{y_(e,t,"write to private field"),t.set(e,n)})(this,l_,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(x_.from(e)),this.velocity={x:0,y:0}}};u_=(e=>{var t;return[,,,c_(null!=(t=null==e?void 0:e[f_("metadata")])?t:null)]})(s_),l_=new WeakMap,v_(u_,2,"delta",a_,S_),v_(u_,2,"direction",i_,S_),((e,t)=>{((e,t,n)=>{t in e?d_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,f_("metadata"),e[3])})(u_,S_);var w_=(e=>(e.Horizontal="x",e.Vertical="y",e))(w_||{});Object.values(w_);var C_=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/x_.distance(t.shape.center,n),type:AT.PointerIntersection,priority:RT.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=x_.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:AT.ShapeIntersection,priority:RT.Normal}}return null})(e)};function E_(e){const{collisionDetector:t,data:n,disabled:r,element:o,id:i,accept:a,type:s}=e,l=t_(t=>new Tj(((e,t)=>Hj(e,Vj(t)))(((e,t)=>{for(var n in t||(t={}))Uj.call(t,n)&&Kj(e,n,t[n]);if(Wj)for(var n of Wj(t))Gj.call(t,n)&&Kj(e,n,t[n]);return e})({},e),{register:!1,element:qj(o)}),t)),u=_j(l);return Fj(i,()=>l.id=i),$j(o,e=>l.element=e),Fj(a,()=>l.accept=a,void 0,tD),Fj(t,()=>l.collisionDetector=null!=t?t:C_),Fj(n,()=>n&&(l.data=n)),Fj(r,()=>l.disabled=!0===r),Fj(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:L(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}function R_(e){const t=e_();q(()=>{if(!t)return;const n=Object.entries(e).reduce((e,[n,r])=>{if(r){const o=n.replace(/^on/,"").toLowerCase(),i=t.monitor.addEventListener(o,r);e.push(i)}return e},[]);return()=>n.forEach(e=>null==e?void 0:e())},[t,e])}const A_=e=>Array.from({length:e},(e,t)=>t),I_=({id:e,sectionIndex:t,itemIndex:n})=>Yt.jsx("span",{children:`${e}-${t}-${n}`}),M_=z(()=>{const e=Qg(DM)??I_,{startSectionIndex:t,startIndex:n,id:r}=Qg(OM)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:Yt.jsx(n_,{dropAnimation:null,children:Yt.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px",background:"white",boxShadow:"0px 4px 10px 0px rgba(0, 0, 0, 0.15)",borderRadius:"4px",border:"1px solid rgba(0, 0, 0, 0.15)",width:"208px",maxHeight:"32px",fontSize:"12px",lineHeight:"16px"},children:Yt.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),k_=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=Qg(OM),o=r?.toSectionIndex===e&&r.toIndex===t;return Yt.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:o&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},D_=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,P_=z(({sectionIndex:e})=>{const t=Qg(CM)[e],n=Qg(EM),r=Qg(RM),o=null!==Qg(OM),i=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=E_({id:a,type:"section",accept:"item",collisionPriority:RT.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:Yt.jsxs(Sd,{ref:s,sx:{margin:"4px",outline:D_(l,o),borderRadius:"4px",boxSizing:"border-box"},children:[Yt.jsx(Sd,{sx:{position:"relative",top:"4px"},children:Yt.jsx(k_,{sectionIndex:e,itemIndex:0,isDragging:!1})}),Yt.jsxs(Sd,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[Yt.jsx(jc,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontWeight:"600",fontSize:"14px",lineHeight:"16px",color:"rgba(64, 64, 64, 1)"},children:i.title}),Yt.jsx(jc,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:i.message})]})]})}),T_=z(({id:e,sectionIndex:t})=>{const n=Qg(kM);return void 0===n?null:C(n,{id:e,sectionIndex:t})});var q_=Object.defineProperty,O_=Object.defineProperties,L_=Object.getOwnPropertyDescriptors,N_=Object.getOwnPropertySymbols,j_=Object.prototype.hasOwnProperty,__=Object.prototype.propertyIsEnumerable,z_=(e,t,n)=>t in e?q_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F_=(e,t)=>{for(var n in t||(t={}))j_.call(t,n)&&z_(e,n,t[n]);if(N_)for(var n of N_(t))__.call(t,n)&&z_(e,n,t[n]);return e},$_=(e,t)=>O_(e,L_(t)),B_=class extends ZT{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return $_(F_({},e),{[t]:n})}};B_.configure=mP(B_);var H_=B_,V_=H_.configure({axis:"x",value:0});H_.configure({axis:"y",value:0});var W_=class extends ZT{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,o="number"==typeof n?n:n.y;return $_(F_({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/o)*o})}};W_.configure=mP(W_);var U_=Object.create,G_=Object.defineProperty,K_=Object.defineProperties,Y_=Object.getOwnPropertyDescriptor,X_=Object.getOwnPropertyDescriptors,J_=Object.getOwnPropertySymbols,Z_=Object.prototype.hasOwnProperty,Q_=Object.prototype.propertyIsEnumerable,ez=e=>{throw TypeError(e)},tz=(e,t,n)=>t in e?G_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nz=(e,t)=>{for(var n in t||(t={}))Z_.call(t,n)&&tz(e,n,t[n]);if(J_)for(var n of J_(t))Q_.call(t,n)&&tz(e,n,t[n]);return e},rz=(e,t)=>K_(e,X_(t)),oz=["class","method","getter","setter","accessor","field","value","get","set"],iz=e=>void 0!==e&&"function"!=typeof e?ez("Function expected"):e,az=(e,t,n,r,o)=>({kind:oz[e],name:t,metadata:r,addInitializer:e=>n._?ez("Already initialized"):o.push(iz(e||null))}),sz=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},lz=(e,t,n,r,o,i)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=oz[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(o=o.prototype,Y_({get[n](){return cz(this,i)},set[n](e){return pz(this,i,e)}},n)),b=r.length-1;b>=0;b--)(u=az(d,n,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>n in e},c.get=e=>e[n],c.set=(e,t)=>e[n]=t,s=(0,r[b])({get:g.get,set:g.set},u),l._=1,void 0===s?iz(s)&&(g[f]=s):"object"!=typeof s||null===s?ez("Object expected"):(iz(a=s.get)&&(g.get=a),iz(a=s.set)&&(g.set=a),iz(a=s.init)&&h.unshift(a));return g&&G_(o,n,g),o},uz=(e,t,n)=>t.has(e)||ez("Cannot "+n),cz=(e,t,n)=>(uz(e,t,"read from private field"),t.get(e)),dz=(e,t,n)=>t.has(e)?ez("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pz=(e,t,n,r)=>(uz(e,t,"write to private field"),t.set(e,n),n);function fz(e){return e instanceof Yz||e instanceof Kz}var hz=class extends bP{constructor(e){super(e);const t=ck(()=>{const{dragOperation:t}=e;if(BO(t.activatorEvent)&&fz(t.source)&&t.status.initialized){const t=e.registry.plugins.get(zN);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!BO(e.nativeEvent))return;if(!fz(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:o,registry:i}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:u}=n,{center:c}=n.shape.current,d=[],p=[];$M(()=>{for(const e of i.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&fz(e)||!e.element)continue;let n=e.shape;const r=new _O(e.element,{getBoundingClientRect:e=>Sq(e,void 0,.2)});r.height&&r.width&&(("down"==s&&c.y+10<r.center.y||"up"==s&&c.y-10>r.center.y||"left"==s&&c.x-10>r.center.x||"right"==s&&c.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),o.disable();const f=o.computeCollisions(d,UO);$M(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:b}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:i}=n;if(!e||!fz(e)||!i)return;const{index:a,group:s,target:l}=e.sortable,u=g!==a||b!==s,c=u?l:null==t?void 0:t.element;if(!c)return;kO(c);const d=new _O(c);if(!d)return;const p=DD.delta(d,DD.from(i.current.boundingRectangle),e.alignment);r.move({by:p}),u?r.setDropTarget(e.id).then(()=>o.enable()):o.enable()})})});this.destroy=()=>{n(),t()}}};var mz=Object.defineProperty,gz=Object.defineProperties,bz=Object.getOwnPropertyDescriptors,vz=Object.getOwnPropertySymbols,yz=Object.prototype.hasOwnProperty,xz=Object.prototype.propertyIsEnumerable,Sz=(e,t,n)=>t in e?mz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wz=(e,t)=>{for(var n in t||(t={}))yz.call(t,n)&&Sz(e,n,t[n]);if(vz)for(var n of vz(t))xz.call(t,n)&&Sz(e,n,t[n]);return e},Cz=(e,t)=>gz(e,bz(t));function Ez(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function Rz(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function Az(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function Iz(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(Az(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const u=Object.entries(e);let c,d,p=-1,f=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(c=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&Az(i)){const r=null==i.initialGroup?void 0:Rz(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:Rz(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return Cz(wz({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return Cz(wz({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=Rz(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==c||null==d||c===d&&p===f){if(null!=c&&c===d&&p===f&&Az(i)){const t=null==i.group?void 0:Rz(e,i.group),r=null!=i.group&&t!==c,o=i.index!==p;if(r||o){const r=null==i.group?c:t;if(null!=r){if(c===r)return Cz(wz({},e),{[c]:n(e[c],p,i.index)});const t=e[c][p];return Cz(wz({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(c===d)return Cz(wz({},e),{[c]:n(e[c],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[c][p];return Cz(wz({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,Ez)}function Mz(e){const t=new Map;for(const[,n]of e)for(const e of n)t.set(e.id,e.index);return t}function kz(e,t,n){var r;for(const[o,i]of t)for(const t of i){const i=e.get(t.id);if(t.index!==i||t.group!==o||!(null==(r=n.get(o))?void 0:r.has(t)))return!0}return!1}var Dz="__default__";function Pz(e,t,n,r){const o=r<t?"afterend":"beforebegin";n.insertAdjacentElement(o,e)}function Tz(e,t){return e.index-t.index}function qz(e,t){return e.initialIndex-t.initialIndex}function Oz(e,t=Tz){return Array.from(e).sort(t)}var Lz=[hz,class extends bP{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof Yz){const{sortable:e}=n,{group:r}=e;let o=t.get(r);o||(o=new Set,t.set(r,o)),o.add(e)}return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:o,target:i}=r;if(!fz(o)||!fz(i))return;if(o.sortable===i.sortable)return;const a=t(),s=Mz(a),l=o.sortable.group===i.sortable.group,u=a.get(o.sortable.group),c=l?u:a.get(i.sortable.group);u&&c&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,d;const p=t();if(kz(s,a,p))return;const f=o.sortable.element,h=i.sortable.element;if(!h||!f)return;if(!l&&i.id===o.sortable.group)return;const m=Oz(u),g=l?m:Oz(c),b=null!=(r=o.sortable.group)?r:Dz,v=null!=(d=i.sortable.group)?d:Dz,y={[b]:m,[v]:g},x=Iz(y,e);if(y===x)return;const S=x[v].indexOf(o.sortable),w=x[v].indexOf(i.sortable);n.collisionObserver.disable(),Pz(f,S,h,w),$M(()=>{for(const[e,t]of x[b].entries())t.index=e;if(!l)for(const[e,t]of x[v].entries())t.group=i.sortable.group,t.index=e}),n.actions.setDropTarget(o.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:o}=r;fz(o)&&(o.sortable.initialIndex===o.sortable.index&&o.sortable.initialGroup===o.sortable.group||queueMicrotask(()=>{const e=t(),r=Mz(e),i=e.get(o.sortable.initialGroup);i&&n.renderer.rendering.then(()=>{const n=t();if(kz(r,e,n))return;const a=Oz(i),s=Oz(i,qz),l=o.sortable.element,u=a[s.indexOf(o.sortable)],c=null==u?void 0:u.element;u&&c&&l&&(Pz(l,u.index,c,o.index),$M(()=>{for(const t of e.values()){const e=Array.from(t).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],Nz={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1};function jz(e){var t,n;return"boolean"==typeof e?{draggable:e,droppable:e}:{draggable:null!=(t=null==e?void 0:e.draggable)&&t,droppable:null!=(n=null==e?void 0:e.droppable)&&n}}var _z,zz,Fz,$z,Bz,Hz,Vz,Wz,Uz=new class{constructor(){Jk(this,aD,new WeakMap)}get(e,t){var n;return e?null==(n=Xk(this,aD).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return Xk(this,aD).has(e)||Xk(this,aD).set(e,new Map),null==(r=Xk(this,aD).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=Xk(this,aD).get(e))?void 0:t.clear():void 0}};zz=[nD],_z=[nD];var Gz=class{constructor(e,t){dz(this,$z,sz(Fz,8,this)),sz(Fz,11,this),dz(this,Bz),dz(this,Hz),dz(this,Vz,sz(Fz,12,this)),sz(Fz,15,this),dz(this,Wz),this.register=()=>($M(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{$M(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{$M(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],disabled:o,group:i,index:a,sensors:s,type:l,transition:u=Nz,plugins:c}=n,d=((e,t)=>{var n={};for(var r in e)Z_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&J_)for(var r of J_(e))t.indexOf(r)<0&&Q_.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","disabled","group","index","sensors","type","transition","plugins"]);const p=nq(c,Lz),f=jz(o);this.droppable=new Yz(rz(nz({},d),{disabled:f.droppable}),t,this),this.draggable=new Kz(rz(nz({},d),{disabled:f.draggable,plugins:p,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializationPending)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&Uz.clear(this.manager),(null==r?void 0:r.dragging)&&Uz.set(this.manager,this.id,VM(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=cz(this,Hz),o=cz(this,Bz);e===r&&t===o||(pz(this,Hz,e),pz(this,Bz,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(AN))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:l,sensors:s}),t,this),pz(this,Wz,d.element),this.manager=t,this.index=a,pz(this,Hz,a),this.group=i,pz(this,Bz,i),this.type=l,this.transition=u}get initialIndex(){var e,t;return null!=(t=null==(e=Uz.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=Uz.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){VM(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;for(const e of r.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const o=this.refreshShape();if(!o)return;const i=n.boundingRectangle.left-o.boundingRectangle.left,a=n.boundingRectangle.top-o.boundingRectangle.top,{translate:s}=bO(r),l=qO(r,s,!1),u=qO(r,s);if(i||a){const n=kq(mq(r))?rz(nz({},t),{duration:0}):t;TO({element:r,keyframes:{translate:[`${l.x+i}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){$M(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){$M(()=>{const t=cz(this,Wz),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),pz(this,Wz,e)})}get element(){var e,t;const n=cz(this,Wz);if(n)return null!=(t=null!=(e=qq.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){const{disabled:e}=this.draggable,{disabled:t}=this.droppable;return e===t?e:{draggable:e,droppable:t}}set plugins(e){this.draggable.plugins=nq(e,Lz)}set disabled(e){const t=jz(e);$M(()=>{this.droppable.disabled=t.droppable,this.draggable.disabled=t.draggable})}set data(e){$M(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){this.droppable.id=e,this.draggable.id=e}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:WO}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){$M(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};Fz=[,,,U_(null)],$z=new WeakMap,Bz=new WeakMap,Hz=new WeakMap,Vz=new WeakMap,Wz=new WeakMap,lz(Fz,4,"index",zz,Gz,$z),lz(Fz,4,"group",_z,Gz,Vz),((e,t)=>{return tz(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(Fz,Gz);var Kz=class extends Pj{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},Yz=class extends Tj{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},Xz=Object.defineProperty,Jz=Object.defineProperties,Zz=Object.getOwnPropertyDescriptors,Qz=Object.getOwnPropertySymbols,eF=Object.prototype.hasOwnProperty,tF=Object.prototype.propertyIsEnumerable,nF=(e,t,n)=>t in e?Xz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function rF(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:o,data:i,element:a,handle:s,index:l,group:u,disabled:c,modifiers:d,sensors:p,target:f,type:h,plugins:m}=e,g=function(e){return null===e?null:nz(nz({},Nz),e)}(e.transition),b=t_(t=>new Gz(((e,t)=>Jz(e,Zz(t)))(((e,t)=>{for(var n in t||(t={}))eF.call(t,n)&&nF(e,n,t[n]);if(Qz)for(var n of Qz(t))tF.call(t,n)&&nF(e,n,t[n]);return e})({},e),{transition:g,register:!1,handle:qj(s),element:qj(a),target:qj(f)}),t)),v=_j(b,oF);return Fj(o,()=>b.id=o),Oj(()=>{$M(()=>{b.group=u,b.index=l})},[b,u,l]),Fj(h,()=>b.type=h),Fj(t,()=>b.accept=t,void 0,tD),Fj(i,()=>i&&(b.data=i)),Fj(l,()=>{var e;(null==(e=b.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&b.refreshShape()},zj),$j(s,e=>b.handle=e),$j(a,e=>b.element=e),$j(f,e=>b.target=e),Fj(c,()=>b.disabled=null!=c&&c,void 0,tD),Fj(p,()=>b.sensors=p,void 0,tD),Fj(n,()=>b.collisionDetector=n),Fj(r,()=>b.collisionPriority=r),Fj(m,()=>b.plugins=m,void 0,tD),Fj(g,()=>b.transition=g,void 0,tD),Fj(d,()=>b.modifiers=d,void 0,tD),Fj(e.alignment,()=>b.alignment=e.alignment),{sortable:v,get isDragging(){return v.isDragging},get isDropping(){return v.isDropping},get isDragSource(){return v.isDragSource},get isDropTarget(){return v.isDropTarget},handleRef:L(e=>{b.handle=null!=e?e:void 0},[b]),ref:L(e=>{var t,n;(e||!(null==(t=b.element)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.element=null!=e?e:void 0)},[b]),sourceRef:L(e=>{var t,n;(e||!(null==(t=b.source)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.source=null!=e?e:void 0)},[b]),targetRef:L(e=>{var t,n;(e||!(null==(t=b.target)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.target=null!=e?e:void 0)},[b])}}function oF(e,t,n){return!("isDragSource"!==e||n||!t)}const iF=({id:e,itemIndex:t,sectionIndex:n})=>Yt.jsx("div",{children:`${n}:${t} - ${e}`}),aF=z(({id:e,itemIndex:t,sectionIndex:n})=>{const r=Qg(PM),o=Qg(MM),i=Qg(CM).at(n)??0,a=Qg(EM)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:u}=rF({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[V_],plugins:[hz],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),c=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=o??iF;return Yt.jsx(of,{className:"section-item-container","data-testid":"section-item",onClick:c,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:Yt.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[Yt.jsx(k_,{isDragging:l,itemIndex:t,sectionIndex:n}),Yt.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:u}),t===i-1&&Yt.jsx(k_,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})}),sF=z(({sectionIndex:e})=>{const t=Qg(EM),n=Qg(CM).at(e)??0,r=t({sectionIndex:e});return Yt.jsxs(Sd,{className:"exploration-list",style:{overflow:"auto"},children:[Yt.jsx(mp,{}),Yt.jsx(T_,{id:r,sectionIndex:e}),Yt.jsx(mp,{}),Yt.jsx(P_,{sectionIndex:e}),Yt.jsx(Up,{sx:{padding:"2px 8px"},children:A_(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return Yt.jsx(aF,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),lF=[lj.configure({activationConstraints:[new oj.Distance({value:5})]}),rj],uF=z(()=>{const e=Qg(wM),t=Qg(EM),n=eb(LM("start")),r=eb(LM("over")),o=eb(LM("end"));return Yt.jsxs(Qj,{sensors:lF,onDragEnd:e=>{o(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[Yt.jsx(Sd,{style:{display:"flex",flexDirection:"column"},children:A_(e).map(e=>Yt.jsx(sF,{sectionIndex:e},t({sectionIndex:e})))}),Yt.jsx(M_,{})]})}),cF=z(e=>Yt.jsx(iM,{atoms:NM,atomFamilies:jM,children:Yt.jsx(_M,{props:e,children:Yt.jsx(uF,{})})})),dF=(e,t)=>{if(!e)return;const n=e.qHyperCube.qDimensionInfo.filter(e=>void 0!==e.cId).filter($A).map(({cId:e,qFallbackTitle:n})=>({id:e,title:n??"",alternative:t,type:"dimension"})),r=e.qHyperCube.qMeasureInfo.filter(e=>void 0!==e.cId).filter($A).map(({cId:e,qFallbackTitle:n})=>({id:e,title:n??"",alternative:t,type:"measure"}));return[...n,...r]},pF=(e,t)=>{const n=[],r={};return e.forEach(e=>{r[e.id]=e}),Object.keys(t).forEach(e=>{const o=t[e],i=r[e];i&&(n[o]=i)}),n},fF=(e,t,n)=>{if(!n||((e,t)=>{const n=e.map(e=>e.id).sort(),r=Object.keys(t).sort();return n.join(",")!==r.join(",")})(e,n)){const t=(e=>{const t={};return e.forEach((e,n)=>{t[e.id]=n}),t})(e);return pF(e,t)}const r=t.map(e=>e.id),o=Object.keys(n).sort((e,t)=>n[e]-n[t]).filter(e=>r.includes(e)),i={...n};for(let e=0;e<r.length;e++){const t=o[e],a=r[e];t!==a&&(i[a]=n[t])}let a=0;const s=Object.entries(i).sort((e,t)=>e[1]-t[1]).map(([e])=>[e,a++]);return s.forEach(([e,t])=>{i[e]=t}),pF(e,i)},hF=$g(e=>{const t=e(YA);return dF(t,!0)}),mF=$g(e=>{const t=e(KA);return dF(t,!1)}),gF=$g(e=>{const t=e(XA),n=e(KA);if(!t||!n)return[];const r=e(mF),o=e(hF),i=n.qHyperCube.qColumnOrder??[],a=e(WA);if(void 0===o||void 0===r)return[];if(a){return[...[...r,...o]].sort((e,t)=>(a[e.id]??1/0)-(a[t.id]??1/0))}const s=t.qHyperCubeDef.qLayoutExclude?.allColumnOrder??{},l=((e,t)=>e.length===t?e:Array.from(Array(t).keys()))(i,r.length),u=((e,t)=>e.length>0?e.map(e=>t[e]):t)(l,r),c=[...u,...o];return fF(c,u,s)}),bF=$g(e=>{const t=e(gF),n=e(qA);return t.filter(n)}),vF=$g(e=>e(bF).length),yF=$g(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(bF);if(void 0===n)return`columns-section-${t}`;const o=r?.[n];return o?.id??`missing-item-${t}-${n}`}),xF=yM(e=>$g(t=>t(bF)[e]),(e,t)=>e===t),SF=$g(e=>e(gF).map(e=>e.id)),wF=$g(e=>e(bF).map(e=>e.id)),CF=$g(e=>{const t=e(gF),n={};return t.forEach(e=>{n[e.id]=e.type}),n}),EF=$g(null,(e,t,{event:n,id:r,toIndex:o})=>{const i=e(MA),a=e(LA),s=e(SF),l=e(wF);if(void 0===i||null===a||void 0===s||void 0===l)return;if(n.operation.canceled)return;const u=l[o];if(!u)return;const c=((e,t,n)=>{const r=n.findIndex(t=>t===e),o=n.findIndex(e=>e===t);if(-1===r||-1===o||r===o)return n;const i=[...n],[a]=i.splice(r,1);return i.splice(o,0,a),i})(r,u,s);t(WA,Object.fromEntries(c.map((e,t)=>[e,t]))),a.add(async()=>{i.updateColumnOrders(c)})}),RF="ChartExploration.Table.ColumnSectionEmpty.Title",AF="ChartExploration.Table.NoColumnsFound.Title",IF="#177fe6",MF=$g(e=>{const t=e(DA),n=e(TA).length>0,r=(e=>e?AF:RF)(n),o=(e=>e?"":"ChartExploration.Table.ColumnSectionEmpty.Message")(n);return()=>({title:t(r),message:""===o?"":t(o)})}),kF=({itemIndex:e})=>{const t=Qg(xF(e));if(!t)return null;const n=t.title;return Yt.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})},DF=$g(e=>{const t=e(wF),n=e(iI),r=t.filter(e=>n.has(e)).length;return 0===t.length?"disabled":0===r?"none":r===t.length?"all":"some"}),PF=$g(null,(e,t)=>{const n=e(wF),r=e(iI),o="all"!==e(DF)&&"disabled"!==e(DF),i=[],a=new Set(e(tI)),s=new Set(e(nI));if(o){const t=new Set(n.filter(e=>!r.has(e)));i.push(...Array.from(t).map(t=>({id:t,isAlternative:!0,type:e(CF)[t]}))),i.forEach(e=>a.add(e.id)),i.forEach(e=>s.delete(e.id))}else{const t=new Set(n.filter(e=>r.has(e)));i.push(...Array.from(t).map(t=>({id:t,isAlternative:!1,type:e(CF)[t]}))),i.forEach(e=>a.delete(e.id)),i.forEach(e=>s.add(e.id))}t(tI,a),t(nI,s),AA({items:i,handler:e(MA),model:e(IA),handlerQueue:e(LA),logToSentry:e(bb)})}),TF=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},qF=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,OF=e=>{const{currentTarget:t}=e,n=qF(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=r.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},LF=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===Xm.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},NF=(e,t)=>{const{key:n}=e;switch(n){case Xm.Tab:e.shiftKey||(Em(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),o=r?.getElementsByClassName("exploration-item-focus")[0];o&&TF(o)})(e,t));break;case Xm.Down:(e=>{e.preventDefault();const t=e.currentTarget.closest(".exploration-list"),n=t?.getElementsByClassName("exploration-item-focus")[0];n&&TF(n)})(e);break;case Xm.Enter:case Xm.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},jF=({children:e})=>Yt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),_F=({children:e})=>{const t=D(null),n=Qg(DF),[,r]=tb(PF),o=Qg(DA),i={ref:t,toggleAllCheckboxes:r,checkState:n};return Yt.jsxs(Sd,{ref:t,"aria-label":o("Common.Columns"),className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{NF(e,i)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${IF} inset`}},children:[Yt.jsx(Gd,{inputProps:{"aria-label":o("ChartExploration.Header.ToggleAll"),..."some"===n&&{"aria-checked":"mixed"}},disabled:"disabled"===n,checked:"all"===n,indeterminate:"some"===n,onChange:r,size:"small",style:{flexShrink:0,padding:9}}),Yt.jsx(jF,{children:e})]})},zF=()=>{const e=Qg(DA);return Yt.jsx(_F,{children:e("Common.Columns")})},FF=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),$F=F((e,t)=>Yt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:[Yt.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"}),Yt.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"})]})),BF=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),HF=Du("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),VF=Du(BF)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${IF} inset`}})),WF=e=>{const t=e.key===Xm.Down?(e=>{const{currentTarget:t,key:n}=e,r=qF(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(r)[0];return i||(i=LF(t,n),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):OF(e);t&&TF(t)},UF=(e,t)=>{const{key:n}=e;switch(n){case Xm.Tab:if(e.shiftKey)Em(e),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&TF(e))}const n=OF(e);n&&TF(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void TF(t);const r=OF(e);r&&TF(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return TF(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&TF(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&TF(n),!0}const o=LF(n,r);if(!o)return!1;TF(o)}return!0})(e,t);n?Em(e):e.stopPropagation()}break;case Xm.Enter:case Xm.Space:Em(e),((e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&TF(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void TF(e)}n===t.items.explorationItemFocusRef.current&&t.toggleItem()})(e,t);break;case Xm.Down:case Xm.Up:Em(e),WF(e)}},GF=({children:e})=>Yt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),KF={dimension:FF,measure:$F},YF=({id:e,dragHandleRef:t,title:n,type:r,itemIndex:o})=>{const[i,a]=tb(iI),s=Qg(DA),l=D(null),u=D(null),c=D(null);q(()=>{t&&l.current&&t(l.current)},[t]);const d=KF[r],p=!i.has(e),f={id:e,itemIndex:o,toggleItem:()=>{a({id:e,isAlternative:p,type:r})},items:{explorationItemRef:l,explorationItemFocusRef:u,draggableIconRef:c}};return Yt.jsxs(Sd,{ref:l,className:"exploration-item",onClick:t=>{t.stopPropagation(),-1!==e&&a({id:e,isAlternative:p,type:r})},onKeyDown:e=>{UF(e,f)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:n,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${IF} inset`}},children:[Yt.jsxs(Sd,{ref:u,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{UF(e,f)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${IF} inset`}},children:[Yt.jsx(Gd,{checked:i.has(e),"aria-label":s("ChartExploration.ListItem.Label",n),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0}}),Yt.jsx(Sd,{children:Yt.jsx(d,{height:12,style:{opacity:1,marginRight:"8px"}})}),Yt.jsx(GF,{children:n})]}),Yt.jsx(VF,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{UF(e,f)}})]})},XF=({id:e,itemIndex:t,dragHandleRef:n})=>{const r=Qg(xF(t));return r?Yt.jsx(YF,{id:e,dragHandleRef:n,title:r.title,type:r.type,itemIndex:t}):null},JF=()=>{const e=Qg(vF),t=Qg(MF),n=Qg(JA),r=Qg(yF),o=eb(EF);return!n&&Yt.jsx(cF,{numberOfSections:1,numberOfItemsInSection:[e],keyExtractor:r,emptyTexts:t,onDragEnd:o,dragOverlayRenderer:kF,headerRenderer:zF,itemRenderer:XF})},ZF=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),QF=()=>{const[e,t]=tb(TA),n=Qg(DA),r=w.useRef(null),o=Qg(vF),i=L(e=>{t(e.target.value)},[t]),a=0===e.length||0===o?n("Common.Search.NoResultsAvailable"):n("ChartExploration.Table.Search.ResultsFound",o.toString());return Yt.jsxs(Sd,{ref:r,style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[Yt.jsx(HF,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:a}),Yt.jsx(ih,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":n("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:n("Common.Search"),onChange:i,startAdornment:Yt.jsx(Op,{position:"start",children:Yt.jsx(ZF,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},e$=e=>{const t=hm();return Yt.jsx(Tu,{theme:t,children:Yt.jsx(Gg,{children:Yt.jsx(aI,{props:e,children:Yt.jsxs(Sd,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[Yt.jsx(QF,{}),Yt.jsx(JF,{})]})})})})},t$=e=>e.flags.isEnabled("VNA-655-STRAIGHT_TABLE_NEW_EXPLORATION")?{component:e$,classification:{tags:["exploration"],exclusive:!0}}:{component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}};var n$=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(n$||{}),r$=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(r$||{}),o$=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(o$||{}),i$=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(i$||{});const a$=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,s$=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case o$.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case n$.BEGINNING_OF_WORD:t="*^",n="*";break;case n$.ENDS_WITH:t="*";break;case n$.STARTS_WITH:n="*";break;case n$.MATCHES_EXACTLY:break;case n$.CONTAINS:default:t="*",n="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${n}"`:""})(e);break;case o$.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===r$.GENERAL,r=t?.modifier?.type===i$.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";n&&r?(i=`${t.conditionField?.aggregator}(${a$(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(i="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(i=`${t.conditionField?.aggregator}(${a$(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${a$(t.firstValue?.field)})`):(i=`${a$(e.field)}`,a=`${t.firstValue?.aggregator}(total ${a$(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let u="";if(o.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${a$(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${a$(t.secondValue?.field)})`,a=` and ${i}`),u=`${a}${o[1]}${e}`}return`"${l}${u}"`})(e);break;case o$.CLEAR_SELECTION:t=`[${e.field}]=`,r="",o="";break;case o$.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${o}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},l$=[];for(let e=0;e<256;++e)l$.push((e+256).toString(16).slice(1));const u$=new Uint8Array(16);function c$(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(u$);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(l$[e[t+0]]+l$[e[t+1]]+l$[e[t+2]]+l$[e[t+3]]+"-"+l$[e[t+4]]+l$[e[t+5]]+"-"+l$[e[t+6]]+l$[e[t+7]]+"-"+l$[e[t+8]]+l$[e[t+9]]+"-"+l$[e[t+10]]+l$[e[t+11]]+l$[e[t+12]]+l$[e[t+13]]+l$[e[t+14]]+l$[e[t+15]]).toLowerCase()}(t)}(e)}const d$=()=>crypto?.randomUUID?.()??c$(),p$=({qDimensions:e,qMeasures:t})=>[...e.map(e=>({id:e.qDef.cId,isDimension:!0,def:e})),...t.map(e=>({id:e.qDef.cId,isDimension:!1,def:e}))],f$=({previousColumns:e,nextColumns:t,qInterColumnSortOrder:n})=>{const r=new Map(e.map((e,t)=>[t,e.qDef.cId])),o=new Map(t.map((e,t)=>[e.qDef.cId,t]));return n.map(e=>{const t=r.get(e);return(void 0===t?void 0:o.get(t))??e})};class h$ extends u{#u;constructor(e,t){super(e),this.#u=t}#c(e){const t=this.hcProperties.qLayoutExclude?.allColumnOrder??{},n=Object.keys(t).length;this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:{...t,...Object.fromEntries(e.map((e,t)=>[e,n+t]))}}}#d(e){const t=this.hcProperties.qLayoutExclude?.allColumnOrder??{},n=Object.entries(t).filter(([t])=>!e.includes(t));this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:Object.fromEntries(n.map(([e],t)=>[e,t]))}}#p(e,t){const n=this.hcProperties.qLayoutExclude?.allColumnOrder??{},r={};for(const[o,i]of Object.entries(n))r[o===e?t:o]=i;this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:r}}async addDimension(e,t=!1){const n=await this.addDimensions([e],t);return 0===n.length?void 0:n[0]}async addDimensions(e,t=!1){const n=await super.addDimensions(e,t);return this.#c(n.map(e=>e.qDef.cId)),n}async removeDimension(e,t=!1){const n=await this.removeDimensions([e],t);return 0===n.length?void 0:n[0]}async removeDimensions(e,t=!1){const n=await super.removeDimensions(e,t);return this.#d(n.map(e=>e.qDef.cId)),n}async replaceDimension(e,t){const n=this.getDimensions()[e].qDef.cId,r=await super.replaceDimension(e,t),o=r.qDef.cId;return this.#p(n,o),r}async addMeasure(e,t=!1){const n=await this.addMeasures([e],t);return 0===n.length?void 0:n[0]}async addMeasures(e,t=!1){const n=await super.addMeasures(e,t);return this.#c(n.map(e=>e.qDef.cId)),n}async removeMeasure(e,t=!1){const n=await this.removeMeasures([e],t);return 0===n.length?void 0:n[0]}async removeMeasures(e,t=!1){const n=await super.removeMeasures(e,t);return this.#d(n.map(e=>e.qDef.cId)),n}async replaceMeasure(e,t){const n=this.getMeasures()[e].qDef.cId,r=await super.replaceMeasure(e,t),o=r.qDef.cId;return this.#p(n,o),r}async#f(e){const t=this.getMeasure(e);if(t){const n=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e);if(-1===n)return;await super.removeMeasure(n,!0),await super.addMeasure(t,!1,this.getMeasures().length)}}async#h(e){const t=this.getMeasure(e);if(t){const n=this.getMeasures().findIndex(t=>t.qDef.cId===e);if(-1===n)return;await super.removeMeasure(n,!1),await super.addMeasure(t,!0,this.getAlternativeMeasures().length)}}async#m(e){const t=this.getDimension(e);if(t){const n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n)return;await super.removeDimension(n,!0),await super.reinsertDimension(t,!1,this.getDimensions().length)}}async#g(e){const t=this.getDimension(e);if(t){const n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n)return;await super.removeDimension(n,!1),await super.addDimension(t,!0,this.getAlternativeDimensions().length)}}#b(){const e=this.hcProperties.qLayoutExclude?.allColumnOrder??{};return Object.entries(e).sort((e,t)=>e[1]-t[1]).map(([e])=>e)}async moveDimensionFromAlternative(e){await this.#m(e);const t=this.#b();this.updateColumnOrders(t)}async moveDimensionToAlternative(e){await this.#g(e);const t=this.#b();this.updateColumnOrders(t)}async moveMeasureFromAlternative(e){await this.#f(e);const t=this.#b();this.updateColumnOrders(t)}async moveMeasureToAlternative(e){await this.#h(e);const t=this.#b();this.updateColumnOrders(t)}async toggleAlternatives(e,t){for(const t of e)"dimension"===t.type?await(t.isAlternative?this.#m(t.id):this.#g(t.id)):await(t.isAlternative?this.#f(t.id):this.#h(t.id));this.updateColumnOrders(t)}updateColumnOrders(e){const t=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:n,nextAllColumnOrderById:r})=>{const o=p$({qDimensions:e,qMeasures:t}),i=[...e,...t],a=new Map(r.map((e,t)=>[e,t])),s=o.toSorted((e,t)=>{const n=a.get(e.id),r=a.get(t.id);return void 0===n||void 0===r?0:n-r}),l=s.filter(e=>e.isDimension).map(e=>e.def),u=s.filter(e=>!e.isDimension).map(e=>e.def),c=[...l,...u],d=new Map(c.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:l,qMeasures:u,qInterColumnSortOrder:f$({previousColumns:i,nextColumns:c,qInterColumnSortOrder:n}),qColumnOrder:s.map(e=>d.get(e.id)).filter(e=>void 0!==e)}})({qDimensions:this.hcProperties.qDimensions,qMeasures:this.hcProperties.qMeasures,qInterColumnSortOrder:this.hcProperties.qInterColumnSortOrder,nextAllColumnOrderById:e});this.hcProperties.qDimensions=t.qDimensions,this.hcProperties.qMeasures=t.qMeasures,this.hcProperties.qColumnOrder=t.qColumnOrder,this.hcProperties.qInterColumnSortOrder=t.qInterColumnSortOrder,this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:e.reduce((e,t,n)=>(e[t]=n,e),{})}}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:d$(),qTags:Array.isArray(t)?t:[],isNumeric:n};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=s$(o),i}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#v(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=s$(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#v(e);return n}getLabels(){return this.getMeasures().reduce((e,t)=>(!t.qLibraryId&&t.qDef.qLabel&&e.push(t.qDef.qLabel),e),[])}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}const m$=(e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;return e.splice(n,1),n};function g$(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function b$(e){return e>0?0:1}function v$(e){return e.translator.get("Visualizations.Descriptions.Column")}function y$(e){return{measures:{min:b$,max:1e3,description:()=>v$(e),add(e,t,n){const{qColumnOrder:r}=n.hcProperties;g$(r,n.getDimensions().length+n.getMeasures().length-1)},remove(e,t,n,r){const{qColumnOrder:o}=n.hcProperties,i=(n.hcProperties.qDimensions?n.hcProperties.qDimensions.length:0)+r;m$(o,i)}},dimensions:{min:b$,max:1e3,description:()=>v$(e),add(e,t,n){const{qColumnOrder:r}=n.hcProperties;return g$(r,n.getDimensions().length-1),e},remove(e,t,n,r){if(e?.isAlternative)return;const{qColumnOrder:o}=n.hcProperties;m$(o,r)}}}}const x$=e=>{const t=new h$({},e.translator),n=hb(e);return{properties(r){if(!(e=>"qHyperCubeDef"in e&&"sn-table"===(({visualization:e,qInfo:t})=>e??t?.qType)(e))(r))return r;const{qHyperCubeDef:o}=r,i=o.qLayoutExclude?.qHyperCubeDef,a=e.flags.isEnabled("qcb-35151-fix-duplicate-columns"),s=new Set,l=[];let u=0,c=0,d=0;[...o.qDimensions,...o.qMeasures,...i?.qDimensions??[],...i?.qMeasures??[]].forEach(e=>{u++;const t=e.qDef?.cId;if((e=>"string"==typeof e&&e.length>0)(t))if(s.has(t)){if(c++,a){const t=d$();e.qDef={...e.qDef,cId:t},l.push(t)}}else s.add(t),l.push(t);else if(d++,a){const t=d$();e.qDef={...e.qDef,cId:t},l.push(t)}});const p=c+d;if(0===p)return r;n.warn({msg:"migrate: column cId issues detected",payload:{issueCount:p,totalColumnCount:u,duplicateCount:c,missingCount:d}});const f=r.components?.find(e=>"theme"===e.key);return e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&f?.nullValues&&!f.dimensionNullValues&&(f.dimensionNullValues={...f.nullValues}),a?(t.setProperties(r),t.updateColumnOrders(l),n.warn({msg:"migrate: column cId cleanup completed",payload:{replacementCount:p}}),r):r}}};let S$=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.Bar="bar",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),w$=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const C$=e=>{switch(e?.type){case"url":return S$.Link;case"image":return S$.Image;case"indicator":return S$.Indicator;case"miniChart":return S$.MiniChart;case"bar":return S$.Bar;default:return S$.Text}},E$=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),R$=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>C$(e.qDef.representation)===S$.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},A$=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:E$({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>C$(e.qDef.representation)===S$.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>C$(e.qDef.representation)===S$.Link&&e.qDef.representation?.urlPosition===w$.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>C$(e.qDef.representation)===S$.Link&&e.qDef.representation?.urlPosition===w$.Attribute},...R$(n)}},I$=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[S$.Image],i=!r?.("qMiniChartDef")&&t[S$.MiniChart],a=!r?.("tableIndicators")&&t[S$.Indicator],s=!!t[S$.Bar],l=o&&t[S$.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&l)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),s&&n.push({value:"bar",translation:"SNTable.Bar.Representation"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>C$(e.qDef.representation)===S$.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}},M$=(e,t,n)=>({type:"string",component:"expression",expressionType:"measure",ref:"qAttributeExpressions",schemaIgnore:!0,translation:t,defaultValue:"",tid:`${e}ByExpression`,show:n,convertFunctions:{get:(t,n,r,o)=>o.qAttributeExpressions?.find(t=>t.id===e)?.qExpression??"",set:(t,n,r,o,i)=>{const a=i.qAttributeExpressions??[],s=a.findIndex(t=>t.id===e);s>=0?t?a[s].qExpression=t:a.splice(s,1):t&&a.push({id:e,qExpression:t,qAttribute:!0}),i.qAttributeExpressions=a}}}),k$=(e,t)=>e?.qDef?.representation?.[t],D$=e=>C$(e?.qDef?.representation)===S$.Bar,P$=[{value:"solid",translation:"SNTable.Bar.SingleColor"},{value:"expression",translation:"SNTable.Bar.ByExpression"}],T$=e=>{if(!e[S$.Bar])return{};const t=e=>D$(e)&&"manual"===k$(e,"barRangeMode");return{barColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barColorMode",translation:"SNTable.Bar.BarColor",defaultValue:"solid",show:D$,tid:"barColorMode",options:P$},barColor:{ref:"qDef.representation.barColor",type:"object",component:"color-picker",translation:"SNTable.Bar.BarColor",defaultValue:{index:6,color:null},show:e=>D$(e)&&"expression"!==k$(e,"barColorMode"),tid:"barColor",dualOutput:!0},barColorExpression:M$("barColor","SNTable.Bar.ColorExpression",e=>D$(e)&&"expression"===k$(e,"barColorMode")),barLabelColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barLabelColorMode",translation:"SNTable.Bar.LabelColor",defaultValue:"solid",show:D$,tid:"barLabelColorMode",options:P$},barLabelColor:{ref:"qDef.representation.barLabelColor",type:"object",component:"color-picker",translation:"SNTable.Bar.LabelColor",show:e=>D$(e)&&"expression"!==k$(e,"barLabelColorMode"),tid:"barLabelColor",dualOutput:!0},barLabelColorExpression:M$("barLabelColor","SNTable.Bar.LabelColorExpression",e=>D$(e)&&"expression"===k$(e,"barLabelColorMode")),barWidthExpression:M$("barWidth","SNTable.Bar.WidthExpression",D$),barOffsetExpression:M$("barOffset","SNTable.Bar.OffsetExpression",D$),barLabelExpression:M$("barLabel","SNTable.Bar.LabelExpression",D$),barRangeMode:{type:"string",component:"dropdown",ref:"qDef.representation.barRangeMode",translation:"SNTable.Bar.Range",defaultValue:"auto",show:D$,tid:"barRangeMode",options:[{value:"auto",translation:"Common.Auto"},{value:"manual",translation:"Common.Custom"}]},barRangeMin:{type:"number",ref:"qDef.representation.barRangeMin",translation:"SNTable.Bar.RangeMin",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:t,tid:"barRangeMin"},barRangeMax:{type:"number",ref:"qDef.representation.barRangeMax",translation:"SNTable.Bar.RangeMax",expressionType:"ValueExpression",expression:"optional",defaultValue:100,show:t,tid:"barRangeMax"},barEnd:{type:"string",component:"dropdown",ref:"qDef.representation.barEnd",translation:"SNTable.Bar.End",defaultValue:"none",show:D$,tid:"barEnd",options:[{value:"none",translation:"SNTable.Bar.End.None"},{value:"circle",translation:"SNTable.Bar.End.Circle"},{value:"box",translation:"SNTable.Bar.End.Square"}]}}};var q$,O$={};var L$=(q$||(q$=1,function(e){(()=>{var t={828(e,t,n){n.r(t),n.d(t,{default:()=>Re});var r=n.cjs(function(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,o=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=u(d,n),d!==(o=u(t,n))&&(h&&o&&(s(o)||(i=a(o)))?(i?(i=!1,c=r&&a(r)?r:[]):c=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,c,o)})):void 0!==o&&l(d,{name:n,newValue:o}));return d}}),o=n.n(r);const i=(e,t,n)=>{if(!t)return!1;const r=t.split("."),o=r[r.length-1];let i,a=e;for(i=0;i<r.length-1;++i)void 0===a[r[i]]&&(a[r[i]]=Number.isNaN(+r[i+1])?{}:[]),a=a[r[i]];if(void 0!==n){const e=a[o];return a[o]=n,{updated:n,previous:e}}return delete a[o],!1},a=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i},s={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]},l=" ( ",u=" ) ";function c(e){return l+e+u}function d(e,t={}){if(e.qLibraryId){const n=function(e,t){if(!t)return null;let n,r;for(n=0;n<t.length;n++)if(r=t[n],r.qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}const n=function(e,t){if(!t)return null;let n,r;const o=function(e){let t=e.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);for(n=0;n<t.length;n++){if(r=t[n],r.qName===o)return r;if(r.qDerivedFieldData)for(let e=0;e<r.qDerivedFieldData.qDerivedFieldLists.length;++e){const t=r.qDerivedFieldData.qDerivedFieldLists[e];for(let e=0;e<t.qFieldDefs.length;++e){const n=t.qFieldDefs[e];if(n.qName===o)return n}}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){const{crossAllDimensions:n}=e;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){const t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function m(e=0){return`[$(=Replace(GetObjectField(${e}),']',']]'))]`}function g(e,t){const{crossAllDimensions:n}=e;return 2===t&&n?"Above(Total ":"Above("}function b(e){return void 0===e?")":`, 0, ${e})`}function v(e){return`Replace(Replace(${e},'''',''''''),'$','$''&''')`}function y(e,t){return e?`${t}={">=$(=Min(${t}))<=$(=Max(${t}))"}`:`${t}={"=Only({1}${t})>='$(=${v(`MinString(${t})`)})' and Only({1}${t})<='$(=${v(`MaxString(${t})`)})'"}`}function x({modifier:e={},dimensions:t,dimensionAndFieldList:n,funcComp:r="Sum",valueComp:o="0"}){const{showExcludedValues:i}=e;if(!i)return"";if(t&&1===t.length)return`${r}({1<${y(d(t[0],n),m(0))}>}${o})`;if(t&&2===t.length){const e=d(t[0],n),i=d(t[1],n),a=m(0),s=m(1);return`${r}({1<${y(e,a)},${y(i,s)}>}${o})`}return`${r}({1}${o})`}function S(e){return`${e}(`}function w({properties:e,layout:t}){return a(e,"qHyperCubeDef.qDimensions",a(t,"qHyperCube.qDimensionInfo",[])).length}const C={isFullRange:p,getNumDimensions:w,getExpressionWithExcludedComp:function({expression:e,modifier:t,dimensions:n,dimensionAndFieldList:r,treatMissingAsNull:o}){const i=c(h(e)),{showExcludedValues:a}=t;if(!a)return i;const s=x({modifier:t,dimensions:n,dimensionAndFieldList:r}),l=o?"":", 0";return n&&1===n.length?`If(Count(${m(0)}) > 0, ${i} + ${s}${l})`:n&&2===n.length?`If(Count(${m(0)}) * Count(${m(1)}) > 0, ${i} + ${s}${l})`:i},getRowNoComp:f,getNumStepComp:function(e,t){if(!p(e)){const{steps:t}=e;return"number"!=typeof t||Number.isNaN(t)?6:t}return f(e,t)},getAboveCompPrefix:g,getAboveCompSuffix:b,getAboveComp:function(e,t,n,r){return g(e,t)+n+b(r)},getFunctionPrefix:S,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return S(e)+t+")"},getAggrComp:function(e,t,n){return`Aggr(${e}, ${t}, ${n})`},getExcludedComp:x,needDimension:function({modifier:e,properties:t,layout:n}){return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(e)&&2===w({properties:t,layout:n})},getDimComp:function(e,t){const n=function(e,t=0){return e[t].qDef.qSortCriterias[0]}(e,t),r=m(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;const o=["Descending","Ascending"],i=n.qSortByNumeric?`(Numeric, ${o[(n.qSortByNumeric+1)/2]})`:"",a=n.qSortByAscii?`(Text, ${o[(n.qSortByAscii+1)/2]})`:"";return n.qSortByNumeric&&n.qSortByAscii?`(${r}, ${i}, ${a})`:n.qSortByNumeric?`(${r}, ${i})`:n.qSortByAscii?`(${r}, ${a})`:r},simplifyExpression:h,extractInputExpression:function({outputExpression:e,modifier:t}){if(!t)return;const n=e.indexOf(l);if(-1===n)return;const r=e.indexOf(u);return-1!==r?e.substring(n+3,r):void 0},initModifier:function(e,t){Object.keys(t).forEach(n=>{void 0===e[n]&&(e[n]=t[n])})},isNumeric:d,isApplicable:function({properties:e,layout:t,minDimensions:n=1,maxDimensions:r=2}){if(!e&&!t)return!0;const o=w({properties:e,layout:t});return o>=n&&o<=r},getExpressionWithMarkers:c,canExtract:function(e){const t=e.indexOf(l),n=e.indexOf(u);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){return`[${e?e.replace(/]/g,"]]"):e}]`},generateTSDExpression:function(e,t,n){let r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){const o=n.qHyperCubeDef.qMeasures.find(t=>t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null);o&&t!==o.qDef.qLabel&&(r=o.qLibraryId||o.qDef.base.qLibraryId?`[${o.qDef.qLabel}]`:o.qDef.base.qDef);const i=function(e){const t=s.OPTIONS.find(t=>t.value===e.decomposition);return t?s.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r=`${i}(${r}, ${e.steps})`}return r},getDecomposition:function(e){let t="observed";return Object.values(s.EXPRESSIONS).find(n=>{const r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return s.EXPRESSIONS[n]&&r.includes(s.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}},E=o().bind(null,!0),R={},{isArray:A}=Array;function I(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function M(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function D(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach((t,o)=>{if(o===n.length)return;r=+t;const i=Number.isNaN(r)?{}:[];e[r||t]=M(e[r||t])?i:e[t],e=e[r||t]}),e}function P(e,t){let n=!0;if(I(e)&&I(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(r=>{P(e[r],t[r])||(n=!1)}),n);if(A(e)&&A(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!P(e[n],t[n]))return!1;return!0}return e===t}R.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(o=>{const i=function(e){return e?E({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;P(i,a)||k(t,o)||(M(a)?r.push({op:"add",path:s,value:i}):I(i)&&I(a)?r=r.concat(R.generate(a,i,s)):A(i)&&A(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]&&M(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(P(t,o))return r;if(!M(t[0])&&M(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(R.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=>{M(t[o])&&!k(e,o)&&r.push({op:"remove",path:`${n}/${o}`})}),r},R.apply=function(e,t){t.forEach(t=>{let n=D(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&Number.isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(A(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(A(o)&&A(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(I(o)&&I(t.value))a=o,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!k(a,e)&&delete a[e]}),E(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=D(e,t.from);A(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(A(n)?n.splice(+r,1):delete n[r]);var a})},R.clone=function(e){return E({},e)},R.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},R.updateObject=function(e,t){Object.keys(e).length?R.apply(e,R.generate(e,t)):E(e,t)};const T=R,q={saveSoftProperties(e,t,n){if(!e)return Promise.resolve();let r=T.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(r,!0)):Promise.resolve()}},O="accumulation";function L(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===O)return n[e]}function N(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===O)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}const j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},_={translationKey:"properties.modifier.accumulation",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression({expression:e,modifier:t,properties:n,layout:r,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:n,layout:r}));const l=a(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i}),c=C.getNumStepComp(t,s),d=C.getAboveComp(t,s,u,c);let p=C.getRangeComp("RangeSum",d);if(C.needDimension({modifier:t,properties:n,layout:r})){const e=C.getDimComp(l,1),n=C.getDimComp(l,0),r=C.getAggrComp(p,e,n);p=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:l,dimensionAndFieldList:i,valueComp:r}):r}return p},extractInputExpression:C.extractInputExpression,initModifier(e){C.initModifier(e,j)},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${N(t,e)}.accumulationDimension`,type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options(e,t){const{qDimensionInfo:n}=t.layout.qHyperCube;return n.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${N(t,e)}.crossAllDimensions`,type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},fullRange:{refFn:t=>`${N(t,e)}.fullAccumulation`,type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:t=>`${N(t,e)}.steps`,type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change(t){const n=L(t,e);if(n){const{steps:e}=n;n.steps="number"!=typeof e||Number.isNaN(e)?6:Math.abs(e)}},show(t){const n=L(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:t=>`${N(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;const i=L(t,e);return i&&!i.disabled}}}},z="movingAverage";function F(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===z)return n[e]}function $(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===z)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}const B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},H={translationKey:"properties.modifier.movingAverage",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression({expression:e,modifier:t,properties:n,layout:r,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s,l=o;void 0===l&&(l=C.getNumDimensions({properties:n,layout:r}));const u=a(n,"qHyperCubeDef.qDimensions",[]),c=t.showExcludedValues&&t.nullSuppression,d=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:u,dimensionAndFieldList:i,treatMissingAsNull:c}),p=C.getNumStepComp(t,l),f=C.getAboveComp(t,l,d,p);if(t.nullSuppression)s=C.getRangeComp("RangeAvg",f);else{const e=C.getRangeComp("RangeSum",f),n=function(e,t){const n=C.getRowNoComp(e,t);if(!C.isFullRange(e)){const{steps:t}=e;return`RangeMin(${"number"!=typeof t||Number.isNaN(t)?6:t}, ${n})`}return n}(t,l);s=`${e} / ${n}`}let h=s;if(C.needDimension({modifier:t,properties:n,layout:r})){const e=C.getDimComp(u,1),n=C.getDimComp(u,0),r=C.getAggrComp(h,e,n);h=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:u,dimensionAndFieldList:i,funcComp:"Only",valueComp:r}):r}return h},extractInputExpression:C.extractInputExpression,initModifier(e){C.initModifier(e,B)},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${$(t,e)}.primaryDimension`,type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options(e,t){const{qDimensionInfo:n}=t.layout.qHyperCube;return n.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${$(t,e)}.crossAllDimensions`,type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},fullRange:{refFn:t=>`${$(t,e)}.fullRange`,type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:t=>`${$(t,e)}.steps`,type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change(t){const n=F(t,e);if(n){const{steps:e}=n;n.steps="number"!=typeof e||Number.isNaN(e)?6:Math.abs(e)}},show(t){const n=F(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:t=>`${$(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:t=>`${$(t,e)}.nullSuppression`,type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;const i=F(t,e);return i&&!i.disabled}}}},V="timeSeriesDecomposition";function W(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===V)return n[e]}function U(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===V)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}const G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""},K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression:({expression:e,modifier:t,properties:n})=>t?C.generateTSDExpression(t,e,n):e,extractInputExpression:C.extractInputExpression,initModifier(e,t){C.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=C.getDecomposition(t))},propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{decomposition:{refFn:t=>`${U(t,e)}.decomposition`,type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:s.OPTIONS},steps:{refFn:t=>`${U(t,e)}.steps`,type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change(t,n){const r=W(t,e);if(r){const{steps:e}=r;r.steps="number"!=typeof e||Number.isNaN(e)?2:Math.abs(e),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(t=>(t.qDef.modifiers.map(t=>("timeSeriesDecomposition"===t.type?t.steps=e:t.steps=t.steps,t)),t))}},show(t){const n=W(t,e);return n&&!n.fullRange}}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;const i=W(t,e);return i&&!i.disabled}}}},Y="difference";function X(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===Y)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}const J={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Z={translationKey:"properties.modifier.difference",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),extractInputExpression:C.extractInputExpression,generateExpression({expression:e,modifier:t,properties:n,layout:r,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:n,layout:r}));const l=a(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i});let c=`${u} - ${C.getAboveComp(t,s,u)}`;if(C.needDimension({modifier:t,properties:n,layout:r})){const e=C.getDimComp(l,1),n=C.getDimComp(l,0),r=C.getAggrComp(c,e,n);c=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:l,dimensionAndFieldList:i,funcComp:"Only",valueComp:r}):r}return c},initModifier(e){Object.keys(J).forEach(t=>{void 0===e[t]&&(e[t]=J[t])})},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${X(t,e)}.primaryDimension`,type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options(e,t){const{qDimensionInfo:n}=t.layout.qHyperCube;return n.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${X(t,e)}.crossAllDimensions`,type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},showExcludedValues:{refFn:t=>`${X(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Y))return!1;const i=function(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===Y)return n[e]}(t,e);return i&&!i.disabled}}}},Q="normalization";function ee(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===Q)return n[e]}function te(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===Q)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}function ne(e,t){for(let n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}const re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function oe(e){return 2===e?"{1}":""}function ie(e,t,n){return 1===e?`{$<${C.getFieldWithWrapper(t)}={'${n}'}>}`:""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,n){return 0===e&&t>1?`<${C.getDimDefWithWrapper(n)}>`:""}const le={translationKey:"properties.modifier.normalization",needDimension:()=>!0,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),extractInputExpression:C.extractInputExpression,generateExpression({expression:e,modifier:t,properties:n,layout:r,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:n,layout:r}));const l=a(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i});let c=u;const{selectionScope:d,dimensionalScope:p,field:f,value:h,primaryDimension:m,ignoreNegative:g}=t;return c=function(e,t,n,r,o,i,a,s){const l=oe(t),u=ie(t,n,r),c=""===l&&""===u?"":l||u,d=ae(o,i),p=se(o,i,a),f=function(e){const t=[];for(let n=0;n<e;n++)t[n]=C.getDimDefWithWrapper(n);return t.join(", ")}(i);return s?`(If(${e} < 0, null(), ${e}))/ Sum(${c} ${d}${p} Aggr(${c} RangeMax( 0, ${e}), ${f}))`:`${e}/ Sum(${c} ${d}${p} Aggr(${c} ${e}, ${f}))`}(u,d,f,h,p,s,m,g),c},initModifier(e){Object.keys(re).forEach(t=>{void 0===e[t]&&(e[t]=re[t])})},updateModifier(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:()=>!0,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{selectionScope:{refFn:t=>`${te(t,e)}.selectionScope`,type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:n=>function(e,t,n){let r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];const{dimensionalScope:o}=ee(e,n);return r=function(e,t){if(1===e){const e=ne(t,0);t.splice(e,1)}return t}(o,r),r}(n,t,e)},field:{refFn:t=>`${te(t,e)}.field`,type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:(e,t,n)=>n.app.getFieldList().then(e=>e.map(e=>({label:e.qName,value:e.qName}))),show:t=>1===ee(t,e).selectionScope},value:{refFn:t=>`${te(t,e)}.value`,type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:t=>1===ee(t,e).selectionScope},dimensionalScope:{refFn:t=>`${te(t,e)}.dimensionalScope`,type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:(n,r)=>function(e,t,n,r){const o=t.layout.qHyperCube.qDimensionInfo.length;let i=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope."+(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||`properties.modifier.dimensionalScope.${2===o?"respectAllDimensions":"respectDimension"}.tooltip`},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope."+(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||`properties.modifier.dimensionalScope.${2===o?"disregardAllDimensions":"disregardDimension"}.tooltip`}];i=function(e,t){if(e<2){const e=ne(t,0);t.splice(e,1)}return t}(o,i);const{selectionScope:a}=ee(e,r);return i=function(e,t){if(0===e){const e=ne(t,1);t.splice(e,1)}return t}(a,i),i}(n,r,t,e)},primaryDimension:{refFn:t=>`${te(t,e)}.primaryDimension`,type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options(e,t){const{qDimensionInfo:n}=t.layout.qHyperCube;return n.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(t,n)=>0===(ee(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Q))return!1;const i=ee(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:oe,getFieldSelectionComp:ie,getTotalComp:ae,getSelectedDimComp:se},ue="library id deleted",ce="qDef.qDef",de="qDef.base.qDef",pe="qLibraryId",fe="qDef.base.qLibraryId",he="qDef.qLabel",me="qDef.qLabelExpression",ge="qDef.base.qLabel",be="qDef.base.qLabelExpression",ve="qDef.qAggrFunc",ye="qDef.base.qAggrFunc",xe="qDef.base",Se={getExpression(e){const t=a(e,de);return void 0!==t?t:a(e,ce)},getExpressionRef:e=>void 0!==a(e,de)?de:ce,getLibraryIdRef:e=>a(e,fe)?fe:pe,getLibraryId:e=>a(e,fe)||a(e,pe),getLabelRef:e=>a(e,xe)?ge:he,getLabelExpressionRef:e=>a(e,xe)?be:me},we={initBase(e,t){(t||we.isValid(e))&&(i(e,de,a(e,ce)),i(e,fe,a(e,pe)),i(e,ge,a(e,he)),i(e,be,a(e,me)))},restoreBase(e){we.isValid(e)&&(i(e,ce,a(e,de)),i(e,pe,a(e,fe)),i(e,he,a(e,ge)),i(e,me,a(e,be)),a(e,ve)&&a(e,ye)&&i(e,ve,a(e,ye)),delete e.qDef.base)},isValid(e){const t=a(e,de),n=a(e,fe);return void 0!==t||void 0!==n}},Ce=we,Ee={accumulation:_,movingAverage:H,difference:Z,normalization:le,timeSeriesDecomposition:K},Re={modifiers:Ee,apply:Ie,applyModifiers:Me,cleanUpMeasure:ke,destroy:function(e){e&&Ae[e.id]&&Ae[e.id].masterItemSubscriber&&(Ae[e.id].masterItemSubscriber&&Ae[e.id].masterItemSubscriber.unsubscribe(),delete Ae[e.id])},hasActiveModifiers:De,getActiveModifier:Pe,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(e=>Ee[e])},isApplicableSupportedModifiers:function({modifierTypes:e,properties:t,layout:n}){return Array.isArray(e)&&e.some(e=>Ee[e]&&Ee[e].isApplicable({properties:t,layout:n}))},measureBase:Se,limitedSorting:function({measures:e,properties:t,layout:n}){let r=!1,o=!1;return e.forEach(e=>{const i=Oe(e);$e({modifiers:i,properties:t,layout:n})&&(r=!0,o=o||Ue({modifiers:i,properties:t,layout:n}))}),r&&!o},ifEnableTotalsFunction:Te},Ae={};function Ie({model:e,properties:t,isSnapshot:n=!1,masterItem:r}={}){const i=!1;Ae[e.id]=Ae[e.id]||{isFirstTime:!0};const{isFirstTime:s}=Ae[e.id];if(Ae[e.id].isFirstTime=!1,t&&"object"==typeof t)return Me({model:e,properties:t});const l=e?e.layout:void 0,u=a(l,"qSelectionInfo.qInSelections");if(n||u)return Promise.resolve(i);const c=a(l,"qHyperCube.qMeasureInfo"),{lastReloadTime:d}=Ae[e.id];if(Ae[e.id].lastReloadTime=a(e,"app.layout.qLastReloadTime"),De({measures:c,layout:l})){const t=function({measures:e,layout:t,model:n,lastReloadTime:r}){return a(n,"app.layout.qLastReloadTime")!==r&&function({measures:e,properties:t,layout:n}){return!!Array.isArray(e)&&e.some(e=>Fe({measure:e,properties:t,layout:n}))}({measures:e,layout:t})}({measures:c,layout:l,model:e,lastReloadTime:d});return t||function({measures:e,layout:t,masterItem:n,isFirstTime:r}){return!!Array.isArray(e)&&(r||n||e.some(e=>function({measure:e,layout:t}){return $e({modifiers:Oe(e),layout:t})?!e.base:!!e.base}({measure:e,layout:t})))}({measures:c,layout:l,masterItem:r,isFirstTime:s})?e.getEffectiveProperties().then(n=>{const a=o()(!0,{},n);Ne(a);const s=Ge(a);return Be({model:e}).then(o=>He({libraryIds:s,model:e}).then(i=>(t&&function({properties:e}){qe(e).forEach(t=>function({measure:e,properties:t}){if(Fe({measure:e,properties:t})){let t=0;const{modifiers:n}=e.qDef;Array.isArray(n)&&n.forEach(n=>{if("object"==typeof n&&!n.disabled){if(t++,"object"!=typeof Ee[n.type])throw new Error(`Modifier "${n.type}" is not available`);if(t>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");const r=Ee[n.type].extractInputExpression({outputExpression:e.qDef.qDef,modifier:n});void 0!==r&&_e(e)&&C.simplifyExpression(e.qDef.base.qDef)!==C.simplifyExpression(r)&&(e.qDef.base.qDef=r)}})}}({measure:t,properties:e}))}({properties:a}),Me({model:e,oldProperties:n,properties:a,runUpdateIfChange:!0,masterItem:r,libraryItemsProps:i,dimensionAndFieldList:o})))).catch(()=>Promise.resolve(i))}):Promise.resolve(i)}return function(e){return!!Array.isArray(e)&&e.some(e=>"object"==typeof e.base)}(c)?e.getEffectiveProperties().then(t=>function({model:e,properties:t}){const n=Ge(t);return Ke({model:e,libraryIds:n}).then(()=>{const n=o()(!0,{},t);return qe(t).forEach(e=>ke(e)),We({oldProperties:n,newProperties:t,model:e})})}({model:e,properties:t})):Promise.resolve(i)}function Me({model:e,oldProperties:t,properties:n,measures:r,runUpdateIfChange:i=!1,masterItem:s,libraryItemsProps:l,dimensionAndFieldList:u}){void 0===t&&(t=i?o()(!0,{},n):n),Ne(n);const c=Ge(n);return Ke({model:e,libraryIds:c,masterItem:s}).then(()=>function({measures:e,properties:t,model:n,libraryItemsProps:r,dimensionAndFieldList:i}){if(e||(e=qe(t)),!e.length)return Promise.resolve();if(!r&&!De({measures:e,properties:t}))return e.forEach(e=>ke(e)),Promise.resolve();const s=r?void 0:Ge(t);return Be({model:n,dimensionAndFieldList:i}).then(i=>He({libraryIds:s,model:n,libraryItemsProps:r}).then(n=>{e.forEach(e=>{const{modifiers:r}=e.qDef;n&&$e({modifiers:r,properties:t})?(function({measure:e,properties:t,libraryItemsProps:n,dimensionAndFieldList:r}){let i=0;Ce.isValid(e)||Ce.initBase(e,!0);const{modifiers:s,base:l}=e.qDef;Array.isArray(s)&&s.forEach(s=>{if("object"==typeof s&&!s.disabled){if(i++,"object"!=typeof Ee[s.type])throw new Error(`Modifier "${s.type}" is not available`);if(i>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ee[s.type].initModifier(s,e);const u=e.qLibraryId||l&&l.qLibraryId;u?function({measure:e,modifier:t,libraryId:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}){const s=i[n],l=s.qMeasure.qDef,u=""===l?l:Ee[t.type].generateExpression({expression:l,modifier:t,properties:r,dimensionAndFieldList:a});t.outputExpression=u,e.qDef.qDef=t.outputExpression,(e.qDef.qLabel||s.qMeasure.qLabel)&&(e.qDef.qLabel=e.qDef.base.qLabel||s.qMeasure.qLabel),(e.qDef.qLabelExpression||s.qMeasure.qLabelExpression)&&(e.qDef.qLabelExpression=s.qMeasure.qLabelExpression),e.qDef.quarantine&&e.qDef.quarantine.qNumFormat&&s.qMeasure.qNumFormat&&(e.qDef.qNumFormat=e.qDef.base.qNumFormat||s.qMeasure.qNumFormat,e.qDef.isCustomFormatted=s.qMeasure.isCustomFormatted),delete e.qLibraryId,e.qDef.coloring=s.qMeasure.coloring,t.base=o()(!0,{},e.qDef.base)}({measure:e,modifier:s,libraryId:u,properties:t,libraryItemsProps:n,dimensionAndFieldList:r}):function({measure:e,modifier:t,properties:n,dimensionAndFieldList:r}){"function"==typeof Ee[t.type].updateModifier&&Ee[t.type].updateModifier(t,n.qHyperCubeDef);const i=Se.getExpression(e),a=""===i?i:Ee[t.type].generateExpression({expression:i,modifier:t,properties:n,dimensionAndFieldList:r});t.outputExpression=a,e.qDef.qDef=t.outputExpression,e.qDef.base.qLabelExpression?e.qDef.qLabelExpression=e.qDef.base.qLabelExpression:e.qDef.qLabel=e.qDef.base.qLabel||i,t.base=o()(!0,{},e.qDef.base)}({measure:e,modifier:s,properties:t,dimensionAndFieldList:r}),function(e){const t=a(e,"qDef.qAggrFunc");"Expr"!==t||Te(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Te(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(e)}})}({measure:e,properties:t,libraryItemsProps:n,dimensionAndFieldList:i}),je(e)):ke(e)})}))}({measures:r,properties:n,model:e,libraryItemsProps:l,dimensionAndFieldList:u}).then(()=>i?We({oldProperties:t,newProperties:n,model:e}):Promise.resolve(!1))).catch(()=>Promise.resolve(!1))}function ke(e){!function(e){const t=Oe(e);return Array.isArray(t)&&t.some(e=>"object"==typeof e&&!e.disabled&&!Ee[e.type])}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,je(e)}function De({measures:e,properties:t,layout:n}){return!!Array.isArray(e)&&e.some(e=>$e({modifiers:Oe(e),properties:t,layout:n}))}function Pe(e){const t=Oe(e);if(Array.isArray(t))for(let e=0;e<t.length;e++){const n=t[e];if(Ee[n.type]&&!n.disabled)return n}}function Te(e){const t=Pe(e);return!t||Ee[t.type].enableTotalsFunction(e)}function qe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Oe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Le(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ne(e){qe(e).forEach(e=>function(e){const t=Pe(e);t&&(void 0!==t.outputExpression&&Le(t)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e))}function je(e){const t=Oe(e);Array.isArray(t)&&t.forEach(t=>{"object"==typeof t&&(t.disabled||!Ee[t.type]&&Le(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function _e(e){return e.base||e.qDef&&e.qDef.base}function ze(e){const t=_e(e);return e.qLibraryId||t&&t.qLibraryId}function Fe({measure:e,properties:t,layout:n}){return!ze(e)&&$e({modifiers:Oe(e),properties:t,layout:n})}function $e({modifiers:e,properties:t,layout:n}){const r={};return Array.isArray(e)&&e.some(e=>!("object"!=typeof e||e.disabled||!Ee[e.type])&&(void 0===r[e.type]&&(r[e.type]=Ee[e.type].isApplicable({properties:t,layout:n})),r[e.type]))}function Be({model:e,dimensionAndFieldList:t}){if(t)return Promise.resolve(t);const n=[],r={},o=e.app.getDimensionList().then(e=>{r.dimensionList=e});n.push(o);const i=e.app.getFieldList().then(e=>{r.fieldList=e});return n.push(i),Promise.all(n).then(()=>r)}function He({libraryIds:e,model:t,libraryItemsProps:n}){if(n)return Promise.resolve(n);const{measureLibraryIds:r,dimensionLibraryIds:o}=e,i={},a=[];return r.forEach(e=>{const n=t.app.getMeasure(e).then(t=>t.getProperties().then(t=>{i[e]=t}));a.push(n)}),o.forEach(e=>{const n=t.app.getDimension(e).then(t=>t.getProperties().then(t=>{i[e]=t}));a.push(n)}),Promise.all(a).then(()=>i).catch(()=>null)}function Ve(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function We({oldProperties:e,newProperties:t,model:n}){const r=JSON.stringify(a(e,"qHyperCubeDef.qMeasures"),Ve)!==JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ve)||JSON.stringify(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ve)!==JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ve);return r?function({model:e,oldProperties:t,newProperties:n}){const{layout:r}=e;return r&&!r.qHasSoftPatches&&!r.qExtendsId&&a(r,"qMeta.privileges",[]).indexOf("update")>-1?e.setProperties(n):q.saveSoftProperties(e,t,n)}({model:n,oldProperties:e,newProperties:t}).then(()=>r):Promise.resolve(r)}function Ue({modifiers:e,properties:t,layout:n}){return Array.isArray(e)&&e.some(e=>"object"==typeof e&&!e.disabled&&Ee[e.type]&&Ee[e.type].needDimension({modifier:e,properties:t,layout:n}))}function Ge(e){const t=qe(e),n=[],r=[];let o=!1;return t.forEach(t=>{const r=Oe(t);if($e({modifiers:r,properties:e})){const i=ze(t);i&&n.push(i),o=o||Ue({modifiers:r,properties:e})}}),a(e,"qHyperCubeDef.qDimensions",[]).forEach(e=>{const t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function Ke({model:e,libraryIds:t,masterItem:n}){return!n&&n!==ue&&Ae[e.id]&&t&&(t.measureLibraryIds.length||t.dimensionLibraryIds.length)?(Ae[e.id].masterItemSubscriber=Ae[e.id].masterItemSubscriber||function({model:e,callback:t}){let n={},r={},o={};const i={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){const t={},n=a(e,"qInfo.qType");return n&&i[n]&&i[n].forEach(n=>{t[n]=a(e,n)}),JSON.stringify(t)}function l(e){const{qId:r}=e.qInfo;if(n[r]){const o=s(e);n[r].properties!==o&&(n[r].properties=o,"function"==typeof t&&n[r].enabled&&t(e)),n[r].enabled=!0}}function u(){Object.keys(n).forEach(e=>{r[e]||o[e]||(n[e].listener.dispose(),n[e].unbindCloseListnener(),delete n[e])})}const c=(e,t)=>(e.once("closed",t),()=>e.removeListener("closed",t));function d(r,o){return e.app[o](r).then(e=>{n[r]={listener:e.layoutSubscribe(l),unbindCloseListnener:c(e,()=>{return r=e.id,t(ue),delete n[r],void u();var r}),enabled:!1,properties:s(e.layout)}}).catch(()=>{})}return{subscribe({measureLibraryIds:t,dimensionLibraryIds:i}){const a=[];return function({measureLibraryIds:e,dimensionLibraryIds:t}){r={},e.forEach(e=>{r[e]=!0}),o={},t.forEach(e=>{o[e]=!0})}({measureLibraryIds:t,dimensionLibraryIds:i}),u(),e.app&&(Object.keys(r).forEach(e=>{r[e]&&!n[e]&&a.push(d(e,"getMeasure"))}),Object.keys(o).forEach(e=>{o[e]&&!n[e]&&a.push(d(e,"getDimension"))})),Promise.all(a)},unsubscribe(){Object.keys(n).forEach(e=>{n[e].listener.dispose(),n[e].unbindCloseListnener()}),n={}}}}({model:e,callback:t=>Ie({model:e,masterItem:t}).then(()=>e.app.clearUndoBuffer())}),Ae[e.id].masterItemSubscriber.subscribe(t)):Promise.resolve()}}};const n={};function r(e){const o=n[e];if(void 0!==o)return o.exports;const i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++];r.o(e,o)?0===i&&n++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let o=r(828);for(var i in e.default=o.default,o)-1===["default"].indexOf(i)&&(e[i]=o[i]);Object.defineProperty(e,"__esModule",{value:!0})})()}(O$)),O$),N$=Ht(L$);const j$="TOTAL_OFF",_$={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1}},z$=(e,t)=>t&&e.flags.isEnabled("VNA-977-TABLE-BARS"),F$=(e,t,n)=>({component:"expression",ref:"qExpression",expressionType:"measure",translation:t,defaultValue:"",id:e,tid:n,show:!1}),$$=(e,t)=>z$(e,t)?[F$("barColor","SNTable.Bar.ColorExpression","barColorByExpression"),F$("barLabelColor","SNTable.Bar.LabelColorExpression","barLabelColorByExpression"),F$("barWidth","SNTable.Bar.WidthExpression","barWidthByExpression"),F$("barOffset","SNTable.Bar.OffsetExpression","barOffsetByExpression"),F$("barLabel","SNTable.Bar.LabelExpression","barLabelByExpression")]:[],B$=(e,t)=>({visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},tableCellStyling:{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:"textStyleExpression",tid:"tableTextStyleByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"urlLabel",tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"url",tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageLabel",tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageUrl",tid:"ImageUrlByExpression",show:!1},...$$(e,t)]}}),H$=(e,t)=>({columnExpression:{type:"items",grouped:!0,items:[{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},{type:"items",items:[{component:"text",translation:"properties.Header",style:"sHeader"},{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}]},{type:"items",items:[{component:"text",translation:"properties.Content",style:"sHeader"},{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:"textStyleExpression",tid:"tableTextStyleByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"urlLabel",tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"url",tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageLabel",tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageUrl",tid:"ImageUrlByExpression",show:!1},...$$(e,t)]}]}]}}),V$={textAlignAuto:{ref:"qDef.textAlign.auto",type:"boolean",component:"switch",translation:"Common.Text.TextAlignment",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},textAlign:{ref:"qDef.textAlign.align",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:e=>void 0!==e.qDef.textAlign&&!e.qDef.textAlign.auto}},W$=e=>({type:"items",grouped:!0,items:{totalsAggrGroup:{type:"items",items:{totalsAggrFunc:{type:"string",component:"dropdown",ref:"qDef.qAggrFunc",translation:"Object.Table.AggrFunc",options:(e,t)=>(!N$.hasActiveModifiers({measures:[e],properties:t.properties})||N$.ifEnableTotalsFunction(e)?[{value:""===e.qDef.qAggrFunc?"":"Expr",translation:"Common.Auto"}]:[]).concat([{value:"Avg",translation:"Object.Table.AggrFunc.Avg"},{value:"Count",translation:"Object.Table.AggrFunc.Count"},{value:"Max",translation:"Object.Table.AggrFunc.Max"},{value:"Min",translation:"Object.Table.AggrFunc.Min"},{value:"Sum",translation:"Object.Table.AggrFunc.Sum"},{value:"None",translation:"Object.Table.AggrFunc.None"}]),defaultValue:e.anything.sense?.isUnsupportedFeature?.("totals")?"None":"Expr"}}}},show:!e.anything.sense?.isUnsupportedFeature?.("totals")}),U$={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:Qm.Auto,translation:"Common.Auto"},{value:Qm.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:Qm.Pixels,translation:"Object.Table.Column.Pixels"},{value:Qm.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:Qm.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:"200",show:e=>e.qDef.columnWidth?.type===Qm.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:"20",show:e=>e.qDef.columnWidth?.type===Qm.Percentage}},G$=(e,t)=>({..._$,...e.flags.isEnabled("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?H$(e,t):B$(e,t),...V$,...U$}),K$=e=>({libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},subTotalGroup:{type:"items",show:e.flags.isEnabled("TLV-2303-SUB-TOTALS")&&!e.anything.sense?.isUnsupportedFeature?.("totals"),items:[{uses:"divider"},{type:"string",component:"switch",translation:"properties.showSubTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:j$,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:j$,translation:"properties.off"}},{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"Common.Label",defaultValue:()=>e.translator.get("properties.subTotals"),show:e=>e.qOtherTotalSpec?.qTotalMode!==j$},{uses:"divider"}]},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}}),Y$=e=>{const t=e.anything.sense?.isUnsupportedFeature?.("modifiers");return{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>t?!!e.qLibraryId:!(!e.qLibraryId&&!e.qDef.base?.qLibraryId)},inlineMeasure:{component:"inline-measure",show:e=>t?!e.qLibraryId:!(e.qLibraryId||e.qDef.base?.qLibraryId)},numberFormatting:{uses:"measures.items.numberFormatting"},createMasterItemButton:{},divider:{uses:"divider"},totalsAggr:W$(e)}},X$=e=>({dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:K$(e)},presentation:{type:"items",translation:"properties.presentation",items:{...G$(e,!1),...A$(e)}}}}}),J$=e=>({measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:Y$(e)},presentation:{type:"items",translation:"properties.presentation",items:{...G$(e,!0),...I$(e,{[S$.Image]:!0,[S$.Indicator]:!0,[S$.MiniChart]:!0,[S$.Bar]:z$(e,!0)}),...T$({[S$.Bar]:z$(e,!0)})}}}}}),Z$=e=>({...X$(e),...J$(e)}),Q$=e=>({type:"items",translation:"Common.Data",component:"tabs-component",items:{columns:{component:"data-assets-panel",ref:"columns",tabName:"properties.DataAssetPanel.Columns",items:{...Z$(e)},highlightSelected:!0},filters:{type:"items",component:"filters-assets-panel",ref:"filters",tabName:"SimpleProperties.Filters.Filters",items:{filter:{type:"object",component:"filter-item-react",ref:"filter"}},highlightSelected:!0}}}),eB=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),tB=e=>eB("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),nB={chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}},rB=e=>({type:"items",items:[{ref:"totals.show",type:"boolean",translation:"properties.totals",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},{ref:"totals.position",translation:"Common.Position",type:"string",component:"dropdown",options:[{value:"noTotals",translation:"Common.None"},{value:"top",translation:"Common.Top"},{value:"bottom",translation:"Common.Bottom"}],defaultValue:"noTotals",show:e=>!e.totals?.show},{ref:"totals.label",translation:"properties.totals.label",type:"string",expression:"optional",defaultValue:()=>e.translator.get("Object.Table.Totals")}],show:!e.anything.sense?.isUnsupportedFeature?.("totals")}),oB=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),iB=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},aB=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort().map(e=>iB(e,!0))],s=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...de().filter(e=>!i.includes(e)).map(e=>iB(e,!0))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),sB=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],lB=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>iB(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...sB.filter(e=>!i.includes(e)).map(e=>iB(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),uB=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:aB({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:lB({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:oB(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:oB(`${e}.background`,"properties.background",(t,n)=>{const r=n?bm.WHITE:bm.TRANSPARENT;return o(t,e,"backgroundColor")??r},a)}}}}),cB=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?tB(e):void 0,content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:oB(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:oB(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),dB=(e,t,n)=>{switch(t){case"header":return e.object?.straightTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.straightTableV2?.dimension?.label?.value?.[n];case"measureValues":return e.object?.straightTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.straightTableV2?.total?.label?.value?.[n];case"subTotalValues":return e.object?.straightTableV2?.subTotal?.label?.value?.[n];case"nullValues":case"dimensionNullValues":return e.object?.straightTableV2?.null?.label?.value?.[n];default:return}},pB=e=>e.grid?.zebraStripes?.show,fB={ref:"content.rowHeight",component:"integer",placeholder:1,maxlength:4,translation:"ThemeStyleEditor.style.rowHeight",change(e){void 0!==e&&(null!==e.content?.rowHeight&&void 0!==e.content?.rowHeight&&""!==e.content.rowHeight?e.content.rowHeight=Math.max(1,Math.min(50,Math.floor(e.content.rowHeight))):void 0!==e.content&&(e.content.rowHeight=void 0))}},hB=e=>e?.content?.hoverEffect,mB={translation:"properties.RowHover",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{hoverEffectSwitch:{ref:"content.hoverEffect",translation:"ThemeStyleEditor.style.hoverEffect",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},hoverEffectColorItem:{show:hB,ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show:hB,ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}},gB=(e,t,{properties:n})=>"sn-table"===n.visualization&&!0===n.usePagination,bB=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),vB=({flags:e,translator:t})=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:uB({section:"header",defaultFontStyle:["bold"],translator:t,flags:e,getThemeValue:dB,disableNoneCallback:gB}),dimensionValueSection:uB({section:"dimensionValues",translator:t,flags:e,getThemeValue:dB}),measureValueSection:uB({section:"measureValues",translator:t,flags:e,getThemeValue:dB}),totalRowSection:uB({section:"totalValues",defaultFontStyle:["bold"],translation:"properties.totals",translator:t,flags:e,getThemeValue:dB,disableNoneCallback:gB}),subTotalRowSection:e.isEnabled("TLV-2303-SUB-TOTALS")?uB({section:"subTotalValues",defaultFontStyle:["bold"],translation:"properties.subTotals",translator:t,flags:e,getThemeValue:dB,disableNoneCallback:gB}):void 0,...bB(e)?{dimensionNullSection:cB({section:"dimensionNullValues",translation:"properties.table.dimensionNullValues",fallbackBackground:bm.NULL_VALUE_BACKGROUND,getThemeValue:dB,isNullValueText:!0}),nullValues:cB({section:"nullValues",translation:"properties.table.measureNullValues",fallbackBackground:bm.NULL_VALUE_BACKGROUND,getThemeValue:dB,isNullValueText:!0})}:{nullValues:cB({section:"nullValues",fallbackBackground:bm.NULL_VALUE_BACKGROUND,getThemeValue:dB,isNullValueText:!1})},grid:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{rowHeight:{show:()=>!0,...fB},border:oB("grid.border","properties.border",e=>e.object?.straightTableV2?.grid?.borderColor??bm.BORDER_MEDIUM),divider:oB("grid.divider","properties.pivot.divider",e=>e.object?.straightTableV2?.grid?.divider?.borderColor??bm.BORDER_HEAVY)}}}},hoverEffectSection:mB,zebraStripes:{translation:"properties.zebraStripes",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{zebraStripesEnable:{ref:"grid.zebraStripes.show",translation:"properties.zebraStripes.enable",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},zebraStripesColorOdd:{show:pB,ref:"grid.zebraStripes.color.odd",translation:"properties.zebraStripes.color.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundrOdd:{show:pB,ref:"grid.zebraStripes.background.odd",translation:"properties.zebraStripes.background.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1},zebraStripesColorEven:{show:pB,ref:"grid.zebraStripes.color.even",translation:"properties.zebraStripes.color.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundEven:{show:pB,ref:"grid.zebraStripes.background.even",translation:"properties.zebraStripes.background.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1}}}}}}}]}),yB=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[vB(e),rB(e),{type:"items",items:[{component:"text",translation:"properties.accessibilityOptions"},{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1},{ref:"accessibleHeader",translation:"properties.increaseAccessibility",type:"boolean",component:"checkbox",undefinedValue:!0,defaultValue:!1}]},{type:"items",translation:"Object.Table.WrapText",items:[{component:"text",translation:"Object.Table.Multiline"},{ref:"multiline.wrapTextInHeaders",type:"boolean",translation:"Object.Table.Multiline.WrapTextInHeaders",component:"checkbox",defaultValue:!0},{ref:"multiline.wrapTextInCells",type:"boolean",translation:"Object.Table.Multiline.WrapTextInCells",component:"checkbox",defaultValue:!0}]},{ref:"hideHeader",translation:"properties.hideHeader",type:"boolean",component:"checkbox",defaultValue:!1},e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")?void 0:tB()]},...nB}}),xB={uses:"sorting"},SB={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},wB=e=>({type:"items",component:"accordion",items:{data:Q$(e),sorting:xB,addOns:SB,settings:yB(e)}});function CB(e){return{definition:wB(e),exploration:t$(e),data:y$(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1,exploration:!0,cssScaling:!0,modifiers:e.anything.sense?.isUnsupportedFeature?.("modifiers")?void 0:["accumulation","movingAverage","difference","normalization"]},importProperties(t,n,r,o,i){const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()};return Ev({exportFormat:t,initialProperties:n,extension:r,hypercubePath:o,defaultPropertyValues:a,viewDataMode:i,env:e})},exportProperties:(e,t)=>vv({propertyTree:e,hyperCubePath:t}),propertyHandler:t=>new h$(t,e.translator),usePropertyHandler:"sn-table-data",migrate:x$(e)}}const EB=e=>{const t=e.get(tv);return a(()=>()=>{t.unmount()},[t]),t};var RB,AB={exports:{}};
|
|
102
|
+
*/function SR(){if(bR)return KS;bR=1,Object.defineProperty(KS,"__esModule",{value:!0}),KS.default=function(t){return(0,e.createStyles)(t)};var e=xR;return KS}var wR,CR,ER={},RR={};function AR(){if(wR)return RR;wR=1;var e=zl();Object.defineProperty(RR,"__esModule",{value:!0}),RR.default=void 0;var t=(0,e(VS()).default)();return RR.default=t,RR}function IR(){if(CR)return ER;CR=1;var e=zl();Object.defineProperty(ER,"__esModule",{value:!0}),ER.default=void 0;var t=e(gu()),n=xR,r=e(AR());var o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return ER.default=o,ER}var MR,kR,DR={},PR={};function TR(){if(MR)return PR;MR=1;var e=zl();Object.defineProperty(PR,"__esModule",{value:!0}),PR.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},PR.getUnit=n,PR.toUnitless=r,PR.convertLength=function(e){return function(t,o){var i=n(t);if(i===o)return t;var a=r(t);if("px"!==i)if("em"===i)a=r(t)*r(e);else if("rem"===i)return a=r(t)*r(e),t;var s=a;if("px"!==o)if("em"===o)s=a/r(e);else{if("rem"!==o)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+o}},PR.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,o=r+n;return t-r<o-t?r:o},PR.fontGrid=function(e){var t=e.lineHeight,n=e.pixels,r=e.htmlFontSize;return n/(t*r)},PR.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,o=e.max,i=e.unit,a=void 0===i?"rem":i,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(o-r)/l[l.length-1];return l.forEach(function(e){var o=r+p*e;null!==c&&(o=c(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*o)/1e4).concat(a))}),d};var t=e(ay());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return PR}function qR(){if(kR)return DR;kR=1;var e=zl();Object.defineProperty(DR,"__esModule",{value:!0}),DR.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,a=void 0===i?["sm","md","lg"]:i,s=o.disableAlign,l=void 0!==s&&s,u=o.factor,c=void 0===u?2:u,d=o.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map(function(e){return f.breakpoints.values[e]});return p.forEach(function(e){var o=h[e],i=parseFloat(m(o.fontSize,"rem"));if(!(i<=1)){var a=i,s=1+(a-1)/c,u=o.lineHeight;if(!(0,r.isUnitless)(u)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},o,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(gu()),n=Uv,r=TR();return DR}var OR,LR={};function NR(){if(OR)return LR;OR=1;var e=zl();Object.defineProperty(LR,"__esModule",{value:!0}),LR.default=void 0;var t=e(gu()),n=xR,r=e(AR()),o=function(e){var o=(0,n.styled)(e);return function(e,n){return o(e,(0,t.default)({defaultTheme:r.default},n))}};return LR.default=o,LR}var jR,_R={};function zR(){if(jR)return _R;jR=1;var e=zl();Object.defineProperty(_R,"__esModule",{value:!0}),_R.default=function(){return(0,t.useTheme)()||n.default};var t=xR;e(w);var n=e(AR());return _R}var FR,$R={};function BR(){if(FR)return $R;FR=1;var e=zl();Object.defineProperty($R,"__esModule",{value:!0}),$R.default=void 0;var t=e(gu()),n=xR,r=e(AR());var o=function(e,o){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return $R.default=o,$R}var HR,VR,WR={};function UR(){if(HR)return WR;HR=1;var e=zl();Object.defineProperty(WR,"__esModule",{value:!0}),WR.default=void 0;var t=xR,n=e(AR()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return WR.default=r,WR}function GR(){return VR||(VR=1,function(e){var t=zl(),n=(Rv||(Rv=1,function(e){var t;e.exports=function(e,n){if(!n&&e&&e.__esModule)return e;var r,o,i=Object.defineProperty,a={__proto__:null,default:e};if(Object(e)!==e)return a;if(t||"function"!=typeof WeakMap||(t=new WeakMap),t){if(t.has(e))return t.get(e);t.set(e,a)}for(o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&((r=i&&Object.getOwnPropertyDescriptor(e,o))&&(r.get||r.set)?i(a,o,r):a[o]=e[o]);return a},e.exports.__esModule=!0,e.exports.default=e.exports}(Iv)),Iv.exports);Object.defineProperty(e,"__esModule",{value:!0});var r={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return i.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return m.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return m.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return m.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return m.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}});var o=Gv();Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))});var i=n(VS()),a=t(GS()),s=t(SR()),l=t(IR()),u=t(qR()),c=t(NR()),d=zS();Object.keys(d).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))});var p=t(zR()),f=t(BR()),h=t(UR()),m=xR}(Av)),Av}var KR=GR();KR.alpha(Tt.GREYSCALE_0,.05),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),KR.alpha(Tt.GREEN_PALE,.5),KR.alpha(Tt.BLUE_PALE,.5),t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let o,i;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(o!==(e=e||"")){try{i=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}o=e}return i},u=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(u)?u.then(l):l(u)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,r)=>l(e,e=>{let o;try{o=JSON.parse(e||"",null==n?void 0:n.reviver)}catch(e){o=r}t(o)})))}();const YR=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),XR=new WeakMap,JR=()=>{};function ZR(e,n=JR){return((e,t,n)=>{const r=YR(()=>new WeakMap,XR,t);return YR(e,r,n)})(()=>{const r=new WeakMap,o=new WeakMap,i=$g(0),a=$g([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])},"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(i.debugPrivate=!0,a.debugPrivate=!0);const s=$g(t=>{let l;t(i);try{l=t(s)}catch(e){}const u=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(u))return{v:u};if(u!==(null==l?void 0:l.p)&&u.then(e=>{o.set(u,e);const[n]=t(a);n()},e=>{r.set(u,e);const[n]=t(a);n()}),r.has(u)){if(l&&"e"in l&&l.p===u)return l;const e=r.get(u);return l&&"v"in l?{p:u,e:e,v:l.v}:{p:u,e:e}}return o.has(u)?{p:u,v:o.get(u)}:l&&"v"in l?{p:u,f:n(l.v),v:l.v}:{p:u,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),$g(e=>{const t=e(s);if("e"in t)throw t.e;return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}const QR=new WeakMap;function eA(e,t){const n=Ug(t),r=tA(n);for(const[o,...i]of e)r.has(o)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(o),n.set(o,...i))}const tA=e=>{let t=QR.get(e);return t||(t=new WeakSet,QR.set(e,t)),t};function nA(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}const rA="INTERNAL_getBuildingBlocksRev",oA=Number(Object.keys(_g).find(e=>e.startsWith(rA))?.slice(29));if(Number.isNaN(oA))throw new Error("jotai-compat: unsupported jotai internals revision");const iA=_g,aA=`INTERNAL_getBuildingBlocksRev${oA}`,sA=iA[`INTERNAL_initializeStoreHooksRev${oA}`],lA=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(oA>=4)for(const[e,t]of lA)if(iA[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const uA={};lA.forEach(([e,t],n)=>{uA[`INTERNAL_KEY_${e}`]=oA>=4?t:n});const{INTERNAL_KEY_mountedMap:cA,INTERNAL_KEY_changedAtoms:dA,INTERNAL_KEY_storeHooks:pA,INTERNAL_KEY_ensureAtomState:fA,INTERNAL_KEY_flushCallbacks:hA,INTERNAL_KEY_recomputeInvalidatedAtoms:mA,INTERNAL_KEY_readAtomState:gA,INTERNAL_KEY_invalidateDependents:bA,INTERNAL_KEY_writeAtomState:vA,INTERNAL_KEY_mountDependencies:yA,INTERNAL_KEY_setAtomStateValueOrPromise:xA}=uA,SA=iA[aA],wA=new WeakMap;function CA(e){const t=$g(()=>[]),n=$g(function(e){const[r,o,i]=e(t);i.has(n)&&(r.forEach(e),++o.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=(e=>{const t=SA(e);let n=wA.get(t);return n||(n=Array.isArray(t)?[]:{},lA.forEach(([e,r],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[o],enumerable:!0};Object.defineProperty(n,o,i),Object.defineProperty(n,r,i)}),wA.set(t,n)),n})(e),o=r[cA],i=r[dA],a=sA(r[pA]),s=r[fA],l=r[hA],u=r[mA],c=r[gA],d=r[bA],p=r[vA],f=r[yA],h=r[xA],m=new Set;let g,b=0,v=!1,y=!1,x=!1;function S(){if(b)return;m.clear();let t=!0;const w=i=>{if(x)return e.get(i);if(i===n){const t=s(r,e,i);if(!lg(t)){if(!ag(i))throw new Error("no atom init");h(r,e,i,i.init)}return ug(t)}const a=c(r,e,i);try{return ug(a)}finally{C.d.set(i,a.n),o.get(i)?.t.add(n),t?m.add(i):o.has(i)&&(f(r,e,n),u(r,e),l(r,e))}};w.peek=e.get;const E=(o,...c)=>{const m=s(r,e,o);try{if(++b,o===n){if(!ag(o))throw new Error("atom not writable");const t=m.n,n=c[0];return h(r,e,o,n),f(r,e,o),void(t!==m.n&&(i.add(o),a.c?.(o),d(r,e,o)))}return p(r,e,o,c)}finally{t||(u(r,e),l(r,e)),--b}};E.recurse=(t,...o)=>{if(x){if(nA())throw new Error("set.recurse is not allowed in cleanup")}else try{return v=!0,f(r,e,n),E(t,...o)}finally{u(r,e),v=!1,y&&(y=!1,S())}};try{g?.();const e=n.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!b)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{C.d.set(t,s(r,e,t).n)}),f(r,e,n),u(r,e)}}const w=function(e,t){let n=EA.get(e);n||(n=new Set,EA.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),C=s(r,e,n);C.v=void 0,Object.assign(e.get(t),[m,C,o]),a.c.add(n,function(){i.delete(n)}),a.m.add(n,function(){w.add(S),g&&w.delete(g)}),a.u.add(n,function(){w.delete(S),g&&w.add(g)}),a.c.add(n,function(){v?y=!0:w.add(S)})},nA()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const EA=new WeakMap;const RA=async(e,t,n)=>{if("dimension"===e.type)if(e.isAlternative)try{await t.moveDimensionFromAlternative(e.id)}catch(t){n.error({msg:`Failed to move dimension ${e.id} from alternative`,payload:t})}else try{await t.moveDimensionToAlternative(e.id)}catch(t){n.error({msg:`Failed to move dimension ${e.id} to alternative`,payload:t})}if("measure"===e.type)if(e.isAlternative)try{await t.moveMeasureFromAlternative(e.id)}catch(t){n.error({msg:`Failed to move measure ${e.id} from alternative`,payload:t})}else try{await t.moveMeasureToAlternative(e.id)}catch(t){n.error({msg:`Failed to move measure ${e.id} to alternative`,payload:t})}},AA=e=>{const{items:t,handler:n,model:r,handlerQueue:o,logToSentry:i}=e;void 0!==n&&void 0!==r&&o&&o.add(async()=>{for(const e of t)await RA(e,n,i)})},IA=$g(),MA=$g(),kA=$g(),DA=$g(e=>e(kA)?.translate??(e=>e)),PA=$g(e=>t=>e(kA)?.getBooleanFlag(t,!1)??!1),TA=$g(""),qA=$g(e=>{const t=e(TA).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)});class OA{#e=[];#t=!1;#n=!1;#r;#o;#i;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#o=void 0,this.#i=void 0,this.#a=void 0}pause(){this.#o&&(clearTimeout(this.#a),this.#i?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#o=e,this.#i=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#i;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#i&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#i?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#o)await this.#o;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const LA=$g(null),NA=CA((e,t)=>{const n=e(IA),r=e(MA),o=new OA({onQueueCompleted:async()=>{if(!n||!r)return;const e=r.properties.qHyperCubeDef,t=Date.now();e.qDimensions.length&&Object.assign(e.qDimensions[0],{patchTimeStamp:t}),e.qMeasures.length&&Object.assign(e.qMeasures[0],{patchTimeStamp:t}),await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(LA,o);const i=()=>{o.pause()},a=()=>{o.continue(500)},s=()=>{o.abort()};return n?.Invalidated?.bind(i),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{o.abort(),n?.Invalidated?.unbind(i),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),jA=e=>e.qDef?.cId,_A=(e=[])=>new Set(e.map(jA).filter(e=>void 0!==e)),zA=({effectiveActive:e,effectiveExcluded:t,currentKnown:n})=>{const r=_A(n),o=_A([...e,...t]),i=new Set,a=n.filter(e=>{const t=jA(e);return!(!t||o.has(t)||i.has(t))&&(i.add(t),!0)}),s=t.flatMap((e,t)=>{const n=jA(e);return void 0===n||r.has(n)?[]:[t]});return{kept:t.filter((e,t)=>!s.includes(t)),missing:a,removedIndexes:s}},FA=(e,t)=>{if(!("qHyperCubeDef"in t))return e;const n=e.qHyperCubeDef,r=t.qHyperCubeDef,o=n.qLayoutExclude?.qHyperCubeDef,i=r.qLayoutExclude?.qHyperCubeDef,a=zA({effectiveActive:n.qDimensions??[],effectiveExcluded:o?.qDimensions??[],currentKnown:[...r.qDimensions??[],...i?.qDimensions??[]]}),s=zA({effectiveActive:n.qMeasures??[],effectiveExcluded:o?.qMeasures??[],currentKnown:[...r.qMeasures??[],...i?.qMeasures??[]]});if(![a,s].some(({missing:e,removedIndexes:t})=>e.length>0||t.length>0))return e;const l=[...a.kept,...a.missing],u=[...s.kept,...s.missing],c=((e,t)=>{if(!e)return;const n=new Set(t),r=Object.entries(e).filter(([e])=>n.has(e)).sort((e,t)=>e[1]-t[1]).map(([e])=>e),o=new Set(r),i=[...n].filter(e=>!o.has(e));return Object.fromEntries([...r,...i].map((e,t)=>[e,t]))})(n.qLayoutExclude?.allColumnOrder,[..._A(n.qDimensions??[]),..._A(n.qMeasures??[]),..._A(l),..._A(u)]);return{...e,qHyperCubeDef:{...n,qLayoutExclude:{...n.qLayoutExclude,...c&&{allColumnOrder:c},qHyperCubeDef:{...n.qLayoutExclude?.qHyperCubeDef,qDimensions:l,qMeasures:u}}}}},$A=e=>7005!==e.qError?.qErrorCode,BA=new WeakMap,HA={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},VA=ZR($g(async e=>{const t=e(IA),n=e(bb);if(t){if(BA.has(t))return BA.get(t);try{const e=await t.app.createSessionObject(HA);return BA.set(t,e),e}catch(e){return void n.error({msg:"Error creating alternative layout model",payload:e})}}})),WA=$g(null),UA=$g(),GA=CA((e,t)=>{const n=e(IA),r=e(VA),o=e(bb),i=e(PA),a=e(MA);let s=0,l=!1;if(!n||!r)return;const u=async()=>{s++;try{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const o=structuredClone(await n.getEffectiveProperties()),s=i("VNA-760-show-added-columns-exploration")?FA(o,await n.getProperties()):o;await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qMeasures??[])}]);const l=await r.getLayout();s!==o&&a?.setProperties(structuredClone(s)),t(UA,{layout:structuredClone(e),properties:s,altLayout:structuredClone(l)}),t(WA,null)}catch(e){o.error({msg:"Failed to synchronize table layout",payload:e})}finally{s--,0===s&&l&&(l=!1,c())}},c=async()=>{if(s>0)return void(l=!0);const e=await r.getLayout();t(UA,t=>({...t,altLayout:structuredClone(e)}))};return u(),n.Invalidated.bind(u),r.Invalidated.bind(c),()=>{n.Invalidated.unbind(u),r.Invalidated.unbind(c)}}),KA=$g(e=>e(UA)?.layout),YA=$g(e=>e(UA)?.altLayout),XA=$g(e=>e(UA)?.properties),JA=$g(e=>void 0===e(KA)||void 0===e(XA)),ZA=$g(e=>{const t=e(UA)?.layout;return t?.qHyperCube.qDimensionInfo.filter($A)??[]}),QA=$g(e=>{const t=e(UA)?.layout;return t?.qHyperCube.qMeasureInfo.filter($A)??[]}),eI=$g(e=>{const t=[...e(ZA),...e(QA)].map(e=>e.cId);return new Set(t)}),tI=$g(new Set),nI=$g(new Set),rI=$g(e=>{const t=e(tI),n=e(nI);return e(eI).difference(n).union(t)}),oI=CA((e,t)=>{e(eI),t(tI,new Set),t(nI,new Set)}),iI=$g(e=>e(rI),(e,t,n)=>{if("string"!=typeof n.id)return;const r=e(rI).has(n.id),o=new Set(e(nI)),i=new Set(e(tI));r?(o.add(n.id),i.delete(n.id)):(i.add(n.id),o.delete(n.id)),t(nI,o),t(tI,i),AA({items:[n],handler:e(MA),model:e(IA),handlerQueue:e(LA),logToSentry:e(bb)})}),aI=({props:e,children:t})=>(eA([[IA,e.args.model],[kA,e.args.apis],[MA,e.args.handler]]),Qg(GA),Qg(NA),Qg(oI),t);function sI(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function lI(e){return"write"in e}const uI="INTERNAL_getBuildingBlocksRev";var cI;const dI=Number(null==(cI=Object.keys(_g).find(e=>e.startsWith(uI)))?void 0:cI.slice(29));if(Number.isNaN(dI))throw new Error("jotai-compat: unsupported jotai internals revision");const pI=_g,fI=`INTERNAL_getBuildingBlocksRev${dI}`,hI=pI[`INTERNAL_buildStoreRev${dI}`];const mI=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(dI>=4)for(const[e,t]of mI)if(pI[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const gI={};mI.forEach(([e,t],n)=>{gI[e]=dI>=4?t:n});const{atomStateMap:bI,mountedMap:vI,invalidatedAtoms:yI,changedAtoms:xI,mountCallbacks:SI,unmountCallbacks:wI,storeHooks:CI,atomRead:EI,atomWrite:RI,atomOnInit:AI,atomOnMount:II,ensureAtomState:MI,flushCallbacks:kI,recomputeInvalidatedAtoms:DI,readAtomState:PI,invalidateDependents:TI,writeAtomState:qI,mountDependencies:OI,mountAtom:LI,unmountAtom:NI,setAtomStateValueOrPromise:jI,storeGet:_I,storeSet:zI,storeSub:FI,enhanceBuildingBlocks:$I,abortHandlersMap:BI,registerAbortHandler:HI,abortPromise:VI,storeEpochHolder:WI}=gI,UI=pI[fI],GI=new WeakMap,KI=new WeakMap,YI={},{read:XI,write:JI}=$g(null);function ZI(e,t,n){const[r,o,i,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=o.get(t);return r||(r=[nM(e,t,n),n],o.set(t,r)),r}const l=n??YI;let u=i.get(l);u||(u=new WeakMap,i.set(l,u));let c=u.get(t);if(!c){const[r,o]=a?ZI(a,t,n):[t];c=[t.read===XI?r:nM(e,t,o),o],u.set(t,c)}return c}function QI(e){for(const t of e[5])t()}function eM(e,t,n,r,o){if(n.read===XI&&lI(n)&&lI(t)&&n.write!==JI&&e!==r){const{write:i}=n;return t.write=tM(e,n.write.bind(n),r,o),()=>{t.write=i}}}function tM(e,t,n,r=n){return function(o,i,...a){return t(function(t){const[r]=ZI(e,t,n);return o(r)},function(t,...o){const[a]=ZI(e,t,n),s=eM(e,a,t,n,r);try{return i(a,...o)}finally{null==s||s()}},...a)}}function nM(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const o=Object.getPrototypeOf(t),i=Object.create(o,r);return i.read!==XI&&(i.read=function(e,t,n){return function(r,o){return t(function(t){const[o]=ZI(e,t,n);return r(o)},o)}}(e,t.read.bind(t),n)),lI(i)&&lI(t)&&i.write!==JI&&(i.write=tM(e,t.write.bind(t),n)),i}function rM({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const o=new WeakSet(e),i=KI.get(n),a=(null==i?void 0:i[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,i,new Set,void 0],l=s[0],u=s[5],c=function(e){const t=e[3],n=oM((e=>{const t=UI(e);let n=GI.get(t);return n||(n=Array.isArray(t)?[]:{},mI.forEach(([e,r],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[o],enumerable:!0};Object.defineProperty(n,o,i),Object.defineProperty(n,r,i)}),GI.set(t,n)),n})(t)),r=n,o=r[gI.storeGet],i=r[gI.storeSet],a=r[gI.storeSub],s={};let l,u;return r[gI.storeGet]=m(o),r[gI.storeSet]=f,r[gI.storeSub]=m(a),n[gI.enhanceBuildingBlocks]=function(e){return l??(l=g(e[gI.atomStateMap],c)),u??(u=Object.assign(oM(e),{...e,[gI.atomStateMap]:l,[gI.mountedMap]:g(e[gI.mountedMap],d),[gI.invalidatedAtoms]:g(e[gI.invalidatedAtoms]),[gI.changedAtoms]:b(e[gI.changedAtoms]),[gI.mountCallbacks]:e[gI.mountCallbacks],[gI.unmountCallbacks]:e[gI.unmountCallbacks],[gI.storeHooks]:y(e[gI.storeHooks]),[gI.atomRead]:m(e[gI.atomRead]),[gI.atomWrite]:m(e[gI.atomWrite]),[gI.atomOnInit]:m(e[gI.atomOnInit]),[gI.atomOnMount]:m(e[gI.atomOnMount]),[gI.ensureAtomState]:p(l,e[gI.ensureAtomState]),[gI.flushCallbacks]:(t,...r)=>e[gI.flushCallbacks](n,...r),[gI.recomputeInvalidatedAtoms]:(t,...r)=>e[gI.recomputeInvalidatedAtoms](n,...r),[gI.readAtomState]:m(e[gI.readAtomState]),[gI.invalidateDependents]:m(e[gI.invalidateDependents]),[gI.writeAtomState]:m(e[gI.writeAtomState]),[gI.mountDependencies]:m(e[gI.mountDependencies]),[gI.mountAtom]:m(e[gI.mountAtom]),[gI.unmountAtom]:m(e[gI.unmountAtom]),[jI]:m(e[jI]),[gI.storeGet]:m(e[gI.storeGet]),[gI.storeSet]:m(e[gI.storeSet]),[gI.storeSub]:m(e[gI.storeSub]),[gI.enhanceBuildingBlocks]:()=>e})),u},function(e){if(dI<4){const t=e?Object.values(e):[];return hI(...t)}const t=Array.isArray(e)?Object.fromEntries(mI.map(([t,n],r)=>[n,e[r]])):e;return hI(t)}(n);function c(t){const n=new WeakMap;return function(r){let o=n.get(r);if(o)return o;const i=t(r);if(!i)return;let a,s;return o=new Proxy(i,{get:(t,n)=>"d"===n?a??(a=g(i.d,function(t){return n=>t(ZI(e,n)[0])})):"p"===n?s??(s=b(i.p)):Reflect.get(i,n)}),n.set(r,o),o}}function d(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const o=e(n);return o?(r={...o,d:b(o.d),t:b(o.t),get u(){return o.u},set u(e){o.u=e}},t.set(n,r),r):void 0}}function p(e,t){const n=m(t);return function(t,r,o){const i=e.get(o);if(i)return i;const a=n(t,r,o);return e.set(o,a),e.get(o)}}function f(t,n,r,...o){const[a,s]=ZI(e,r),l=eM(e,a,r,s,e);try{return i(t,n,a,...o)}finally{null==l||l()}}function h(t,n){return function(r,...o){const[i]=ZI(e,r);return(n?n(t):t)(i,...o)}}function m(t){return function(r,o,i,...a){const[s]=ZI(e,i);return t(n,o,s,...a)}}function g(e,t){const n={get:h(e.get.bind(e),t),set:h(e.set.bind(e)),has:h(e.has.bind(e)),delete:h(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function b(t){return{get size(){return t.size},add:h(t.add.bind(t)),has:h(t.has.bind(t)),delete:h(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(h(e)),*[Symbol.iterator](){for(const n of t)yield ZI(e,n)[0]}}}function v(t){if(!t)return;const n=h(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[o]=ZI(e,n);return t.add(o,r)},n}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>s[t]??(s[t]=v(e[t])),set(n){delete s[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:r}),KI.set(c,s);for(const t of new Set(e))l.set(t,[nM(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[nM(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!o.has(t)&&l.delete(t):l.set(t,[nM(s,t,s),s])});u.add(t)}return c}function oM(e){return Array.isArray(e)?[...e]:{...e}}const iM=function(e,t){return function(n){const{atoms:r=[],atomFamilies:o=[],children:i,scope:a,name:s}=n,l=t(),u=Array.from(r,e=>Array.isArray(e)?e[0]:e);function c(){return[a??rM({atoms:u,atomFamilies:o,parentStore:l,name:s}),function(e){return l!==e.parentStore||!sI(u,e.atoms)||!sI(o,e.atomFamilies)||a!==e.providedScope}]}const[[d,p],f]=k(c);if(p({atoms:u,atomFamilies:o,parentStore:l,providedScope:a})){const e=KI.get(d);e&&QI(e),f(c)}return eA(Array.from(r).filter(Array.isArray),{store:d}),q(()=>{const e=KI.get(d);return()=>{e&&QI(e)}},[d]),C(e,{store:d,children:i})}}(Gg,Ug);var aM=Object.defineProperty,sM=Object.defineProperties,lM=Object.getOwnPropertyDescriptors,uM=Object.getOwnPropertySymbols,cM=Object.prototype.hasOwnProperty,dM=Object.prototype.propertyIsEnumerable,pM=(e,t,n)=>t in e?aM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fM=(e,t)=>{for(var n in t||(t={}))cM.call(t,n)&&pM(e,n,t[n]);if(uM)for(var n of uM(t))dM.call(t,n)&&pM(e,n,t[n]);return e},hM=(e,t)=>sM(e,lM(t));function mM(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function gM(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function bM(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function vM(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(bM(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const u=Object.entries(e);let c,d,p=-1,f=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(c=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&bM(i)){const r=null==i.initialGroup?void 0:gM(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:gM(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return hM(fM({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return hM(fM({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=gM(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==c||null==d||c===d&&p===f){if(null!=c&&c===d&&p===f&&bM(i)){const t=null==i.group?void 0:gM(e,i.group),r=null!=i.group&&t!==c,o=i.index!==p;if(r||o){const r=null==i.group?c:t;if(null!=r){if(c===r)return hM(fM({},e),{[c]:n(e[c],p,i.index)});const t=e[c][p];return hM(fM({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(c===d)return hM(fM({},e),{[c]:n(e[c],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[c][p];return hM(fM({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,mM)}function yM(e,t){let n=null;const r=new Map,o=new Set;function i(o){let s;if(void 0===t)s=r.get(o);else for(const[e,n]of r)if(t(e,o)){s=n;break}if(void 0!==s){if(!n?.(s[1],o))return s[0];i.remove(o)}const l=e(o);return r.set(o,[l,Date.now()]),a("CREATE",o,l),l}function a(e,t,n){for(const r of o)r({type:e,param:t,atom:n})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>r.keys(),i.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[o]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,o);break}},i.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,o]]of r)n(o,e)&&(r.delete(e),a("REMOVE",e,t))},i}const xM=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,SM=$g(),wM=$g(e=>e(SM)?.numberOfSections??0),CM=$g(e=>e(SM)?.numberOfItemsInSection??[]),EM=$g(e=>e(SM)?.keyExtractor??xM),RM=$g(e=>e(SM)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),AM=$g(e=>e(SM)?.onDragEnd),IM=$g(e=>e(SM)?.onDragOver),MM=$g(e=>e(SM)?.itemRenderer),kM=$g(e=>e(SM)?.headerRenderer),DM=$g(e=>e(SM)?.dragOverlayRenderer),PM=$g(e=>e(SM)?.onClick),TM=$g(e=>{const t=e(wM),n=e(CM),r=e(EM),o={};for(let e=0;e<t;e++)o[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return o}),qM=$g(null),OM=$g(e=>e(qM),(e,t,n)=>{if(null===n)return void t(qM,null);const r=e(qM);t(qM,{...r,...n})}),LM=yM(e=>$g(null,(t,n,r)=>{let o;"over"===e?o=t(IM):"end"===e&&(o=t(AM),n(OM,null));const{source:i,target:a}=r.operation;if("start"===e)return void n(OM,{id:i.id,startSection:i.data.sectionKey,startIndex:i.data.itemIndex,startSectionIndex:i.data.sectionIndex});if(null===a)return void n(OM,{toIndex:void 0,toSectionIndex:void 0});const s=i.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=vM(t(TM),r)[a.data.sectionIndex].indexOf(i.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(OM)?.startIndex;n(OM,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}o?.({id:i.id,toIndex:l,toSection:a.data.sectionKey,fromSection:i.data.sectionKey,startSection:t(OM)?.startSection??i.data.sectionKey,event:r})})),NM=[SM,wM,CM,EM,RM,AM,MM,kM,PM,OM],jM=[LM],_M=({props:e,children:t})=>{const n=eb(SM);return j(()=>{n(e)},[e,n]),t};var zM=Symbol.for("preact-signals");function FM(){if(UM>1)UM--;else{var e,t=!1;for(!function(){var e=XM;for(XM=void 0;void 0!==e;){var t=e.S;if(t.v===e.v)for(var n=t.t;void 0!==n;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}}();void 0!==WM;){var n=WM;for(WM=void 0,GM++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&tk(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(GM=0,UM--,t)throw e}}function $M(e){if(UM>0)return e();YM=++KM,UM++;try{return e()}finally{FM()}}var BM,HM=void 0;function VM(e){var t=HM,n=BM;HM=void 0,BM=void 0;try{return e()}finally{HM=t,BM=n}}var WM=void 0,UM=0,GM=0,KM=0,YM=0,XM=void 0,JM=0;function ZM(e){if(void 0!==HM){var t=e.n;if(void 0===t||t.t!==HM)return t={i:0,S:e,p:HM.s,n:void 0,t:HM,e:void 0,x:void 0,r:t},void 0!==HM.s&&(HM.s.n=t),HM.s=t,e.n=t,32&HM.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=HM.s,t.n=void 0,HM.s.n=t,HM.s=t),t}}function QM(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function ek(e,t){return new QM(e,t)}function tk(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function nk(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function rk(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function ok(e,t){QM.call(this,void 0,t),this.x=e,this.s=void 0,this.g=JM-1,this.f=4}function ik(e,t){return new ok(e,t)}function ak(e){var t=e.m;if(e.m=void 0,"function"==typeof t){UM++;var n=HM;HM=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,sk(e),t}finally{HM=n,FM()}}}function sk(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ak(e)}function lk(e){if(HM!==this)throw new Error("Out-of-order effect");rk(this),HM=e,this.f&=-2,8&this.f&&sk(this),FM()}function uk(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name,BM&&BM.push(this)}function ck(e,t){var n=new uk(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}QM.prototype.brand=zM,QM.prototype.h=function(){return!0},QM.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:VM(function(){var e;null==(e=t.W)||e.call(t)}))},QM.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&VM(function(){var e;null==(e=t.Z)||e.call(t)}))}},QM.prototype.subscribe=function(e){var t=this;return ck(function(){var n=t.value;VM(function(){return e(n)})},{name:"sub"})},QM.prototype.valueOf=function(){return this.value},QM.prototype.toString=function(){return this.value+""},QM.prototype.toJSON=function(){return this.value},QM.prototype.peek=function(){var e=this;return VM(function(){return e.value})},Object.defineProperty(QM.prototype,"value",{get:function(){var e=ZM(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(GM>100)throw new Error("Cycle detected");!function(e){0!==UM&&0===GM&&e.l!==YM&&(e.l=YM,XM={S:e,v:e.v,i:e.i,o:XM})}(this),this.v=e,this.i++,JM++,UM++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{FM()}}}}),ok.prototype=new QM,ok.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===JM)return!0;if(this.g=JM,this.f|=1,this.i>0&&!tk(this))return this.f&=-2,!0;var e=HM;try{nk(this),HM=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return HM=e,rk(this),this.f&=-2,!0},ok.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}QM.prototype.S.call(this,e)},ok.prototype.U=function(e){if(void 0!==this.t&&(QM.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},ok.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(ok.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ZM(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),uk.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},uk.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ak(this),nk(this),UM++;var e=HM;return HM=this,lk.bind(this,e)},uk.prototype.N=function(){2&this.f||(this.f|=2,this.u=WM,WM=this)},uk.prototype.d=function(){this.f|=8,1&this.f||sk(this)},uk.prototype.dispose=function(){this.d()};var dk,pk,fk,hk,mk,gk,bk,vk,yk,xk,Sk,wk,Ck,Ek,Rk,Ak,Ik,Mk,kk,Dk,Pk=Object.create,Tk=Object.defineProperty,qk=Object.defineProperties,Ok=Object.getOwnPropertyDescriptor,Lk=Object.getOwnPropertyDescriptors,Nk=Object.getOwnPropertySymbols,jk=Object.prototype.hasOwnProperty,_k=Object.prototype.propertyIsEnumerable,zk=e=>{throw TypeError(e)},Fk=(e,t,n)=>t in e?Tk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$k=(e,t)=>Tk(e,"name",{value:t,configurable:!0}),Bk=["class","method","getter","setter","accessor","field","value","get","set"],Hk=e=>void 0!==e&&"function"!=typeof e?zk("Function expected"):e,Vk=(e,t,n,r,o)=>({kind:Bk[e],name:t,metadata:r,addInitializer:e=>n._?zk("Already initialized"):o.push(Hk(e||null))}),Wk=(e,t)=>{return Fk(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},Uk=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},Gk=(e,t,n,r,o,i)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=Bk[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&Ok(d<4?o:{get[n](){return Xk(this,i)},set[n](e){return Zk(this,i,e)}},n));d?f&&d<4&&$k(i,(d>2?"set ":d>1?"get ":"")+n):$k(o,n);for(var y=r.length-1;y>=0;y--)u=Vk(d,n,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>Yk(o,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?Xk:Qk)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>Zk(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?Hk(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?zk("Object expected"):(Hk(a=s.get)&&(v.get=a),Hk(a=s.set)&&(v.set=a),Hk(a=s.init)&&g.unshift(a));return d||Wk(e,o),v&&Tk(o,n,v),f?4^d?i:v:o},Kk=(e,t,n)=>t.has(e)||zk("Cannot "+n),Yk=(e,t)=>Object(t)!==t?zk('Cannot use the "in" operator on this value'):e.has(t),Xk=(e,t,n)=>(Kk(e,t,"read from private field"),n?n.call(e):t.get(e)),Jk=(e,t,n)=>t.has(e)?zk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Zk=(e,t,n,r)=>(Kk(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Qk=(e,t,n)=>(Kk(e,t,"access private method"),n);function eD(e,t){if(t){let n;return ik(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return ik(e)}function tD(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!tD(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=n.some(n=>!tD(e[n],t[n]));return!o}return!1}function nD({get:e},t){return{init:e=>ek(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function rD(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=eD(e.bind(this)),n.set(this,t)),t.value}}function oD(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>qk(e,Lk(t)))(((e,t)=>{for(var n in t||(t={}))jk.call(t,n)&&Fk(e,n,t[n]);if(Nk)for(var n of Nk(t))_k.call(t,n)&&Fk(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function iD(...e){const t=e.map(e=>ck(e));return()=>t.forEach(e=>e())}gk=[nD],mk=[nD],hk=[nD],fk=[oD()],pk=[oD()],dk=[oD()];var aD,sD=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Uk(bk,5,this),Jk(this,wk),Jk(this,vk,Uk(bk,8,this)),Uk(bk,11,this),Jk(this,Ck,Uk(bk,12,this)),Uk(bk,15,this),Jk(this,Ik,Uk(bk,16,this)),Uk(bk,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Xk(this,wk,kk)}get initial(){return Xk(this,wk,xk)}get previous(){return Xk(this,wk,Rk)}set current(e){const t=VM(()=>Xk(this,wk,kk));e&&t&&this.equals(t,e)||$M(()=>{Xk(this,wk,xk)||Zk(this,wk,e,Sk),Zk(this,wk,t,Ak),Zk(this,wk,e,Dk)})}reset(e=this.defaultValue){$M(()=>{Zk(this,wk,void 0,Ak),Zk(this,wk,e,Sk),Zk(this,wk,e,Dk)})}};function lD(e){return VM(()=>{const t={};for(const n in e)t[n]=e[n];return t})}bk=[,,,Pk(null)],vk=new WeakMap,wk=new WeakSet,Ck=new WeakMap,Ik=new WeakMap,yk=Gk(bk,20,"#initial",gk,wk,vk),xk=yk.get,Sk=yk.set,Ek=Gk(bk,20,"#previous",mk,wk,Ck),Rk=Ek.get,Ak=Ek.set,Mk=Gk(bk,20,"#current",hk,wk,Ik),kk=Mk.get,Dk=Mk.set,Gk(bk,2,"current",fk,sD),Gk(bk,2,"initial",pk,sD),Gk(bk,2,"previous",dk,sD),Wk(bk,sD);aD=new WeakMap;var uD,cD,dD,pD,fD,hD=Object.create,mD=Object.defineProperty,gD=Object.getOwnPropertyDescriptor,bD=Object.getOwnPropertySymbols,vD=Object.prototype.hasOwnProperty,yD=Object.prototype.propertyIsEnumerable,xD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),SD=e=>{throw TypeError(e)},wD=Math.pow,CD=(e,t,n)=>t in e?mD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ED=["class","method","getter","setter","accessor","field","value","get","set"],RD=e=>void 0!==e&&"function"!=typeof e?SD("Function expected"):e,AD=(e,t,n,r,o)=>({kind:ED[e],name:t,metadata:r,addInitializer:e=>n._?SD("Already initialized"):o.push(RD(e||null))}),ID=(e,t,n,r,o,i)=>{for(var a,s,l,u,c=7&t,d=ED[c+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,gD(o,n)),h=r.length-1;h>=0;h--)(l=AD(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,RD(a)&&(f[d]=a);return f&&mD(o,n,f),o},MD=(e,t,n)=>t.has(e)||SD("Cannot "+n),kD=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},DD=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:o,width:i,height:a,scale:s}=this,l=new e(o+t,r+n,i,a);return l.scale=((e,t)=>{for(var n in t||(t={}))vD.call(t,n)&&CD(e,n,t[n]);if(bD)for(var n of bD(t))yD.call(t,n)&&CD(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:o,bottom:i}=this;return{width:e,height:t,left:n,top:r,right:o,bottom:i}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new kD((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:o,height:i}=this;return n===t.left&&r===t.top&&o===t.width&&i===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:o}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=o}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:o}){return new e(n,t,r,o)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],o="x"===t?e.left:e.top,i="x"===t?e.width:e.height;return"start"==r?o:"end"==r?o+i:o+i/2};return kD.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var PD,TD=class extends(dD=sD,cD=[rD],uD=[rD],dD){constructor(e){var t,n,r;super(kD.from(e),(e,t)=>kD.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(fD,5,this),t=this,r=0,(n=pD).has(t)?SD("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return kD.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=kD.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(MD(a=this,s=pD,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);$M(()=>{((e,t,n)=>{MD(e,t,"write to private field"),t.set(e,n)})(this,pD,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(kD.from(e)),this.velocity={x:0,y:0}}};function qD({x:e,y:t},n){const r=Math.abs(e),o=Math.abs(t);return"number"==typeof n?Math.sqrt(wD(r,2)+wD(o,2))>n:"x"in n&&"y"in n?r>n.x&&o>n.y:"x"in n?r>n.x:"y"in n&&o>n.y}fD=(e=>{var t;return[,,,hD(null!=(t=null==e?void 0:e[xD("metadata")])?t:null)]})(dD),pD=new WeakMap,ID(fD,2,"delta",cD,TD),ID(fD,2,"direction",uD,TD),PD=fD,CD(TD,xD("metadata"),PD[3]);var OD,LD,ND,jD,_D=(e=>(e.Horizontal="x",e.Vertical="y",e))(_D||{}),zD=Object.values(_D),FD=Object.create,$D=Object.defineProperty,BD=Object.defineProperties,HD=Object.getOwnPropertyDescriptor,VD=Object.getOwnPropertyDescriptors,WD=Object.getOwnPropertySymbols,UD=Object.prototype.hasOwnProperty,GD=Object.prototype.propertyIsEnumerable,KD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),YD=e=>{throw TypeError(e)},XD=(e,t,n)=>t in e?$D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JD=(e,t)=>{for(var n in t||(t={}))UD.call(t,n)&&XD(e,n,t[n]);if(WD)for(var n of WD(t))GD.call(t,n)&&XD(e,n,t[n]);return e},ZD=(e,t)=>BD(e,VD(t)),QD=(e,t)=>$D(e,"name",{value:t,configurable:!0}),eP=(e,t)=>{var n={};for(var r in e)UD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&WD)for(var r of WD(e))t.indexOf(r)<0&&GD.call(e,r)&&(n[r]=e[r]);return n},tP=e=>{var t;return[,,,FD(null!=(t=null==e?void 0:e[KD("metadata")])?t:null)]},nP=["class","method","getter","setter","accessor","field","value","get","set"],rP=e=>void 0!==e&&"function"!=typeof e?YD("Function expected"):e,oP=(e,t,n,r,o)=>({kind:nP[e],name:t,metadata:r,addInitializer:e=>n._?YD("Already initialized"):o.push(rP(e||null))}),iP=(e,t)=>XD(t,KD("metadata"),e[3]),aP=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},sP=(e,t,n,r,o,i)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=nP[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&HD(d<4?o:{get[n](){return cP(this,i)},set[n](e){return pP(this,i,e)}},n));d?f&&d<4&&QD(i,(d>2?"set ":d>1?"get ":"")+n):QD(o,n);for(var y=r.length-1;y>=0;y--)u=oP(d,n,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>uP(o,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?cP:fP)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>pP(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?rP(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?YD("Object expected"):(rP(a=s.get)&&(v.get=a),rP(a=s.set)&&(v.set=a),rP(a=s.init)&&g.unshift(a));return d||iP(e,o),v&&$D(o,n,v),f?4^d?i:v:o},lP=(e,t,n)=>t.has(e)||YD("Cannot "+n),uP=(e,t)=>Object(t)!==t?YD('Cannot use the "in" operator on this value'):e.has(t),cP=(e,t,n)=>(lP(e,t,"read from private field"),n?n.call(e):t.get(e)),dP=(e,t,n)=>t.has(e)?YD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pP=(e,t,n,r)=>(lP(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fP=(e,t,n)=>(lP(e,t,"access private method"),n);function hP(e,t){return{plugin:e,options:t}}function mP(e){return t=>hP(e,t)}function gP(e){return"function"==typeof e?{plugin:e,options:void 0}:e}OD=[nD];var bP=class{constructor(e,t){this.manager=e,this.options=t,dP(this,ND,aP(LD,8,this,!1)),aP(LD,11,this),dP(this,jD,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return VM(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=ck(e.bind(this));return cP(this,jD).add(t),t}destroy(){cP(this,jD).forEach(e=>e())}static configure(e){return hP(this,e)}};LD=tP(null),ND=new WeakMap,jD=new WeakMap,sP(LD,4,"disabled",OD,bP,ND),iP(LD,bP);var vP,yP=class extends bP{},xP=class{constructor(e){this.manager=e,this.instances=new Map,dP(this,vP,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(gP).reduce((e,t)=>{const n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(const e of cP(this,vP))if(!n.includes(e)){if(e.prototype instanceof yP)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);pP(this,vP,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function SP(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}vP=new WeakMap;var wP,CP,EP,RP,AP,IP,MP,kP,DP,PP,TP,qP,OP=[],LP=class extends bP{constructor(e){super(e),dP(this,wP),dP(this,CP),this.computeCollisions=this.computeCollisions.bind(this),pP(this,CP,ek(OP)),this.destroy=iD(()=>{const e=this.computeCollisions(),t=VM(()=>this.manager.dragOperation.position.current);if(e!==OP){const e=cP(this,wP);if(pP(this,wP,t),e&&t.x==e.x&&t.y==e.y)return}else pP(this,wP,void 0);cP(this,CP).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){VM(()=>{e?cP(this,CP).value=this.computeCollisions():pP(this,wP,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:o,shape:i,status:a}=r;if(!a.initialized||!i)return OP;const s=[],l=[];for(const i of null!=e?e:n.droppables){if(i.disabled)continue;if(o&&!i.accepts(o))continue;const e=null!=t?t:i.collisionDetector;if(!e)continue;l.push(i),i.shape;const n=VM(()=>e({droppable:i,dragOperation:r}));n&&(null!=i.collisionPriority&&(n.priority=i.collisionPriority),s.push(n))}return 0===l.length?OP:(s.sort(SP),s)}get collisions(){return cP(this,CP).value}};wP=new WeakMap,CP=new WeakMap,AP=[nD],RP=[nD],EP=[nD];var NP=class e{constructor(e,t){dP(this,DP,aP(kP,8,this)),aP(kP,11,this),dP(this,PP),dP(this,TP,aP(kP,12,this)),aP(kP,15,this),dP(this,qP,aP(kP,16,this)),aP(kP,19,this);const{effects:n,id:r,data:o={},disabled:i=!1,register:a=!0}=e;let s=r;pP(this,PP,ek(r)),this.manager=t,this.data=o,this.disabled=i,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return s=e,null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=cP(this,PP).value;return null!=(n=null==(t=e.pendingIdChanges)?void 0:t.get(this))?n:r}set id(t){var n,r;t!==(null!=(r=null==(n=e.pendingIdChanges)?void 0:n.get(this))?r:cP(this,PP).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return fP(t=e,IP,MP).call(t)})),e.pendingIdChanges.set(this,t))}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};kP=tP(null),IP=new WeakSet,MP=function(){const e=NP.pendingIdChanges;NP.pendingIdChanges=null,e&&$M(()=>{for(const[t,n]of e)cP(t,PP).value=n})},DP=new WeakMap,PP=new WeakMap,TP=new WeakMap,qP=new WeakMap,sP(kP,4,"manager",AP,NP,DP),sP(kP,4,"data",RP,NP,TP),sP(kP,4,"disabled",EP,NP,qP),dP(NP,IP),iP(kP,NP),NP.pendingIdChanges=null;var jP,_P,zP,FP,$P,BP,HP,VP,WP,UP,GP,KP,YP,XP,JP,ZP,QP,eT,tT,nT,rT,oT,iT,aT,sT=NP,lT=class{constructor(){this.map=ek(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),o=()=>this.unregister(e,t);if(r===t)return o;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const i=new Map(n);for(const[r,o]of n)if(o===t&&r!==e){i.delete(r);break}i.set(e,t),this.map.value=i;const a=iD(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const o=new Map(n);o.delete(e),this.map.value=o}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},uT=class extends(HP=sT,BP=[nD],$P=[nD],FP=[nD],zP=[rD],_P=[rD],jP=[rD],HP){constructor(e,t){var n=e,{modifiers:r,type:o,sensors:i,plugins:a,effects:s}=n,l=eP(n,["modifiers","type","sensors","plugins","effects"]);super(ZD(JD({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const n of t){const{plugin:t}=gP(n);e.registry.plugins.register(t)}}]}}),t),aP(VP,5,this),dP(this,WP,aP(VP,8,this)),aP(VP,11,this),dP(this,UP,aP(VP,12,this)),aP(VP,15,this),dP(this,GP,aP(VP,16,this,this.isDragSource?"dragging":"idle")),aP(VP,19,this),this.type=o,this.sensors=i,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=gP(t);if(n.plugin===e)return n.options}}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};VP=tP(HP),WP=new WeakMap,UP=new WeakMap,GP=new WeakMap,sP(VP,4,"type",BP,uT,WP),sP(VP,4,"modifiers",$P,uT,UP),sP(VP,4,"status",FP,uT,GP),sP(VP,2,"isDropping",zP,uT),sP(VP,2,"isDragging",_P,uT),sP(VP,2,"isDragSource",jP,uT),iP(VP,uT);var cT=class extends(eT=sT,QP=[nD],ZP=[nD],JP=[nD],XP=[nD],YP=[nD],KP=[rD],eT){constructor(e,t){var n=e,{accept:r,collisionDetector:o,collisionPriority:i,type:a}=n;super(eP(n,["accept","collisionDetector","collisionPriority","type"]),t),aP(tT,5,this),dP(this,nT,aP(tT,8,this)),aP(tT,11,this),dP(this,rT,aP(tT,12,this)),aP(tT,15,this),dP(this,oT,aP(tT,16,this)),aP(tT,19,this),dP(this,iT,aP(tT,20,this)),aP(tT,23,this),dP(this,aT,aP(tT,24,this)),aP(tT,27,this),this.accept=r,this.collisionDetector=o,this.collisionPriority=i,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};tT=tP(eT),nT=new WeakMap,rT=new WeakMap,oT=new WeakMap,iT=new WeakMap,aT=new WeakMap,sP(tT,4,"accept",QP,cT,nT),sP(tT,4,"type",ZP,cT,rT),sP(tT,4,"collisionDetector",JP,cT,oT),sP(tT,4,"collisionPriority",XP,cT,iT),sP(tT,4,"shape",YP,cT,aT),sP(tT,2,"isDropTarget",KP,cT),iP(tT,cT);var dT=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},pT=class extends dT{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function fT(e,t=!0){let n=!1;return ZD(JD({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var hT,mT,gT,bT,vT,yT,xT,ST,wT,CT,ET=class extends yP{constructor(e){super(e);let t=[];this.destroy=iD(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:o}=n;if(n.isDisabled())return;if(sT.pendingIdChanges)return;const i=fT({collisions:o});if(r.dispatch("collision",i),i.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(o,t))return;t=o;const[a]=o;VM(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},RT=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(RT||{}),AT=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(AT||{});ST=[nD],xT=[rD],yT=[rD],vT=[rD],bT=[rD],gT=[rD],mT=[rD],hT=[rD];var IT=class{constructor(){aP(wT,5,this),dP(this,CT,aP(wT,8,this,"idle")),aP(wT,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializationPending(){return"initialization-pending"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};wT=tP(null),CT=new WeakMap,sP(wT,4,"value",ST,IT,CT),sP(wT,2,"current",xT,IT),sP(wT,2,"idle",yT,IT),sP(wT,2,"initializationPending",vT,IT),sP(wT,2,"initializing",bT,IT),sP(wT,2,"initialized",gT,IT),sP(wT,2,"dragging",mT,IT),sP(wT,2,"dropped",hT,IT),iP(wT,IT);var MT,kT=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return VM(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=fT({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return VM(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:o}=e;$M(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(o)});const i=fT({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",i),i.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&$M(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return VM(()=>{var t,n;const{dragOperation:r}=this.manager,{status:o,controller:i}=r;if(!o.dragging||!i||i.signal.aborted)return;const a=fT({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,o,i,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(i=null==(o=e.by)?void 0:o.y)?i:0)};r.position.current=l})})}stop(e={}){return VM(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:o}=r;if(!o||o.signal.aborted)return;let i;o.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=VM(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===o&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=ck(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return i=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),i?i.then(a).catch(()=>r.reset()):a()})}},DT=class extends bP{constructor(e,t){super(e,t),this.manager=e,this.options=t}},PT=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},TT=class{constructor(e){this.options=e,dP(this,MT)}set controller(e){pP(this,MT,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=cP(this,MT))||t.activate(e)}};MT=new WeakMap;var qT,OT,LT,NT,jT,_T,zT,FT,$T,BT,HT,VT,WT,UT,GT,KT,YT,XT,JT,ZT=class extends bP{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},QT=class{constructor(e){this.draggables=new lT,this.droppables=new lT,this.plugins=new xP(e),this.sensors=new xP(e),this.modifiers=new xP(e)}register(e,t){if(e instanceof uT)return this.draggables.register(e.id,e);if(e instanceof cT)return this.droppables.register(e.id,e);if(e.prototype instanceof ZT)return this.modifiers.register(e,t);if(e.prototype instanceof DT)return this.sensors.register(e,t);if(e.prototype instanceof bP)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof sT)return e instanceof uT?this.draggables.unregister(e.id,e):e instanceof cT?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof ZT)return this.modifiers.unregister(e);if(e.prototype instanceof DT)return this.sensors.unregister(e);if(e.prototype instanceof bP)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};$T=[rD],FT=[nD],zT=[nD],_T=[nD],jT=[nD],NT=[nD],LT=[rD],OT=[rD],qT=[rD];var eq=class{constructor(e){aP(WT,5,this),dP(this,BT),dP(this,HT),dP(this,VT,new sD(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new IT,dP(this,UT,aP(WT,8,this,!1)),aP(WT,11,this),dP(this,GT,aP(WT,12,this,null)),aP(WT,15,this),dP(this,KT,aP(WT,16,this,null)),aP(WT,19,this),dP(this,YT,aP(WT,20,this,null)),aP(WT,23,this),dP(this,XT,aP(WT,24,this,[])),aP(WT,27,this),this.position=new TD({x:0,y:0}),dP(this,JT,{x:0,y:0}),pP(this,BT,e)}get shape(){const{current:e,initial:t,previous:n}=cP(this,VT);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?cP(this,VT).current=e:cP(this,VT).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=cP(this,BT).registry.draggables.get(t);return n&&pP(this,HT,n),null!=(e=null!=n?n:cP(this,HT))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=cP(this,BT).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(ZD(JD({},this.snapshot()),{transform:n}));return pP(this,JT,n),n}snapshot(){return VM(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:cP(this,JT),shape:this.shape?lD(this.shape):null,position:lD(this.position),status:lD(this.status),canceled:this.canceled}))}reset(){$M(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,cP(this,VT).reset(),this.position.reset({x:0,y:0}),pP(this,JT,{x:0,y:0}),this.modifiers=[]})}};WT=tP(null),BT=new WeakMap,HT=new WeakMap,VT=new WeakMap,UT=new WeakMap,GT=new WeakMap,KT=new WeakMap,YT=new WeakMap,XT=new WeakMap,JT=new WeakMap,sP(WT,2,"shape",$T,eq),sP(WT,4,"canceled",FT,eq,UT),sP(WT,4,"activatorEvent",zT,eq,GT),sP(WT,4,"sourceIdentifier",_T,eq,KT),sP(WT,4,"targetIdentifier",jT,eq,YT),sP(WT,4,"modifiers",NT,eq,XT),sP(WT,2,"source",LT,eq),sP(WT,2,"target",OT,eq),sP(WT,2,"transform",qT,eq),iP(WT,eq);var tq={get rendering(){return Promise.resolve()}};function nq(e,t){return"function"==typeof e?e(t):null!=e?e:t}var rq=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=nq(n.plugins,[]),o=nq(n.sensors,[]),i=nq(n.modifiers,[]),a=null!=(t=n.renderer)?t:tq,s=new pT(this),l=new QT(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new kT(this),this.dragOperation=new eq(this),this.collisionObserver=new LP(this),this.plugins=[ET,...r],this.modifiers=i,this.sensors=o;const{destroy:u}=this,c=iD(()=>{var e,t,n;const r=VM(()=>this.dragOperation.modifiers),o=this.modifiers;for(const e of r)o.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=gP(e);return new t(this,n)}))?n:o});this.destroy=()=>{c(),u()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},oq=e=>{throw TypeError(e)},iq=(e,t,n)=>t.has(e)||oq("Cannot "+n),aq=(e,t,n)=>(iq(e,t,"read from private field"),t.get(e)),sq=(e,t,n)=>t.has(e)?oq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),lq=(e,t,n,r)=>(iq(e,t,"write to private field"),t.set(e,n),n),uq=(e,t,n)=>(iq(e,t,"access private method"),n);function cq(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function dq(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,o=(cq(n)?n.getKeyframes():[]).filter(t);o.length>0&&(r=[o[o.length-1],e])}return r}function pq(e){const{width:t,height:n,top:r,left:o,bottom:i,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:o,bottom:i,right:a}}function fq(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function hq(e){return"nodeType"in e}function mq(e){var t,n,r;return e?fq(e)?e:hq(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function gq(e){const{Document:t}=mq(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function bq(e){return!(!e||fq(e))&&(e instanceof mq(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function vq(e){return e instanceof mq(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function yq(e){return e?fq(e)?e.document:hq(e)?gq(e)?e:bq(e)||vq(e)?e.ownerDocument:document:document:document}function xq(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===o}function Sq(e,t=e.getBoundingClientRect(),n=0){var r,o,i,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(r=u.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!xq(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),o=n*(e.bottom-e.top),i=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+o),left:Math.max(l.left,e.left-i),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=c.visualViewport,f=null!=(o=null==p?void 0:p.offsetTop)?o:0,h=null!=(i=null==p?void 0:p.offsetLeft)?i:0,m=null!=(a=null==p?void 0:p.width)?a:c.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:c.innerHeight,b=n*g,v=n*m;return l={top:Math.max(l.top,f-b),right:Math.min(l.right,h+m+v),bottom:Math.min(l.bottom,f+g+b),left:Math.max(l.left,h-v),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function wq(e){return{x:e.clientX,y:e.clientY}}var Cq="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Eq(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...Eq(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const o=r.parent;o&&o.document&&o.document!==e&&n.push(...Eq(o.document,t))}}catch(e){}return n}function Rq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Aq(){var e,t;const n=Rq()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function Iq(e){return!(!e||!hq(e))&&e instanceof mq(e).ShadowRoot}function Mq(e){if(e&&hq(e)){let t=e.getRootNode();if(Iq(t))return t;if(t instanceof Document)return t}return yq(e)}function kq(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function Dq(e){return"value"in e}function Pq(e){return"CANVAS"===e.tagName}function Tq(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:o,top:i}=r.getBoundingClientRect();return Tq(e,{x:t-o,y:n-i})}}return r}var qq=new WeakMap;var Oq=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],o=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:i}=t,a=[e,t];e.addEventListener(n,r,i),this.entries.add(a),o.push(a)}const i=this.entries;return function(){for(const e of o){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o),i.delete(e)}}}};function Lq(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function Nq(e,t){const n=()=>performance.now();let r,o;return function(...i){const a=this;o?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,i),o=n()},t-(n()-o))):(e.apply(a,i),o=n())}}var jq,_q="undefined"!=typeof ResizeObserver?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},zq=class extends _q{constructor(e){super(t=>{aq(this,jq)?e(t,this):lq(this,jq,!0)}),sq(this,jq,!1)}};jq=new WeakMap;var Fq,$q,Bq,Hq,Vq,Wq,Uq,Gq,Kq,Yq,Xq,Jq=Array.from({length:100},(e,t)=>t/100),Zq=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,sq(this,Kq),this.disconnect=()=>{var e,t,n;lq(this,Uq,!0),null==(e=aq(this,Bq))||e.disconnect(),null==(t=aq(this,Hq))||t.disconnect(),aq(this,Vq).disconnect(),null==(n=aq(this,Wq))||n.remove()},sq(this,Fq,!0),sq(this,$q),sq(this,Bq),sq(this,Hq),sq(this,Vq),sq(this,Wq),sq(this,Uq,!1),sq(this,Gq,Nq(()=>{var e,t,n;const{element:r}=this;if(null==(e=aq(this,Hq))||e.disconnect(),aq(this,Uq)||!aq(this,Fq)||!r.isConnected)return;const o=null!=(t=r.ownerDocument)?t:document,{innerHeight:i,innerWidth:a}=null!=(n=o.defaultView)?n:window,s=r.getBoundingClientRect(),l=Sq(r,s),{top:u,left:c,bottom:d,right:p}=l,f=-Math.floor(u),h=-Math.floor(c),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(i-d)}px ${h}px`;this.boundingClientRect=s,lq(this,Hq,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:DD.intersectionRatio(n,Sq(r)))&&aq(this,Gq).call(this)},{threshold:Jq,rootMargin:m,root:o})),aq(this,Hq).observe(r),uq(this,Kq,Yq).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),lq(this,Fq,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=Sq(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const o=e.ownerDocument;(null==n?void 0:n.debug)&&(lq(this,Wq,document.createElement("div")),aq(this,Wq).style.background="rgba(0,0,0,0.15)",aq(this,Wq).style.position="fixed",aq(this,Wq).style.pointerEvents="none",o.body.appendChild(aq(this,Wq))),lq(this,Vq,new IntersectionObserver(t=>{var n,r;const o=t[t.length-1],{boundingClientRect:i,isIntersecting:a}=o,{width:s,height:l}=i,u=aq(this,Fq);lq(this,Fq,a),(s||l)&&(u&&!a?(null==(n=aq(this,Hq))||n.disconnect(),this.callback(null),null==(r=aq(this,Bq))||r.disconnect(),lq(this,Bq,void 0),aq(this,Wq)&&(aq(this,Wq).style.visibility="hidden")):aq(this,Gq).call(this),a&&!aq(this,Bq)&&(lq(this,Bq,new zq(aq(this,Gq))),aq(this,Bq).observe(e)))},{threshold:Jq,root:o})),aq(this,Fq)&&!n.skipInitial&&this.callback(this.boundingClientRect),aq(this,Vq).observe(e)}};Fq=new WeakMap,$q=new WeakMap,Bq=new WeakMap,Hq=new WeakMap,Vq=new WeakMap,Wq=new WeakMap,Uq=new WeakMap,Gq=new WeakMap,Kq=new WeakSet,Yq=function(){aq(this,Uq)||(uq(this,Kq,Xq).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,aq(this,$q))||(this.callback(this.boundingClientRect),lq(this,$q,this.boundingClientRect)))},Xq=function(){if(aq(this,Wq)){const{top:e,left:t,width:n,height:r}=Sq(this.element);aq(this,Wq).style.overflow="hidden",aq(this,Wq).style.visibility="visible",aq(this,Wq).style.top=`${Math.floor(e)}px`,aq(this,Wq).style.left=`${Math.floor(t)}px`,aq(this,Wq).style.width=`${Math.floor(n)}px`,aq(this,Wq).style.height=`${Math.floor(r)}px`}};var Qq,eO,tO,nO,rO=new WeakMap,oO=new WeakMap;function iO(e,t){let n=rO.get(e);if(!n){const t=new Zq(e,t=>{const n=rO.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),rO.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(rO.delete(e),n.disconnect())}}var aO=class{constructor(e,t,n){this.callback=t,sq(this,Qq),sq(this,eO,!1),sq(this,tO),sq(this,nO,Nq(e=>{if(!aq(this,eO)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of aq(this,tO))if(e.target.contains(t)){this.callback(aq(this,Qq).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=Lq(e);for(;n;)t.add(n),n=Lq(n);return t}(e),o=function(e,t){const n=new Set;for(const r of e){const e=iO(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),i=function(e,t){var n;const r=e.ownerDocument;if(!oO.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),oO.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:o,disconnect:i}=null!=(n=oO.get(r))?n:{};return o&&i?(o.add(t),()=>{o.delete(t),0===o.size&&(i(),oO.delete(r))}):()=>{}}(e,aq(this,nO));lq(this,tO,r),lq(this,Qq,new Zq(e,t,n)),this.disconnect=()=>{aq(this,eO)||(lq(this,eO,!0),o(),i(),aq(this,Qq).disconnect())}}};function sO(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function lO(e){try{sO(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function uO(e){return!(!Cq||!e)&&e===yq(e).scrollingElement}function cO(e){var t,n;const r=mq(e),o=uO(e)?function(e){var t,n,r,o;const{documentElement:i}=yq(e),a=mq(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:i.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:i.clientHeight,u=null!=(r=null==a?void 0:a.offsetTop)?r:0,c=null!=(o=null==a?void 0:a.offsetLeft)?o:0;return{top:u,left:c,right:c+s,bottom:u+l,width:s,height:l}}(e):pq(e),i=r.visualViewport,a=uO(e)?{height:null!=(t=null==i?void 0:i.height)?t:r.innerHeight,width:null!=(n=null==i?void 0:i.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:o,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function dO(e,t,n=cO(e)){const{isTop:r,isBottom:o,isLeft:i,isRight:a,position:s}=n,{x:l,y:u}=null!=t?t:{x:0,y:0},c=!r&&s.current.y+u>0,d=!o&&s.current.y+u<s.max.y,p=!i&&s.current.x+l>0,f=!a&&s.current.x+l<s.max.x;return{top:c,bottom:d,left:p,right:f,x:p||f,y:c||d}}Qq=new WeakMap,eO=new WeakMap,tO=new WeakMap,nO=new WeakMap;var pO=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},fO=new pO(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),hO=new pO(e=>setTimeout(e,50)),mO=new Map,gO=mO.clear.bind(mO);function bO(e,t=!1){if(!t)return vO(e);let n=mO.get(e);return n||(n=vO(e),mO.set(e,n),hO.schedule(gO),n)}function vO(e){return mq(e).getComputedStyle(e)}var yO={excludeElement:!0,escapeShadowDOM:!0};function xO(e,t=yO){const{limit:n,excludeElement:r,escapeShadowDOM:o}=t,i=new Set;return e?function t(a){if(null!=n&&i.size>=n)return i;if(!a)return i;if(gq(a)&&null!=a.scrollingElement&&!i.has(a.scrollingElement))return i.add(a.scrollingElement),i;if(o&&Iq(a))return t(a.host);if(!bq(a))return vq(a)?t(a.parentElement):i;if(i.has(a))return i;const s=bO(a,!0);if(r&&a===e||function(e,t=bO(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&i.add(a),function(e,t=bO(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&i.add(e),i}return t(a.parentNode)}(e):i}function SO(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=Lq(e);for(;r;){if(r===t)return n;const e=pq(r),{x:o,y:i}=wO(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*o,n.scaleY=n.scaleY*i,r=Lq(r)}return n}function wO(e,t=pq(e)){const n=Math.round(t.width),r=Math.round(t.height);if(bq(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const o=bO(e,!0);return{x:(parseFloat(o.width)||n)/n,y:(parseFloat(o.height)||r)/r}}function CO(e){if(!e||"none"===e)return null;const[t,n,r="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function EO(e){var t,n,r,o,i,a,s,l,u;const{scale:c,transform:d,translate:p}=e,f=function(e){if(!e||"none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(c),h=CO(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,b=null!=(n=null==f?void 0:f.y)?n:1,v=null!=(r=null==h?void 0:h.x)?r:0,y=null!=(o=null==h?void 0:h.y)?o:0,x=null!=(i=null==m?void 0:m.x)?i:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:v+x,y:y+S,z:null!=(u=null==h?void 0:h.z)?u:0,scaleX:g*w,scaleY:b*C}}var RO=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(RO||{}),AO={x:.2,y:.2},IO={x:10,y:10};function MO(e,t,n,r=25,o=AO,i=IO,a=cO(e)){const{x:s,y:l}=t,{rect:u,isTop:c,isBottom:d,isLeft:p,isRight:f}=a,h=SO(e),m=EO(bO(e,!0)),g=null!==m&&(null==m?void 0:m.scaleX)<0,b=null!==m&&(null==m?void 0:m.scaleY)<0,v=new DD(u.left*h.scaleX+h.x,u.top*h.scaleY+h.y,u.width*h.scaleX,u.height*h.scaleY),y={x:0,y:0},x={x:0,y:0},S=v.height*o.y,w=v.width*o.x;return S>0&&(!c||b&&!d)&&l<=v.top+S&&1!==(null==n?void 0:n.y)&&s>=v.left-i.x&&s<=v.right+i.x?(y.y=b?1:-1,x.y=r*Math.abs((v.top+S-l)/S)):S>0&&(!d||b&&!c)&&l>=v.bottom-S&&-1!==(null==n?void 0:n.y)&&s>=v.left-i.x&&s<=v.right+i.x&&(y.y=b?-1:1,x.y=r*Math.abs((v.bottom-S-l)/S)),w>0&&(!f||g&&!p)&&s>=v.right-w&&-1!==(null==n?void 0:n.x)&&l>=v.top-i.y&&l<=v.bottom+i.y?(y.x=g?-1:1,x.x=r*Math.abs((v.right-w-s)/w)):w>0&&(!p||g&&!f)&&s<=v.left+w&&1!==(null==n?void 0:n.x)&&l>=v.top-i.y&&l<=v.bottom+i.y&&(y.x=g?1:-1,x.x=r*Math.abs((v.left+w-s)/w)),{direction:y,speed:x}}function kO(e,{block:t="nearest",inline:n="nearest"}={}){if(!bq(e))return;const r=xO(e),o=[];for(const i of r){if(!bq(i))continue;const{top:r,left:a}=PO(e,i);let s=r,l=a;for(const e of o)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<i.scrollTop;n!==s+e.offsetHeight>i.scrollTop+i.clientHeight&&(i.scrollTop="center"===t?s-i.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-i.clientHeight)}if("none"!==n){const t=l<i.scrollLeft;t!==l+e.offsetWidth>i.scrollLeft+i.clientWidth&&(i.scrollLeft="center"===n?l-i.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-i.clientWidth)}o.push(i)}}function DO(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!bq(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function PO(e,t){const n=DO(e),r=DO(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function TO({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function qO(e,t=bO(e).translate,n=!0){if(n){const t=dq(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=CO(e);if(t)return t}}}if(t){const e=CO(t);if(e)return e}return{x:0,y:0,z:0}}var OO=new pO(e=>setTimeout(e,0)),LO=new Map,NO=LO.clear.bind(LO);function jO(e,t){const n=function(e){const t=e.ownerDocument;let n=LO.get(t);if(n)return n;n=t.getAnimations(),LO.set(t,n),OO.schedule(NO);const r=n.filter(t=>cq(t.effect)&&t.effect.target===e);return LO.set(e,r),n}(e).filter(e=>{var n,r;if(cq(e.effect)){const{target:o}=e.effect;if(null==(r=o&&(null==(n=t.isValidTarget)?void 0:n.call(t,o)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var _O=class extends DD{constructor(e,t={}){var n,r,o,i;const{frameTransform:a=SO(e),ignoreTransforms:s,getBoundingClientRect:l=pq}=t,u=jO(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||Rq())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=bO(e),b=EO(g),v={x:null!=(n=null==b?void 0:b.scaleX)?n:1,y:null!=(r=null==b?void 0:b.scaleY)?r:1},y=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,o,i,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=cq(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:u}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(o=l,a=!0),"string"==typeof u&&u&&(i=u,a=!0)}return a?EO({transform:null!=r?r:t.transform,translate:null!=o?o:t.translate,scale:null!=i?i:t.scale}):null}(e,g);null==u||u(),b&&(d=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left-i-(1-r)*parseFloat(n),l=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,c=o?e.height/o:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(c,b,g.transformOrigin),(s||y)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(o=null==d?void 0:d.width)?o:h,height:null!=(i=null==d?void 0:d.height)?i:m};if(y&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left+i+(1-r)*parseFloat(n),l=e.top+a+(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width*r:e.width,c=o?e.height*o:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(d,y,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,v.x=y.scaleX,v.y=y.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=v,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function zO(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var FO=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(zO(n))for(const[r,o]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof o?o:`${o}px`)}}remove(e,t=""){const{element:n}=this;if(zO(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(zO(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function $O(e){return!!e&&(e instanceof mq(e).Element||hq(e)&&e.nodeType===Node.ELEMENT_NODE)}function BO(e){if(!e)return!1;const{KeyboardEvent:t}=mq(e.target);return e instanceof t}var HO={};function VO(e){const t=null==HO[e]?0:HO[e]+1;return HO[e]=t,`${e}-${t}`}var WO=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/kD.distance(t.shape.center,n),type:AT.PointerIntersection,priority:RT.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=kD.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:AT.ShapeIntersection,priority:RT.Normal}}return null})(e)},UO=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:o}=t;if(!n.shape)return null;const i=r?DD.from(r.current.boundingRectangle).corners:void 0,a=DD.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+kD.distance(kD.from(t),null!=(r=null==i?void 0:i[n])?r:o.current)},0),s=a/4;return{id:n.id,value:1/s,type:AT.Collision,priority:RT.Normal}},GO=Object.create,KO=Object.defineProperty,YO=Object.defineProperties,XO=Object.getOwnPropertyDescriptor,JO=Object.getOwnPropertyDescriptors,ZO=Object.getOwnPropertySymbols,QO=Object.prototype.hasOwnProperty,eL=Object.prototype.propertyIsEnumerable,tL=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),nL=e=>{throw TypeError(e)},rL=(e,t,n)=>t in e?KO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oL=(e,t)=>{for(var n in t||(t={}))QO.call(t,n)&&rL(e,n,t[n]);if(ZO)for(var n of ZO(t))eL.call(t,n)&&rL(e,n,t[n]);return e},iL=(e,t)=>YO(e,JO(t)),aL=(e,t)=>KO(e,"name",{value:t,configurable:!0}),sL=(e,t)=>{var n={};for(var r in e)QO.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ZO)for(var r of ZO(e))t.indexOf(r)<0&&eL.call(e,r)&&(n[r]=e[r]);return n},lL=e=>{var t;return[,,,GO(null!=(t=null==e?void 0:e[tL("metadata")])?t:null)]},uL=["class","method","getter","setter","accessor","field","value","get","set"],cL=e=>void 0!==e&&"function"!=typeof e?nL("Function expected"):e,dL=(e,t,n,r,o)=>({kind:uL[e],name:t,metadata:r,addInitializer:e=>n._?nL("Already initialized"):o.push(cL(e||null))}),pL=(e,t)=>rL(t,tL("metadata"),e[3]),fL=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},hL=(e,t,n,r,o,i)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=uL[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&XO(d<4?o:{get[n](){return bL(this,i)},set[n](e){return yL(this,i,e)}},n));d?f&&d<4&&aL(i,(d>2?"set ":d>1?"get ":"")+n):aL(o,n);for(var y=r.length-1;y>=0;y--)u=dL(d,n,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>gL(o,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?bL:xL)(e,o,4^d?i:v.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>yL(e,o,t,4^d?i:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?cL(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?nL("Object expected"):(cL(a=s.get)&&(v.get=a),cL(a=s.set)&&(v.set=a),cL(a=s.init)&&g.unshift(a));return d||pL(e,o),v&&KO(o,n,v),f?4^d?i:v:o},mL=(e,t,n)=>t.has(e)||nL("Cannot "+n),gL=(e,t)=>Object(t)!==t?nL('Cannot use the "in" operator on this value'):e.has(t),bL=(e,t,n)=>(mL(e,t,"read from private field"),n?n.call(e):t.get(e)),vL=(e,t,n)=>t.has(e)?nL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),yL=(e,t,n,r)=>(mL(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),xL=(e,t,n)=>(mL(e,t,"access private method"),n),SL="button",wL="draggable",CL="dnd-kit-description",EL="dnd-kit-announcement",RL={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},AL={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function IL(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}function ML(e){var t;return"button"===(null!=(t=e.getAttribute("role"))?t:"button")}var kL=["dragover","dragmove"],DL=class extends bP{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=CL,announcement:o=EL}={},announcements:i=AL,screenReaderInstructions:a=RL,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:VO(r),u=n?`${o}-${n}`:VO(o);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>fO.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),b=Object.entries(i).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const o=p;if(!o)return;const i=null==t?void 0:t(n,r);i&&o.nodeValue!==i&&(f=i,kL.includes(e)?g():(m(),g.cancel()))})),v=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(c)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(u),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function x(){for(const e of y)e()}this.registerEffect(()=>{var e;y.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){c&&d||y.add(v),IL(n)&&!Rq()||n.hasAttribute("tabindex")||y.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||y.add(()=>n.setAttribute("role",SL)),n.hasAttribute("aria-roledescription")||y.add(()=>n.setAttribute("aria-roledescription",wL)),n.hasAttribute("aria-describedby")||y.add(()=>n.setAttribute("aria-describedby",l));const e=ML(n)?["aria-pressed","aria-grabbed"]:["aria-grabbed"];for(const r of e){const e=String(t.isDragging);n.getAttribute(r)!==e&&y.add(()=>n.setAttribute(r,e))}const r=String(t.disabled);n.getAttribute("aria-disabled")!==r&&y.add(()=>n.setAttribute("aria-disabled",r))}}y.size>0&&fO.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),b.forEach(e=>e())}}};var PL,TL,qL,OL,LL,NL,jL,_L,zL,FL,$L,BL,HL,VL,WL,UL,GL=new Map;function KL(e){return Iq(e)?e.host.isConnected:null!=e.defaultView}var YL=class extends(NL=yP,LL=[nD],OL=[nD],qL=[rD],TL=[rD],PL=[rD],NL){constructor(e,t){super(e,t),fL(jL,5,this),vL(this,BL),vL(this,_L,fL(jL,8,this,new Map)),fL(jL,11,this),vL(this,zL,fL(jL,12,this,new Set)),fL(jL,15,this),vL(this,FL,new Set),vL(this,$L,new Map),this.registerEffect(xL(this,BL,HL))}register(e,t){return VM(()=>{var n;const r=new Map(this.registeredRules);r.set(e,null!=(n=null==t?void 0:t.retain)&&n),this.registeredRules=r}),()=>{VM(()=>{const t=new Map(this.registeredRules);t.delete(e),this.registeredRules=t})}}addRoot(e){return VM(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{VM(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return Mq(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return Mq(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter(e=>null!=e);return new Set([...e,...this.additionalRoots])}return new Set}destroy(){for(const e of bL(this,$L).values())for(const t of e.values())t();bL(this,$L).clear(),bL(this,FL).clear(),super.destroy()}};jL=lL(NL),_L=new WeakMap,zL=new WeakMap,FL=new WeakMap,$L=new WeakMap,BL=new WeakSet,HL=function(){const{roots:e,registeredRules:t}=this;for(const t of e)bL(this,FL).add(t);const n=new Map;for(const r of bL(this,FL)){const o=e.has(r);if(o||KL(r))for(const[e,i]of t){if(!o&&!i)continue;let t=n.get(r);t||(t=new Set,n.set(r,t)),t.add(e)}else bL(this,FL).delete(r)}for(const[e,t]of bL(this,$L)){const r=n.get(e);for(const[e,n]of t)(null==r?void 0:r.has(e))||(n(),t.delete(e));0===t.size&&bL(this,$L).delete(e)}for(const[e,t]of n){let n=bL(this,$L).get(e);n||(n=new Map,bL(this,$L).set(e,n));for(const r of t)n.has(r)||n.set(r,xL(this,BL,VL).call(this,e,r))}},VL=function(e,t){let n=GL.get(e);n||(n=new Map,GL.set(e,n));let r=n.get(t);if(!r){const o=gq(e)?xL(this,BL,WL).call(this,e,n,t):xL(this,BL,UL).call(this,e,n,t);if(!o)return()=>{};r=o,n.set(t,r)}r.refCount++;let o=!1;return()=>{o||(o=!0,r.refCount--,0===r.refCount&&r.cleanup())}},WL=function(e,t,n){var r;const o=e.createElement("style"),{nonce:i}=null!=(r=this.options)?r:{};i&&o.setAttribute("nonce",i),o.textContent=n,e.head.prepend(o);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===o)return void e.head.prepend(o)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),o.remove(),t.delete(n),0===t.size&&GL.delete(e)}}},UL=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=r?r:{};if(!o)return null;const i=new o;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{var r;if(Iq(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(i);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&GL.delete(e)}}},hL(jL,4,"registeredRules",LL,YL,_L),hL(jL,4,"additionalRoots",OL,YL,zL),hL(jL,2,"sourceRoot",qL,YL),hL(jL,2,"targetRoot",TL,YL),hL(jL,2,"roots",PL,YL),pL(jL,YL),YL.configure=mP(YL);var XL=YL,JL="data-dnd-",ZL=`${JL}dropping`,QL="--dnd-",eN=`${JL}dragging`,tN=`${JL}placeholder`,nN=[eN,tN,"popover","aria-pressed","aria-grabbing"],rN=["view-transition-name"],oN=`\n :is(:root,:host) [${eN}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${QL}top, 0px) !important;\n left: var(${QL}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${QL}width, auto);\n max-width: var(${QL}width, auto);\n height: var(${QL}height, auto);\n max-height: var(${QL}height, auto);\n transform: var(${QL}transform, none) !important;\n transition: var(${QL}transition) !important;\n }\n\n :is(:root,:host) [${tN}] {\n transition: none;\n }\n\n :is(:root,:host) [${tN}='hidden'] {\n visibility: hidden;\n }\n\n [${eN}] * {\n pointer-events: none !important;\n }\n\n [${eN}]:not([${ZL}]) {\n translate: var(${QL}translate) !important;\n }\n\n [${eN}][style*='${QL}scale'] {\n scale: var(${QL}scale) !important;\n transform-origin: var(${QL}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${eN}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${eN}]::backdrop, [${JL}overlay]:not([${eN}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function iN(e,t="hidden"){return VM(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const o=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${JL}${VO("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),i=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(Dq(e)&&Dq(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),Pq(e)&&Pq(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,o]of e){if(!r.element)continue;const e=`[${o}]`,i=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(o),!i)continue;const a=r.element;r.proxy=i,i.removeAttribute(o),qq.set(a,i),n.push(()=>{qq.delete(a),r.proxy=void 0})}}(o,a,i),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(tN,t)}(a,t),a.remove=()=>{i.forEach(e=>e()),s.call(a)},a})}function aN(e,t){return e===t||Lq(e)===Lq(t)}function sN(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&$O(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>lO(t))}function lN(e){return"TR"===e.tagName}var uN,cN,dN,pN,fN,hN,mN,gN=250,bN="ease";var vN=class extends(cN=bP,uN=[nD],cN){constructor(e,t){super(e,t),vL(this,fN),vL(this,pN,fL(dN,8,this)),fL(dN,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(XL),r=null==n?void 0:n.register(oN,{retain:!0});if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(xL(this,fN,hN).bind(this,n)),this.registerEffect(xL(this,fN,mN))}};dN=lL(cN),pN=new WeakMap,fN=new WeakSet,hN=function(e){const{overlay:t}=this;if(!t||!e)return;const n=Mq(t);return n?e.addRoot(n):void 0},mN=function(){var e,t,n,r,o,i,a;const{state:s,manager:l,options:u}=this,{dragOperation:c}=l,{position:d,source:p,status:f}=c;if(f.idle)return s.current={},void(s.initial={});if(!p)return;const{element:h}=p,m=p.pluginConfig(vN),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==u?void 0:u.feedback)?t:"default",b="function"==typeof g?g(p,l):g;if(!h||"none"===b||!f.initialized||f.initializing)return;const{initial:v}=s,y=null!=(n=this.overlay)?n:h,x=SO(y),S=SO(h),w=!aN(h,y),C=new _O(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,R=S.scaleY/x.scaleY;let{width:A,height:I,top:M,left:k}=C;w&&(A/=E,I/=R);const D=new FO(y),P=bO(h),{transition:T,translate:q,boxSizing:O,paddingBlockStart:L,paddingBlockEnd:N,paddingInlineStart:j,paddingInlineEnd:_,borderInlineStartWidth:z,borderInlineEndWidth:F,borderBlockStartWidth:$,borderBlockEndWidth:B}=P,H=T.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),V=EO(P),W=P.transform,U="clone"===b,G="content-box"===O,K=G?parseInt(j)+parseInt(_)+parseInt(z)+parseInt(F):0,Y=G?parseInt(L)+parseInt(N)+parseInt($)+parseInt(B):0,X="move"===b||this.overlay?null:iN(p,U?"clone":"hidden"),J=VM(()=>BO(l.dragOperation.activatorEvent));if(!v.translate)if(this.overlay&&V)v.translate={x:V.x,y:V.y};else if("none"!==q){const e=CO(q);e&&(v.translate=e)}if(!v.transformOrigin){const e=VM(()=>d.current),t=k+(null!=(r=null==V?void 0:V.x)?r:0),n=M+(null!=(o=null==V?void 0:V.y)?o:0);v.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(A*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(I*x.scaleY)}}const{transformOrigin:Z}=v,Q=M*x.scaleY+x.y,ee=k*x.scaleX+x.x;if(!v.coordinates&&(v.coordinates={x:ee,y:Q},1!==E||1!==R)){const{scaleX:e,scaleY:t}=S,{x:n,y:r}=Z;v.coordinates.x+=(A*e-A)*n,v.coordinates.y+=(I*t-I)*r}v.dimensions||(v.dimensions={width:A,height:I}),v.frameTransform||(v.frameTransform=x);const te=v.coordinates.x-ee,ne=v.coordinates.y-Q,re=(v.dimensions.width*v.frameTransform.scaleX-A*x.scaleX)*Z.x,oe=(v.dimensions.height*v.frameTransform.scaleY-I*x.scaleY)*Z.y,ie={x:te/x.scaleX+re,y:ne/x.scaleY+oe},ae=k+ie.x,se=M+ie.y;y.setAttribute(eN,"true");const le=VM(()=>c.transform),ue=null!=(i=v.translate)?i:{x:0,y:0},ce=le.x*x.scaleX+ue.x,de=le.y*x.scaleY+ue.y,pe=Aq();if(D.set({width:A-K,height:I-Y,top:se+pe.y,left:ae+pe.x,translate:`${ce}px ${de}px 0`,transform:this.overlay?"none":W,transition:H?`${H}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${R}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},QL),X&&(h.insertAdjacentElement("afterend",X),null==u?void 0:u.rootElement)){("function"==typeof u.rootElement?u.rootElement(p):u.rootElement).appendChild(h)}let fe,he,me;sO(y)&&(y.hasAttribute("popover")||y.setAttribute("popover","manual"),lO(y),y.addEventListener("beforetoggle",sN));const ge=(be={placeholder:X,element:h,feedbackElement:y,frameTransform:x,transformOrigin:Z,width:A,height:I,top:M,left:k,widthOffset:K,heightOffset:Y,delta:ie,styles:D,dragOperation:c,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new _O(be.placeholder,{frameTransform:be.frameTransform,ignoreTransforms:!0}),o=null!=(e=be.transformOrigin)?e:{x:1,y:1},i=(be.width-r.width)*o.x+be.delta.x,a=(be.height-r.height)*o.y+be.delta.y,s=Aq();if(be.styles.set({width:r.width-be.widthOffset,height:r.height-be.heightOffset,top:be.top+a+s.y,left:be.left+i+s.x},QL),null==(t=be.getElementMutationObserver())||t.takeRecords(),lN(be.element)&&lN(be.placeholder)){const e=Array.from(be.element.cells),t=Array.from(be.placeholder.cells);be.getSavedCellWidths()||be.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(n=be.getTranslate())?n:{x:0,y:0},u=be.left+i+s.x+l.x,c=be.top+a+s.y+l.y,d=r.width-be.widthOffset,p=r.height-be.heightOffset,f=be.frameTransform;be.dragOperation.shape=new DD(u*f.scaleX+f.x,c*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var be;const ve=new _O(y);VM(()=>c.shape=ve);const ye=mq(y),xe=e=>{this.manager.actions.stop({event:e})},Se=kq(ye);J&&ye.addEventListener("resize",xe),"idle"===VM(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,n){const r=new MutationObserver(r=>{let o=!1;for(const n of r){if(n.target!==e){o=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||nN.includes(r))continue;const i=e.getAttribute(r);if("style"===r){if(zO(e)&&zO(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(rN.includes(e)||e.startsWith(QL))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==i?t.setAttribute(r,i):t.removeAttribute(r)}o&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(h,X,U),he=function(e,t,n){const r=new MutationObserver(r=>{for(const o of r)if(0!==o.addedNodes.length)for(const r of Array.from(o.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void lO(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void lO(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),lO(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,y));const we=null==(a=l.dragOperation.source)?void 0:a.id,Ce=()=>{var e;if(!J||null==we)return;const t=l.registry.draggables.get(we),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;bq(n)&&n.focus()},Ee=()=>{null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ye.removeEventListener("resize",xe),sO(y)&&(y.removeEventListener("beforetoggle",sN),y.removeAttribute("popover")),y.removeAttribute(eN),D.reset();const e=()=>{var e;if(me&&lN(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}p.status="idle";const t=null!=s.current.translate,n=c.status.dragging;X&&(!n&&t||X.parentElement!==y.parentElement)&&y.isConnected&&X.replaceWith(y),null==X||X.remove()};y===this.overlay?setTimeout(e,0):e()},Re=null==u?void 0:u.dropAnimation,Ae=this,Ie=iD(()=>{var e,t,n;const{transform:r,status:o}=c;if((r.x||r.y||s.current.translate)&&o.dragging){const o=null!=(e=v.translate)?e:{x:0,y:0},i={x:r.x/x.scaleX+o.x,y:r.y/x.scaleY+o.y},a=s.current.translate,l=VM(()=>c.modifiers),d=VM(()=>{var e;return null==(e=c.shape)?void 0:e.current}),p=null==u?void 0:u.keyboardTransition,f=J&&!Se&&null!==p?`${null!=(t=null==p?void 0:p.duration)?t:250}ms ${null!=(n=null==p?void 0:p.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(D.set({transition:H?`${H}, translate ${f}`:`translate ${f}`,translate:`${i.x}px ${i.y}px 0`},QL),null==fe||fe.takeRecords(),d&&d!==ve&&a&&!l.length){const e=kD.delta(i,a);c.shape=DD.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else c.shape=new _O(y);s.current.translate=i}},function(){if(c.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==Ae.dropAnimation?Ae.dropAnimation:Re;let t=s.current.translate;const n=null!=t;if(t||h===y||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,n,r,o;const{animation:i}=e;if("function"==typeof i){const t=i({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=gN,easing:s=bN}=null!=i?i:{};lO(e.feedbackElement);const[,l]=null!=(t=dq(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(n=e.placeholder)?n:e.element,c={frameTransform:aN(e.feedbackElement,u)?null:void 0},d=new _O(e.feedbackElement,c),p=null!=(r=CO(bO(e.feedbackElement).translate))?r:e.translate,f=new _O(u,c),h=DD.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,b=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},v=Math.round(d.intrinsicWidth)!==Math.round(f.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},QL),e.feedbackElement.setAttribute(ZL,""),null==(o=e.getElementMutationObserver())||o.takeRecords(),TO({element:e.feedbackElement,keyframes:iL(oL(oL({},b),v),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:kq(mq(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(ZL),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:y,placeholder:X,translate:t,moved:n,transition:T,alignment:p.alignment,styles:D,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Ie()}},hL(dN,4,"overlay",uN,vN,pN),pL(dN,vN),vN.configure=mP(vN);var yN,xN,SN,wN,CN,EN,RN,AN=vN,IN=!0;SN=[nD],wN=RO.Forward,yN=[nD],xN=RO.Reverse;var MN=class{constructor(){vL(this,EN,fL(CN,8,this,IN)),fL(CN,11,this),vL(this,RN,fL(CN,12,this,IN)),fL(CN,15,this)}isLocked(e){return e!==RO.Idle&&(null==e?this[RO.Forward]===IN&&this[RO.Reverse]===IN:this[e]===IN)}unlock(e){e!==RO.Idle&&(this[e]=false)}};CN=lL(null),EN=new WeakMap,RN=new WeakMap,hL(CN,4,wN,SN,MN,EN),hL(CN,4,xN,yN,MN,RN),pL(CN,MN);var kN,DN,PN,TN,qN,ON,LN=[RO.Forward,RO.Reverse],NN=class{constructor(){this.x=new MN,this.y=new MN}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},jN=class extends bP{constructor(e){super(e);const t=ek(new NN);let n=null;this.signal=t,ck(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new NN);const{delta:o}=e.dragOperation.position;if(n){const e={x:_N(o.x,n.x),y:_N(o.y,n.y)},r=t.peek();$M(()=>{for(const t of zD)for(const n of LN)e[t]===n&&r[t].unlock(n);t.value=r})}n=o})}get current(){return this.signal.peek()}};function _N(e,t){return Math.sign(e-t)}var zN=class extends(DN=yP,kN=[nD],DN){constructor(e){super(e),vL(this,TN,fL(PN,8,this,!1)),fL(PN,11,this),vL(this,qN),vL(this,ON,()=>{if(!bL(this,qN))return;const{element:e,by:t}=bL(this,qN);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var n;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return yL(this,qN,void 0),!1;const{position:o}=this.manager.dragOperation,i=null==o?void 0:o.current;if(i){const{by:o}=null!=e?e:{},a=o?{x:FN(o.x),y:FN(o.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of r){const r=cO(e),l=dO(e,o,r);if(l.x||l.y){const{speed:l,direction:u}=MO(e,i,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold,void 0,r);if(s)for(const e of zD)s[e].isLocked(u[e])&&(l[e]=0,u[e]=0);if(u.x||u.y){const{x:t,y:r}=null!=o?o:u,i=t*l.x,a=r*l.y;if(i||a){const t=null==(n=bL(this,qN))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!i||t.y&&!a)continue}return yL(this,qN,{element:e,by:{x:i,y:a}}),fO.schedule(bL(this,ON)),!0}}}}}return yL(this,qN,void 0),!1};let t=null,n=null;const r=eD(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const o=Tq(Mq(null==r?void 0:r.element),n.current);return o&&(t=o),null!=o?o:t}),o=eD(()=>{const t=r.value,{documentElement:o}=yq(t);if(!t||t===o){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=xO(r,{excludeElement:!1});return n=e,e}}if(t){const e=xO(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},tD);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new jN(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&BO(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function FN(e){return e>0?RO.Forward:e<0?RO.Reverse:RO.Idle}PN=lL(DN),TN=new WeakMap,qN=new WeakMap,ON=new WeakMap,hL(PN,4,"autoScrolling",kN,zN,TN),pL(PN,zN);var $N=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),BN=class extends bP{constructor(e,t){super(e,t);const n=e.registry.plugins.get(zN);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=ck(()=>{var t,r,o;if(this.disabled)return;const{position:i,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(r=this.options)?void 0:r.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(o=this.options)?void 0:o.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>$N.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};BN.configure=mP(BN);var HN,VN=BN,WN={capture:!0,passive:!0},UN=class extends yP{constructor(e){super(e),vL(this,HN),this.handleScroll=()=>{null==bL(this,HN)&&yL(this,HN,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),yL(this,HN,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=ck(()=>{var e,n,r;if(t.status.dragging){const o=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return o.addEventListener("scroll",this.handleScroll,WN),()=>{o.removeEventListener("scroll",this.handleScroll,WN)}}})}};HN=new WeakMap;function GN(){var e;null==(e=document.getSelection())||e.removeAllRanges()}function KN(e,t){const n=XN(e.key);return t.some(e=>XN(e)===n)}var YN=new Set(["alt","altgraph","backspace","capslock","control","delete","end","enter","escape","home","insert","meta","pagedown","pageup","pause","printscreen","shift","space","tab","arrowdown","arrowleft","arrowright","arrowup","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12"]);function XN(e){if(" "===e||"Spacebar"===e)return"space";if(/^Key[A-Z]$/.test(e))return e.slice(3).toLowerCase();if(/^Digit[0-9]$/.test(e))return e.slice(5);if(1===e.length)return e.toLowerCase();const t=e.toLowerCase();return YN.has(t)?t:e}var JN,ZN=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),QN=class extends DT{constructor(e,t){super(e),this.manager=e,this.options=t,vL(this,JN,[]),this.listeners=new Oq,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!$O(e.target))return;if(t.disabled)return;const{keyboardCodes:r=ZN.keyboardCodes,preventActivation:o=ZN.preventActivation}=null!=n?n:{};KN(e,r.start)&&this.manager.dragOperation.status.idle&&((null==o?void 0:o(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=ck(()=>{var n;const r=null!=(n=e.handle)?n:e.element,o=n=>{BO(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),kO(r);const{center:o}=new _O(r);if(this.manager.actions.start({event:e,coordinates:{x:o.x,y:o.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const i=yq(r),a=[this.listeners.bind(i,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];bL(this,JN).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=ZN.keyboardCodes}=null!=n?n:{};if(KN(e,[...r.end,...r.cancel])){e.preventDefault();const t=KN(e,r.cancel);return void this.handleEnd(e,t)}KN(e,r.up)?this.handleMove("up",e):KN(e,r.down)&&this.handleMove("down",e),KN(e,r.left)?this.handleMove("left",e):KN(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:o}=this.manager.dragOperation,i=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:ZN.offset;if("number"==typeof s&&(s={x:s,y:s}),o){switch(e){case"up":a={x:0,y:-s.y*i};break;case"down":a={x:0,y:s.y*i};break;case"left":a={x:-s.x*i,y:0};break;case"right":a={x:s.x*i,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(VN);!1===(null==e?void 0:e.disabled)&&(e.disable(),bL(this,JN).push(()=>{e.enable()}))}cleanup(){bL(this,JN).forEach(e=>e()),yL(this,JN,[])}destroy(){this.cleanup(),this.listeners.clear()}};JN=new WeakMap,QN.configure=mP(QN),QN.defaults=ZN;var ej,tj,nj,rj=QN;ej=new WeakMap;tj=new WeakMap,nj=new WeakMap;var oj=class{};oj.Delay=class extends TT{constructor(){super(...arguments),vL(this,tj),vL(this,nj)}onEvent(e){switch(e.type){case"pointerdown":yL(this,nj,wq(e)),yL(this,tj,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!bL(this,nj))return;const{x:t,y:n}=wq(e);qD({x:t-bL(this,nj).x,y:n-bL(this,nj).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){bL(this,tj)&&(clearTimeout(bL(this,tj)),yL(this,nj,void 0),yL(this,tj,void 0))}},oj.Distance=class extends TT{constructor(){super(...arguments),vL(this,ej)}onEvent(e){switch(e.type){case"pointerdown":yL(this,ej,wq(e));break;case"pointermove":if(!bL(this,ej))return;const{x:t,y:n}=wq(e),r={x:t-bL(this,ej).x,y:n-bL(this,ej).y},{tolerance:o}=this.options;if(o&&qD(r,o))return void this.abort();qD(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){yL(this,ej,void 0)}};var ij,aj=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:o}=e;if("mouse"!==r||!$O(o)||t.handle!==o&&!(null==(n=t.handle)?void 0:n.contains(o)))return"touch"===r?[new oj.Delay({value:250,tolerance:5})]:function(e){if(!$O(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(o)&&!e.defaultPrevented?[new oj.Delay({value:200,tolerance:0})]:[new oj.Delay({value:200,tolerance:10}),new oj.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;if(r===t.element)return!1;if(r===t.handle)return!1;if(!$O(r))return!1;if(null==(n=t.handle)?void 0:n.contains(r))return!1;const o=r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ');return o!==t.element&&Boolean(o)}}),sj=class extends DT{constructor(e,t){super(e),this.manager=e,this.options=t,vL(this,ij,new Set),this.listeners=new Oq,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=aj.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=ck(()=>{var n;const r=new AbortController,{signal:o}=r,i=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=mq(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(pj(e.ownerDocument.defaultView),e.addEventListener("pointerdown",i,{signal:o}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!$O(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=aj.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:o}=e,i=bq(o)&&o.draggable&&"true"===o.getAttribute("draggable"),a=SO(t.element),{x:s,y:l}=wq(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,n);e.sensor=this;const c=new PT(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=Eq(),p=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:i?this.handleCancel:uj,options:{capture:!0}}]);bL(this,ij).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;!1===(null==(n=this.controller)?void 0:n.activated)&&(null==(r=this.controller)||r.onEvent(e));const{status:o}=this.manager.dragOperation;if(o.initializing||o.dragging){const n=wq(e),r=SO(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,o.dragging&&fO.schedule(this.handleMove)}}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized,r=yq(e.target),o=r.defaultView;if(!n&&o){const e=e=>{e.target===r.body&&e.detail>0&&(e.preventDefault(),e.stopImmediatePropagation())};o.addEventListener("click",e,!0),o.setTimeout(()=>{o.removeEventListener("click",e,!0)},0)}this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;const o=n.actions.start({coordinates:r,event:t,source:e});if(o.signal.aborted)return this.cleanup();t.preventDefault();const i=yq(t.target).body;try{i.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const a=$O(t.target)?[t.target,i]:i,s=this.listeners.bind(a,[{type:"touchmove",listener:uj,options:{passive:!1}},{type:"click",listener:uj},{type:"contextmenu",listener:uj},{type:"keydown",listener:this.handleKeyDown}]);bL(this,ij).add(s),n.renderer.rendering.then(()=>{!o.signal.aborted&&n.dragOperation.status.dragging&&fO.schedule(this.handleMove)})}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},bL(this,ij).forEach(e=>e()),bL(this,ij).clear()}destroy(){this.cleanup(),this.listeners.clear()}};ij=new WeakMap,sj.configure=mP(sj),sj.defaults=aj;var lj=sj;function uj(e){e.preventDefault()}function cj(){}var dj=new WeakSet;function pj(e){e&&!dj.has(e)&&(e.addEventListener("touchmove",cj,{capture:!1,passive:!1}),dj.add(e))}var fj,hj,mj,gj,bj,vj,yj,xj,Sj,wj,Cj,Ej,Rj,Aj,Ij,Mj,kj={modifiers:[],plugins:[DL,VN,class extends bP{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(XL),o=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(o){const e=this.destroy.bind(this);this.destroy=()=>{o(),e()}}}},AN,class extends bP{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(XL),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=ck(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return GN(),document.addEventListener("selectionchange",GN,{capture:!0}),()=>{document.removeEventListener("selectionchange",GN,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[lj,rj]},Dj=class extends rq{constructor(e={}){const t=nq(e.plugins,kj.plugins),n=nq(e.sensors,kj.sensors),r=nq(e.modifiers,kj.modifiers);super(iL(oL({},e),{plugins:[UN,zN,XL,...t],sensors:n,modifiers:r}))}},Pj=class extends(mj=uT,hj=[nD],fj=[nD],mj){constructor(e,t){var n=e,{element:r,effects:o=()=>[],handle:i}=n,a=sL(n,["element","effects","handle"]);super(oL({effects:()=>[...o(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(gP))?t:[...n.sensors]).map(e=>{const t=e instanceof DT?e:n.registry.register(e.plugin),r=e instanceof DT?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),vL(this,bj,fL(gj,8,this)),fL(gj,11,this),vL(this,vj,fL(gj,12,this)),fL(gj,15,this),this.element=r,this.handle=i}};gj=lL(mj),bj=new WeakMap,vj=new WeakMap,hL(gj,4,"handle",hj,Pj,bj),hL(gj,4,"element",fj,Pj,vj),pL(gj,Pj);var Tj=class extends(Sj=cT,xj=[nD],yj=[nD],Sj){constructor(e,t){var n=e,{element:r,effects:o=()=>[]}=n,i=sL(n,["element","effects"]);const{collisionDetector:a=WO}=i,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new _O(n),o=VM(()=>this.shape);return r&&(null==o?void 0:o.equals(r))?o:(this.shape=r,r)},l=ek(!1);super(iL(oL({},i),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new aO(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),vL(this,Ij),vL(this,Cj,fL(wj,8,this)),fL(wj,11,this),vL(this,Mj,fL(wj,12,this)),fL(wj,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){yL(this,Ij,e,Aj)}get element(){var e;return null!=(e=this.proxy)?e:bL(this,Ij,Rj)}};function qj(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}wj=lL(Sj),Cj=new WeakMap,Ij=new WeakSet,Mj=new WeakMap,Ej=hL(wj,20,"#element",xj,Ij,Cj),Rj=Ej.get,Aj=Ej.set,hL(wj,4,"proxy",yj,Tj,Mj),pL(wj,Tj);var Oj="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?j:q;function Lj(){const e=k(0)[1];return L(()=>{e(e=>e+1)},[e])}function Nj(e,t=[],n=!1){const r=D(e);return r.current=e,function(e,t=!1){const n=D(e.peek()),r=D(!1),o=Lj();return Oj(()=>ck(()=>{const i=n.current,a=e.value;if(i!==a){if(n.current=a,!r.current)return;t?U(o):o()}}),[e,t,o]),{get value(){return r.current=!0,e.peek()}}}(M(()=>eD(()=>r.current()),t),n)}function jj(e){const t=D(e);return Oj(()=>{t.current=e},[e]),t}function _j(e,t){const n=Lj(),r=jj(t),o=M(()=>{const t=new Map;return{tracked:t,propertyCount:ek(0),active:!1,proxy:e?new Proxy(e,{get(e,n){const r=e[n];return t.has(n)||t.set(n,r),r}}):e}},[e]);return Oj(()=>{o.propertyCount.value=o.tracked.size}),Oj(()=>{if(!e)return;const{tracked:t,propertyCount:i}=o;o.active=!0;const a=ck(()=>{i.value;let a=!1,s=!1;for(const[n,o]of t){const i=e[n];Object.is(o,i)||(a=!0,t.set(n,i),s=!0===VM(()=>{var e;return null==(e=r.current)?void 0:e.call(r,n,o,i)})||s)}a&&(s?queueMicrotask(()=>{o.active&&U(n)}):n())});return()=>{o.active=!1,a()}},[e,o,n,r]),o.proxy}function zj(e,t){e()}function Fj(e,t,n=q,r=Object.is){const o=D(e);n(()=>{const n=o.current;r(e,n)||(o.current=e,t(e,n))},[t,e])}function $j(e,t){const n=D(qj(e));Oj(()=>{const r=qj(e);r!==n.current&&(n.current=r,t(r))})}var Bj=Object.defineProperty,Hj=Object.defineProperties,Vj=Object.getOwnPropertyDescriptors,Wj=Object.getOwnPropertySymbols,Uj=Object.prototype.hasOwnProperty,Gj=Object.prototype.propertyIsEnumerable,Kj=(e,t,n)=>t in e?Bj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yj=new Dj,Xj=P(Yj),Jj=z(F(({children:e},t)=>{const[n,r]=k(0),o=D(null),i=D(null),a=M(()=>({renderer:{get rendering(){var e;return null!=(e=o.current)?e:Promise.resolve()}},trackRendering(e){o.current||(o.current=new Promise(e=>{i.current=e})),$(()=>{e(),r(e=>e+1)})}}),[]);return Oj(()=>{var e;null==(e=i.current)||e.call(i),o.current=null},[e,n]),B(t,()=>a),null})),Zj=[void 0,tD];function Qj(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:o,onDragStart:i,onDragMove:a,onDragOver:s,onDragEnd:l}=t,u=((e,t)=>{var n={};for(var r in e)Uj.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Wj)for(var r of Wj(e))t.indexOf(r)<0&&Gj.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const c=D(null),{plugins:d,modifiers:p,sensors:f}=u,h=nq(d,kj.plugins),m=nq(f,kj.sensors),g=nq(p,kj.modifiers),b=jj(o),v=jj(i),y=jj(s),x=jj(a),S=jj(l),w=jj(r),C=function(e){const t=D(null);t.current||(t.current=e());return _(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=u.manager)?e:new Dj(u)});return q(()=>{if(!c.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=c.current,{monitor:n}=C;C.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=b.current;n&&t(()=>n(e,C))}),n.addEventListener("dragstart",e=>{var t;return null==(t=v.current)?void 0:t.call(v,e,C)}),n.addEventListener("dragover",e=>{const n=y.current;n&&t(()=>n(e,C))}),n.addEventListener("dragmove",e=>{const n=x.current;n&&t(()=>n(e,C))}),n.addEventListener("dragend",e=>{const n=S.current;n&&t(()=>n(e,C))}),n.addEventListener("collision",e=>{var t;return null==(t=w.current)?void 0:t.call(w,e,C)})];return()=>r.forEach(e=>e())},[C]),Fj(h,()=>C&&(C.plugins=h),...Zj),Fj(m,()=>C&&(C.sensors=m),...Zj),Fj(g,()=>C&&(C.modifiers=g),...Zj),Yt.jsxs(Xj.Provider,{value:C,children:[Yt.jsx(Jj,{ref:c,children:n}),n]})}function e_(){return N(Xj)}function t_(e){var t;const n=null!=(t=e_())?t:void 0,[r]=k(()=>e(n));return r.manager!==n&&(r.manager=n),Oj(r.register,[n,r]),r}function n_({children:e,className:t,dropAnimation:n,style:r,tag:o,disabled:i}){var a;const s=D(null),l=e_(),u=null!=(a=Nj(()=>null==l?void 0:l.dragOperation.source,[l]).value)?a:null,c="function"==typeof i?i(u):i;q(()=>{if(!s.current||!l||c)return;const e=l.plugins.find(e=>e instanceof AN);return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0},[l,c]),q(()=>{if(!l)return;const e=l.plugins.find(e=>e instanceof AN);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[l,n]);const d=M(()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?r_:e[t]});return new Proxy(l,{get:(t,n)=>"registry"===n?e:t[n]})},[l]);return Yt.jsx(Xj.Provider,{value:d,children:C(o||"div",{ref:s,className:t,style:r,"data-dnd-overlay":!0},function(){if(!u||c)return null;if("function"==typeof e)return Yt.jsx(o_,{source:u,children:e});return e}())})}function r_(){return()=>{}}function o_({children:e,source:t}){return e(_j(t))}var i_,a_,s_,l_,u_,c_=Object.create,d_=Object.defineProperty,p_=Object.getOwnPropertyDescriptor,f_=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),h_=e=>{throw TypeError(e)},m_=["class","method","getter","setter","accessor","field","value","get","set"],g_=e=>void 0!==e&&"function"!=typeof e?h_("Function expected"):e,b_=(e,t,n,r,o)=>({kind:m_[e],name:t,metadata:r,addInitializer:e=>n._?h_("Already initialized"):o.push(g_(e||null))}),v_=(e,t,n,r,o,i)=>{for(var a,s,l,u,c=7&t,d=m_[c+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,p_(o,n)),h=r.length-1;h>=0;h--)(l=b_(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,g_(a)&&(f[d]=a);return f&&d_(o,n,f),o},y_=(e,t,n)=>t.has(e)||h_("Cannot "+n),x_=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},S_=class extends(s_=sD,a_=[rD],i_=[rD],s_){constructor(e){var t,n,r;super(x_.from(e),(e,t)=>x_.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(u_,5,this),t=this,r=0,(n=l_).has(t)?h_("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return x_.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=x_.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(y_(a=this,s=l_,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);$M(()=>{((e,t,n)=>{y_(e,t,"write to private field"),t.set(e,n)})(this,l_,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(x_.from(e)),this.velocity={x:0,y:0}}};u_=(e=>{var t;return[,,,c_(null!=(t=null==e?void 0:e[f_("metadata")])?t:null)]})(s_),l_=new WeakMap,v_(u_,2,"delta",a_,S_),v_(u_,2,"direction",i_,S_),((e,t)=>{((e,t,n)=>{t in e?d_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,f_("metadata"),e[3])})(u_,S_);var w_=(e=>(e.Horizontal="x",e.Vertical="y",e))(w_||{});Object.values(w_);var C_=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/x_.distance(t.shape.center,n),type:AT.PointerIntersection,priority:RT.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=x_.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:AT.ShapeIntersection,priority:RT.Normal}}return null})(e)};function E_(e){const{collisionDetector:t,data:n,disabled:r,element:o,id:i,accept:a,type:s}=e,l=t_(t=>new Tj(((e,t)=>Hj(e,Vj(t)))(((e,t)=>{for(var n in t||(t={}))Uj.call(t,n)&&Kj(e,n,t[n]);if(Wj)for(var n of Wj(t))Gj.call(t,n)&&Kj(e,n,t[n]);return e})({},e),{register:!1,element:qj(o)}),t)),u=_j(l);return Fj(i,()=>l.id=i),$j(o,e=>l.element=e),Fj(a,()=>l.accept=a,void 0,tD),Fj(t,()=>l.collisionDetector=null!=t?t:C_),Fj(n,()=>n&&(l.data=n)),Fj(r,()=>l.disabled=!0===r),Fj(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:L(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}function R_(e){const t=e_();q(()=>{if(!t)return;const n=Object.entries(e).reduce((e,[n,r])=>{if(r){const o=n.replace(/^on/,"").toLowerCase(),i=t.monitor.addEventListener(o,r);e.push(i)}return e},[]);return()=>n.forEach(e=>null==e?void 0:e())},[t,e])}const A_=e=>Array.from({length:e},(e,t)=>t),I_=({id:e,sectionIndex:t,itemIndex:n})=>Yt.jsx("span",{children:`${e}-${t}-${n}`}),M_=z(()=>{const e=Qg(DM)??I_,{startSectionIndex:t,startIndex:n,id:r}=Qg(OM)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:Yt.jsx(n_,{dropAnimation:null,children:Yt.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px",background:"white",boxShadow:"0px 4px 10px 0px rgba(0, 0, 0, 0.15)",borderRadius:"4px",border:"1px solid rgba(0, 0, 0, 0.15)",width:"208px",maxHeight:"32px",fontSize:"12px",lineHeight:"16px"},children:Yt.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),k_=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=Qg(OM),o=r?.toSectionIndex===e&&r.toIndex===t;return Yt.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:o&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},D_=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,P_=z(({sectionIndex:e})=>{const t=Qg(CM)[e],n=Qg(EM),r=Qg(RM),o=null!==Qg(OM),i=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=E_({id:a,type:"section",accept:"item",collisionPriority:RT.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:Yt.jsxs(Sd,{ref:s,sx:{margin:"4px",outline:D_(l,o),borderRadius:"4px",boxSizing:"border-box"},children:[Yt.jsx(Sd,{sx:{position:"relative",top:"4px"},children:Yt.jsx(k_,{sectionIndex:e,itemIndex:0,isDragging:!1})}),Yt.jsxs(Sd,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[Yt.jsx(jc,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontWeight:"600",fontSize:"14px",lineHeight:"16px",color:"rgba(64, 64, 64, 1)"},children:i.title}),Yt.jsx(jc,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:i.message})]})]})}),T_=z(({id:e,sectionIndex:t})=>{const n=Qg(kM);return void 0===n?null:C(n,{id:e,sectionIndex:t})});var q_=Object.defineProperty,O_=Object.defineProperties,L_=Object.getOwnPropertyDescriptors,N_=Object.getOwnPropertySymbols,j_=Object.prototype.hasOwnProperty,__=Object.prototype.propertyIsEnumerable,z_=(e,t,n)=>t in e?q_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F_=(e,t)=>{for(var n in t||(t={}))j_.call(t,n)&&z_(e,n,t[n]);if(N_)for(var n of N_(t))__.call(t,n)&&z_(e,n,t[n]);return e},$_=(e,t)=>O_(e,L_(t)),B_=class extends ZT{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return $_(F_({},e),{[t]:n})}};B_.configure=mP(B_);var H_=B_,V_=H_.configure({axis:"x",value:0});H_.configure({axis:"y",value:0});var W_=class extends ZT{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,o="number"==typeof n?n:n.y;return $_(F_({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/o)*o})}};W_.configure=mP(W_);var U_=Object.create,G_=Object.defineProperty,K_=Object.defineProperties,Y_=Object.getOwnPropertyDescriptor,X_=Object.getOwnPropertyDescriptors,J_=Object.getOwnPropertySymbols,Z_=Object.prototype.hasOwnProperty,Q_=Object.prototype.propertyIsEnumerable,ez=e=>{throw TypeError(e)},tz=(e,t,n)=>t in e?G_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nz=(e,t)=>{for(var n in t||(t={}))Z_.call(t,n)&&tz(e,n,t[n]);if(J_)for(var n of J_(t))Q_.call(t,n)&&tz(e,n,t[n]);return e},rz=(e,t)=>K_(e,X_(t)),oz=["class","method","getter","setter","accessor","field","value","get","set"],iz=e=>void 0!==e&&"function"!=typeof e?ez("Function expected"):e,az=(e,t,n,r,o)=>({kind:oz[e],name:t,metadata:r,addInitializer:e=>n._?ez("Already initialized"):o.push(iz(e||null))}),sz=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},lz=(e,t,n,r,o,i)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=oz[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(o=o.prototype,Y_({get[n](){return cz(this,i)},set[n](e){return pz(this,i,e)}},n)),b=r.length-1;b>=0;b--)(u=az(d,n,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>n in e},c.get=e=>e[n],c.set=(e,t)=>e[n]=t,s=(0,r[b])({get:g.get,set:g.set},u),l._=1,void 0===s?iz(s)&&(g[f]=s):"object"!=typeof s||null===s?ez("Object expected"):(iz(a=s.get)&&(g.get=a),iz(a=s.set)&&(g.set=a),iz(a=s.init)&&h.unshift(a));return g&&G_(o,n,g),o},uz=(e,t,n)=>t.has(e)||ez("Cannot "+n),cz=(e,t,n)=>(uz(e,t,"read from private field"),t.get(e)),dz=(e,t,n)=>t.has(e)?ez("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pz=(e,t,n,r)=>(uz(e,t,"write to private field"),t.set(e,n),n);function fz(e){return e instanceof Yz||e instanceof Kz}var hz=class extends bP{constructor(e){super(e);const t=ck(()=>{const{dragOperation:t}=e;if(BO(t.activatorEvent)&&fz(t.source)&&t.status.initialized){const t=e.registry.plugins.get(zN);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!BO(e.nativeEvent))return;if(!fz(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:o,registry:i}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:u}=n,{center:c}=n.shape.current,d=[],p=[];$M(()=>{for(const e of i.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&fz(e)||!e.element)continue;let n=e.shape;const r=new _O(e.element,{getBoundingClientRect:e=>Sq(e,void 0,.2)});r.height&&r.width&&(("down"==s&&c.y+10<r.center.y||"up"==s&&c.y-10>r.center.y||"left"==s&&c.x-10>r.center.x||"right"==s&&c.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),o.disable();const f=o.computeCollisions(d,UO);$M(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:b}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:i}=n;if(!e||!fz(e)||!i)return;const{index:a,group:s,target:l}=e.sortable,u=g!==a||b!==s,c=u?l:null==t?void 0:t.element;if(!c)return;kO(c);const d=new _O(c);if(!d)return;const p=DD.delta(d,DD.from(i.current.boundingRectangle),e.alignment);r.move({by:p}),u?r.setDropTarget(e.id).then(()=>o.enable()):o.enable()})})});this.destroy=()=>{n(),t()}}};var mz=Object.defineProperty,gz=Object.defineProperties,bz=Object.getOwnPropertyDescriptors,vz=Object.getOwnPropertySymbols,yz=Object.prototype.hasOwnProperty,xz=Object.prototype.propertyIsEnumerable,Sz=(e,t,n)=>t in e?mz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wz=(e,t)=>{for(var n in t||(t={}))yz.call(t,n)&&Sz(e,n,t[n]);if(vz)for(var n of vz(t))xz.call(t,n)&&Sz(e,n,t[n]);return e},Cz=(e,t)=>gz(e,bz(t));function Ez(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function Rz(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function Az(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function Iz(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(Az(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const u=Object.entries(e);let c,d,p=-1,f=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(c=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&Az(i)){const r=null==i.initialGroup?void 0:Rz(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:Rz(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return Cz(wz({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return Cz(wz({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=Rz(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==c||null==d||c===d&&p===f){if(null!=c&&c===d&&p===f&&Az(i)){const t=null==i.group?void 0:Rz(e,i.group),r=null!=i.group&&t!==c,o=i.index!==p;if(r||o){const r=null==i.group?c:t;if(null!=r){if(c===r)return Cz(wz({},e),{[c]:n(e[c],p,i.index)});const t=e[c][p];return Cz(wz({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(c===d)return Cz(wz({},e),{[c]:n(e[c],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[c][p];return Cz(wz({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,Ez)}function Mz(e){const t=new Map;for(const[,n]of e)for(const e of n)t.set(e.id,e.index);return t}function kz(e,t,n){var r;for(const[o,i]of t)for(const t of i){const i=e.get(t.id);if(t.index!==i||t.group!==o||!(null==(r=n.get(o))?void 0:r.has(t)))return!0}return!1}var Dz="__default__";function Pz(e,t,n,r){const o=r<t?"afterend":"beforebegin";n.insertAdjacentElement(o,e)}function Tz(e,t){return e.index-t.index}function qz(e,t){return e.initialIndex-t.initialIndex}function Oz(e,t=Tz){return Array.from(e).sort(t)}var Lz=[hz,class extends bP{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof Yz){const{sortable:e}=n,{group:r}=e;let o=t.get(r);o||(o=new Set,t.set(r,o)),o.add(e)}return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:o,target:i}=r;if(!fz(o)||!fz(i))return;if(o.sortable===i.sortable)return;const a=t(),s=Mz(a),l=o.sortable.group===i.sortable.group,u=a.get(o.sortable.group),c=l?u:a.get(i.sortable.group);u&&c&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,d;const p=t();if(kz(s,a,p))return;const f=o.sortable.element,h=i.sortable.element;if(!h||!f)return;if(!l&&i.id===o.sortable.group)return;const m=Oz(u),g=l?m:Oz(c),b=null!=(r=o.sortable.group)?r:Dz,v=null!=(d=i.sortable.group)?d:Dz,y={[b]:m,[v]:g},x=Iz(y,e);if(y===x)return;const S=x[v].indexOf(o.sortable),w=x[v].indexOf(i.sortable);n.collisionObserver.disable(),Pz(f,S,h,w),$M(()=>{for(const[e,t]of x[b].entries())t.index=e;if(!l)for(const[e,t]of x[v].entries())t.group=i.sortable.group,t.index=e}),n.actions.setDropTarget(o.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:o}=r;fz(o)&&(o.sortable.initialIndex===o.sortable.index&&o.sortable.initialGroup===o.sortable.group||queueMicrotask(()=>{const e=t(),r=Mz(e),i=e.get(o.sortable.initialGroup);i&&n.renderer.rendering.then(()=>{const n=t();if(kz(r,e,n))return;const a=Oz(i),s=Oz(i,qz),l=o.sortable.element,u=a[s.indexOf(o.sortable)],c=null==u?void 0:u.element;u&&c&&l&&(Pz(l,u.index,c,o.index),$M(()=>{for(const t of e.values()){const e=Array.from(t).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],Nz={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1};function jz(e){var t,n;return"boolean"==typeof e?{draggable:e,droppable:e}:{draggable:null!=(t=null==e?void 0:e.draggable)&&t,droppable:null!=(n=null==e?void 0:e.droppable)&&n}}var _z,zz,Fz,$z,Bz,Hz,Vz,Wz,Uz=new class{constructor(){Jk(this,aD,new WeakMap)}get(e,t){var n;return e?null==(n=Xk(this,aD).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return Xk(this,aD).has(e)||Xk(this,aD).set(e,new Map),null==(r=Xk(this,aD).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=Xk(this,aD).get(e))?void 0:t.clear():void 0}};zz=[nD],_z=[nD];var Gz=class{constructor(e,t){dz(this,$z,sz(Fz,8,this)),sz(Fz,11,this),dz(this,Bz),dz(this,Hz),dz(this,Vz,sz(Fz,12,this)),sz(Fz,15,this),dz(this,Wz),this.register=()=>($M(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{$M(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{$M(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],disabled:o,group:i,index:a,sensors:s,type:l,transition:u=Nz,plugins:c}=n,d=((e,t)=>{var n={};for(var r in e)Z_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&J_)for(var r of J_(e))t.indexOf(r)<0&&Q_.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","disabled","group","index","sensors","type","transition","plugins"]);const p=nq(c,Lz),f=jz(o);this.droppable=new Yz(rz(nz({},d),{disabled:f.droppable}),t,this),this.draggable=new Kz(rz(nz({},d),{disabled:f.draggable,plugins:p,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializationPending)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&Uz.clear(this.manager),(null==r?void 0:r.dragging)&&Uz.set(this.manager,this.id,VM(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=cz(this,Hz),o=cz(this,Bz);e===r&&t===o||(pz(this,Hz,e),pz(this,Bz,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(AN))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:l,sensors:s}),t,this),pz(this,Wz,d.element),this.manager=t,this.index=a,pz(this,Hz,a),this.group=i,pz(this,Bz,i),this.type=l,this.transition=u}get initialIndex(){var e,t;return null!=(t=null==(e=Uz.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=Uz.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){VM(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;for(const e of r.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const o=this.refreshShape();if(!o)return;const i=n.boundingRectangle.left-o.boundingRectangle.left,a=n.boundingRectangle.top-o.boundingRectangle.top,{translate:s}=bO(r),l=qO(r,s,!1),u=qO(r,s);if(i||a){const n=kq(mq(r))?rz(nz({},t),{duration:0}):t;TO({element:r,keyframes:{translate:[`${l.x+i}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){$M(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){$M(()=>{const t=cz(this,Wz),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),pz(this,Wz,e)})}get element(){var e,t;const n=cz(this,Wz);if(n)return null!=(t=null!=(e=qq.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){const{disabled:e}=this.draggable,{disabled:t}=this.droppable;return e===t?e:{draggable:e,droppable:t}}set plugins(e){this.draggable.plugins=nq(e,Lz)}set disabled(e){const t=jz(e);$M(()=>{this.droppable.disabled=t.droppable,this.draggable.disabled=t.draggable})}set data(e){$M(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){this.droppable.id=e,this.draggable.id=e}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:WO}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){$M(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};Fz=[,,,U_(null)],$z=new WeakMap,Bz=new WeakMap,Hz=new WeakMap,Vz=new WeakMap,Wz=new WeakMap,lz(Fz,4,"index",zz,Gz,$z),lz(Fz,4,"group",_z,Gz,Vz),((e,t)=>{return tz(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(Fz,Gz);var Kz=class extends Pj{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},Yz=class extends Tj{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},Xz=Object.defineProperty,Jz=Object.defineProperties,Zz=Object.getOwnPropertyDescriptors,Qz=Object.getOwnPropertySymbols,eF=Object.prototype.hasOwnProperty,tF=Object.prototype.propertyIsEnumerable,nF=(e,t,n)=>t in e?Xz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function rF(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:o,data:i,element:a,handle:s,index:l,group:u,disabled:c,modifiers:d,sensors:p,target:f,type:h,plugins:m}=e,g=function(e){return null===e?null:nz(nz({},Nz),e)}(e.transition),b=t_(t=>new Gz(((e,t)=>Jz(e,Zz(t)))(((e,t)=>{for(var n in t||(t={}))eF.call(t,n)&&nF(e,n,t[n]);if(Qz)for(var n of Qz(t))tF.call(t,n)&&nF(e,n,t[n]);return e})({},e),{transition:g,register:!1,handle:qj(s),element:qj(a),target:qj(f)}),t)),v=_j(b,oF);return Fj(o,()=>b.id=o),Oj(()=>{$M(()=>{b.group=u,b.index=l})},[b,u,l]),Fj(h,()=>b.type=h),Fj(t,()=>b.accept=t,void 0,tD),Fj(i,()=>i&&(b.data=i)),Fj(l,()=>{var e;(null==(e=b.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&b.refreshShape()},zj),$j(s,e=>b.handle=e),$j(a,e=>b.element=e),$j(f,e=>b.target=e),Fj(c,()=>b.disabled=null!=c&&c,void 0,tD),Fj(p,()=>b.sensors=p,void 0,tD),Fj(n,()=>b.collisionDetector=n),Fj(r,()=>b.collisionPriority=r),Fj(m,()=>b.plugins=m,void 0,tD),Fj(g,()=>b.transition=g,void 0,tD),Fj(d,()=>b.modifiers=d,void 0,tD),Fj(e.alignment,()=>b.alignment=e.alignment),{sortable:v,get isDragging(){return v.isDragging},get isDropping(){return v.isDropping},get isDragSource(){return v.isDragSource},get isDropTarget(){return v.isDropTarget},handleRef:L(e=>{b.handle=null!=e?e:void 0},[b]),ref:L(e=>{var t,n;(e||!(null==(t=b.element)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.element=null!=e?e:void 0)},[b]),sourceRef:L(e=>{var t,n;(e||!(null==(t=b.source)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.source=null!=e?e:void 0)},[b]),targetRef:L(e=>{var t,n;(e||!(null==(t=b.target)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.target=null!=e?e:void 0)},[b])}}function oF(e,t,n){return!("isDragSource"!==e||n||!t)}const iF=({id:e,itemIndex:t,sectionIndex:n})=>Yt.jsx("div",{children:`${n}:${t} - ${e}`}),aF=z(({id:e,itemIndex:t,sectionIndex:n})=>{const r=Qg(PM),o=Qg(MM),i=Qg(CM).at(n)??0,a=Qg(EM)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:u}=rF({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[V_],plugins:[hz],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),c=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=o??iF;return Yt.jsx(of,{className:"section-item-container","data-testid":"section-item",onClick:c,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:Yt.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[Yt.jsx(k_,{isDragging:l,itemIndex:t,sectionIndex:n}),Yt.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:u}),t===i-1&&Yt.jsx(k_,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})}),sF=z(({sectionIndex:e})=>{const t=Qg(EM),n=Qg(CM).at(e)??0,r=t({sectionIndex:e});return Yt.jsxs(Sd,{className:"exploration-list",style:{overflow:"auto"},children:[Yt.jsx(mp,{}),Yt.jsx(T_,{id:r,sectionIndex:e}),Yt.jsx(mp,{}),Yt.jsx(P_,{sectionIndex:e}),Yt.jsx(Up,{sx:{padding:"2px 8px"},children:A_(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return Yt.jsx(aF,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),lF=[lj.configure({activationConstraints:[new oj.Distance({value:5})]}),rj],uF=z(()=>{const e=Qg(wM),t=Qg(EM),n=eb(LM("start")),r=eb(LM("over")),o=eb(LM("end"));return Yt.jsxs(Qj,{sensors:lF,onDragEnd:e=>{o(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[Yt.jsx(Sd,{style:{display:"flex",flexDirection:"column"},children:A_(e).map(e=>Yt.jsx(sF,{sectionIndex:e},t({sectionIndex:e})))}),Yt.jsx(M_,{})]})}),cF=z(e=>Yt.jsx(iM,{atoms:NM,atomFamilies:jM,children:Yt.jsx(_M,{props:e,children:Yt.jsx(uF,{})})})),dF=(e,t)=>{if(!e)return;const n=e.qHyperCube.qDimensionInfo.filter(e=>void 0!==e.cId).filter($A).map(({cId:e,qFallbackTitle:n})=>({id:e,title:n??"",alternative:t,type:"dimension"})),r=e.qHyperCube.qMeasureInfo.filter(e=>void 0!==e.cId).filter($A).map(({cId:e,qFallbackTitle:n})=>({id:e,title:n??"",alternative:t,type:"measure"}));return[...n,...r]},pF=(e,t)=>{const n=[],r={};return e.forEach(e=>{r[e.id]=e}),Object.keys(t).forEach(e=>{const o=t[e],i=r[e];i&&(n[o]=i)}),n},fF=(e,t,n)=>{if(!n||((e,t)=>{const n=e.map(e=>e.id).sort(),r=Object.keys(t).sort();return n.join(",")!==r.join(",")})(e,n)){const t=(e=>{const t={};return e.forEach((e,n)=>{t[e.id]=n}),t})(e);return pF(e,t)}const r=t.map(e=>e.id),o=Object.keys(n).sort((e,t)=>n[e]-n[t]).filter(e=>r.includes(e)),i={...n};for(let e=0;e<r.length;e++){const t=o[e],a=r[e];t!==a&&(i[a]=n[t])}let a=0;const s=Object.entries(i).sort((e,t)=>e[1]-t[1]).map(([e])=>[e,a++]);return s.forEach(([e,t])=>{i[e]=t}),pF(e,i)},hF=$g(e=>{const t=e(YA);return dF(t,!0)}),mF=$g(e=>{const t=e(KA);return dF(t,!1)}),gF=$g(e=>{const t=e(XA),n=e(KA);if(!t||!n)return[];const r=e(mF),o=e(hF),i=n.qHyperCube.qColumnOrder??[],a=e(WA);if(void 0===o||void 0===r)return[];if(a){return[...[...r,...o]].sort((e,t)=>(a[e.id]??1/0)-(a[t.id]??1/0))}const s=t.qHyperCubeDef.qLayoutExclude?.allColumnOrder??{},l=((e,t)=>e.length===t?e:Array.from(Array(t).keys()))(i,r.length),u=((e,t)=>e.length>0?e.map(e=>t[e]):t)(l,r),c=[...u,...o];return fF(c,u,s)}),bF=$g(e=>{const t=e(gF),n=e(qA);return t.filter(n)}),vF=$g(e=>e(bF).length),yF=$g(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(bF);if(void 0===n)return`columns-section-${t}`;const o=r?.[n];return o?.id??`missing-item-${t}-${n}`}),xF=yM(e=>$g(t=>t(bF)[e]),(e,t)=>e===t),SF=$g(e=>e(gF).map(e=>e.id)),wF=$g(e=>e(bF).map(e=>e.id)),CF=$g(e=>{const t=e(gF),n={};return t.forEach(e=>{n[e.id]=e.type}),n}),EF=$g(null,(e,t,{event:n,id:r,toIndex:o})=>{const i=e(MA),a=e(LA),s=e(SF),l=e(wF);if(void 0===i||null===a||void 0===s||void 0===l)return;if(n.operation.canceled)return;const u=l[o];if(!u)return;const c=((e,t,n)=>{const r=n.findIndex(t=>t===e),o=n.findIndex(e=>e===t);if(-1===r||-1===o||r===o)return n;const i=[...n],[a]=i.splice(r,1);return i.splice(o,0,a),i})(r,u,s);t(WA,Object.fromEntries(c.map((e,t)=>[e,t]))),a.add(async()=>{i.updateColumnOrders(c)})}),RF="ChartExploration.Table.ColumnSectionEmpty.Title",AF="ChartExploration.Table.NoColumnsFound.Title",IF="#177fe6",MF=$g(e=>{const t=e(DA),n=e(TA).length>0,r=(e=>e?AF:RF)(n),o=(e=>e?"":"ChartExploration.Table.ColumnSectionEmpty.Message")(n);return()=>({title:t(r),message:""===o?"":t(o)})}),kF=({itemIndex:e})=>{const t=Qg(xF(e));if(!t)return null;const n=t.title;return Yt.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})},DF=$g(e=>{const t=e(wF),n=e(iI),r=t.filter(e=>n.has(e)).length;return 0===t.length?"disabled":0===r?"none":r===t.length?"all":"some"}),PF=$g(null,(e,t)=>{const n=e(wF),r=e(iI),o="all"!==e(DF)&&"disabled"!==e(DF),i=[],a=new Set(e(tI)),s=new Set(e(nI));if(o){const t=new Set(n.filter(e=>!r.has(e)));i.push(...Array.from(t).map(t=>({id:t,isAlternative:!0,type:e(CF)[t]}))),i.forEach(e=>a.add(e.id)),i.forEach(e=>s.delete(e.id))}else{const t=new Set(n.filter(e=>r.has(e)));i.push(...Array.from(t).map(t=>({id:t,isAlternative:!1,type:e(CF)[t]}))),i.forEach(e=>a.delete(e.id)),i.forEach(e=>s.add(e.id))}t(tI,a),t(nI,s),AA({items:i,handler:e(MA),model:e(IA),handlerQueue:e(LA),logToSentry:e(bb)})}),TF=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},qF=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,OF=e=>{const{currentTarget:t}=e,n=qF(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=r.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},LF=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===Xm.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},NF=(e,t)=>{const{key:n}=e;switch(n){case Xm.Tab:e.shiftKey||(Em(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),o=r?.getElementsByClassName("exploration-item-focus")[0];o&&TF(o)})(e,t));break;case Xm.Down:(e=>{e.preventDefault();const t=e.currentTarget.closest(".exploration-list"),n=t?.getElementsByClassName("exploration-item-focus")[0];n&&TF(n)})(e);break;case Xm.Enter:case Xm.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},jF=({children:e})=>Yt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),_F=({children:e})=>{const t=D(null),n=Qg(DF),[,r]=tb(PF),o=Qg(DA),i={ref:t,toggleAllCheckboxes:r,checkState:n};return Yt.jsxs(Sd,{ref:t,"aria-label":o("Common.Columns"),className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{NF(e,i)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${IF} inset`}},children:[Yt.jsx(Gd,{inputProps:{"aria-label":o("ChartExploration.Header.ToggleAll"),..."some"===n&&{"aria-checked":"mixed"}},disabled:"disabled"===n,checked:"all"===n,indeterminate:"some"===n,onChange:r,size:"small",style:{flexShrink:0,padding:9}}),Yt.jsx(jF,{children:e})]})},zF=()=>{const e=Qg(DA);return Yt.jsx(_F,{children:e("Common.Columns")})},FF=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),$F=F((e,t)=>Yt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:[Yt.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"}),Yt.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"})]})),BF=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),HF=Du("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),VF=Du(BF)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${IF} inset`}})),WF=e=>{const t=e.key===Xm.Down?(e=>{const{currentTarget:t,key:n}=e,r=qF(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(r)[0];return i||(i=LF(t,n),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):OF(e);t&&TF(t)},UF=(e,t)=>{const{key:n}=e;switch(n){case Xm.Tab:if(e.shiftKey)Em(e),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&TF(e))}const n=OF(e);n&&TF(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void TF(t);const r=OF(e);r&&TF(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return TF(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&TF(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&TF(n),!0}const o=LF(n,r);if(!o)return!1;TF(o)}return!0})(e,t);n?Em(e):e.stopPropagation()}break;case Xm.Enter:case Xm.Space:Em(e),((e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&TF(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void TF(e)}n===t.items.explorationItemFocusRef.current&&t.toggleItem()})(e,t);break;case Xm.Down:case Xm.Up:Em(e),WF(e)}},GF=({children:e})=>Yt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),KF={dimension:FF,measure:$F},YF=({id:e,dragHandleRef:t,title:n,type:r,itemIndex:o})=>{const[i,a]=tb(iI),s=Qg(DA),l=D(null),u=D(null),c=D(null);q(()=>{t&&l.current&&t(l.current)},[t]);const d=KF[r],p=!i.has(e),f={id:e,itemIndex:o,toggleItem:()=>{a({id:e,isAlternative:p,type:r})},items:{explorationItemRef:l,explorationItemFocusRef:u,draggableIconRef:c}};return Yt.jsxs(Sd,{ref:l,className:"exploration-item",onClick:t=>{t.stopPropagation(),-1!==e&&a({id:e,isAlternative:p,type:r})},onKeyDown:e=>{UF(e,f)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:n,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${IF} inset`}},children:[Yt.jsxs(Sd,{ref:u,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{UF(e,f)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${IF} inset`}},children:[Yt.jsx(Gd,{checked:i.has(e),"aria-label":s("ChartExploration.ListItem.Label",n),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0}}),Yt.jsx(Sd,{children:Yt.jsx(d,{height:12,style:{opacity:1,marginRight:"8px"}})}),Yt.jsx(GF,{children:n})]}),Yt.jsx(VF,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{UF(e,f)}})]})},XF=({id:e,itemIndex:t,dragHandleRef:n})=>{const r=Qg(xF(t));return r?Yt.jsx(YF,{id:e,dragHandleRef:n,title:r.title,type:r.type,itemIndex:t}):null},JF=()=>{const e=Qg(vF),t=Qg(MF),n=Qg(JA),r=Qg(yF),o=eb(EF);return!n&&Yt.jsx(cF,{numberOfSections:1,numberOfItemsInSection:[e],keyExtractor:r,emptyTexts:t,onDragEnd:o,dragOverlayRenderer:kF,headerRenderer:zF,itemRenderer:XF})},ZF=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),QF=()=>{const[e,t]=tb(TA),n=Qg(DA),r=w.useRef(null),o=Qg(vF),i=L(e=>{t(e.target.value)},[t]),a=0===e.length||0===o?n("Common.Search.NoResultsAvailable"):n("ChartExploration.Table.Search.ResultsFound",o.toString());return Yt.jsxs(Sd,{ref:r,style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[Yt.jsx(HF,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:a}),Yt.jsx(ih,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":n("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:n("Common.Search"),onChange:i,startAdornment:Yt.jsx(Op,{position:"start",children:Yt.jsx(ZF,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},e$=e=>{const t=hm();return Yt.jsx(Tu,{theme:t,children:Yt.jsx(Gg,{children:Yt.jsx(aI,{props:e,children:Yt.jsxs(Sd,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[Yt.jsx(QF,{}),Yt.jsx(JF,{})]})})})})},t$=e=>e.flags.isEnabled("VNA-655-STRAIGHT_TABLE_NEW_EXPLORATION")?{component:e$,classification:{tags:["exploration"],exclusive:!0}}:{component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}};var n$=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(n$||{}),r$=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(r$||{}),o$=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(o$||{}),i$=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(i$||{});const a$=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,s$=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case o$.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case n$.BEGINNING_OF_WORD:t="*^",n="*";break;case n$.ENDS_WITH:t="*";break;case n$.STARTS_WITH:n="*";break;case n$.MATCHES_EXACTLY:break;case n$.CONTAINS:default:t="*",n="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${n}"`:""})(e);break;case o$.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===r$.GENERAL,r=t?.modifier?.type===i$.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";n&&r?(i=`${t.conditionField?.aggregator}(${a$(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(i="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(i=`${t.conditionField?.aggregator}(${a$(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${a$(t.firstValue?.field)})`):(i=`${a$(e.field)}`,a=`${t.firstValue?.aggregator}(total ${a$(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let u="";if(o.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${a$(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${a$(t.secondValue?.field)})`,a=` and ${i}`),u=`${a}${o[1]}${e}`}return`"${l}${u}"`})(e);break;case o$.CLEAR_SELECTION:t=`[${e.field}]=`,r="",o="";break;case o$.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${o}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},l$=[];for(let e=0;e<256;++e)l$.push((e+256).toString(16).slice(1));const u$=new Uint8Array(16);function c$(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(u$);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(l$[e[t+0]]+l$[e[t+1]]+l$[e[t+2]]+l$[e[t+3]]+"-"+l$[e[t+4]]+l$[e[t+5]]+"-"+l$[e[t+6]]+l$[e[t+7]]+"-"+l$[e[t+8]]+l$[e[t+9]]+"-"+l$[e[t+10]]+l$[e[t+11]]+l$[e[t+12]]+l$[e[t+13]]+l$[e[t+14]]+l$[e[t+15]]).toLowerCase()}(t)}(e)}const d$=()=>crypto?.randomUUID?.()??c$(),p$=({qDimensions:e,qMeasures:t})=>[...e.map(e=>({id:e.qDef.cId,isDimension:!0,def:e})),...t.map(e=>({id:e.qDef.cId,isDimension:!1,def:e}))],f$=({previousColumns:e,nextColumns:t,qInterColumnSortOrder:n})=>{const r=new Map(e.map((e,t)=>[t,e.qDef.cId])),o=new Map(t.map((e,t)=>[e.qDef.cId,t]));return n.map(e=>{const t=r.get(e);return(void 0===t?void 0:o.get(t))??e})};class h$ extends u{#u;constructor(e,t){super(e),this.#u=t}#c(e){const t=this.hcProperties.qLayoutExclude?.allColumnOrder??{},n=Object.keys(t).length;this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:{...t,...Object.fromEntries(e.map((e,t)=>[e,n+t]))}}}#d(e){const t=this.hcProperties.qLayoutExclude?.allColumnOrder??{},n=Object.entries(t).filter(([t])=>!e.includes(t));this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:Object.fromEntries(n.map(([e],t)=>[e,t]))}}#p(e,t){const n=this.hcProperties.qLayoutExclude?.allColumnOrder??{},r={};for(const[o,i]of Object.entries(n))r[o===e?t:o]=i;this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:r}}async addDimension(e,t=!1){const n=await this.addDimensions([e],t);return 0===n.length?void 0:n[0]}async addDimensions(e,t=!1){const n=await super.addDimensions(e,t);return this.#c(n.map(e=>e.qDef.cId)),n}async removeDimension(e,t=!1){const n=await this.removeDimensions([e],t);return 0===n.length?void 0:n[0]}async removeDimensions(e,t=!1){const n=await super.removeDimensions(e,t);return this.#d(n.map(e=>e.qDef.cId)),n}async replaceDimension(e,t){const n=this.getDimensions()[e].qDef.cId,r=await super.replaceDimension(e,t),o=r.qDef.cId;return this.#p(n,o),r}async addMeasure(e,t=!1){const n=await this.addMeasures([e],t);return 0===n.length?void 0:n[0]}async addMeasures(e,t=!1){const n=await super.addMeasures(e,t);return this.#c(n.map(e=>e.qDef.cId)),n}async removeMeasure(e,t=!1){const n=await this.removeMeasures([e],t);return 0===n.length?void 0:n[0]}async removeMeasures(e,t=!1){const n=await super.removeMeasures(e,t);return this.#d(n.map(e=>e.qDef.cId)),n}async replaceMeasure(e,t){const n=this.getMeasures()[e].qDef.cId,r=await super.replaceMeasure(e,t),o=r.qDef.cId;return this.#p(n,o),r}async#f(e){const t=this.getMeasure(e);if(t){const n=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e);if(-1===n)return;await super.removeMeasure(n,!0),await super.addMeasure(t,!1,this.getMeasures().length)}}async#h(e){const t=this.getMeasure(e);if(t){const n=this.getMeasures().findIndex(t=>t.qDef.cId===e);if(-1===n)return;await super.removeMeasure(n,!1),await super.addMeasure(t,!0,this.getAlternativeMeasures().length)}}async#m(e){const t=this.getDimension(e);if(t){const n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n)return;await super.removeDimension(n,!0),await super.reinsertDimension(t,!1,this.getDimensions().length)}}async#g(e){const t=this.getDimension(e);if(t){const n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n)return;await super.removeDimension(n,!1),await super.addDimension(t,!0,this.getAlternativeDimensions().length)}}#b(){const e=this.hcProperties.qLayoutExclude?.allColumnOrder??{};return Object.entries(e).sort((e,t)=>e[1]-t[1]).map(([e])=>e)}async moveDimensionFromAlternative(e){await this.#m(e);const t=this.#b();this.updateColumnOrders(t)}async moveDimensionToAlternative(e){await this.#g(e);const t=this.#b();this.updateColumnOrders(t)}async moveMeasureFromAlternative(e){await this.#f(e);const t=this.#b();this.updateColumnOrders(t)}async moveMeasureToAlternative(e){await this.#h(e);const t=this.#b();this.updateColumnOrders(t)}async toggleAlternatives(e,t){for(const t of e)"dimension"===t.type?await(t.isAlternative?this.#m(t.id):this.#g(t.id)):await(t.isAlternative?this.#f(t.id):this.#h(t.id));this.updateColumnOrders(t)}updateColumnOrders(e){const t=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:n,nextAllColumnOrderById:r})=>{const o=p$({qDimensions:e,qMeasures:t}),i=[...e,...t],a=new Map(r.map((e,t)=>[e,t])),s=o.toSorted((e,t)=>{const n=a.get(e.id),r=a.get(t.id);return void 0===n||void 0===r?0:n-r}),l=s.filter(e=>e.isDimension).map(e=>e.def),u=s.filter(e=>!e.isDimension).map(e=>e.def),c=[...l,...u],d=new Map(c.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:l,qMeasures:u,qInterColumnSortOrder:f$({previousColumns:i,nextColumns:c,qInterColumnSortOrder:n}),qColumnOrder:s.map(e=>d.get(e.id)).filter(e=>void 0!==e)}})({qDimensions:this.hcProperties.qDimensions,qMeasures:this.hcProperties.qMeasures,qInterColumnSortOrder:this.hcProperties.qInterColumnSortOrder,nextAllColumnOrderById:e});this.hcProperties.qDimensions=t.qDimensions,this.hcProperties.qMeasures=t.qMeasures,this.hcProperties.qColumnOrder=t.qColumnOrder,this.hcProperties.qInterColumnSortOrder=t.qInterColumnSortOrder,this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:e.reduce((e,t,n)=>(e[t]=n,e),{})}}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:d$(),qTags:Array.isArray(t)?t:[],isNumeric:n};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=s$(o),i}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#v(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=s$(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#v(e);return n}getLabels(){return this.getMeasures().reduce((e,t)=>(!t.qLibraryId&&t.qDef.qLabel&&e.push(t.qDef.qLabel),e),[])}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}const m$=(e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;return e.splice(n,1),n};function g$(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function b$(e){return e>0?0:1}function v$(e){return e.translator.get("Visualizations.Descriptions.Column")}function y$(e){return{measures:{min:b$,max:1e3,description:()=>v$(e),add(e,t,n){const{qColumnOrder:r}=n.hcProperties;g$(r,n.getDimensions().length+n.getMeasures().length-1)},remove(e,t,n,r){const{qColumnOrder:o}=n.hcProperties,i=(n.hcProperties.qDimensions?n.hcProperties.qDimensions.length:0)+r;m$(o,i)}},dimensions:{min:b$,max:1e3,description:()=>v$(e),add(e,t,n){const{qColumnOrder:r}=n.hcProperties;return g$(r,n.getDimensions().length-1),e},remove(e,t,n,r){if(e?.isAlternative)return;const{qColumnOrder:o}=n.hcProperties;m$(o,r)}}}}const x$=e=>{const t=new h$({},e.translator),n=hb(e);return{properties(r){if(!(e=>"qHyperCubeDef"in e&&"sn-table"===(({visualization:e,qInfo:t})=>e??t?.qType)(e))(r))return r;const{qHyperCubeDef:o}=r,i=o.qLayoutExclude?.qHyperCubeDef,a=e.flags.isEnabled("qcb-35151-fix-duplicate-columns"),s=new Set,l=[];let u=0,c=0,d=0;[...o.qDimensions,...o.qMeasures,...i?.qDimensions??[],...i?.qMeasures??[]].forEach(e=>{u++;const t=e.qDef?.cId;if((e=>"string"==typeof e&&e.length>0)(t))if(s.has(t)){if(c++,a){const t=d$();e.qDef={...e.qDef,cId:t},l.push(t)}}else s.add(t),l.push(t);else if(d++,a){const t=d$();e.qDef={...e.qDef,cId:t},l.push(t)}});const p=c+d;if(0===p)return r;n.warn({msg:"migrate: column cId issues detected",payload:{issueCount:p,totalColumnCount:u,duplicateCount:c,missingCount:d}});const f=r.components?.find(e=>"theme"===e.key);return e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&f?.nullValues&&!f.dimensionNullValues&&(f.dimensionNullValues={...f.nullValues}),a?(t.setProperties(r),t.updateColumnOrders(l),n.warn({msg:"migrate: column cId cleanup completed",payload:{replacementCount:p}}),r):r}}};let S$=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.Bar="bar",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),w$=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const C$=e=>{switch(e?.type){case"url":return S$.Link;case"image":return S$.Image;case"indicator":return S$.Indicator;case"miniChart":return S$.MiniChart;case"bar":return S$.Bar;default:return S$.Text}},E$=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),R$=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>C$(e.qDef.representation)===S$.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},A$=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:E$({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>C$(e.qDef.representation)===S$.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>C$(e.qDef.representation)===S$.Link&&e.qDef.representation?.urlPosition===w$.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>C$(e.qDef.representation)===S$.Link&&e.qDef.representation?.urlPosition===w$.Attribute},...R$(n)}},I$=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[S$.Image],i=!r?.("qMiniChartDef")&&t[S$.MiniChart],a=!r?.("tableIndicators")&&t[S$.Indicator],s=!!t[S$.Bar],l=o&&t[S$.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&l)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),s&&n.push({value:"bar",translation:"SNTable.Bar.Representation"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>C$(e.qDef.representation)===S$.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}},M$=(e,t,n)=>({type:"string",component:"expression",expressionType:"measure",ref:"qAttributeExpressions",schemaIgnore:!0,translation:t,defaultValue:"",tid:`${e}ByExpression`,show:n,convertFunctions:{get:(t,n,r,o)=>o.qAttributeExpressions?.find(t=>t.id===e)?.qExpression??"",set:(t,n,r,o,i)=>{const a=i.qAttributeExpressions??[],s=a.findIndex(t=>t.id===e);s>=0?t?a[s].qExpression=t:a.splice(s,1):t&&a.push({id:e,qExpression:t,qAttribute:!0}),i.qAttributeExpressions=a}}}),k$=(e,t)=>e?.qDef?.representation?.[t],D$=e=>C$(e?.qDef?.representation)===S$.Bar,P$=[{value:"solid",translation:"SNTable.Bar.SingleColor"},{value:"expression",translation:"SNTable.Bar.ByExpression"}],T$=(e,t,n)=>({component:"expression",ref:"qExpression",expressionType:"measure",translation:t,defaultValue:"",id:e,tid:n,show:!1}),q$=e=>{if(!e[S$.Bar])return{};const t=e=>D$(e)&&"manual"===k$(e,"barRangeMode");return{barColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barColorMode",translation:"SNTable.Bar.BarColor",defaultValue:"solid",show:D$,tid:"barColorMode",options:P$},barColor:{ref:"qDef.representation.barColor",type:"object",component:"color-picker",translation:"SNTable.Bar.BarColor",defaultValue:{index:6,color:null},show:e=>D$(e)&&"expression"!==k$(e,"barColorMode"),tid:"barColor",dualOutput:!0},barColorExpression:M$("barColor","SNTable.Bar.ColorExpression",e=>D$(e)&&"expression"===k$(e,"barColorMode")),barLabelColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barLabelColorMode",translation:"SNTable.Bar.LabelColor",defaultValue:"solid",show:D$,tid:"barLabelColorMode",options:P$},barLabelColor:{ref:"qDef.representation.barLabelColor",type:"object",component:"color-picker",translation:"SNTable.Bar.LabelColor",show:e=>D$(e)&&"expression"!==k$(e,"barLabelColorMode"),tid:"barLabelColor",dualOutput:!0},barLabelColorExpression:M$("barLabelColor","SNTable.Bar.LabelColorExpression",e=>D$(e)&&"expression"===k$(e,"barLabelColorMode")),barWidthExpression:M$("barWidth","SNTable.Bar.WidthExpression",D$),barOffsetExpression:M$("barOffset","SNTable.Bar.OffsetExpression",D$),barLabelExpression:M$("barLabel","SNTable.Bar.LabelExpression",D$),barRangeMode:{type:"string",component:"dropdown",ref:"qDef.representation.barRangeMode",translation:"SNTable.Bar.Range",defaultValue:"auto",show:D$,tid:"barRangeMode",options:[{value:"auto",translation:"Common.Auto"},{value:"manual",translation:"Common.Custom"}]},barRangeMin:{type:"number",ref:"qDef.representation.barRangeMin",translation:"SNTable.Bar.RangeMin",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:t,tid:"barRangeMin"},barRangeMax:{type:"number",ref:"qDef.representation.barRangeMax",translation:"SNTable.Bar.RangeMax",expressionType:"ValueExpression",expression:"optional",defaultValue:100,show:t,tid:"barRangeMax"},barEnd:{type:"string",component:"dropdown",ref:"qDef.representation.barEnd",translation:"SNTable.Bar.End",defaultValue:"none",show:D$,tid:"barEnd",options:[{value:"none",translation:"SNTable.Bar.End.None"},{value:"circle",translation:"SNTable.Bar.End.Circle"},{value:"box",translation:"SNTable.Bar.End.Square"}]}}};var O$,L$={};var N$=(O$||(O$=1,function(e){(()=>{var t={828(e,t,n){n.r(t),n.d(t,{default:()=>Re});var r=n.cjs(function(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,o=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=u(d,n),d!==(o=u(t,n))&&(h&&o&&(s(o)||(i=a(o)))?(i?(i=!1,c=r&&a(r)?r:[]):c=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,c,o)})):void 0!==o&&l(d,{name:n,newValue:o}));return d}}),o=n.n(r);const i=(e,t,n)=>{if(!t)return!1;const r=t.split("."),o=r[r.length-1];let i,a=e;for(i=0;i<r.length-1;++i)void 0===a[r[i]]&&(a[r[i]]=Number.isNaN(+r[i+1])?{}:[]),a=a[r[i]];if(void 0!==n){const e=a[o];return a[o]=n,{updated:n,previous:e}}return delete a[o],!1},a=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i},s={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]},l=" ( ",u=" ) ";function c(e){return l+e+u}function d(e,t={}){if(e.qLibraryId){const n=function(e,t){if(!t)return null;let n,r;for(n=0;n<t.length;n++)if(r=t[n],r.qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}const n=function(e,t){if(!t)return null;let n,r;const o=function(e){let t=e.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);for(n=0;n<t.length;n++){if(r=t[n],r.qName===o)return r;if(r.qDerivedFieldData)for(let e=0;e<r.qDerivedFieldData.qDerivedFieldLists.length;++e){const t=r.qDerivedFieldData.qDerivedFieldLists[e];for(let e=0;e<t.qFieldDefs.length;++e){const n=t.qFieldDefs[e];if(n.qName===o)return n}}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){const{crossAllDimensions:n}=e;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){const t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function m(e=0){return`[$(=Replace(GetObjectField(${e}),']',']]'))]`}function g(e,t){const{crossAllDimensions:n}=e;return 2===t&&n?"Above(Total ":"Above("}function b(e){return void 0===e?")":`, 0, ${e})`}function v(e){return`Replace(Replace(${e},'''',''''''),'$','$''&''')`}function y(e,t){return e?`${t}={">=$(=Min(${t}))<=$(=Max(${t}))"}`:`${t}={"=Only({1}${t})>='$(=${v(`MinString(${t})`)})' and Only({1}${t})<='$(=${v(`MaxString(${t})`)})'"}`}function x({modifier:e={},dimensions:t,dimensionAndFieldList:n,funcComp:r="Sum",valueComp:o="0"}){const{showExcludedValues:i}=e;if(!i)return"";if(t&&1===t.length)return`${r}({1<${y(d(t[0],n),m(0))}>}${o})`;if(t&&2===t.length){const e=d(t[0],n),i=d(t[1],n),a=m(0),s=m(1);return`${r}({1<${y(e,a)},${y(i,s)}>}${o})`}return`${r}({1}${o})`}function S(e){return`${e}(`}function w({properties:e,layout:t}){return a(e,"qHyperCubeDef.qDimensions",a(t,"qHyperCube.qDimensionInfo",[])).length}const C={isFullRange:p,getNumDimensions:w,getExpressionWithExcludedComp:function({expression:e,modifier:t,dimensions:n,dimensionAndFieldList:r,treatMissingAsNull:o}){const i=c(h(e)),{showExcludedValues:a}=t;if(!a)return i;const s=x({modifier:t,dimensions:n,dimensionAndFieldList:r}),l=o?"":", 0";return n&&1===n.length?`If(Count(${m(0)}) > 0, ${i} + ${s}${l})`:n&&2===n.length?`If(Count(${m(0)}) * Count(${m(1)}) > 0, ${i} + ${s}${l})`:i},getRowNoComp:f,getNumStepComp:function(e,t){if(!p(e)){const{steps:t}=e;return"number"!=typeof t||Number.isNaN(t)?6:t}return f(e,t)},getAboveCompPrefix:g,getAboveCompSuffix:b,getAboveComp:function(e,t,n,r){return g(e,t)+n+b(r)},getFunctionPrefix:S,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return S(e)+t+")"},getAggrComp:function(e,t,n){return`Aggr(${e}, ${t}, ${n})`},getExcludedComp:x,needDimension:function({modifier:e,properties:t,layout:n}){return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(e)&&2===w({properties:t,layout:n})},getDimComp:function(e,t){const n=function(e,t=0){return e[t].qDef.qSortCriterias[0]}(e,t),r=m(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;const o=["Descending","Ascending"],i=n.qSortByNumeric?`(Numeric, ${o[(n.qSortByNumeric+1)/2]})`:"",a=n.qSortByAscii?`(Text, ${o[(n.qSortByAscii+1)/2]})`:"";return n.qSortByNumeric&&n.qSortByAscii?`(${r}, ${i}, ${a})`:n.qSortByNumeric?`(${r}, ${i})`:n.qSortByAscii?`(${r}, ${a})`:r},simplifyExpression:h,extractInputExpression:function({outputExpression:e,modifier:t}){if(!t)return;const n=e.indexOf(l);if(-1===n)return;const r=e.indexOf(u);return-1!==r?e.substring(n+3,r):void 0},initModifier:function(e,t){Object.keys(t).forEach(n=>{void 0===e[n]&&(e[n]=t[n])})},isNumeric:d,isApplicable:function({properties:e,layout:t,minDimensions:n=1,maxDimensions:r=2}){if(!e&&!t)return!0;const o=w({properties:e,layout:t});return o>=n&&o<=r},getExpressionWithMarkers:c,canExtract:function(e){const t=e.indexOf(l),n=e.indexOf(u);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){return`[${e?e.replace(/]/g,"]]"):e}]`},generateTSDExpression:function(e,t,n){let r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){const o=n.qHyperCubeDef.qMeasures.find(t=>t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null);o&&t!==o.qDef.qLabel&&(r=o.qLibraryId||o.qDef.base.qLibraryId?`[${o.qDef.qLabel}]`:o.qDef.base.qDef);const i=function(e){const t=s.OPTIONS.find(t=>t.value===e.decomposition);return t?s.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r=`${i}(${r}, ${e.steps})`}return r},getDecomposition:function(e){let t="observed";return Object.values(s.EXPRESSIONS).find(n=>{const r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return s.EXPRESSIONS[n]&&r.includes(s.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}},E=o().bind(null,!0),R={},{isArray:A}=Array;function I(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function M(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function D(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach((t,o)=>{if(o===n.length)return;r=+t;const i=Number.isNaN(r)?{}:[];e[r||t]=M(e[r||t])?i:e[t],e=e[r||t]}),e}function P(e,t){let n=!0;if(I(e)&&I(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(r=>{P(e[r],t[r])||(n=!1)}),n);if(A(e)&&A(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!P(e[n],t[n]))return!1;return!0}return e===t}R.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(o=>{const i=function(e){return e?E({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;P(i,a)||k(t,o)||(M(a)?r.push({op:"add",path:s,value:i}):I(i)&&I(a)?r=r.concat(R.generate(a,i,s)):A(i)&&A(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]&&M(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(P(t,o))return r;if(!M(t[0])&&M(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(R.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=>{M(t[o])&&!k(e,o)&&r.push({op:"remove",path:`${n}/${o}`})}),r},R.apply=function(e,t){t.forEach(t=>{let n=D(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&Number.isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(A(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(A(o)&&A(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(I(o)&&I(t.value))a=o,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!k(a,e)&&delete a[e]}),E(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=D(e,t.from);A(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(A(n)?n.splice(+r,1):delete n[r]);var a})},R.clone=function(e){return E({},e)},R.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},R.updateObject=function(e,t){Object.keys(e).length?R.apply(e,R.generate(e,t)):E(e,t)};const T=R,q={saveSoftProperties(e,t,n){if(!e)return Promise.resolve();let r=T.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(r,!0)):Promise.resolve()}},O="accumulation";function L(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===O)return n[e]}function N(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===O)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}const j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},_={translationKey:"properties.modifier.accumulation",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression({expression:e,modifier:t,properties:n,layout:r,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:n,layout:r}));const l=a(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i}),c=C.getNumStepComp(t,s),d=C.getAboveComp(t,s,u,c);let p=C.getRangeComp("RangeSum",d);if(C.needDimension({modifier:t,properties:n,layout:r})){const e=C.getDimComp(l,1),n=C.getDimComp(l,0),r=C.getAggrComp(p,e,n);p=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:l,dimensionAndFieldList:i,valueComp:r}):r}return p},extractInputExpression:C.extractInputExpression,initModifier(e){C.initModifier(e,j)},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${N(t,e)}.accumulationDimension`,type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options(e,t){const{qDimensionInfo:n}=t.layout.qHyperCube;return n.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${N(t,e)}.crossAllDimensions`,type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},fullRange:{refFn:t=>`${N(t,e)}.fullAccumulation`,type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:t=>`${N(t,e)}.steps`,type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change(t){const n=L(t,e);if(n){const{steps:e}=n;n.steps="number"!=typeof e||Number.isNaN(e)?6:Math.abs(e)}},show(t){const n=L(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:t=>`${N(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;const i=L(t,e);return i&&!i.disabled}}}},z="movingAverage";function F(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===z)return n[e]}function $(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===z)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}const B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},H={translationKey:"properties.modifier.movingAverage",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression({expression:e,modifier:t,properties:n,layout:r,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s,l=o;void 0===l&&(l=C.getNumDimensions({properties:n,layout:r}));const u=a(n,"qHyperCubeDef.qDimensions",[]),c=t.showExcludedValues&&t.nullSuppression,d=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:u,dimensionAndFieldList:i,treatMissingAsNull:c}),p=C.getNumStepComp(t,l),f=C.getAboveComp(t,l,d,p);if(t.nullSuppression)s=C.getRangeComp("RangeAvg",f);else{const e=C.getRangeComp("RangeSum",f),n=function(e,t){const n=C.getRowNoComp(e,t);if(!C.isFullRange(e)){const{steps:t}=e;return`RangeMin(${"number"!=typeof t||Number.isNaN(t)?6:t}, ${n})`}return n}(t,l);s=`${e} / ${n}`}let h=s;if(C.needDimension({modifier:t,properties:n,layout:r})){const e=C.getDimComp(u,1),n=C.getDimComp(u,0),r=C.getAggrComp(h,e,n);h=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:u,dimensionAndFieldList:i,funcComp:"Only",valueComp:r}):r}return h},extractInputExpression:C.extractInputExpression,initModifier(e){C.initModifier(e,B)},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${$(t,e)}.primaryDimension`,type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options(e,t){const{qDimensionInfo:n}=t.layout.qHyperCube;return n.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${$(t,e)}.crossAllDimensions`,type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},fullRange:{refFn:t=>`${$(t,e)}.fullRange`,type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:t=>`${$(t,e)}.steps`,type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change(t){const n=F(t,e);if(n){const{steps:e}=n;n.steps="number"!=typeof e||Number.isNaN(e)?6:Math.abs(e)}},show(t){const n=F(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:t=>`${$(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:t=>`${$(t,e)}.nullSuppression`,type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;const i=F(t,e);return i&&!i.disabled}}}},V="timeSeriesDecomposition";function W(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===V)return n[e]}function U(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===V)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}const G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""},K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression:({expression:e,modifier:t,properties:n})=>t?C.generateTSDExpression(t,e,n):e,extractInputExpression:C.extractInputExpression,initModifier(e,t){C.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=C.getDecomposition(t))},propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{decomposition:{refFn:t=>`${U(t,e)}.decomposition`,type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:s.OPTIONS},steps:{refFn:t=>`${U(t,e)}.steps`,type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change(t,n){const r=W(t,e);if(r){const{steps:e}=r;r.steps="number"!=typeof e||Number.isNaN(e)?2:Math.abs(e),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(t=>(t.qDef.modifiers.map(t=>("timeSeriesDecomposition"===t.type?t.steps=e:t.steps=t.steps,t)),t))}},show(t){const n=W(t,e);return n&&!n.fullRange}}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;const i=W(t,e);return i&&!i.disabled}}}},Y="difference";function X(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===Y)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}const J={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Z={translationKey:"properties.modifier.difference",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),extractInputExpression:C.extractInputExpression,generateExpression({expression:e,modifier:t,properties:n,layout:r,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:n,layout:r}));const l=a(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i});let c=`${u} - ${C.getAboveComp(t,s,u)}`;if(C.needDimension({modifier:t,properties:n,layout:r})){const e=C.getDimComp(l,1),n=C.getDimComp(l,0),r=C.getAggrComp(c,e,n);c=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:l,dimensionAndFieldList:i,funcComp:"Only",valueComp:r}):r}return c},initModifier(e){Object.keys(J).forEach(t=>{void 0===e[t]&&(e[t]=J[t])})},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${X(t,e)}.primaryDimension`,type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options(e,t){const{qDimensionInfo:n}=t.layout.qHyperCube;return n.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${X(t,e)}.crossAllDimensions`,type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},showExcludedValues:{refFn:t=>`${X(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Y))return!1;const i=function(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===Y)return n[e]}(t,e);return i&&!i.disabled}}}},Q="normalization";function ee(e,t){const n=a(e,t);if(n)for(let e=0;e<n.length;e++)if(n[e].type===Q)return n[e]}function te(e,t){const n=function(e,t){const n=a(e,t);if(!n)return-1;for(let e=0;e<n.length;e++)if(n[e].type===Q)return e;return-1}(e,t);return n>-1?`${t}.${n}`:t}function ne(e,t){for(let n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}const re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function oe(e){return 2===e?"{1}":""}function ie(e,t,n){return 1===e?`{$<${C.getFieldWithWrapper(t)}={'${n}'}>}`:""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,n){return 0===e&&t>1?`<${C.getDimDefWithWrapper(n)}>`:""}const le={translationKey:"properties.modifier.normalization",needDimension:()=>!0,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),extractInputExpression:C.extractInputExpression,generateExpression({expression:e,modifier:t,properties:n,layout:r,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:n,layout:r}));const l=a(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i});let c=u;const{selectionScope:d,dimensionalScope:p,field:f,value:h,primaryDimension:m,ignoreNegative:g}=t;return c=function(e,t,n,r,o,i,a,s){const l=oe(t),u=ie(t,n,r),c=""===l&&""===u?"":l||u,d=ae(o,i),p=se(o,i,a),f=function(e){const t=[];for(let n=0;n<e;n++)t[n]=C.getDimDefWithWrapper(n);return t.join(", ")}(i);return s?`(If(${e} < 0, null(), ${e}))/ Sum(${c} ${d}${p} Aggr(${c} RangeMax( 0, ${e}), ${f}))`:`${e}/ Sum(${c} ${d}${p} Aggr(${c} ${e}, ${f}))`}(u,d,f,h,p,s,m,g),c},initModifier(e){Object.keys(re).forEach(t=>{void 0===e[t]&&(e[t]=re[t])})},updateModifier(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:()=>!0,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{selectionScope:{refFn:t=>`${te(t,e)}.selectionScope`,type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:n=>function(e,t,n){let r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];const{dimensionalScope:o}=ee(e,n);return r=function(e,t){if(1===e){const e=ne(t,0);t.splice(e,1)}return t}(o,r),r}(n,t,e)},field:{refFn:t=>`${te(t,e)}.field`,type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:(e,t,n)=>n.app.getFieldList().then(e=>e.map(e=>({label:e.qName,value:e.qName}))),show:t=>1===ee(t,e).selectionScope},value:{refFn:t=>`${te(t,e)}.value`,type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:t=>1===ee(t,e).selectionScope},dimensionalScope:{refFn:t=>`${te(t,e)}.dimensionalScope`,type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:(n,r)=>function(e,t,n,r){const o=t.layout.qHyperCube.qDimensionInfo.length;let i=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope."+(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||`properties.modifier.dimensionalScope.${2===o?"respectAllDimensions":"respectDimension"}.tooltip`},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope."+(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||`properties.modifier.dimensionalScope.${2===o?"disregardAllDimensions":"disregardDimension"}.tooltip`}];i=function(e,t){if(e<2){const e=ne(t,0);t.splice(e,1)}return t}(o,i);const{selectionScope:a}=ee(e,r);return i=function(e,t){if(0===e){const e=ne(t,1);t.splice(e,1)}return t}(a,i),i}(n,r,t,e)},primaryDimension:{refFn:t=>`${te(t,e)}.primaryDimension`,type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options(e,t){const{qDimensionInfo:n}=t.layout.qHyperCube;return n.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(t,n)=>0===(ee(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,n,r){const o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Q))return!1;const i=ee(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:oe,getFieldSelectionComp:ie,getTotalComp:ae,getSelectedDimComp:se},ue="library id deleted",ce="qDef.qDef",de="qDef.base.qDef",pe="qLibraryId",fe="qDef.base.qLibraryId",he="qDef.qLabel",me="qDef.qLabelExpression",ge="qDef.base.qLabel",be="qDef.base.qLabelExpression",ve="qDef.qAggrFunc",ye="qDef.base.qAggrFunc",xe="qDef.base",Se={getExpression(e){const t=a(e,de);return void 0!==t?t:a(e,ce)},getExpressionRef:e=>void 0!==a(e,de)?de:ce,getLibraryIdRef:e=>a(e,fe)?fe:pe,getLibraryId:e=>a(e,fe)||a(e,pe),getLabelRef:e=>a(e,xe)?ge:he,getLabelExpressionRef:e=>a(e,xe)?be:me},we={initBase(e,t){(t||we.isValid(e))&&(i(e,de,a(e,ce)),i(e,fe,a(e,pe)),i(e,ge,a(e,he)),i(e,be,a(e,me)))},restoreBase(e){we.isValid(e)&&(i(e,ce,a(e,de)),i(e,pe,a(e,fe)),i(e,he,a(e,ge)),i(e,me,a(e,be)),a(e,ve)&&a(e,ye)&&i(e,ve,a(e,ye)),delete e.qDef.base)},isValid(e){const t=a(e,de),n=a(e,fe);return void 0!==t||void 0!==n}},Ce=we,Ee={accumulation:_,movingAverage:H,difference:Z,normalization:le,timeSeriesDecomposition:K},Re={modifiers:Ee,apply:Ie,applyModifiers:Me,cleanUpMeasure:ke,destroy:function(e){e&&Ae[e.id]&&Ae[e.id].masterItemSubscriber&&(Ae[e.id].masterItemSubscriber&&Ae[e.id].masterItemSubscriber.unsubscribe(),delete Ae[e.id])},hasActiveModifiers:De,getActiveModifier:Pe,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(e=>Ee[e])},isApplicableSupportedModifiers:function({modifierTypes:e,properties:t,layout:n}){return Array.isArray(e)&&e.some(e=>Ee[e]&&Ee[e].isApplicable({properties:t,layout:n}))},measureBase:Se,limitedSorting:function({measures:e,properties:t,layout:n}){let r=!1,o=!1;return e.forEach(e=>{const i=Oe(e);$e({modifiers:i,properties:t,layout:n})&&(r=!0,o=o||Ue({modifiers:i,properties:t,layout:n}))}),r&&!o},ifEnableTotalsFunction:Te},Ae={};function Ie({model:e,properties:t,isSnapshot:n=!1,masterItem:r}={}){const i=!1;Ae[e.id]=Ae[e.id]||{isFirstTime:!0};const{isFirstTime:s}=Ae[e.id];if(Ae[e.id].isFirstTime=!1,t&&"object"==typeof t)return Me({model:e,properties:t});const l=e?e.layout:void 0,u=a(l,"qSelectionInfo.qInSelections");if(n||u)return Promise.resolve(i);const c=a(l,"qHyperCube.qMeasureInfo"),{lastReloadTime:d}=Ae[e.id];if(Ae[e.id].lastReloadTime=a(e,"app.layout.qLastReloadTime"),De({measures:c,layout:l})){const t=function({measures:e,layout:t,model:n,lastReloadTime:r}){return a(n,"app.layout.qLastReloadTime")!==r&&function({measures:e,properties:t,layout:n}){return!!Array.isArray(e)&&e.some(e=>Fe({measure:e,properties:t,layout:n}))}({measures:e,layout:t})}({measures:c,layout:l,model:e,lastReloadTime:d});return t||function({measures:e,layout:t,masterItem:n,isFirstTime:r}){return!!Array.isArray(e)&&(r||n||e.some(e=>function({measure:e,layout:t}){return $e({modifiers:Oe(e),layout:t})?!e.base:!!e.base}({measure:e,layout:t})))}({measures:c,layout:l,masterItem:r,isFirstTime:s})?e.getEffectiveProperties().then(n=>{const a=o()(!0,{},n);Ne(a);const s=Ge(a);return Be({model:e}).then(o=>He({libraryIds:s,model:e}).then(i=>(t&&function({properties:e}){qe(e).forEach(t=>function({measure:e,properties:t}){if(Fe({measure:e,properties:t})){let t=0;const{modifiers:n}=e.qDef;Array.isArray(n)&&n.forEach(n=>{if("object"==typeof n&&!n.disabled){if(t++,"object"!=typeof Ee[n.type])throw new Error(`Modifier "${n.type}" is not available`);if(t>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");const r=Ee[n.type].extractInputExpression({outputExpression:e.qDef.qDef,modifier:n});void 0!==r&&_e(e)&&C.simplifyExpression(e.qDef.base.qDef)!==C.simplifyExpression(r)&&(e.qDef.base.qDef=r)}})}}({measure:t,properties:e}))}({properties:a}),Me({model:e,oldProperties:n,properties:a,runUpdateIfChange:!0,masterItem:r,libraryItemsProps:i,dimensionAndFieldList:o})))).catch(()=>Promise.resolve(i))}):Promise.resolve(i)}return function(e){return!!Array.isArray(e)&&e.some(e=>"object"==typeof e.base)}(c)?e.getEffectiveProperties().then(t=>function({model:e,properties:t}){const n=Ge(t);return Ke({model:e,libraryIds:n}).then(()=>{const n=o()(!0,{},t);return qe(t).forEach(e=>ke(e)),We({oldProperties:n,newProperties:t,model:e})})}({model:e,properties:t})):Promise.resolve(i)}function Me({model:e,oldProperties:t,properties:n,measures:r,runUpdateIfChange:i=!1,masterItem:s,libraryItemsProps:l,dimensionAndFieldList:u}){void 0===t&&(t=i?o()(!0,{},n):n),Ne(n);const c=Ge(n);return Ke({model:e,libraryIds:c,masterItem:s}).then(()=>function({measures:e,properties:t,model:n,libraryItemsProps:r,dimensionAndFieldList:i}){if(e||(e=qe(t)),!e.length)return Promise.resolve();if(!r&&!De({measures:e,properties:t}))return e.forEach(e=>ke(e)),Promise.resolve();const s=r?void 0:Ge(t);return Be({model:n,dimensionAndFieldList:i}).then(i=>He({libraryIds:s,model:n,libraryItemsProps:r}).then(n=>{e.forEach(e=>{const{modifiers:r}=e.qDef;n&&$e({modifiers:r,properties:t})?(function({measure:e,properties:t,libraryItemsProps:n,dimensionAndFieldList:r}){let i=0;Ce.isValid(e)||Ce.initBase(e,!0);const{modifiers:s,base:l}=e.qDef;Array.isArray(s)&&s.forEach(s=>{if("object"==typeof s&&!s.disabled){if(i++,"object"!=typeof Ee[s.type])throw new Error(`Modifier "${s.type}" is not available`);if(i>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ee[s.type].initModifier(s,e);const u=e.qLibraryId||l&&l.qLibraryId;u?function({measure:e,modifier:t,libraryId:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}){const s=i[n],l=s.qMeasure.qDef,u=""===l?l:Ee[t.type].generateExpression({expression:l,modifier:t,properties:r,dimensionAndFieldList:a});t.outputExpression=u,e.qDef.qDef=t.outputExpression,(e.qDef.qLabel||s.qMeasure.qLabel)&&(e.qDef.qLabel=e.qDef.base.qLabel||s.qMeasure.qLabel),(e.qDef.qLabelExpression||s.qMeasure.qLabelExpression)&&(e.qDef.qLabelExpression=s.qMeasure.qLabelExpression),e.qDef.quarantine&&e.qDef.quarantine.qNumFormat&&s.qMeasure.qNumFormat&&(e.qDef.qNumFormat=e.qDef.base.qNumFormat||s.qMeasure.qNumFormat,e.qDef.isCustomFormatted=s.qMeasure.isCustomFormatted),delete e.qLibraryId,e.qDef.coloring=s.qMeasure.coloring,t.base=o()(!0,{},e.qDef.base)}({measure:e,modifier:s,libraryId:u,properties:t,libraryItemsProps:n,dimensionAndFieldList:r}):function({measure:e,modifier:t,properties:n,dimensionAndFieldList:r}){"function"==typeof Ee[t.type].updateModifier&&Ee[t.type].updateModifier(t,n.qHyperCubeDef);const i=Se.getExpression(e),a=""===i?i:Ee[t.type].generateExpression({expression:i,modifier:t,properties:n,dimensionAndFieldList:r});t.outputExpression=a,e.qDef.qDef=t.outputExpression,e.qDef.base.qLabelExpression?e.qDef.qLabelExpression=e.qDef.base.qLabelExpression:e.qDef.qLabel=e.qDef.base.qLabel||i,t.base=o()(!0,{},e.qDef.base)}({measure:e,modifier:s,properties:t,dimensionAndFieldList:r}),function(e){const t=a(e,"qDef.qAggrFunc");"Expr"!==t||Te(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Te(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(e)}})}({measure:e,properties:t,libraryItemsProps:n,dimensionAndFieldList:i}),je(e)):ke(e)})}))}({measures:r,properties:n,model:e,libraryItemsProps:l,dimensionAndFieldList:u}).then(()=>i?We({oldProperties:t,newProperties:n,model:e}):Promise.resolve(!1))).catch(()=>Promise.resolve(!1))}function ke(e){!function(e){const t=Oe(e);return Array.isArray(t)&&t.some(e=>"object"==typeof e&&!e.disabled&&!Ee[e.type])}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,je(e)}function De({measures:e,properties:t,layout:n}){return!!Array.isArray(e)&&e.some(e=>$e({modifiers:Oe(e),properties:t,layout:n}))}function Pe(e){const t=Oe(e);if(Array.isArray(t))for(let e=0;e<t.length;e++){const n=t[e];if(Ee[n.type]&&!n.disabled)return n}}function Te(e){const t=Pe(e);return!t||Ee[t.type].enableTotalsFunction(e)}function qe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Oe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Le(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ne(e){qe(e).forEach(e=>function(e){const t=Pe(e);t&&(void 0!==t.outputExpression&&Le(t)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e))}function je(e){const t=Oe(e);Array.isArray(t)&&t.forEach(t=>{"object"==typeof t&&(t.disabled||!Ee[t.type]&&Le(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function _e(e){return e.base||e.qDef&&e.qDef.base}function ze(e){const t=_e(e);return e.qLibraryId||t&&t.qLibraryId}function Fe({measure:e,properties:t,layout:n}){return!ze(e)&&$e({modifiers:Oe(e),properties:t,layout:n})}function $e({modifiers:e,properties:t,layout:n}){const r={};return Array.isArray(e)&&e.some(e=>!("object"!=typeof e||e.disabled||!Ee[e.type])&&(void 0===r[e.type]&&(r[e.type]=Ee[e.type].isApplicable({properties:t,layout:n})),r[e.type]))}function Be({model:e,dimensionAndFieldList:t}){if(t)return Promise.resolve(t);const n=[],r={},o=e.app.getDimensionList().then(e=>{r.dimensionList=e});n.push(o);const i=e.app.getFieldList().then(e=>{r.fieldList=e});return n.push(i),Promise.all(n).then(()=>r)}function He({libraryIds:e,model:t,libraryItemsProps:n}){if(n)return Promise.resolve(n);const{measureLibraryIds:r,dimensionLibraryIds:o}=e,i={},a=[];return r.forEach(e=>{const n=t.app.getMeasure(e).then(t=>t.getProperties().then(t=>{i[e]=t}));a.push(n)}),o.forEach(e=>{const n=t.app.getDimension(e).then(t=>t.getProperties().then(t=>{i[e]=t}));a.push(n)}),Promise.all(a).then(()=>i).catch(()=>null)}function Ve(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function We({oldProperties:e,newProperties:t,model:n}){const r=JSON.stringify(a(e,"qHyperCubeDef.qMeasures"),Ve)!==JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ve)||JSON.stringify(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ve)!==JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ve);return r?function({model:e,oldProperties:t,newProperties:n}){const{layout:r}=e;return r&&!r.qHasSoftPatches&&!r.qExtendsId&&a(r,"qMeta.privileges",[]).indexOf("update")>-1?e.setProperties(n):q.saveSoftProperties(e,t,n)}({model:n,oldProperties:e,newProperties:t}).then(()=>r):Promise.resolve(r)}function Ue({modifiers:e,properties:t,layout:n}){return Array.isArray(e)&&e.some(e=>"object"==typeof e&&!e.disabled&&Ee[e.type]&&Ee[e.type].needDimension({modifier:e,properties:t,layout:n}))}function Ge(e){const t=qe(e),n=[],r=[];let o=!1;return t.forEach(t=>{const r=Oe(t);if($e({modifiers:r,properties:e})){const i=ze(t);i&&n.push(i),o=o||Ue({modifiers:r,properties:e})}}),a(e,"qHyperCubeDef.qDimensions",[]).forEach(e=>{const t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function Ke({model:e,libraryIds:t,masterItem:n}){return!n&&n!==ue&&Ae[e.id]&&t&&(t.measureLibraryIds.length||t.dimensionLibraryIds.length)?(Ae[e.id].masterItemSubscriber=Ae[e.id].masterItemSubscriber||function({model:e,callback:t}){let n={},r={},o={};const i={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){const t={},n=a(e,"qInfo.qType");return n&&i[n]&&i[n].forEach(n=>{t[n]=a(e,n)}),JSON.stringify(t)}function l(e){const{qId:r}=e.qInfo;if(n[r]){const o=s(e);n[r].properties!==o&&(n[r].properties=o,"function"==typeof t&&n[r].enabled&&t(e)),n[r].enabled=!0}}function u(){Object.keys(n).forEach(e=>{r[e]||o[e]||(n[e].listener.dispose(),n[e].unbindCloseListnener(),delete n[e])})}const c=(e,t)=>(e.once("closed",t),()=>e.removeListener("closed",t));function d(r,o){return e.app[o](r).then(e=>{n[r]={listener:e.layoutSubscribe(l),unbindCloseListnener:c(e,()=>{return r=e.id,t(ue),delete n[r],void u();var r}),enabled:!1,properties:s(e.layout)}}).catch(()=>{})}return{subscribe({measureLibraryIds:t,dimensionLibraryIds:i}){const a=[];return function({measureLibraryIds:e,dimensionLibraryIds:t}){r={},e.forEach(e=>{r[e]=!0}),o={},t.forEach(e=>{o[e]=!0})}({measureLibraryIds:t,dimensionLibraryIds:i}),u(),e.app&&(Object.keys(r).forEach(e=>{r[e]&&!n[e]&&a.push(d(e,"getMeasure"))}),Object.keys(o).forEach(e=>{o[e]&&!n[e]&&a.push(d(e,"getDimension"))})),Promise.all(a)},unsubscribe(){Object.keys(n).forEach(e=>{n[e].listener.dispose(),n[e].unbindCloseListnener()}),n={}}}}({model:e,callback:t=>Ie({model:e,masterItem:t}).then(()=>e.app.clearUndoBuffer())}),Ae[e.id].masterItemSubscriber.subscribe(t)):Promise.resolve()}}};const n={};function r(e){const o=n[e];if(void 0!==o)return o.exports;const i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++];r.o(e,o)?0===i&&n++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let o=r(828);for(var i in e.default=o.default,o)-1===["default"].indexOf(i)&&(e[i]=o[i]);Object.defineProperty(e,"__esModule",{value:!0})})()}(L$)),L$),j$=Ht(N$);const _$="TOTAL_OFF",z$={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1}},F$=(e,t)=>t&&e.flags.isEnabled("VNA-977-TABLE-BARS"),$$=(e,t)=>F$(e,t)?[T$("barColor","SNTable.Bar.ColorExpression","barColorByExpression"),T$("barLabelColor","SNTable.Bar.LabelColorExpression","barLabelColorByExpression"),T$("barWidth","SNTable.Bar.WidthExpression","barWidthByExpression"),T$("barOffset","SNTable.Bar.OffsetExpression","barOffsetByExpression"),T$("barLabel","SNTable.Bar.LabelExpression","barLabelByExpression")]:[],B$=(e,t)=>({visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},tableCellStyling:{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:"textStyleExpression",tid:"tableTextStyleByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"urlLabel",tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"url",tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageLabel",tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageUrl",tid:"ImageUrlByExpression",show:!1},...$$(e,t)]}}),H$=(e,t)=>({columnExpression:{type:"items",grouped:!0,items:[{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},{type:"items",items:[{component:"text",translation:"properties.Header",style:"sHeader"},{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}]},{type:"items",items:[{component:"text",translation:"properties.Content",style:"sHeader"},{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:"textStyleExpression",tid:"tableTextStyleByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"urlLabel",tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"url",tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageLabel",tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageUrl",tid:"ImageUrlByExpression",show:!1},...$$(e,t)]}]}]}}),V$={textAlignAuto:{ref:"qDef.textAlign.auto",type:"boolean",component:"switch",translation:"Common.Text.TextAlignment",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},textAlign:{ref:"qDef.textAlign.align",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:e=>void 0!==e.qDef.textAlign&&!e.qDef.textAlign.auto}},W$=e=>({type:"items",grouped:!0,items:{totalsAggrGroup:{type:"items",items:{totalsAggrFunc:{type:"string",component:"dropdown",ref:"qDef.qAggrFunc",translation:"Object.Table.AggrFunc",options:(e,t)=>(!j$.hasActiveModifiers({measures:[e],properties:t.properties})||j$.ifEnableTotalsFunction(e)?[{value:""===e.qDef.qAggrFunc?"":"Expr",translation:"Common.Auto"}]:[]).concat([{value:"Avg",translation:"Object.Table.AggrFunc.Avg"},{value:"Count",translation:"Object.Table.AggrFunc.Count"},{value:"Max",translation:"Object.Table.AggrFunc.Max"},{value:"Min",translation:"Object.Table.AggrFunc.Min"},{value:"Sum",translation:"Object.Table.AggrFunc.Sum"},{value:"None",translation:"Object.Table.AggrFunc.None"}]),defaultValue:e.anything.sense?.isUnsupportedFeature?.("totals")?"None":"Expr"}}}},show:!e.anything.sense?.isUnsupportedFeature?.("totals")}),U$={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:Qm.Auto,translation:"Common.Auto"},{value:Qm.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:Qm.Pixels,translation:"Object.Table.Column.Pixels"},{value:Qm.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:Qm.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:"200",show:e=>e.qDef.columnWidth?.type===Qm.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:"20",show:e=>e.qDef.columnWidth?.type===Qm.Percentage}},G$=(e,t)=>({...z$,...e.flags.isEnabled("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?H$(e,t):B$(e,t),...V$,...U$}),K$=e=>({libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},subTotalGroup:{type:"items",show:e.flags.isEnabled("TLV-2303-SUB-TOTALS")&&!e.anything.sense?.isUnsupportedFeature?.("totals"),items:[{uses:"divider"},{type:"string",component:"switch",translation:"properties.showSubTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:_$,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:_$,translation:"properties.off"}},{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"Common.Label",defaultValue:()=>e.translator.get("properties.subTotals"),show:e=>e.qOtherTotalSpec?.qTotalMode!==_$},{uses:"divider"}]},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}}),Y$=e=>{const t=e.anything.sense?.isUnsupportedFeature?.("modifiers");return{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>t?!!e.qLibraryId:!(!e.qLibraryId&&!e.qDef.base?.qLibraryId)},inlineMeasure:{component:"inline-measure",show:e=>t?!e.qLibraryId:!(e.qLibraryId||e.qDef.base?.qLibraryId)},numberFormatting:{uses:"measures.items.numberFormatting"},createMasterItemButton:{},divider:{uses:"divider"},totalsAggr:W$(e)}},X$=e=>({dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:K$(e)},presentation:{type:"items",translation:"properties.presentation",items:{...G$(e,!1),...A$(e)}}}}}),J$=e=>({measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:Y$(e)},presentation:{type:"items",translation:"properties.presentation",items:{...G$(e,!0),...I$(e,{[S$.Image]:!0,[S$.Indicator]:!0,[S$.MiniChart]:!0,[S$.Bar]:F$(e,!0)}),...q$({[S$.Bar]:F$(e,!0)})}}}}}),Z$=e=>({...X$(e),...J$(e)}),Q$=e=>({type:"items",translation:"Common.Data",component:"tabs-component",items:{columns:{component:"data-assets-panel",ref:"columns",tabName:"properties.DataAssetPanel.Columns",items:{...Z$(e)},highlightSelected:!0},filters:{type:"items",component:"filters-assets-panel",ref:"filters",tabName:"SimpleProperties.Filters.Filters",items:{filter:{type:"object",component:"filter-item-react",ref:"filter"}},highlightSelected:!0}}}),eB=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),tB=e=>eB("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),nB={chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}},rB=e=>({type:"items",items:[{ref:"totals.show",type:"boolean",translation:"properties.totals",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},{ref:"totals.position",translation:"Common.Position",type:"string",component:"dropdown",options:[{value:"noTotals",translation:"Common.None"},{value:"top",translation:"Common.Top"},{value:"bottom",translation:"Common.Bottom"}],defaultValue:"noTotals",show:e=>!e.totals?.show},{ref:"totals.label",translation:"properties.totals.label",type:"string",expression:"optional",defaultValue:()=>e.translator.get("Object.Table.Totals")}],show:!e.anything.sense?.isUnsupportedFeature?.("totals")}),oB=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),iB=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},aB=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort().map(e=>iB(e,!0))],s=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...de().filter(e=>!i.includes(e)).map(e=>iB(e,!0))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),sB=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],lB=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>iB(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...sB.filter(e=>!i.includes(e)).map(e=>iB(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),uB=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:aB({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:lB({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:oB(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:oB(`${e}.background`,"properties.background",(t,n)=>{const r=n?bm.WHITE:bm.TRANSPARENT;return o(t,e,"backgroundColor")??r},a)}}}}),cB=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?tB(e):void 0,content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:oB(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:oB(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),dB=(e,t,n)=>{switch(t){case"header":return e.object?.straightTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.straightTableV2?.dimension?.label?.value?.[n];case"measureValues":return e.object?.straightTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.straightTableV2?.total?.label?.value?.[n];case"subTotalValues":return e.object?.straightTableV2?.subTotal?.label?.value?.[n];case"nullValues":case"dimensionNullValues":return e.object?.straightTableV2?.null?.label?.value?.[n];default:return}},pB=e=>e.grid?.zebraStripes?.show,fB={ref:"content.rowHeight",component:"integer",placeholder:1,maxlength:4,translation:"ThemeStyleEditor.style.rowHeight",change(e){void 0!==e&&(null!==e.content?.rowHeight&&void 0!==e.content?.rowHeight&&""!==e.content.rowHeight?e.content.rowHeight=Math.max(1,Math.min(50,Math.floor(e.content.rowHeight))):void 0!==e.content&&(e.content.rowHeight=void 0))}},hB=e=>e?.content?.hoverEffect,mB={translation:"properties.RowHover",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{hoverEffectSwitch:{ref:"content.hoverEffect",translation:"ThemeStyleEditor.style.hoverEffect",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},hoverEffectColorItem:{show:hB,ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show:hB,ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}},gB=(e,t,{properties:n})=>"sn-table"===n.visualization&&!0===n.usePagination,bB=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),vB=({flags:e,translator:t})=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:uB({section:"header",defaultFontStyle:["bold"],translator:t,flags:e,getThemeValue:dB,disableNoneCallback:gB}),dimensionValueSection:uB({section:"dimensionValues",translator:t,flags:e,getThemeValue:dB}),measureValueSection:uB({section:"measureValues",translator:t,flags:e,getThemeValue:dB}),totalRowSection:uB({section:"totalValues",defaultFontStyle:["bold"],translation:"properties.totals",translator:t,flags:e,getThemeValue:dB,disableNoneCallback:gB}),subTotalRowSection:e.isEnabled("TLV-2303-SUB-TOTALS")?uB({section:"subTotalValues",defaultFontStyle:["bold"],translation:"properties.subTotals",translator:t,flags:e,getThemeValue:dB,disableNoneCallback:gB}):void 0,...bB(e)?{dimensionNullSection:cB({section:"dimensionNullValues",translation:"properties.table.dimensionNullValues",fallbackBackground:bm.NULL_VALUE_BACKGROUND,getThemeValue:dB,isNullValueText:!0}),nullValues:cB({section:"nullValues",translation:"properties.table.measureNullValues",fallbackBackground:bm.NULL_VALUE_BACKGROUND,getThemeValue:dB,isNullValueText:!0})}:{nullValues:cB({section:"nullValues",fallbackBackground:bm.NULL_VALUE_BACKGROUND,getThemeValue:dB,isNullValueText:!1})},grid:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{rowHeight:{show:()=>!0,...fB},border:oB("grid.border","properties.border",e=>e.object?.straightTableV2?.grid?.borderColor??bm.BORDER_MEDIUM),divider:oB("grid.divider","properties.pivot.divider",e=>e.object?.straightTableV2?.grid?.divider?.borderColor??bm.BORDER_HEAVY)}}}},hoverEffectSection:mB,zebraStripes:{translation:"properties.zebraStripes",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{zebraStripesEnable:{ref:"grid.zebraStripes.show",translation:"properties.zebraStripes.enable",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},zebraStripesColorOdd:{show:pB,ref:"grid.zebraStripes.color.odd",translation:"properties.zebraStripes.color.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundrOdd:{show:pB,ref:"grid.zebraStripes.background.odd",translation:"properties.zebraStripes.background.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1},zebraStripesColorEven:{show:pB,ref:"grid.zebraStripes.color.even",translation:"properties.zebraStripes.color.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundEven:{show:pB,ref:"grid.zebraStripes.background.even",translation:"properties.zebraStripes.background.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1}}}}}}}]}),yB=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[vB(e),rB(e),{type:"items",items:[{component:"text",translation:"properties.accessibilityOptions"},{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1},{ref:"accessibleHeader",translation:"properties.increaseAccessibility",type:"boolean",component:"checkbox",undefinedValue:!0,defaultValue:!1}]},{type:"items",translation:"Object.Table.WrapText",items:[{component:"text",translation:"Object.Table.Multiline"},{ref:"multiline.wrapTextInHeaders",type:"boolean",translation:"Object.Table.Multiline.WrapTextInHeaders",component:"checkbox",defaultValue:!0},{ref:"multiline.wrapTextInCells",type:"boolean",translation:"Object.Table.Multiline.WrapTextInCells",component:"checkbox",defaultValue:!0}]},{ref:"hideHeader",translation:"properties.hideHeader",type:"boolean",component:"checkbox",defaultValue:!1},e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")?void 0:tB()]},...nB}}),xB={uses:"sorting"},SB={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},wB=e=>({type:"items",component:"accordion",items:{data:Q$(e),sorting:xB,addOns:SB,settings:yB(e)}});function CB(e){return{definition:wB(e),exploration:t$(e),data:y$(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1,exploration:!0,cssScaling:!0,modifiers:e.anything.sense?.isUnsupportedFeature?.("modifiers")?void 0:["accumulation","movingAverage","difference","normalization"]},importProperties(t,n,r,o,i){const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()};return Ev({exportFormat:t,initialProperties:n,extension:r,hypercubePath:o,defaultPropertyValues:a,viewDataMode:i,env:e})},exportProperties:(e,t)=>vv({propertyTree:e,hyperCubePath:t}),propertyHandler:t=>new h$(t,e.translator),usePropertyHandler:"sn-table-data",migrate:x$(e)}}const EB=e=>{const t=e.get(tv);return a(()=>()=>{t.unmount()},[t]),t};var RB,AB={exports:{}};
|
|
103
103
|
/*!
|
|
104
104
|
* CSSJanus. https://www.mediawiki.org/wiki/CSSJanus
|
|
105
105
|
*
|
|
@@ -118,4 +118,4 @@ function Ki(e,t){let n;return n=t?Pi(e).withConfig({displayName:t.label,shouldFo
|
|
|
118
118
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
119
119
|
* See the License for the specific language governing permissions and
|
|
120
120
|
* limitations under the License.
|
|
121
|
-
*/var IB=(RB||(RB=1,function(e,t){var n;function r(e,t){var n=[],r=0;function o(e){return n.push(e),t}function i(){return n[r++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",o="(?:[0-9]*\\.[0-9]+|[0-9]+)",i="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",a="direction\\s*:\\s*",s="['\"]?\\s*",l="(^|[^a-zA-Z])",u="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",c="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",d="(?:[_a-z0-9-]|"+n+"|"+c+")",p=o+"(?:\\s*"+i+"|-?(?:[_a-z]|"+n+"|"+c+")"+d+"*)?",f="((?:-?"+p+")|(?:inherit|auto))",h="((?:-?"+p+")|(?:inherit|auto)|(?:calc\\((?:(?:(?:\\(|\\)|\\t| )|(?:-?"+o+"(?:\\s*"+i+")?)|(?:\\+|\\-|\\*|\\/)){3,})\\)))",m="(#?"+d+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",g="(?:[!#$%&*-~]|"+n+"|"+c+")*?",b="(?![a-zA-Z])",v="(?!("+d+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+g+s+"\\))",x="(?="+g+s+"\\))",S="(\\s*(?:!important\\s*)?[;}])",w=/`TMP`/g,C=/`TMPLTR`/g,E=/`TMPRTL`/g,R=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),A=new RegExp("("+u+v+"[^;}]+;?)","gi"),I=new RegExp("("+u+"[^\\}]*?})","gi"),M=new RegExp("("+a+")ltr","gi"),k=new RegExp("("+a+")rtl","gi"),D=new RegExp(l+"(left)"+b+y+v,"gi"),P=new RegExp(l+"(right)"+b+y+v,"gi"),T=new RegExp(l+"(left)"+x,"gi"),q=new RegExp(l+"(right)"+x,"gi"),O=/(:dir\( *)ltr( *\))/g,L=/(:dir\( *)rtl( *\))/g,N=new RegExp(l+"(ltr)"+x,"gi"),j=new RegExp(l+"(rtl)"+x,"gi"),_=new RegExp(l+"([ns]?)e-resize","gi"),z=new RegExp(l+"([ns]?)w-resize","gi"),F=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+h+"(\\s+)"+h+"(\\s+)"+h+"(\\s+)"+h+S,"gi"),$=new RegExp("((?:-color|border-style)\\s*:\\s*)"+m+"(\\s+)"+m+"(\\s+)"+m+"(\\s+)"+m+S,"gi"),B=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+p+")","gi"),H=new RegExp("(background-position-x\\s*:\\s*)(-?"+o+"%)","gi"),V=new RegExp("(border-radius\\s*:\\s*)"+f+"(?:(?:\\s+"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?)?(?:(?:(?:\\s*\\/\\s*)"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?(?:\\s+"+f+")?)?"+S,"gi"),W=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+f,"gi"),U=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+m,"gi"),G=new RegExp("(text-shadow\\s*:\\s*)"+m+"(\\s*)"+f,"gi"),K=new RegExp("(text-shadow\\s*:\\s*)"+f,"gi"),Y=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+f+"(\\s*\\))","gi"),X=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+f+"((?:\\s*,\\s*"+f+"){0,2}\\s*\\))","gi");function J(e,t,n){var r,o;return t.split("(").length>t.split(")").length?e:("%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(o=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(o)+"%"):n=100-parseFloat(n)+"%"),t+n)}function Z(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function Q(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter(function(e){return e}),o=n.slice(6,10).filter(function(e){return e}),i=n[10]||"";return t+(o.length?Z(r)+" / "+Z(o):Z(r))+i}function ee(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function te(e,t,n){return t+ee(n)}function ne(e,t,n,r,o){return t+n+ee(r)+o}function re(e,t,n,r,o){return t+n+r+ee(o)}return{transform:function(n,o){var i=new r(A,"`NOFLIP_SINGLE`"),a=new r(I,"`NOFLIP_CLASS`"),s=new r(R,t);return n=s.tokenize(a.tokenize(i.tokenize(n.replace("`","%60")))),o.transformDirInUrl&&(n=n.replace(O,"$1`TMPLTR`$2").replace(L,"$1`TMPRTL`$2").replace(N,"$1"+e).replace(j,"$1ltr").replace(w,"rtl").replace(C,"ltr").replace(E,"rtl")),o.transformEdgeInUrl&&(n=n.replace(T,"$1"+e).replace(q,"$1left").replace(w,"right")),n=n.replace(M,"$1"+e).replace(k,"$1ltr").replace(w,"rtl").replace(D,"$1"+e).replace(P,"$1left").replace(w,"right").replace(_,"$1$2"+e).replace(z,"$1$2e-resize").replace(w,"w-resize").replace(V,Q).replace(W,te).replace(U,re).replace(G,re).replace(K,te).replace(Y,ne).replace(X,ne).replace(F,"$1$2$3$8$5$6$7$4$9").replace($,"$1$2$3$8$5$6$7$4$9").replace(B,J).replace(H,J),n=i.detokenize(a.detokenize(s.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var o;return"object"==typeof t?o=t:(o={},"boolean"==typeof t&&(o.transformDirInUrl=t),"boolean"==typeof r&&(o.transformEdgeInUrl=r)),n.transform(e,o)}:"undefined"!=typeof window&&(window.cssjanus=n)}(AB,AB.exports)),AB.exports),MB=Ht(IB),kB="comm",DB="rule",PB="decl",TB=Math.abs,qB=String.fromCharCode;function OB(e){return e.trim()}function LB(e,t,n){return e.replace(t,n)}function NB(e,t){return 0|e.charCodeAt(t)}function jB(e,t,n){return e.slice(t,n)}function _B(e){return e.length}function zB(e,t){return t.push(e),e}var FB=1,$B=1,BB=0,HB=0,VB=0,WB="";function UB(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:FB,column:$B,length:a,return:"",siblings:s}}function GB(){return VB=HB>0?NB(WB,--HB):0,$B--,10===VB&&($B=1,FB--),VB}function KB(){return VB=HB<BB?NB(WB,HB++):0,$B++,10===VB&&($B=1,FB++),VB}function YB(){return NB(WB,HB)}function XB(){return HB}function JB(e,t){return jB(WB,e,t)}function ZB(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function QB(e){return OB(JB(HB-1,nH(91===e?e+2:40===e?e+1:e)))}function eH(e){for(;(VB=YB())&&VB<33;)KB();return ZB(e)>2||ZB(VB)>3?"":" "}function tH(e,t){for(;--t&&KB()&&!(VB<48||VB>102||VB>57&&VB<65||VB>70&&VB<97););return JB(e,XB()+(t<6&&32==YB()&&32==KB()))}function nH(e){for(;KB();)switch(VB){case e:return HB;case 34:case 39:34!==e&&39!==e&&nH(VB);break;case 40:41===e&&nH(e);break;case 92:KB()}return HB}function rH(e,t){for(;KB()&&e+VB!==57&&(e+VB!==84||47!==YB()););return"/*"+JB(t,HB-1)+"*"+qB(47===e?e:KB())}function oH(e){for(;!ZB(YB());)KB();return JB(e,HB)}function iH(e){return function(e){return WB="",e}(aH("",null,null,null,[""],e=function(e){return FB=$B=1,BB=_B(WB=e),HB=0,[]}(e),0,[0],e))}function aH(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,b=1,v=0,y=0,x="",S=o,w=i,C=r,E=x;g;)switch(h=y,y=KB()){case 40:108!=h&&58==NB(E,d-1)?(v++,E+="("):E+=QB(y);break;case 41:v--,E+=")";break;case 34:case 39:case 91:E+=QB(y);break;case 9:case 10:case 13:case 32:if(v>0){E+=qB(y);break}E+=eH(h);break;case 92:E+=tH(XB()-1,7);continue;case 47:switch(YB()){case 42:case 47:zB(lH(rH(KB(),XB()),t,n,l),l),5!=ZB(h||1)&&5!=ZB(YB()||1)||!_B(E)||" "===jB(E,-1,void 0)||(E+=" ");break;default:E+="/"}break;case 123*m:s[u++]=_B(E)*b;case 125*m:case 59:case 0:if(v>0&&y){E+=qB(y);break}switch(y){case 0:case 125:g=0;case 59+c:-1==b&&(E=LB(E,/\f/g,"")),f>0&&(_B(E)-d||0===m)&&zB(f>32?uH(E+";",r,n,d-1,l):uH(LB(E," ","")+";",r,n,d-2,l),l);break;case 59:E+=";";default:if(zB(C=sH(E,t,n,u,c,o,s,x,S=[],w=[],d,i),i),123===y)if(0===c)aH(E,t,C,C,S,i,d,s,w);else{switch(p){case 99:if(110===NB(E,3))break;case 108:if(97===NB(E,2))break;default:c=0;case 100:case 109:case 115:}c?aH(e,C,C,r&&zB(sH(e,C,C,0,0,o,s,x,o,S=[],d,w),w),o,w,d,s,r?S:w):aH(E,C,C,C,[""],w,0,s,w)}}u=c=f=0,m=b=1,x=E="",d=a;break;case 58:d=1+_B(E),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==GB())continue;switch(E+=qB(y),y*m){case 38:b=c>0?1:(E+="\f",-1);break;case 44:if(v>0)break;s[u++]=(_B(E)-1)*b,b=1;break;case 64:45===YB()&&(E+=QB(KB())),p=YB(),c=d=_B(x=E+=oH(XB())),y++;break;case 45:45===h&&2==_B(E)&&(m=0)}}return i}function sH(e,t,n,r,o,i,a,s,l,u,c,d){for(var p=o-1,f=0===o?i:[""],h=function(e){return e.length}(f),m=0,g=0,b=0;m<r;++m)for(var v=0,y=jB(e,p+1,p=TB(g=a[m])),x=e;v<h;++v)(x=OB(g>0?f[v]+" "+y:LB(y,/&\f/g,f[v])))&&(l[b++]=x);return UB(e,t,n,0===o?DB:s,l,u,c,d)}function lH(e,t,n,r){return UB(e,t,n,kB,qB(VB),jB(e,2,-2),0,r)}function uH(e,t,n,r,o){return UB(e,t,n,PB,jB(e,0,r),jB(e,r+1,-1),r,o)}function cH(e,t,n){switch(e.type){case"@import":case PB:case kB:return e.return=e.return||e.value;case DB:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(e){e.type===kB&&(e.children=e.value)})}var r=function(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}(Array.prototype.concat(e.children),cH);return _B(r)?e.return=e.value+"{"+r+"}":""}function dH(e,t,n,r){if("@keyframes"===e.type||"@supports"===e.type||e.type===DB&&(!e.parent||"@media"===e.parent.type||e.parent.type===DB)){var o=MB.transform(cH(e));e.children=o?iH(o)[0].children:[],e.return=""}}Object.defineProperty(dH,"name",{value:"stylisRTLPlugin"});const pH=yM(({options:e,...t})=>$g(Om(t,e)()),(e,t)=>e.fontSize===t.fontSize&&e.fontFamily===t.fontFamily&&e.fontStyle===t.fontStyle&&e.fontWeight===t.fontWeight&&e.options?.maxNbrLinesOfText===t.options?.maxNbrLinesOfText&&e.options?.allowLineBreaks===t.options?.allowLineBreaks);class fH{#y={on:new Map,once:new Map};#x=10;#S(e){this.listenerCount(e)>this.#x&&console.warn(`Possible EventEmitter memory leak detected. ${this.listenerCount(e)} listeners added to "${String(e)}".`)}#w(e,t,n){const r=this.#y[e].get(t)??new Set;r.add(n),this.#y[e].set(t,r),this.#S(t)}setMaxListeners(e){this.#x=e}on(e,t){this.#w("on",e,t)}once(e,t){this.#w("once",e,t)}off(e,t){this.#y.on.get(e)?.delete(t),this.#y.once.get(e)?.delete(t)}emit(e,...t){this.#y.on.get(e)?.forEach(e=>{e(...t)}),this.#y.once.get(e)?.forEach(e=>{e(...t)}),this.#y.once.delete(e)}listenerCount(e){return(this.#y.on.get(e)?.size??0)+(this.#y.once.get(e)?.size??0)}removeAllListeners(e){void 0===e?(this.#y.on.clear(),this.#y.once.clear()):(this.#y.on.delete(e),this.#y.once.delete(e))}}const hH=$g(()=>new fH);let mH=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),gH=function(e){return e.Select="Select",e.SelectMouseDown="SelectMouseDown",e.SelectMouseUp="SelectMouseUp",e.SelectMultiAdd="SelectMultiAdd",e.SelectMultiEnd="SelectMultiEnd",e.Reset="Reset",e.Clear="Clear",e.UpdatePageRows="UpdatePageRows",e}({}),bH=function(e){return e.A="ascending",e.D="descending",e}({}),vH=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const yH=[0,0],xH=e=>"number"==typeof e&&!Number.isNaN(+e),SH=e=>xH(e.qNum),wH=e=>"string"==typeof e&&e.length>0&&!Number.isNaN(+e),CH=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,EH=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),RH=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},AH=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:i.gradient?{color:l.color,t:u/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return se(e.localPaletteColors[t].color??"").blend(se(s.color??""),s.t)},IH=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:EH(t,e.value)}))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map((e,t)=>({color:RH(r,t,n)}))),r},MH=(e,t,n,r)=>{const o=IH(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=AH(e,a,t);break}r=i}return n})(o,t);return a},kH=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!xH(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!xH(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},DH=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=kH(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!xH(t))return 0;let a=n&&xH(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},PH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),TH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),qH=F((e,t)=>Yt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Yt.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),Yt.jsx("use",{fillRule:"evenodd"})]})),OH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),LH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),NH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),jH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M2 7.5h12v1H2z"})})),_H=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),zH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),FH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),$H=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),BH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),HH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),VH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),WH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),UH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),GH={m:BH,"ï":FH,R:UH,S:HH,T:VH,U:WH,P:zH,Q:NH,"è":F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":OH,"©":qH,"23F4":LH,2013:$H,"&":_H,add:PH,"minus-2":jH,dot:TH},KH=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=DH(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return RH(o,n.limitPaletteColorIndex,r);const a=EH(n.limitRange,t);return MH(o,a,n.limitRange,r)})(o,t,i,r),{paletteColors:s}=o.segments,l=i?.limitPaletteColorIndex||0,u=s[l]?.icon??"dot",{indicator:c}=e;let d=c?.position||"right";return"rtl"===n&&(d="right"===d?"left":"right"),{color:a,iconKey:u,position:d}},YH=(hm().palette.primary.light,"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"),XH=4/3,JH="12px",ZH="600",QH="Source Sans Pro, sans-serif",eV={height:"auto",fontSize:JH,lineHeight:"unset",padding:"4px",borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},tV=(e,t)=>"rtl"===e&&"center"!==t.resolvedImagePosition?.horizontal?t.resolvedImagePosition?.horizontal&&(e=>"flex-start"===e?"flex-end":"flex-start")(t.resolvedImagePosition?.horizontal):t.resolvedImagePosition?.horizontal,nV=(e,t)=>e.representation.type===S$.Image&&"fitHeight"===e.representation.imageSize?tV(t,e.representation):e.align,rV=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",oV=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},iV=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,aV=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",sV=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",lV=24,uV=Du("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0})),cV=Du(Sd,{shouldForwardProp:e=>!["textAlign","direction","isPagination"].includes(e)})(({textAlign:e,theme:t,direction:n,isPagination:r})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center",flexDirection:"rtl"===n?rV(e,r):void 0})),dV=Du(Sd,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})(({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:n})=>{const r=e?"24px":"";let o;switch(n){case"left":o={gridTemplateColumns:t?`20px 2fr ${r}`:`1fr ${r}`};break;case"center":{const n=e||t;o={gridTemplateColumns:n?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:n?2:1},[`& .${Um}`]:{gridColumn:3}};break}case"right":o={gridTemplateColumns:t?`${r} 2fr 20px`:`${r} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${Um}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...o}}),pV=Du(Sd,{shouldForwardProp:e=>"rightAligned"!==e})(({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})),fV=Du(Sd,{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"})),hV=Du(Pc,{shouldForwardProp:e=>"hoverBackground"!==e&&"activeBackground"!==e&&"isActive"!==e&&"order"!==e})(({hoverBackground:e,activeBackground:t,isActive:n,order:r})=>({padding:"4px !important",width:"fit-content",height:"auto",background:n?t:void 0,"&:hover":{background:e},color:"inherit",order:r})),mV=$g(),gV=$g(0),bV=$g(0),vV=e=>parseInt(e??eV.fontSize,10)*XH,yV=/<[bius]>/g;const xV=4/3,SV=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function wV(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const CV=(e,t)=>e?{borderBottomColor:bm.DARK_MODE_BORDER,borderRightColor:bm.DARK_MODE_BORDER,borderLeftColor:bm.DARK_MODE_BORDER,borderTopColor:bm.DARK_MODE_BORDER}:{borderLeftColor:bm.BORDER_MEDIUM,borderRightColor:bm.BORDER_MEDIUM,borderTopColor:bm.BORDER_HEAVY,borderBottomColor:t?bm.BORDER_HEAVY:bm.BORDER_LIGHT},EV=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*xV+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},RV=e=>e.components?.find(e=>"theme"===e.key),AV=(e,t,n,r=!1)=>{const o=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),i=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:o,color:SV(n?.fontColor)?wV(bm.TEXT,t,n?.fontColor):i||bm.TEXT,fontSize:n?.fontSize&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...CV(t.background.isDark,r)};return Object.keys(s).forEach(e=>{const t=e;null==s[t]&&delete s[t]}),s};function IV(e,t,n){const r=RV(e)?.header,o=AV("header",t,r,n);return o.background=(e=>{if(void 0===e)return;const t=se(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),o.hoverBackground=xm(o.background??bm.WHITE,eg),o.activeBackground=xm(o.background??bm.WHITE,tg),o}function MV(e,t,n){const r={};let o={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return t?.qValues?.forEach((e,t)=>{const i=e.qText,a=i&&wm(i);a&&(r[n[t]]=a);const s=((e,{boldFontWeight:t,combineDecorations:n=!1})=>{const r=e?.toLowerCase().match(yV),o={},i=new Set;return r?.forEach(e=>{switch(e){case"<b>":o.fontWeight=t;break;case"<i>":o.fontStyle="italic";break;case"<u>":i.add("underline"),o.textDecoration="underline";break;case"<s>":i.add("line-through"),o.textDecoration="line-through"}}),n&&i.size>0&&(o.textDecoration=["underline","line-through"].filter(e=>i.has(e)).join(" ")),Object.keys(o).length>0?o:void 0})(i,{boldFontWeight:ZH,combineDecorations:!0});var l,u;o={...o,...s,textDecoration:(l=o.textDecoration,u=s?.textDecoration,u?l?[...new Set(`${l} ${u}`.split(/\s+/).filter(e=>e&&"none"!==e))].join(" "):u:l)}}),r.cellBackgroundColor&&!r.cellForegroundColor&&(r.cellForegroundColor=vm(r.cellBackgroundColor)),{...e,...r,color:r.cellForegroundColor||e.color,background:r.cellBackgroundColor||e.background,fontStyle:o.fontStyle,fontWeight:o.fontWeight,textDecoration:o.textDecoration}}const kV=25e4,DV=(e,t)=>t.qAttrExps?.qValues?.[e],PV=e=>{const t=Number(e?.qNum);return void 0!==e?.qNum&&Number.isFinite(t)?t:void 0},TV=e=>{const t=e?.qText?.trim();return t&&"ARGB(0,0,0,0)"!==t.toUpperCase()?wm(t)??void 0:void 0},qV=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,OV=5e6,LV=5e5;const NV={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,n){return{key:jV(e),value:jV(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,i))}),t}};function jV(e){try{return decodeURIComponent(e)}catch{return e}}function _V(e){if(!(this instanceof _V))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>NV.fromSearchString(t.search)}})}function zV(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}_V.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},_V.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=zV(t.key),t.value?n+=`=${zV(t.value)}`:n+=t.useEqualSign?"=":"";return n};var FV=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},$V=class{decode(e){let t="";const n=new FV(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const BV=e=>e>=0&&e<=1114111,HV=e=>e.match(/[\s]/);var VV=class extends $V{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(n=i,r=0;r<5&&(o=e.next(),null!=o&&!HV(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const a=parseInt(n,16);return BV(a)?String.fromCharCode(a):"�"}},WV=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},UV=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,i;if(t.length===n)return i=this._value,this.setValue(r),i;const a=t.charAt(n);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return WV.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return WV.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||WV.newInstanceIfNeeded(e,t,this._value)}},GV=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new UV);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const KV=(()=>{const e=[],t=[],n=new GV;let r,o,i;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),n.put(i,String.fromCharCode(o)));return n})();var YV=class extends $V{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,KV.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const i=KV.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&BV(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&BV(r)?String.fromCharCode(r):null}},XV=class extends $V{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(i=parseInt(n,16),BV(i))?String.fromCharCode(i):(e.reset(),null)}};let JV;"undefined"!=typeof document&&(JV=document.createElement("div"));const ZV=Array.prototype.indexOf,QV=[",",".","_"," "],eW=[",",".","-","_"," "],tW={width:["%"],height:["%"]},nW={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},rW={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":nW.image,"background-color":nW.color,"border-color":nW.color,"border-image":nW.image,color:nW.color,icon:nW.image,"list-style-image":nW.image,"outline-color":nW.color},oW={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function iW(e,t,n){let r;if(t){if(ZV)return ZV.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function aW(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return JV.appendChild(n),t=JV.innerHTML,JV.removeChild(n),t}function sW(e,t,n){let r,o,i,a,s,l,u,c,d;for(e=uW(e).toLowerCase(),t=uW(t),i=0;i<oW.attr_name.length;i++)if(e.match(oW.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<oW.attr_val.length;i++)if(t.toLowerCase().match(oW.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=tW[e],r||(r=eW),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&iW(u,r)<0?(d=c.toString(16),o+=`&#x${d};`):o+=u;return n||(o+='"'),o}function lW(e,t,n){let r,o,i,a,s,l,u,c,d,p;if(e=uW(e).toLowerCase(),t=uW(t),iW(e,oW.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<oW.css_val.length;r++)if(t.toLowerCase().indexOf(oW.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=rW[e],o||(o=nW.default),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&iW(u,o)<0?(d=c.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=u;return i}function uW(e,t){let n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new YV,new XV,new VV];for(;!a;){r=n;for(let e=0;e<s.length;e++)i=s[e].decode(n),i!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const cW=[];for(let e=0;e<255;e++)cW[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const dW={html:e=>aW(e.unsafe),css(e){let t,n=[];const r=[],o={};let i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=lW(t,n[t],!0),i+=lW(t,n[t],!0),o[t]=r[t]);return e.map?o:i},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=sW(e,t[e],!0),o+=sW(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function pW(e,t){throw new Error(t)}var fW={canonicalize:uW,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?dW.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&pW(this,"Invalid parameter type"),dW.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&pW(this,"Invalid parameter type"),dW.attr(e)):void pW(this,"Invalid parameter type")},encodeForAttr:sW,encodeForAttr2:function(e){return sW("nonsens",e,!0)},encodeForCSS:lW,encodeForHref:function(e){uW(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new _V(e),n=_V.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+_V.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,i,a,s;for(t||(t=QV),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),iW(o,t)>=0||null==cW[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:aW,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=uW(t).toLowerCase():pW(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=LV,maxByteSizeImage:r=OV}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,n,r]=qV.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,i,a);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const hW=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},mW=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!fW.isSafeDataURL(t))?{type:S$.Text,url:void 0,text:e,labelStructure:o}:{type:S$.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:hW(r,a),labelStructure:o,imageBox:i},gW=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:S$.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:S$.MiniChart,text:r,miniChart:a}},bW=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===w$.Attribute?void 0:n?.urlLabel},vW=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:S$.Link,url:fW.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:S$.Text,url:void 0,text:t,labelStructure:e}}},yW=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,measureMinMax:a,labelStructure:s,getText:l=e=>e.qText,direction:u,enabledFeatures:c})=>{const d=C$(t),p=l(e);return d===S$.Image&&c[S$.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=DV(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),mW({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return mW({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o});const l=DV(n.imageLabel??-1,e)?.qText??r;return mW({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o})}return{type:S$.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,p,u,s):d===S$.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===w$.Attribute){const i=bW(n.url??-1,e,t);return vW({labelStructure:r,text:o||i||"",url:i})}if(i===w$.Dimension){const i=bW(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),vW({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:S$.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,s,p):d===S$.Indicator&&c[S$.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:S$.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,p):d===S$.MiniChart&&c[S$.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?gW(e,t,i,p):d===S$.Bar&&c[S$.Bar]?((e,t,n,r,o)=>{const i={type:S$.Text,text:o},a=PV(e);if(!t||void 0===a)return i;const s=t=>{const r=n[t];return void 0===r||r<0?void 0:DV(r,e)},{barRangeMode:l,barColorMode:u,barLabelColorMode:c}=t,d="manual"===l,p=e=>d&&"number"==typeof e&&Number.isFinite(e)?e:void 0,f={value:a,columnMin:p(t.barRangeMin)??r?.qMin??0,columnMax:p(t.barRangeMax)??r?.qMax??0,isManualRange:d,hasNegativeValues:r?.hasNegativeValues,hasPositiveValues:r?.hasPositiveValues,offsetValue:PV(s("barOffset"))??0,thicknessPx:PV(s("barWidth")),label:s("barLabel")?.qText??o,fallbackLabel:o,color:"expression"===u?TV(s("barColor")):void 0,colorPalette:t.barColor,labelColor:"expression"===c?TV(s("barLabelColor")):void 0,labelColorPalette:t.barLabelColor,barEnd:t.barEnd??"none"};return{type:S$.Bar,text:o,bar:f}})(e,t,n,a,p):{type:S$.Text,url:void 0,text:p,labelStructure:s}},xW=$g(e=>{const t=e(Bb),n=e(Rb);return e(Ab),{qTop:0,qHeight:0,rowPartialHeight:n?.content?.rowPartialHeight??0,visibleTop:n?.content?.visibleTop??t?.visibleTop,visibleHeight:n?.content?.visibleHeight??t?.visibleHeight,scrollLeft:n?.content?.scrollLeft??t?.scrollLeft??0,scrollTopRatio:n?.content?.scrollTopRatio??t?.scrollTopRatio,rowsPerPage:n?.content?.rowsPerPage??t?.rowsPerPage,page:n?.content?.page??t?.page,estimatedRowHeight:n?.content?.estimatedRowHeight??0}}),SW=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),wW=({cId:e})=>e??d$(),CW=["D","T","TS","IV"],EW=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],RW=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],AW=["January","February","March","April","May","June","July","August","September","October","November","December"],IW=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],MW={D:"YYYY-MM-DD",T:"hh:mm:ss",TS:"YYYY-MM-DD hh:mm:ss"},kW=864e5,DW=2**32,PW=e=>{let t=Math.floor(e),n=Math.round((e-t)*kW);n>=kW&&(t+=1,n=0);const r=t-25569,o=r+719468,i=Math.floor(o/146097),a=o-146097*i,s=Math.floor((a-Math.floor(a/1460)+Math.floor(a/36524)-Math.floor(a/146096))/365),l=a-(365*s+Math.floor(s/4)-Math.floor(s/100)),u=Math.floor((5*l+2)/153),c=u<10?u+2:u-10;return{year:s+400*i+(c<=1?1:0),month:c,date:l-Math.floor((153*u+2)/5)+1,day:(r%7+7+3)%7,h:Math.floor(n/36e5),m:Math.floor(n%36e5/6e4),s:Math.floor(n%6e4/1e3),f:n%1e3}},TW=(e,t)=>String(e).padStart(t,"0"),qW=e=>{const[,t]=e.toString().split(".");return t?Number(`0.${t}`):0},OW=/Y+|y+|M+|W+|w+|D+|d+|h+|H+|m+|s+|S+|f+|F+|t{1,2}|T{1,2}/g,LW=(e,t,n)=>{if(Number.isNaN(e)||!Number.isFinite(e))return String(e);let r,o=(n||("IV"===t?MW.T:MW[t])).replace(/\[.+]|\[|]/g,"");"IV"===t?(e<0&&(e=-e,o=`-${o}`),r=((e,t)=>{const n=Math.floor(e);let r=24*qW(e),o=60*qW(r),i=60*qW(o);const a=Math.round(1e3*qW(i));r=Math.floor(r),o=Math.floor(o),i=Math.floor(i),/D+/i.test(t)||(r+=24*n),/h+/i.test(t)||(o+=60*r),/m+/i.test(t)||(i+=60*o);let s=0,l="";if(/w+|t+/i.test(t)){const t=PW(e);s=t.day,l=t.h>=12?"pm":"am"}return{year:0,month:0,day:s,date:n%DW,h:r%DW,m:o%DW,s:i%DW,f:a,t:l}})(e,o)):r=((e,t)=>{const n=PW(e);let r=n.h;return t&&(r%=12,r=r||12),{year:n.year,month:n.month,day:n.day,date:n.date,h:r,m:n.m,s:n.s,f:n.f,t:n.h>=12?"pm":"am"}})(e,/t+/i.test(o));const i=(e=>[[/^(Y+|y+)$/,{Y:`${Number(`${e.year}`.slice(-2))}`,YY:TW(`${e.year}`.slice(-2),2),YYY:TW(`${e.year}`.slice(-3),3),def:t=>TW(`${e.year}`,t.length)}],[/^M+$/,{M:e.month+1,MM:TW(e.month+1,2),MMM:IW[e.month],def:AW[e.month]}],[/^(W+|w+)$/,{W:e.day,WW:TW(e.day,2),WWW:RW[e.day],def:EW[e.day]}],[/^(D+|d+)$/,{def:t=>TW(e.date,t.length)}],[/^(h+|H+)$/,{h:e.h,def:t=>TW(e.h,t.length)}],[/^m+$/,{m:e.m,def:t=>TW(e.m,t.length)}],[/^(s+|S+)$/,{s:e.s,def:t=>TW(e.s,t.length)}],[/^(f+|F+)$/,{def:t=>{const n=`${e.f}`;return n.length>t.length?n.slice(0,t.length):n.padEnd(t.length,"0")}}],[/^(t{1,2}|T{1,2})$/,{def:t=>(t[0].toUpperCase()===t[0]?e.t.toUpperCase():e.t).slice(0,t.length)}]])(r);return o.replace(OW,e=>((e,t)=>{const n=t.find(([t])=>t.test(e))?.[1];if(!n)return"";const r=Object.keys(n).find(t=>"def"!==t&&(t===e||t.toLowerCase()===e)),o=void 0===r?n.def:n[r];return String("function"==typeof o?o(e):o)})(e,i))},NW=/[#0]/,jW={prefix:"",suffix:""},_W=e=>{const t=e.search(NW);if(-1===t)return jW;let n=t;for(let t=e.length-1;t>n;t--)if(NW.test(e[t])){n=t;break}return{prefix:e.slice(0,t),suffix:e.slice(n+1)}},zW=/\B(?=(\d{3})+(?!\d))/g,FW={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y",[-3]:"m",[-6]:"μ",[-9]:"n",[-12]:"p",[-15]:"f",[-18]:"a",[-21]:"z",[-24]:"y"},$W=e=>Number(e.toPrecision(15)),BW=(e,t,n=!1)=>{if(Number.isNaN(e))return String(e);const{qFmt:r,qType:o,qDec:i=".",qThou:a=","}=t??{};if((e=>CW.includes(e))(o))return LW(e,o,r);if(!r)return String(e);const[s,l]=r.split(";"),{suffix:u}=_W(s),c=u.startsWith("A"),d=(c?u.slice(1):u).endsWith("%"),{value:p,siPrefix:f}=((e,t,n)=>{let r=t?$W(100*e):e,o="";if(n&&0!==r&&Number.isFinite(r)){let e=Number(r.toExponential().split("e")[1]);e-=e%3,e in FW&&(o=FW[e],r=$W(r/10**e))}return{value:r,siPrefix:o}})(e,d,c),h=p<0,m=h&&l?l:s,{prefix:g,suffix:b}=_W(m),v=c&&b.startsWith("A")?b.slice(1):b,{decimals:y,useThousands:x}=((e,t,n)=>{const r=e.indexOf(".");let o=0;return-1!==r?o=(e.slice(r+1).match(/[#0]/g)??[]).length:n&&(o=String(Math.abs(t)).split(".")[1]?.length??0),{decimals:Math.min(o,100),useThousands:e.includes(",")}})(m,p,n||"U"===o),[S,w]=Math.abs(p).toFixed(y).split("."),C=x?S.replace(zW,a):S;return`${h&&!l?"-":""}${g}${w?`${C}${i}${w}`:C}${f}${v}`},HW=1e4;function VW(e,t){return[...t].reverse().find(t=>t*e<=HW)||Math.floor(HW/e)}function WW(e,t){if(t?.skipTotals)return{atTop:!1,atBottom:!1};const n=e.qHyperCube.qDimensionInfo.length>0,r=e.qHyperCube.qMeasureInfo.length>0,o=e.qHyperCube.qGrandTotalRow.length>0,i=e.totals?.show,a=e.totals?.position;if(o&&(n&&r||!i&&!n)){if(i||"top"===a)return{atTop:!0,atBottom:!1};if("bottom"===a)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function UW(e,t,n,r){return t?0===n?e.totals?.label??"":"":e.qHyperCube.qGrandTotalRow.at(r)?.qText??""}function GW(e,t){const n=e.qHyperCube.qGrandTotalRow.at(t);return xH(n?.qNum)}function KW(e,t,n,r,o){return e&&!e.auto?r&&"rtl"===o&&"center"!==e.align?{headTextAlign:"right"===e.align?"left":"right",totalsTextAlign:"right"===e.align?"left":"right",bodyTextAlign:"right"===e.align?"left":"right"}:{headTextAlign:e.align,totalsTextAlign:e.align,bodyTextAlign:e.align}:r||"rtl"!==o?{headTextAlign:"N"===t||void 0===t?"right":"left",totalsTextAlign:n?"left":"right",bodyTextAlign:"auto"}:{headTextAlign:"N"===t||void 0===t?"left":"right",totalsTextAlign:n?"right":"left",bodyTextAlign:"auto"}}const YW=(e,t,n,r)=>"auto"!==t?t:r||"rtl"!==n?e?"right":"left":e?"left":"right",XW=(e,t)=>{if(!e)return;const{background:n,foreground:r}=e,o=se(n??""),i=se(r??""),a=t?"getRGB":"getRGBA",s=o.isInvalid()?void 0:o[a](),l=s?xm(s,eg):void 0,u=s?xm(s,tg):void 0;return i.isInvalid()&&void 0!==s?{background:s,color:vm(s),headerMenuHoverBackground:l,headerMenuActiveBackground:u}:{background:s,color:i.isInvalid()?void 0:i.getRGBA(),headerMenuHoverBackground:l,headerMenuActiveBackground:u}};function JW(e,t,n,r,o=()=>!1){const{qDimensionInfo:i,qMeasureInfo:a,qEffectiveInterColumnSortOrder:s}=e.qHyperCube,{colIdx:l,pageColIdx:u,visibleDimInfoIdx:c,visibleMeasureInfoIdx:d}=t,p=i.length,f=l<p,h=f?i[l]:a[l-p],m=f&&i[l].qGrouping===ng.Cyclic,g=l===s[0];let b,v,y,x="",S=!1,w=-1,C=0,E=[];const{representation:R,conditionalColoring:A}=h;if(f&&void 0!==c){const e=h;x=e.qGroupFieldDefs[e.qGroupPos],C=e.qGroupPos,E=e.qGroupFallbackTitles,S=e.qLocked??!1,w=c,({qDimensionType:b}=e)}else({qMiniChart:v}=h),"bar"===R?.type&&(y=function({qMin:e,qMax:t,qAttrExprInfo:n}){if("number"!=typeof e||"number"!=typeof t||!Number.isFinite(e)||!Number.isFinite(t))return;const r=n.find(({id:e})=>"barOffset"===e),o=Number.isFinite(r?.qMin)?r?.qMin:0,i=Number.isFinite(r?.qMax)?r?.qMax:0;return{qMin:Math.min(o,o+e),qMax:Math.max(i,i+t),hasNegativeValues:e<0,hasPositiveValues:t>=0}}(h));const{qFallbackTitle:I,textAlign:M,qAttrExprInfo:k,qSortIndicator:D,qReverseSort:P,qApprMaxGlyphCount:T,columnWidth:q,qLibraryId:O,headerColor:L}=h,N=e.nullValueRepresentation?.text,j=!f&&void 0!==N&&wH(N)?BW(CH(N),h.qNumFormat,h.qIsAutoFormat):void 0;return{isDim:f,isCyclic:m,isLocked:S,fieldId:x,colIdx:l,qLibraryId:O,pageColIdx:u,qApprMaxGlyphCount:T,qReverseSort:P,columnWidth:q??{type:Qm.Auto},selectionColIdx:w,isActivelySorted:g,id:wW(h),label:I??"",groupDimensionPos:C,groupDimensionLabels:E,qAttrExprInfoIDs:k.map(e=>e.id),qAttrExprInfoIndex:SW(h),sortDirection:D&&"N"!==D?D:"A",totalInfo:UW(e,f,u,d??-1),...!f&&{isTotalNumeric:GW(e,d??-1)},...KW(M,b,f,n,r),representation:R,conditionalColoring:f?void 0:A,qNumFormat:f?void 0:h.qNumFormat,qIsAutoFormat:f?void 0:h.qIsAutoFormat,formattedNullValueText:j,qMiniChart:v,measureMinMax:y,headerColor:o("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?XW(L,n):void 0}}const ZW=(e,t,n,r=()=>!1)=>{const{qHyperCube:{qColumnOrder:o,qDimensionInfo:i,qMeasureInfo:a}}=e,s=i.length+a.length,l=((e,t,n)=>{const r=t.length,{visible:o,hiddenDim:i,hiddenMea:a}=e.reduce((e,o)=>{const i=o<r,{qError:a}=i?t[o]:n[o-r];return 7005===a?.qErrorCode?i?e.hiddenDim.push(o):e.hiddenMea.push(o):e.visible.push(o),e},{visible:[],hiddenDim:[],hiddenMea:[]});return o.map((e,t)=>{const n=e<r,o=(n?i:a).filter(t=>t<e).length,s=e-o;return{colIdx:e,pageColIdx:t,visibleDimInfoIdx:n?s:void 0,visibleMeasureInfoIdx:n?void 0:s-r}})})(o.length===s?o:Array.from(Array(s).keys()),i,a);return l.map(o=>JW(e,o,t,n,r))},QW=(e,t,n,r)=>e?(r?n.nullValueRepresentation?.dimensionText:void 0)??t.qText??"-":n.nullValueRepresentation?.text??t.qText??"-",eU=(e,t)=>t?-2===e.qElemNumber:!!e.qIsNull,tU={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},nU=$g(e=>{const t=e(rU),n=e(yb),r=e(xW),o=n.qHyperCube.qSize.qcy,i=r.visibleHeight??t.rowsPerPage,a=r.visibleTop??t.page*i,s=r.visibleHeight??Math.min(i,o-a),l=n.qHyperCube.qSize.qcx;return t.page>0&&a>=o?{...t,page:0}:s*l>HW?{...t,rowsPerPage:VW(l,t.rowsPerPageOptions),page:0}:t}),rU=$g(tU),oU=$g(e=>{const t=e(yb),n=e(Bb),r=e(xW);return _b(t,n)?{page:r.page||tU.page,rowsPerPage:r.rowsPerPage||tU.rowsPerPage,rowsPerPageOptions:tU.rowsPerPageOptions}:e(nU)},(e,t,n)=>{t(rU,e=>({...e,...n}))}),iU=!0,aU=e=>-1===e.qElemNumber||!!e.qIsTotalCell,sU=$g(async e=>{const t=e(yb),n=e(Bb),r=e(Fb),{page:o,rowsPerPage:i}=e(oU),a=e(xW),s=e(Gb),l=e(mb),u=e(Sb),c=e(gb),d=t.qHyperCube.qSize.qcx,p=t.qHyperCube.qSize.qcy,f=Math.ceil(p/i),h=a.visibleTop??o*i,m=a.visibleHeight??Math.min(i,p-h),g=p>10,b=WW(t,n),v=ZW(t,iU,r,c),y=l.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),x=c("VNA-977-TABLE-BARS"),S=await(async(e,t,n)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const r=t.qHyperCube.qDataPages.at(0),o=r?.qArea;return r&&o?.qLeft===n.qLeft&&o.qTop===n.qTop&&o.qWidth===n.qWidth&&o.qHeight>=n.qHeight?[{...r,qMatrix:r.qMatrix.slice(0,n.qHeight)}]:e&&"getHyperCubeData"in e?e.getHyperCubeData("/qHyperCubeDef",[n]):[]})(s,t,{qLeft:0,qTop:h,qHeight:m,qWidth:d});u||(a.qTop=h,a.qHeight=m,a.rowsPerPage=i,a.page=o);const w=S.at(0)?.qMatrix.map((e,n)=>{const o=[],i=e.some(aU);return v.forEach((a,s)=>{const u=e[s],c=!a.isDim&&u.qIsNull,d=a.isDim&&eU(u,a.isDim),p=c||d?QW(a.isDim,u,t,y):u.qText,f=c?wH(p):SH(u),g=SH(u)&&!wH(u.qText??"");o[s]={id:d$(),...u,align:YW(f,a.bodyTextAlign,r,iU),rowIdx:n+h,colIdx:a.colIdx,pageRowIdx:n,pageColIdx:s,selectionColIdx:a.selectionColIdx,isSelectable:a.isDim&&!a.isLocked&&!i&&!d,isTotalRow:i,isLastRow:n===m-1,isNumeric:f,isDual:g,isNull:(!c||!f)&&eU(u,a.isDim),qNumFormat:a.qNumFormat,qIsAutoFormat:a.qIsAutoFormat,formattedNullValueText:a.formattedNullValueText,representation:yW({cell:u,representationProperties:a.representation,attrExprInfoIndex:a.qAttrExprInfoIndex,env:l,conditionalColoring:a.conditionalColoring,miniChartOnMeasure:a.qMiniChart,measureMinMax:a.measureMinMax,getText:()=>p,direction:r,enabledFeatures:{[S$.Image]:!0,[S$.Indicator]:!0,[S$.MiniChart]:!0,[S$.Bar]:!a.isDim&&x}})}}),o})??[];return{totalColumnCount:d,totalRowCount:p,totalPages:f,paginationNeeded:g,totalsPosition:b,columns:v,rows:w}}),lU=ZR(sU,e=>e),uU=$g(e=>{const t=e(yb),n=e(Bb),r=e(Tb),o=e(Fb),i=e(gb),a=ZW(t,false,o,i),s=WW(t,n),l=t.qHyperCube.qSize.qcy,u=Math.min(kV,l),c=l>kV&&!!r.active;return{totalsPosition:s,columns:a,rows:[],totalRowCount:l,totalColumnCount:t.qHyperCube.qSize.qcx,totalPages:Math.ceil(l/u),paginationNeeded:c}}),cU={totalsPosition:{atTop:!1,atBottom:!1},columns:[],rows:[],totalRowCount:0,totalColumnCount:0,totalPages:0,paginationNeeded:!1},dU=$g(),pU=$g(e=>{const t=e(Vb),n=e(dU);return n||(t?e(lU)??cU:e(uU))}),fU=$g(e=>e(pU).totalsPosition),hU=$g(e=>e(pU).columns),mU=$g(e=>e(hU).length),gU=$g(e=>e(pU).rows),bU=$g(e=>e(pU).totalRowCount),vU=$g(e=>e(pU).totalColumnCount),yU=$g(e=>e(pU).paginationNeeded),xU=$g(e=>{const t=e(Qb),n=e(nv),r=e(yb),o=e(fU),i=e(gU),a=o.atTop,s=function(e,t,n,r){const o=RV(e)?.content,i=AV("content",t,o);i.background=t.background.color;const a=EV(i.fontSize,n,r),s=o?.hoverColor,l=o?.hoverFontColor,u=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),c=t.getStyle("object","","straightTableV2.content.hover.color"),d=SV(l)||!!c,p=SV(s)||!!u,f=d||p;let h;h=SV(s)?wV(bm.HOVER,t,s):u||(d?"":bm.HOVER);const m=f?wV(vm(h),t,l):"";return{...i,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(r,n,i.length,t),l=IV(r,n,!a),u=function(e,t,n){const r=RV(e)?.content,o=AV("content",t,r),{borderBottomColor:i,borderTopColor:a,background:s}=IV(e,t,n);return{...o,borderBottomColor:i,background:s,borderTopColor:a}}(r,n,a);return{body:s,head:l,totals:u}}),SU=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},wU=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:o}=e.background,i=SU(e,t?.background),a=e.getStyle("","",n);return{backgroundColor:i||r||a,backgroundFromStyling:i,sheetColorFromCSS:o}},CU=(e,t,n,r=bm.WHITE)=>{const{backgroundColor:o,backgroundFromStyling:i,sheetColorFromCSS:a}=wU(e,t,n);return Im(i,o,a,r)??r},EU=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return JH}},RU=e=>e?.some(e=>"italic"===e)?"italic":"normal",AU=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?ZH:"normal",IU=e=>!1===e?1:3,MU=e=>e?.some(e=>"underline"===e)?"underline":"none",kU=$g(e=>{const t=e(Bb),n=e(Vb),r=e(nv),o=e(yb),i=e(xU),a=e(gb),{header:s,dimensionValues:l,measureValues:u,totalValues:c,subTotalValues:d,nullValues:p,dimensionNullValues:f,grid:h,content:m}=RV(o)??{},g=a("VNA-670-SEPARATE_NULL_VALUE_STYLING"),b=n?bm.WHITE:bm.TRANSPARENT,v=CU(r,s,"object.straightTableV2.dimension.label.name.backgroundColor",b),y=t?.maxLineCount??m?.rowHeight??r.getStyle("object.straightTableV2","grid","lineClamp"),x=(g?f:void 0)??p;return{header:{fontFamily:s?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.name","fontFamily")??i.head.fontFamily??QH,fontSize:EU(s?.fontSize??r.getStyle("object.straightTableV2.dimension","label.name","fontSize")??i.head.fontSize),fontStyle:RU(s?.fontStyle),fontWeight:AU(s?.fontStyle,ZH),textDecoration:MU(s?.fontStyle),color:SU(r,s?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.name","color")??i.head.color??bm.TEXT,background:v},headerMenuHoverBackground:xm(v,eg),headerMenuActiveBackground:xm(v,tg),dimension:{values:{fontFamily:l?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??i.body.fontFamily??QH,fontSize:EU(l?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.dimension","label.value","fontSize")??i.body.fontSize),fontStyle:RU(l?.fontStyle),fontWeight:AU(l?.fontStyle,"normal"),textDecoration:MU(l?.fontStyle),color:SU(r,l?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.value","color")??i.body.color??bm.TEXT,background:wU(r,l,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??i.body.background??bm.TRANSPARENT}},measure:{values:{fontFamily:u?.fontFamily??r.getStyle("object.straightTableV2.measure","label.value","fontFamily")??i.body.fontFamily??QH,fontSize:EU(u?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.measure","label.value","fontSize")??i.body.fontSize),fontStyle:RU(u?.fontStyle),fontWeight:AU(u?.fontStyle,"normal"),textDecoration:MU(u?.fontStyle),color:SU(r,u?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.measure","label.value","color")??i.body.color??bm.TEXT,background:wU(r,u,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??i.body.background??bm.TRANSPARENT}},totalRow:{fontFamily:c?.fontFamily??r.getStyle("object.straightTableV2.total","label.value","fontFamily")??i.totals.fontFamily??QH,fontSize:EU(c?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.total","label.value","fontSize")??i.totals.fontSize),fontStyle:RU(c?.fontStyle),fontWeight:AU(c?.fontStyle,ZH),textDecoration:MU(c?.fontStyle),color:SU(r,c?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.total","label.value","color")??i.totals.color??bm.TEXT,background:CU(r,c,"object.straightTableV2.total.label.value.backgroundColor",b)},subTotalRow:{fontFamily:d?.fontFamily??r.getStyle("object.straightTableV2.subTotal","label.value","fontFamily")??i.totals.fontFamily??QH,fontSize:EU(d?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.subTotal","label.value","fontSize")??i.totals.fontSize),fontStyle:RU(d?.fontStyle),fontWeight:AU(d?.fontStyle,ZH),textDecoration:MU(d?.fontStyle),color:SU(r,d?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.subTotal","label.value","color")??i.totals.color??bm.TEXT,background:CU(r,d,"object.straightTableV2.subTotal.label.value.backgroundColor",b)},dimensionNull:{fontStyle:RU(x?.fontStyle),fontWeight:AU(x?.fontStyle,"normal"),textDecoration:MU(x?.fontStyle),color:SU(r,x?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??i.body.color??bm.TEXT,background:SU(r,x?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??bm.NULL_VALUE_BACKGROUND},measureNull:{fontStyle:RU(p?.fontStyle),fontWeight:AU(p?.fontStyle,"normal"),textDecoration:MU(p?.fontStyle),color:SU(r,p?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??i.body.color??bm.TEXT,background:SU(r,p?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??bm.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:y??IU(o.multiline?.wrapTextInCells),headerLineClamp:IU(o.multiline?.wrapTextInHeaders),border:SU(r,h?.border)??r.getStyle("object.straightTableV2","grid","borderColor")??(r.background.isDark?bm.DARK_MODE_BORDER:bm.BORDER_MEDIUM),divider:SU(r,h?.divider)??r.getStyle("object.straightTableV2.grid","","divider.borderColor")??bm.BORDER_HEAVY,hoverColors:{color:SU(r,m?.hoverFontColor)??r.getStyle("object.straightTableV2","","grid.hover.color")??i.body.hoverColors?.color,background:SU(r,m?.hoverColor)??r.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??i.body.hoverColors?.background},zebraStripes:{show:!!h?.zebraStripes?.show,odd:{color:SU(r,h?.zebraStripes?.color?.odd),background:SU(r,h?.zebraStripes?.background?.odd)},even:{color:SU(r,h?.zebraStripes?.color?.even),background:SU(r,h?.zebraStripes?.background?.even)},overrideDimNullValueBackground:void 0===SU(r,x?.background),overrideDimNullValueColor:void 0===SU(r,x?.fontColor),overrideMeasNullValueBackground:void 0===SU(r,p?.background),overrideMeasNullValueColor:void 0===SU(r,p?.fontColor)},lastRowBottomBorder:i.body.lastRowBottomBorder},selectedColors:ym(r),contentStaticLineCount:y}}),DU=$g(e=>{const t=e(kU);return Math.max(vV(t.header.fontSize)+8,32)}),PU=$g(e=>{const t=e(kU),n=vV(t.totalRow.fontSize);return Math.max(n+9,24)}),TU=$g(e=>{const t=e(kU),n=e(wb),r=e(Cb);return Math.max(n>0?vV(t.dimension.values.fontSize):0,r>0?vV(t.measure.values.fontSize):0)}),qU=$g(e=>{const t=e(kU),n=e(TU),r=(t.contentStaticLineCount||1)*n;return Math.max(r+9,24)}),OU=$g(e=>{const t=e(kU),n=vV(t.subTotalRow.fontSize),r=(t.contentStaticLineCount||1)*n;return Math.max(r+9,24)}),LU=(e,t,n)=>{if(!e.length)return[];const r=[],o=[];let i=t;if(e.forEach((e,a)=>{const{columnWidth:{type:s,pixels:l,percentage:u},label:c,qApprMaxGlyphCount:d,totalInfo:p}=e;let f=0;const h=()=>{r[a]=Math.min(Zm.PixelsMax,Math.max(Zm.PixelsMin,f)),i-=r[a]};switch(s){case Qm.Pixels:f=(e=>void 0===e||Number.isNaN(+e)?Zm.PixelsDefault:+e)(l),h();break;case Qm.Percentage:f=(e=>void 0===e||Number.isNaN(+e)?Zm.PercentageDefault:+e)(u)/100*t,h();break;case Qm.FitToContent:e.representation?.type===S$.Image?o.push(a):(f=n(c,p,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case Qm.Auto:o.push(a);break;default:throw new Error(`${s} is not a valid column width type`)}}),o.length){const e=i/o.length;o.forEach(t=>{r[t]=Math.max(Zm.AutoMinTable,e)})}return r},NU=$g(e=>{const t=e(kU),n=e(pU).totalsPosition,r=e(Ib),{measureText:o}=e(pH({...t.header,fontWeight:ZH})),{measureText:i}=e(pH({...t.totalRow,fontWeight:ZH})),{estimateWidth:a}=e(pH(t.dimension.values)),{estimateWidth:s}=e(pH(t.measure.values)),l=n.atBottom||n.atTop;return(e,t,n,u,c,d,p)=>{let f;if(r){const t=4;let n=25;n+=t+24,u&&(n+=20+t),c&&(n+=20),f=o(e)+n}else{let t=9;t+=16,p&&(t+=lV),t+=lV,t+=lV,f=o(e)+t}const h=d?a:s;return Math.max(f,l?i(t)+24+1:0,h(n))}}),jU=$g(null),_U=$g(e=>{const t=e(pU),n=e(Zb).width,r=e(bV),o=e(NU);return LU(t.columns,n-r,o)}),zU=$g(e=>e(jU)??e(_U),(e,t,n)=>{t(jU,n)}),FU=CA(e=>{const t=e(hH);!1===e(mV)&&t.emit("done-adjusting-column-width")}),$U=CA((e,t)=>{e(yb),t(jU,null)}),BU=$g(e=>e(zU).reduce((e,t)=>e+t,0)),HU=({children:e})=>(Qg($U),Qg(FU),e);function VU(e){const t=hm();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),cu({...t,direction:e})}const WU={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},UU={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},GU=Du("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...WU},"&::-moz-range-track":{...WU},"&::-ms-track":{...WU},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...UU},"&::-moz-range-thumb":{...UU},"&::-ms-thumb":{...UU},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),KU=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:u,accessibilityRelatedArgs:c,direction:d="ltr"})=>{const p=Hm({translator:c.translator}),f=D({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!u,g=()=>m?f.current.columnWidth-h:"100%",b={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},v=t=>{f.current={initWidth:e,columnWidth:e,initX:t??f.current.initX}};$m(()=>{m&&v()},[e]);const y=e=>{const t=Math.max(e,Zm.PixelsMin);f.current.columnWidth=t,i(t)},x=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:Qm.Pixels,pixels:f.current.columnWidth};a(e)}l?.(!1)},S=e=>{const t="rtl"===d?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;y(t)},w=e=>{Em(e),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),x()},C=e=>{const t="rtl"===d?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;y(t)},E=e=>{Em(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",E),x()},R=!r&&s?e=>{if(e.key===Xm.Left||e.key===Xm.Right){Em(e);const t=5,n=e.key===Xm.Left?t:-t,r="rtl"===d?n:-n;l?.(!0),y(f.current.columnWidth+r)}else e.key===Xm.Space||e.key===Xm.Enter?(Em(e),s(e),l?.(!1),x()):e.key===Xm.Esc&&(Em(e),s(e),l?.(!1),y(f.current.initWidth))}:void 0,A=p.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(c.columnLabel)]);return Yt.jsx(GU,{style:b,hoverColor:o,isLastColumn:n,className:Jm,"data-testid":Jm,onMouseDown:e=>{Em(e),document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),l?.(!0),v(e.clientX)},onDoubleClick:()=>{a({type:Qm.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(Em(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",E),l?.(!0),v(e.touches[0].clientX))},onKeyDown:R,onBlur:s,onFocus:()=>{v()},type:"range",tabIndex:-1,"aria-label":A,"aria-valuemin":Zm.PixelsMin,"aria-valuemax":Zm.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},YU=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),XU=({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null},JU=Du(Sd,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),ZU=Du(YU,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),QU=Du(jf)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),eG=Du(mp)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),tG=Du(Bf)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),nG=Du(Bf,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),rG=Du("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),oG=Du("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),iG=Du(jc)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),aG=Du(cf,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),sG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),lG=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?lG(t):t:e.parentElement?.children?.[0]},uG=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?uG(t):t},cG=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===Xm.Down||t===Xm.Up){const n=e=>t===Xm.Down?lG(e):uG(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},dG=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let pG={};const fG=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:o,enabled:i,subMenus:a,isSubMenu:s,isActive:l,direction:u,isPagination:c})=>{const[d,p]=k(!1),f=w.useRef(null),h=L(e=>{e.stopPropagation(),p(!1)},[p]);return Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs(nG,{ref:a?f:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),pG={}),a?.length&&(p(!0),pG[r]=p,e.stopPropagation()))},disabled:!i,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:cG,children:[l?Yt.jsx(rG,{direction:u,isPagination:c}):null,Yt.jsxs(oG,{children:[Yt.jsx(aG,{direction:u,isPagination:c,children:Yt.jsx(o,{})}),Yt.jsx(iG,{variant:"body2",children:r})]}),a?.length?Yt.jsx(sG,{}):null]},t),a?.length?Yt.jsx(bG,{isSubMenu:!0,open:d,anchorEl:f.current,onClose:h,menuGroups:dG(a,pG),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:c}):null]})},hG=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&Yt.jsx(tG,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>Yt.jsx(fG,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),mG=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((o,i)=>[hG({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?Yt.jsx(eG,{"data-testid":"group-divider",variant:"middle"}):void 0]),gG={appear:0,enter:0,exit:0},bG=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?Yt.jsx(QU,{className:Gm,open:t,anchorEl:e,onClose:n,transitionDuration:gG,MenuListProps:{id:Km},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:mG({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,vG=({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:o,onPopoverClose:i})=>L(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:o,onPopoverClose:i})}},[e,t,n,r?.qStateName,o,i]),yG=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),xG=(e,t)=>e.some(e=>t[e]>0),SG={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},wG=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=k(null),[a,s]=k(SG);return $m(()=>{e||(s(SG),i(null))},[e]),q(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=yG(t,n),u=await r.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};o=c.qInfo?.qId,a?l():(i(u),d&&s((e=>({canSelectAll:xG(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:xG(["qSelected"],e),canSelectPossible:xG(["qOption"],e),canSelectAlternative:xG(["qAlternative"],e),canSelectExcluded:xG(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},CG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),EG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),RG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),AG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),IG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),MG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),kG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),DG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})})),PG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),TG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),qG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),OG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),LG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let NG=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const jG="/qListObjectDef",_G=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[NG.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:CG,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:AG,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:kG,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:FF,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];n[NG.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:DG,enabled:!0}]}]),!e.isLocked&&n[NG.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:LG,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(jG))},icon:PG,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(jG))},icon:OG,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(jG))},icon:TG,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(jG))},icon:qG,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(jG))},icon:EG,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:MG,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:IG,enabled:!0}]}]),o.length>0&&f.push(...o)}return n[NG.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),c?.(u)},icon:RG,enabled:!0}]}]),f},zG=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:u,selectionRelatedArgs:c,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:p,model:f,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:b=Vm})=>{const v=D(null),y=Hm({translator:o}),{qLibraryId:x,fieldId:S,headTextAlign:w}=r,C=c?.app,{fieldInstance:E,selectionActionsEnabledStatus:R}=wG({open:e,headerData:r,app:C,qStateName:c?.qStateName}),A=XU({model:f,headerData:r}),I=vG({qLibraryId:x,fieldId:S,searchRelatedArgs:u,selectionRelatedArgs:c,direction:h}),M=L(e=>{e.stopPropagation(),t(!1)},[t]),k=L(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?Yt.jsxs(JU,{rightAligned:"right"===w,shouldShowMenuIcon:s,className:Um,onClick:!1===g?k:void 0,ref:v,isAccessibleHeader:g,children:[s?Yt.jsx(ZU,{height:b,className:Wm,"data-testid":Wm,isInteractionsActive:i.active??!1,children:Yt.jsx(YU,{})}):null,Yt.jsx(bG,{open:e,anchorEl:!1===g?v.current:n.current,onClose:M,menuGroups:_G({headerData:r,translator:y,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:I,interactions:i,fieldInstance:E,selectionActionsEnabledStatus:R,anchorRef:n,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:A,expandOrCollapseArgs:p}),direction:h,isPagination:m})]}):null},FG=e=>e.isDark?{background:e.color,borderColor:bm.DARK_MODE_BORDER,color:bm.DARK_MODE_TEXT,disabledColor:bm.DARK_MODE_DISABLED,iconColor:bm.DARK_MODE_TEXT}:{background:e.color,borderColor:bm.BORDER_MEDIUM,color:bm.TEXT,disabledColor:bm.DISABLED},$G=Du(Sd,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`})),BG=Du(wh,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),HG=Du(Pd,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),VG=Du(jc)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),WG=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=M(()=>FG(r.background),[r]);if(!n.active)return null;const a=o?Yt.jsx($G,{footerStyle:i,children:e}):null;return t?V.createPortal(e,t):a},UG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),GG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),KG=P({}),YG=()=>N(KG),XG=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const b=(e=>!e.enabled||e.active)(c)?0:-1,v=M(()=>FG(p.background),[p]),y=o?o.getBoundingClientRect().width:h.width,x=Hm({translator:d}),S=M(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:x,theme:p,interactions:f,rect:h,layout:m,footerStyle:v,tabIndex:b,width:y,visibilityThreshold:g}),[t,n,r,o,i,a,s,l,u,c,x,p,f,h,m,v,b,y,g]);return Yt.jsx(KG.Provider,{value:S,children:e})},JG=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let ZG=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),QG=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const eK=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=YG(),u=0===t.page,c=JG({type:ZG.FirstPage,disabledCondition:u,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(o?.firstPage||QG.FirstPage)?null:Yt.jsx(HG,{...c,disabled:!r.active,children:"rtl"===e?Yt.jsx(GG,{height:Vm}):Yt.jsx(UG,{height:Vm})})},tK=(e,t,n=!1)=>{n&&e.key===Xm.Tab&&!e.shiftKey&&(Em(e),Cm(e.target,t,!1))},nK=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:u,translator:c,tabIndex:d}=YG(),p=t.page>=r-1,f=JG({type:ZG.LastPage,disabledCondition:p,pageNumber:r-1,footerStyle:l,handleChangePage:u,translator:c,interactions:a,tabIndex:d}),h=n.enabled?e=>{tK(e,n,o)}:void 0;return i<=(s?.lastPage||QG.LastPage)?null:Yt.jsx(HG,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?Yt.jsx(UG,{height:Vm}):Yt.jsx(GG,{height:Vm})})},rK=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),oK=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:u,tabIndex:c}=YG(),d=t.page>=r-1,p=JG({type:ZG.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:u,interactions:a,tabIndex:c}),f=!(i>QG.FirstPage&&i>QG.LastPage)&&n.enabled?e=>{tK(e,n,o)}:void 0;return Yt.jsx(HG,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?Yt.jsx(rK,{height:Vm}):Yt.jsx(sG,{height:Vm})})},iK=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:o,translator:i,tabIndex:a}=YG(),s=0===t.page,l=JG({type:ZG.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:o,translator:i,interactions:n,tabIndex:a});return Yt.jsx(HG,{...l,disabled:!n.active,children:"rtl"===e?Yt.jsx(sG,{height:Vm}):Yt.jsx(rK,{height:Vm})})},aK=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:o}=YG(),{page:i,rowsPerPage:a}=n;if(t<=(o?.displayedRowsLabel||QG.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,r)}`,r.toString()]);return Yt.jsx(VG,{variant:"caption",dir:"ltr",children:s})},sK=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=YG(),u=o.qInfo.qId,c=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${u}`,f={tabIndex:s,id:`${d}-${u}`,"data-testid":d,"aria-labelledby":p};return Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs(VG,{variant:"caption",id:p,children:[c,":"]}),Yt.jsx(BG,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},lK=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o,visibilityThreshold:i}=YG();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(i?.rowsPerPage||QG.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=Yt.jsx(Yt.Fragment,{children:e.rowsPerPageOptions.map(e=>Yt.jsx("option",{value:e,children:e},e))});return Yt.jsx(sK,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},uK=1e3,cK="…",dK=({totalPages:e,page:t})=>{const n=Math.min(e,uK),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-uK):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+i;return Yt.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(Yt.jsx("option",{value:cK,disabled:!0,children:cK},"startMoreOptions")),o<e-1&&a.push(Yt.jsx("option",{value:cK,disabled:!0,children:cK},"endMoreOptions")),Yt.jsx(Yt.Fragment,{children:a})},pK=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:o}=YG(),{page:i}=e;if(t<=(o?.selectPage||QG.SelectPage))return null;const a=Yt.jsx(dK,{totalPages:n,page:i});return Yt.jsx(sK,{name:"SelectPage",value:i,options:a,handleChange:e=>{r(+e.target.value)}})};var fK=z(e=>Yt.jsxs(XG,{...e,children:[Yt.jsx(lK,{}),Yt.jsx(pK,{}),Yt.jsx(aK,{}),Yt.jsx(eK,{}),Yt.jsx(iK,{}),Yt.jsx(oK,{}),Yt.jsx(nK,{})]}));const hK=e=>Yt.jsx(WG,{...e,children:Yt.jsx(fK,{...e})}),mK=(e,t,n)=>{const r=n.size,o=r>=t.size;if(r){e({keys:[o?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===r?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",r.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},gK=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},bK=e=>e.ctrlKey||e.metaKey,vK=e=>e.shiftKey&&bK(e),yK=e=>[Xm.Left,Xm.Right,Xm.Up,Xm.Down].includes(e),xK=e=>e.shiftKey&&yK(e.key),SK=e=>(e=>yK(e)||[Xm.Home,Xm.End,Xm.PageUp,Xm.PageDown].includes(e))(e.key)&&!vK(e),wK=(e,t)=>{const{api:n,rows:r,colIdx:o}=e,{cell:i,announce:a,evt:s}=t;let l=new Map;if(-1===o)n?.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;l=new Map(r)}return l=((e,t,n)=>{const{qElemNumber:r,rowIdx:o}=t;return n.ctrlKey||n.metaKey?(new Map).set(r,o):(e.has(r)?e.delete(r):e.set(r,o),new Map(e))})(l,i,s),mK(a,r,l),l.size?(n?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[i.selectionColIdx]]}),{...e,rows:l,colIdx:i.selectionColIdx}):(n?.cancel(),{...e,rows:l,colIdx:-1})},CK=(e,t)=>{const{api:n,rows:r,colIdx:o,pageRows:i,firstCell:a}=e,{cell:s,announce:l,evt:u}=t;if(!(a||"key"in u&&xK(u)))return e;-1===o&&n?.begin(["/qHyperCubeDef"]);const c=((e,t,n,r,o)=>{if(!n.isSelectable)return t;const i=new Map(t);if("key"in r&&xK(r)){i.set(n.qElemNumber,n.rowIdx);const t=r.key===Xm.Down?1:-1,o=e[n.pageRowIdx+t][n.pageColIdx];return o.isSelectable&&i.set(o.qElemNumber,n.rowIdx+t),i}if(!o)return t;const a=Math.min(o.pageRowIdx,n.pageRowIdx),s=Math.max(o.pageRowIdx,n.pageRowIdx);for(let t=a;t<=s;t++){const n=e[t][o.pageColIdx];n.isSelectable&&i.set(n.qElemNumber,n.rowIdx)}return i})(i,r,s,u,a);return mK(l,r,c),{...e,rows:c,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},EK=e=>{const{api:t,rows:n,colIdx:r,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&t?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(n.values()),[r]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},RK=(e,t)=>{switch(t.type){case gH.Select:return wK(e,t.payload);case gH.SelectMouseDown:return((e,{cell:t,mouseupOutsideCallback:n})=>!n||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",n),{...e,firstCell:t,mouseupOutsideCallback:n}))(e,t.payload);case gH.SelectMouseUp:return((e,t)=>EK(e.isSelectMultiValues||e.firstCell!==t.cell?e:wK(e,t)))(e,t.payload);case gH.SelectMultiAdd:return CK(e,t.payload);case gH.SelectMultiEnd:return EK(e);case gH.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case gH.Clear:return e.rows.size?{...e,rows:new Map}:e;case gH.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},AK=$g(e=>{const t=e(Db);return function(e,t){return $g(e,function(e,n,r){n(this,t(e(this),r))})}({pageRows:e(pU).rows,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1},RK)}),IK=$g(e=>e(e(AK)),(e,t,n)=>{t(e(AK),n)}),MK=yM(e=>$g(t=>{const{colIdx:n,rows:r,api:o}=t(IK);return"object"==typeof e&&o?.isModal()?n!==e.selectionColIdx?mH.Disabled:r.has(e.qElemNumber)?mH.Selected:mH.Possible:mH.Inactive}),(e,t)=>"object"!=typeof e||"object"!=typeof t?e===t:e.qElemNumber===t.qElemNumber&&e.selectionColIdx===t.selectionColIdx),kK=$g(e=>{const t=e(BU),n=e(Zb).width,r=e(bV);return t>0&&t+r<n}),DK=()=>{const[e,t]=k(!1);return R_({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?Yt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},PK=(e,{atTop:t,atBottom:n},r)=>({borderLeftColor:e.grid.border,borderRightColor:e.grid.border,borderTopColor:!r&&n?e.grid.divider:e.grid.border,borderBottomColor:r&&!t||!r&&t?e.grid.divider:e.grid.border}),TK=$g(e=>{const t=e(wb),n=e(Kb);if(void 0!==n)return async(e,r)=>{const{isDim:o,colIdx:i,qReverseSort:a,sortDirection:s,isActivelySorted:l}=e,u=o?i:i-t,c=await n.getEffectiveProperties(),{qInterColumnSortOrder:d}=c.qHyperCubeDef,p=[],f=r!==s||l;if(!o){const e=c.qHyperCubeDef.qMeasures.at(u)?.qSortBy;void 0===e?.qSortByNumeric&&p.push({qPath:`/qHyperCubeDef/qMeasures/${u}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}if(!l){const e=[i,...d.filter(e=>e!==i)];p.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${e.join(",")}]`})}f&&p.push({qPath:`/qHyperCubeDef/${o?"qDimensions":"qMeasures"}/${u}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),n.applyPatches(p,!0)}}),qK=e=>{e&&(e.focus(),(e=>{e?.setAttribute("tabIndex","0")})(e))},OK=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),LK=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:o})=>(e<r?e++:t<o&&(t++,e=n),[t,e]),NK=e=>e.atTop?2:1,jK=(e,t)=>({top:e?NK(t):0,bottom:e&&t.atBottom?1:0}),_K=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],zK=e=>e?.setAttribute("tabIndex","0"),FK=e=>e?.setAttribute("tabIndex","-1"),$K=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(FK)},BK=e=>{e?.focus(),zK(e)},HK=e=>{setTimeout(()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${Jm}`);BK(t)},0)},VK=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:o,direction:i})=>{$K(t);const a=((e,t,n,r,o={top:0,bottom:0})=>{const i=o.top>0,a=o.top,s=t.getElementsByClassName("sn-table-row").length-1-o.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[u,c]=n;switch(e.key){case Xm.Down:u<s&&u++;break;case Xm.Up:u>a&&u--;break;case Xm.Right:if(i)break;[u,c]="rtl"===r?OK({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0}):LK({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case Xm.Left:if(i)break;[u,c]="rtl"===r?LK({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):OK({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0});break;case Xm.Home:(bK(e)||i)&&(u=a),i||(c=0);break;case Xm.End:(bK(e)||i)&&(u=s),i||(c=l);break;case Xm.PageDown:u=Math.min(s,u+10);break;case Xm.PageUp:u=Math.max(a,u-10)}return[u,c]})(e,t,n,i,o),s=_K(t,a);return BK(s),((e,t)=>{const n=t.getElementsByClassName("sn-table-container")[0];if(!n?.scrollTo)return;const[r,o]=e;if(r<2)n.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],i=t.getElementsByClassName("sn-table-row")[r].getElementsByClassName("sn-table-cell")[o];if(!i||!e)return;if(i.offsetTop-e.offsetHeight<n.scrollTop){const t=n.scrollTop-i.offsetHeight-e.offsetHeight;n.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),r(a),{nextCell:s,nextCellCoord:a}},WK=(e,t,n,r)=>{$K(t),n(e),r.enabled&&!r.active?r.focus?.():BK(_K(t,e))},UK=(e,t,n)=>{const r=e.currentTarget;if(!r)return;const o=e.relatedTarget??document.activeElement;if(!!o?.closest(`.${Gm}`))return;const i=!!o&&r.contains(o);!n.enabled||t.current||i||(e=>{const t=e.querySelector(`.${vH.First}`),n=e.querySelector(`.${vH.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),((e,t,n)=>{const r=e.currentTarget;if(!n.enabled||t.current||!r)return;const o=e.relatedTarget??document.activeElement;o&&r.contains(o)||n.blur?.(!1)})(e,t,n)},GK=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10M3.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 0zM3 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-1zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0"})})),KK=Du(Fh,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"color"!==e})(({headerStyle:e,interactions:t,hoverBackground:n,background:r,color:o})=>({...eV,...e,cursor:t.active?"pointer":"default",background:r,color:o,verticalAlign:"bottom",boxSizing:"border-box","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?n:r}})),YK=Du("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})(({align:e,dir:t})=>({minWidth:JH,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}})),XK=parseInt(JH,10)/2,JK=Du("div")({position:"absolute",bottom:-XK,left:`calc(50% - ${XK}px)`}),ZK=Du(nm)({position:"sticky",top:0,zIndex:1}),QK={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},eY=Du(Sd)({height:"100%","& .sn-table-cell:focus-visible":{outline:"none",boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"& .sn-table-cell:focus:not(:focus-visible)":{outline:"none"}}),tY=Du("span",{shouldForwardProp:e=>"lineClamp"!==e&&"isHeadCell"!==e&&"isPagination"!==e&&"isNumeric"!==e&&"isDual"!==e})(({lineClamp:e,isHeadCell:t=!1,isPagination:n=!1,isNumeric:r=!1,isDual:o=!1})=>r&&!o||1===e&&!t?{...QK,whiteSpace:"nowrap",display:n?"block":void 0}:{...QK,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"}),nY=Du("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),rY="cell-text",oY=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:o=!1,isDual:i=!1,lineClamp:a})=>{const s=Qg(kU);return o?Yt.jsx(tY,{"data-testid":rY,ref:t,className:"sn-table-cell-text",lineClamp:s.grid.headerLineClamp,isPagination:r,isHeadCell:!0,style:{direction:n?"ltr":void 0},children:e}):Yt.jsx(tY,{"data-testid":rY,ref:t,className:"sn-table-cell-text",isDual:i,isNumeric:n,lineClamp:a??s.grid.contentLineClamp,isPagination:r,style:{direction:n?"ltr":void 0},children:e})},iY=e=>{const{column:t,isInteractionEnabled:n,open:r,setOpen:o,isPagination:i,forwardRef:a}=e,s=Qg(Eb),l=Qg(TK),u=Qg(Fb),c=Qg(Tb),d=Qg(ob),p=Qg(rv),f=Qg(nb),h=Qg(zU)[t.pageColIdx],m=Qg(Gb),g=D(null),b=D(null),v=(({column:e,columnWidth:t})=>{const n=Qg(kU),{measureText:r}=Lm({fontSize:n.header.fontSize,fontFamily:n.header.fontFamily,fontWeight:ZH});let o=!1,i=!1,a=!1;const s=e.isLocked,l=e.isActivelySorted,u=t-25,c=s?20:0,d=l?20:0;let p=r(e.label);return s&&p+c<=u&&(a=!0,p+=c,l&&p+d<=u&&(i=!0,p+=d)),!s&&l&&p+d<=u&&(i=!0,p+=d),p+24<=u&&(o=!0),{shouldShowMenuIcon:o,shouldShowSortIcon:i,shouldShowLockIcon:a}})({column:t,columnWidth:h}),{StartIcon:y,EndIcon:x,LockIcon:S}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},o)=>{const i="A"===e?Yt.jsx(CG,{height:JH,"data-testid":"head-cell-sort-ascending-icon"}):Yt.jsx(AG,{height:JH,"data-testid":"head-cell-sort-descending-icon"}),a=n?Yt.jsx(YK,{align:t,dir:o,children:i}):void 0,s=r?Yt.jsx(pV,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Yt.jsx(GK,{height:JH,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(t,v,u);return Yt.jsxs(dV,{shouldShowMenuIcon:v.shouldShowMenuIcon,shouldShowLockIcon:v.shouldShowLockIcon,alignment:oV(t,i,u),children:[S,Yt.jsxs(cV,{className:"sn-table-head-label",textAlign:t.headTextAlign,direction:u,isPagination:i,children:[y,Yt.jsx(oY,{forwardRef:a,isPagination:i,isHeadCell:!0,children:t.label}),x]}),n?Yt.jsxs(Yt.Fragment,{children:[Yt.jsx(zG,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:g,menuAvailabilityFlags:{[NG.Sorting]:!0,[NG.Searching]:!0,[NG.Selections]:!0,[NG.AdjusterHeaderSize]:!0},open:r,setOpen:o,interactions:c,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),l?.(t,n)??Promise.resolve())},searchRelatedArgs:{embed:d,listboxRef:b},selectionRelatedArgs:{app:f,qStateName:s},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:HK},shouldShowMenuIcon:v.shouldShowMenuIcon,model:m,direction:u,isPagination:i,isAccessibleHeader:!0}),Yt.jsx(uV,{ref:b,direction:u,isPagination:i}),Yt.jsx(uV,{ref:g,direction:u})]}):null]})},aY=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M6 2h10V1H6zm5 5h5V6h-5zm5 5h-5v-1h5zM5 10h1v2.663a3.5 3.5 0 1 0-2.922.036l-.406.914A4.501 4.501 0 1 1 7.329 13H9v1H5z"})})),sY=(e,t)=>e.isCyclic&&t,lY=({column:e})=>{const t=Qg(kU),n=Qg(Fb),r=Qg(Gb),o=w.useRef(null),[i,a]=w.useState(!1),s=XU({model:r,headerData:{...e,dimensionInfoIndex:e.colIdx}});return Yt.jsxs(Yt.Fragment,{children:[Yt.jsx(hV,{hoverBackground:e.headerColor?.headerMenuHoverBackground??t.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??t.headerMenuActiveBackground,isActive:i,tabIndex:-1,onClick:e=>{e.stopPropagation(),a(!0)},children:Yt.jsx(aY,{ref:o,height:16,"data-testid":"head-cell-cyclic-icon"})}),Yt.jsx(bG,{open:i,onClose:()=>{a(!1)},menuGroups:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),a(!1),s?.(n)},enabled:!0,icon:FF,isActive:e.groupDimensionPos===n}))}]],anchorEl:o.current,direction:n,isPagination:!1})]})},uY=e=>e.isLocked,cY=({column:e})=>{const t=Qg(nb),n=Qg(Eb),r=Qg(bb),o=Qg(kU);return Yt.jsx(hV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??o.headerMenuHoverBackground,onClick:o=>{o.stopPropagation(),(async(e,t,n,r={warn:()=>{},error:()=>{}})=>{const o=yG(t??"$",n);let i;try{const t=await(e?.createSessionObject(o));i=t?.id,await(t?.unlock("/qListObjectDef"))}catch(e){r.error({msg:"Failed to unlock field from table header",payload:e})}finally{i&&(await(e?.destroySessionObject(i))||r.error({msg:"Failed to destroy session object when unlocking field from table header"}))}})(t,n,e,r)},children:Yt.jsx(GK,{height:16,"data-testid":"head-cell-lock-icon"})})},dY=({column:e,menuIconRef:t,open:n,setOpen:r})=>{const o=Qg(kU);return Yt.jsx(hV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??o.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??o.headerMenuActiveBackground,isActive:n,order:e.isDim?void 0:-1,onClick:e=>{e.stopPropagation(),r(e=>!e)},ref:t,children:Yt.jsx(YU,{height:16})})},pY=({anchorRef:e,column:t,isPagination:n,listboxRef:r,open:o,setOpen:i})=>{const a=Qg(nb),s=Qg(Fb),l=Qg(ob),u=Qg(Tb),c=Qg(Gb),d=Qg(Eb),p=Qg(rv),f=Qg(TK);return Yt.jsx(zG,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:e,menuAvailabilityFlags:{[NG.Sorting]:!0,[NG.Searching]:!0,[NG.Selections]:!0,[NG.AdjusterHeaderSize]:!0},open:o,setOpen:i,interactions:u,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),f?.(t,n)??Promise.resolve())},searchRelatedArgs:{embed:l,listboxRef:r},selectionRelatedArgs:{app:a,qStateName:d},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:HK},shouldShowMenuIcon:!1,model:c,direction:s,isPagination:n})},fY=$g();fY.onMount=e=>{const t=new Map,n=new ResizeObserver(e=>{for(const n of e){const e=t.get(n.target);e&&e.current(n)}});return e({callbacks:t,observer:n}),()=>{t.clear(),n.disconnect()}};const hY=({ref:e,callback:t})=>{const n=Qg(fY),r=D(t);r.current=t,j(()=>{const t=e.current;return void 0===n?()=>{}:(t&&(n.callbacks.set(t,r),n.observer.observe(t)),()=>{t&&(n.callbacks.delete(t),n.observer.unobserve(t))})},[e,r,n])},mY=Du(Sd)({display:"flex",alignItems:"flex-end",justifyContent:"center",width:"100%",boxSizing:"border-box"}),gY=({children:e})=>{const t=w.useRef(null),[n,r]=k(()=>new Set(e.filter(({props:e})=>void 0!==e.prio&&e.children).map(({key:e})=>e))),o=M(()=>Array.from(e).sort((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)),[e]),i=L(e=>{const t=new Set,n=e.contentBoxSize.at(0)?.inlineSize??0;let i=0;o.forEach(e=>{if(e.props.ignore||!e.props.children)return;const r=e.props.minWidth+1;void 0===e.props.prio||i+r<=n?i+=r:t.add(e.key)}),r(e=>e.size===t.size&&[...e].every(e=>t.has(e))?e:t)},[o]);return hY({ref:t,callback:i}),Yt.jsx(mY,{ref:t,"data-testid":"responsive-container",children:e.filter(e=>!n.has(e.key))})},bY=({children:e})=>e,vY=(e,t)=>!e.isLocked&&e.isDim&&t,yY=({column:e,open:t,setOpen:n})=>{const r=Qg(kU),o=Qg(Eb),i=Qg(Fb),a=Qg(ob);Qg(nb);const s=w.useRef(null),l=L(()=>{n(!1)},[n]),u=vG({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:a,listboxRef:s},selectionRelatedArgs:{qStateName:o},direction:i,onPopoverClose:l});return Yt.jsx(hV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??r.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??r.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),u(),n(!0)},children:Yt.jsx(DG,{ref:s,height:16,"data-testid":"head-cell-search-icon"})})},xY=({column:e})=>{const{sortDirection:t,isActivelySorted:n}=e,r="A"===t?Yt.jsx(UH,{height:JH,"data-testid":"head-cell-sort-ascending-icon"}):Yt.jsx(HH,{height:JH,"data-testid":"head-cell-sort-descending-icon"});return n?Yt.jsx(JK,{children:r}):void 0},SY=0,wY=1,CY=2,EY=3,RY=e=>{const{column:t,open:n,setOpen:r,isPagination:o,forwardRef:i,columnWidth:a,isInteractionEnabled:s}=e,l=Qg(kU),u=Qg(Fb),{measureText:c}=Lm(l.header),[d,p]=k(!1),f=D(null),h=D(null),m=D(null),g="number"==typeof a&&a>Zm.PixelsMin+18;return Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs(gY,{children:[Yt.jsx(bY,{prio:CY,minWidth:lV,children:uY(t)?Yt.jsx(cY,{column:t}):null},"Lock"),Yt.jsx(bY,{prio:wY,minWidth:lV,children:sY(t,s)?Yt.jsx(lY,{column:t}):null},"Cyclic"),Yt.jsx(bY,{ignore:!0,children:Yt.jsx(xY,{column:t})},"Sort"),Yt.jsx(bY,{minWidth:c(t.label)+8,children:Yt.jsx(fV,{justifyContent:t.headTextAlign,children:Yt.jsx(oY,{forwardRef:i,isPagination:o,isHeadCell:!0,children:t.label})})},"Text"),Yt.jsx(bY,{prio:g?void 0:SY,minWidth:lV,children:d||vY(t,s)?Yt.jsx(yY,{open:d,setOpen:p,column:t}):null},"Search"),Yt.jsx(bY,{prio:EY,minWidth:lV,children:s?Yt.jsx(dY,{menuIconRef:m,column:t,open:n,setOpen:r}):null},"Menu")]}),s?Yt.jsxs(Yt.Fragment,{children:[Yt.jsx(uV,{ref:h,direction:u,isPagination:o}),Yt.jsx(uV,{ref:f,direction:u}),Yt.jsx(pY,{anchorRef:m.current?m:f,column:t,isPagination:o,listboxRef:h,open:n,setOpen:r})]}):null]})},AY=Du("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({background:e,applicableStyle:t,color:n})=>({...t,background:e,color:n})),IY=()=>{},MY=({column:e,isPagination:t})=>{const n=Qg(kU),r=Qg(Fb),o=Qg(kK),i=Qg(fU),a=!1,s=Qg(Ib)?iY:RY;return Yt.jsx(AY,{className:"sn-table-cell",applicableStyle:{...n.header,...PK(n,i,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:aV(r,a,o),borderLeftWidth:sV(r,a,o),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:e.headTextAlign,boxSizing:"border-box",flexDirection:"right"===e.headTextAlign?"row-reverse":"row",userSelect:"none",width:"100%"},background:e.headerColor?.background??n.header.background,color:e.headerColor?.color??n.header.color,children:Yt.jsx(s,{column:e,isInteractionEnabled:!1,isPagination:t,open:!1,setOpen:IY})})},kY=({isPagination:e})=>{const t=Qg(hU),[n,r]=k();R_({onDragStart:e=>{const t=e.operation.source?.id;r(t)},onDragEnd:()=>{}});const o=n?t.find(e=>e.id===n):void 0;return o?Yt.jsx(n_,{children:Yt.jsx("div",{style:{background:"white",height:"100%",display:"flex",position:"relative"},children:Yt.jsx(MY,{column:o,isPagination:e})})}):null},DY=$g(async e=>{e(yb);const t=e(Kb),n=await(t?.getEffectiveProperties());return n&&structuredClone(n)}),PY=ZR(DY,e=>e),TY=$g(e=>e(PY)?.qHyperCubeDef),qY=[lj.configure({activationConstraints:[new oj.Distance({value:5})],preventActivation:e=>{const t=e.target;return t instanceof HTMLElement&&t.classList.contains("nebula-table-utils-column-adjuster")}})],OY=kj.plugins.filter(e=>e!==DL),LY=(e,t,n)=>{const r=JSON.stringify(t),o=JSON.stringify(n);if(r!==o)return{qPath:e,qOp:"Replace",qValue:o}},NY=(e,t,n,r,o)=>{if(!e||!t||r===o)return;const i=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:n,visibleColumnIds:r,sourceId:o,targetId:i})=>{const a=p$({qDimensions:e,qMeasures:t}),s=[...e,...t],l=r.findIndex(e=>e===o),u=r.findIndex(e=>e===i);if(l<0||u<0||l===u)return;const c=((e,t,n)=>{const r=[...e],[o]=r.splice(t,1);return r.splice(n,0,o),r})(r,l,u),d=new Map(c.map((e,t)=>[e,t])),p=a.toSorted((e,t)=>{const n=d.get(e.id),r=d.get(t.id);return void 0===n||void 0===r?0:n-r}),f=p.filter(e=>e.isDimension).map(e=>e.def),h=p.filter(e=>!e.isDimension).map(e=>e.def),m=[...f,...h],g=new Map(m.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:f,qMeasures:h,qInterColumnSortOrder:f$({previousColumns:s,nextColumns:m,qInterColumnSortOrder:n}),qColumnOrder:c.map(e=>g.get(e)).filter(e=>void 0!==e)}})({qDimensions:t.qDimensions,qMeasures:t.qMeasures,qInterColumnSortOrder:t.qInterColumnSortOrder,visibleColumnIds:n.map(e=>e.id),sourceId:r,targetId:o});if(!i)return;const a=[LY("/qHyperCubeDef/qDimensions",t.qDimensions,i.qDimensions),LY("/qHyperCubeDef/qMeasures",t.qMeasures,i.qMeasures),LY("/qHyperCubeDef/qInterColumnSortOrder",t.qInterColumnSortOrder,i.qInterColumnSortOrder),LY("/qHyperCubeDef/qColumnOrder",t.qColumnOrder,i.qColumnOrder)].filter(e=>void 0!==e);0!==a.length&&e.applyPatches(a,!0)},jY=({children:e})=>{const t=Qg(Kb),n=Qg(TY),r=Qg(hU);return Yt.jsx(Qj,{onDragOver:e=>{const o=e.operation.source?.id,i=e.operation.target?.id;void 0!==i&&o!==i&&NY(t,n,r,o,i)},sensors:qY,plugins:OY,children:e})};function _Y(e,t){const n=D(!1);q(()=>{n.current?e():n.current=!0},t)}const zY=(e,t)=>{const n=Qg(Ub);q(()=>{const r=e.current;if(!r)return;const o=e=>{UK(e,t,n)};return r.addEventListener("focusout",o),()=>{r.removeEventListener("focusout",o)}},[e,t,n])},FY=$g(yH),$Y=yM(e=>$g(t=>{const[n,r]=t(FY);return 0===n&&r===e})),BY=()=>{const e=Qg(rb);q(()=>{e.notifyIsDoneRendering()})};var HY={SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"de-DE":"Aufsteigend","en-US":"Ascending","es-ES":"Ascendente","fr-FR":"Croissant","it-IT":"Crescente","ja-JP":"昇順","ko-KR":"오름차순","nl-NL":"Oplopend","pl-PL":"Rosnąco","pt-BR":"Crescente","ru-RU":"По возрастанию","sv-SE":"Stigande","tr-TR":"Artan","zh-CN":"升序","zh-TW":"遞增"}},SNTable_Accessibility_ColumnOptions:{id:"SNTable.Accessibility.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбцов","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"de-DE":"Absteigend","en-US":"Descending","es-ES":"Descendente","fr-FR":"Décroissant","it-IT":"Decrescente","ja-JP":"降順","ko-KR":"내림차순","nl-NL":"Aflopend","pl-PL":"Malejąco","pt-BR":"Decrescente","ru-RU":"По убыванию","sv-SE":"Fallande","tr-TR":"Azalan","zh-CN":"降序","zh-TW":"遞減"}},SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um zwischen den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerelementen zu wechseln. Drücken Sie die Leertaste in den Kopfzellen, um das Spaltenmenü zu öffnen, und drücken Sie die Leertaste in den Körperzellen, um eine Auswahl zu treffen. Duch die Auswahl wird der Seiteninhalt aktualisiert. Die vollständige Liste der Navigationssteuerungen finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate between table cells and tab to move to pagination controls. Press space on header cells to open the column menu, press space on body cells to make selections. Selections will cause content on the page to be updated. The full list of navigation controls can be found in the documentation.","es-ES":"Utilice las teclas de flecha para desplazarse entre las celdas de la tabla y la pestaña a fin de pasar a los controles de paginación. Pulse la barra espaciadora en las celdas del encabezado para abrir el menú de columnas; pulse la barra espaciadora en las celdas del cuerpo para realizar selecciones. Las selecciones harán que se actualice el contenido de la página. Encontrará la lista completa de controles de navegación en la documentación.","fr-FR":"Utilisez les touches fléchées pour naviguer parmi les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Appuyez sur la touche Espace dans les cellules d'en-tête pour ouvrir le menu de la colonne. Appuyez sur Espace dans les cellules de corps pour effectuer une sélection. Les sélections actualiseront le contenu de la page. Vous pouvez consulter la liste complète des commandes de navigation dans la documentation.","it-IT":"Utilizzare i tasti freccia per navigare tra le celle della tabella e il tasto TAB per passare ai controlli di paginazione. Premere lo spazio nelle celle dell'intestazione per aprire il menu della colonna; premere lo spazio nelle celle del corpo per effettuare selezioni. Le selezioni determineranno l'aggiornamento del contenuto della pagina. È possibile trovare l'elenco completo dei controlli di navigazione nella documentazione.","ja-JP":"矢印キーで表のセル間を移動し、タブ キーでページネーション コントロールに移動します。ヘッダー セルでスペースを押すと列メニューが開き、ボディ セルでスペースを押すと選択ができます。選択によって、ページのコンテンツが更新されます。ナビゲーション コントロールの全リストは、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 표 셀 사이를 탐색하고, 탭을 사용하여 페이지 번호 컨트롤로 이동하십시오. 헤더 셀에서 스페이스바를 눌러 열 메뉴를 열고, 본문 셀에서 스페이스바를 눌러 선택하십시오. 선택하면 페이지의 콘텐츠가 업데이트됩니다. 전체 탐색 컨트롤 목록은 설명서에서 확인할 수 있습니다.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren tussen tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Druk op de spatietoets in koptekstcellen om het kolommenu te openen, druk op de spatietoets in hoofdtekstcellen om selecties te maken. Door selecties te maken, wordt de inhoud op de pagina bijgewerkt. De volledige lijst met besturingselementen voor navigatie vindt u in de documentatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się między komórkami tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Naciśnij klawisz spacji na komórkach nagłówka, aby otworzyć menu kolumny i naciśnij go na komórkach treści, aby dokonać wyborów. Wybory będą powodować aktualizację zawartości na stronie. Pełną listę nawigacyjnych elementów sterujących można znaleźć w dokumentacji.","pt-BR":"Use as teclas de seta para navegar entre as células da tabela e a tecla Tab para mover para os controles de paginação. Pressione espaço nas células do cabeçalho para abrir o menu da coluna, pressione espaço nas células do corpo para fazer seleções. As seleções farão com que o conteúdo da página seja atualizado. A lista completa de controles de navegação pode ser encontrada na documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения между ячейками таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Нажмите пробел на ячейках заголовка, чтобы открыть меню столбца; нажмите пробел на ячейках тела, чтобы сделать выборки. Выборки приведут к обновлению содержимого страницы. Полный перечень элементов управления навигацией см. в документации.","sv-SE":"Använd piltangenterna för att navigera mellan tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Tryck på mellanslag på rubrikceller för att öppna kolumnmenyn och tryck på mellanslag på innehållsceller för att göra urval. Med urval kommer innehåll på sidan att uppdateras. Den fullständiga listan med navigeringsreglage.","tr-TR":"Tablo hücreleri arasında gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Sütun menüsünü açmak için başlık hücrelerinde boşluğa basın, seçim yapmak için gövde hücrelerinde boşluğa basın. Seçimler, sayfadaki içeriğin güncellenmesine neden olur. Navigasyon kontrollerinin tam listesi belgede bulunabilir.","zh-CN":"使用箭头键在表格单元格之间导航,使用 tab 键移动到分页控件。按标题单元格上的空间打开列菜单,按正文单元格上的空间进行选择。选择将导致页面上的内容更新。导航控件的完整列表可以在文档中找到。","zh-TW":"使用方向鍵以在表格儲存格之間導覽,並使用 Tab 以前往分頁控制。按下標頭儲存格的空白處可開啟欄功能表,按下正文儲存格的空白處可進行選取。選項將會造成更新頁面上的內容。導覽控制的完整清單可見於文件中。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Selecties wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대안 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{1}의 {0}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},SNTable_Pagination_FirstPage:{id:"SNTable.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}}};const VY=$g(e=>{const t=e(rv),n=e(Qb),r=e(bb);let o;return function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(HY).forEach(t=>{e.add(HY[t])})}(t),({keys:e,politeness:i="polite"})=>{const a=e.map(e=>{if(Array.isArray(e)){const[n,...r]=e;return t.get(n,r)}return t.get(e)}).join(" "),s=n.querySelector(`.${vH.First}`),l=n.querySelector(`.${vH.Second}`);if(!s||!l)return void r.error({msg:"could not find aria-live elements, which means accessibility is not working properly"});let u;o===vH.First?(u=l,o=vH.Second):(u=s,o=vH.First),u.innerHTML=u.innerHTML.endsWith(" ")?a:`${a} `,u.setAttribute("aria-live",i)}}),WY=(e,t)=>{const n=Qg(VY),r=Qg(Qb),o=Qg(vU),i=Qg(bU),a=Qg(gU),s=Qg(fU),[l,u]=tb(FY),c=Qg(kb),d=Qg(Ub);_Y(()=>{const t=((e,t,n=!1)=>{const r=[NK(t),e[1]];return n?r:yH})(l,s,c);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:o,keyboard:i,announce:a})=>{if($K(t),o(e),!(e=>!e.enabled||e.active)(i))return;const s=_K(t,e);n.current?(BK(s),n.current=!1):zK(s),r&&(a({keys:[s?.textContent??""]}),gK(a,s,r))})({resetCellCoord:t,rootElement:r,shouldRefocus:e,setFocusedCellCoord:u,isSelectionMode:c,keyboard:d,announce:n})},[a.length,i,o,t])},UY=e=>{Em(e),bK(e)&&ig(e.currentTarget)},GY=e=>{SK(e.evt)&&(Em(e.evt),VK(e))},KY=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:o}=e;if(!SK(t))return;Em(t);const i=((e,t)=>[e.pageRowIdx+NK(t),e.pageColIdx])(r,n),a=jK(o,n),{nextCell:s,nextCellCoord:l}=VK({...e,cellCoord:i,allowedRows:a});l[0]!==i[0]&&(({evt:e,isSelectionsEnabled:t,cell:n,selectionDispatch:r,announce:o,isSelectionMode:i,nextCell:a})=>{e.shiftKey&&t&&n.isSelectable?r({type:gH.SelectMultiAdd,payload:{cell:n,evt:e,announce:o}}):gK(o,a,i)})({...e,nextCell:s})},YY=e=>{const{evt:t}=e;vK(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:o,handleChangePage:i})=>{Em(e);const a=Math.ceil(t/n)-1;e.key===Xm.Right&&r<a?(o(),i(r+1)):e.key===Xm.Left&&r>0&&(o(),i(r-1))})(e):t.key===Xm.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{t.enabled&&!n&&(Em(e),t.blur?.(!0))})(e):yK(t.key)&&Em(t)},XY=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains(mH.Disabled))return void Em(t);const r={...e,isSelectionMode:!!n?.isModal()};switch(t.key){case Xm.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:o})=>{Em(e),t.isSelectable&&n&&r({type:gH.Select,payload:{cell:t,evt:e,announce:o}})})(r);break;case Xm.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{Em(n),e&&(t?.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case Xm.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(Em(n),t?.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case Xm.C:UY(t);break;case Xm.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const o=e.shiftKey||!r;t.enabled&&n&&o&&(Em(e),Cm(e.currentTarget,t,e.shiftKey))})(r);break;default:KY(r)}},JY=e=>{const t=Qg(mV),n=eb(gV),r=eb(bV),o=Qg(hH),i=D();hY({ref:e,callback:a=>{const s=()=>{if(e.current){const e=a.borderBoxSize.at(0)?.inlineSize??0,t=a.borderBoxSize.at(0)?.blockSize??0,o=a.contentBoxSize.at(0)?.inlineSize??0,i=t-(a.contentBoxSize.at(0)?.blockSize??0);r(e-o),n(i)}};t?(i.current&&o.off("done-adjusting-column-width",i.current),o.once("done-adjusting-column-width",s),i.current=s):s()}}),q(()=>{const e=o;return()=>{i.current&&e.off("done-adjusting-column-width",i.current)}},[o])},ZY=Du("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),QY=Du(Vh,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})(({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"})),eX=Du(Mh,{shouldForwardProp:e=>"borderRight"!==e})(({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e})),tX=()=>Yt.jsxs(Yt.Fragment,{children:[Yt.jsx(ZY,{className:vH.First,"data-testid":vH.First,"aria-live":"polite","aria-atomic":"true"}),Yt.jsx(ZY,{className:vH.Second,"data-testid":vH.Second,"aria-live":"polite","aria-atomic":"true"})]}),nX=e=>{const t=D(new Map),n=D(null);q(()=>{n.current=e(t.current),t.current.forEach((e,t)=>{n.current?.observe(t)});const r=t.current,o=n.current;return()=>{o.disconnect(),r.clear()}},[e,n,t]);const r=L((e,r)=>{t.current.set(e,r),n.current?.observe(e)},[t,n]),o=L(e=>{t.current.delete(e),n.current?.unobserve(e)},[n,t]);return M(()=>({addTask:r,removeTask:o}),[r,o])},rX=e=>new ResizeObserver(t=>{t.forEach(t=>{const n=e.get(t.target);n?.(t)})}),oX=()=>nX(rX),iX=({updateShouldRefocus:e,tableWrapperRef:t})=>{const n=Qg(Db),r=Qg(Ub),o=eb(IK);q(()=>{const i=()=>{o({type:gH.Reset})},a=()=>{o({type:gH.Clear})},s=()=>{t.current?.contains(document.activeElement)?e():r.enabled&&r.blur?.(!0),i()};return n?.on("deactivated",i),n?.on("canceled",i),n?.on("confirmed",s),n?.on("cleared",a),()=>{n?.removeListener("deactivated",i),n?.removeListener("canceled",i),n?.removeListener("confirmed",s),n?.removeListener("cleared",a)}},[n,r,o,e,t])},aX="min(50px, 20%)",sX=({bar:e,height:t})=>{const{value:n,offsetValue:r,columnMin:o,columnMax:i,isManualRange:a,thicknessPx:s,barEnd:l}=e,u=a?o:Math.min(o,0);let c=a?i:Math.max(i,0);c>u||(c=u+1);const d=r,p=r+n,f=n>=0,h=Math.min(d,p),m=Math.max(d,p),g=Math.round(((e,t,n)=>Math.max(t,Math.min(n,e)))(s??("none"===l?1*t:4),2,Math.max(2,t-2))),b=Math.min(((e,t)=>"circle"===e?2*t:"box"===e?t+4:0)(l,g),t),v=Math.min(d,p)<u,y=Math.max(d,p)>c,x="none"===l?25:10+("none"===l?0:b/2+2);return{rangeMin:u,rangeMax:c,hasRoomAtMin:e.hasNegativeValues??(a||u<0||!f),hasRoomAtMax:e.hasPositiveValues??(a||i>=0||f),low:h,high:m,valueEnd:f?m:h,growsTowardsHigh:f,overflowMin:v,overflowMax:y,hasBar:m>h&&m>u&&h<c,thicknessPx:g,capSize:b,hasZeroAxis:u<=0&&c>=0,oobSizePx:x}},lX=Du("div")({position:"relative",width:"100%",overflow:"hidden"}),uX=Du("div")({position:"absolute"}),cX=Du("span")({position:"absolute",top:0,height:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),dX=Du("svg")({position:"absolute",display:"block"}),pX=({shape:e,pointsRight:t,width:n,height:r})=>{if("slice"===e)return`M0 0L${n-8} ${r}L0 ${r}ZM8 0L${n} ${r}L${n} 0Z`;const o=n/2,i=o*Math.sin(Math.PI/3),a=t?o/2:1.5*o;return`M${a} ${o-i}L${t?n:0} ${o}L${a} ${o+i}Z`},fX=({height:e,theme:t,bar:n,direction:r,fontFamily:o,fontSize:i})=>{const a=(({bar:e,height:t,isRtl:n})=>{const r=sX({bar:e,height:t}),{rangeMin:o,rangeMax:i,low:a,high:s,overflowMin:l,overflowMax:u,thicknessPx:c,capSize:d,oobSizePx:p}=r,f=r.hasRoomAtMin?aX:"0px",h=r.hasRoomAtMax?aX:"0px",m=f,g=`calc(100% - ${h})`,b=e=>{const t=(Math.min(Math.max(e,o),i)-o)/(i-o);return`calc(${f} + ${t} * (100% - ${f} - ${h}))`},v="none"===e.barEnd,y=v?25:10,x=u?`max(${g} - ${p}px, ${l?m:b(a)})`:b(s),S=l?`min(${m} + ${p}px, ${u?g:b(s)})`:b(a),w=r.growsTowardsHigh?x:S,C=e=>Math.floor((t-e)/2),E=C(c),R=d>0?d/2+4:4,A=e=>{const t=v?c:10;return{key:e,shape:v?"slice":"triangle",pointsRight:"max"===e!==n,width:y,height:t,style:{..."min"===e?{insetInlineStart:f}:{insetInlineEnd:h},top:C(t),width:y,height:t}}};return{zeroAxis:r.hasZeroAxis?{insetInlineStart:`calc(${b(0)} - 0.5px)`,top:0,width:1,height:"100%"}:void 0,bar:r.hasBar?{insetInlineStart:S,width:`max(1px, ${x} - ${S})`,top:E,height:c}:void 0,cap:r.hasBar&&d>0?{insetInlineStart:`calc(${w} - ${d/2}px)`,top:C(d),width:d,height:d,borderRadius:"circle"===e.barEnd?"50%":void 0}:void 0,label:e.label?r.growsTowardsHigh?{insetInlineStart:u?`calc(${g} + 4px)`:l?`max(${x} + ${R}px, ${m} + ${y+4}px)`:`calc(${x} + ${R}px)`,insetInlineEnd:"4px",textAlign:"start"}:{insetInlineStart:"4px",insetInlineEnd:`calc(100% - ${l?`calc(${m} - 4px)`:u?`min(${S} - ${R}px, ${g} - ${y+4}px)`:`calc(${S} - ${R}px)`})`,textAlign:"end"}:void 0,markers:[l?A("min"):void 0,u?A("max"):void 0].filter(e=>void 0!==e)}})({bar:n,height:e,isRtl:"rtl"===r}),s=n.color??Sm(t,n.colorPalette,t.getDataColorSpecials().primary),l=n.labelColor??Sm(t,n.labelColorPalette,"inherit");return Yt.jsxs(lX,{"data-testid":"bar-container",role:"img","aria-label":n.label||n.fallbackLabel,dir:r,style:{height:e},children:[a.zeroAxis?Yt.jsx(uX,{"data-testid":"bar-zero-axis",style:{...a.zeroAxis,backgroundColor:"#d0d0d0"}}):null,a.bar?Yt.jsx(uX,{"data-testid":"bar",style:{...a.bar,backgroundColor:s}}):null,a.cap?Yt.jsx(uX,{"data-testid":"bar-end-cap",style:{...a.cap,backgroundColor:s}}):null,a.label?Yt.jsx(cX,{"data-testid":"bar-label",style:{...a.label,fontFamily:o,fontSize:i??"14px",lineHeight:`${e}px`,color:l},children:n.label}):null,a.markers.map(e=>Yt.jsx(dX,{"data-testid":`bar-oob-${e.key}`,width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,style:e.style,children:Yt.jsx("path",{d:pX(e),fill:s})},e.key))]})},hX=e=>{e.stopPropagation()},mX=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:hX,color:bm.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),gX=({href:e,text:t,interactions:n,color:r})=>Yt.jsx($p,{...mX({href:e,text:t,interactions:n,color:r}),children:t}),bX=window.requestIdleCallback??(e=>setTimeout(()=>{e({})},0)),vX=window.cancelIdleCallback??(e=>{clearTimeout(e)});let yX=0,xX=0,SX=0;const wX="qDimensionInfo/0",CX="qMeasureInfo/0",EX="x",RX="y",AX=e=>({key:"bars",type:"box",data:{extract:{field:wX,props:{start:0,end:{field:CX}}}},settings:{major:{scale:EX},minor:{scale:RX},box:{maxWidthPx:8,fill:{fn:e}}}}),IX=e=>({key:"p",type:"point",data:{extract:{field:wX,props:{y:{field:CX}}}},settings:{x:{scale:EX},y:{scale:RX},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),MX=({qNum:e})=>void 0===e?0:Math.sign(e),kX=(e,t)=>{const{primary:n,nil:r,others:o}=e.getDataColorSpecials(),i=Sm(e,t?.negative,n),a=Sm(e,t?.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:wX,props:{start:0,end:{field:CX,value:MX}}}},settings:{major:{scale:EX},minor:{scale:RX},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?r:-3===e.datum.value?o:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?i:a}}}}},DX=(e,{type:t,showDots:n,colors:r,colorMin:o,colorMax:i})=>{const a=((e,t,n,r)=>{const{primary:o,nil:i,others:a}=e.getDataColorSpecials(),s=Sm(e,t?.main,o),l=Sm(e,t?.max,s),u=Sm(e,t?.min,s),c=Sm(e,t?.first,s),d=Sm(e,t?.last,s);return e=>{const t=RX in e.datum?RX:"end";return-2===e.datum.value?i:-3===e.datum.value?a:e.datum[t].value>=r?l:e.datum[t].value<=n?u:e.data.items.at(0)===e.datum?c:e.data.items.at(-1)===e.datum?d:s}})(e,r,o,i);switch(t){case"bars":return[AX(a)];case"dots":return[IX(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:wX,props:{v:{field:CX}}}},settings:{coordinates:{major:{scale:EX},minor:{scale:RX,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(Sm(e,r?.main,e.getDataColorSpecials().primary));return n?[t,IX(a)]:[t]}case"posNeg":return[kX(e,r)];default:return[]}},PX=e=>({qDimensionInfo:[{qFallbackTitle:"",qCardinal:1}],qMeasureInfo:[{qFallbackTitle:""}],qDataPages:[{qArea:{qTop:0,qLeft:0,qHeight:e.length,qWidth:2},qMatrix:e}],qEffectiveInterColumnSortOrder:[0,1],qSize:{qcx:2,qcy:e.length},qMode:"S"}),TX=(e,t,n,r)=>({y:{data:{field:CX},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:wX}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),qX=K();qX.use(G),qX.renderer.prio(["canvas"]);const OX={resolve:()=>{},promise:{}},LX=({chart:e,element:t,theme:n,isSnapshot:r,direction:o,miniChartData:i,downloadService:a})=>{const{resolveChartPromise:s,addChartPromiseToQueue:l}=(e=>{const t=D(e.isDownloadedAsPDForImage?It():OX);return{addChartPromiseToQueue:L(()=>{e.waitForPromise(t.current.promise)},[e]),resolveChartPromise:t.current.resolve}})(a),u=D(null),c=L(()=>{null!==t.current&&null===e.current&&(l(),u.current=(e=>{const t=performance.now();if(t-yX>50&&(yX=t,xX=0),xX+=1,0===SX&&xX<=20)return e(),()=>{};SX+=1;let n=!1;const r=()=>{n||(n=!0,SX-=1)},o=bX(()=>{r(),e()},{timeout:2e3});return()=>{vX(o),r()}})(()=>{u.current=null,t.current&&(e.current=(({element:e,theme:t,isSnapshot:n,miniChartData:r,onChartRendered:o,direction:i})=>{const{type:a,qMatrix:s,minY:l,maxY:u}=r;return qX.chart({element:e,data:{type:"q",key:"qHyperCube",data:PX(s)},settings:{scales:TX(a,l,u,i),components:DX(t,r),strategy:n?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{o()}})})({element:t.current,theme:n,isSnapshot:r,miniChartData:i,direction:o,onChartRendered:s}))}))},[t,e,l,n,r,i,o,s]);return{renderChartWithRequestIdleCallback:c,safeCancelIdleCallback:L(()=>{u.current?.(),u.current=null,s()},[s])}},NX=e=>{const t=D(null),n=D(!1);return L(r=>{const o=r.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(vX(e.current),e.current=null)})(t),n.current?0!==o?null!==e.current&&(t.current=bX(()=>{e.current?.update()},{timeout:2e3})):n.current=!1:n.current=!0},[e])},jX=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:o,downloadService:i,direction:a})=>{const s=D(null),l=D(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:c}=LX({element:s,chart:l,theme:n,isSnapshot:r,direction:a,miniChartData:o,downloadService:i});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:n,renderChartWithRequestIdleCallback:r,chart:o})=>{const i=L(e=>{e.isIntersecting?r():n()},[r,n]);q(()=>{if(!e.current||!t)return()=>{};const r=e.current;return t.addTask(r,i),()=>{t.removeTask(r),n(),o.current?.destroy(),o.current=null}},[o,e,t,n,i])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:c,renderChartWithRequestIdleCallback:u,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:n,intersectionObserverTaskScheduler:r})=>{q(()=>r?()=>{}:(e(),()=>{t(),n.current?.destroy(),n.current=null}),[r,t,e,n])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:c,renderChartWithRequestIdleCallback:u,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:n})=>{const r=NX(t);q(()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}},[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},_X=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:o,miniChartData:i,downloadService:a,direction:s})=>{const l=jX({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:o,miniChartData:i,downloadService:a,direction:s});return Yt.jsx("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},zX=e=>{let t="center",n="center";return"flex-start"===e?.vertical?t="top":"flex-end"===e?.vertical&&(t="bottom"),"flex-start"===e?.horizontal?n="left":"flex-end"===e?.horizontal&&(n="right"),`${n} ${t}`},FX=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},$X=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const o=Qg(Fb),{url:i,text:a,imageSize:s,resolvedImagePosition:l}=e,u="fitHeight"===s,c=Yt.jsx("img",{src:i,alt:a,style:{...t,width:u?"auto":"100%",height:"100%",maxHeight:n,objectFit:FX(s),objectPosition:zX(l),overflow:"hidden"}});return r?Yt.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:u?n:"100%",overflow:"hidden",display:"flex",justifyContent:u?tV(o,e):void 0},children:c}):c},BX=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&GH[t];return o&&Yt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Yt.jsx(o,{style:{height:e}})})},HX=({representation:e,cellValue:t,paginationCellAlign:n})=>{const r=Qg(kU),o=Qg(Fb),i=Qg(nv),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=KH(e,t,o,i),d=(e=>parseInt(e||JH,10))(r.measure.values.fontSize),{color:p,iconKey:f,position:h}=c||{};return l?Yt.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:n??"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:u?p:void 0},children:["left"===h&&BX({size:d,iconKey:f,color:p}),Yt.jsx(oY,{isNumeric:!0,children:a}),"right"===h&&BX({size:d,iconKey:f,color:p})]}):BX({size:d,iconKey:f,color:p})},VX=(e,t,n)=>e.contentStaticLineCount?t*(n??e.grid.contentLineClamp):t,WX=({forwardRef:e,cell:t,style:n,virtualizedCell:r,lineClamp:o,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const l=Qg(kU),u=Qg(TU),c=Qg(rb),d=Qg(yb),p=Qg(nv),f=Qg(Fb),h=Qg(Tb),m=Qg(kb);if(t.representation.type===S$.Image&&!t.representation.url?.trim())return null;if(t.representation.type===S$.Image)return Yt.jsx($X,{representation:t.representation,textStyle:n,maxImageHeight:VX(l,u,o),wrapInContainer:!r});const g=CH(t.qIsNull?t.representation.text:t.qNum);let b=t.representation;if(t.qIsNull&&t.isNumeric&&!Number.isNaN(g)){const e=t.formattedNullValueText??BW(g,t.qNumFormat,t.qIsAutoFormat);b={...t.representation,text:e}}let v=b.text;return t.representation.type!==S$.Link||m||t.isNull||(v=Yt.jsx(gX,{href:t.representation.url,text:t.representation.text,interactions:h,color:n.cellForegroundColor})),t.representation.type!==S$.Indicator||Number.isNaN(g)?t.representation.type===S$.MiniChart&&t.representation.miniChart&&!t.isNull?Yt.jsx(_X,{height:VX(l,u,o),intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:p,isSnapshot:!!d.snapshotData,direction:f,downloadService:c}):t.representation.type===S$.Bar&&t.representation.bar&&!t.isNull?Yt.jsx(fX,{height:VX(l,u,o),bar:t.representation.bar,theme:p,direction:f,fontFamily:l.measure.values.fontFamily,fontSize:n.fontSize??l.measure.values.fontSize}):Yt.jsx(oY,{forwardRef:e,isDual:t.isDual,isNumeric:t.isNumeric,lineClamp:o,isPagination:!r,children:v}):Yt.jsx(HX,{representation:b,cellValue:g,paginationCellAlign:r?void 0:s})},UX=()=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"0.75em",height:"0.75em",children:Yt.jsx("path",{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"})}),GX=Du("div")({"& path":{stroke:"none !important"}}),KX=({children:e,cellSelectionState:t,hideTickIcon:n})=>t!==mH.Selected||n?e:Yt.jsxs(nY,{children:[e,Yt.jsx(GX,{children:Yt.jsx(UX,{})})]}),YX=e=>{const t=function(){const e=e_(),t=Nj(()=>null==e?void 0:e.dragOperation.source,[e]),n=Nj(()=>null==e?void 0:e.dragOperation.target,[e]);return{get source(){return t.value},get target(){return n.value}}}();return t.source&&t.source.id!==e?.5:1},XX=(e,t,n,r)=>({handleMouseDown:r=>{e?.(r);const o=r.target;if(t.isSelectable&&"A"!==o.tagName){const e=()=>{n({type:gH.SelectMultiEnd})};n({type:gH.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:gH.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:gH.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),JX=e=>{const t=Qg(yU),n=Qg(fU),r=Qg(VY),o=Qg(Qb),i=Qg(Fb),a=eb(FY),s=eb(IK),l=Qg(Ub),u=Qg(Lb),c=Qg(Db),d=d=>{XY({evt:d,rootElement:o,selectionsAPI:c,cell:e,selectionDispatch:s,isSelectionsEnabled:u,setFocusedCellCoord:a,announce:r,keyboard:l,paginationNeeded:t,totalsPosition:n,direction:i})},p=e=>{((e,t)=>{e.key===Xm.Shift&&t({type:gH.SelectMultiEnd})})(e,s)},f=()=>{((e,t,n,r,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,s=o.atTop?i+2:i+1;WK([s,a],t,n,r)})(e,o,a,l,n)};if(!u)return{onKeyDown:d,onKeyUp:p,onMouseDown:f};const{handleMouseDown:h,handleMouseOver:m,handleMouseUp:g}=XX(f,e,s,r);return{onKeyDown:d,onKeyUp:p,onMouseDown:h,onMouseUp:g,onMouseOver:m}},ZX=e=>{q(()=>()=>{MK.remove(e)},[e])},QX=(e,t,n,r)=>{if(!n.isNull)return e;const o=r?t.dimensionNull:t.measureNull,i={...e,...o};if(!t.grid.zebraStripes.show)return i;const a=r?t.grid.zebraStripes.overrideDimNullValueColor:t.grid.zebraStripes.overrideMeasNullValueColor,s=r?t.grid.zebraStripes.overrideDimNullValueBackground:t.grid.zebraStripes.overrideMeasNullValueBackground;return a&&(i.color=e.color),s&&(i.background=e.background),i},eJ=(e,t,n)=>{const{color:r,background:o}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...o?{background:o}:void 0}},tJ=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return eJ(t,e,r?"even":"odd")}return e},nJ=(e,t)=>{const n=Qg(kU),r=Qg(MK(e)),o=Qg(gb),i=e.isTotalRow&&o("TLV-2303-SUB-TOTALS");ZX(e);let a=t.isDim?n.dimension.values:n.measure.values;a=tJ(a,n,e),a=i?n.subTotalRow:a,a=QX(a,n,e,t.isDim);const s=e.isNull||i&&t.isDim?a:MV(a,e.qAttrExps,t.qAttrExprInfoIDs),l=i?s:function(e,t,n){return t===mH.Selected?{...e,...n}:t===mH.Disabled?{...e,background:`${YH}, ${e.background}`}:e}(s,r,n.selectedColors);return{cellStyle:{...l,borderColor:n.grid.border},representationStyle:s,cellSelectionState:r}},rJ=Du(Lh,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})(({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}})),oJ=Du(nm,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e&&"height"!==e})(({hover:e,hoverColors:t,height:n})=>({height:n,"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}})),iJ=Du(Fh,{shouldForwardProp:e=>"cellStyle"!==e})(({cellStyle:e,theme:t})=>({...eV,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",boxSizing:"border-box",width:"100%",height:"100%"})),aJ=Du(Fh,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})(({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...eV,...e,fontWeight:ZH,position:"sticky",padding:r.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t?n:void 0,bottom:t?void 0:0,verticalAlign:t?"bottom":"top",boxSizing:"border-box",zIndex:t?1:void 0})),sJ=({cell:e,column:t,columnIndex:n,intersectionObserverTaskScheduler:r,resizeObserverTaskScheduler:o})=>{const i=Qg(Fb),a=Qg(Tb),{onKeyDown:s,onKeyUp:l,onMouseDown:u,onMouseUp:c,onMouseOver:d}=JX(e),{cellStyle:p,representationStyle:f,cellSelectionState:h}=nJ(e,t),m=YX(t.id);return Yt.jsx(iJ,{cellStyle:{...p,opacity:m},scope:0===n?"row":void 0,component:0===n?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${h} ${Ym}`,title:a.passive?e.representation.text:void 0,onKeyDown:s,onKeyUp:l,onMouseDown:u,onMouseUp:c,onMouseOver:d,children:Yt.jsx(KX,{cellSelectionState:h,hideTickIcon:!!e.isTotalRow,children:Yt.jsx(WX,{cell:e,style:f,intersectionObserverTaskScheduler:r,resizeObserverTaskScheduler:o,paginationCellAlign:iV(i,e.align)})})})},lJ=$g(0),uJ=({column:e,totalsPosition:t,onKeyDown:n,onMouseDown:r})=>{const o=Qg(kU),i=Qg(Ob),a=Qg(lJ),s=YX(e.id);return Yt.jsx(aJ,{totalsStyle:{...o.totalRow,...PK(o,t,!1),opacity:s},headRowHeight:a,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${Ym}`,tabIndex:-1,title:i?e.totalInfo:void 0,onKeyDown:n,onMouseDown:r,children:Yt.jsx(oY,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},cJ=()=>{const e=Qg(fU),t=Qg(hU),n=Qg(gU),r=Qg(Qb),o=Qg(qb),i=Qg(Fb),a=eb(FY),s=Qg(kb),l=Qg(Ub);return Yt.jsx(nm,{className:"sn-table-row sn-table-totals-row",children:t.map((t,u)=>{const c=[e.atTop?1:n.length+1,u];return Yt.jsx(uJ,{column:t,totalsPosition:e,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case Xm.C:UY(n);break;case Xm.Space:n.preventDefault();break;default:GY(e)}else Em(n)})({evt:e,rootElement:r,cellCoord:c,setFocusedCellCoord:a,isSelectionMode:s,isInteractionEnabled:o,direction:i})},onMouseDown:()=>{WK(c,r,a,l)}},t.id)})})};var dJ=z(cJ);const pJ=({updateShouldRefocus:e,tableWrapperRef:t})=>{const n=Qg(gU),r=Qg(fU),o=Qg(hU),i=Qg(kU),a=Qg(qU),s=Qg(OU),l=Qg(yb),u=!!RV(l)?.content?.hoverEffect;iX({updateShouldRefocus:e,tableWrapperRef:t});const c=(e=>{const t=L(t=>new IntersectionObserver(e=>{e.forEach(e=>{const n=t.get(e.target);n?.(e)})},{root:e.current}),[e]);return nX(t)})(t),d=oX();return Yt.jsxs(rJ,{lastRowBottomBorder:i.grid.lastRowBottomBorder,children:[r.atTop?Yt.jsx(dJ,{}):void 0,n.map((e,t)=>{const n=e.at(0)?.isTotalRow??!1;return Yt.jsx(oJ,{hoverColors:i.grid.hoverColors,hover:u,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:n?s:a,children:o.map((t,n)=>{const{id:r}=t,o=e[n];return Yt.jsx(sJ,{columnIndex:n,cell:o,column:t,intersectionObserverTaskScheduler:c,resizeObserverTaskScheduler:d},r)})},`row-${t}`)}),r.atBottom?Yt.jsx(dJ,{}):void 0]})};var fJ=z(pJ);const hJ=(e,t)=>!!e?.skipHeader||!!t.hideHeader,mJ=$g(e=>{const t=e(yb),n=e(Gb);if(n)return(e,{isDim:r,colIdx:o})=>{const i=r?o:o-t.qHyperCube.qDimensionInfo.length,a=`/qHyperCubeDef/${r?"qDimensions":"qMeasures"}/${i}/qDef/columnWidth`,s=t.qHyperCube[r?"qDimensionInfo":"qMeasureInfo"].at(i)?.columnWidth,l=s?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...s,...e})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(e)};n.applyPatches([l],!0)}}),gJ=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:o,label:i}=e,a=Qg(mJ),s=Qg(Fb),l=Qg(qb),u=Qg(rv),[c,d]=tb(zU);if(!l)return null;return Yt.jsx(KU,{columnWidth:c.at(o)??0,isLastColumn:t,keyValue:`adjuster-${o}`,updateWidthCallback:e=>{n?.();const t=[...c];t[o]=e,d(t)},confirmWidthCallback:t=>{a?.(t,e)},handleBlur:e=>{(e=>{FK(e);const t=e.closest(".sn-table-cell");BK(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:u,columnLabel:i},direction:s})},bJ=e=>e.target?.getAttribute("class")?.includes(Jm),vJ=({isInteractionEnabled:e,column:t})=>{const[n,r]=k(!1),o=Qg(TK),i=Qg(mV);return{open:n,setOpen:r,handleOpenMenu:t=>{!e||bJ(t)||i||r(!0)},toggleSortOrder:n=>{e&&!bJ(n)&&!i&&(e=>null!==e.target.closest(".sn-table-cell"))(n)&&(n.stopPropagation(),o?.(t,"A"===t.sortDirection?"D":"A"))}}};var yJ=class extends ZT{constructor(e,t){super(e,t),this.boundingRectangle=ek(null),this.destroy=ck(()=>{if(!this.options)return;const{dragOperation:t}=e,{status:n}=t;if(n.initialized){const{element:e}=this.options,n="function"==typeof e?e(t):e;if(!n)return;let r;const o=()=>{this.boundingRectangle.value=pq(n)},i=()=>{r||(r=setTimeout(()=>{o(),r=void 0},25))},a=new ResizeObserver(o);return a.observe(n),document.addEventListener("scroll",i,{passive:!0,capture:!0}),()=>{document.removeEventListener("scroll",i,{capture:!0}),a.disconnect(),this.boundingRectangle.value=null}}})}apply(e){const{shape:t,transform:n}=e;if(!t)return n;const r=this.boundingRectangle.value;if(!r)return n;const{initial:o,current:i}=t,{height:a,width:s}=i.boundingRectangle,l=o.center.x-s/2,u=o.center.y-a/2,c=function(e,t,n){const r=F_({},t);return e.boundingRectangle.top+t.y<=n.top?r.y=n.top-e.boundingRectangle.top:e.boundingRectangle.bottom+t.y>=n.top+n.height&&(r.y=n.top+n.height-e.boundingRectangle.bottom),e.boundingRectangle.left+t.x<=n.left?r.x=n.left-e.boundingRectangle.left:e.boundingRectangle.right+t.x>=n.left+n.width&&(r.x=n.left+n.width-e.boundingRectangle.right),r}(new DD(l,u,s,a),n,r);return c}};yJ.configure=mP(yJ);const xJ=({invert:e})=>({dragOperation:t,droppable:n})=>{if(!n.shape)return null;const{shape:r}=t;if(!r)return null;const o=function(e){return e.sortable?.index}(n);if(void 0===o)return null;const i=function(e){return e.source.index}(t);if(void 0===i)return null;if(i===o)return null;const a=i<o!==e?"right":"left",{center:s,boundingRectangle:l}=r.current;return"left"===a&&l.left+.3*l.width<=n.shape.center.x||"right"===a&&l.right-.3*l.width>=n.shape.center.x?{id:n.id,value:1/kD.distance(n.shape.center,s),type:AT.Collision,priority:RT.Normal}:null},SJ=[yJ.configure({element:e=>{const t=e.activatorEvent?.target;return t instanceof HTMLElement?t.closest(".sn-table-head-row"):null}})],wJ=(e,t)=>{const n=Qg(Fb),r=!Qg(jb);return rF({id:e.id,disabled:r,index:t,type:"item",accept:"item",group:"column",modifiers:SJ,data:e,plugins:e=>[...e,AN.configure({feedback:"clone"})],collisionDetector:xJ({invert:"rtl"===n})})},CJ=({column:e,columnIndex:t,columnsLength:n})=>{const r=Qg(kU),o=Qg(Qb),i=Qg(Fb),a=Qg(Tb),s=Qg(hU),l=Qg(fU),u=Qg(zU)[t],c=eb(FY),d=Qg($Y(t)),p=Qg(jb),f=Qg(Ub),{open:h,setOpen:m,handleOpenMenu:g,toggleSortOrder:b}=vJ({isInteractionEnabled:p,column:e}),v=eb(mV),{ref:y,isDragging:x}=wJ(e,t),S=YX(e.id),w=Qg(Ib),C=w?iY:RY,E=e.isActivelySorted?bH[e.sortDirection]:void 0,R=h?Km:void 0,A=h?"true":void 0,I=t===n-1,M=[0,e.pageColIdx],k={width:u,zIndex:s.length-t},D=d&&0===t&&!f.enabled&&p?0:-1;return Yt.jsxs(KK,{"data-dragging":x,ref:y,headerStyle:{...r.header,...PK(r,l,!0),opacity:S},background:w&&h?e.headerColor?.headerMenuActiveBackground??r.headerMenuActiveBackground:e.headerColor?.background??r.header.background,hoverBackground:e.headerColor?.headerMenuHoverBackground??r.headerMenuHoverBackground,color:e.headerColor?.color??r.header.color,interactions:a,style:k,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${Ym}`,tabIndex:D,title:a.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:n,handleOpenMenu:r}=e;if(t)switch(n.key){case Xm.C:UY(n);break;case Xm.Enter:case Xm.Space:r?.(n);break;default:GY(e)}else Em(n)})({evt:e,rootElement:o,cellCoord:M,setFocusedCellCoord:c,isInteractionEnabled:p,handleOpenMenu:g,direction:i})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:o,isInteractionEnabled:i})=>{e.preventDefault(),i&&WK(n,t,r,o)})({evt:e,rootElement:o,cellCoord:M,setFocusedCellCoord:c,keyboard:f,isInteractionEnabled:p})},onClick:w?g:b,"aria-sort":E,"aria-controls":R,"aria-expanded":A,"aria-haspopup":"true",children:[Yt.jsx(C,{column:e,isInteractionEnabled:p,open:h,setOpen:m,isPagination:!0,columnWidth:u}),Yt.jsx(gJ,{column:e,isLastColumn:I,setIsAdjustingWidth:v})]},e.id)},EJ=()=>{const e=Qg(hU),t=Qg(kU),n=Qg(yb),r=Qg(Bb),o=eb(lJ),i=Qg(zU),a=D(null),s=hJ(r,n);return q(()=>{a.current&&o(a.current.getBoundingClientRect().height)},[t.header.fontSize,i,o,s]),Yt.jsx(Xh,{style:{visibility:s?"collapse":void 0},children:Yt.jsx(ZK,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map((t,n)=>Yt.jsx(CJ,{column:t,columnIndex:n,columnsLength:e.length},t.id))})})};var RJ=z(EJ);var AJ=z(()=>{const e=Qg(VY),[t,n]=tb(oU),{page:r,rowsPerPage:o}=t,i=Qg($b),{totalColumnCount:a,totalRowCount:s,totalPages:l,paginationNeeded:u,rows:c,columns:d}=Qg(pU),p=Qg(kU),f=Qg(xW),h=Qg(yb),m=Qg(nv),g=Qg(Zb),b=Qg(Qb),v=Qg(Bb),y=Qg(Fb),x=Qg(Tb),S=Qg(rv),w=Qg(kK),C=eb(IK),E=Qg(kb),R=Qg(Ub),A=D(!1),I=D(null),M=D(null),k=`${S.get("SNTable.Accessibility.RowsAndColumns",[String(c.length),String(d.length)])} ${S.get("SNTable.Accessibility.NavigationInstructions")}`,P=_b(h,v),T=P?f.scrollLeft??0:0,O=P?f.rowPartialHeight??0:0,N=L(()=>{A.current=b.getElementsByTagName("table")[0].contains(document.activeElement)},[b]),j=L(r=>{n({...t,page:r}),e({keys:[["SNTable.Pagination.PageStatusReport",(r+1).toString(),l.toString()]],politeness:"assertive"})},[t,n,l,e]),_=L(r=>{n({...t,page:0,rowsPerPage:r}),e({keys:[["SNTable.Pagination.RowsPerPageChange",r.toString()]],politeness:"assertive"})},[e,t,n]);return(e=>{const t=Qg(Fb),n=Qg(xW);q(()=>{const r=e.current;if(!r)return;const o=e=>{((e,t,n)=>{if(0===e.deltaX)return;e.stopPropagation();const r=n.scrollWidth-n.offsetWidth,{scrollLeft:o}=n;let i=o+e.deltaX;t&&(i=r+i),r>0&&(i<0||i>r+1)&&e.preventDefault()})(e,"rtl"===t,r)},i=e=>{n.scrollLeft=e.currentTarget?.scrollLeft||0};return r.addEventListener("wheel",o),r.addEventListener("scroll",i),()=>{r.removeEventListener("wheel",o),r.removeEventListener("scroll",i)}},[e,t,n])})(I),zY(M,A),(()=>{const e=Qg(Qb),t=Qg(Ub),n=Qg(FY);$m(()=>{const r=_K(e,n);t.active?BK(r):(r?.blur(),$K(e))},[t.active,e])})(),WY(A,r),q(()=>{const e=I.current;e&&(e.scrollLeft=T,e.scrollTop=O)},[t,s,T,O]),_Y(()=>{C({type:gH.UpdatePageRows,payload:{pageRows:c}})},[c]),BY(),JY(I),Yt.jsxs(jY,{children:[Yt.jsxs(eY,{ref:M,dir:y,onKeyDown:e=>{YY({evt:e,totalRowCount:s,page:r,rowsPerPage:o,handleChangePage:j,updateShouldRefocus:N,keyboard:R,isSelectionMode:E})},"data-testid":"sn-table",children:[Yt.jsx(tX,{}),Yt.jsxs(QY,{ref:I,className:"sn-table-container",fullHeight:!!i||!x.active||!u,interactions:x,tabIndex:-1,role:"application","data-testid":"table-container",children:[Yt.jsxs(eX,{stickyHeader:!0,"aria-label":k,borderRight:w?`1px solid ${p.grid.border}`:void 0,children:[Yt.jsx(RJ,{}),Yt.jsx(fJ,{updateShouldRefocus:N,tableWrapperRef:M})]}),Yt.jsx(DK,{})]}),Yt.jsx(hK,{footerContainer:i,pageInfo:t,paginationNeeded:u,theme:m,totalRowCount:s,totalColumnCount:a,totalPages:l,keyboard:R,translator:S,interactions:x,rect:g,layout:h,handleChangePage:j,handleChangeRowsPerPage:_,isSelectionMode:E,direction:y})]}),Yt.jsx(kY,{isPagination:!0})]})});const IJ=$g(0),MJ=$g(e=>{const t=e(xb);return Math.min(kV,t)}),kJ=$g(e=>{const t=e(xb);return t===kV?0:Math.floor(t/kV)}),DJ=$g(e=>{const t=e(IJ),n=e(kJ);return Math.min(t,n)}),PJ=$g(e=>({page:e(DJ),rowsPerPage:e(MJ),rowsPerPageOptions:[]}),(e,t,n)=>{const r=e(kJ);t(IJ,Math.max(0,Math.min(n,r)))}),TJ=$g(null),qJ=$g(null),OJ=$g(e=>{const t=e(PJ),n=e(xb);return Math.min(t.rowsPerPage,n-t.page*t.rowsPerPage)}),LJ=$g(null),NJ=$g(null),jJ=$g(e=>e(fU).atTop?2:1),_J=$g(e=>e(fU).atTop?1:e(jJ)+e(OJ)),zJ=$g(e=>jK(Boolean(e(kb)),e(fU))),FJ=$g(e=>({firstBodyRowIdx:e(jJ),totalsRowIdx:e(_J),allowedRows:e(zJ)})),$J=$g(e=>({rootElement:e(Qb),totalsPosition:e(fU),rowCount:e(OJ),colCount:e(mU),columnWidths:e(zU)})),BJ=$g(e=>({scrollToCell:e(LJ),scrollableContainerElement:e(NJ)})),HJ=$g(e=>({keyboard:e(Ub),isInSelectionMode:e(kb),selectionsAPI:e(Db),isSelectionsEnabled:e(Lb)})),VJ=$g(e=>({direction:e(Fb),isInteractionEnabled:e(jb),paginationNeeded:e(yU),announce:e(VY),shouldRefocusRef:e(TJ)})),WJ=10,UJ=e=>e.atTop?2:1,GJ=(e,[t,n],r,o)=>{const i=UJ(r);if(0===t)return e.querySelector(`.sn-table-head-row [data-col="${n}"]`);if(r.atTop&&1===t)return e.querySelector(`.sn-table-totals-row [data-col="${n}"]`);const a=t-i;return a>=0&&a<o?e.querySelector(`.sn-table-body .sn-table-cell[rowindex="${a}"][columnindex="${n}"]`):e.querySelector(`.sn-table-totals-row [data-col="${n}"]`)},KJ=(e,t,n,r,o,i,a,s,l)=>{if(!e)return l(!1),()=>{};const[u,c]=n,d=u-UJ(r),p=d>=0&&d<o;let f=a,h=!1,m=null;const g=()=>h||s&&!s(),b=()=>{g()||(p&&e(d,c),m=requestAnimationFrame(()=>{if(g())return;const e=((e,t)=>{if(!e||!t)return!1;const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right})(GJ(t,n,r,o),i);if(!e)return f>0?(f-=1,void b()):void l(!1);l(!0)}))};return b(),()=>{h=!0,null!==m&&cancelAnimationFrame(m)}},YJ=(e,t,n,r,o,i)=>e<i?[t,e+1]:t<r?[t+1,o]:[t,e],XJ=(e,t,n,r,o,i)=>e>o?[t,e-1]:t>n?[t-1,i]:[t,e],JJ=(e,[t,n],r,o,i,a={top:0,bottom:0},s)=>{const l=a.top>0,u=a.top,c=r-1-a.bottom,d=o-1;switch(e.key){case Xm.Down:case Xm.Up:t=((e,t,n,r)=>e===Xm.Down&&t<r?t+1:e===Xm.Up&&t>n?t-1:t)(e.key,t,u,c);break;case Xm.Right:l||([t,n]=((e,t,n,r,o,i,a)=>"rtl"===a?XJ(e,t,n,0,o,i):YJ(e,t,0,r,o,i))(n,t,u,c,0,d,i));break;case Xm.Left:l||([t,n]=((e,t,n,r,o,i,a)=>"rtl"===a?YJ(e,t,0,r,o,i):XJ(e,t,n,0,o,i))(n,t,u,c,0,d,i));break;case Xm.Home:l?t=Math.max(u,t-WJ):(bK(e)&&(t=u),n=0);break;case Xm.End:l?t=Math.min(c,t+WJ):(bK(e)&&(t=c),n=d);break;case Xm.PageDown:t=Math.min(c,t+WJ);break;case Xm.PageUp:if(l)t=Math.max(u,t-WJ);else{const e=s?UJ(s):1,n=t-e;t=n>0&&n<=WJ?e:Math.max(u,t-WJ)}}return[t,n]},ZJ=e=>{((e,t)=>{e.querySelectorAll(t).forEach(e=>{e.setAttribute("tabIndex","-1")})})(e,".sn-table-cell[tabindex='0']")},QJ=[Xm.Home,Xm.End,Xm.PageUp,Xm.PageDown],eZ=()=>{const e=D(!1),t=D(0),n=D(0),r=D(null),o=D(null),i=D(null),a=D(0),s=eb(FY),l=eb(IK),u=Qg(gb)("VNA-700-KEYBOARD_NAV_VIRTUALIZED_STRAIGHT_TABLE"),{rootElement:c,totalsPosition:d,rowCount:p,colCount:f,columnWidths:h}=Qg($J),{firstBodyRowIdx:m,allowedRows:g,totalsRowIdx:b}=Qg(FJ),{scrollToCell:v,scrollableContainerElement:y}=Qg(BJ),{keyboard:x,isInSelectionMode:S,selectionsAPI:w,isSelectionsEnabled:C}=Qg(HJ),{direction:E,announce:R,isInteractionEnabled:A,paginationNeeded:I,shouldRefocusRef:k}=Qg(VJ),P=M(()=>(e=>{const t=new Array(e.length+1);t[0]=0;for(let n=0;n<e.length;n++)t[n+1]=t[n]+(e[n]??0);return t})(h),[h]);q(()=>()=>{t.current+=1,n.current+=1,a.current+=1,r.current?.(),r.current=null,o.current?.(),o.current=null,i.current?.(),i.current=null},[]);const T=L((e,t,n,r)=>{const o=t=>{if(r&&!r())return void n?.(!1);const i=GJ(c,e,d,p);if(i)return document.activeElement!==i&&qK(i),document.activeElement===i?void n?.(!0):t>0?void requestAnimationFrame(()=>{o(t-1)}):void n?.(!1);t>0?requestAnimationFrame(()=>{o(t-1)}):n?.(!1)};requestAnimationFrame(()=>{o(t)})},[c,d,p]),O=L((e,t)=>{const r=a.current+1;a.current=r;let i=0;const s=Date.now()+5e3,l=()=>{if(a.current!==r)return;if(n.current!==t)return;if(c instanceof HTMLElement&&!c.isConnected)return;if(Date.now()>s||i>=5)return;const u=document.activeElement;u&&u!==document.body&&u!==document.documentElement||(i+=1,k&&(k.current=!0),o.current?.(),o.current=KJ(v,c,e,d,p,y,10,()=>a.current===r&&n.current===t,()=>{T(e,300,()=>{k&&(k.current=!1)},()=>a.current===r&&n.current===t)})),requestAnimationFrame(()=>{requestAnimationFrame(l)})};requestAnimationFrame(()=>{requestAnimationFrame(l)})},[T,c,p,v,y,k,d]),N=L(()=>(k&&(k.current=!0),t.current+=1,t.current),[k]),j=L(()=>{t.current+=1,i.current?.(),i.current=null},[]),_=L((e,n)=>{const r=o=>{t.current===e&&(i.current?.(),i.current=KJ(v,c,n,d,p,y,10,()=>t.current===e,()=>{if(t.current!==e)return;const i=GJ(c,n,d,p);i&&document.activeElement!==i&&qK(i),o>0?requestAnimationFrame(()=>{r(o-1)}):t.current===e&&k&&(k.current=!1)}))};requestAnimationFrame(()=>{requestAnimationFrame(()=>{r(300)})})},[c,d,p,v,k,y]),z=L((e,t)=>{if(!SK(e))return;Em(e),j(),n.current+=1;const o=n.current;a.current+=1,r.current?.(),r.current=null;const i=((e,t)=>UJ(t)+e+(t.atBottom?1:0))(p,d),l=JJ(e,t,i,f,E,g,d);ZJ(c),s(l);const[,u]=l,[,h]=t;return u!==h&&((e,t,n)=>{if(!e)return;const r=t[n]??0,o=t[n+1]??r,{scrollLeft:i,clientWidth:a}=e;r<i?e.scrollLeft=r:o>i+a&&(e.scrollLeft=o-a)})(y,P,u),k&&(k.current=!0),r.current=KJ(v,c,l,d,p,y,10,()=>n.current===o,()=>{T(l,300,t=>{k&&(k.current=!1),t&&(e=>QJ.includes(e))(e.key)&&O(l,o)},()=>n.current===o)}),l},[c,d,p,f,E,v,s,g,y,k,T,j,P,O]),F=L(e=>{e.key===Xm.Esc?x.enabled&&!S&&(Em(e),x.blur?.(!0)):yK(e.key)&&Em(e)},[x,S]),$=L((e,t,n)=>{switch(e.key){case Xm.C:Em(e),A&&(e.ctrlKey||e.metaKey)&&ig(e.currentTarget);break;case Xm.Enter:case Xm.Space:if(!A){Em(e);break}n?.(e);break;default:z(e,[0,t])}},[z,A]),B=L((t,r,o,i)=>{const a=[r+m,o];switch(t.key){case Xm.Space:if(Em(t),i.isSelectable&&C){e.current=!0;const n=N();l({type:gH.Select,payload:{cell:i,evt:t,announce:R}}),_(n,a)}break;case Xm.Enter:if(Em(t),e.current=!1,S){N(),s(yH),w?.confirm(),y&&(y.scrollTop=0,y.scrollLeft=0);const e=t=>{v?.(0,0),t>0&&requestAnimationFrame(()=>{e(t-1)})};e(10),n.current+=1;const t=n.current;T(yH,300,()=>{k&&(k.current=!1)},()=>n.current===t)}break;case Xm.Esc:if(e.current=!1,S){Em(t);const e=N();w?.cancel(),_(e,a)}break;case Xm.C:Em(t),A&&(t.ctrlKey||t.metaKey)&&ig(t.currentTarget);break;case Xm.Tab:{const e=t.shiftKey||!I;x.enabled&&S&&e&&(Em(t),Cm(t.currentTarget,x,t.shiftKey));break}default:{const n=t.key===Xm.Left||t.key===Xm.Right,r=S||Boolean(w?.isModal())||e.current;if(n&&r){Em(t);break}const o=z(t,a);!!o&&o[0]!==a[0]&&t.shiftKey&&C&&i.isSelectable&&l({type:gH.SelectMultiAdd,payload:{cell:i,evt:t,announce:R}});break}}},[m,z,C,l,R,S,w,x,I,A,N,_,s,v,y,T,k]),H=L(t=>{t.key===Xm.Space&&(e.current=!1),t.key===Xm.Shift&&l({type:gH.SelectMultiEnd})},[l]),V=L((e,t)=>{if(S)Em(e);else{if(e.key!==Xm.Space)return e.key===Xm.C?(Em(e),void(A&&(e.ctrlKey||e.metaKey)&&ig(e.currentTarget))):void z(e,[b,t]);e.preventDefault()}},[S,z,b,A]),W=L(e=>{j(),n.current+=1;const t=n.current;ZJ(c),s(e),x.enabled&&x.focus?.(),T(e,2,n=>{n&&O(e,t)},()=>n.current===t)},[c,s,x,T,j,O]);return{handleWrapperKeyDown:F,handleHeadKeyDown:$,handleBodyKeyDown:B,handleBodyKeyUp:H,handleTotalsKeyDown:V,focusHeadCellOnClick:L(e=>{u&&W([0,e])},[W,u]),focusBodyCellOnClick:L((e,t)=>{u&&W([e+m,t])},[W,m,u]),focusTotalsCellOnClick:L(e=>{u&&W([b,e])},[W,b,u])}};var tZ=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function nZ(e,t){return e===t||!(!tZ(e)||!tZ(t))}function rZ(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!nZ(e[n],t[n]))return!1;return!0}function oZ(e,t){var n;void 0===t&&(t=rZ);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 iZ="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function aZ(e){cancelAnimationFrame(e.id)}function sZ(e,t){var n=iZ();var r={id:requestAnimationFrame(function o(){iZ()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var lZ=-1;function uZ(e){if(void 0===e&&(e=!1),-1===lZ||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),lZ=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return lZ}var cZ=null;function dZ(e){if(void 0===e&&(e=!1),null===cZ||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?cZ="positive-descending":(t.scrollLeft=1,cZ=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),cZ}return cZ}var pZ=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function fZ(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,c=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,Ju(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Ju(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=oZ(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=oZ(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,u=a.rowHeight,p=r._getItemStyleCache(m&&s,m&&l,m&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:c(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=oZ(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,u=i;if("rtl"===t)switch(dZ()){case"negative":u=-i;break;case"positive-descending":u=l-o-i}u=Math.max(0,Math.min(u,l-o));var c=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:u,scrollTop:c,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&&aZ(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=sZ(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}$u(t,e),t.getDerivedStateFromProps=function(e,t){return hZ(e,t),g(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,c=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=uZ();void 0!==r&&(r=Math.max(0,Math.min(r,c-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var v=a(this.props,this._instanceProps),y=s(this.props,this._instanceProps)>f?b:0,x=v>d?b:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,y):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(dZ()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&aZ(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?pZ:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,b=e.style,v=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),w=S[0],E=S[1],R=this._getVerticalRangeToRender(),A=R[0],I=R[1],M=[];if(r>0&&g)for(var k=A;k<=I;k++)for(var D=w;D<=E;D++)M.push(C(t,{columnIndex:D,data:d,isScrolling:v?x:void 0,key:f({columnIndex:D,data:d,rowIndex:k}),rowIndex:k,style:this._getItemStyle(k,D)}));var P=a(this.props,this._instanceProps),T=s(this.props,this._instanceProps);return C(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:On({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},C(u||c||"div",{children:M,ref:l,style:{height:P,pointerEvents:x?"none":void 0,width:T}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],u=i[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,v=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(b,v,g,x,y)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,u,this._instanceProps),h=f(this.props,d,u,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(H),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var hZ=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},mZ=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},gZ=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},bZ=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=i(u);o[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},vZ=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?yZ(e,t,n,i,0,r):xZ(e,t,n,Math.max(0,i),r)},yZ=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=bZ(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},xZ=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&bZ(e,t,r,n).offset<o;)r+=a,a*=2;return yZ(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},SZ=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=bZ(e,t,n,i),u="column"===e?gZ(t,i):mZ(t,i),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return o>=d&&o<=c?o:d>c||o<d?d:c}},wZ=fZ({getColumnOffset:function(e,t,n){return bZ("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return vZ("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=bZ("column",e,t,r),s=n+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=bZ("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:mZ,getEstimatedTotalWidth:gZ,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return SZ("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return SZ("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return bZ("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return vZ("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=bZ("row",e,t,r),s=n+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=bZ("row",e,u,r).size;return u},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),CZ=function(e,t){return e};function EZ(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,c=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Ju(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Ju(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=oZ(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=oZ(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,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=oZ(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(dZ()){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&&aZ(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=sZ(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}$u(t,e),t.getDerivedStateFromProps=function(e,t){return RZ(e,t),c(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?uZ():0:l.scrollHeight>l.clientHeight?uZ():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(dZ()){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&&aZ(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,u=e.itemCount,c=e.itemData,d=e.itemKey,p=void 0===d?CZ:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,b=e.useIsScrolling,v=e.width,y=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,S=x?this._onScrollHorizontal:this._onScrollVertical,w=this._getRangeToRender(),E=w[0],R=w[1],A=[];if(u>0)for(var I=E;I<=R;I++)A.push(C(t,{data:c,key:p(I,c),index:I,isScrolling:b?y:void 0,style:this._getItemStyle(I)}));var M=r(this.props,this._instanceProps);return C(h||m||"div",{className:n,onScroll:S,ref:this._outerRefSetter,style:On({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},C(s||l||"div",{children:A,ref:a,style:{height:x?"100%":M,pointerEvents:y?"none":void 0,width:x?M:"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 u=a(this.props,l,this._instanceProps),c=s(this.props,u,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(H),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var RZ=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},AZ=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var u=r(l);o[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return o[t]},IZ=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=AZ(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},MZ=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&AZ(e,n,t).offset<r;)n+=i,i*=2;return IZ(e,t,Math.min(n,o-1),Math.floor(n/2),r)},kZ=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},DZ=EZ({getItemOffset:function(e,t,n){return AZ(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:kZ,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=AZ(e,t,o),p=kZ(e,o),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+i);switch("smart"===n&&(n=r>=h-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?IZ(e,t,o,0,n):MZ(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===o||"horizontal"===s?l:i,c=AZ(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=AZ(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function PZ(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var TZ=["style"],qZ=["style"];function OZ(e,t){var n=e.style,r=Ln(e,TZ),o=t.style,i=Ln(t,qZ);return!PZ(n,o)&&!PZ(r,i)}const LZ=$g(0),NZ=$g(0),jZ=$g(0),_Z=$g(e=>e(LZ)+e(NZ)),zZ=$g(e=>{const t=e(Zb),n=e(yU),r=t.height-(n?41:0);return{width:t.width,height:r}}),FZ=$g(e=>{const t=e(zZ),n=e(gV),r=e(bV);return{width:t.width-r,height:t.height-n}}),$Z=$g(e=>{const t=e(FZ),n=e(_Z),r=e(jZ);return Math.min(t.height-n,r)}),BZ=$g(-1),HZ=yM(e=>$g(t=>t(BZ)===e)),VZ=({style:e})=>Yt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var WZ=w.memo(VZ,OZ);const UZ=$g(e=>{const t=e(FZ),n=e(qU),r=e(_Z),o=e(jZ)+r,i=e(OJ)*n+r;return o<2*t.height?o:i}),GZ=$g(e=>e(UZ)<=e(zZ).height),KZ=()=>{},YZ=e=>{e.preventDefault()};const XZ=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{rowsInPage:o,columns:i,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:u,onKeyDown:c,onKeyUp:d,onCellClick:p}=r,f=Qg(HZ(t)),h=eb(BZ),m=Qg(kU),g=Qg(Fb),b=Qg(Ob),v=Qg(jb),y=Qg(kK),x=Qg(gb),S=Qg(GZ),w=o[t]?.[e],{handleMouseDown:C,handleMouseOver:E,handleMouseUp:R,cellSelectionState:A}=function(e){const t="object"==typeof e,n=Qg(Lb),r=eb(IK),o=Qg(MK(e));if(ZX(e),t&&n){const{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i}=XX(YZ,e,r,KZ);return{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(w),I=((e,t,n,r)=>{const o=D(null),i=n&&(!n.isNumeric||n.isDual),a=n?.isTotalRow??!1,s=L(n=>{const o=n.contentBoxSize.at(0)?.blockSize;o&&i&&r(o,e,t,a)},[a,t,r,e,i]);return hY({ref:o,callback:s}),o})(t,e,w,s),M=i[e]?.isDim?m.dimension.values:m.measure.values,k=YX(i[e].id);if("object"==typeof w){const r=((e,t,n,r,o,i,a)=>{const s=e.isTotalRow&&a("TLV-2303-SUB-TOTALS");let l=tJ(o,i,e);l=s?i.subTotalRow:l,l=QX(l,i,e,t.isDim);const u=e.isNull||s&&t.isDim?l:MV(l,e.qAttrExps,t.qAttrExprInfoIDs);return r!==mH.Selected||s?r!==mH.Disabled||s?n?{...u,...i.grid.hoverColors}:u:{...u,color:n?i.grid.hoverColors?.color:u.color,background:`${YH}, ${n?i.grid.hoverColors?.background:u.background}`}:{...u,...i.selectedColors}})(w,i[e],a&&f,A,M,m,x),o={rowindex:t,columnindex:e},s=n=>{v&&p?.(t,e),C?.(n)},D=c?n=>{c(n,t,e,w)}:void 0;return Yt.jsx("div",{className:`sn-table-cell ${A} ${Ym}`,tabIndex:-1,style:{...n,...r,display:"flex",alignItems:"start",borderColor:m.grid.border,borderTop:"0px",borderBottomWidth:!S&&w.isLastRow?"0px":"1px",borderRightWidth:aV(g,w.isLastColumn,y),borderLeftWidth:sV(g,w.isLastColumn,y),justifyContent:nV(w,g),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:w.align,opacity:k},onMouseDown:s,onMouseUp:R,onMouseOver:E,onMouseEnter:a?()=>{h(t)}:void 0,onMouseLeave:a?()=>{h(-1)}:void 0,onKeyDown:D,onKeyUp:d,title:b?w.representation.text:void 0,...o,children:Yt.jsx(KX,{cellSelectionState:A,hideTickIcon:!!w.isTotalRow,children:Yt.jsx(WX,{forwardRef:m.contentStaticLineCount||1===l?void 0:I,cell:w,style:r,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:u})})})}return Yt.jsx(WZ,{style:{...n,...M,borderColor:m.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:k}})};var JZ=z(XZ,OZ);const ZZ=ZR($g(async e=>{const t=e(yb),n=e(Gb),r=e(PJ).page,{qDataPages:o}=t.qHyperCube;if(0!==r||0===o.length){const e=r*Math.min(kV,t.qHyperCube.qSize.qcy);if(n&&"getHyperCubeData"in n)return n.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:e,qWidth:50,qHeight:100}])}return[...o]})),QZ=$g(e=>{const t=e(OJ),n=e(FZ),r=e(qU);return Math.min(t,Math.ceil(n.height/r))}),eQ=$g(e=>{const t=e(zU),n=e(FZ);return t.reduce((e,t)=>e.width<n.width?{width:e.width+t,count:e.count+1}:e,{count:0,width:0}).count}),tQ=e=>{const t=D(e);return t.current=e,t},nQ=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,rQ=e=>-1===e.qElemNumber||!!e.qIsTotalCell,oQ=(e,t,n,r,o)=>{const i=e[n];if(!i)return!0;for(let e=t;e<t+r;e++){const t=i[e];if(t?.rowIdx!==o)return!0}return!1},iQ=(e,t,n,r)=>{const o=e.slice(n,r);return 0===o.length||o.some(e=>!e[t])},aQ=(e,t,n,r,o,i,a,s)=>{e.forEach(e=>{e.qMatrix.forEach((l,u)=>{const c=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:p}=((e,t,n,r,o,i,a,s,l,u)=>{const{qSize:c}=a.qHyperCube,d=r.qTop+n,p=o+n,f=e[p]??[],h=t.some(rQ);return t.forEach((e,t)=>{const n=t+r.qLeft;if(f.at(n))return;const{colIdx:o,isDim:m,isLocked:g,bodyTextAlign:b,selectionColIdx:v,qAttrExprInfoIndex:y,representation:x,conditionalColoring:S,qMiniChart:w,measureMinMax:C,qNumFormat:E,qIsAutoFormat:R,formattedNullValueText:A}=i[n],I=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),M=!m&&e.qIsNull,k=m&&eU(e,m),D=M||k?QW(m,e,a,I):e.qText,P=M?wH(D):SH(e),T=SH(e)&&!wH(e.qText??"");f[n]={id:d$(),...e,align:YW(P,b,u),rowIdx:d,colIdx:o,isSelectable:m&&!g&&!h&&!k,isTotalRow:h,pageRowIdx:p,pageColIdx:n,selectionColIdx:v,isLastRow:d===c.qcy-1,isLastColumn:n===c.qcx-1,isNumeric:P,isDual:T,isNull:(!M||!P)&&eU(e,m),qNumFormat:E,qIsAutoFormat:R,formattedNullValueText:A,representation:yW({cell:e,representationProperties:x,attrExprInfoIndex:y,env:s,conditionalColoring:S,miniChartOnMeasure:w,measureMinMax:C,getText:()=>D,direction:u,enabledFeatures:{[S$.Image]:!0,[S$.Indicator]:!0,[S$.MiniChart]:!0,[S$.Bar]:!m&&s.flags.isEnabled("VNA-977-TABLE-BARS")}})},l(f[n],d,n)}),{row:f,pageRowIdx:p}})(n,l,u,e.qArea,c,r,o,i,a,s);n[p]=d})})},sQ=({gridState:e,setEstimatedCellHeight:t})=>{const n=Qg(yb),r=Qg(nv),o=Qg(Gb),i=Qg(mb),a=Qg(Fb),s=Qg(PJ),l=Qg(ZZ),u=Qg(hU),c=Qg(OJ),d=Qg(QZ),p=Qg(eQ),f=D([]),h=L((e,r)=>{const o=Array.isArray(r)?r.slice(0,c):(e=>Array(e).fill(void 0))(c);return aQ(e,s,o,u,n,i,t,a),f.current=o,o},[c,s,u,n,i,t,a]),[m,g]=k(()=>h(l??[]));$m(()=>{g(h(l??[]))},[l,a,c]);const b=((e,t)=>{const n=Qg(bb),r=D(new Set),o=D(new Set),i=D(new Set),a=tQ(e),s=tQ(t),l=M(()=>({enqueue:e=>{const t=nQ(e);i.current.has(t)||(r.current.add(e),i.current.add(t),1===r.current.size&&setTimeout(async()=>{const e=Array.from(r.current.values());if(0!==e.length){r.current.clear(),o.current.add(e);try{const t=(e=>{const t=[];return e.forEach(e=>{if(t.length>0){const n=t[t.length-1];((e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth)(n,e)?n.qHeight+=e.qHeight:((e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight)(n,e)?n.qWidth+=e.qWidth:t.push({...e})}else t.push({...e})}),t})(e),n=await a.current(t);o.current.has(e)&&s.current(n)}catch(t){e.forEach(e=>{i.current.delete(nQ(e))}),n.error({msg:"Failed to fetch pages",payload:t})}finally{o.current.delete(e)}}},75))},clear:()=>{r.current.clear(),o.current.clear(),i.current.clear()}}),[n,a,s]);return l})(e=>o&&"getHyperCubeData"in o?o.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([]),e=>{g(t=>h(e,t))}),v=L((e,t,n,r)=>{for(let o=e;o<e+n;o++)if(iQ(f.current,o,t,r)){const e={qLeft:o,qTop:t,qHeight:r,qWidth:1};b.enqueue(e)}},[b]),y=L((e,t,n,r)=>{for(let o=t;o<t+r;o++){const t=Math.max(0,o-s.page*s.rowsPerPage);if(oQ(f.current,e,t,n,o)){const t={qLeft:e,qTop:o,qHeight:1,qWidth:n};b.enqueue(t)}}},[b,s]);return q(()=>{if(void 0===l)return;const{qcx:t,qcy:r}=n.qHyperCube.qSize,o=e.current.overscanRowStartIndex,i=e.current.overscanColumnStartIndex,a=o+s.page*s.rowsPerPage,u=t-i,c=s.rowsPerPage-o,f=Math.min(100,u,t,p+5),h=Math.min(100,c,r,d+25);return y(i,a,f,h),()=>{b.clear()}},[l,n,d,p,s,b,y,e,r]),{rowsInPage:m,loadRows:y,loadColumns:v}},lQ=e=>{let t=0;return e.forEach(e=>{e>t&&(t=e)}),t},uQ=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,cQ=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const o=Qg(kU),i=Qg(zU),{estimateLineCount:a}=Lm(o.dimension.values),s=vV(o.dimension.values.fontSize),l=e||t||1===n;return L((e,t,o)=>{if(l||e.representation.type===S$.Image||e.isNumeric&&!e.isDual)return;const u=(e=>Math.max(0,e-24-1))(i[o]),c=e.representation.text?a({text:e.representation.text,maxWidth:u,isNumeric:!1}):1,d=Math.min(n,Math.max(1,c));r(d*s,t,o,e.isTotalRow??!1)},[l,i,a,n,s,r])},dQ=({isStaticNbrOfLines:e,minRowHeight:t,state:n,staticRowHeight:r=0})=>{const o=Qg(xW);j(()=>{const i=e?r:((e,t)=>{const n=0===t?0:e/t;return Math.ceil(n)})(n.sumHeight,n.rowHeights.size);o.estimatedRowHeight=Math.max(i,t)},[e,t,n,r,o])},pQ=({isSnapshot:e,gridRef:t})=>{const n=Qg(kU),r=Qg(OJ),[o,i]=k(()=>({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})),a=Qg(TU),s=Qg(qU),l=Qg(OU),u=!!n.contentStaticLineCount,c=Math.max(8e6/r,s,l)-9,d=c+9,p=Math.max(1,Math.min(n.grid.contentLineClamp,Math.round(c/a))),f=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:n})=>n?t*e+8+1:void 0)({lineClamp:p,lineHeight:a,isStaticNbrOfLines:u});(({gridRef:e,setState:t})=>{const n=Qg(yb),r=Qg(PJ),o=Qg(zU),i=n.multiline?.wrapTextInCells,a=n.nullValueRepresentation?.text;$m(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),t({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})},[n.qHyperCube.qSize.qcx,n.qHyperCube.qSize.qcy,r.page,i,a]),$m(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})},[o])})({gridRef:t,setState:i});const h=(({setState:e,maxCellHeight:t,gridRef:n})=>{const r=Qg(qU),o=Qg(OU);return L((i,a,s,l=!1)=>{$(()=>{e(e=>{const u=l?o:r,c=Math.max(u,i+9),d=Math.min(t,c),p=e.cellHeightsInGrid.get(a)??e.cellHeightsInGrid.set(a,new Map).get(a);if(!uQ(p.get(s),d))return e;const f={...e},h=e.rowHeights.get(a);p.set(s,d);const m=void 0===h||d>=h?d:lQ(p);return f.rowHeights.set(a,m),f.sumHeight=e.sumHeight-(h??0)+m,n.current?.resetAfterIndices({columnIndex:s,rowIndex:a,shouldForceUpdate:!1}),f})})},[e,t,r,o,n])})({maxCellHeight:d,setState:i,gridRef:t}),m=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>L((o,i,a,s)=>{e||t||1===n||r(o,i,a,s)},[e,t,n,r]))({isSnapshot:e,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:h}),g=cQ({isSnapshot:e,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:h}),b=L(e=>u?f??s:o.rowHeights.get(e)??s,[u,s,o.rowHeights,f]);return dQ({isStaticNbrOfLines:u,minRowHeight:s,state:o,staticRowHeight:f}),{setMeasuredCellHeight:m,setEstimatedCellHeight:g,getRowHeight:b,lineClamp:p}},fQ=(e,t)=>{j(()=>()=>{t(0)},[e,t]);const n=L(e=>{const n=e.contentBoxSize.at(0)?.blockSize;void 0!==n&&t(n)},[t]);hY({ref:e,callback:n})};let hQ=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const mQ=({loadRows:e,loadColumns:t,gridState:n})=>{const r=Qg(xW),o=Qg(yb),i=Qg(PJ),a=Qg(OJ);return L(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:u,overscanRowStopIndex:c,visibleColumnStartIndex:d,visibleColumnStopIndex:p,visibleRowStartIndex:f,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let o,i;return o=r>t?hQ.Down:r<t?hQ.Up:hQ.None,i=n>e?hQ.Right:n<e?hQ.Left:hQ.None,{verticalScrollDirection:o,horizontalScrollDirection:i}})(n.current,s,u);if(n.current.overscanColumnStartIndex=s,n.current.overscanColumnStopIndex=l,n.current.overscanRowStartIndex=u,n.current.overscanRowStopIndex=c,u>a)return;const b=s,v=u+i.page*i.rowsPerPage,y=l-s+1,x=c-u+1;if(r.visibleLeft=d,r.visibleWidth=p-d+1,r.visibleTop=f+i.page*i.rowsPerPage,r.visibleHeight=h-f+1,r.page=i.page,r.rowsPerPage=i.rowsPerPage,m===hQ.Down){const t=x+25;e(b,v,y,u+t>a?a-u:t)}else if(m===hQ.Up){const t=x+25,n=i.page*i.rowsPerPage,r=Math.max(n,v-25);e(b,r,y,t)}if(g===hQ.Right){const e=o.qHyperCube.qSize.qcx-b,n=y+5,r=Math.min(e,n);t(b,v,r,x)}else if(g===hQ.Left){const e=Math.max(0,b-5),n=Math.min(o.qHyperCube.qSize.qcx,y+5);t(e,v,n,x)}},[n,a,i.page,i.rowsPerPage,r,e,o.qHyperCube.qSize.qcx,t])};const gQ=({columnIndex:e,data:t,rowIndex:n})=>{const r=t.rowsInPage[n]?.[e];return r?.id??`${n}-${e}`},bQ=(e,t)=>{if(!e||!t)return;const n=e.scrollHeight-e.clientHeight,r=Math.round(n*(e=>{const t=e.scrollHeight-e.clientHeight;return t<=0?0:Math.max(0,Math.min(1,e.scrollTop/t))})(t));e.scrollTop!==r&&(e.scrollTop=r)},vQ={overflow:"hidden",willChange:"auto"},yQ=F((e,t)=>{const{handleBodyKeyDown:n,handleBodyKeyUp:r,focusBodyCellOnClick:o}=eZ(),i=Qg(hU),a=Qg(FZ),s=eb(jZ),l=Qg($Z),u=Qg(xW),c=Qg(yb),d=Qg(Fb),p=Qg(zU),f=Qg(OJ),h=Qg(NJ),m=eb(LJ),g=D(null),b=D(null),v=D(null),y=D({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),x=D(0),S=!!RV(c)?.content?.hoverEffect,{setMeasuredCellHeight:w,setEstimatedCellHeight:C,getRowHeight:E,lineClamp:R}=pQ({isSnapshot:!!c.snapshotData,gridRef:g}),{rowsInPage:A,loadRows:I,loadColumns:k}=sQ({gridState:y,setEstimatedCellHeight:C}),P=mQ({loadRows:I,loadColumns:k,gridState:y}),T=oX(),O=M(()=>({rowsInPage:A,columns:i,isHoverEnabled:S,lineClamp:R,setMeasuredCellHeight:w,resizeObserverTaskScheduler:T,onKeyDown:n,onKeyUp:r,onCellClick:o}),[A,i,S,R,w,T,n,r,o]);return j(()=>{1===x.current&&g.current?.scrollToItem({rowIndex:f-1,align:"start"})}),function(e){const t=eb(IK),{shouldRefocusRef:n}=Qg(VJ),r=Qg(Qb),o=Qg(qJ);q(()=>{t({type:gH.UpdatePageRows,payload:{pageRows:e}})},[t,e]);const i=L(()=>{n&&(n.current=r.contains(document.activeElement))},[n,r]);iX({updateShouldRefocus:i,tableWrapperRef:{current:o}})}(A),B(t,()=>({interpolatedScrollTo:(e,t)=>{const n=(v.current?.clientHeight??l)-l,r=Math.round(n*e);x.current=e,1===x.current?(g.current?.scrollToItem({rowIndex:f-1,align:"start"}),g.current?.scrollTo({scrollLeft:t})):g.current?.scrollTo({scrollTop:r,scrollLeft:t})}}),[v,l,f]),q(()=>(m(()=>(e,t)=>{g.current?.scrollToItem({rowIndex:e,columnIndex:t,align:"auto"}),bQ(h,b.current)}),()=>{m(null)}),[h,m]),fQ(v,s),Yt.jsx(wZ,{"data-key":"body",ref:g,outerRef:b,innerRef:v,style:vQ,columnCount:i.length,columnWidth:e=>p[e],height:l,rowCount:f,rowHeight:E,estimatedRowHeight:u.estimatedRowHeight,width:a.width,itemData:O,onItemsRendered:P,itemKey:gQ,className:"sn-table-body",direction:d,children:JZ})});var xQ=z(yQ);const SQ=({children:e})=>{const t=Qg(BU),n=Qg(UZ);return Yt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:t,height:n},children:e})},wQ=(e,t)=>{const n=D(null),r=Qg(zU);j(()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)},[t,n,e,r.length]);const o=L(n=>{const r=n.contentBoxSize.at(0)?.blockSize;r&&t(r+9,e)},[e,t]);return hY({ref:n,callback:o}),n},CQ=Du("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({interactions:e,hoverBackground:t,background:n,applicableStyle:r,color:o})=>({...r,background:n,color:o,"&&:hover:not(:has(button:hover))":{background:e.active?t:void 0}})),EQ=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:o,setMeasuredCellHeight:i,onKeyDown:a,onCellClick:s}=n,l=Qg(kU),u=Qg(Fb),c=Qg(Tb),d=Qg(kK),p=eb(mV),f=Qg(fU),h=Qg(jb),m=Qg(zU)[e],g=Qg(Ub),b=Qg($Y(e)),v=r[e],{open:y,setOpen:x,handleOpenMenu:S,toggleSortOrder:w}=vJ({isInteractionEnabled:h,column:v}),C=Qg(Ib),E=wQ(e,i),R=r.length-1===e,A=C?iY:RY,{ref:I,isDragging:M}=wJ(v,e),k=YX(v.id),D=b&&!g.enabled&&h?0:-1,P=a?t=>{a(t,e,S)}:void 0;return Yt.jsxs(CQ,{"data-dragging":M,ref:I,className:`sn-table-cell ${Ym}`,title:c.passive?v.label:void 0,onClick:C?S:w,applicableStyle:{...l.header,...PK(l,f,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:aV(u,R,d),borderLeftWidth:sV(u,R,d),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:v.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===v.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:k},interactions:c,hoverBackground:v.headerColor?.headerMenuHoverBackground??l.headerMenuHoverBackground,background:C&&y?v.headerColor?.headerMenuActiveBackground??l.headerMenuActiveBackground:v.headerColor?.background??l.header.background,color:v.headerColor?.color??l.header.color,tabIndex:D,onKeyDown:P,onMouseDown:t=>{t.preventDefault(),h&&s?.(e)},"data-col":e,children:[Yt.jsx(A,{forwardRef:E,column:v,isInteractionEnabled:h,open:y,setOpen:x,columnWidth:m}),Yt.jsx(gJ,{column:v,isLastColumn:R,onColumnResize:o,setIsAdjustingWidth:p})]})},RQ=e=>{const[t,n]=k(new Map);$m(()=>{n(new Map)},[e.length]);const r=L((e,t)=>{n(n=>uQ(n.get(t),e)?new Map(n).set(t,e):n)},[]);return{rowHeight:M(()=>lQ(t),[t]),setMeasuredCellHeight:r}},AQ=(e,t)=>{B(e,()=>({scrollTo:e=>t.current?.scrollTo(e)}),[t])},IQ=e=>{const t=Qg(nv),n=Qg(yb),r=Qg(PJ),o=Qg(zU);$m(()=>{e.current?.resetAfterIndex(0,!1)},[n,r,e,o,t])},MQ={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},kQ=F((e,t)=>{const{columResizeHandler:n}=e,r=Qg(hU),o=Qg(FZ),i=eb(LZ),a=w.useRef(null),s=D(null),l=Qg(DU),u=Qg(yb),c=Qg(Bb),d=Qg(Fb),p=Qg(zU),{rowHeight:f,setMeasuredCellHeight:h}=RQ(r),m=hJ(c,u),{handleHeadKeyDown:g,focusHeadCellOnClick:b}=eZ();return AQ(t,a),IQ(a),fQ(s,i),Yt.jsx(DZ,{className:"sn-table-head-row",ref:a,outerRef:s,layout:"horizontal",style:{...MQ,...m?{display:"none"}:void 0},itemCount:r.length,itemSize:e=>p[e],height:Math.max(f+8,l),width:o.width,itemKey:e=>r[e].id,itemData:{columns:r,columResizeHandler:n,setMeasuredCellHeight:h,onKeyDown:g,onCellClick:b},direction:d,children:EQ})});var DQ=z(kQ);const PQ=F((e,t)=>{const{children:n,onScroll:r}=e,o=Qg(Fb),i=Qg(Nb),{width:a,height:s}=Qg(zZ),l=eb(NJ),u=L(e=>{l(e),"function"==typeof t?t(e):t&&(t.current=e)},[t,l]);return Yt.jsx("div",{"data-testid":"scrollable-container",ref:u,style:{overflow:i?"auto":"hidden",width:a,height:s},onScroll:r,dir:o,tabIndex:-1,children:n})}),TQ=({children:e})=>{const t=Qg(Fb),n=Qg(FZ);return Yt.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"rtl"!==t?"0px":void 0,right:"rtl"===t?"0px":void 0,width:n.width,height:n.height},children:e})},qQ=({index:e,style:t,data:n})=>{const{columns:r,totals:o,setMeasuredCellHeight:i,onKeyDown:a,onCellClick:s}=n,l=Qg(kU),u=Qg(yb),c=Qg(Fb),d=Qg(Ob),p=Qg(jb),f=Qg(kK),h=Qg(GZ),m=wQ(e,i),g=r[e].totalInfo,{totalsTextAlign:b,isTotalNumeric:v}=r[e],y=u.qHyperCube.qSize.qcx-1===e,x=YX(r[e].id),S=a?t=>{a(t,e)}:void 0;return Yt.jsx("div",{className:`sn-table-cell ${Ym}`,tabIndex:-1,title:d?g:void 0,"data-col":e,onKeyDown:S,onMouseDown:t=>{t.preventDefault(),p&&s?.(e)},style:{...t,...l.totalRow,...PK(l,o,!1),background:l.totalRow.background,display:"flex",alignItems:o.atTop?"end":"start",borderStyle:"solid",borderRightWidth:aV(c,y,f),borderLeftWidth:sV(c,y,f),borderTopWidth:o.atBottom?"1px":"0px",borderBottomWidth:h&&o.atBottom||o.atTop?"1px":"0px",padding:"4px 12px",justifyContent:b,textAlign:b,boxSizing:"border-box",cursor:"default",opacity:x},children:Yt.jsx(oY,{forwardRef:v?void 0:m,isNumeric:v,children:g})})},OQ=F((e,t)=>{const{totals:n}=e,r=Qg(hU),o=Qg(FZ),i=eb(NZ),a=D(null),s=D(null),l=Qg(PU),u=Qg(Fb),c=Qg(yb),d=Qg(zU),{rowHeight:p,setMeasuredCellHeight:f}=RQ(r),{handleTotalsKeyDown:h,focusTotalsCellOnClick:m}=eZ();return AQ(t,a),IQ(a),fQ(s,i),Yt.jsx(DZ,{className:"sn-table-totals-row",ref:a,outerRef:s,layout:"horizontal",style:MQ,itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>d[e],height:Math.max(p,l),width:o.width,itemData:{columns:r,totals:n,setMeasuredCellHeight:f,onKeyDown:h,onCellClick:m},direction:u,children:qQ})});var LQ=z(OQ);const NQ=(e,t,n)=>{const r=Qg(Fb),o=Qg(xW);return L(i=>{const{scrollHeight:a,clientHeight:s,scrollTop:l}=i.currentTarget,u=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(i.currentTarget,r),c=Math.max(0,Math.min(1,l/(a-s)));o.scrollTopRatio=c,o.scrollLeft=u,n.current?.interpolatedScrollTo(Number.isNaN(c)?0:c,u),e.current?.scrollTo(u),t.current?.scrollTo(u)},[o,n,e,t,r])};var jQ=z(()=>{const e=Qg(fU),t=D(null),n=D(null),r=D(null),o=D(null),i=NQ(n,r,o),a=L(()=>{t.current&&(t.current.scrollTop=0)},[t]);BY(),(e=>{const t=Qg(mU),n=Qg(PJ),r=Qg(nv),o=Qg(OJ);q(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollLeft=0,e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[t,e]),q(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[n,o,r,e])})(t),JY(t);const s=Yt.jsx(LQ,{ref:r,totals:e},"totals");return Yt.jsxs(jY,{children:[Yt.jsx(PQ,{ref:t,onScroll:i,children:Yt.jsxs(SQ,{children:[Yt.jsxs(TQ,{children:[Yt.jsx(DQ,{ref:n,columResizeHandler:a}),e.atTop?s:null,Yt.jsx(xQ,{ref:o}),e.atBottom?s:null]}),Yt.jsx(DK,{})]})}),Yt.jsx(kY,{isPagination:!1})]})});const _Q=()=>{const e=Qg(yb),t=Qg(Zb),n=Qg(Tb),{paginationNeeded:r,totalRowCount:o,totalColumnCount:i,totalPages:a}=Qg(pU),s=Qg(nv),l=Qg(rv),u=Qg(Ub),[c,d]=tb(PJ),p=D(null),f=D(!1),h=eb(TJ),m=eb(qJ);q(()=>{h(f)},[h]);const g=w.useCallback(e=>{p.current=e,m(e)},[m]),{handleWrapperKeyDown:b}=eZ();return(()=>{const e=Qg(Qb),{keyboard:t}=Qg(HJ),n=Qg(FY),r=Qg(fU),o=Qg(OJ),{scrollToCell:i}=Qg(BJ),{shouldRefocusRef:a}=Qg(VJ),s=D({focusedCellCoord:n,totalsPosition:r,rowCount:o,scrollToCell:i,rootElement:e}),l=D(null),u=D(null);j(()=>{s.current={focusedCellCoord:n,totalsPosition:r,rowCount:o,scrollToCell:i,rootElement:e}},[n,r,o,i,e]),q(()=>{let e=!1;const{focusedCellCoord:n,totalsPosition:r,rowCount:o,scrollToCell:i,rootElement:c}=s.current;if("function"==typeof c.querySelector){if(t.active){const[t,a]=n,d=r.atTop?2:1;if(t>=d&&t<d+o){null!==u.current&&(cancelAnimationFrame(u.current),u.current=null),i?.(t-d,a);const n=t=>{if(e)return;const r=GJ(s.current.rootElement,s.current.focusedCellCoord,s.current.totalsPosition,s.current.rowCount);r&&document.activeElement!==r&&qK(r),r&&document.activeElement===r||t>0&&(l.current=requestAnimationFrame(()=>{n(t-1)}))};l.current=requestAnimationFrame(()=>{e||n(5)})}else{const e=GJ(c,n,r,o);e&&qK(e)}}else null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),u.current=requestAnimationFrame(()=>{if(e)return;const t=s.current;if(a?.current)return;if(t.rootElement.contains(document.activeElement))return;const n=GJ(t.rootElement,t.focusedCellCoord,t.totalsPosition,t.rowCount);n?.blur(),ZJ(t.rootElement)});return()=>{e=!0,null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),null!==u.current&&(cancelAnimationFrame(u.current),u.current=null)}}},[t.active,e,a])})(),zY(p,f),Yt.jsxs(eY,{ref:g,"data-testid":"sn-table",onKeyDown:b,children:[Yt.jsx(tX,{}),Yt.jsx(jQ,{}),Yt.jsx(hK,{paginationNeeded:r,handleChangePage:e=>{d(e)},pageInfo:c,totalRowCount:o,totalColumnCount:i,totalPages:a,keyboard:u,translator:l,theme:s,interactions:n,rect:t,layout:e})]})};var zQ=z(_Q);const FQ=e=>{const t=e.get(Gb),n=e.get(Vb),r=e.get(vb),o=e.get(Fb);a(()=>{r&&t&&(n?function(e){const t=e.get(Fb),n=e.get(tv),r=VU(t);n.render(Yt.jsx(yi,{stylisPlugins:"rtl"===t?[dH]:void 0,children:Yt.jsx(Tu,{theme:r,children:Yt.jsx(Gg,{store:e,children:Yt.jsx(HU,{children:Yt.jsx(AJ,{})})})})}))}(e):function(e){const t=e.get(Fb),n=e.get(tv),r=VU(t);n.render(Yt.jsx(w.StrictMode,{children:Yt.jsx(Tu,{theme:r,children:Yt.jsx(Gg,{store:e,children:Yt.jsx(HU,{children:Yt.jsx(zQ,{})})})})}))}(e))},[r,n,e,t,o])};function $Q(e,t){const n=e.getElementsByClassName("sn-table-container")[0];if(!n)return{};const r=n.getBoundingClientRect(),o=e.getElementsByClassName("sn-table-head-row")[0],i=o?.getBoundingClientRect()??{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=a?.getBoundingClientRect()??{height:0},l=e.getElementsByClassName("sn-table-data-row"),u={top:r.y+i.height+(t.atTop?s.height:0),bottom:r.y+r.height-(t.atBottom?s.height:0)},c=((e,t)=>{if(!e)return-1;for(let n=0;n<e.length;n++)if(e[n].getBoundingClientRect().bottom>t.top)return n;return-1})(l,u),d=((e,t)=>{if(!e)return-1;for(let n=e.length-1;n>-1;n--){const r=e[n].getBoundingClientRect();if(t.bottom>r.top)return n}return-1})(l,u),p=((e,t,n)=>{if(!e||0===e.length||n<0)return 0;const r=e[n].getBoundingClientRect();return Math.max(t.top-r.top,0)})(l,u,c);return{visibleRowStartIndex:c,visibleRowEndIndex:d,rowPartialHeight:p}}const BQ=(e,t)=>{if(t)for(let n=0;n<t.length;n++){const r=t[n].getAttribute("rowindex");if(r&&parseInt(r,10)===e)return t[n]}},HQ=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const VQ=(e,t,n,r,o)=>{if(e<0)return 0;const i=n.qHyperCube.qSize.qcy,a=r.rowsPerPage||tU.rowsPerPage,s=o?.isMultiPage?0:3;return Math.min(i,a,e-t+1+s)},WQ=(e,t,n,r,o)=>{if(r&&!r.isMultiPage)return r;const i=WW(e,r);if(o){const{visibleRowStartIndex:o=-1,visibleRowEndIndex:a=-1,rowPartialHeight:s}=$Q(n,i);return{rowPartialHeight:s,scrollLeft:t.scrollLeft,visibleTop:t.qTop+o,visibleHeight:VQ(a,o,e,t,r),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:i}}const{visibleRowStartIndex:a=-1,visibleRowEndIndex:s=-1}=function(e,t){const n=e.querySelector(".sn-table-body"),r=n?.getBoundingClientRect(),o=n?.querySelectorAll(".sn-table-body .sn-table-cell");if(!o||!r)return{};const{scrollTopRatio:i=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:u=0}=t,c=l*u,d=a-c,p=d+s-1,f=BQ(d,o),h=f?.getBoundingClientRect();if(!f||!h)return{};const m=r.y;if(1-i<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+c,visibleRowEndIndex:p+c};const g=r.y+r.height,b=(HQ(h,m,g)?d:d+1)+c;let v=p+c;const y=BQ(p,o),x=y?.getBoundingClientRect();return y&&x&&(HQ(x,m,g)||(v=p-1+c)),{visibleRowStartIndex:b,visibleRowEndIndex:v}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:a,visibleHeight:VQ(s,a,e,t,r),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:i}},UQ=({store:e})=>{const t=e.get(yb),n=e.get(Gb),r=e.get(Qb),o=e.get(Jb),i=e.get(Bb),a=e.get(Vb);c(async s=>{const l=s;if(!l.snapshotData||!n||l.snapshotData.content)return l;if("getHyperCubeData"in n){const s=e.get(xW),{rowPartialHeight:u,scrollLeft:c,scrollTopRatio:d,visibleLeft:p,visibleWidth:f,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:b}=WQ(t,s,r,i,a);l.qHyperCube.qDataPages=await n.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:h,qWidth:t.qHyperCube.qSize.qcx,qHeight:m}]),l.snapshotData.content={rowPartialHeight:u,scrollLeft:c,scrollTopRatio:d,visibleLeft:p,visibleWidth:f,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:b,size:{width:o.width,height:o.height},estimatedRowHeight:s.estimatedRowHeight}}return l}),d(()=>({getViewState:()=>WQ(t,e.get(xW),r,i,a)}),[t,e,r,a])},GQ={version:JSON.stringify("6.63.0"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals"},usePagination:!1,components:[],accessibleHeader:!1};var KQ=e=>({properties:{initial:GQ},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:t=>Ev({...t,env:e}),exportProperties:vv,exploration:t$(e)});const YQ=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),XQ=e=>e.getStyle("object","straightTableV2","backgroundColor")}}});
|
|
121
|
+
*/var IB=(RB||(RB=1,function(e,t){var n;function r(e,t){var n=[],r=0;function o(e){return n.push(e),t}function i(){return n[r++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",o="(?:[0-9]*\\.[0-9]+|[0-9]+)",i="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",a="direction\\s*:\\s*",s="['\"]?\\s*",l="(^|[^a-zA-Z])",u="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",c="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",d="(?:[_a-z0-9-]|"+n+"|"+c+")",p=o+"(?:\\s*"+i+"|-?(?:[_a-z]|"+n+"|"+c+")"+d+"*)?",f="((?:-?"+p+")|(?:inherit|auto))",h="((?:-?"+p+")|(?:inherit|auto)|(?:calc\\((?:(?:(?:\\(|\\)|\\t| )|(?:-?"+o+"(?:\\s*"+i+")?)|(?:\\+|\\-|\\*|\\/)){3,})\\)))",m="(#?"+d+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",g="(?:[!#$%&*-~]|"+n+"|"+c+")*?",b="(?![a-zA-Z])",v="(?!("+d+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+g+s+"\\))",x="(?="+g+s+"\\))",S="(\\s*(?:!important\\s*)?[;}])",w=/`TMP`/g,C=/`TMPLTR`/g,E=/`TMPRTL`/g,R=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),A=new RegExp("("+u+v+"[^;}]+;?)","gi"),I=new RegExp("("+u+"[^\\}]*?})","gi"),M=new RegExp("("+a+")ltr","gi"),k=new RegExp("("+a+")rtl","gi"),D=new RegExp(l+"(left)"+b+y+v,"gi"),P=new RegExp(l+"(right)"+b+y+v,"gi"),T=new RegExp(l+"(left)"+x,"gi"),q=new RegExp(l+"(right)"+x,"gi"),O=/(:dir\( *)ltr( *\))/g,L=/(:dir\( *)rtl( *\))/g,N=new RegExp(l+"(ltr)"+x,"gi"),j=new RegExp(l+"(rtl)"+x,"gi"),_=new RegExp(l+"([ns]?)e-resize","gi"),z=new RegExp(l+"([ns]?)w-resize","gi"),F=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+h+"(\\s+)"+h+"(\\s+)"+h+"(\\s+)"+h+S,"gi"),$=new RegExp("((?:-color|border-style)\\s*:\\s*)"+m+"(\\s+)"+m+"(\\s+)"+m+"(\\s+)"+m+S,"gi"),B=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+p+")","gi"),H=new RegExp("(background-position-x\\s*:\\s*)(-?"+o+"%)","gi"),V=new RegExp("(border-radius\\s*:\\s*)"+f+"(?:(?:\\s+"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?)?(?:(?:(?:\\s*\\/\\s*)"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?(?:\\s+"+f+")?)?"+S,"gi"),W=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+f,"gi"),U=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+m,"gi"),G=new RegExp("(text-shadow\\s*:\\s*)"+m+"(\\s*)"+f,"gi"),K=new RegExp("(text-shadow\\s*:\\s*)"+f,"gi"),Y=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+f+"(\\s*\\))","gi"),X=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+f+"((?:\\s*,\\s*"+f+"){0,2}\\s*\\))","gi");function J(e,t,n){var r,o;return t.split("(").length>t.split(")").length?e:("%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(o=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(o)+"%"):n=100-parseFloat(n)+"%"),t+n)}function Z(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function Q(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter(function(e){return e}),o=n.slice(6,10).filter(function(e){return e}),i=n[10]||"";return t+(o.length?Z(r)+" / "+Z(o):Z(r))+i}function ee(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function te(e,t,n){return t+ee(n)}function ne(e,t,n,r,o){return t+n+ee(r)+o}function re(e,t,n,r,o){return t+n+r+ee(o)}return{transform:function(n,o){var i=new r(A,"`NOFLIP_SINGLE`"),a=new r(I,"`NOFLIP_CLASS`"),s=new r(R,t);return n=s.tokenize(a.tokenize(i.tokenize(n.replace("`","%60")))),o.transformDirInUrl&&(n=n.replace(O,"$1`TMPLTR`$2").replace(L,"$1`TMPRTL`$2").replace(N,"$1"+e).replace(j,"$1ltr").replace(w,"rtl").replace(C,"ltr").replace(E,"rtl")),o.transformEdgeInUrl&&(n=n.replace(T,"$1"+e).replace(q,"$1left").replace(w,"right")),n=n.replace(M,"$1"+e).replace(k,"$1ltr").replace(w,"rtl").replace(D,"$1"+e).replace(P,"$1left").replace(w,"right").replace(_,"$1$2"+e).replace(z,"$1$2e-resize").replace(w,"w-resize").replace(V,Q).replace(W,te).replace(U,re).replace(G,re).replace(K,te).replace(Y,ne).replace(X,ne).replace(F,"$1$2$3$8$5$6$7$4$9").replace($,"$1$2$3$8$5$6$7$4$9").replace(B,J).replace(H,J),n=i.detokenize(a.detokenize(s.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var o;return"object"==typeof t?o=t:(o={},"boolean"==typeof t&&(o.transformDirInUrl=t),"boolean"==typeof r&&(o.transformEdgeInUrl=r)),n.transform(e,o)}:"undefined"!=typeof window&&(window.cssjanus=n)}(AB,AB.exports)),AB.exports),MB=Ht(IB),kB="comm",DB="rule",PB="decl",TB=Math.abs,qB=String.fromCharCode;function OB(e){return e.trim()}function LB(e,t,n){return e.replace(t,n)}function NB(e,t){return 0|e.charCodeAt(t)}function jB(e,t,n){return e.slice(t,n)}function _B(e){return e.length}function zB(e,t){return t.push(e),e}var FB=1,$B=1,BB=0,HB=0,VB=0,WB="";function UB(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:FB,column:$B,length:a,return:"",siblings:s}}function GB(){return VB=HB>0?NB(WB,--HB):0,$B--,10===VB&&($B=1,FB--),VB}function KB(){return VB=HB<BB?NB(WB,HB++):0,$B++,10===VB&&($B=1,FB++),VB}function YB(){return NB(WB,HB)}function XB(){return HB}function JB(e,t){return jB(WB,e,t)}function ZB(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function QB(e){return OB(JB(HB-1,nH(91===e?e+2:40===e?e+1:e)))}function eH(e){for(;(VB=YB())&&VB<33;)KB();return ZB(e)>2||ZB(VB)>3?"":" "}function tH(e,t){for(;--t&&KB()&&!(VB<48||VB>102||VB>57&&VB<65||VB>70&&VB<97););return JB(e,XB()+(t<6&&32==YB()&&32==KB()))}function nH(e){for(;KB();)switch(VB){case e:return HB;case 34:case 39:34!==e&&39!==e&&nH(VB);break;case 40:41===e&&nH(e);break;case 92:KB()}return HB}function rH(e,t){for(;KB()&&e+VB!==57&&(e+VB!==84||47!==YB()););return"/*"+JB(t,HB-1)+"*"+qB(47===e?e:KB())}function oH(e){for(;!ZB(YB());)KB();return JB(e,HB)}function iH(e){return function(e){return WB="",e}(aH("",null,null,null,[""],e=function(e){return FB=$B=1,BB=_B(WB=e),HB=0,[]}(e),0,[0],e))}function aH(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,b=1,v=0,y=0,x="",S=o,w=i,C=r,E=x;g;)switch(h=y,y=KB()){case 40:108!=h&&58==NB(E,d-1)?(v++,E+="("):E+=QB(y);break;case 41:v--,E+=")";break;case 34:case 39:case 91:E+=QB(y);break;case 9:case 10:case 13:case 32:if(v>0){E+=qB(y);break}E+=eH(h);break;case 92:E+=tH(XB()-1,7);continue;case 47:switch(YB()){case 42:case 47:zB(lH(rH(KB(),XB()),t,n,l),l),5!=ZB(h||1)&&5!=ZB(YB()||1)||!_B(E)||" "===jB(E,-1,void 0)||(E+=" ");break;default:E+="/"}break;case 123*m:s[u++]=_B(E)*b;case 125*m:case 59:case 0:if(v>0&&y){E+=qB(y);break}switch(y){case 0:case 125:g=0;case 59+c:-1==b&&(E=LB(E,/\f/g,"")),f>0&&(_B(E)-d||0===m)&&zB(f>32?uH(E+";",r,n,d-1,l):uH(LB(E," ","")+";",r,n,d-2,l),l);break;case 59:E+=";";default:if(zB(C=sH(E,t,n,u,c,o,s,x,S=[],w=[],d,i),i),123===y)if(0===c)aH(E,t,C,C,S,i,d,s,w);else{switch(p){case 99:if(110===NB(E,3))break;case 108:if(97===NB(E,2))break;default:c=0;case 100:case 109:case 115:}c?aH(e,C,C,r&&zB(sH(e,C,C,0,0,o,s,x,o,S=[],d,w),w),o,w,d,s,r?S:w):aH(E,C,C,C,[""],w,0,s,w)}}u=c=f=0,m=b=1,x=E="",d=a;break;case 58:d=1+_B(E),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==GB())continue;switch(E+=qB(y),y*m){case 38:b=c>0?1:(E+="\f",-1);break;case 44:if(v>0)break;s[u++]=(_B(E)-1)*b,b=1;break;case 64:45===YB()&&(E+=QB(KB())),p=YB(),c=d=_B(x=E+=oH(XB())),y++;break;case 45:45===h&&2==_B(E)&&(m=0)}}return i}function sH(e,t,n,r,o,i,a,s,l,u,c,d){for(var p=o-1,f=0===o?i:[""],h=function(e){return e.length}(f),m=0,g=0,b=0;m<r;++m)for(var v=0,y=jB(e,p+1,p=TB(g=a[m])),x=e;v<h;++v)(x=OB(g>0?f[v]+" "+y:LB(y,/&\f/g,f[v])))&&(l[b++]=x);return UB(e,t,n,0===o?DB:s,l,u,c,d)}function lH(e,t,n,r){return UB(e,t,n,kB,qB(VB),jB(e,2,-2),0,r)}function uH(e,t,n,r,o){return UB(e,t,n,PB,jB(e,0,r),jB(e,r+1,-1),r,o)}function cH(e,t,n){switch(e.type){case"@import":case PB:case kB:return e.return=e.return||e.value;case DB:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(e){e.type===kB&&(e.children=e.value)})}var r=function(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}(Array.prototype.concat(e.children),cH);return _B(r)?e.return=e.value+"{"+r+"}":""}function dH(e,t,n,r){if("@keyframes"===e.type||"@supports"===e.type||e.type===DB&&(!e.parent||"@media"===e.parent.type||e.parent.type===DB)){var o=MB.transform(cH(e));e.children=o?iH(o)[0].children:[],e.return=""}}Object.defineProperty(dH,"name",{value:"stylisRTLPlugin"});const pH=yM(({options:e,...t})=>$g(Om(t,e)()),(e,t)=>e.fontSize===t.fontSize&&e.fontFamily===t.fontFamily&&e.fontStyle===t.fontStyle&&e.fontWeight===t.fontWeight&&e.options?.maxNbrLinesOfText===t.options?.maxNbrLinesOfText&&e.options?.allowLineBreaks===t.options?.allowLineBreaks);class fH{#y={on:new Map,once:new Map};#x=10;#S(e){this.listenerCount(e)>this.#x&&console.warn(`Possible EventEmitter memory leak detected. ${this.listenerCount(e)} listeners added to "${String(e)}".`)}#w(e,t,n){const r=this.#y[e].get(t)??new Set;r.add(n),this.#y[e].set(t,r),this.#S(t)}setMaxListeners(e){this.#x=e}on(e,t){this.#w("on",e,t)}once(e,t){this.#w("once",e,t)}off(e,t){this.#y.on.get(e)?.delete(t),this.#y.once.get(e)?.delete(t)}emit(e,...t){this.#y.on.get(e)?.forEach(e=>{e(...t)}),this.#y.once.get(e)?.forEach(e=>{e(...t)}),this.#y.once.delete(e)}listenerCount(e){return(this.#y.on.get(e)?.size??0)+(this.#y.once.get(e)?.size??0)}removeAllListeners(e){void 0===e?(this.#y.on.clear(),this.#y.once.clear()):(this.#y.on.delete(e),this.#y.once.delete(e))}}const hH=$g(()=>new fH);let mH=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),gH=function(e){return e.Select="Select",e.SelectMouseDown="SelectMouseDown",e.SelectMouseUp="SelectMouseUp",e.SelectMultiAdd="SelectMultiAdd",e.SelectMultiEnd="SelectMultiEnd",e.Reset="Reset",e.Clear="Clear",e.UpdatePageRows="UpdatePageRows",e}({}),bH=function(e){return e.A="ascending",e.D="descending",e}({}),vH=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const yH=[0,0],xH=e=>"number"==typeof e&&!Number.isNaN(+e),SH=e=>xH(e.qNum),wH=e=>"string"==typeof e&&e.length>0&&!Number.isNaN(+e),CH=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,EH=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),RH=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},AH=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:i.gradient?{color:l.color,t:u/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return se(e.localPaletteColors[t].color??"").blend(se(s.color??""),s.t)},IH=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:EH(t,e.value)}))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map((e,t)=>({color:RH(r,t,n)}))),r},MH=(e,t,n,r)=>{const o=IH(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=AH(e,a,t);break}r=i}return n})(o,t);return a},kH=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!xH(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!xH(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},DH=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=kH(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!xH(t))return 0;let a=n&&xH(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},PH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),TH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),qH=F((e,t)=>Yt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Yt.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),Yt.jsx("use",{fillRule:"evenodd"})]})),OH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),LH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),NH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),jH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M2 7.5h12v1H2z"})})),_H=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),zH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),FH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),$H=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),BH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),HH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),VH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),WH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),UH=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),GH={m:BH,"ï":FH,R:UH,S:HH,T:VH,U:WH,P:zH,Q:NH,"è":F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":OH,"©":qH,"23F4":LH,2013:$H,"&":_H,add:PH,"minus-2":jH,dot:TH},KH=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=DH(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return RH(o,n.limitPaletteColorIndex,r);const a=EH(n.limitRange,t);return MH(o,a,n.limitRange,r)})(o,t,i,r),{paletteColors:s}=o.segments,l=i?.limitPaletteColorIndex||0,u=s[l]?.icon??"dot",{indicator:c}=e;let d=c?.position||"right";return"rtl"===n&&(d="right"===d?"left":"right"),{color:a,iconKey:u,position:d}},YH=(hm().palette.primary.light,"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"),XH=4/3,JH="12px",ZH="600",QH="Source Sans Pro, sans-serif",eV={height:"auto",fontSize:JH,lineHeight:"unset",padding:"4px",borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},tV=(e,t)=>"rtl"===e&&"center"!==t.resolvedImagePosition?.horizontal?t.resolvedImagePosition?.horizontal&&(e=>"flex-start"===e?"flex-end":"flex-start")(t.resolvedImagePosition?.horizontal):t.resolvedImagePosition?.horizontal,nV=(e,t)=>e.representation.type===S$.Image&&"fitHeight"===e.representation.imageSize?tV(t,e.representation):e.align,rV=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",oV=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},iV=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,aV=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",sV=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",lV=24,uV=Du("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0})),cV=Du(Sd,{shouldForwardProp:e=>!["textAlign","direction","isPagination"].includes(e)})(({textAlign:e,theme:t,direction:n,isPagination:r})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center",flexDirection:"rtl"===n?rV(e,r):void 0})),dV=Du(Sd,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})(({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:n})=>{const r=e?"24px":"";let o;switch(n){case"left":o={gridTemplateColumns:t?`20px 2fr ${r}`:`1fr ${r}`};break;case"center":{const n=e||t;o={gridTemplateColumns:n?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:n?2:1},[`& .${Um}`]:{gridColumn:3}};break}case"right":o={gridTemplateColumns:t?`${r} 2fr 20px`:`${r} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${Um}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...o}}),pV=Du(Sd,{shouldForwardProp:e=>"rightAligned"!==e})(({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})),fV=Du(Sd,{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"})),hV=Du(Pc,{shouldForwardProp:e=>"hoverBackground"!==e&&"activeBackground"!==e&&"isActive"!==e&&"order"!==e})(({hoverBackground:e,activeBackground:t,isActive:n,order:r})=>({padding:"4px !important",width:"fit-content",height:"auto",background:n?t:void 0,"&:hover":{background:e},color:"inherit",order:r})),mV=$g(),gV=$g(0),bV=$g(0),vV=e=>parseInt(e??eV.fontSize,10)*XH,yV=/<[bius]>/g;const xV=4/3,SV=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function wV(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const CV=(e,t)=>e?{borderBottomColor:bm.DARK_MODE_BORDER,borderRightColor:bm.DARK_MODE_BORDER,borderLeftColor:bm.DARK_MODE_BORDER,borderTopColor:bm.DARK_MODE_BORDER}:{borderLeftColor:bm.BORDER_MEDIUM,borderRightColor:bm.BORDER_MEDIUM,borderTopColor:bm.BORDER_HEAVY,borderBottomColor:t?bm.BORDER_HEAVY:bm.BORDER_LIGHT},EV=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*xV+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},RV=e=>e.components?.find(e=>"theme"===e.key),AV=(e,t,n,r=!1)=>{const o=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),i=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:o,color:SV(n?.fontColor)?wV(bm.TEXT,t,n?.fontColor):i||bm.TEXT,fontSize:n?.fontSize&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...CV(t.background.isDark,r)};return Object.keys(s).forEach(e=>{const t=e;null==s[t]&&delete s[t]}),s};function IV(e,t,n){const r=RV(e)?.header,o=AV("header",t,r,n);return o.background=(e=>{if(void 0===e)return;const t=se(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),o.hoverBackground=xm(o.background??bm.WHITE,eg),o.activeBackground=xm(o.background??bm.WHITE,tg),o}function MV(e,t,n){const r={};let o={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return t?.qValues?.forEach((e,t)=>{const i=e.qText,a=i&&wm(i);a&&(r[n[t]]=a);const s=((e,{boldFontWeight:t,combineDecorations:n=!1})=>{const r=e?.toLowerCase().match(yV),o={},i=new Set;return r?.forEach(e=>{switch(e){case"<b>":o.fontWeight=t;break;case"<i>":o.fontStyle="italic";break;case"<u>":i.add("underline"),o.textDecoration="underline";break;case"<s>":i.add("line-through"),o.textDecoration="line-through"}}),n&&i.size>0&&(o.textDecoration=["underline","line-through"].filter(e=>i.has(e)).join(" ")),Object.keys(o).length>0?o:void 0})(i,{boldFontWeight:ZH,combineDecorations:!0});var l,u;o={...o,...s,textDecoration:(l=o.textDecoration,u=s?.textDecoration,u?l?[...new Set(`${l} ${u}`.split(/\s+/).filter(e=>e&&"none"!==e))].join(" "):u:l)}}),r.cellBackgroundColor&&!r.cellForegroundColor&&(r.cellForegroundColor=vm(r.cellBackgroundColor)),{...e,...r,color:r.cellForegroundColor||e.color,background:r.cellBackgroundColor||e.background,fontStyle:o.fontStyle,fontWeight:o.fontWeight,textDecoration:o.textDecoration}}const kV=25e4,DV=(e,t)=>t.qAttrExps?.qValues?.[e],PV=e=>{const t=Number(e?.qNum);return void 0!==e?.qNum&&Number.isFinite(t)?t:void 0},TV=e=>{const t=e?.qText?.trim();return t&&"ARGB(0,0,0,0)"!==t.toUpperCase()?wm(t)??void 0:void 0},qV=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,OV=5e6,LV=5e5;const NV={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,n){return{key:jV(e),value:jV(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,i))}),t}};function jV(e){try{return decodeURIComponent(e)}catch{return e}}function _V(e){if(!(this instanceof _V))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>NV.fromSearchString(t.search)}})}function zV(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}_V.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},_V.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=zV(t.key),t.value?n+=`=${zV(t.value)}`:n+=t.useEqualSign?"=":"";return n};var FV=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},$V=class{decode(e){let t="";const n=new FV(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const BV=e=>e>=0&&e<=1114111,HV=e=>e.match(/[\s]/);var VV=class extends $V{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(n=i,r=0;r<5&&(o=e.next(),null!=o&&!HV(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const a=parseInt(n,16);return BV(a)?String.fromCharCode(a):"�"}},WV=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},UV=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,i;if(t.length===n)return i=this._value,this.setValue(r),i;const a=t.charAt(n);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return WV.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return WV.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||WV.newInstanceIfNeeded(e,t,this._value)}},GV=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new UV);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const KV=(()=>{const e=[],t=[],n=new GV;let r,o,i;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),n.put(i,String.fromCharCode(o)));return n})();var YV=class extends $V{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,KV.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const i=KV.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&BV(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&BV(r)?String.fromCharCode(r):null}},XV=class extends $V{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(i=parseInt(n,16),BV(i))?String.fromCharCode(i):(e.reset(),null)}};let JV;"undefined"!=typeof document&&(JV=document.createElement("div"));const ZV=Array.prototype.indexOf,QV=[",",".","_"," "],eW=[",",".","-","_"," "],tW={width:["%"],height:["%"]},nW={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},rW={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":nW.image,"background-color":nW.color,"border-color":nW.color,"border-image":nW.image,color:nW.color,icon:nW.image,"list-style-image":nW.image,"outline-color":nW.color},oW={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function iW(e,t,n){let r;if(t){if(ZV)return ZV.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function aW(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return JV.appendChild(n),t=JV.innerHTML,JV.removeChild(n),t}function sW(e,t,n){let r,o,i,a,s,l,u,c,d;for(e=uW(e).toLowerCase(),t=uW(t),i=0;i<oW.attr_name.length;i++)if(e.match(oW.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<oW.attr_val.length;i++)if(t.toLowerCase().match(oW.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=tW[e],r||(r=eW),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&iW(u,r)<0?(d=c.toString(16),o+=`&#x${d};`):o+=u;return n||(o+='"'),o}function lW(e,t,n){let r,o,i,a,s,l,u,c,d,p;if(e=uW(e).toLowerCase(),t=uW(t),iW(e,oW.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<oW.css_val.length;r++)if(t.toLowerCase().indexOf(oW.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=rW[e],o||(o=nW.default),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&iW(u,o)<0?(d=c.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=u;return i}function uW(e,t){let n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new YV,new XV,new VV];for(;!a;){r=n;for(let e=0;e<s.length;e++)i=s[e].decode(n),i!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const cW=[];for(let e=0;e<255;e++)cW[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const dW={html:e=>aW(e.unsafe),css(e){let t,n=[];const r=[],o={};let i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=lW(t,n[t],!0),i+=lW(t,n[t],!0),o[t]=r[t]);return e.map?o:i},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=sW(e,t[e],!0),o+=sW(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function pW(e,t){throw new Error(t)}var fW={canonicalize:uW,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?dW.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&pW(this,"Invalid parameter type"),dW.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&pW(this,"Invalid parameter type"),dW.attr(e)):void pW(this,"Invalid parameter type")},encodeForAttr:sW,encodeForAttr2:function(e){return sW("nonsens",e,!0)},encodeForCSS:lW,encodeForHref:function(e){uW(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new _V(e),n=_V.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+_V.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,i,a,s;for(t||(t=QV),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),iW(o,t)>=0||null==cW[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:aW,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=uW(t).toLowerCase():pW(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=LV,maxByteSizeImage:r=OV}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,n,r]=qV.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,i,a);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const hW=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},mW=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!fW.isSafeDataURL(t))?{type:S$.Text,url:void 0,text:e,labelStructure:o}:{type:S$.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:hW(r,a),labelStructure:o,imageBox:i},gW=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:S$.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:S$.MiniChart,text:r,miniChart:a}},bW=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===w$.Attribute?void 0:n?.urlLabel},vW=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:S$.Link,url:fW.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:S$.Text,url:void 0,text:t,labelStructure:e}}},yW=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,measureMinMax:a,labelStructure:s,getText:l=e=>e.qText,direction:u,enabledFeatures:c})=>{const d=C$(t),p=l(e);return d===S$.Image&&c[S$.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=DV(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),mW({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return mW({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o});const l=DV(n.imageLabel??-1,e)?.qText??r;return mW({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o})}return{type:S$.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,p,u,s):d===S$.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===w$.Attribute){const i=bW(n.url??-1,e,t);return vW({labelStructure:r,text:o||i||"",url:i})}if(i===w$.Dimension){const i=bW(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),vW({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:S$.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,s,p):d===S$.Indicator&&c[S$.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:S$.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,p):d===S$.MiniChart&&c[S$.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?gW(e,t,i,p):d===S$.Bar&&c[S$.Bar]?((e,t,n,r,o)=>{const i={type:S$.Text,text:o},a=PV(e);if(!t||void 0===a)return i;const s=t=>{const r=n[t];return void 0===r||r<0?void 0:DV(r,e)},{barRangeMode:l,barColorMode:u,barLabelColorMode:c}=t,d="manual"===l,p=e=>d&&"number"==typeof e&&Number.isFinite(e)?e:void 0,f={value:a,columnMin:p(t.barRangeMin)??r?.qMin??0,columnMax:p(t.barRangeMax)??r?.qMax??0,isManualRange:d,hasNegativeValues:r?.hasNegativeValues,hasPositiveValues:r?.hasPositiveValues,offsetValue:PV(s("barOffset"))??0,thicknessPx:PV(s("barWidth")),label:s("barLabel")?.qText??o,fallbackLabel:o,color:"expression"===u?TV(s("barColor")):void 0,colorPalette:t.barColor,labelColor:"expression"===c?TV(s("barLabelColor")):void 0,labelColorPalette:t.barLabelColor,barEnd:t.barEnd??"none"};return{type:S$.Bar,text:o,bar:f}})(e,t,n,a,p):{type:S$.Text,url:void 0,text:p,labelStructure:s}},xW=$g(e=>{const t=e(Bb),n=e(Rb);return e(Ab),{qTop:0,qHeight:0,rowPartialHeight:n?.content?.rowPartialHeight??0,visibleTop:n?.content?.visibleTop??t?.visibleTop,visibleHeight:n?.content?.visibleHeight??t?.visibleHeight,scrollLeft:n?.content?.scrollLeft??t?.scrollLeft??0,scrollTopRatio:n?.content?.scrollTopRatio??t?.scrollTopRatio,rowsPerPage:n?.content?.rowsPerPage??t?.rowsPerPage,page:n?.content?.page??t?.page,estimatedRowHeight:n?.content?.estimatedRowHeight??0}}),SW=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),wW=({cId:e})=>e??d$(),CW=["D","T","TS","IV"],EW=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],RW=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],AW=["January","February","March","April","May","June","July","August","September","October","November","December"],IW=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],MW={D:"YYYY-MM-DD",T:"hh:mm:ss",TS:"YYYY-MM-DD hh:mm:ss"},kW=864e5,DW=2**32,PW=e=>{let t=Math.floor(e),n=Math.round((e-t)*kW);n>=kW&&(t+=1,n=0);const r=t-25569,o=r+719468,i=Math.floor(o/146097),a=o-146097*i,s=Math.floor((a-Math.floor(a/1460)+Math.floor(a/36524)-Math.floor(a/146096))/365),l=a-(365*s+Math.floor(s/4)-Math.floor(s/100)),u=Math.floor((5*l+2)/153),c=u<10?u+2:u-10;return{year:s+400*i+(c<=1?1:0),month:c,date:l-Math.floor((153*u+2)/5)+1,day:(r%7+7+3)%7,h:Math.floor(n/36e5),m:Math.floor(n%36e5/6e4),s:Math.floor(n%6e4/1e3),f:n%1e3}},TW=(e,t)=>String(e).padStart(t,"0"),qW=e=>{const[,t]=e.toString().split(".");return t?Number(`0.${t}`):0},OW=/Y+|y+|M+|W+|w+|D+|d+|h+|H+|m+|s+|S+|f+|F+|t{1,2}|T{1,2}/g,LW=(e,t,n)=>{if(Number.isNaN(e)||!Number.isFinite(e))return String(e);let r,o=(n||("IV"===t?MW.T:MW[t])).replace(/\[.+]|\[|]/g,"");"IV"===t?(e<0&&(e=-e,o=`-${o}`),r=((e,t)=>{const n=Math.floor(e);let r=24*qW(e),o=60*qW(r),i=60*qW(o);const a=Math.round(1e3*qW(i));r=Math.floor(r),o=Math.floor(o),i=Math.floor(i),/D+/i.test(t)||(r+=24*n),/h+/i.test(t)||(o+=60*r),/m+/i.test(t)||(i+=60*o);let s=0,l="";if(/w+|t+/i.test(t)){const t=PW(e);s=t.day,l=t.h>=12?"pm":"am"}return{year:0,month:0,day:s,date:n%DW,h:r%DW,m:o%DW,s:i%DW,f:a,t:l}})(e,o)):r=((e,t)=>{const n=PW(e);let r=n.h;return t&&(r%=12,r=r||12),{year:n.year,month:n.month,day:n.day,date:n.date,h:r,m:n.m,s:n.s,f:n.f,t:n.h>=12?"pm":"am"}})(e,/t+/i.test(o));const i=(e=>[[/^(Y+|y+)$/,{Y:`${Number(`${e.year}`.slice(-2))}`,YY:TW(`${e.year}`.slice(-2),2),YYY:TW(`${e.year}`.slice(-3),3),def:t=>TW(`${e.year}`,t.length)}],[/^M+$/,{M:e.month+1,MM:TW(e.month+1,2),MMM:IW[e.month],def:AW[e.month]}],[/^(W+|w+)$/,{W:e.day,WW:TW(e.day,2),WWW:RW[e.day],def:EW[e.day]}],[/^(D+|d+)$/,{def:t=>TW(e.date,t.length)}],[/^(h+|H+)$/,{h:e.h,def:t=>TW(e.h,t.length)}],[/^m+$/,{m:e.m,def:t=>TW(e.m,t.length)}],[/^(s+|S+)$/,{s:e.s,def:t=>TW(e.s,t.length)}],[/^(f+|F+)$/,{def:t=>{const n=`${e.f}`;return n.length>t.length?n.slice(0,t.length):n.padEnd(t.length,"0")}}],[/^(t{1,2}|T{1,2})$/,{def:t=>(t[0].toUpperCase()===t[0]?e.t.toUpperCase():e.t).slice(0,t.length)}]])(r);return o.replace(OW,e=>((e,t)=>{const n=t.find(([t])=>t.test(e))?.[1];if(!n)return"";const r=Object.keys(n).find(t=>"def"!==t&&(t===e||t.toLowerCase()===e)),o=void 0===r?n.def:n[r];return String("function"==typeof o?o(e):o)})(e,i))},NW=/[#0]/,jW={prefix:"",suffix:""},_W=e=>{const t=e.search(NW);if(-1===t)return jW;let n=t;for(let t=e.length-1;t>n;t--)if(NW.test(e[t])){n=t;break}return{prefix:e.slice(0,t),suffix:e.slice(n+1)}},zW=/\B(?=(\d{3})+(?!\d))/g,FW={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y",[-3]:"m",[-6]:"μ",[-9]:"n",[-12]:"p",[-15]:"f",[-18]:"a",[-21]:"z",[-24]:"y"},$W=e=>Number(e.toPrecision(15)),BW=(e,t,n=!1)=>{if(Number.isNaN(e))return String(e);const{qFmt:r,qType:o,qDec:i=".",qThou:a=","}=t??{};if((e=>CW.includes(e))(o))return LW(e,o,r);if(!r)return String(e);const[s,l]=r.split(";"),{suffix:u}=_W(s),c=u.startsWith("A"),d=(c?u.slice(1):u).endsWith("%"),{value:p,siPrefix:f}=((e,t,n)=>{let r=t?$W(100*e):e,o="";if(n&&0!==r&&Number.isFinite(r)){let e=Number(r.toExponential().split("e")[1]);e-=e%3,e in FW&&(o=FW[e],r=$W(r/10**e))}return{value:r,siPrefix:o}})(e,d,c),h=p<0,m=h&&l?l:s,{prefix:g,suffix:b}=_W(m),v=c&&b.startsWith("A")?b.slice(1):b,{decimals:y,useThousands:x}=((e,t,n)=>{const r=e.indexOf(".");let o=0;return-1!==r?o=(e.slice(r+1).match(/[#0]/g)??[]).length:n&&(o=String(Math.abs(t)).split(".")[1]?.length??0),{decimals:Math.min(o,100),useThousands:e.includes(",")}})(m,p,n||"U"===o),[S,w]=Math.abs(p).toFixed(y).split("."),C=x?S.replace(zW,a):S;return`${h&&!l?"-":""}${g}${w?`${C}${i}${w}`:C}${f}${v}`},HW=1e4;function VW(e,t){return[...t].reverse().find(t=>t*e<=HW)||Math.floor(HW/e)}function WW(e,t){if(t?.skipTotals)return{atTop:!1,atBottom:!1};const n=e.qHyperCube.qDimensionInfo.length>0,r=e.qHyperCube.qMeasureInfo.length>0,o=e.qHyperCube.qGrandTotalRow.length>0,i=e.totals?.show,a=e.totals?.position;if(o&&(n&&r||!i&&!n)){if(i||"top"===a)return{atTop:!0,atBottom:!1};if("bottom"===a)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function UW(e,t,n,r){return t?0===n?e.totals?.label??"":"":e.qHyperCube.qGrandTotalRow.at(r)?.qText??""}function GW(e,t){const n=e.qHyperCube.qGrandTotalRow.at(t);return xH(n?.qNum)}function KW(e,t,n,r,o){return e&&!e.auto?r&&"rtl"===o&&"center"!==e.align?{headTextAlign:"right"===e.align?"left":"right",totalsTextAlign:"right"===e.align?"left":"right",bodyTextAlign:"right"===e.align?"left":"right"}:{headTextAlign:e.align,totalsTextAlign:e.align,bodyTextAlign:e.align}:r||"rtl"!==o?{headTextAlign:"N"===t||void 0===t?"right":"left",totalsTextAlign:n?"left":"right",bodyTextAlign:"auto"}:{headTextAlign:"N"===t||void 0===t?"left":"right",totalsTextAlign:n?"right":"left",bodyTextAlign:"auto"}}const YW=(e,t,n,r)=>"auto"!==t?t:r||"rtl"!==n?e?"right":"left":e?"left":"right",XW=(e,t)=>{if(!e)return;const{background:n,foreground:r}=e,o=se(n??""),i=se(r??""),a=t?"getRGB":"getRGBA",s=o.isInvalid()?void 0:o[a](),l=s?xm(s,eg):void 0,u=s?xm(s,tg):void 0;return i.isInvalid()&&void 0!==s?{background:s,color:vm(s),headerMenuHoverBackground:l,headerMenuActiveBackground:u}:{background:s,color:i.isInvalid()?void 0:i.getRGBA(),headerMenuHoverBackground:l,headerMenuActiveBackground:u}};function JW(e,t,n,r,o=()=>!1){const{qDimensionInfo:i,qMeasureInfo:a,qEffectiveInterColumnSortOrder:s}=e.qHyperCube,{colIdx:l,pageColIdx:u,visibleDimInfoIdx:c,visibleMeasureInfoIdx:d}=t,p=i.length,f=l<p,h=f?i[l]:a[l-p],m=f&&i[l].qGrouping===ng.Cyclic,g=l===s[0];let b,v,y,x="",S=!1,w=-1,C=0,E=[];const{representation:R,conditionalColoring:A}=h;if(f&&void 0!==c){const e=h;x=e.qGroupFieldDefs[e.qGroupPos],C=e.qGroupPos,E=e.qGroupFallbackTitles,S=e.qLocked??!1,w=c,({qDimensionType:b}=e)}else({qMiniChart:v}=h),"bar"===R?.type&&(y=(({qMin:e,qMax:t,qAttrExprInfo:n})=>{if("number"!=typeof e||"number"!=typeof t||!Number.isFinite(e)||!Number.isFinite(t))return;const r=n.find(({id:e})=>"barOffset"===e),o=Number.isFinite(r?.qMin)?r?.qMin:0,i=Number.isFinite(r?.qMax)?r?.qMax:0;return{qMin:Math.min(o,o+e),qMax:Math.max(i,i+t),hasNegativeValues:e<0,hasPositiveValues:t>=0}})(h));const{qFallbackTitle:I,textAlign:M,qAttrExprInfo:k,qSortIndicator:D,qReverseSort:P,qApprMaxGlyphCount:T,columnWidth:q,qLibraryId:O,headerColor:L}=h,N=e.nullValueRepresentation?.text,j=!f&&void 0!==N&&wH(N)?BW(CH(N),h.qNumFormat,h.qIsAutoFormat):void 0;return{isDim:f,isCyclic:m,isLocked:S,fieldId:x,colIdx:l,qLibraryId:O,pageColIdx:u,qApprMaxGlyphCount:T,qReverseSort:P,columnWidth:q??{type:Qm.Auto},selectionColIdx:w,isActivelySorted:g,id:wW(h),label:I??"",groupDimensionPos:C,groupDimensionLabels:E,qAttrExprInfoIDs:k.map(e=>e.id),qAttrExprInfoIndex:SW(h),sortDirection:D&&"N"!==D?D:"A",totalInfo:UW(e,f,u,d??-1),...!f&&{isTotalNumeric:GW(e,d??-1)},...KW(M,b,f,n,r),representation:R,conditionalColoring:f?void 0:A,qNumFormat:f?void 0:h.qNumFormat,qIsAutoFormat:f?void 0:h.qIsAutoFormat,formattedNullValueText:j,qMiniChart:v,measureMinMax:y,headerColor:o("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?XW(L,n):void 0}}const ZW=(e,t,n,r=()=>!1)=>{const{qHyperCube:{qColumnOrder:o,qDimensionInfo:i,qMeasureInfo:a}}=e,s=i.length+a.length,l=((e,t,n)=>{const r=t.length,{visible:o,hiddenDim:i,hiddenMea:a}=e.reduce((e,o)=>{const i=o<r,{qError:a}=i?t[o]:n[o-r];return 7005===a?.qErrorCode?i?e.hiddenDim.push(o):e.hiddenMea.push(o):e.visible.push(o),e},{visible:[],hiddenDim:[],hiddenMea:[]});return o.map((e,t)=>{const n=e<r,o=(n?i:a).filter(t=>t<e).length,s=e-o;return{colIdx:e,pageColIdx:t,visibleDimInfoIdx:n?s:void 0,visibleMeasureInfoIdx:n?void 0:s-r}})})(o.length===s?o:Array.from(Array(s).keys()),i,a);return l.map(o=>JW(e,o,t,n,r))},QW=(e,t,n,r)=>e?(r?n.nullValueRepresentation?.dimensionText:void 0)??t.qText??"-":n.nullValueRepresentation?.text??t.qText??"-",eU=(e,t)=>t?-2===e.qElemNumber:!!e.qIsNull,tU={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},nU=$g(e=>{const t=e(rU),n=e(yb),r=e(xW),o=n.qHyperCube.qSize.qcy,i=r.visibleHeight??t.rowsPerPage,a=r.visibleTop??t.page*i,s=r.visibleHeight??Math.min(i,o-a),l=n.qHyperCube.qSize.qcx;return t.page>0&&a>=o?{...t,page:0}:s*l>HW?{...t,rowsPerPage:VW(l,t.rowsPerPageOptions),page:0}:t}),rU=$g(tU),oU=$g(e=>{const t=e(yb),n=e(Bb),r=e(xW);return _b(t,n)?{page:r.page||tU.page,rowsPerPage:r.rowsPerPage||tU.rowsPerPage,rowsPerPageOptions:tU.rowsPerPageOptions}:e(nU)},(e,t,n)=>{t(rU,e=>({...e,...n}))}),iU=!0,aU=e=>-1===e.qElemNumber||!!e.qIsTotalCell,sU=$g(async e=>{const t=e(yb),n=e(Bb),r=e(Fb),{page:o,rowsPerPage:i}=e(oU),a=e(xW),s=e(Gb),l=e(mb),u=e(Sb),c=e(gb),d=t.qHyperCube.qSize.qcx,p=t.qHyperCube.qSize.qcy,f=Math.ceil(p/i),h=a.visibleTop??o*i,m=a.visibleHeight??Math.min(i,p-h),g=p>10,b=WW(t,n),v=ZW(t,iU,r,c),y=l.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),x=c("VNA-977-TABLE-BARS"),S=await(async(e,t,n)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const r=t.qHyperCube.qDataPages.at(0),o=r?.qArea;return r&&o?.qLeft===n.qLeft&&o.qTop===n.qTop&&o.qWidth===n.qWidth&&o.qHeight>=n.qHeight?[{...r,qMatrix:r.qMatrix.slice(0,n.qHeight)}]:e&&"getHyperCubeData"in e?e.getHyperCubeData("/qHyperCubeDef",[n]):[]})(s,t,{qLeft:0,qTop:h,qHeight:m,qWidth:d});u||(a.qTop=h,a.qHeight=m,a.rowsPerPage=i,a.page=o);const w=S.at(0)?.qMatrix.map((e,n)=>{const o=[],i=e.some(aU);return v.forEach((a,s)=>{const u=e[s],c=!a.isDim&&u.qIsNull,d=a.isDim&&eU(u,a.isDim),p=c||d?QW(a.isDim,u,t,y):u.qText,f=c?wH(p):SH(u),g=SH(u)&&!wH(u.qText??"");o[s]={id:d$(),...u,align:YW(f,a.bodyTextAlign,r,iU),rowIdx:n+h,colIdx:a.colIdx,pageRowIdx:n,pageColIdx:s,selectionColIdx:a.selectionColIdx,isSelectable:a.isDim&&!a.isLocked&&!i&&!d,isTotalRow:i,isLastRow:n===m-1,isNumeric:f,isDual:g,isNull:(!c||!f)&&eU(u,a.isDim),qNumFormat:a.qNumFormat,qIsAutoFormat:a.qIsAutoFormat,formattedNullValueText:a.formattedNullValueText,representation:yW({cell:u,representationProperties:a.representation,attrExprInfoIndex:a.qAttrExprInfoIndex,env:l,conditionalColoring:a.conditionalColoring,miniChartOnMeasure:a.qMiniChart,measureMinMax:a.measureMinMax,getText:()=>p,direction:r,enabledFeatures:{[S$.Image]:!0,[S$.Indicator]:!0,[S$.MiniChart]:!0,[S$.Bar]:!a.isDim&&x}})}}),o})??[];return{totalColumnCount:d,totalRowCount:p,totalPages:f,paginationNeeded:g,totalsPosition:b,columns:v,rows:w}}),lU=ZR(sU,e=>e),uU=$g(e=>{const t=e(yb),n=e(Bb),r=e(Tb),o=e(Fb),i=e(gb),a=ZW(t,false,o,i),s=WW(t,n),l=t.qHyperCube.qSize.qcy,u=Math.min(kV,l),c=l>kV&&!!r.active;return{totalsPosition:s,columns:a,rows:[],totalRowCount:l,totalColumnCount:t.qHyperCube.qSize.qcx,totalPages:Math.ceil(l/u),paginationNeeded:c}}),cU={totalsPosition:{atTop:!1,atBottom:!1},columns:[],rows:[],totalRowCount:0,totalColumnCount:0,totalPages:0,paginationNeeded:!1},dU=$g(),pU=$g(e=>{const t=e(Vb),n=e(dU);return n||(t?e(lU)??cU:e(uU))}),fU=$g(e=>e(pU).totalsPosition),hU=$g(e=>e(pU).columns),mU=$g(e=>e(hU).length),gU=$g(e=>e(pU).rows),bU=$g(e=>e(pU).totalRowCount),vU=$g(e=>e(pU).totalColumnCount),yU=$g(e=>e(pU).paginationNeeded),xU=$g(e=>{const t=e(Qb),n=e(nv),r=e(yb),o=e(fU),i=e(gU),a=o.atTop,s=function(e,t,n,r){const o=RV(e)?.content,i=AV("content",t,o);i.background=t.background.color;const a=EV(i.fontSize,n,r),s=o?.hoverColor,l=o?.hoverFontColor,u=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),c=t.getStyle("object","","straightTableV2.content.hover.color"),d=SV(l)||!!c,p=SV(s)||!!u,f=d||p;let h;h=SV(s)?wV(bm.HOVER,t,s):u||(d?"":bm.HOVER);const m=f?wV(vm(h),t,l):"";return{...i,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(r,n,i.length,t),l=IV(r,n,!a),u=function(e,t,n){const r=RV(e)?.content,o=AV("content",t,r),{borderBottomColor:i,borderTopColor:a,background:s}=IV(e,t,n);return{...o,borderBottomColor:i,background:s,borderTopColor:a}}(r,n,a);return{body:s,head:l,totals:u}}),SU=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},wU=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:o}=e.background,i=SU(e,t?.background),a=e.getStyle("","",n);return{backgroundColor:i||r||a,backgroundFromStyling:i,sheetColorFromCSS:o}},CU=(e,t,n,r=bm.WHITE)=>{const{backgroundColor:o,backgroundFromStyling:i,sheetColorFromCSS:a}=wU(e,t,n);return Im(i,o,a,r)??r},EU=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return JH}},RU=e=>e?.some(e=>"italic"===e)?"italic":"normal",AU=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?ZH:"normal",IU=e=>!1===e?1:3,MU=e=>e?.some(e=>"underline"===e)?"underline":"none",kU=$g(e=>{const t=e(Bb),n=e(Vb),r=e(nv),o=e(yb),i=e(xU),a=e(gb),{header:s,dimensionValues:l,measureValues:u,totalValues:c,subTotalValues:d,nullValues:p,dimensionNullValues:f,grid:h,content:m}=RV(o)??{},g=a("VNA-670-SEPARATE_NULL_VALUE_STYLING"),b=n?bm.WHITE:bm.TRANSPARENT,v=CU(r,s,"object.straightTableV2.dimension.label.name.backgroundColor",b),y=t?.maxLineCount??m?.rowHeight??r.getStyle("object.straightTableV2","grid","lineClamp"),x=(g?f:void 0)??p;return{header:{fontFamily:s?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.name","fontFamily")??i.head.fontFamily??QH,fontSize:EU(s?.fontSize??r.getStyle("object.straightTableV2.dimension","label.name","fontSize")??i.head.fontSize),fontStyle:RU(s?.fontStyle),fontWeight:AU(s?.fontStyle,ZH),textDecoration:MU(s?.fontStyle),color:SU(r,s?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.name","color")??i.head.color??bm.TEXT,background:v},headerMenuHoverBackground:xm(v,eg),headerMenuActiveBackground:xm(v,tg),dimension:{values:{fontFamily:l?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??i.body.fontFamily??QH,fontSize:EU(l?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.dimension","label.value","fontSize")??i.body.fontSize),fontStyle:RU(l?.fontStyle),fontWeight:AU(l?.fontStyle,"normal"),textDecoration:MU(l?.fontStyle),color:SU(r,l?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.value","color")??i.body.color??bm.TEXT,background:wU(r,l,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??i.body.background??bm.TRANSPARENT}},measure:{values:{fontFamily:u?.fontFamily??r.getStyle("object.straightTableV2.measure","label.value","fontFamily")??i.body.fontFamily??QH,fontSize:EU(u?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.measure","label.value","fontSize")??i.body.fontSize),fontStyle:RU(u?.fontStyle),fontWeight:AU(u?.fontStyle,"normal"),textDecoration:MU(u?.fontStyle),color:SU(r,u?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.measure","label.value","color")??i.body.color??bm.TEXT,background:wU(r,u,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??i.body.background??bm.TRANSPARENT}},totalRow:{fontFamily:c?.fontFamily??r.getStyle("object.straightTableV2.total","label.value","fontFamily")??i.totals.fontFamily??QH,fontSize:EU(c?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.total","label.value","fontSize")??i.totals.fontSize),fontStyle:RU(c?.fontStyle),fontWeight:AU(c?.fontStyle,ZH),textDecoration:MU(c?.fontStyle),color:SU(r,c?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.total","label.value","color")??i.totals.color??bm.TEXT,background:CU(r,c,"object.straightTableV2.total.label.value.backgroundColor",b)},subTotalRow:{fontFamily:d?.fontFamily??r.getStyle("object.straightTableV2.subTotal","label.value","fontFamily")??i.totals.fontFamily??QH,fontSize:EU(d?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.subTotal","label.value","fontSize")??i.totals.fontSize),fontStyle:RU(d?.fontStyle),fontWeight:AU(d?.fontStyle,ZH),textDecoration:MU(d?.fontStyle),color:SU(r,d?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.subTotal","label.value","color")??i.totals.color??bm.TEXT,background:CU(r,d,"object.straightTableV2.subTotal.label.value.backgroundColor",b)},dimensionNull:{fontStyle:RU(x?.fontStyle),fontWeight:AU(x?.fontStyle,"normal"),textDecoration:MU(x?.fontStyle),color:SU(r,x?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??i.body.color??bm.TEXT,background:SU(r,x?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??bm.NULL_VALUE_BACKGROUND},measureNull:{fontStyle:RU(p?.fontStyle),fontWeight:AU(p?.fontStyle,"normal"),textDecoration:MU(p?.fontStyle),color:SU(r,p?.fontColor)??SU(r,m?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??i.body.color??bm.TEXT,background:SU(r,p?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??bm.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:y??IU(o.multiline?.wrapTextInCells),headerLineClamp:IU(o.multiline?.wrapTextInHeaders),border:SU(r,h?.border)??r.getStyle("object.straightTableV2","grid","borderColor")??(r.background.isDark?bm.DARK_MODE_BORDER:bm.BORDER_MEDIUM),divider:SU(r,h?.divider)??r.getStyle("object.straightTableV2.grid","","divider.borderColor")??bm.BORDER_HEAVY,hoverColors:{color:SU(r,m?.hoverFontColor)??r.getStyle("object.straightTableV2","","grid.hover.color")??i.body.hoverColors?.color,background:SU(r,m?.hoverColor)??r.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??i.body.hoverColors?.background},zebraStripes:{show:!!h?.zebraStripes?.show,odd:{color:SU(r,h?.zebraStripes?.color?.odd),background:SU(r,h?.zebraStripes?.background?.odd)},even:{color:SU(r,h?.zebraStripes?.color?.even),background:SU(r,h?.zebraStripes?.background?.even)},overrideDimNullValueBackground:void 0===SU(r,x?.background),overrideDimNullValueColor:void 0===SU(r,x?.fontColor),overrideMeasNullValueBackground:void 0===SU(r,p?.background),overrideMeasNullValueColor:void 0===SU(r,p?.fontColor)},lastRowBottomBorder:i.body.lastRowBottomBorder},selectedColors:ym(r),contentStaticLineCount:y}}),DU=$g(e=>{const t=e(kU);return Math.max(vV(t.header.fontSize)+8,32)}),PU=$g(e=>{const t=e(kU),n=vV(t.totalRow.fontSize);return Math.max(n+9,24)}),TU=$g(e=>{const t=e(kU),n=e(wb),r=e(Cb);return Math.max(n>0?vV(t.dimension.values.fontSize):0,r>0?vV(t.measure.values.fontSize):0)}),qU=$g(e=>{const t=e(kU),n=e(TU),r=(t.contentStaticLineCount||1)*n;return Math.max(r+9,24)}),OU=$g(e=>{const t=e(kU),n=vV(t.subTotalRow.fontSize),r=(t.contentStaticLineCount||1)*n;return Math.max(r+9,24)}),LU=(e,t,n)=>{if(!e.length)return[];const r=[],o=[];let i=t;if(e.forEach((e,a)=>{const{columnWidth:{type:s,pixels:l,percentage:u},label:c,qApprMaxGlyphCount:d,totalInfo:p}=e;let f=0;const h=()=>{r[a]=Math.min(Zm.PixelsMax,Math.max(Zm.PixelsMin,f)),i-=r[a]};switch(s){case Qm.Pixels:f=(e=>void 0===e||Number.isNaN(+e)?Zm.PixelsDefault:+e)(l),h();break;case Qm.Percentage:f=(e=>void 0===e||Number.isNaN(+e)?Zm.PercentageDefault:+e)(u)/100*t,h();break;case Qm.FitToContent:e.representation?.type===S$.Image?o.push(a):(f=n(c,p,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case Qm.Auto:o.push(a);break;default:throw new Error(`${s} is not a valid column width type`)}}),o.length){const e=i/o.length;o.forEach(t=>{r[t]=Math.max(Zm.AutoMinTable,e)})}return r},NU=$g(e=>{const t=e(kU),n=e(pU).totalsPosition,r=e(Ib),{measureText:o}=e(pH({...t.header,fontWeight:ZH})),{measureText:i}=e(pH({...t.totalRow,fontWeight:ZH})),{estimateWidth:a}=e(pH(t.dimension.values)),{estimateWidth:s}=e(pH(t.measure.values)),l=n.atBottom||n.atTop;return(e,t,n,u,c,d,p)=>{let f;if(r){const t=4;let n=25;n+=t+24,u&&(n+=20+t),c&&(n+=20),f=o(e)+n}else{let t=9;t+=16,p&&(t+=lV),t+=lV,t+=lV,f=o(e)+t}const h=d?a:s;return Math.max(f,l?i(t)+24+1:0,h(n))}}),jU=$g(null),_U=$g(e=>{const t=e(pU),n=e(Zb).width,r=e(bV),o=e(NU);return LU(t.columns,n-r,o)}),zU=$g(e=>e(jU)??e(_U),(e,t,n)=>{t(jU,n)}),FU=CA(e=>{const t=e(hH);!1===e(mV)&&t.emit("done-adjusting-column-width")}),$U=CA((e,t)=>{e(yb),t(jU,null)}),BU=$g(e=>e(zU).reduce((e,t)=>e+t,0)),HU=({children:e})=>(Qg($U),Qg(FU),e);function VU(e){const t=hm();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),cu({...t,direction:e})}const WU={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},UU={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},GU=Du("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...WU},"&::-moz-range-track":{...WU},"&::-ms-track":{...WU},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...UU},"&::-moz-range-thumb":{...UU},"&::-ms-thumb":{...UU},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),KU=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:u,accessibilityRelatedArgs:c,direction:d="ltr"})=>{const p=Hm({translator:c.translator}),f=D({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!u,g=()=>m?f.current.columnWidth-h:"100%",b={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},v=t=>{f.current={initWidth:e,columnWidth:e,initX:t??f.current.initX}};$m(()=>{m&&v()},[e]);const y=e=>{const t=Math.max(e,Zm.PixelsMin);f.current.columnWidth=t,i(t)},x=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:Qm.Pixels,pixels:f.current.columnWidth};a(e)}l?.(!1)},S=e=>{const t="rtl"===d?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;y(t)},w=e=>{Em(e),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),x()},C=e=>{const t="rtl"===d?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;y(t)},E=e=>{Em(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",E),x()},R=!r&&s?e=>{if(e.key===Xm.Left||e.key===Xm.Right){Em(e);const t=5,n=e.key===Xm.Left?t:-t,r="rtl"===d?n:-n;l?.(!0),y(f.current.columnWidth+r)}else e.key===Xm.Space||e.key===Xm.Enter?(Em(e),s(e),l?.(!1),x()):e.key===Xm.Esc&&(Em(e),s(e),l?.(!1),y(f.current.initWidth))}:void 0,A=p.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(c.columnLabel)]);return Yt.jsx(GU,{style:b,hoverColor:o,isLastColumn:n,className:Jm,"data-testid":Jm,onMouseDown:e=>{Em(e),document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),l?.(!0),v(e.clientX)},onDoubleClick:()=>{a({type:Qm.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(Em(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",E),l?.(!0),v(e.touches[0].clientX))},onKeyDown:R,onBlur:s,onFocus:()=>{v()},type:"range",tabIndex:-1,"aria-label":A,"aria-valuemin":Zm.PixelsMin,"aria-valuemax":Zm.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},YU=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),XU=({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null},JU=Du(Sd,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),ZU=Du(YU,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),QU=Du(jf)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),eG=Du(mp)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),tG=Du(Bf)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),nG=Du(Bf,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),rG=Du("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),oG=Du("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),iG=Du(jc)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),aG=Du(cf,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),sG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),lG=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?lG(t):t:e.parentElement?.children?.[0]},uG=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?uG(t):t},cG=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===Xm.Down||t===Xm.Up){const n=e=>t===Xm.Down?lG(e):uG(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},dG=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let pG={};const fG=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:o,enabled:i,subMenus:a,isSubMenu:s,isActive:l,direction:u,isPagination:c})=>{const[d,p]=k(!1),f=w.useRef(null),h=L(e=>{e.stopPropagation(),p(!1)},[p]);return Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs(nG,{ref:a?f:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),pG={}),a?.length&&(p(!0),pG[r]=p,e.stopPropagation()))},disabled:!i,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:cG,children:[l?Yt.jsx(rG,{direction:u,isPagination:c}):null,Yt.jsxs(oG,{children:[Yt.jsx(aG,{direction:u,isPagination:c,children:Yt.jsx(o,{})}),Yt.jsx(iG,{variant:"body2",children:r})]}),a?.length?Yt.jsx(sG,{}):null]},t),a?.length?Yt.jsx(bG,{isSubMenu:!0,open:d,anchorEl:f.current,onClose:h,menuGroups:dG(a,pG),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:c}):null]})},hG=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&Yt.jsx(tG,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>Yt.jsx(fG,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),mG=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((o,i)=>[hG({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?Yt.jsx(eG,{"data-testid":"group-divider",variant:"middle"}):void 0]),gG={appear:0,enter:0,exit:0},bG=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?Yt.jsx(QU,{className:Gm,open:t,anchorEl:e,onClose:n,transitionDuration:gG,MenuListProps:{id:Km},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:mG({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,vG=({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:o,onPopoverClose:i})=>L(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:o,onPopoverClose:i})}},[e,t,n,r?.qStateName,o,i]),yG=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),xG=(e,t)=>e.some(e=>t[e]>0),SG={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},wG=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=k(null),[a,s]=k(SG);return $m(()=>{e||(s(SG),i(null))},[e]),q(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=yG(t,n),u=await r.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};o=c.qInfo?.qId,a?l():(i(u),d&&s((e=>({canSelectAll:xG(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:xG(["qSelected"],e),canSelectPossible:xG(["qOption"],e),canSelectAlternative:xG(["qAlternative"],e),canSelectExcluded:xG(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},CG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),EG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),RG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),AG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),IG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),MG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),kG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),DG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})})),PG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),TG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),qG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),OG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),LG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let NG=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const jG="/qListObjectDef",_G=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[NG.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:CG,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:AG,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:kG,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:FF,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];n[NG.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:DG,enabled:!0}]}]),!e.isLocked&&n[NG.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:LG,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(jG))},icon:PG,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(jG))},icon:OG,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(jG))},icon:TG,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(jG))},icon:qG,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(jG))},icon:EG,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:MG,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:IG,enabled:!0}]}]),o.length>0&&f.push(...o)}return n[NG.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),c?.(u)},icon:RG,enabled:!0}]}]),f},zG=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:u,selectionRelatedArgs:c,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:p,model:f,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:b=Vm})=>{const v=D(null),y=Hm({translator:o}),{qLibraryId:x,fieldId:S,headTextAlign:w}=r,C=c?.app,{fieldInstance:E,selectionActionsEnabledStatus:R}=wG({open:e,headerData:r,app:C,qStateName:c?.qStateName}),A=XU({model:f,headerData:r}),I=vG({qLibraryId:x,fieldId:S,searchRelatedArgs:u,selectionRelatedArgs:c,direction:h}),M=L(e=>{e.stopPropagation(),t(!1)},[t]),k=L(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?Yt.jsxs(JU,{rightAligned:"right"===w,shouldShowMenuIcon:s,className:Um,onClick:!1===g?k:void 0,ref:v,isAccessibleHeader:g,children:[s?Yt.jsx(ZU,{height:b,className:Wm,"data-testid":Wm,isInteractionsActive:i.active??!1,children:Yt.jsx(YU,{})}):null,Yt.jsx(bG,{open:e,anchorEl:!1===g?v.current:n.current,onClose:M,menuGroups:_G({headerData:r,translator:y,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:I,interactions:i,fieldInstance:E,selectionActionsEnabledStatus:R,anchorRef:n,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:A,expandOrCollapseArgs:p}),direction:h,isPagination:m})]}):null},FG=e=>e.isDark?{background:e.color,borderColor:bm.DARK_MODE_BORDER,color:bm.DARK_MODE_TEXT,disabledColor:bm.DARK_MODE_DISABLED,iconColor:bm.DARK_MODE_TEXT}:{background:e.color,borderColor:bm.BORDER_MEDIUM,color:bm.TEXT,disabledColor:bm.DISABLED},$G=Du(Sd,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`})),BG=Du(wh,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),HG=Du(Pd,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),VG=Du(jc)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),WG=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=M(()=>FG(r.background),[r]);if(!n.active)return null;const a=o?Yt.jsx($G,{footerStyle:i,children:e}):null;return t?V.createPortal(e,t):a},UG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),GG=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),KG=P({}),YG=()=>N(KG),XG=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const b=(e=>!e.enabled||e.active)(c)?0:-1,v=M(()=>FG(p.background),[p]),y=o?o.getBoundingClientRect().width:h.width,x=Hm({translator:d}),S=M(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:x,theme:p,interactions:f,rect:h,layout:m,footerStyle:v,tabIndex:b,width:y,visibilityThreshold:g}),[t,n,r,o,i,a,s,l,u,c,x,p,f,h,m,v,b,y,g]);return Yt.jsx(KG.Provider,{value:S,children:e})},JG=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let ZG=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),QG=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const eK=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=YG(),u=0===t.page,c=JG({type:ZG.FirstPage,disabledCondition:u,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(o?.firstPage||QG.FirstPage)?null:Yt.jsx(HG,{...c,disabled:!r.active,children:"rtl"===e?Yt.jsx(GG,{height:Vm}):Yt.jsx(UG,{height:Vm})})},tK=(e,t,n=!1)=>{n&&e.key===Xm.Tab&&!e.shiftKey&&(Em(e),Cm(e.target,t,!1))},nK=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:u,translator:c,tabIndex:d}=YG(),p=t.page>=r-1,f=JG({type:ZG.LastPage,disabledCondition:p,pageNumber:r-1,footerStyle:l,handleChangePage:u,translator:c,interactions:a,tabIndex:d}),h=n.enabled?e=>{tK(e,n,o)}:void 0;return i<=(s?.lastPage||QG.LastPage)?null:Yt.jsx(HG,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?Yt.jsx(UG,{height:Vm}):Yt.jsx(GG,{height:Vm})})},rK=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),oK=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:u,tabIndex:c}=YG(),d=t.page>=r-1,p=JG({type:ZG.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:u,interactions:a,tabIndex:c}),f=!(i>QG.FirstPage&&i>QG.LastPage)&&n.enabled?e=>{tK(e,n,o)}:void 0;return Yt.jsx(HG,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?Yt.jsx(rK,{height:Vm}):Yt.jsx(sG,{height:Vm})})},iK=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:o,translator:i,tabIndex:a}=YG(),s=0===t.page,l=JG({type:ZG.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:o,translator:i,interactions:n,tabIndex:a});return Yt.jsx(HG,{...l,disabled:!n.active,children:"rtl"===e?Yt.jsx(sG,{height:Vm}):Yt.jsx(rK,{height:Vm})})},aK=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:o}=YG(),{page:i,rowsPerPage:a}=n;if(t<=(o?.displayedRowsLabel||QG.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,r)}`,r.toString()]);return Yt.jsx(VG,{variant:"caption",dir:"ltr",children:s})},sK=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=YG(),u=o.qInfo.qId,c=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${u}`,f={tabIndex:s,id:`${d}-${u}`,"data-testid":d,"aria-labelledby":p};return Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs(VG,{variant:"caption",id:p,children:[c,":"]}),Yt.jsx(BG,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},lK=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o,visibilityThreshold:i}=YG();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(i?.rowsPerPage||QG.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=Yt.jsx(Yt.Fragment,{children:e.rowsPerPageOptions.map(e=>Yt.jsx("option",{value:e,children:e},e))});return Yt.jsx(sK,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},uK=1e3,cK="…",dK=({totalPages:e,page:t})=>{const n=Math.min(e,uK),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-uK):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+i;return Yt.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(Yt.jsx("option",{value:cK,disabled:!0,children:cK},"startMoreOptions")),o<e-1&&a.push(Yt.jsx("option",{value:cK,disabled:!0,children:cK},"endMoreOptions")),Yt.jsx(Yt.Fragment,{children:a})},pK=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:o}=YG(),{page:i}=e;if(t<=(o?.selectPage||QG.SelectPage))return null;const a=Yt.jsx(dK,{totalPages:n,page:i});return Yt.jsx(sK,{name:"SelectPage",value:i,options:a,handleChange:e=>{r(+e.target.value)}})};var fK=z(e=>Yt.jsxs(XG,{...e,children:[Yt.jsx(lK,{}),Yt.jsx(pK,{}),Yt.jsx(aK,{}),Yt.jsx(eK,{}),Yt.jsx(iK,{}),Yt.jsx(oK,{}),Yt.jsx(nK,{})]}));const hK=e=>Yt.jsx(WG,{...e,children:Yt.jsx(fK,{...e})}),mK=(e,t,n)=>{const r=n.size,o=r>=t.size;if(r){e({keys:[o?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===r?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",r.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},gK=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},bK=e=>e.ctrlKey||e.metaKey,vK=e=>e.shiftKey&&bK(e),yK=e=>[Xm.Left,Xm.Right,Xm.Up,Xm.Down].includes(e),xK=e=>e.shiftKey&&yK(e.key),SK=e=>(e=>yK(e)||[Xm.Home,Xm.End,Xm.PageUp,Xm.PageDown].includes(e))(e.key)&&!vK(e),wK=(e,t)=>{const{api:n,rows:r,colIdx:o}=e,{cell:i,announce:a,evt:s}=t;let l=new Map;if(-1===o)n?.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;l=new Map(r)}return l=((e,t,n)=>{const{qElemNumber:r,rowIdx:o}=t;return n.ctrlKey||n.metaKey?(new Map).set(r,o):(e.has(r)?e.delete(r):e.set(r,o),new Map(e))})(l,i,s),mK(a,r,l),l.size?(n?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[i.selectionColIdx]]}),{...e,rows:l,colIdx:i.selectionColIdx}):(n?.cancel(),{...e,rows:l,colIdx:-1})},CK=(e,t)=>{const{api:n,rows:r,colIdx:o,pageRows:i,firstCell:a}=e,{cell:s,announce:l,evt:u}=t;if(!(a||"key"in u&&xK(u)))return e;-1===o&&n?.begin(["/qHyperCubeDef"]);const c=((e,t,n,r,o)=>{if(!n.isSelectable)return t;const i=new Map(t);if("key"in r&&xK(r)){i.set(n.qElemNumber,n.rowIdx);const t=r.key===Xm.Down?1:-1,o=e[n.pageRowIdx+t][n.pageColIdx];return o.isSelectable&&i.set(o.qElemNumber,n.rowIdx+t),i}if(!o)return t;const a=Math.min(o.pageRowIdx,n.pageRowIdx),s=Math.max(o.pageRowIdx,n.pageRowIdx);for(let t=a;t<=s;t++){const n=e[t][o.pageColIdx];n.isSelectable&&i.set(n.qElemNumber,n.rowIdx)}return i})(i,r,s,u,a);return mK(l,r,c),{...e,rows:c,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},EK=e=>{const{api:t,rows:n,colIdx:r,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&t?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(n.values()),[r]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},RK=(e,t)=>{switch(t.type){case gH.Select:return wK(e,t.payload);case gH.SelectMouseDown:return((e,{cell:t,mouseupOutsideCallback:n})=>!n||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",n),{...e,firstCell:t,mouseupOutsideCallback:n}))(e,t.payload);case gH.SelectMouseUp:return((e,t)=>EK(e.isSelectMultiValues||e.firstCell!==t.cell?e:wK(e,t)))(e,t.payload);case gH.SelectMultiAdd:return CK(e,t.payload);case gH.SelectMultiEnd:return EK(e);case gH.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case gH.Clear:return e.rows.size?{...e,rows:new Map}:e;case gH.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},AK=$g(e=>{const t=e(Db);return function(e,t){return $g(e,function(e,n,r){n(this,t(e(this),r))})}({pageRows:e(pU).rows,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1},RK)}),IK=$g(e=>e(e(AK)),(e,t,n)=>{t(e(AK),n)}),MK=yM(e=>$g(t=>{const{colIdx:n,rows:r,api:o}=t(IK);return"object"==typeof e&&o?.isModal()?n!==e.selectionColIdx?mH.Disabled:r.has(e.qElemNumber)?mH.Selected:mH.Possible:mH.Inactive}),(e,t)=>"object"!=typeof e||"object"!=typeof t?e===t:e.qElemNumber===t.qElemNumber&&e.selectionColIdx===t.selectionColIdx),kK=$g(e=>{const t=e(BU),n=e(Zb).width,r=e(bV);return t>0&&t+r<n}),DK=()=>{const[e,t]=k(!1);return R_({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?Yt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},PK=(e,{atTop:t,atBottom:n},r)=>({borderLeftColor:e.grid.border,borderRightColor:e.grid.border,borderTopColor:!r&&n?e.grid.divider:e.grid.border,borderBottomColor:r&&!t||!r&&t?e.grid.divider:e.grid.border}),TK=$g(e=>{const t=e(wb),n=e(Kb);if(void 0!==n)return async(e,r)=>{const{isDim:o,colIdx:i,qReverseSort:a,sortDirection:s,isActivelySorted:l}=e,u=o?i:i-t,c=await n.getEffectiveProperties(),{qInterColumnSortOrder:d}=c.qHyperCubeDef,p=[],f=r!==s||l;if(!o){const e=c.qHyperCubeDef.qMeasures.at(u)?.qSortBy;void 0===e?.qSortByNumeric&&p.push({qPath:`/qHyperCubeDef/qMeasures/${u}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}if(!l){const e=[i,...d.filter(e=>e!==i)];p.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${e.join(",")}]`})}f&&p.push({qPath:`/qHyperCubeDef/${o?"qDimensions":"qMeasures"}/${u}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),n.applyPatches(p,!0)}}),qK=e=>{e&&(e.focus(),(e=>{e?.setAttribute("tabIndex","0")})(e))},OK=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),LK=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:o})=>(e<r?e++:t<o&&(t++,e=n),[t,e]),NK=e=>e.atTop?2:1,jK=(e,t)=>({top:e?NK(t):0,bottom:e&&t.atBottom?1:0}),_K=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],zK=e=>e?.setAttribute("tabIndex","0"),FK=e=>e?.setAttribute("tabIndex","-1"),$K=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(FK)},BK=e=>{e?.focus(),zK(e)},HK=e=>{setTimeout(()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${Jm}`);BK(t)},0)},VK=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:o,direction:i})=>{$K(t);const a=((e,t,n,r,o={top:0,bottom:0})=>{const i=o.top>0,a=o.top,s=t.getElementsByClassName("sn-table-row").length-1-o.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[u,c]=n;switch(e.key){case Xm.Down:u<s&&u++;break;case Xm.Up:u>a&&u--;break;case Xm.Right:if(i)break;[u,c]="rtl"===r?OK({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0}):LK({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case Xm.Left:if(i)break;[u,c]="rtl"===r?LK({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):OK({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0});break;case Xm.Home:(bK(e)||i)&&(u=a),i||(c=0);break;case Xm.End:(bK(e)||i)&&(u=s),i||(c=l);break;case Xm.PageDown:u=Math.min(s,u+10);break;case Xm.PageUp:u=Math.max(a,u-10)}return[u,c]})(e,t,n,i,o),s=_K(t,a);return BK(s),((e,t)=>{const n=t.getElementsByClassName("sn-table-container")[0];if(!n?.scrollTo)return;const[r,o]=e;if(r<2)n.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],i=t.getElementsByClassName("sn-table-row")[r].getElementsByClassName("sn-table-cell")[o];if(!i||!e)return;if(i.offsetTop-e.offsetHeight<n.scrollTop){const t=n.scrollTop-i.offsetHeight-e.offsetHeight;n.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),r(a),{nextCell:s,nextCellCoord:a}},WK=(e,t,n,r)=>{$K(t),n(e),r.enabled&&!r.active?r.focus?.():BK(_K(t,e))},UK=(e,t,n)=>{const r=e.currentTarget;if(!r)return;const o=e.relatedTarget??document.activeElement;if(!!o?.closest(`.${Gm}`))return;const i=!!o&&r.contains(o);!n.enabled||t.current||i||(e=>{const t=e.querySelector(`.${vH.First}`),n=e.querySelector(`.${vH.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),((e,t,n)=>{const r=e.currentTarget;if(!n.enabled||t.current||!r)return;const o=e.relatedTarget??document.activeElement;o&&r.contains(o)||n.blur?.(!1)})(e,t,n)},GK=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10M3.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 0zM3 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-1zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0"})})),KK=Du(Fh,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"color"!==e})(({headerStyle:e,interactions:t,hoverBackground:n,background:r,color:o})=>({...eV,...e,cursor:t.active?"pointer":"default",background:r,color:o,verticalAlign:"bottom",boxSizing:"border-box","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?n:r}})),YK=Du("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})(({align:e,dir:t})=>({minWidth:JH,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}})),XK=parseInt(JH,10)/2,JK=Du("div")({position:"absolute",bottom:-XK,left:`calc(50% - ${XK}px)`}),ZK=Du(nm)({position:"sticky",top:0,zIndex:1}),QK={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},eY=Du(Sd)({height:"100%","& .sn-table-cell:focus-visible":{outline:"none",boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"& .sn-table-cell:focus:not(:focus-visible)":{outline:"none"}}),tY=Du("span",{shouldForwardProp:e=>"lineClamp"!==e&&"isHeadCell"!==e&&"isPagination"!==e&&"isNumeric"!==e&&"isDual"!==e})(({lineClamp:e,isHeadCell:t=!1,isPagination:n=!1,isNumeric:r=!1,isDual:o=!1})=>r&&!o||1===e&&!t?{...QK,whiteSpace:"nowrap",display:n?"block":void 0}:{...QK,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"}),nY=Du("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),rY="cell-text",oY=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:o=!1,isDual:i=!1,lineClamp:a})=>{const s=Qg(kU);return o?Yt.jsx(tY,{"data-testid":rY,ref:t,className:"sn-table-cell-text",lineClamp:s.grid.headerLineClamp,isPagination:r,isHeadCell:!0,style:{direction:n?"ltr":void 0},children:e}):Yt.jsx(tY,{"data-testid":rY,ref:t,className:"sn-table-cell-text",isDual:i,isNumeric:n,lineClamp:a??s.grid.contentLineClamp,isPagination:r,style:{direction:n?"ltr":void 0},children:e})},iY=e=>{const{column:t,isInteractionEnabled:n,open:r,setOpen:o,isPagination:i,forwardRef:a}=e,s=Qg(Eb),l=Qg(TK),u=Qg(Fb),c=Qg(Tb),d=Qg(ob),p=Qg(rv),f=Qg(nb),h=Qg(zU)[t.pageColIdx],m=Qg(Gb),g=D(null),b=D(null),v=(({column:e,columnWidth:t})=>{const n=Qg(kU),{measureText:r}=Lm({fontSize:n.header.fontSize,fontFamily:n.header.fontFamily,fontWeight:ZH});let o=!1,i=!1,a=!1;const s=e.isLocked,l=e.isActivelySorted,u=t-25,c=s?20:0,d=l?20:0;let p=r(e.label);return s&&p+c<=u&&(a=!0,p+=c,l&&p+d<=u&&(i=!0,p+=d)),!s&&l&&p+d<=u&&(i=!0,p+=d),p+24<=u&&(o=!0),{shouldShowMenuIcon:o,shouldShowSortIcon:i,shouldShowLockIcon:a}})({column:t,columnWidth:h}),{StartIcon:y,EndIcon:x,LockIcon:S}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},o)=>{const i="A"===e?Yt.jsx(CG,{height:JH,"data-testid":"head-cell-sort-ascending-icon"}):Yt.jsx(AG,{height:JH,"data-testid":"head-cell-sort-descending-icon"}),a=n?Yt.jsx(YK,{align:t,dir:o,children:i}):void 0,s=r?Yt.jsx(pV,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Yt.jsx(GK,{height:JH,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(t,v,u);return Yt.jsxs(dV,{shouldShowMenuIcon:v.shouldShowMenuIcon,shouldShowLockIcon:v.shouldShowLockIcon,alignment:oV(t,i,u),children:[S,Yt.jsxs(cV,{className:"sn-table-head-label",textAlign:t.headTextAlign,direction:u,isPagination:i,children:[y,Yt.jsx(oY,{forwardRef:a,isPagination:i,isHeadCell:!0,children:t.label}),x]}),n?Yt.jsxs(Yt.Fragment,{children:[Yt.jsx(zG,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:g,menuAvailabilityFlags:{[NG.Sorting]:!0,[NG.Searching]:!0,[NG.Selections]:!0,[NG.AdjusterHeaderSize]:!0},open:r,setOpen:o,interactions:c,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),l?.(t,n)??Promise.resolve())},searchRelatedArgs:{embed:d,listboxRef:b},selectionRelatedArgs:{app:f,qStateName:s},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:HK},shouldShowMenuIcon:v.shouldShowMenuIcon,model:m,direction:u,isPagination:i,isAccessibleHeader:!0}),Yt.jsx(uV,{ref:b,direction:u,isPagination:i}),Yt.jsx(uV,{ref:g,direction:u})]}):null]})},aY=F((e,t)=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Yt.jsx("path",{d:"M6 2h10V1H6zm5 5h5V6h-5zm5 5h-5v-1h5zM5 10h1v2.663a3.5 3.5 0 1 0-2.922.036l-.406.914A4.501 4.501 0 1 1 7.329 13H9v1H5z"})})),sY=(e,t)=>e.isCyclic&&t,lY=({column:e})=>{const t=Qg(kU),n=Qg(Fb),r=Qg(Gb),o=w.useRef(null),[i,a]=w.useState(!1),s=XU({model:r,headerData:{...e,dimensionInfoIndex:e.colIdx}});return Yt.jsxs(Yt.Fragment,{children:[Yt.jsx(hV,{hoverBackground:e.headerColor?.headerMenuHoverBackground??t.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??t.headerMenuActiveBackground,isActive:i,tabIndex:-1,onClick:e=>{e.stopPropagation(),a(!0)},children:Yt.jsx(aY,{ref:o,height:16,"data-testid":"head-cell-cyclic-icon"})}),Yt.jsx(bG,{open:i,onClose:()=>{a(!1)},menuGroups:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),a(!1),s?.(n)},enabled:!0,icon:FF,isActive:e.groupDimensionPos===n}))}]],anchorEl:o.current,direction:n,isPagination:!1})]})},uY=e=>e.isLocked,cY=({column:e})=>{const t=Qg(nb),n=Qg(Eb),r=Qg(bb),o=Qg(kU);return Yt.jsx(hV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??o.headerMenuHoverBackground,onClick:o=>{o.stopPropagation(),(async(e,t,n,r={warn:()=>{},error:()=>{}})=>{const o=yG(t??"$",n);let i;try{const t=await(e?.createSessionObject(o));i=t?.id,await(t?.unlock("/qListObjectDef"))}catch(e){r.error({msg:"Failed to unlock field from table header",payload:e})}finally{i&&(await(e?.destroySessionObject(i))||r.error({msg:"Failed to destroy session object when unlocking field from table header"}))}})(t,n,e,r)},children:Yt.jsx(GK,{height:16,"data-testid":"head-cell-lock-icon"})})},dY=({column:e,menuIconRef:t,open:n,setOpen:r})=>{const o=Qg(kU);return Yt.jsx(hV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??o.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??o.headerMenuActiveBackground,isActive:n,order:e.isDim?void 0:-1,onClick:e=>{e.stopPropagation(),r(e=>!e)},ref:t,children:Yt.jsx(YU,{height:16})})},pY=({anchorRef:e,column:t,isPagination:n,listboxRef:r,open:o,setOpen:i})=>{const a=Qg(nb),s=Qg(Fb),l=Qg(ob),u=Qg(Tb),c=Qg(Gb),d=Qg(Eb),p=Qg(rv),f=Qg(TK);return Yt.jsx(zG,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:e,menuAvailabilityFlags:{[NG.Sorting]:!0,[NG.Searching]:!0,[NG.Selections]:!0,[NG.AdjusterHeaderSize]:!0},open:o,setOpen:i,interactions:u,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),f?.(t,n)??Promise.resolve())},searchRelatedArgs:{embed:l,listboxRef:r},selectionRelatedArgs:{app:a,qStateName:d},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:HK},shouldShowMenuIcon:!1,model:c,direction:s,isPagination:n})},fY=$g();fY.onMount=e=>{const t=new Map,n=new ResizeObserver(e=>{for(const n of e){const e=t.get(n.target);e&&e.current(n)}});return e({callbacks:t,observer:n}),()=>{t.clear(),n.disconnect()}};const hY=({ref:e,callback:t})=>{const n=Qg(fY),r=D(t);r.current=t,j(()=>{const t=e.current;return void 0===n?()=>{}:(t&&(n.callbacks.set(t,r),n.observer.observe(t)),()=>{t&&(n.callbacks.delete(t),n.observer.unobserve(t))})},[e,r,n])},mY=Du(Sd)({display:"flex",alignItems:"flex-end",justifyContent:"center",width:"100%",boxSizing:"border-box"}),gY=({children:e})=>{const t=w.useRef(null),[n,r]=k(()=>new Set(e.filter(({props:e})=>void 0!==e.prio&&e.children).map(({key:e})=>e))),o=M(()=>Array.from(e).sort((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)),[e]),i=L(e=>{const t=new Set,n=e.contentBoxSize.at(0)?.inlineSize??0;let i=0;o.forEach(e=>{if(e.props.ignore||!e.props.children)return;const r=e.props.minWidth+1;void 0===e.props.prio||i+r<=n?i+=r:t.add(e.key)}),r(e=>e.size===t.size&&[...e].every(e=>t.has(e))?e:t)},[o]);return hY({ref:t,callback:i}),Yt.jsx(mY,{ref:t,"data-testid":"responsive-container",children:e.filter(e=>!n.has(e.key))})},bY=({children:e})=>e,vY=(e,t)=>!e.isLocked&&e.isDim&&t,yY=({column:e,open:t,setOpen:n})=>{const r=Qg(kU),o=Qg(Eb),i=Qg(Fb),a=Qg(ob);Qg(nb);const s=w.useRef(null),l=L(()=>{n(!1)},[n]),u=vG({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:a,listboxRef:s},selectionRelatedArgs:{qStateName:o},direction:i,onPopoverClose:l});return Yt.jsx(hV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??r.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??r.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),u(),n(!0)},children:Yt.jsx(DG,{ref:s,height:16,"data-testid":"head-cell-search-icon"})})},xY=({column:e})=>{const{sortDirection:t,isActivelySorted:n}=e,r="A"===t?Yt.jsx(UH,{height:JH,"data-testid":"head-cell-sort-ascending-icon"}):Yt.jsx(HH,{height:JH,"data-testid":"head-cell-sort-descending-icon"});return n?Yt.jsx(JK,{children:r}):void 0},SY=0,wY=1,CY=2,EY=3,RY=e=>{const{column:t,open:n,setOpen:r,isPagination:o,forwardRef:i,columnWidth:a,isInteractionEnabled:s}=e,l=Qg(kU),u=Qg(Fb),{measureText:c}=Lm(l.header),[d,p]=k(!1),f=D(null),h=D(null),m=D(null),g="number"==typeof a&&a>Zm.PixelsMin+18;return Yt.jsxs(Yt.Fragment,{children:[Yt.jsxs(gY,{children:[Yt.jsx(bY,{prio:CY,minWidth:lV,children:uY(t)?Yt.jsx(cY,{column:t}):null},"Lock"),Yt.jsx(bY,{prio:wY,minWidth:lV,children:sY(t,s)?Yt.jsx(lY,{column:t}):null},"Cyclic"),Yt.jsx(bY,{ignore:!0,children:Yt.jsx(xY,{column:t})},"Sort"),Yt.jsx(bY,{minWidth:c(t.label)+8,children:Yt.jsx(fV,{justifyContent:t.headTextAlign,children:Yt.jsx(oY,{forwardRef:i,isPagination:o,isHeadCell:!0,children:t.label})})},"Text"),Yt.jsx(bY,{prio:g?void 0:SY,minWidth:lV,children:d||vY(t,s)?Yt.jsx(yY,{open:d,setOpen:p,column:t}):null},"Search"),Yt.jsx(bY,{prio:EY,minWidth:lV,children:s?Yt.jsx(dY,{menuIconRef:m,column:t,open:n,setOpen:r}):null},"Menu")]}),s?Yt.jsxs(Yt.Fragment,{children:[Yt.jsx(uV,{ref:h,direction:u,isPagination:o}),Yt.jsx(uV,{ref:f,direction:u}),Yt.jsx(pY,{anchorRef:m.current?m:f,column:t,isPagination:o,listboxRef:h,open:n,setOpen:r})]}):null]})},AY=Du("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({background:e,applicableStyle:t,color:n})=>({...t,background:e,color:n})),IY=()=>{},MY=({column:e,isPagination:t})=>{const n=Qg(kU),r=Qg(Fb),o=Qg(kK),i=Qg(fU),a=!1,s=Qg(Ib)?iY:RY;return Yt.jsx(AY,{className:"sn-table-cell",applicableStyle:{...n.header,...PK(n,i,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:aV(r,a,o),borderLeftWidth:sV(r,a,o),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:e.headTextAlign,boxSizing:"border-box",flexDirection:"right"===e.headTextAlign?"row-reverse":"row",userSelect:"none",width:"100%"},background:e.headerColor?.background??n.header.background,color:e.headerColor?.color??n.header.color,children:Yt.jsx(s,{column:e,isInteractionEnabled:!1,isPagination:t,open:!1,setOpen:IY})})},kY=({isPagination:e})=>{const t=Qg(hU),[n,r]=k();R_({onDragStart:e=>{const t=e.operation.source?.id;r(t)},onDragEnd:()=>{}});const o=n?t.find(e=>e.id===n):void 0;return o?Yt.jsx(n_,{children:Yt.jsx("div",{style:{background:"white",height:"100%",display:"flex",position:"relative"},children:Yt.jsx(MY,{column:o,isPagination:e})})}):null},DY=$g(async e=>{e(yb);const t=e(Kb),n=await(t?.getEffectiveProperties());return n&&structuredClone(n)}),PY=ZR(DY,e=>e),TY=$g(e=>e(PY)?.qHyperCubeDef),qY=[lj.configure({activationConstraints:[new oj.Distance({value:5})],preventActivation:e=>{const t=e.target;return t instanceof HTMLElement&&t.classList.contains("nebula-table-utils-column-adjuster")}})],OY=kj.plugins.filter(e=>e!==DL),LY=(e,t,n)=>{const r=JSON.stringify(t),o=JSON.stringify(n);if(r!==o)return{qPath:e,qOp:"Replace",qValue:o}},NY=(e,t,n,r,o)=>{if(!e||!t||r===o)return;const i=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:n,visibleColumnIds:r,sourceId:o,targetId:i})=>{const a=p$({qDimensions:e,qMeasures:t}),s=[...e,...t],l=r.findIndex(e=>e===o),u=r.findIndex(e=>e===i);if(l<0||u<0||l===u)return;const c=((e,t,n)=>{const r=[...e],[o]=r.splice(t,1);return r.splice(n,0,o),r})(r,l,u),d=new Map(c.map((e,t)=>[e,t])),p=a.toSorted((e,t)=>{const n=d.get(e.id),r=d.get(t.id);return void 0===n||void 0===r?0:n-r}),f=p.filter(e=>e.isDimension).map(e=>e.def),h=p.filter(e=>!e.isDimension).map(e=>e.def),m=[...f,...h],g=new Map(m.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:f,qMeasures:h,qInterColumnSortOrder:f$({previousColumns:s,nextColumns:m,qInterColumnSortOrder:n}),qColumnOrder:c.map(e=>g.get(e)).filter(e=>void 0!==e)}})({qDimensions:t.qDimensions,qMeasures:t.qMeasures,qInterColumnSortOrder:t.qInterColumnSortOrder,visibleColumnIds:n.map(e=>e.id),sourceId:r,targetId:o});if(!i)return;const a=[LY("/qHyperCubeDef/qDimensions",t.qDimensions,i.qDimensions),LY("/qHyperCubeDef/qMeasures",t.qMeasures,i.qMeasures),LY("/qHyperCubeDef/qInterColumnSortOrder",t.qInterColumnSortOrder,i.qInterColumnSortOrder),LY("/qHyperCubeDef/qColumnOrder",t.qColumnOrder,i.qColumnOrder)].filter(e=>void 0!==e);0!==a.length&&e.applyPatches(a,!0)},jY=({children:e})=>{const t=Qg(Kb),n=Qg(TY),r=Qg(hU);return Yt.jsx(Qj,{onDragOver:e=>{const o=e.operation.source?.id,i=e.operation.target?.id;void 0!==i&&o!==i&&NY(t,n,r,o,i)},sensors:qY,plugins:OY,children:e})};function _Y(e,t){const n=D(!1);q(()=>{n.current?e():n.current=!0},t)}const zY=(e,t)=>{const n=Qg(Ub);q(()=>{const r=e.current;if(!r)return;const o=e=>{UK(e,t,n)};return r.addEventListener("focusout",o),()=>{r.removeEventListener("focusout",o)}},[e,t,n])},FY=$g(yH),$Y=yM(e=>$g(t=>{const[n,r]=t(FY);return 0===n&&r===e})),BY=()=>{const e=Qg(rb);q(()=>{e.notifyIsDoneRendering()})};var HY={SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"de-DE":"Aufsteigend","en-US":"Ascending","es-ES":"Ascendente","fr-FR":"Croissant","it-IT":"Crescente","ja-JP":"昇順","ko-KR":"오름차순","nl-NL":"Oplopend","pl-PL":"Rosnąco","pt-BR":"Crescente","ru-RU":"По возрастанию","sv-SE":"Stigande","tr-TR":"Artan","zh-CN":"升序","zh-TW":"遞增"}},SNTable_Accessibility_ColumnOptions:{id:"SNTable.Accessibility.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбцов","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"de-DE":"Absteigend","en-US":"Descending","es-ES":"Descendente","fr-FR":"Décroissant","it-IT":"Decrescente","ja-JP":"降順","ko-KR":"내림차순","nl-NL":"Aflopend","pl-PL":"Malejąco","pt-BR":"Decrescente","ru-RU":"По убыванию","sv-SE":"Fallande","tr-TR":"Azalan","zh-CN":"降序","zh-TW":"遞減"}},SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um zwischen den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerelementen zu wechseln. Drücken Sie die Leertaste in den Kopfzellen, um das Spaltenmenü zu öffnen, und drücken Sie die Leertaste in den Körperzellen, um eine Auswahl zu treffen. Duch die Auswahl wird der Seiteninhalt aktualisiert. Die vollständige Liste der Navigationssteuerungen finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate between table cells and tab to move to pagination controls. Press space on header cells to open the column menu, press space on body cells to make selections. Selections will cause content on the page to be updated. The full list of navigation controls can be found in the documentation.","es-ES":"Utilice las teclas de flecha para desplazarse entre las celdas de la tabla y la pestaña a fin de pasar a los controles de paginación. Pulse la barra espaciadora en las celdas del encabezado para abrir el menú de columnas; pulse la barra espaciadora en las celdas del cuerpo para realizar selecciones. Las selecciones harán que se actualice el contenido de la página. Encontrará la lista completa de controles de navegación en la documentación.","fr-FR":"Utilisez les touches fléchées pour naviguer parmi les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Appuyez sur la touche Espace dans les cellules d'en-tête pour ouvrir le menu de la colonne. Appuyez sur Espace dans les cellules de corps pour effectuer une sélection. Les sélections actualiseront le contenu de la page. Vous pouvez consulter la liste complète des commandes de navigation dans la documentation.","it-IT":"Utilizzare i tasti freccia per navigare tra le celle della tabella e il tasto TAB per passare ai controlli di paginazione. Premere lo spazio nelle celle dell'intestazione per aprire il menu della colonna; premere lo spazio nelle celle del corpo per effettuare selezioni. Le selezioni determineranno l'aggiornamento del contenuto della pagina. È possibile trovare l'elenco completo dei controlli di navigazione nella documentazione.","ja-JP":"矢印キーで表のセル間を移動し、タブ キーでページネーション コントロールに移動します。ヘッダー セルでスペースを押すと列メニューが開き、ボディ セルでスペースを押すと選択ができます。選択によって、ページのコンテンツが更新されます。ナビゲーション コントロールの全リストは、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 표 셀 사이를 탐색하고, 탭을 사용하여 페이지 번호 컨트롤로 이동하십시오. 헤더 셀에서 스페이스바를 눌러 열 메뉴를 열고, 본문 셀에서 스페이스바를 눌러 선택하십시오. 선택하면 페이지의 콘텐츠가 업데이트됩니다. 전체 탐색 컨트롤 목록은 설명서에서 확인할 수 있습니다.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren tussen tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Druk op de spatietoets in koptekstcellen om het kolommenu te openen, druk op de spatietoets in hoofdtekstcellen om selecties te maken. Door selecties te maken, wordt de inhoud op de pagina bijgewerkt. De volledige lijst met besturingselementen voor navigatie vindt u in de documentatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się między komórkami tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Naciśnij klawisz spacji na komórkach nagłówka, aby otworzyć menu kolumny i naciśnij go na komórkach treści, aby dokonać wyborów. Wybory będą powodować aktualizację zawartości na stronie. Pełną listę nawigacyjnych elementów sterujących można znaleźć w dokumentacji.","pt-BR":"Use as teclas de seta para navegar entre as células da tabela e a tecla Tab para mover para os controles de paginação. Pressione espaço nas células do cabeçalho para abrir o menu da coluna, pressione espaço nas células do corpo para fazer seleções. As seleções farão com que o conteúdo da página seja atualizado. A lista completa de controles de navegação pode ser encontrada na documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения между ячейками таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Нажмите пробел на ячейках заголовка, чтобы открыть меню столбца; нажмите пробел на ячейках тела, чтобы сделать выборки. Выборки приведут к обновлению содержимого страницы. Полный перечень элементов управления навигацией см. в документации.","sv-SE":"Använd piltangenterna för att navigera mellan tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Tryck på mellanslag på rubrikceller för att öppna kolumnmenyn och tryck på mellanslag på innehållsceller för att göra urval. Med urval kommer innehåll på sidan att uppdateras. Den fullständiga listan med navigeringsreglage.","tr-TR":"Tablo hücreleri arasında gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Sütun menüsünü açmak için başlık hücrelerinde boşluğa basın, seçim yapmak için gövde hücrelerinde boşluğa basın. Seçimler, sayfadaki içeriğin güncellenmesine neden olur. Navigasyon kontrollerinin tam listesi belgede bulunabilir.","zh-CN":"使用箭头键在表格单元格之间导航,使用 tab 键移动到分页控件。按标题单元格上的空间打开列菜单,按正文单元格上的空间进行选择。选择将导致页面上的内容更新。导航控件的完整列表可以在文档中找到。","zh-TW":"使用方向鍵以在表格儲存格之間導覽,並使用 Tab 以前往分頁控制。按下標頭儲存格的空白處可開啟欄功能表,按下正文儲存格的空白處可進行選取。選項將會造成更新頁面上的內容。導覽控制的完整清單可見於文件中。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Selecties wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대안 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{1}의 {0}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},SNTable_Pagination_FirstPage:{id:"SNTable.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}}};const VY=$g(e=>{const t=e(rv),n=e(Qb),r=e(bb);let o;return function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(HY).forEach(t=>{e.add(HY[t])})}(t),({keys:e,politeness:i="polite"})=>{const a=e.map(e=>{if(Array.isArray(e)){const[n,...r]=e;return t.get(n,r)}return t.get(e)}).join(" "),s=n.querySelector(`.${vH.First}`),l=n.querySelector(`.${vH.Second}`);if(!s||!l)return void r.error({msg:"could not find aria-live elements, which means accessibility is not working properly"});let u;o===vH.First?(u=l,o=vH.Second):(u=s,o=vH.First),u.innerHTML=u.innerHTML.endsWith(" ")?a:`${a} `,u.setAttribute("aria-live",i)}}),WY=(e,t)=>{const n=Qg(VY),r=Qg(Qb),o=Qg(vU),i=Qg(bU),a=Qg(gU),s=Qg(fU),[l,u]=tb(FY),c=Qg(kb),d=Qg(Ub);_Y(()=>{const t=((e,t,n=!1)=>{const r=[NK(t),e[1]];return n?r:yH})(l,s,c);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:o,keyboard:i,announce:a})=>{if($K(t),o(e),!(e=>!e.enabled||e.active)(i))return;const s=_K(t,e);n.current?(BK(s),n.current=!1):zK(s),r&&(a({keys:[s?.textContent??""]}),gK(a,s,r))})({resetCellCoord:t,rootElement:r,shouldRefocus:e,setFocusedCellCoord:u,isSelectionMode:c,keyboard:d,announce:n})},[a.length,i,o,t])},UY=e=>{Em(e),bK(e)&&ig(e.currentTarget)},GY=e=>{SK(e.evt)&&(Em(e.evt),VK(e))},KY=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:o}=e;if(!SK(t))return;Em(t);const i=((e,t)=>[e.pageRowIdx+NK(t),e.pageColIdx])(r,n),a=jK(o,n),{nextCell:s,nextCellCoord:l}=VK({...e,cellCoord:i,allowedRows:a});l[0]!==i[0]&&(({evt:e,isSelectionsEnabled:t,cell:n,selectionDispatch:r,announce:o,isSelectionMode:i,nextCell:a})=>{e.shiftKey&&t&&n.isSelectable?r({type:gH.SelectMultiAdd,payload:{cell:n,evt:e,announce:o}}):gK(o,a,i)})({...e,nextCell:s})},YY=e=>{const{evt:t}=e;vK(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:o,handleChangePage:i})=>{Em(e);const a=Math.ceil(t/n)-1;e.key===Xm.Right&&r<a?(o(),i(r+1)):e.key===Xm.Left&&r>0&&(o(),i(r-1))})(e):t.key===Xm.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{t.enabled&&!n&&(Em(e),t.blur?.(!0))})(e):yK(t.key)&&Em(t)},XY=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains(mH.Disabled))return void Em(t);const r={...e,isSelectionMode:!!n?.isModal()};switch(t.key){case Xm.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:o})=>{Em(e),t.isSelectable&&n&&r({type:gH.Select,payload:{cell:t,evt:e,announce:o}})})(r);break;case Xm.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{Em(n),e&&(t?.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case Xm.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(Em(n),t?.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case Xm.C:UY(t);break;case Xm.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const o=e.shiftKey||!r;t.enabled&&n&&o&&(Em(e),Cm(e.currentTarget,t,e.shiftKey))})(r);break;default:KY(r)}},JY=e=>{const t=Qg(mV),n=eb(gV),r=eb(bV),o=Qg(hH),i=D();hY({ref:e,callback:a=>{const s=()=>{if(e.current){const e=a.borderBoxSize.at(0)?.inlineSize??0,t=a.borderBoxSize.at(0)?.blockSize??0,o=a.contentBoxSize.at(0)?.inlineSize??0,i=t-(a.contentBoxSize.at(0)?.blockSize??0);r(e-o),n(i)}};t?(i.current&&o.off("done-adjusting-column-width",i.current),o.once("done-adjusting-column-width",s),i.current=s):s()}}),q(()=>{const e=o;return()=>{i.current&&e.off("done-adjusting-column-width",i.current)}},[o])},ZY=Du("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),QY=Du(Vh,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})(({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"})),eX=Du(Mh,{shouldForwardProp:e=>"borderRight"!==e})(({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e})),tX=()=>Yt.jsxs(Yt.Fragment,{children:[Yt.jsx(ZY,{className:vH.First,"data-testid":vH.First,"aria-live":"polite","aria-atomic":"true"}),Yt.jsx(ZY,{className:vH.Second,"data-testid":vH.Second,"aria-live":"polite","aria-atomic":"true"})]}),nX=e=>{const t=D(new Map),n=D(null);q(()=>{n.current=e(t.current),t.current.forEach((e,t)=>{n.current?.observe(t)});const r=t.current,o=n.current;return()=>{o.disconnect(),r.clear()}},[e,n,t]);const r=L((e,r)=>{t.current.set(e,r),n.current?.observe(e)},[t,n]),o=L(e=>{t.current.delete(e),n.current?.unobserve(e)},[n,t]);return M(()=>({addTask:r,removeTask:o}),[r,o])},rX=e=>new ResizeObserver(t=>{t.forEach(t=>{const n=e.get(t.target);n?.(t)})}),oX=()=>nX(rX),iX=({updateShouldRefocus:e,tableWrapperRef:t})=>{const n=Qg(Db),r=Qg(Ub),o=eb(IK);q(()=>{const i=()=>{o({type:gH.Reset})},a=()=>{o({type:gH.Clear})},s=()=>{t.current?.contains(document.activeElement)?e():r.enabled&&r.blur?.(!0),i()};return n?.on("deactivated",i),n?.on("canceled",i),n?.on("confirmed",s),n?.on("cleared",a),()=>{n?.removeListener("deactivated",i),n?.removeListener("canceled",i),n?.removeListener("confirmed",s),n?.removeListener("cleared",a)}},[n,r,o,e,t])},aX="min(50px, 20%)",sX=({bar:e,height:t})=>{const{value:n,offsetValue:r,columnMin:o,columnMax:i,isManualRange:a,thicknessPx:s,barEnd:l}=e,u=a?o:Math.min(o,0);let c=a?i:Math.max(i,0);c>u||(c=u+1);const d=r,p=r+n,f=n>=0,h=Math.min(d,p),m=Math.max(d,p),g=Math.round(((e,t,n)=>Math.max(t,Math.min(n,e)))(s??("none"===l?1*t:4),2,Math.max(2,t-2))),b=Math.min(((e,t)=>"circle"===e?2*t:"box"===e?t+4:0)(l,g),t),v=Math.min(d,p)<u,y=Math.max(d,p)>c,x="none"===l?25:10+("none"===l?0:b/2+2);return{rangeMin:u,rangeMax:c,hasRoomAtMin:e.hasNegativeValues??(a||u<0||!f),hasRoomAtMax:e.hasPositiveValues??(a||i>=0||f),low:h,high:m,valueEnd:f?m:h,growsTowardsHigh:f,overflowMin:v,overflowMax:y,hasBar:m>h&&m>u&&h<c,thicknessPx:g,capSize:b,hasZeroAxis:u<=0&&c>=0,oobSizePx:x}},lX=Du("div")({position:"relative",width:"100%",overflow:"hidden"}),uX=Du("div")({position:"absolute"}),cX=Du("span")({position:"absolute",top:0,height:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),dX=Du("svg")({position:"absolute",display:"block"}),pX=({shape:e,pointsRight:t,width:n,height:r})=>{if("slice"===e)return`M0 0L${n-8} ${r}L0 ${r}ZM8 0L${n} ${r}L${n} 0Z`;const o=n/2,i=o*Math.sin(Math.PI/3),a=t?o/2:1.5*o;return`M${a} ${o-i}L${t?n:0} ${o}L${a} ${o+i}Z`},fX=({height:e,theme:t,bar:n,direction:r,fontFamily:o,fontSize:i})=>{const a=(({bar:e,height:t,isRtl:n})=>{const r=sX({bar:e,height:t}),{rangeMin:o,rangeMax:i,low:a,high:s,overflowMin:l,overflowMax:u,thicknessPx:c,capSize:d,oobSizePx:p}=r,f=r.hasRoomAtMin?aX:"0px",h=r.hasRoomAtMax?aX:"0px",m=f,g=`calc(100% - ${h})`,b=e=>{const t=(Math.min(Math.max(e,o),i)-o)/(i-o);return`calc(${f} + ${t} * (100% - ${f} - ${h}))`},v="none"===e.barEnd,y=v?25:10,x=u?`max(${g} - ${p}px, ${l?m:b(a)})`:b(s),S=l?`min(${m} + ${p}px, ${u?g:b(s)})`:b(a),w=r.growsTowardsHigh?x:S,C=e=>Math.floor((t-e)/2),E=C(c),R=d>0?d/2+4:4,A=e=>{const t=v?c:10;return{key:e,shape:v?"slice":"triangle",pointsRight:"max"===e!==n,width:y,height:t,style:{..."min"===e?{insetInlineStart:f}:{insetInlineEnd:h},top:C(t),width:y,height:t}}};return{zeroAxis:r.hasZeroAxis?{insetInlineStart:`calc(${b(0)} - 0.5px)`,top:0,width:1,height:"100%"}:void 0,bar:r.hasBar?{insetInlineStart:S,width:`max(1px, ${x} - ${S})`,top:E,height:c}:void 0,cap:r.hasBar&&d>0?{insetInlineStart:`calc(${w} - ${d/2}px)`,top:C(d),width:d,height:d,borderRadius:"circle"===e.barEnd?"50%":void 0}:void 0,label:e.label?r.growsTowardsHigh?{insetInlineStart:u?`calc(${g} + 4px)`:l?`max(${x} + ${R}px, ${m} + ${y+4}px)`:`calc(${x} + ${R}px)`,insetInlineEnd:"4px",textAlign:"start"}:{insetInlineStart:"4px",insetInlineEnd:`calc(100% - ${l?`calc(${m} - 4px)`:u?`min(${S} - ${R}px, ${g} - ${y+4}px)`:`calc(${S} - ${R}px)`})`,textAlign:"end"}:void 0,markers:[l?A("min"):void 0,u?A("max"):void 0].filter(e=>void 0!==e)}})({bar:n,height:e,isRtl:"rtl"===r}),s=n.color??Sm(t,n.colorPalette,t.getDataColorSpecials().primary),l=n.labelColor??Sm(t,n.labelColorPalette,"inherit");return Yt.jsxs(lX,{"data-testid":"bar-container",role:"img","aria-label":n.label||n.fallbackLabel,dir:r,style:{height:e},children:[a.zeroAxis?Yt.jsx(uX,{"data-testid":"bar-zero-axis",style:{...a.zeroAxis,backgroundColor:"#d0d0d0"}}):null,a.bar?Yt.jsx(uX,{"data-testid":"bar",style:{...a.bar,backgroundColor:s}}):null,a.cap?Yt.jsx(uX,{"data-testid":"bar-end-cap",style:{...a.cap,backgroundColor:s}}):null,a.label?Yt.jsx(cX,{"data-testid":"bar-label",style:{...a.label,fontFamily:o,fontSize:i??"14px",lineHeight:`${e}px`,color:l},children:n.label}):null,a.markers.map(e=>Yt.jsx(dX,{"data-testid":`bar-oob-${e.key}`,width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,style:e.style,children:Yt.jsx("path",{d:pX(e),fill:s})},e.key))]})},hX=e=>{e.stopPropagation()},mX=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:hX,color:bm.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),gX=({href:e,text:t,interactions:n,color:r})=>Yt.jsx($p,{...mX({href:e,text:t,interactions:n,color:r}),children:t}),bX=window.requestIdleCallback??(e=>setTimeout(()=>{e({})},0)),vX=window.cancelIdleCallback??(e=>{clearTimeout(e)});let yX=0,xX=0,SX=0;const wX="qDimensionInfo/0",CX="qMeasureInfo/0",EX="x",RX="y",AX=e=>({key:"bars",type:"box",data:{extract:{field:wX,props:{start:0,end:{field:CX}}}},settings:{major:{scale:EX},minor:{scale:RX},box:{maxWidthPx:8,fill:{fn:e}}}}),IX=e=>({key:"p",type:"point",data:{extract:{field:wX,props:{y:{field:CX}}}},settings:{x:{scale:EX},y:{scale:RX},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),MX=({qNum:e})=>void 0===e?0:Math.sign(e),kX=(e,t)=>{const{primary:n,nil:r,others:o}=e.getDataColorSpecials(),i=Sm(e,t?.negative,n),a=Sm(e,t?.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:wX,props:{start:0,end:{field:CX,value:MX}}}},settings:{major:{scale:EX},minor:{scale:RX},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?r:-3===e.datum.value?o:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?i:a}}}}},DX=(e,{type:t,showDots:n,colors:r,colorMin:o,colorMax:i})=>{const a=((e,t,n,r)=>{const{primary:o,nil:i,others:a}=e.getDataColorSpecials(),s=Sm(e,t?.main,o),l=Sm(e,t?.max,s),u=Sm(e,t?.min,s),c=Sm(e,t?.first,s),d=Sm(e,t?.last,s);return e=>{const t=RX in e.datum?RX:"end";return-2===e.datum.value?i:-3===e.datum.value?a:e.datum[t].value>=r?l:e.datum[t].value<=n?u:e.data.items.at(0)===e.datum?c:e.data.items.at(-1)===e.datum?d:s}})(e,r,o,i);switch(t){case"bars":return[AX(a)];case"dots":return[IX(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:wX,props:{v:{field:CX}}}},settings:{coordinates:{major:{scale:EX},minor:{scale:RX,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(Sm(e,r?.main,e.getDataColorSpecials().primary));return n?[t,IX(a)]:[t]}case"posNeg":return[kX(e,r)];default:return[]}},PX=e=>({qDimensionInfo:[{qFallbackTitle:"",qCardinal:1}],qMeasureInfo:[{qFallbackTitle:""}],qDataPages:[{qArea:{qTop:0,qLeft:0,qHeight:e.length,qWidth:2},qMatrix:e}],qEffectiveInterColumnSortOrder:[0,1],qSize:{qcx:2,qcy:e.length},qMode:"S"}),TX=(e,t,n,r)=>({y:{data:{field:CX},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:wX}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),qX=K();qX.use(G),qX.renderer.prio(["canvas"]);const OX={resolve:()=>{},promise:{}},LX=({chart:e,element:t,theme:n,isSnapshot:r,direction:o,miniChartData:i,downloadService:a})=>{const{resolveChartPromise:s,addChartPromiseToQueue:l}=(e=>{const t=D(e.isDownloadedAsPDForImage?It():OX);return{addChartPromiseToQueue:L(()=>{e.waitForPromise(t.current.promise)},[e]),resolveChartPromise:t.current.resolve}})(a),u=D(null),c=L(()=>{null!==t.current&&null===e.current&&(l(),u.current=(e=>{const t=performance.now();if(t-yX>50&&(yX=t,xX=0),xX+=1,0===SX&&xX<=20)return e(),()=>{};SX+=1;let n=!1;const r=()=>{n||(n=!0,SX-=1)},o=bX(()=>{r(),e()},{timeout:2e3});return()=>{vX(o),r()}})(()=>{u.current=null,t.current&&(e.current=(({element:e,theme:t,isSnapshot:n,miniChartData:r,onChartRendered:o,direction:i})=>{const{type:a,qMatrix:s,minY:l,maxY:u}=r;return qX.chart({element:e,data:{type:"q",key:"qHyperCube",data:PX(s)},settings:{scales:TX(a,l,u,i),components:DX(t,r),strategy:n?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{o()}})})({element:t.current,theme:n,isSnapshot:r,miniChartData:i,direction:o,onChartRendered:s}))}))},[t,e,l,n,r,i,o,s]);return{renderChartWithRequestIdleCallback:c,safeCancelIdleCallback:L(()=>{u.current?.(),u.current=null,s()},[s])}},NX=e=>{const t=D(null),n=D(!1);return L(r=>{const o=r.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(vX(e.current),e.current=null)})(t),n.current?0!==o?null!==e.current&&(t.current=bX(()=>{e.current?.update()},{timeout:2e3})):n.current=!1:n.current=!0},[e])},jX=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:o,downloadService:i,direction:a})=>{const s=D(null),l=D(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:c}=LX({element:s,chart:l,theme:n,isSnapshot:r,direction:a,miniChartData:o,downloadService:i});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:n,renderChartWithRequestIdleCallback:r,chart:o})=>{const i=L(e=>{e.isIntersecting?r():n()},[r,n]);q(()=>{if(!e.current||!t)return()=>{};const r=e.current;return t.addTask(r,i),()=>{t.removeTask(r),n(),o.current?.destroy(),o.current=null}},[o,e,t,n,i])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:c,renderChartWithRequestIdleCallback:u,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:n,intersectionObserverTaskScheduler:r})=>{q(()=>r?()=>{}:(e(),()=>{t(),n.current?.destroy(),n.current=null}),[r,t,e,n])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:c,renderChartWithRequestIdleCallback:u,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:n})=>{const r=NX(t);q(()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}},[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},_X=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:o,miniChartData:i,downloadService:a,direction:s})=>{const l=jX({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:o,miniChartData:i,downloadService:a,direction:s});return Yt.jsx("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},zX=e=>{let t="center",n="center";return"flex-start"===e?.vertical?t="top":"flex-end"===e?.vertical&&(t="bottom"),"flex-start"===e?.horizontal?n="left":"flex-end"===e?.horizontal&&(n="right"),`${n} ${t}`},FX=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},$X=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const o=Qg(Fb),{url:i,text:a,imageSize:s,resolvedImagePosition:l}=e,u="fitHeight"===s,c=Yt.jsx("img",{src:i,alt:a,style:{...t,width:u?"auto":"100%",height:"100%",maxHeight:n,objectFit:FX(s),objectPosition:zX(l),overflow:"hidden"}});return r?Yt.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:u?n:"100%",overflow:"hidden",display:"flex",justifyContent:u?tV(o,e):void 0},children:c}):c},BX=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&GH[t];return o&&Yt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Yt.jsx(o,{style:{height:e}})})},HX=({representation:e,cellValue:t,paginationCellAlign:n})=>{const r=Qg(kU),o=Qg(Fb),i=Qg(nv),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=KH(e,t,o,i),d=(e=>parseInt(e||JH,10))(r.measure.values.fontSize),{color:p,iconKey:f,position:h}=c||{};return l?Yt.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:n??"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:u?p:void 0},children:["left"===h&&BX({size:d,iconKey:f,color:p}),Yt.jsx(oY,{isNumeric:!0,children:a}),"right"===h&&BX({size:d,iconKey:f,color:p})]}):BX({size:d,iconKey:f,color:p})},VX=(e,t,n)=>e.contentStaticLineCount?t*(n??e.grid.contentLineClamp):t,WX=({forwardRef:e,cell:t,style:n,virtualizedCell:r,lineClamp:o,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const l=Qg(kU),u=Qg(TU),c=Qg(rb),d=Qg(yb),p=Qg(nv),f=Qg(Fb),h=Qg(Tb),m=Qg(kb);if(t.representation.type===S$.Image&&!t.representation.url?.trim())return null;if(t.representation.type===S$.Image)return Yt.jsx($X,{representation:t.representation,textStyle:n,maxImageHeight:VX(l,u,o),wrapInContainer:!r});const g=CH(t.qIsNull?t.representation.text:t.qNum);let b=t.representation;if(t.qIsNull&&t.isNumeric&&!Number.isNaN(g)){const e=t.formattedNullValueText??BW(g,t.qNumFormat,t.qIsAutoFormat);b={...t.representation,text:e}}let v=b.text;return t.representation.type!==S$.Link||m||t.isNull||(v=Yt.jsx(gX,{href:t.representation.url,text:t.representation.text,interactions:h,color:n.cellForegroundColor})),t.representation.type!==S$.Indicator||Number.isNaN(g)?t.representation.type===S$.MiniChart&&t.representation.miniChart&&!t.isNull?Yt.jsx(_X,{height:VX(l,u,o),intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:p,isSnapshot:!!d.snapshotData,direction:f,downloadService:c}):t.representation.type===S$.Bar&&t.representation.bar&&!t.isNull?Yt.jsx(fX,{height:VX(l,u,o),bar:t.representation.bar,theme:p,direction:f,fontFamily:l.measure.values.fontFamily,fontSize:n.fontSize??l.measure.values.fontSize}):Yt.jsx(oY,{forwardRef:e,isDual:t.isDual,isNumeric:t.isNumeric,lineClamp:o,isPagination:!r,children:v}):Yt.jsx(HX,{representation:b,cellValue:g,paginationCellAlign:r?void 0:s})},UX=()=>Yt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"0.75em",height:"0.75em",children:Yt.jsx("path",{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"})}),GX=Du("div")({"& path":{stroke:"none !important"}}),KX=({children:e,cellSelectionState:t,hideTickIcon:n})=>t!==mH.Selected||n?e:Yt.jsxs(nY,{children:[e,Yt.jsx(GX,{children:Yt.jsx(UX,{})})]}),YX=e=>{const t=function(){const e=e_(),t=Nj(()=>null==e?void 0:e.dragOperation.source,[e]),n=Nj(()=>null==e?void 0:e.dragOperation.target,[e]);return{get source(){return t.value},get target(){return n.value}}}();return t.source&&t.source.id!==e?.5:1},XX=(e,t,n,r)=>({handleMouseDown:r=>{e?.(r);const o=r.target;if(t.isSelectable&&"A"!==o.tagName){const e=()=>{n({type:gH.SelectMultiEnd})};n({type:gH.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:gH.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:gH.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),JX=e=>{const t=Qg(yU),n=Qg(fU),r=Qg(VY),o=Qg(Qb),i=Qg(Fb),a=eb(FY),s=eb(IK),l=Qg(Ub),u=Qg(Lb),c=Qg(Db),d=d=>{XY({evt:d,rootElement:o,selectionsAPI:c,cell:e,selectionDispatch:s,isSelectionsEnabled:u,setFocusedCellCoord:a,announce:r,keyboard:l,paginationNeeded:t,totalsPosition:n,direction:i})},p=e=>{((e,t)=>{e.key===Xm.Shift&&t({type:gH.SelectMultiEnd})})(e,s)},f=()=>{((e,t,n,r,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,s=o.atTop?i+2:i+1;WK([s,a],t,n,r)})(e,o,a,l,n)};if(!u)return{onKeyDown:d,onKeyUp:p,onMouseDown:f};const{handleMouseDown:h,handleMouseOver:m,handleMouseUp:g}=XX(f,e,s,r);return{onKeyDown:d,onKeyUp:p,onMouseDown:h,onMouseUp:g,onMouseOver:m}},ZX=e=>{q(()=>()=>{MK.remove(e)},[e])},QX=(e,t,n,r)=>{if(!n.isNull)return e;const o=r?t.dimensionNull:t.measureNull,i={...e,...o};if(!t.grid.zebraStripes.show)return i;const a=r?t.grid.zebraStripes.overrideDimNullValueColor:t.grid.zebraStripes.overrideMeasNullValueColor,s=r?t.grid.zebraStripes.overrideDimNullValueBackground:t.grid.zebraStripes.overrideMeasNullValueBackground;return a&&(i.color=e.color),s&&(i.background=e.background),i},eJ=(e,t,n)=>{const{color:r,background:o}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...o?{background:o}:void 0}},tJ=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return eJ(t,e,r?"even":"odd")}return e},nJ=(e,t)=>{const n=Qg(kU),r=Qg(MK(e)),o=Qg(gb),i=e.isTotalRow&&o("TLV-2303-SUB-TOTALS");ZX(e);let a=t.isDim?n.dimension.values:n.measure.values;a=tJ(a,n,e),a=i?n.subTotalRow:a,a=QX(a,n,e,t.isDim);const s=e.isNull||i&&t.isDim?a:MV(a,e.qAttrExps,t.qAttrExprInfoIDs),l=i?s:function(e,t,n){return t===mH.Selected?{...e,...n}:t===mH.Disabled?{...e,background:`${YH}, ${e.background}`}:e}(s,r,n.selectedColors);return{cellStyle:{...l,borderColor:n.grid.border},representationStyle:s,cellSelectionState:r}},rJ=Du(Lh,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})(({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}})),oJ=Du(nm,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e&&"height"!==e})(({hover:e,hoverColors:t,height:n})=>({height:n,"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}})),iJ=Du(Fh,{shouldForwardProp:e=>"cellStyle"!==e})(({cellStyle:e,theme:t})=>({...eV,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",boxSizing:"border-box",width:"100%",height:"100%"})),aJ=Du(Fh,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})(({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...eV,...e,fontWeight:ZH,position:"sticky",padding:r.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t?n:void 0,bottom:t?void 0:0,verticalAlign:t?"bottom":"top",boxSizing:"border-box",zIndex:t?1:void 0})),sJ=({cell:e,column:t,columnIndex:n,intersectionObserverTaskScheduler:r,resizeObserverTaskScheduler:o})=>{const i=Qg(Fb),a=Qg(Tb),{onKeyDown:s,onKeyUp:l,onMouseDown:u,onMouseUp:c,onMouseOver:d}=JX(e),{cellStyle:p,representationStyle:f,cellSelectionState:h}=nJ(e,t),m=YX(t.id);return Yt.jsx(iJ,{cellStyle:{...p,opacity:m},scope:0===n?"row":void 0,component:0===n?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${h} ${Ym}`,title:a.passive?e.representation.text:void 0,onKeyDown:s,onKeyUp:l,onMouseDown:u,onMouseUp:c,onMouseOver:d,children:Yt.jsx(KX,{cellSelectionState:h,hideTickIcon:!!e.isTotalRow,children:Yt.jsx(WX,{cell:e,style:f,intersectionObserverTaskScheduler:r,resizeObserverTaskScheduler:o,paginationCellAlign:iV(i,e.align)})})})},lJ=$g(0),uJ=({column:e,totalsPosition:t,onKeyDown:n,onMouseDown:r})=>{const o=Qg(kU),i=Qg(Ob),a=Qg(lJ),s=YX(e.id);return Yt.jsx(aJ,{totalsStyle:{...o.totalRow,...PK(o,t,!1),opacity:s},headRowHeight:a,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${Ym}`,tabIndex:-1,title:i?e.totalInfo:void 0,onKeyDown:n,onMouseDown:r,children:Yt.jsx(oY,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},cJ=()=>{const e=Qg(fU),t=Qg(hU),n=Qg(gU),r=Qg(Qb),o=Qg(qb),i=Qg(Fb),a=eb(FY),s=Qg(kb),l=Qg(Ub);return Yt.jsx(nm,{className:"sn-table-row sn-table-totals-row",children:t.map((t,u)=>{const c=[e.atTop?1:n.length+1,u];return Yt.jsx(uJ,{column:t,totalsPosition:e,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case Xm.C:UY(n);break;case Xm.Space:n.preventDefault();break;default:GY(e)}else Em(n)})({evt:e,rootElement:r,cellCoord:c,setFocusedCellCoord:a,isSelectionMode:s,isInteractionEnabled:o,direction:i})},onMouseDown:()=>{WK(c,r,a,l)}},t.id)})})};var dJ=z(cJ);const pJ=({updateShouldRefocus:e,tableWrapperRef:t})=>{const n=Qg(gU),r=Qg(fU),o=Qg(hU),i=Qg(kU),a=Qg(qU),s=Qg(OU),l=Qg(yb),u=!!RV(l)?.content?.hoverEffect;iX({updateShouldRefocus:e,tableWrapperRef:t});const c=(e=>{const t=L(t=>new IntersectionObserver(e=>{e.forEach(e=>{const n=t.get(e.target);n?.(e)})},{root:e.current}),[e]);return nX(t)})(t),d=oX();return Yt.jsxs(rJ,{lastRowBottomBorder:i.grid.lastRowBottomBorder,children:[r.atTop?Yt.jsx(dJ,{}):void 0,n.map((e,t)=>{const n=e.at(0)?.isTotalRow??!1;return Yt.jsx(oJ,{hoverColors:i.grid.hoverColors,hover:u,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:n?s:a,children:o.map((t,n)=>{const{id:r}=t,o=e[n];return Yt.jsx(sJ,{columnIndex:n,cell:o,column:t,intersectionObserverTaskScheduler:c,resizeObserverTaskScheduler:d},r)})},`row-${t}`)}),r.atBottom?Yt.jsx(dJ,{}):void 0]})};var fJ=z(pJ);const hJ=(e,t)=>!!e?.skipHeader||!!t.hideHeader,mJ=$g(e=>{const t=e(yb),n=e(Gb);if(n)return(e,{isDim:r,colIdx:o})=>{const i=r?o:o-t.qHyperCube.qDimensionInfo.length,a=`/qHyperCubeDef/${r?"qDimensions":"qMeasures"}/${i}/qDef/columnWidth`,s=t.qHyperCube[r?"qDimensionInfo":"qMeasureInfo"].at(i)?.columnWidth,l=s?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...s,...e})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(e)};n.applyPatches([l],!0)}}),gJ=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:o,label:i}=e,a=Qg(mJ),s=Qg(Fb),l=Qg(qb),u=Qg(rv),[c,d]=tb(zU);if(!l)return null;return Yt.jsx(KU,{columnWidth:c.at(o)??0,isLastColumn:t,keyValue:`adjuster-${o}`,updateWidthCallback:e=>{n?.();const t=[...c];t[o]=e,d(t)},confirmWidthCallback:t=>{a?.(t,e)},handleBlur:e=>{(e=>{FK(e);const t=e.closest(".sn-table-cell");BK(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:u,columnLabel:i},direction:s})},bJ=e=>e.target?.getAttribute("class")?.includes(Jm),vJ=({isInteractionEnabled:e,column:t})=>{const[n,r]=k(!1),o=Qg(TK),i=Qg(mV);return{open:n,setOpen:r,handleOpenMenu:t=>{!e||bJ(t)||i||r(!0)},toggleSortOrder:n=>{e&&!bJ(n)&&!i&&(e=>null!==e.target.closest(".sn-table-cell"))(n)&&(n.stopPropagation(),o?.(t,"A"===t.sortDirection?"D":"A"))}}};var yJ=class extends ZT{constructor(e,t){super(e,t),this.boundingRectangle=ek(null),this.destroy=ck(()=>{if(!this.options)return;const{dragOperation:t}=e,{status:n}=t;if(n.initialized){const{element:e}=this.options,n="function"==typeof e?e(t):e;if(!n)return;let r;const o=()=>{this.boundingRectangle.value=pq(n)},i=()=>{r||(r=setTimeout(()=>{o(),r=void 0},25))},a=new ResizeObserver(o);return a.observe(n),document.addEventListener("scroll",i,{passive:!0,capture:!0}),()=>{document.removeEventListener("scroll",i,{capture:!0}),a.disconnect(),this.boundingRectangle.value=null}}})}apply(e){const{shape:t,transform:n}=e;if(!t)return n;const r=this.boundingRectangle.value;if(!r)return n;const{initial:o,current:i}=t,{height:a,width:s}=i.boundingRectangle,l=o.center.x-s/2,u=o.center.y-a/2,c=function(e,t,n){const r=F_({},t);return e.boundingRectangle.top+t.y<=n.top?r.y=n.top-e.boundingRectangle.top:e.boundingRectangle.bottom+t.y>=n.top+n.height&&(r.y=n.top+n.height-e.boundingRectangle.bottom),e.boundingRectangle.left+t.x<=n.left?r.x=n.left-e.boundingRectangle.left:e.boundingRectangle.right+t.x>=n.left+n.width&&(r.x=n.left+n.width-e.boundingRectangle.right),r}(new DD(l,u,s,a),n,r);return c}};yJ.configure=mP(yJ);const xJ=({invert:e})=>({dragOperation:t,droppable:n})=>{if(!n.shape)return null;const{shape:r}=t;if(!r)return null;const o=function(e){return e.sortable?.index}(n);if(void 0===o)return null;const i=function(e){return e.source.index}(t);if(void 0===i)return null;if(i===o)return null;const a=i<o!==e?"right":"left",{center:s,boundingRectangle:l}=r.current;return"left"===a&&l.left+.3*l.width<=n.shape.center.x||"right"===a&&l.right-.3*l.width>=n.shape.center.x?{id:n.id,value:1/kD.distance(n.shape.center,s),type:AT.Collision,priority:RT.Normal}:null},SJ=[yJ.configure({element:e=>{const t=e.activatorEvent?.target;return t instanceof HTMLElement?t.closest(".sn-table-head-row"):null}})],wJ=(e,t)=>{const n=Qg(Fb),r=!Qg(jb);return rF({id:e.id,disabled:r,index:t,type:"item",accept:"item",group:"column",modifiers:SJ,data:e,plugins:e=>[...e,AN.configure({feedback:"clone"})],collisionDetector:xJ({invert:"rtl"===n})})},CJ=({column:e,columnIndex:t,columnsLength:n})=>{const r=Qg(kU),o=Qg(Qb),i=Qg(Fb),a=Qg(Tb),s=Qg(hU),l=Qg(fU),u=Qg(zU)[t],c=eb(FY),d=Qg($Y(t)),p=Qg(jb),f=Qg(Ub),{open:h,setOpen:m,handleOpenMenu:g,toggleSortOrder:b}=vJ({isInteractionEnabled:p,column:e}),v=eb(mV),{ref:y,isDragging:x}=wJ(e,t),S=YX(e.id),w=Qg(Ib),C=w?iY:RY,E=e.isActivelySorted?bH[e.sortDirection]:void 0,R=h?Km:void 0,A=h?"true":void 0,I=t===n-1,M=[0,e.pageColIdx],k={width:u,zIndex:s.length-t},D=d&&0===t&&!f.enabled&&p?0:-1;return Yt.jsxs(KK,{"data-dragging":x,ref:y,headerStyle:{...r.header,...PK(r,l,!0),opacity:S},background:w&&h?e.headerColor?.headerMenuActiveBackground??r.headerMenuActiveBackground:e.headerColor?.background??r.header.background,hoverBackground:e.headerColor?.headerMenuHoverBackground??r.headerMenuHoverBackground,color:e.headerColor?.color??r.header.color,interactions:a,style:k,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${Ym}`,tabIndex:D,title:a.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:n,handleOpenMenu:r}=e;if(t)switch(n.key){case Xm.C:UY(n);break;case Xm.Enter:case Xm.Space:r?.(n);break;default:GY(e)}else Em(n)})({evt:e,rootElement:o,cellCoord:M,setFocusedCellCoord:c,isInteractionEnabled:p,handleOpenMenu:g,direction:i})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:o,isInteractionEnabled:i})=>{e.preventDefault(),i&&WK(n,t,r,o)})({evt:e,rootElement:o,cellCoord:M,setFocusedCellCoord:c,keyboard:f,isInteractionEnabled:p})},onClick:w?g:b,"aria-sort":E,"aria-controls":R,"aria-expanded":A,"aria-haspopup":"true",children:[Yt.jsx(C,{column:e,isInteractionEnabled:p,open:h,setOpen:m,isPagination:!0,columnWidth:u}),Yt.jsx(gJ,{column:e,isLastColumn:I,setIsAdjustingWidth:v})]},e.id)},EJ=()=>{const e=Qg(hU),t=Qg(kU),n=Qg(yb),r=Qg(Bb),o=eb(lJ),i=Qg(zU),a=D(null),s=hJ(r,n);return q(()=>{a.current&&o(a.current.getBoundingClientRect().height)},[t.header.fontSize,i,o,s]),Yt.jsx(Xh,{style:{visibility:s?"collapse":void 0},children:Yt.jsx(ZK,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map((t,n)=>Yt.jsx(CJ,{column:t,columnIndex:n,columnsLength:e.length},t.id))})})};var RJ=z(EJ);var AJ=z(()=>{const e=Qg(VY),[t,n]=tb(oU),{page:r,rowsPerPage:o}=t,i=Qg($b),{totalColumnCount:a,totalRowCount:s,totalPages:l,paginationNeeded:u,rows:c,columns:d}=Qg(pU),p=Qg(kU),f=Qg(xW),h=Qg(yb),m=Qg(nv),g=Qg(Zb),b=Qg(Qb),v=Qg(Bb),y=Qg(Fb),x=Qg(Tb),S=Qg(rv),w=Qg(kK),C=eb(IK),E=Qg(kb),R=Qg(Ub),A=D(!1),I=D(null),M=D(null),k=`${S.get("SNTable.Accessibility.RowsAndColumns",[String(c.length),String(d.length)])} ${S.get("SNTable.Accessibility.NavigationInstructions")}`,P=_b(h,v),T=P?f.scrollLeft??0:0,O=P?f.rowPartialHeight??0:0,N=L(()=>{A.current=b.getElementsByTagName("table")[0].contains(document.activeElement)},[b]),j=L(r=>{n({...t,page:r}),e({keys:[["SNTable.Pagination.PageStatusReport",(r+1).toString(),l.toString()]],politeness:"assertive"})},[t,n,l,e]),_=L(r=>{n({...t,page:0,rowsPerPage:r}),e({keys:[["SNTable.Pagination.RowsPerPageChange",r.toString()]],politeness:"assertive"})},[e,t,n]);return(e=>{const t=Qg(Fb),n=Qg(xW);q(()=>{const r=e.current;if(!r)return;const o=e=>{((e,t,n)=>{if(0===e.deltaX)return;e.stopPropagation();const r=n.scrollWidth-n.offsetWidth,{scrollLeft:o}=n;let i=o+e.deltaX;t&&(i=r+i),r>0&&(i<0||i>r+1)&&e.preventDefault()})(e,"rtl"===t,r)},i=e=>{n.scrollLeft=e.currentTarget?.scrollLeft||0};return r.addEventListener("wheel",o),r.addEventListener("scroll",i),()=>{r.removeEventListener("wheel",o),r.removeEventListener("scroll",i)}},[e,t,n])})(I),zY(M,A),(()=>{const e=Qg(Qb),t=Qg(Ub),n=Qg(FY);$m(()=>{const r=_K(e,n);t.active?BK(r):(r?.blur(),$K(e))},[t.active,e])})(),WY(A,r),q(()=>{const e=I.current;e&&(e.scrollLeft=T,e.scrollTop=O)},[t,s,T,O]),_Y(()=>{C({type:gH.UpdatePageRows,payload:{pageRows:c}})},[c]),BY(),JY(I),Yt.jsxs(jY,{children:[Yt.jsxs(eY,{ref:M,dir:y,onKeyDown:e=>{YY({evt:e,totalRowCount:s,page:r,rowsPerPage:o,handleChangePage:j,updateShouldRefocus:N,keyboard:R,isSelectionMode:E})},"data-testid":"sn-table",children:[Yt.jsx(tX,{}),Yt.jsxs(QY,{ref:I,className:"sn-table-container",fullHeight:!!i||!x.active||!u,interactions:x,tabIndex:-1,role:"application","data-testid":"table-container",children:[Yt.jsxs(eX,{stickyHeader:!0,"aria-label":k,borderRight:w?`1px solid ${p.grid.border}`:void 0,children:[Yt.jsx(RJ,{}),Yt.jsx(fJ,{updateShouldRefocus:N,tableWrapperRef:M})]}),Yt.jsx(DK,{})]}),Yt.jsx(hK,{footerContainer:i,pageInfo:t,paginationNeeded:u,theme:m,totalRowCount:s,totalColumnCount:a,totalPages:l,keyboard:R,translator:S,interactions:x,rect:g,layout:h,handleChangePage:j,handleChangeRowsPerPage:_,isSelectionMode:E,direction:y})]}),Yt.jsx(kY,{isPagination:!0})]})});const IJ=$g(0),MJ=$g(e=>{const t=e(xb);return Math.min(kV,t)}),kJ=$g(e=>{const t=e(xb);return t===kV?0:Math.floor(t/kV)}),DJ=$g(e=>{const t=e(IJ),n=e(kJ);return Math.min(t,n)}),PJ=$g(e=>({page:e(DJ),rowsPerPage:e(MJ),rowsPerPageOptions:[]}),(e,t,n)=>{const r=e(kJ);t(IJ,Math.max(0,Math.min(n,r)))}),TJ=$g(null),qJ=$g(null),OJ=$g(e=>{const t=e(PJ),n=e(xb);return Math.min(t.rowsPerPage,n-t.page*t.rowsPerPage)}),LJ=$g(null),NJ=$g(null),jJ=$g(e=>e(fU).atTop?2:1),_J=$g(e=>e(fU).atTop?1:e(jJ)+e(OJ)),zJ=$g(e=>jK(Boolean(e(kb)),e(fU))),FJ=$g(e=>({firstBodyRowIdx:e(jJ),totalsRowIdx:e(_J),allowedRows:e(zJ)})),$J=$g(e=>({rootElement:e(Qb),totalsPosition:e(fU),rowCount:e(OJ),colCount:e(mU),columnWidths:e(zU)})),BJ=$g(e=>({scrollToCell:e(LJ),scrollableContainerElement:e(NJ)})),HJ=$g(e=>({keyboard:e(Ub),isInSelectionMode:e(kb),selectionsAPI:e(Db),isSelectionsEnabled:e(Lb)})),VJ=$g(e=>({direction:e(Fb),isInteractionEnabled:e(jb),paginationNeeded:e(yU),announce:e(VY),shouldRefocusRef:e(TJ)})),WJ=10,UJ=e=>e.atTop?2:1,GJ=(e,[t,n],r,o)=>{const i=UJ(r);if(0===t)return e.querySelector(`.sn-table-head-row [data-col="${n}"]`);if(r.atTop&&1===t)return e.querySelector(`.sn-table-totals-row [data-col="${n}"]`);const a=t-i;return a>=0&&a<o?e.querySelector(`.sn-table-body .sn-table-cell[rowindex="${a}"][columnindex="${n}"]`):e.querySelector(`.sn-table-totals-row [data-col="${n}"]`)},KJ=(e,t,n,r,o,i,a,s,l)=>{if(!e)return l(!1),()=>{};const[u,c]=n,d=u-UJ(r),p=d>=0&&d<o;let f=a,h=!1,m=null;const g=()=>h||s&&!s(),b=()=>{g()||(p&&e(d,c),m=requestAnimationFrame(()=>{if(g())return;const e=((e,t)=>{if(!e||!t)return!1;const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom&&n.left>=r.left&&n.right<=r.right})(GJ(t,n,r,o),i);if(!e)return f>0?(f-=1,void b()):void l(!1);l(!0)}))};return b(),()=>{h=!0,null!==m&&cancelAnimationFrame(m)}},YJ=(e,t,n,r,o,i)=>e<i?[t,e+1]:t<r?[t+1,o]:[t,e],XJ=(e,t,n,r,o,i)=>e>o?[t,e-1]:t>n?[t-1,i]:[t,e],JJ=(e,[t,n],r,o,i,a={top:0,bottom:0},s)=>{const l=a.top>0,u=a.top,c=r-1-a.bottom,d=o-1;switch(e.key){case Xm.Down:case Xm.Up:t=((e,t,n,r)=>e===Xm.Down&&t<r?t+1:e===Xm.Up&&t>n?t-1:t)(e.key,t,u,c);break;case Xm.Right:l||([t,n]=((e,t,n,r,o,i,a)=>"rtl"===a?XJ(e,t,n,0,o,i):YJ(e,t,0,r,o,i))(n,t,u,c,0,d,i));break;case Xm.Left:l||([t,n]=((e,t,n,r,o,i,a)=>"rtl"===a?YJ(e,t,0,r,o,i):XJ(e,t,n,0,o,i))(n,t,u,c,0,d,i));break;case Xm.Home:l?t=Math.max(u,t-WJ):(bK(e)&&(t=u),n=0);break;case Xm.End:l?t=Math.min(c,t+WJ):(bK(e)&&(t=c),n=d);break;case Xm.PageDown:t=Math.min(c,t+WJ);break;case Xm.PageUp:if(l)t=Math.max(u,t-WJ);else{const e=s?UJ(s):1,n=t-e;t=n>0&&n<=WJ?e:Math.max(u,t-WJ)}}return[t,n]},ZJ=e=>{((e,t)=>{e.querySelectorAll(t).forEach(e=>{e.setAttribute("tabIndex","-1")})})(e,".sn-table-cell[tabindex='0']")},QJ=[Xm.Home,Xm.End,Xm.PageUp,Xm.PageDown],eZ=()=>{const e=D(!1),t=D(0),n=D(0),r=D(null),o=D(null),i=D(null),a=D(0),s=eb(FY),l=eb(IK),u=Qg(gb)("VNA-700-KEYBOARD_NAV_VIRTUALIZED_STRAIGHT_TABLE"),{rootElement:c,totalsPosition:d,rowCount:p,colCount:f,columnWidths:h}=Qg($J),{firstBodyRowIdx:m,allowedRows:g,totalsRowIdx:b}=Qg(FJ),{scrollToCell:v,scrollableContainerElement:y}=Qg(BJ),{keyboard:x,isInSelectionMode:S,selectionsAPI:w,isSelectionsEnabled:C}=Qg(HJ),{direction:E,announce:R,isInteractionEnabled:A,paginationNeeded:I,shouldRefocusRef:k}=Qg(VJ),P=M(()=>(e=>{const t=new Array(e.length+1);t[0]=0;for(let n=0;n<e.length;n++)t[n+1]=t[n]+(e[n]??0);return t})(h),[h]);q(()=>()=>{t.current+=1,n.current+=1,a.current+=1,r.current?.(),r.current=null,o.current?.(),o.current=null,i.current?.(),i.current=null},[]);const T=L((e,t,n,r)=>{const o=t=>{if(r&&!r())return void n?.(!1);const i=GJ(c,e,d,p);if(i)return document.activeElement!==i&&qK(i),document.activeElement===i?void n?.(!0):t>0?void requestAnimationFrame(()=>{o(t-1)}):void n?.(!1);t>0?requestAnimationFrame(()=>{o(t-1)}):n?.(!1)};requestAnimationFrame(()=>{o(t)})},[c,d,p]),O=L((e,t)=>{const r=a.current+1;a.current=r;let i=0;const s=Date.now()+5e3,l=()=>{if(a.current!==r)return;if(n.current!==t)return;if(c instanceof HTMLElement&&!c.isConnected)return;if(Date.now()>s||i>=5)return;const u=document.activeElement;u&&u!==document.body&&u!==document.documentElement||(i+=1,k&&(k.current=!0),o.current?.(),o.current=KJ(v,c,e,d,p,y,10,()=>a.current===r&&n.current===t,()=>{T(e,300,()=>{k&&(k.current=!1)},()=>a.current===r&&n.current===t)})),requestAnimationFrame(()=>{requestAnimationFrame(l)})};requestAnimationFrame(()=>{requestAnimationFrame(l)})},[T,c,p,v,y,k,d]),N=L(()=>(k&&(k.current=!0),t.current+=1,t.current),[k]),j=L(()=>{t.current+=1,i.current?.(),i.current=null},[]),_=L((e,n)=>{const r=o=>{t.current===e&&(i.current?.(),i.current=KJ(v,c,n,d,p,y,10,()=>t.current===e,()=>{if(t.current!==e)return;const i=GJ(c,n,d,p);i&&document.activeElement!==i&&qK(i),o>0?requestAnimationFrame(()=>{r(o-1)}):t.current===e&&k&&(k.current=!1)}))};requestAnimationFrame(()=>{requestAnimationFrame(()=>{r(300)})})},[c,d,p,v,k,y]),z=L((e,t)=>{if(!SK(e))return;Em(e),j(),n.current+=1;const o=n.current;a.current+=1,r.current?.(),r.current=null;const i=((e,t)=>UJ(t)+e+(t.atBottom?1:0))(p,d),l=JJ(e,t,i,f,E,g,d);ZJ(c),s(l);const[,u]=l,[,h]=t;return u!==h&&((e,t,n)=>{if(!e)return;const r=t[n]??0,o=t[n+1]??r,{scrollLeft:i,clientWidth:a}=e;r<i?e.scrollLeft=r:o>i+a&&(e.scrollLeft=o-a)})(y,P,u),k&&(k.current=!0),r.current=KJ(v,c,l,d,p,y,10,()=>n.current===o,()=>{T(l,300,t=>{k&&(k.current=!1),t&&(e=>QJ.includes(e))(e.key)&&O(l,o)},()=>n.current===o)}),l},[c,d,p,f,E,v,s,g,y,k,T,j,P,O]),F=L(e=>{e.key===Xm.Esc?x.enabled&&!S&&(Em(e),x.blur?.(!0)):yK(e.key)&&Em(e)},[x,S]),$=L((e,t,n)=>{switch(e.key){case Xm.C:Em(e),A&&(e.ctrlKey||e.metaKey)&&ig(e.currentTarget);break;case Xm.Enter:case Xm.Space:if(!A){Em(e);break}n?.(e);break;default:z(e,[0,t])}},[z,A]),B=L((t,r,o,i)=>{const a=[r+m,o];switch(t.key){case Xm.Space:if(Em(t),i.isSelectable&&C){e.current=!0;const n=N();l({type:gH.Select,payload:{cell:i,evt:t,announce:R}}),_(n,a)}break;case Xm.Enter:if(Em(t),e.current=!1,S){N(),s(yH),w?.confirm(),y&&(y.scrollTop=0,y.scrollLeft=0);const e=t=>{v?.(0,0),t>0&&requestAnimationFrame(()=>{e(t-1)})};e(10),n.current+=1;const t=n.current;T(yH,300,()=>{k&&(k.current=!1)},()=>n.current===t)}break;case Xm.Esc:if(e.current=!1,S){Em(t);const e=N();w?.cancel(),_(e,a)}break;case Xm.C:Em(t),A&&(t.ctrlKey||t.metaKey)&&ig(t.currentTarget);break;case Xm.Tab:{const e=t.shiftKey||!I;x.enabled&&S&&e&&(Em(t),Cm(t.currentTarget,x,t.shiftKey));break}default:{const n=t.key===Xm.Left||t.key===Xm.Right,r=S||Boolean(w?.isModal())||e.current;if(n&&r){Em(t);break}const o=z(t,a);!!o&&o[0]!==a[0]&&t.shiftKey&&C&&i.isSelectable&&l({type:gH.SelectMultiAdd,payload:{cell:i,evt:t,announce:R}});break}}},[m,z,C,l,R,S,w,x,I,A,N,_,s,v,y,T,k]),H=L(t=>{t.key===Xm.Space&&(e.current=!1),t.key===Xm.Shift&&l({type:gH.SelectMultiEnd})},[l]),V=L((e,t)=>{if(S)Em(e);else{if(e.key!==Xm.Space)return e.key===Xm.C?(Em(e),void(A&&(e.ctrlKey||e.metaKey)&&ig(e.currentTarget))):void z(e,[b,t]);e.preventDefault()}},[S,z,b,A]),W=L(e=>{j(),n.current+=1;const t=n.current;ZJ(c),s(e),x.enabled&&x.focus?.(),T(e,2,n=>{n&&O(e,t)},()=>n.current===t)},[c,s,x,T,j,O]);return{handleWrapperKeyDown:F,handleHeadKeyDown:$,handleBodyKeyDown:B,handleBodyKeyUp:H,handleTotalsKeyDown:V,focusHeadCellOnClick:L(e=>{u&&W([0,e])},[W,u]),focusBodyCellOnClick:L((e,t)=>{u&&W([e+m,t])},[W,m,u]),focusTotalsCellOnClick:L(e=>{u&&W([b,e])},[W,b,u])}};var tZ=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function nZ(e,t){return e===t||!(!tZ(e)||!tZ(t))}function rZ(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!nZ(e[n],t[n]))return!1;return!0}function oZ(e,t){var n;void 0===t&&(t=rZ);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 iZ="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function aZ(e){cancelAnimationFrame(e.id)}function sZ(e,t){var n=iZ();var r={id:requestAnimationFrame(function o(){iZ()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var lZ=-1;function uZ(e){if(void 0===e&&(e=!1),-1===lZ||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),lZ=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return lZ}var cZ=null;function dZ(e){if(void 0===e&&(e=!1),null===cZ||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?cZ="positive-descending":(t.scrollLeft=1,cZ=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),cZ}return cZ}var pZ=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function fZ(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,c=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=h(r.props,Ju(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Ju(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=oZ(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=oZ(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,u=a.rowHeight,p=r._getItemStyleCache(m&&s,m&&l,m&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:c(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=oZ(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,u=i;if("rtl"===t)switch(dZ()){case"negative":u=-i;break;case"positive-descending":u=l-o-i}u=Math.max(0,Math.min(u,l-o));var c=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:u,scrollTop:c,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&&aZ(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=sZ(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}$u(t,e),t.getDerivedStateFromProps=function(e,t){return hZ(e,t),g(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,c=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=uZ();void 0!==r&&(r=Math.max(0,Math.min(r,c-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var v=a(this.props,this._instanceProps),y=s(this.props,this._instanceProps)>f?b:0,x=v>d?b:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,y):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(dZ()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&aZ(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?pZ:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,b=e.style,v=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),w=S[0],E=S[1],R=this._getVerticalRangeToRender(),A=R[0],I=R[1],M=[];if(r>0&&g)for(var k=A;k<=I;k++)for(var D=w;D<=E;D++)M.push(C(t,{columnIndex:D,data:d,isScrolling:v?x:void 0,key:f({columnIndex:D,data:d,rowIndex:k}),rowIndex:k,style:this._getItemStyle(k,D)}));var P=a(this.props,this._instanceProps),T=s(this.props,this._instanceProps);return C(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:On({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},C(u||c||"div",{children:M,ref:l,style:{height:P,pointerEvents:x?"none":void 0,width:T}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],u=i[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,v=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(b,v,g,x,y)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,u,this._instanceProps),h=f(this.props,d,u,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,h+g)),d,h]},t}(H),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var hZ=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},mZ=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},gZ=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},bZ=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=i(u);o[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},vZ=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?yZ(e,t,n,i,0,r):xZ(e,t,n,Math.max(0,i),r)},yZ=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=bZ(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},xZ=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&bZ(e,t,r,n).offset<o;)r+=a,a*=2;return yZ(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},SZ=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=bZ(e,t,n,i),u="column"===e?gZ(t,i):mZ(t,i),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return o>=d&&o<=c?o:d>c||o<d?d:c}},wZ=fZ({getColumnOffset:function(e,t,n){return bZ("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return vZ("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=bZ("column",e,t,r),s=n+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=bZ("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:mZ,getEstimatedTotalWidth:gZ,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return SZ("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return SZ("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return bZ("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return vZ("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=bZ("row",e,t,r),s=n+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=bZ("row",e,u,r).size;return u},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),CZ=function(e,t){return e};function EZ(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,c=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Ju(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Ju(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=oZ(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=oZ(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,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=oZ(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(dZ()){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&&aZ(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=sZ(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}$u(t,e),t.getDerivedStateFromProps=function(e,t){return RZ(e,t),c(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?uZ():0:l.scrollHeight>l.clientHeight?uZ():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(dZ()){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&&aZ(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,u=e.itemCount,c=e.itemData,d=e.itemKey,p=void 0===d?CZ:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,b=e.useIsScrolling,v=e.width,y=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,S=x?this._onScrollHorizontal:this._onScrollVertical,w=this._getRangeToRender(),E=w[0],R=w[1],A=[];if(u>0)for(var I=E;I<=R;I++)A.push(C(t,{data:c,key:p(I,c),index:I,isScrolling:b?y:void 0,style:this._getItemStyle(I)}));var M=r(this.props,this._instanceProps);return C(h||m||"div",{className:n,onScroll:S,ref:this._outerRefSetter,style:On({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},C(s||l||"div",{children:A,ref:a,style:{height:x?"100%":M,pointerEvents:y?"none":void 0,width:x?M:"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 u=a(this.props,l,this._instanceProps),c=s(this.props,u,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(H),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var RZ=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},AZ=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var u=r(l);o[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return o[t]},IZ=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=AZ(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},MZ=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&AZ(e,n,t).offset<r;)n+=i,i*=2;return IZ(e,t,Math.min(n,o-1),Math.floor(n/2),r)},kZ=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},DZ=EZ({getItemOffset:function(e,t,n){return AZ(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:kZ,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=AZ(e,t,o),p=kZ(e,o),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+i);switch("smart"===n&&(n=r>=h-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?IZ(e,t,o,0,n):MZ(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===o||"horizontal"===s?l:i,c=AZ(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=AZ(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function PZ(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var TZ=["style"],qZ=["style"];function OZ(e,t){var n=e.style,r=Ln(e,TZ),o=t.style,i=Ln(t,qZ);return!PZ(n,o)&&!PZ(r,i)}const LZ=$g(0),NZ=$g(0),jZ=$g(0),_Z=$g(e=>e(LZ)+e(NZ)),zZ=$g(e=>{const t=e(Zb),n=e(yU),r=t.height-(n?41:0);return{width:t.width,height:r}}),FZ=$g(e=>{const t=e(zZ),n=e(gV),r=e(bV);return{width:t.width-r,height:t.height-n}}),$Z=$g(e=>{const t=e(FZ),n=e(_Z),r=e(jZ);return Math.min(t.height-n,r)}),BZ=$g(-1),HZ=yM(e=>$g(t=>t(BZ)===e)),VZ=({style:e})=>Yt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var WZ=w.memo(VZ,OZ);const UZ=$g(e=>{const t=e(FZ),n=e(qU),r=e(_Z),o=e(jZ)+r,i=e(OJ)*n+r;return o<2*t.height?o:i}),GZ=$g(e=>e(UZ)<=e(zZ).height),KZ=()=>{},YZ=e=>{e.preventDefault()};const XZ=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{rowsInPage:o,columns:i,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:u,onKeyDown:c,onKeyUp:d,onCellClick:p}=r,f=Qg(HZ(t)),h=eb(BZ),m=Qg(kU),g=Qg(Fb),b=Qg(Ob),v=Qg(jb),y=Qg(kK),x=Qg(gb),S=Qg(GZ),w=o[t]?.[e],{handleMouseDown:C,handleMouseOver:E,handleMouseUp:R,cellSelectionState:A}=function(e){const t="object"==typeof e,n=Qg(Lb),r=eb(IK),o=Qg(MK(e));if(ZX(e),t&&n){const{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i}=XX(YZ,e,r,KZ);return{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(w),I=((e,t,n,r)=>{const o=D(null),i=n&&(!n.isNumeric||n.isDual),a=n?.isTotalRow??!1,s=L(n=>{const o=n.contentBoxSize.at(0)?.blockSize;o&&i&&r(o,e,t,a)},[a,t,r,e,i]);return hY({ref:o,callback:s}),o})(t,e,w,s),M=i[e]?.isDim?m.dimension.values:m.measure.values,k=YX(i[e].id);if("object"==typeof w){const r=((e,t,n,r,o,i,a)=>{const s=e.isTotalRow&&a("TLV-2303-SUB-TOTALS");let l=tJ(o,i,e);l=s?i.subTotalRow:l,l=QX(l,i,e,t.isDim);const u=e.isNull||s&&t.isDim?l:MV(l,e.qAttrExps,t.qAttrExprInfoIDs);return r!==mH.Selected||s?r!==mH.Disabled||s?n?{...u,...i.grid.hoverColors}:u:{...u,color:n?i.grid.hoverColors?.color:u.color,background:`${YH}, ${n?i.grid.hoverColors?.background:u.background}`}:{...u,...i.selectedColors}})(w,i[e],a&&f,A,M,m,x),o={rowindex:t,columnindex:e},s=n=>{v&&p?.(t,e),C?.(n)},D=c?n=>{c(n,t,e,w)}:void 0;return Yt.jsx("div",{className:`sn-table-cell ${A} ${Ym}`,tabIndex:-1,style:{...n,...r,display:"flex",alignItems:"start",borderColor:m.grid.border,borderTop:"0px",borderBottomWidth:!S&&w.isLastRow?"0px":"1px",borderRightWidth:aV(g,w.isLastColumn,y),borderLeftWidth:sV(g,w.isLastColumn,y),justifyContent:nV(w,g),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:w.align,opacity:k},onMouseDown:s,onMouseUp:R,onMouseOver:E,onMouseEnter:a?()=>{h(t)}:void 0,onMouseLeave:a?()=>{h(-1)}:void 0,onKeyDown:D,onKeyUp:d,title:b?w.representation.text:void 0,...o,children:Yt.jsx(KX,{cellSelectionState:A,hideTickIcon:!!w.isTotalRow,children:Yt.jsx(WX,{forwardRef:m.contentStaticLineCount||1===l?void 0:I,cell:w,style:r,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:u})})})}return Yt.jsx(WZ,{style:{...n,...M,borderColor:m.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:k}})};var JZ=z(XZ,OZ);const ZZ=ZR($g(async e=>{const t=e(yb),n=e(Gb),r=e(PJ).page,{qDataPages:o}=t.qHyperCube;if(0!==r||0===o.length){const e=r*Math.min(kV,t.qHyperCube.qSize.qcy);if(n&&"getHyperCubeData"in n)return n.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:e,qWidth:50,qHeight:100}])}return[...o]})),QZ=$g(e=>{const t=e(OJ),n=e(FZ),r=e(qU);return Math.min(t,Math.ceil(n.height/r))}),eQ=$g(e=>{const t=e(zU),n=e(FZ);return t.reduce((e,t)=>e.width<n.width?{width:e.width+t,count:e.count+1}:e,{count:0,width:0}).count}),tQ=e=>{const t=D(e);return t.current=e,t},nQ=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,rQ=e=>-1===e.qElemNumber||!!e.qIsTotalCell,oQ=(e,t,n,r,o)=>{const i=e[n];if(!i)return!0;for(let e=t;e<t+r;e++){const t=i[e];if(t?.rowIdx!==o)return!0}return!1},iQ=(e,t,n,r)=>{const o=e.slice(n,r);return 0===o.length||o.some(e=>!e[t])},aQ=(e,t,n,r,o,i,a,s)=>{e.forEach(e=>{e.qMatrix.forEach((l,u)=>{const c=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:p}=((e,t,n,r,o,i,a,s,l,u)=>{const{qSize:c}=a.qHyperCube,d=r.qTop+n,p=o+n,f=e[p]??[],h=t.some(rQ);return t.forEach((e,t)=>{const n=t+r.qLeft;if(f.at(n))return;const{colIdx:o,isDim:m,isLocked:g,bodyTextAlign:b,selectionColIdx:v,qAttrExprInfoIndex:y,representation:x,conditionalColoring:S,qMiniChart:w,measureMinMax:C,qNumFormat:E,qIsAutoFormat:R,formattedNullValueText:A}=i[n],I=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),M=!m&&e.qIsNull,k=m&&eU(e,m),D=M||k?QW(m,e,a,I):e.qText,P=M?wH(D):SH(e),T=SH(e)&&!wH(e.qText??"");f[n]={id:d$(),...e,align:YW(P,b,u),rowIdx:d,colIdx:o,isSelectable:m&&!g&&!h&&!k,isTotalRow:h,pageRowIdx:p,pageColIdx:n,selectionColIdx:v,isLastRow:d===c.qcy-1,isLastColumn:n===c.qcx-1,isNumeric:P,isDual:T,isNull:(!M||!P)&&eU(e,m),qNumFormat:E,qIsAutoFormat:R,formattedNullValueText:A,representation:yW({cell:e,representationProperties:x,attrExprInfoIndex:y,env:s,conditionalColoring:S,miniChartOnMeasure:w,measureMinMax:C,getText:()=>D,direction:u,enabledFeatures:{[S$.Image]:!0,[S$.Indicator]:!0,[S$.MiniChart]:!0,[S$.Bar]:!m&&s.flags.isEnabled("VNA-977-TABLE-BARS")}})},l(f[n],d,n)}),{row:f,pageRowIdx:p}})(n,l,u,e.qArea,c,r,o,i,a,s);n[p]=d})})},sQ=({gridState:e,setEstimatedCellHeight:t})=>{const n=Qg(yb),r=Qg(nv),o=Qg(Gb),i=Qg(mb),a=Qg(Fb),s=Qg(PJ),l=Qg(ZZ),u=Qg(hU),c=Qg(OJ),d=Qg(QZ),p=Qg(eQ),f=D([]),h=L((e,r)=>{const o=Array.isArray(r)?r.slice(0,c):(e=>Array(e).fill(void 0))(c);return aQ(e,s,o,u,n,i,t,a),f.current=o,o},[c,s,u,n,i,t,a]),[m,g]=k(()=>h(l??[]));$m(()=>{g(h(l??[]))},[l,a,c]);const b=((e,t)=>{const n=Qg(bb),r=D(new Set),o=D(new Set),i=D(new Set),a=tQ(e),s=tQ(t),l=M(()=>({enqueue:e=>{const t=nQ(e);i.current.has(t)||(r.current.add(e),i.current.add(t),1===r.current.size&&setTimeout(async()=>{const e=Array.from(r.current.values());if(0!==e.length){r.current.clear(),o.current.add(e);try{const t=(e=>{const t=[];return e.forEach(e=>{if(t.length>0){const n=t[t.length-1];((e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth)(n,e)?n.qHeight+=e.qHeight:((e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight)(n,e)?n.qWidth+=e.qWidth:t.push({...e})}else t.push({...e})}),t})(e),n=await a.current(t);o.current.has(e)&&s.current(n)}catch(t){e.forEach(e=>{i.current.delete(nQ(e))}),n.error({msg:"Failed to fetch pages",payload:t})}finally{o.current.delete(e)}}},75))},clear:()=>{r.current.clear(),o.current.clear(),i.current.clear()}}),[n,a,s]);return l})(e=>o&&"getHyperCubeData"in o?o.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([]),e=>{g(t=>h(e,t))}),v=L((e,t,n,r)=>{for(let o=e;o<e+n;o++)if(iQ(f.current,o,t,r)){const e={qLeft:o,qTop:t,qHeight:r,qWidth:1};b.enqueue(e)}},[b]),y=L((e,t,n,r)=>{for(let o=t;o<t+r;o++){const t=Math.max(0,o-s.page*s.rowsPerPage);if(oQ(f.current,e,t,n,o)){const t={qLeft:e,qTop:o,qHeight:1,qWidth:n};b.enqueue(t)}}},[b,s]);return q(()=>{if(void 0===l)return;const{qcx:t,qcy:r}=n.qHyperCube.qSize,o=e.current.overscanRowStartIndex,i=e.current.overscanColumnStartIndex,a=o+s.page*s.rowsPerPage,u=t-i,c=s.rowsPerPage-o,f=Math.min(100,u,t,p+5),h=Math.min(100,c,r,d+25);return y(i,a,f,h),()=>{b.clear()}},[l,n,d,p,s,b,y,e,r]),{rowsInPage:m,loadRows:y,loadColumns:v}},lQ=e=>{let t=0;return e.forEach(e=>{e>t&&(t=e)}),t},uQ=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,cQ=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const o=Qg(kU),i=Qg(zU),{estimateLineCount:a}=Lm(o.dimension.values),s=vV(o.dimension.values.fontSize),l=e||t||1===n;return L((e,t,o)=>{if(l||e.representation.type===S$.Image||e.isNumeric&&!e.isDual)return;const u=(e=>Math.max(0,e-24-1))(i[o]),c=e.representation.text?a({text:e.representation.text,maxWidth:u,isNumeric:!1}):1,d=Math.min(n,Math.max(1,c));r(d*s,t,o,e.isTotalRow??!1)},[l,i,a,n,s,r])},dQ=({isStaticNbrOfLines:e,minRowHeight:t,state:n,staticRowHeight:r=0})=>{const o=Qg(xW);j(()=>{const i=e?r:((e,t)=>{const n=0===t?0:e/t;return Math.ceil(n)})(n.sumHeight,n.rowHeights.size);o.estimatedRowHeight=Math.max(i,t)},[e,t,n,r,o])},pQ=({isSnapshot:e,gridRef:t})=>{const n=Qg(kU),r=Qg(OJ),[o,i]=k(()=>({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})),a=Qg(TU),s=Qg(qU),l=Qg(OU),u=!!n.contentStaticLineCount,c=Math.max(8e6/r,s,l)-9,d=c+9,p=Math.max(1,Math.min(n.grid.contentLineClamp,Math.round(c/a))),f=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:n})=>n?t*e+8+1:void 0)({lineClamp:p,lineHeight:a,isStaticNbrOfLines:u});(({gridRef:e,setState:t})=>{const n=Qg(yb),r=Qg(PJ),o=Qg(zU),i=n.multiline?.wrapTextInCells,a=n.nullValueRepresentation?.text;$m(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),t({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})},[n.qHyperCube.qSize.qcx,n.qHyperCube.qSize.qcy,r.page,i,a]),$m(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})},[o])})({gridRef:t,setState:i});const h=(({setState:e,maxCellHeight:t,gridRef:n})=>{const r=Qg(qU),o=Qg(OU);return L((i,a,s,l=!1)=>{$(()=>{e(e=>{const u=l?o:r,c=Math.max(u,i+9),d=Math.min(t,c),p=e.cellHeightsInGrid.get(a)??e.cellHeightsInGrid.set(a,new Map).get(a);if(!uQ(p.get(s),d))return e;const f={...e},h=e.rowHeights.get(a);p.set(s,d);const m=void 0===h||d>=h?d:lQ(p);return f.rowHeights.set(a,m),f.sumHeight=e.sumHeight-(h??0)+m,n.current?.resetAfterIndices({columnIndex:s,rowIndex:a,shouldForceUpdate:!1}),f})})},[e,t,r,o,n])})({maxCellHeight:d,setState:i,gridRef:t}),m=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>L((o,i,a,s)=>{e||t||1===n||r(o,i,a,s)},[e,t,n,r]))({isSnapshot:e,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:h}),g=cQ({isSnapshot:e,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:h}),b=L(e=>u?f??s:o.rowHeights.get(e)??s,[u,s,o.rowHeights,f]);return dQ({isStaticNbrOfLines:u,minRowHeight:s,state:o,staticRowHeight:f}),{setMeasuredCellHeight:m,setEstimatedCellHeight:g,getRowHeight:b,lineClamp:p}},fQ=(e,t)=>{j(()=>()=>{t(0)},[e,t]);const n=L(e=>{const n=e.contentBoxSize.at(0)?.blockSize;void 0!==n&&t(n)},[t]);hY({ref:e,callback:n})};let hQ=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const mQ=({loadRows:e,loadColumns:t,gridState:n})=>{const r=Qg(xW),o=Qg(yb),i=Qg(PJ),a=Qg(OJ);return L(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:u,overscanRowStopIndex:c,visibleColumnStartIndex:d,visibleColumnStopIndex:p,visibleRowStartIndex:f,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let o,i;return o=r>t?hQ.Down:r<t?hQ.Up:hQ.None,i=n>e?hQ.Right:n<e?hQ.Left:hQ.None,{verticalScrollDirection:o,horizontalScrollDirection:i}})(n.current,s,u);if(n.current.overscanColumnStartIndex=s,n.current.overscanColumnStopIndex=l,n.current.overscanRowStartIndex=u,n.current.overscanRowStopIndex=c,u>a)return;const b=s,v=u+i.page*i.rowsPerPage,y=l-s+1,x=c-u+1;if(r.visibleLeft=d,r.visibleWidth=p-d+1,r.visibleTop=f+i.page*i.rowsPerPage,r.visibleHeight=h-f+1,r.page=i.page,r.rowsPerPage=i.rowsPerPage,m===hQ.Down){const t=x+25;e(b,v,y,u+t>a?a-u:t)}else if(m===hQ.Up){const t=x+25,n=i.page*i.rowsPerPage,r=Math.max(n,v-25);e(b,r,y,t)}if(g===hQ.Right){const e=o.qHyperCube.qSize.qcx-b,n=y+5,r=Math.min(e,n);t(b,v,r,x)}else if(g===hQ.Left){const e=Math.max(0,b-5),n=Math.min(o.qHyperCube.qSize.qcx,y+5);t(e,v,n,x)}},[n,a,i.page,i.rowsPerPage,r,e,o.qHyperCube.qSize.qcx,t])};const gQ=({columnIndex:e,data:t,rowIndex:n})=>{const r=t.rowsInPage[n]?.[e];return r?.id??`${n}-${e}`},bQ=(e,t)=>{if(!e||!t)return;const n=e.scrollHeight-e.clientHeight,r=Math.round(n*(e=>{const t=e.scrollHeight-e.clientHeight;return t<=0?0:Math.max(0,Math.min(1,e.scrollTop/t))})(t));e.scrollTop!==r&&(e.scrollTop=r)},vQ={overflow:"hidden",willChange:"auto"},yQ=F((e,t)=>{const{handleBodyKeyDown:n,handleBodyKeyUp:r,focusBodyCellOnClick:o}=eZ(),i=Qg(hU),a=Qg(FZ),s=eb(jZ),l=Qg($Z),u=Qg(xW),c=Qg(yb),d=Qg(Fb),p=Qg(zU),f=Qg(OJ),h=Qg(NJ),m=eb(LJ),g=D(null),b=D(null),v=D(null),y=D({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),x=D(0),S=!!RV(c)?.content?.hoverEffect,{setMeasuredCellHeight:w,setEstimatedCellHeight:C,getRowHeight:E,lineClamp:R}=pQ({isSnapshot:!!c.snapshotData,gridRef:g}),{rowsInPage:A,loadRows:I,loadColumns:k}=sQ({gridState:y,setEstimatedCellHeight:C}),P=mQ({loadRows:I,loadColumns:k,gridState:y}),T=oX(),O=M(()=>({rowsInPage:A,columns:i,isHoverEnabled:S,lineClamp:R,setMeasuredCellHeight:w,resizeObserverTaskScheduler:T,onKeyDown:n,onKeyUp:r,onCellClick:o}),[A,i,S,R,w,T,n,r,o]);return j(()=>{1===x.current&&g.current?.scrollToItem({rowIndex:f-1,align:"start"})}),function(e){const t=eb(IK),{shouldRefocusRef:n}=Qg(VJ),r=Qg(Qb),o=Qg(qJ);q(()=>{t({type:gH.UpdatePageRows,payload:{pageRows:e}})},[t,e]);const i=L(()=>{n&&(n.current=r.contains(document.activeElement))},[n,r]);iX({updateShouldRefocus:i,tableWrapperRef:{current:o}})}(A),B(t,()=>({interpolatedScrollTo:(e,t)=>{const n=(v.current?.clientHeight??l)-l,r=Math.round(n*e);x.current=e,1===x.current?(g.current?.scrollToItem({rowIndex:f-1,align:"start"}),g.current?.scrollTo({scrollLeft:t})):g.current?.scrollTo({scrollTop:r,scrollLeft:t})}}),[v,l,f]),q(()=>(m(()=>(e,t)=>{g.current?.scrollToItem({rowIndex:e,columnIndex:t,align:"auto"}),bQ(h,b.current)}),()=>{m(null)}),[h,m]),fQ(v,s),Yt.jsx(wZ,{"data-key":"body",ref:g,outerRef:b,innerRef:v,style:vQ,columnCount:i.length,columnWidth:e=>p[e],height:l,rowCount:f,rowHeight:E,estimatedRowHeight:u.estimatedRowHeight,width:a.width,itemData:O,onItemsRendered:P,itemKey:gQ,className:"sn-table-body",direction:d,children:JZ})});var xQ=z(yQ);const SQ=({children:e})=>{const t=Qg(BU),n=Qg(UZ);return Yt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:t,height:n},children:e})},wQ=(e,t)=>{const n=D(null),r=Qg(zU);j(()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)},[t,n,e,r.length]);const o=L(n=>{const r=n.contentBoxSize.at(0)?.blockSize;r&&t(r+9,e)},[e,t]);return hY({ref:n,callback:o}),n},CQ=Du("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({interactions:e,hoverBackground:t,background:n,applicableStyle:r,color:o})=>({...r,background:n,color:o,"&&:hover:not(:has(button:hover))":{background:e.active?t:void 0}})),EQ=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:o,setMeasuredCellHeight:i,onKeyDown:a,onCellClick:s}=n,l=Qg(kU),u=Qg(Fb),c=Qg(Tb),d=Qg(kK),p=eb(mV),f=Qg(fU),h=Qg(jb),m=Qg(zU)[e],g=Qg(Ub),b=Qg($Y(e)),v=r[e],{open:y,setOpen:x,handleOpenMenu:S,toggleSortOrder:w}=vJ({isInteractionEnabled:h,column:v}),C=Qg(Ib),E=wQ(e,i),R=r.length-1===e,A=C?iY:RY,{ref:I,isDragging:M}=wJ(v,e),k=YX(v.id),D=b&&!g.enabled&&h?0:-1,P=a?t=>{a(t,e,S)}:void 0;return Yt.jsxs(CQ,{"data-dragging":M,ref:I,className:`sn-table-cell ${Ym}`,title:c.passive?v.label:void 0,onClick:C?S:w,applicableStyle:{...l.header,...PK(l,f,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:aV(u,R,d),borderLeftWidth:sV(u,R,d),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:v.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===v.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:k},interactions:c,hoverBackground:v.headerColor?.headerMenuHoverBackground??l.headerMenuHoverBackground,background:C&&y?v.headerColor?.headerMenuActiveBackground??l.headerMenuActiveBackground:v.headerColor?.background??l.header.background,color:v.headerColor?.color??l.header.color,tabIndex:D,onKeyDown:P,onMouseDown:t=>{t.preventDefault(),h&&s?.(e)},"data-col":e,children:[Yt.jsx(A,{forwardRef:E,column:v,isInteractionEnabled:h,open:y,setOpen:x,columnWidth:m}),Yt.jsx(gJ,{column:v,isLastColumn:R,onColumnResize:o,setIsAdjustingWidth:p})]})},RQ=e=>{const[t,n]=k(new Map);$m(()=>{n(new Map)},[e.length]);const r=L((e,t)=>{n(n=>uQ(n.get(t),e)?new Map(n).set(t,e):n)},[]);return{rowHeight:M(()=>lQ(t),[t]),setMeasuredCellHeight:r}},AQ=(e,t)=>{B(e,()=>({scrollTo:e=>t.current?.scrollTo(e)}),[t])},IQ=e=>{const t=Qg(nv),n=Qg(yb),r=Qg(PJ),o=Qg(zU);$m(()=>{e.current?.resetAfterIndex(0,!1)},[n,r,e,o,t])},MQ={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},kQ=F((e,t)=>{const{columResizeHandler:n}=e,r=Qg(hU),o=Qg(FZ),i=eb(LZ),a=w.useRef(null),s=D(null),l=Qg(DU),u=Qg(yb),c=Qg(Bb),d=Qg(Fb),p=Qg(zU),{rowHeight:f,setMeasuredCellHeight:h}=RQ(r),m=hJ(c,u),{handleHeadKeyDown:g,focusHeadCellOnClick:b}=eZ();return AQ(t,a),IQ(a),fQ(s,i),Yt.jsx(DZ,{className:"sn-table-head-row",ref:a,outerRef:s,layout:"horizontal",style:{...MQ,...m?{display:"none"}:void 0},itemCount:r.length,itemSize:e=>p[e],height:Math.max(f+8,l),width:o.width,itemKey:e=>r[e].id,itemData:{columns:r,columResizeHandler:n,setMeasuredCellHeight:h,onKeyDown:g,onCellClick:b},direction:d,children:EQ})});var DQ=z(kQ);const PQ=F((e,t)=>{const{children:n,onScroll:r}=e,o=Qg(Fb),i=Qg(Nb),{width:a,height:s}=Qg(zZ),l=eb(NJ),u=L(e=>{l(e),"function"==typeof t?t(e):t&&(t.current=e)},[t,l]);return Yt.jsx("div",{"data-testid":"scrollable-container",ref:u,style:{overflow:i?"auto":"hidden",width:a,height:s},onScroll:r,dir:o,tabIndex:-1,children:n})}),TQ=({children:e})=>{const t=Qg(Fb),n=Qg(FZ);return Yt.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"rtl"!==t?"0px":void 0,right:"rtl"===t?"0px":void 0,width:n.width,height:n.height},children:e})},qQ=({index:e,style:t,data:n})=>{const{columns:r,totals:o,setMeasuredCellHeight:i,onKeyDown:a,onCellClick:s}=n,l=Qg(kU),u=Qg(yb),c=Qg(Fb),d=Qg(Ob),p=Qg(jb),f=Qg(kK),h=Qg(GZ),m=wQ(e,i),g=r[e].totalInfo,{totalsTextAlign:b,isTotalNumeric:v}=r[e],y=u.qHyperCube.qSize.qcx-1===e,x=YX(r[e].id),S=a?t=>{a(t,e)}:void 0;return Yt.jsx("div",{className:`sn-table-cell ${Ym}`,tabIndex:-1,title:d?g:void 0,"data-col":e,onKeyDown:S,onMouseDown:t=>{t.preventDefault(),p&&s?.(e)},style:{...t,...l.totalRow,...PK(l,o,!1),background:l.totalRow.background,display:"flex",alignItems:o.atTop?"end":"start",borderStyle:"solid",borderRightWidth:aV(c,y,f),borderLeftWidth:sV(c,y,f),borderTopWidth:o.atBottom?"1px":"0px",borderBottomWidth:h&&o.atBottom||o.atTop?"1px":"0px",padding:"4px 12px",justifyContent:b,textAlign:b,boxSizing:"border-box",cursor:"default",opacity:x},children:Yt.jsx(oY,{forwardRef:v?void 0:m,isNumeric:v,children:g})})},OQ=F((e,t)=>{const{totals:n}=e,r=Qg(hU),o=Qg(FZ),i=eb(NZ),a=D(null),s=D(null),l=Qg(PU),u=Qg(Fb),c=Qg(yb),d=Qg(zU),{rowHeight:p,setMeasuredCellHeight:f}=RQ(r),{handleTotalsKeyDown:h,focusTotalsCellOnClick:m}=eZ();return AQ(t,a),IQ(a),fQ(s,i),Yt.jsx(DZ,{className:"sn-table-totals-row",ref:a,outerRef:s,layout:"horizontal",style:MQ,itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>d[e],height:Math.max(p,l),width:o.width,itemData:{columns:r,totals:n,setMeasuredCellHeight:f,onKeyDown:h,onCellClick:m},direction:u,children:qQ})});var LQ=z(OQ);const NQ=(e,t,n)=>{const r=Qg(Fb),o=Qg(xW);return L(i=>{const{scrollHeight:a,clientHeight:s,scrollTop:l}=i.currentTarget,u=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(i.currentTarget,r),c=Math.max(0,Math.min(1,l/(a-s)));o.scrollTopRatio=c,o.scrollLeft=u,n.current?.interpolatedScrollTo(Number.isNaN(c)?0:c,u),e.current?.scrollTo(u),t.current?.scrollTo(u)},[o,n,e,t,r])};var jQ=z(()=>{const e=Qg(fU),t=D(null),n=D(null),r=D(null),o=D(null),i=NQ(n,r,o),a=L(()=>{t.current&&(t.current.scrollTop=0)},[t]);BY(),(e=>{const t=Qg(mU),n=Qg(PJ),r=Qg(nv),o=Qg(OJ);q(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollLeft=0,e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[t,e]),q(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[n,o,r,e])})(t),JY(t);const s=Yt.jsx(LQ,{ref:r,totals:e},"totals");return Yt.jsxs(jY,{children:[Yt.jsx(PQ,{ref:t,onScroll:i,children:Yt.jsxs(SQ,{children:[Yt.jsxs(TQ,{children:[Yt.jsx(DQ,{ref:n,columResizeHandler:a}),e.atTop?s:null,Yt.jsx(xQ,{ref:o}),e.atBottom?s:null]}),Yt.jsx(DK,{})]})}),Yt.jsx(kY,{isPagination:!1})]})});const _Q=()=>{const e=Qg(yb),t=Qg(Zb),n=Qg(Tb),{paginationNeeded:r,totalRowCount:o,totalColumnCount:i,totalPages:a}=Qg(pU),s=Qg(nv),l=Qg(rv),u=Qg(Ub),[c,d]=tb(PJ),p=D(null),f=D(!1),h=eb(TJ),m=eb(qJ);q(()=>{h(f)},[h]);const g=w.useCallback(e=>{p.current=e,m(e)},[m]),{handleWrapperKeyDown:b}=eZ();return(()=>{const e=Qg(Qb),{keyboard:t}=Qg(HJ),n=Qg(FY),r=Qg(fU),o=Qg(OJ),{scrollToCell:i}=Qg(BJ),{shouldRefocusRef:a}=Qg(VJ),s=D({focusedCellCoord:n,totalsPosition:r,rowCount:o,scrollToCell:i,rootElement:e}),l=D(null),u=D(null);j(()=>{s.current={focusedCellCoord:n,totalsPosition:r,rowCount:o,scrollToCell:i,rootElement:e}},[n,r,o,i,e]),q(()=>{let e=!1;const{focusedCellCoord:n,totalsPosition:r,rowCount:o,scrollToCell:i,rootElement:c}=s.current;if("function"==typeof c.querySelector){if(t.active){const[t,a]=n,d=r.atTop?2:1;if(t>=d&&t<d+o){null!==u.current&&(cancelAnimationFrame(u.current),u.current=null),i?.(t-d,a);const n=t=>{if(e)return;const r=GJ(s.current.rootElement,s.current.focusedCellCoord,s.current.totalsPosition,s.current.rowCount);r&&document.activeElement!==r&&qK(r),r&&document.activeElement===r||t>0&&(l.current=requestAnimationFrame(()=>{n(t-1)}))};l.current=requestAnimationFrame(()=>{e||n(5)})}else{const e=GJ(c,n,r,o);e&&qK(e)}}else null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),u.current=requestAnimationFrame(()=>{if(e)return;const t=s.current;if(a?.current)return;if(t.rootElement.contains(document.activeElement))return;const n=GJ(t.rootElement,t.focusedCellCoord,t.totalsPosition,t.rowCount);n?.blur(),ZJ(t.rootElement)});return()=>{e=!0,null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),null!==u.current&&(cancelAnimationFrame(u.current),u.current=null)}}},[t.active,e,a])})(),zY(p,f),Yt.jsxs(eY,{ref:g,"data-testid":"sn-table",onKeyDown:b,children:[Yt.jsx(tX,{}),Yt.jsx(jQ,{}),Yt.jsx(hK,{paginationNeeded:r,handleChangePage:e=>{d(e)},pageInfo:c,totalRowCount:o,totalColumnCount:i,totalPages:a,keyboard:u,translator:l,theme:s,interactions:n,rect:t,layout:e})]})};var zQ=z(_Q);const FQ=e=>{const t=e.get(Gb),n=e.get(Vb),r=e.get(vb),o=e.get(Fb);a(()=>{r&&t&&(n?function(e){const t=e.get(Fb),n=e.get(tv),r=VU(t);n.render(Yt.jsx(yi,{stylisPlugins:"rtl"===t?[dH]:void 0,children:Yt.jsx(Tu,{theme:r,children:Yt.jsx(Gg,{store:e,children:Yt.jsx(HU,{children:Yt.jsx(AJ,{})})})})}))}(e):function(e){const t=e.get(Fb),n=e.get(tv),r=VU(t);n.render(Yt.jsx(w.StrictMode,{children:Yt.jsx(Tu,{theme:r,children:Yt.jsx(Gg,{store:e,children:Yt.jsx(HU,{children:Yt.jsx(zQ,{})})})})}))}(e))},[r,n,e,t,o])};function $Q(e,t){const n=e.getElementsByClassName("sn-table-container")[0];if(!n)return{};const r=n.getBoundingClientRect(),o=e.getElementsByClassName("sn-table-head-row")[0],i=o?.getBoundingClientRect()??{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=a?.getBoundingClientRect()??{height:0},l=e.getElementsByClassName("sn-table-data-row"),u={top:r.y+i.height+(t.atTop?s.height:0),bottom:r.y+r.height-(t.atBottom?s.height:0)},c=((e,t)=>{if(!e)return-1;for(let n=0;n<e.length;n++)if(e[n].getBoundingClientRect().bottom>t.top)return n;return-1})(l,u),d=((e,t)=>{if(!e)return-1;for(let n=e.length-1;n>-1;n--){const r=e[n].getBoundingClientRect();if(t.bottom>r.top)return n}return-1})(l,u),p=((e,t,n)=>{if(!e||0===e.length||n<0)return 0;const r=e[n].getBoundingClientRect();return Math.max(t.top-r.top,0)})(l,u,c);return{visibleRowStartIndex:c,visibleRowEndIndex:d,rowPartialHeight:p}}const BQ=(e,t)=>{if(t)for(let n=0;n<t.length;n++){const r=t[n].getAttribute("rowindex");if(r&&parseInt(r,10)===e)return t[n]}},HQ=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const VQ=(e,t,n,r,o)=>{if(e<0)return 0;const i=n.qHyperCube.qSize.qcy,a=r.rowsPerPage||tU.rowsPerPage,s=o?.isMultiPage?0:3;return Math.min(i,a,e-t+1+s)},WQ=(e,t,n,r,o)=>{if(r&&!r.isMultiPage)return r;const i=WW(e,r);if(o){const{visibleRowStartIndex:o=-1,visibleRowEndIndex:a=-1,rowPartialHeight:s}=$Q(n,i);return{rowPartialHeight:s,scrollLeft:t.scrollLeft,visibleTop:t.qTop+o,visibleHeight:VQ(a,o,e,t,r),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:i}}const{visibleRowStartIndex:a=-1,visibleRowEndIndex:s=-1}=function(e,t){const n=e.querySelector(".sn-table-body"),r=n?.getBoundingClientRect(),o=n?.querySelectorAll(".sn-table-body .sn-table-cell");if(!o||!r)return{};const{scrollTopRatio:i=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:u=0}=t,c=l*u,d=a-c,p=d+s-1,f=BQ(d,o),h=f?.getBoundingClientRect();if(!f||!h)return{};const m=r.y;if(1-i<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+c,visibleRowEndIndex:p+c};const g=r.y+r.height,b=(HQ(h,m,g)?d:d+1)+c;let v=p+c;const y=BQ(p,o),x=y?.getBoundingClientRect();return y&&x&&(HQ(x,m,g)||(v=p-1+c)),{visibleRowStartIndex:b,visibleRowEndIndex:v}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:a,visibleHeight:VQ(s,a,e,t,r),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:i}},UQ=({store:e})=>{const t=e.get(yb),n=e.get(Gb),r=e.get(Qb),o=e.get(Jb),i=e.get(Bb),a=e.get(Vb);c(async s=>{const l=s;if(!l.snapshotData||!n||l.snapshotData.content)return l;if("getHyperCubeData"in n){const s=e.get(xW),{rowPartialHeight:u,scrollLeft:c,scrollTopRatio:d,visibleLeft:p,visibleWidth:f,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:b}=WQ(t,s,r,i,a);l.qHyperCube.qDataPages=await n.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:h,qWidth:t.qHyperCube.qSize.qcx,qHeight:m}]),l.snapshotData.content={rowPartialHeight:u,scrollLeft:c,scrollTopRatio:d,visibleLeft:p,visibleWidth:f,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:b,size:{width:o.width,height:o.height},estimatedRowHeight:s.estimatedRowHeight}}return l}),d(()=>({getViewState:()=>WQ(t,e.get(xW),r,i,a)}),[t,e,r,a])},GQ={version:JSON.stringify("6.64.0"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals"},usePagination:!1,components:[],accessibleHeader:!1};var KQ=e=>({properties:{initial:GQ},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:t=>Ev({...t,env:e}),exportProperties:vv,exploration:t$(e)});const YQ=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),XQ=e=>e.getStyle("object","straightTableV2","backgroundColor")}}});
|