@nebula.js/sn-table 6.37.0 → 6.38.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.37.0
2
+ * @nebula.js/sn-table v6.38.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -117,7 +117,7 @@ function wo(e,t){let n;return n=t?ro(e).withConfig({displayName:t.label,shouldFo
117
117
  *
118
118
  * This source code is licensed under the MIT license found in the
119
119
  * LICENSE file in the root directory of this source tree.
120
- */function JC(){if(GC)return Cw;GC=1,Object.defineProperty(Cw,"__esModule",{value:!0}),Cw.default=function(t){return(0,e.createStyles)(t)};var e=XC;return Cw}var QC,ZC,eE={},tE={};function nE(){if(QC)return tE;QC=1;var e=fl();Object.defineProperty(tE,"__esModule",{value:!0}),tE.default=void 0;var t=(0,e(xw()).default)();return tE.default=t,tE}function rE(){if(ZC)return eE;ZC=1;var e=fl();Object.defineProperty(eE,"__esModule",{value:!0}),eE.default=void 0;var t=e(Vl()),n=XC,r=e(nE());var i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return eE.default=i,eE}var iE,oE,aE={},sE={};function lE(){if(iE)return sE;iE=1;var e=fl();Object.defineProperty(sE,"__esModule",{value:!0}),sE.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},sE.getUnit=n,sE.toUnitless=r,sE.convertLength=function(e){return function(t,i){var o=n(t);if(o===i)return t;var a=r(t);if("px"!==o)if("em"===o)a=r(t)*r(e);else if("rem"===o)return a=r(t)*r(e),t;var s=a;if("px"!==i)if("em"===i)s=a/r(e);else{if("rem"!==i)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+i}},sE.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,i=r+n;return t-r<i-t?r:i},sE.fontGrid=function(e){var t=e.lineHeight,n=e.pixels,r=e.htmlFontSize;return n/(t*r)},sE.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,i=e.max,o=e.unit,a=void 0===o?"rem":o,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,c=e.transform,u=void 0===c?null:c,d=(0,t.default)({},n,"".concat(r).concat(a)),f=(i-r)/l[l.length-1];return l.forEach(function(e){var i=r+f*e;null!==u&&(i=u(i)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*i)/1e4).concat(a))}),d};var t=e(Nb());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return sE}function cE(){if(oE)return aE;oE=1;var e=fl();Object.defineProperty(aE,"__esModule",{value:!0}),aE.default=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.breakpoints,a=void 0===o?["sm","md","lg"]:o,s=i.disableAlign,l=void 0!==s&&s,c=i.factor,u=void 0===c?2:c,d=i.variants,f=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,p=(0,t.default)({},e);p.typography=(0,t.default)({},p.typography);var h=p.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map(function(e){return p.breakpoints.values[e]});return f.forEach(function(e){var i=h[e],o=parseFloat(m(i.fontSize,"rem"));if(!(o<=1)){var a=o,s=1+(a-1)/u,c=i.lineHeight;if(!(0,r.isUnitless)(c)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(c)||(c=parseFloat(m(c,"rem"))/parseFloat(o));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:c,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},i,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),p};var t=e(Vl()),n=Cb,r=lE();return aE}var uE,dE={};function fE(){if(uE)return dE;uE=1;var e=fl();Object.defineProperty(dE,"__esModule",{value:!0}),dE.default=void 0;var t=e(Vl()),n=XC,r=e(nE()),i=function(e){var i=(0,n.styled)(e);return function(e,n){return i(e,(0,t.default)({defaultTheme:r.default},n))}};return dE.default=i,dE}var pE,hE={};function mE(){if(pE)return hE;pE=1;var e=fl();Object.defineProperty(hE,"__esModule",{value:!0}),hE.default=function(){return(0,t.useTheme)()||n.default};var t=XC;e(bt());var n=e(nE());return hE}var gE,yE={};function bE(){if(gE)return yE;gE=1;var e=fl();Object.defineProperty(yE,"__esModule",{value:!0}),yE.default=void 0;var t=e(Vl()),n=XC,r=e(nE());var i=function(e,i){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return yE.default=i,yE}var vE,xE,wE={};function SE(){if(vE)return wE;vE=1;var e=fl();Object.defineProperty(wE,"__esModule",{value:!0}),wE.default=void 0;var t=XC,n=e(nE()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return wE.default=r,wE}function kE(){return xE||(xE=1,function(e){var t=fl(),n=(tb||(tb=1,function(e){var t=ob().default;function n(r,i){if("function"==typeof WeakMap)var o=new WeakMap,a=new WeakMap;return(e.exports=n=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,s={__proto__:null,default:e};if(null===e||"object"!=t(e)&&"function"!=typeof e)return s;if(r=n?a:o){if(r.has(e))return r.get(e);r.set(e,s)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(s,l,i):s[l]=e[l]);return s},e.exports.__esModule=!0,e.exports.default=e.exports)(r,i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(rb)),rb.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 o.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return o.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 c.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return p.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 i=Eb();Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))});var o=n(xw()),a=t(kw()),s=t(JC()),l=t(rE()),c=t(cE()),u=t(fE()),d=mw();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 f=t(mE()),p=t(bE()),h=t(SE()),m=XC}(nb)),nb}var CE=kE();CE.alpha(Xe.GREYSCALE_0,.05),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5);!function(e=()=>{try{return window.localStorage}catch(e){return void("undefined"!=typeof window&&console.warn(e))}},t){var n;let r,i;const o={getItem:(n,o)=>{var a,s;const l=e=>{if(r!==(e=e||"")){try{i=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return o}r=e}return i},c=null!=(s=null==(a=e())?void 0:a.getItem(n))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(c)?c.then(l):l(c)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let a;try{a=null==(n=e())?void 0:n.subscribe}catch(e){}var s;!a&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(a=(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)}}),a&&(o.subscribe=(s=a,(e,t,n)=>s(e,e=>{let r;try{r=JSON.parse(e||"")}catch(e){r=n}t(r)})))}();const EE=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),ME=new WeakMap,RE=()=>{};function _E(e,t=RE){return((e,t,n)=>{const r=EE(()=>new WeakMap,ME,t);return EE(e,r,n)})(()=>{const n=new WeakMap,r=new WeakMap,i=Rg(0),o=Rg([]);o.INTERNAL_onInit=e=>{e.set(o,[()=>e.set(i,e=>e+1)])},i.debugPrivate=!0,o.debugPrivate=!0;const a=Rg(s=>{let l;s(i);try{l=s(a)}catch(e){}const c=s(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(c))return{v:c};if(c!==(null==l?void 0:l.p)&&c.then(e=>{r.set(c,e);const[t]=s(o);t()},e=>{n.set(c,e);const[t]=s(o);t()}),n.has(c))throw n.get(c);return r.has(c)?{p:c,v:r.get(c)}:l&&"v"in l?{p:c,f:t(l.v),v:l.v}:{p:c,f:t()}});return a.init=void 0,a.debugPrivate=!0,Rg(e=>{const t=e(a);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,t)}const AE=new WeakMap;function PE(e,t){const n=Tg(t),r=IE(n);for(const[i,...o]of e)r.has(i)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(i),n.set(i,...o))}const IE=e=>{let t=AE.get(e);return t||(t=new WeakSet,AE.set(e,t)),t};function TE(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function DE(e){const t=Rg(()=>[]),n=Rg(function(e){const[r,i,o]=e(t);o.has(n)&&(r.forEach(e),++i.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=kg(e),i=r[1],o=r[3],a=tg(r[6]),s=r[11],l=r[12],c=r[13],u=r[14],d=r[15],f=r[16],p=r[17],h=r[20],m=new Set;let g,y=0,b=!1,v=!1,x=!1;function w(){if(y)return;m.clear();let t=!0;const S=o=>{if(x)return e.get(o);if(o===n){const t=s(r,e,o);if(!Km(t)){if(!Gm(o))throw new Error("no atom init");h(r,e,o,o.init)}return Xm(t)}const a=u(r,e,o);try{return Xm(a)}finally{k.d.set(o,a.n),i.get(o)?.t.add(n),t?m.add(o):i.has(o)&&(p(r,e,n),c(r,e),l(r,e))}};S.peek=e.get;const C=(i,...u)=>{const m=s(r,e,i);try{if(++y,i===n){if(!Gm(i))throw new Error("atom not writable");const t=m.n,n=u[0];return h(r,e,i,n),p(r,e,i),void(t!==m.n&&(o.add(i),a.c?.(i),d(r,e,i)))}return f(r,e,i,u)}finally{t||(c(r,e),l(r,e)),--y}};C.recurse=(t,...i)=>{if(x){if(TE())throw new Error("set.recurse is not allowed in cleanup")}else try{return b=!0,p(r,e,n),C(t,...i)}finally{c(r,e),b=!1,v&&(v=!1,w())}};try{g?.();const e=n.effect(S,C);if("function"!=typeof e)return;g=()=>{if(!y)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{k.d.set(t,s(r,e,t).n)}),p(r,e,n),c(r,e)}}const S=function(e,t){let n=OE.get(e);n||(n=new Set,OE.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),k=s(r,e,n);k.v=void 0,Object.assign(e.get(t),[m,k,i]),a.c.add(n,function(){o.delete(n)}),a.m.add(n,function(){S.add(w),g&&S.delete(g)}),a.u.add(n,function(){S.delete(w),g&&S.add(g)}),a.c.add(n,function(){b?v=!0:S.add(w)})},TE()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const OE=new WeakMap;const NE=e=>{const{items:t,handler:n,model:r,handlerQueue:i}=e;void 0!==n&&void 0!==r&&i&&i.add(async()=>{await(async(e,t,n)=>{try{await t.toggleAlternatives(e,n)}catch(t){console.error(`Failed to toggle ${e.map(e=>e.id).join(", ")} from/to alternative`,t)}})(t,n,e.currentColumnIds)})};function qE(e,t){let n=null;const r=new Map,i=new Set;function o(i){let s;if(void 0===t)s=r.get(i);else for(const[e,n]of r)if(t(e,i)){s=n;break}if(void 0!==s){if(!n?.(s[1],i))return s[0];o.remove(i)}const l=e(i);return r.set(i,[l,Date.now()]),a("CREATE",i,l),l}function a(e,t,n){for(const r of i)r({type:e,param:t,atom:n})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>r.keys(),o.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,[i]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,i);break}},o.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,i]]of r)n(i,e)&&(r.delete(e),a("REMOVE",e,t))},o}const LE=e=>7005!==e.qError?.qErrorCode,jE=(e,t)=>{if(!e)return;const n=e.qHyperCube.qDimensionInfo.filter(e=>void 0!==e.cId).filter(LE).map(({cId:e,qFallbackTitle:n})=>({id:e,title:n??"",alternative:t,type:"dimension"})),r=e.qHyperCube.qMeasureInfo.filter(e=>void 0!==e.cId).filter(LE).map(({cId:e,qFallbackTitle:n})=>({id:e,title:n??"",alternative:t,type:"measure"}));return[...n,...r]},zE=(e,t)=>{const n=[],r={};return e.forEach(e=>{r[e.id]=e}),Object.keys(t).forEach(e=>{const i=t[e],o=r[e];o&&(n[i]=o)}),n},FE=(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 zE(e,t)}const r=t.map(e=>e.id),i=Object.keys(n).sort((e,t)=>n[e]-n[t]).filter(e=>r.includes(e)),o={...n};for(let e=0;e<r.length;e++){const t=i[e],a=r[e];t!==a&&(o[a]=n[t])}let a=0;const s=Object.entries(o).sort((e,t)=>e[1]-t[1]).map(([e])=>[e,a++]);return s.forEach(([e,t])=>{o[e]=t}),zE(e,o)},$E=Rg(),BE=Rg(),HE=Rg(),VE=Rg(e=>e(HE)?.translate??(e=>e)),WE=Rg(""),UE=Rg(e=>{const t=e(WE).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),GE=new WeakMap,YE={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},KE=_E(Rg(async e=>{const t=e($E);if(t){if(GE.has(t))return GE.get(t);try{const e=await t.app.createSessionObject(YE);return GE.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),XE=Rg(null),JE=Rg(),QE=DE((e,t)=>{const n=e($E),r=e(KE);if(!n||!r)return;const i=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const i=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qMeasures??[])}]);const o=await r.getLayout();t(JE,{layout:structuredClone(e),properties:structuredClone(i),altLayout:structuredClone(o)}),t(XE,null)};return i(),n.Invalidated?.bind(i),()=>{n.Invalidated?.unbind(i)}}),ZE=Rg(e=>e(JE)?.layout),eM=Rg(e=>e(JE)?.altLayout),tM=Rg(e=>e(JE)?.properties),nM=Rg(e=>void 0===e(ZE)||void 0===e(tM)),rM=Rg(e=>{const t=e(JE)?.layout;return t?.qHyperCube.qDimensionInfo.filter(LE)??[]}),iM=Rg(e=>{const t=e(JE)?.layout;return t?.qHyperCube.qMeasureInfo.filter(LE)??[]}),oM=Rg(e=>{const t=e(eM);return jE(t,!0)}),aM=Rg(e=>{const t=e(ZE);return jE(t,!1)}),sM=Rg(e=>{const t=e(tM),n=e(ZE);if(!t||!n)return[];const r=e(aM),i=e(oM),o=n.qHyperCube.qColumnOrder??[],a=e(XE);if(void 0===i||void 0===r)return[];if(a){return[...[...r,...i]].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()))(o,r.length),c=((e,t)=>e.length>0?e.map(e=>t[e]):t)(l,r),u=[...c,...i];return FE(u,c,s)}),lM=Rg(e=>{const t=e(sM),n=e(UE);return t.filter(n)}),cM=Rg(e=>e(lM).length),uM=Rg(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(lM);if(void 0===n)return`columns-section-${t}`;const i=r?.[n];return i?.id??`missing-item-${t}-${n}`}),dM=qE(e=>Rg(t=>t(lM)[e]),(e,t)=>e===t),fM=Rg(e=>e(sM).map(e=>e.id)),pM=Rg(e=>e(lM).map(e=>e.id)),hM=Rg(e=>{const t=e(sM),n={};return t.forEach(e=>{n[e.id]=e.type}),n});class mM{#e=[];#t=!1;#n=!1;#r;#i;#o;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#i=void 0,this.#o=void 0,this.#a=void 0}pause(){this.#i&&(clearTimeout(this.#a),this.#o?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#i=e,this.#o=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#o;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#o&&(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.#o?.(),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.#i)await this.#i;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 gM=Rg(null),yM=DE((e,t)=>{const n=e($E),r=e(BE),i=new mM({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(gM,i);const o=()=>{i.pause()},a=()=>{i.continue(500)},s=()=>{i.abort()};return n?.Invalidated?.bind(o),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{i.abort(),n?.Invalidated?.unbind(o),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),bM=Rg(e=>{const t=[...e(rM),...e(iM)].map(e=>e.cId);return new Set(t)}),vM=Rg(new Set),xM=Rg(new Set),wM=Rg(e=>{const t=e(vM),n=e(xM);return e(bM).difference(n).union(t)}),SM=DE((e,t)=>{e(bM),t(vM,new Set),t(xM,new Set)}),kM=Rg(e=>e(wM),(e,t,n)=>{if("string"!=typeof n.id)return;const r=e(wM).has(n.id),i=new Set(e(xM)),o=new Set(e(vM));r?(i.add(n.id),o.delete(n.id)):(o.add(n.id),i.delete(n.id)),t(xM,i),t(vM,o),NE({items:[n],handler:e(BE),model:e($E),currentColumnIds:e(fM),handlerQueue:e(gM)})}),CM=({props:e,children:t})=>(PE([[$E,e.args.model],[HE,e.args.apis],[BE,e.args.handler]]),zg(QE),zg(yM),zg(SM),t);function EM(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 MM(e){return"write"in e}const RM=new WeakMap,_M={},{read:AM,write:PM}=Rg(null);function IM(e,t,n){const[r,i,o,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=i.get(t);return r||(r=[NM(e,t,n),n],i.set(t,r)),r}const l=n??_M;let c=o.get(l);c||(c=new WeakMap,o.set(l,c));let u=c.get(t);if(!u){const[r,i]=a?IM(a,t,n):[t];u=[t.read===AM?r:NM(e,t,i),i],c.set(t,u)}return u}function TM(e){for(const t of e[5])t()}function DM(e,t,n,r,i){if(n.read===AM&&MM(n)&&MM(t)&&n.write!==PM&&e!==r){const{write:o}=n;return t.write=OM(e,n.write.bind(n),r,i),()=>{t.write=o}}}function OM(e,t,n,r=n){return function(i,o,...a){return t(function(t){const[r]=IM(e,t,n);return i(r)},function(t,...i){const[a]=IM(e,t,n),s=DM(e,a,t,n,r);try{return o(a,...i)}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 i=Object.getPrototypeOf(t),o=Object.create(i,r);return o.read!==AM&&(o.read=function(e,t,n){return function(r,i){return t(function(t){const[i]=IM(e,t,n);return r(i)},i)}}(e,t.read.bind(t),n)),MM(o)&&MM(t)&&o.write!==PM&&(o.write=OM(e,t.write.bind(t),n)),o}function qM({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const i=new WeakSet(e),o=RM.get(n),a=(null==o?void 0:o[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,o,new Set,void 0],l=s[0],c=s[5],u=function(e){const t=e[3],n=[...kg(t)],r=n[21],i=n[22],o=n[23],a={};let s,l;return n[21]=h(r),n[22]=f,n[23]=h(o),n[24]=function(e){return s??(s=m(e[0],c)),l??(l=[s,m(e[1],u),m(e[2]),g(e[3]),e[4],e[5],b(e[6]),h(e[7]),h(e[8]),h(e[9]),h(e[10]),d(s,e[11]),(t,...r)=>e[12](n,...r),(t,...r)=>e[13](n,...r),h(e[14]),h(e[15]),h(e[16]),h(e[17]),h(e[18]),h(e[19]),h(e[20]),h(e[21]),h(e[22]),h(e[23]),()=>e,e[25],(t,...r)=>e[26](n,...r),(t,...r)=>e[27](n,...r),e[28],...e.slice(25)]),l},Cg(...n);function c(t){const n=new WeakMap;return function(r){let i=n.get(r);if(i)return i;const o=t(r);if(!o)return;let a,s;return i=new Proxy(o,{get:(t,n)=>"d"===n?a??(a=m(o.d,function(t){return n=>t(IM(e,n)[0])})):"p"===n?s??(s=g(o.p)):Reflect.get(o,n)}),n.set(r,i),i}}function u(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const i=e(n);return i?(r={...i,d:g(i.d),t:g(i.t),get u(){return i.u},set u(e){i.u=e}},t.set(n,r),r):void 0}}function d(e,t){const n=h(t);return function(t,r,i){const o=e.get(i);if(o)return o;const a=n(t,r,i);return e.set(i,a),e.get(i)}}function f(t,n,r,...o){const[a,s]=IM(e,r),l=DM(e,a,r,s,e);try{return i(t,n,a,...o)}finally{null==l||l()}}function p(t,n){return function(r,...i){const[o]=IM(e,r);return(n?n(t):t)(o,...i)}}function h(t){return function(r,i,o,...a){const[s]=IM(e,o);return t(n,i,s,...a)}}function m(e,t){const n={get:p(e.get.bind(e),t),set:p(e.set.bind(e)),has:p(e.has.bind(e)),delete:p(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function g(t){return{get size(){return t.size},add:p(t.add.bind(t)),has:p(t.has.bind(t)),delete:p(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(p(e)),*[Symbol.iterator](){for(const n of t)yield IM(e,n)[0]}}}function y(t){if(!t)return;const n=p(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[i]=IM(e,n);return t.add(i,r)},n}function b(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>a[t]??(a[t]=y(e[t])),set(n){delete a[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=u,Object.assign(u,{name:r}),RM.set(u,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&&!i.has(t)&&l.delete(t):l.set(t,[NM(s,t,s),s])});c.add(t)}return u}const LM=function(e,t){return function(n){const{atoms:r=[],atomFamilies:i=[],children:o,scope:a,name:s}=n,l=t(),c=Array.from(r,e=>Array.isArray(e)?e[0]:e);function u(){return[a??qM({atoms:c,atomFamilies:i,parentStore:l,name:s}),function(e){return l!==e.parentStore||!EM(c,e.atoms)||!EM(i,e.atomFamilies)||a!==e.providedScope}]}const[[d,f],p]=an.useState(u);if(f({atoms:c,atomFamilies:i,parentStore:l,providedScope:a})){const e=RM.get(d);e&&TM(e),p(u)}return PE(Array.from(r).filter(Array.isArray),{store:d}),an.useEffect(()=>{const e=RM.get(d);return()=>{e&&TM(e)}},[d]),an.createElement(e,{store:d,children:o})}}(Dg,Tg);var jM=Object.defineProperty,zM=Object.defineProperties,FM=Object.getOwnPropertyDescriptors,$M=Object.getOwnPropertySymbols,BM=Object.prototype.hasOwnProperty,HM=Object.prototype.propertyIsEnumerable,VM=(e,t,n)=>t in e?jM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WM=(e,t)=>{for(var n in t||(t={}))BM.call(t,n)&&VM(e,n,t[n]);if($M)for(var n of $M(t))HM.call(t,n)&&VM(e,n,t[n]);return e},UM=(e,t)=>zM(e,FM(t));function GM(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function YM(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function KM(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const c=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>c(e,a.id)),i=e.findIndex(e=>c(e,s.id));if(-1===r||-1===i){if(YM(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const u=Object.entries(e);let d,f,p=-1,h=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>c(e,a.id)),-1!==p&&(d=e)),-1===h&&(h=t.findIndex(e=>c(e,s.id)),-1!==h&&(f=e)),-1!==p&&-1!==h)break;if(-1===p&&YM(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return UM(WM({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return UM(WM({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==f&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;f=s.id,h=t}if(null==d||null==f||d===f&&p===h){if(null!=d&&d===f&&p===h&&YM(a)){const t=null!=a.group&&a.group!==d,r=a.index!==p;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return UM(WM({},e),{[d]:n(e[d],p,a.index)});const r=e[d][p];return UM(WM({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===f)return UM(WM({},e),{[d]:n(e[d],p,h)});const y=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,b=e[d][p];return UM(WM({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[f]:[...e[f].slice(0,h+y),b,...e[f].slice(h+y)]})}(e,t,GM)}const XM=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,JM=Rg(),QM=Rg(e=>e(JM)?.numberOfSections??0),ZM=Rg(e=>e(JM)?.numberOfItemsInSection??[]),eR=Rg(e=>e(JM)?.keyExtractor??XM),tR=Rg(e=>e(JM)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),nR=Rg(e=>e(JM)?.onDragEnd),rR=Rg(e=>e(JM)?.onDragOver),iR=Rg(e=>e(JM)?.itemRenderer),oR=Rg(e=>e(JM)?.headerRenderer),aR=Rg(e=>e(JM)?.dragOverlayRenderer),sR=Rg(e=>e(JM)?.onClick),lR=Rg(e=>{const t=e(QM),n=e(ZM),r=e(eR),i={};for(let e=0;e<t;e++)i[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return i}),cR=Rg(null),uR=Rg(e=>e(cR),(e,t,n)=>{if(null===n)return void t(cR,null);const r=e(cR);t(cR,{...r,...n})}),dR=qE(e=>Rg(null,(t,n,r)=>{let i;"over"===e?i=t(rR):"end"===e&&(i=t(nR),n(uR,null));const{source:o,target:a}=r.operation;if("start"===e)return void n(uR,{id:o.id,startSection:o.data.sectionKey,startIndex:o.data.itemIndex,startSectionIndex:o.data.sectionIndex});if(null===a)return void n(uR,{toIndex:void 0,toSectionIndex:void 0});const s=o.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=KM(t(lR),r)[a.data.sectionIndex].indexOf(o.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(uR)?.startIndex;n(uR,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}i?.({id:o.id,toIndex:l,toSection:a.data.sectionKey,fromSection:o.data.sectionKey,startSection:t(uR)?.startSection??o.data.sectionKey,event:r})})),fR=[JM,QM,ZM,eR,tR,nR,iR,oR,sR,uR],pR=[dR],hR=({props:e,children:t})=>{const n=Fg(JM);return an.useLayoutEffect(()=>{n(e)},[e,n]),t};var mR=Symbol.for("preact-signals");function gR(){if(wR>1)wR--;else{var e,t=!1;for(!function(){var e=ER;for(ER=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==xR;){var n=xR;for(xR=void 0,SR++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&PR(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(SR=0,wR--,t)throw e}}function yR(e){if(wR>0)return e();CR=++kR,wR++;try{return e()}finally{gR()}}var bR=void 0;function vR(e){var t=bR;bR=void 0;try{return e()}finally{bR=t}}var xR=void 0,wR=0,SR=0,kR=0,CR=0,ER=void 0,MR=0;function RR(e){if(void 0!==bR){var t=e.n;if(void 0===t||t.t!==bR)return t={i:0,S:e,p:bR.s,n:void 0,t:bR,e:void 0,x:void 0,r:t},void 0!==bR.s&&(bR.s.n=t),bR.s=t,e.n=t,32&bR.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=bR.s,t.n=void 0,bR.s.n=t,bR.s=t),t}}function _R(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 AR(e,t){return new _R(e,t)}function PR(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 IR(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 TR(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 DR(e,t){_R.call(this,void 0),this.x=e,this.s=void 0,this.g=MR-1,this.f=4,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 OR(e,t){return new DR(e,t)}function NR(e){var t=e.m;if(e.m=void 0,"function"==typeof t){wR++;var n=bR;bR=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,qR(e),t}finally{bR=n,gR()}}}function qR(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,NR(e)}function LR(e){if(bR!==this)throw new Error("Out-of-order effect");TR(this),bR=e,this.f&=-2,8&this.f&&qR(this),gR()}function jR(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function zR(e,t){var n=new jR(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}_R.prototype.brand=mR,_R.prototype.h=function(){return!0},_R.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:vR(function(){var e;null==(e=t.W)||e.call(t)}))},_R.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&&vR(function(){var e;null==(e=t.Z)||e.call(t)}))}},_R.prototype.subscribe=function(e){var t=this;return zR(function(){var n=t.value,r=bR;bR=void 0;try{e(n)}finally{bR=r}},{name:"sub"})},_R.prototype.valueOf=function(){return this.value},_R.prototype.toString=function(){return this.value+""},_R.prototype.toJSON=function(){return this.value},_R.prototype.peek=function(){var e=this;return vR(function(){return e.value})},Object.defineProperty(_R.prototype,"value",{get:function(){var e=RR(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(SR>100)throw new Error("Cycle detected");!function(e){0!==wR&&0===SR&&e.l!==CR&&(e.l=CR,ER={S:e,v:e.v,i:e.i,o:ER})}(this),this.v=e,this.i++,MR++,wR++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{gR()}}}}),DR.prototype=new _R,DR.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===MR)return!0;if(this.g=MR,this.f|=1,this.i>0&&!PR(this))return this.f&=-2,!0;var e=bR;try{IR(this),bR=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 bR=e,TR(this),this.f&=-2,!0},DR.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)}_R.prototype.S.call(this,e)},DR.prototype.U=function(e){if(void 0!==this.t&&(_R.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)}},DR.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(DR.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=RR(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),jR.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()}},jR.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,NR(this),IR(this),wR++;var e=bR;return bR=this,LR.bind(this,e)},jR.prototype.N=function(){2&this.f||(this.f|=2,this.u=xR,xR=this)},jR.prototype.d=function(){this.f|=8,1&this.f||qR(this)},jR.prototype.dispose=function(){this.d()};var FR,$R,BR,HR,VR,WR,UR,GR,YR,KR,XR,JR,QR,ZR,e_,t_,n_,r_,i_,o_,a_=Object.create,s_=Object.defineProperty,l_=Object.defineProperties,c_=Object.getOwnPropertyDescriptor,u_=Object.getOwnPropertyDescriptors,d_=Object.getOwnPropertySymbols,f_=Object.prototype.hasOwnProperty,p_=Object.prototype.propertyIsEnumerable,h_=e=>{throw TypeError(e)},m_=(e,t,n)=>t in e?s_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g_=(e,t)=>s_(e,"name",{value:t,configurable:!0}),y_=["class","method","getter","setter","accessor","field","value","get","set"],b_=e=>void 0!==e&&"function"!=typeof e?h_("Function expected"):e,v_=(e,t,n,r,i)=>({kind:y_[e],name:t,metadata:r,addInitializer:e=>n._?h_("Already initialized"):i.push(b_(e||null))}),x_=(e,t)=>{return m_(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},w_=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},S_=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=y_[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&c_(d<4?i:{get[n](){return E_(this,o)},set[n](e){return R_(this,o,e)}},n));d?p&&d<4&&g_(o,(d>2?"set ":d>1?"get ":"")+n):g_(i,n);for(var v=r.length-1;v>=0;v--)c=v_(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>C_(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?E_:__)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>R_(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?p?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?b_(s)&&(d>4?g.unshift(s):d?p?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?h_("Object expected"):(b_(a=s.get)&&(b.get=a),b_(a=s.set)&&(b.set=a),b_(a=s.init)&&g.unshift(a));return d||x_(e,i),b&&s_(i,n,b),p?4^d?o:b:i},k_=(e,t,n)=>t.has(e)||h_("Cannot "+n),C_=(e,t)=>Object(t)!==t?h_('Cannot use the "in" operator on this value'):e.has(t),E_=(e,t,n)=>(k_(e,t,"read from private field"),n?n.call(e):t.get(e)),M_=(e,t,n)=>t.has(e)?h_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),R_=(e,t,n,r)=>(k_(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),__=(e,t,n)=>(k_(e,t,"access private method"),n);function A_(e,t){if(t){let n;return OR(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return OR(e)}function P_(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;const n=e.some((e,n)=>!P_(e,t[n]));return!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 i=n.some(n=>!P_(e[n],t[n]));return!i}return!1}function I_({get:e},t){return{init:e=>AR(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function T_(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=A_(e.bind(this)),n.set(this,t)),t.value}}function D_(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)=>l_(e,u_(t)))(((e,t)=>{for(var n in t||(t={}))f_.call(t,n)&&m_(e,n,t[n]);if(d_)for(var n of d_(t))p_.call(t,n)&&m_(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function O_(...e){const t=e.map(e=>zR(e));return()=>t.forEach(e=>e())}WR=[I_],VR=[I_],HR=[I_],BR=[D_()],$R=[D_()],FR=[D_()];var N_,q_=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,w_(UR,5,this),M_(this,JR),M_(this,GR,w_(UR,8,this)),w_(UR,11,this),M_(this,QR,w_(UR,12,this)),w_(UR,15,this),M_(this,n_,w_(UR,16,this)),w_(UR,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return E_(this,JR,i_)}get initial(){return E_(this,JR,KR)}get previous(){return E_(this,JR,e_)}set current(e){const t=vR(()=>E_(this,JR,i_));e&&t&&this.equals(t,e)||yR(()=>{E_(this,JR,KR)||R_(this,JR,e,XR),R_(this,JR,t,t_),R_(this,JR,e,o_)})}reset(e=this.defaultValue){yR(()=>{R_(this,JR,void 0,t_),R_(this,JR,e,XR),R_(this,JR,e,o_)})}};function L_(e){return vR(()=>{const t={};for(const n in e)t[n]=e[n];return t})}UR=[,,,a_(null)],GR=new WeakMap,JR=new WeakSet,QR=new WeakMap,n_=new WeakMap,YR=S_(UR,20,"#initial",WR,JR,GR),KR=YR.get,XR=YR.set,ZR=S_(UR,20,"#previous",VR,JR,QR),e_=ZR.get,t_=ZR.set,r_=S_(UR,20,"#current",HR,JR,n_),i_=r_.get,o_=r_.set,S_(UR,2,"current",BR,q_),S_(UR,2,"initial",$R,q_),S_(UR,2,"previous",FR,q_),x_(UR,q_);N_=new WeakMap;var j_,z_,F_,$_,B_,H_=Object.create,V_=Object.defineProperty,W_=Object.getOwnPropertyDescriptor,U_=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,Y_=Object.prototype.propertyIsEnumerable,K_=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),X_=e=>{throw TypeError(e)},J_=Math.pow,Q_=(e,t,n)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z_=["class","method","getter","setter","accessor","field","value","get","set"],eA=e=>void 0!==e&&"function"!=typeof e?X_("Function expected"):e,tA=(e,t,n,r,i)=>({kind:Z_[e],name:t,metadata:r,addInitializer:e=>n._?X_("Already initialized"):i.push(eA(e||null))}),nA=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=Z_[u+5],f=e[2]||(e[2]=[]),p=(i=i.prototype,W_(i,n)),h=r.length-1;h>=0;h--)(l=tA(u,n,s={},e[3],f)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(p[d],l),s._=1,eA(a)&&(p[d]=a);return p&&V_(i,n,p),i},rA=(e,t,n)=>t.has(e)||X_("Cannot "+n),iA=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)}},oA=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:i,width:o,height:a,scale:s}=this,l=new e(i+t,r+n,o,a);return l.scale=((e,t)=>{for(var n in t||(t={}))G_.call(t,n)&&Q_(e,n,t[n]);if(U_)for(var n of U_(t))Y_.call(t,n)&&Q_(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:o}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new iA((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:i,height:o}=this;return n===t.left&&r===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){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:i}){return new e(n,t,r,i)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==r?i:"end"==r?i+o:i+o/2};return iA.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 aA=class extends(F_=q_,z_=[T_],j_=[T_],F_){constructor(e){super(iA.from(e),(e,t)=>iA.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(B_,5,this),((e,t,n)=>{t.has(e)?X_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,$_,0),this.velocity={x:0,y:0}}get delta(){return iA.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=iA.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(rA(a=this,s=$_,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);yR(()=>{((e,t,n)=>{rA(e,t,"write to private field"),t.set(e,n)})(this,$_,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(iA.from(e)),this.velocity={x:0,y:0}}};function sA({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(J_(r,2)+J_(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n&&i>n.y}B_=(e=>{var t;return[,,,H_(null!=(t=null==e?void 0:e[K_("metadata")])?t:null)]})(F_),$_=new WeakMap,nA(B_,2,"delta",z_,aA),nA(B_,2,"direction",j_,aA),((e,t)=>{Q_(t,K_("metadata"),e[3])})(B_,aA);var lA,cA,uA,dA,fA=(e=>(e.Horizontal="x",e.Vertical="y",e))(fA||{}),pA=Object.values(fA),hA=Object.create,mA=Object.defineProperty,gA=Object.defineProperties,yA=Object.getOwnPropertyDescriptor,bA=Object.getOwnPropertyDescriptors,vA=Object.getOwnPropertySymbols,xA=Object.prototype.hasOwnProperty,wA=Object.prototype.propertyIsEnumerable,SA=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),kA=e=>{throw TypeError(e)},CA=(e,t,n)=>t in e?mA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EA=(e,t)=>{for(var n in t||(t={}))xA.call(t,n)&&CA(e,n,t[n]);if(vA)for(var n of vA(t))wA.call(t,n)&&CA(e,n,t[n]);return e},MA=(e,t)=>gA(e,bA(t)),RA=(e,t)=>mA(e,"name",{value:t,configurable:!0}),_A=(e,t)=>{var n={};for(var r in e)xA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&vA)for(var r of vA(e))t.indexOf(r)<0&&wA.call(e,r)&&(n[r]=e[r]);return n},AA=e=>{var t;return[,,,hA(null!=(t=null==e?void 0:e[SA("metadata")])?t:null)]},PA=["class","method","getter","setter","accessor","field","value","get","set"],IA=e=>void 0!==e&&"function"!=typeof e?kA("Function expected"):e,TA=(e,t,n,r,i)=>({kind:PA[e],name:t,metadata:r,addInitializer:e=>n._?kA("Already initialized"):i.push(IA(e||null))}),DA=(e,t)=>CA(t,SA("metadata"),e[3]),OA=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},NA=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=PA[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&yA(d<4?i:{get[n](){return jA(this,o)},set[n](e){return FA(this,o,e)}},n));d?p&&d<4&&RA(o,(d>2?"set ":d>1?"get ":"")+n):RA(i,n);for(var v=r.length-1;v>=0;v--)c=TA(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>LA(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?jA:$A)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>FA(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?p?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?IA(s)&&(d>4?g.unshift(s):d?p?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?kA("Object expected"):(IA(a=s.get)&&(b.get=a),IA(a=s.set)&&(b.set=a),IA(a=s.init)&&g.unshift(a));return d||DA(e,i),b&&mA(i,n,b),p?4^d?o:b:i},qA=(e,t,n)=>t.has(e)||kA("Cannot "+n),LA=(e,t)=>Object(t)!==t?kA('Cannot use the "in" operator on this value'):e.has(t),jA=(e,t,n)=>(qA(e,t,"read from private field"),n?n.call(e):t.get(e)),zA=(e,t,n)=>t.has(e)?kA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),FA=(e,t,n,r)=>(qA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$A=(e,t,n)=>(qA(e,t,"access private method"),n);function BA(e,t){return{plugin:e,options:t}}function HA(e){return t=>BA(e,t)}function VA(e){return"function"==typeof e?{plugin:e,options:void 0}:e}lA=[I_];var WA=class{constructor(e,t){this.manager=e,this.options=t,zA(this,uA,OA(cA,8,this,!1)),OA(cA,11,this),zA(this,dA,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return vR(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=zR(e.bind(this));return jA(this,dA).add(t),t}destroy(){jA(this,dA).forEach(e=>e())}static configure(e){return BA(this,e)}};cA=AA(null),uA=new WeakMap,dA=new WeakMap,NA(cA,4,"disabled",lA,WA,uA),DA(cA,WA);var UA,GA=class extends WA{},YA=class{constructor(e){this.manager=e,this.instances=new Map,zA(this,UA,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(VA).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 jA(this,UA))if(!n.includes(e)){if(e.prototype instanceof GA)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);FA(this,UA,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 KA(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}UA=new WeakMap;var XA,JA,QA,ZA,eP,tP,nP,rP,iP,oP,aP,sP,lP=[],cP=class extends WA{constructor(e){super(e),zA(this,XA),zA(this,JA),this.computeCollisions=this.computeCollisions.bind(this),FA(this,JA,AR(lP)),this.destroy=O_(()=>{const e=this.computeCollisions(),t=vR(()=>this.manager.dragOperation.position.current);if(e!==lP){const e=jA(this,XA);if(FA(this,XA,t),e&&t.x==e.x&&t.y==e.y)return}else FA(this,XA,void 0);jA(this,JA).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){vR(()=>{e?jA(this,JA).value=this.computeCollisions():FA(this,XA,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return lP;const s=[],l=[];for(const o of null!=e?e:n.droppables){if(o.disabled)continue;if(i&&!o.accepts(i))continue;const e=null!=t?t:o.collisionDetector;if(!e)continue;l.push(o),o.shape;const n=vR(()=>e({droppable:o,dragOperation:r}));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?lP:(s.sort(KA),s)}get collisions(){return jA(this,JA).value}};XA=new WeakMap,JA=new WeakMap,eP=[I_],ZA=[I_],QA=[I_];var uP=class e{constructor(e,t){zA(this,iP,OA(rP,8,this)),OA(rP,11,this),zA(this,oP),zA(this,aP,OA(rP,12,this)),OA(rP,15,this),zA(this,sP,OA(rP,16,this)),OA(rP,19,this);const{effects:n,id:r,data:i={},disabled:o=!1,register:a=!0}=e;let s=r;FA(this,oP,AR(r)),this.manager=t,this.data=i,this.disabled=o,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=jA(this,oP).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:jA(this,oP).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return $A(t=e,tP,nP).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)}};rP=AA(null),tP=new WeakSet,nP=function(){const e=uP.pendingIdChanges;uP.pendingIdChanges=null,e&&yR(()=>{for(const[t,n]of e)jA(t,oP).value=n})},iP=new WeakMap,oP=new WeakMap,aP=new WeakMap,sP=new WeakMap,NA(rP,4,"manager",eP,uP,iP),NA(rP,4,"data",ZA,uP,aP),NA(rP,4,"disabled",QA,uP,sP),zA(uP,tP),DA(rP,uP),uP.pendingIdChanges=null;var dP,fP,pP,hP,mP,gP,yP,bP,vP,xP,wP,SP,kP,CP,EP,MP,RP,_P,AP,PP,IP,TP,DP,OP,NP=uP,qP=class{constructor(){this.map=AR(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const o=new Map(n);for(const[r,i]of n)if(i===t&&r!==e){o.delete(r);break}o.set(e,t),this.map.value=o;const a=O_(...t.effects());return this.cleanupFunctions.set(t,a),i},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 i=new Map(n);i.delete(e),this.map.value=i}}[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}},LP=class extends(yP=NP,gP=[I_],mP=[I_],hP=[I_],pP=[T_],fP=[T_],dP=[T_],yP){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o,plugins:a,effects:s}=n,l=_A(n,["modifiers","type","sensors","plugins","effects"]);super(MA(EA({},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}=VA(n);e.registry.plugins.register(t)}}]}}),t),OA(bP,5,this),zA(this,vP,OA(bP,8,this)),OA(bP,11,this),zA(this,xP,OA(bP,12,this)),OA(bP,15,this),zA(this,wP,OA(bP,16,this,this.isDragSource?"dragging":"idle")),OA(bP,19,this),this.type=i,this.sensors=o,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=VA(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}};bP=AA(yP),vP=new WeakMap,xP=new WeakMap,wP=new WeakMap,NA(bP,4,"type",gP,LP,vP),NA(bP,4,"modifiers",mP,LP,xP),NA(bP,4,"status",hP,LP,wP),NA(bP,2,"isDropping",pP,LP),NA(bP,2,"isDragging",fP,LP),NA(bP,2,"isDragSource",dP,LP),DA(bP,LP);var jP=class extends(_P=NP,RP=[I_],MP=[I_],EP=[I_],CP=[I_],kP=[I_],SP=[T_],_P){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(_A(n,["accept","collisionDetector","collisionPriority","type"]),t),OA(AP,5,this),zA(this,PP,OA(AP,8,this)),OA(AP,11,this),zA(this,IP,OA(AP,12,this)),OA(AP,15,this),zA(this,TP,OA(AP,16,this)),OA(AP,19,this),zA(this,DP,OA(AP,20,this)),OA(AP,23,this),zA(this,OP,OA(AP,24,this)),OA(AP,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=o,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}};AP=AA(_P),PP=new WeakMap,IP=new WeakMap,TP=new WeakMap,DP=new WeakMap,OP=new WeakMap,NA(AP,4,"accept",RP,jP,PP),NA(AP,4,"type",MP,jP,IP),NA(AP,4,"collisionDetector",EP,jP,TP),NA(AP,4,"collisionPriority",CP,jP,DP),NA(AP,4,"shape",kP,jP,OP),NA(AP,2,"isDropTarget",SP,jP),DA(AP,jP);var zP=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)}},FP=class extends zP{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function $P(e,t=!0){let n=!1;return MA(EA({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var BP,HP,VP,WP,UP,GP,YP,KP,XP,JP=class extends GA{constructor(e){super(e);let t=[];this.destroy=O_(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:i}=n;if(n.isDisabled())return;if(NP.pendingIdChanges)return;const o=$P({collisions:i});if(r.dispatch("collision",o),o.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(i,t))return;t=i;const[a]=i;vR(()=>{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()}))})})}},QP=(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))(QP||{}),ZP=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(ZP||{});YP=[I_],GP=[T_],UP=[T_],WP=[T_],VP=[T_],HP=[T_],BP=[T_];var eI=class{constructor(){OA(KP,5,this),zA(this,XP,OA(KP,8,this,"idle")),OA(KP,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};KP=AA(null),XP=new WeakMap,NA(KP,4,"value",YP,eI,XP),NA(KP,2,"current",GP,eI),NA(KP,2,"idle",UP,eI),NA(KP,2,"initializing",WP,eI),NA(KP,2,"initialized",VP,eI),NA(KP,2,"dragging",HP,eI),NA(KP,2,"dropped",BP,eI),DA(KP,eI);var tI,nI=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 vR(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=$P({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return vR(()=>{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:i}=e;yR(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)});const o=$P({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.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&&yR(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return vR(()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=$P({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,i,o,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!=(o=null==(i=e.by)?void 0:i.y)?o:0)};r.position.current=l})})}stop(e={}){return vR(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=vR(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=zR(()=>{"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 o=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),o?o.then(a).catch(()=>r.reset()):a()})}},rI=class extends WA{constructor(e,t){super(e,t),this.manager=e,this.options=t}},iI=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)}},oI=class{constructor(e){this.options=e,zA(this,tI)}set controller(e){FA(this,tI,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=jA(this,tI))||t.activate(e)}};tI=new WeakMap;var aI,sI,lI,cI,uI,dI,fI,pI,hI,mI,gI,yI,bI,vI,xI,wI,SI,kI,CI,EI=class extends WA{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},MI=class{constructor(e){this.draggables=new qP,this.droppables=new qP,this.plugins=new YA(e),this.sensors=new YA(e),this.modifiers=new YA(e)}register(e,t){if(e instanceof LP)return this.draggables.register(e.id,e);if(e instanceof jP)return this.droppables.register(e.id,e);if(e.prototype instanceof EI)return this.modifiers.register(e,t);if(e.prototype instanceof rI)return this.sensors.register(e,t);if(e.prototype instanceof WA)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof NP)return e instanceof LP?this.draggables.unregister(e.id,e):e instanceof jP?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof EI)return this.modifiers.unregister(e);if(e.prototype instanceof rI)return this.sensors.unregister(e);if(e.prototype instanceof WA)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()}};hI=[T_],pI=[I_],fI=[I_],dI=[I_],uI=[I_],cI=[I_],lI=[T_],sI=[T_],aI=[T_];var RI=class{constructor(e){OA(bI,5,this),zA(this,mI),zA(this,gI),zA(this,yI,new q_(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new eI,zA(this,vI,OA(bI,8,this,!1)),OA(bI,11,this),zA(this,xI,OA(bI,12,this,null)),OA(bI,15,this),zA(this,wI,OA(bI,16,this,null)),OA(bI,19,this),zA(this,SI,OA(bI,20,this,null)),OA(bI,23,this),zA(this,kI,OA(bI,24,this,[])),OA(bI,27,this),this.position=new aA({x:0,y:0}),zA(this,CI,{x:0,y:0}),FA(this,mI,e)}get shape(){const{current:e,initial:t,previous:n}=jA(this,yI);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?jA(this,yI).current=e:jA(this,yI).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=jA(this,mI).registry.draggables.get(t);return n&&FA(this,gI,n),null!=(e=null!=n?n:jA(this,gI))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=jA(this,mI).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(MA(EA({},this.snapshot()),{transform:n}));return FA(this,CI,n),n}snapshot(){return vR(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:jA(this,CI),shape:this.shape?L_(this.shape):null,position:L_(this.position),status:L_(this.status),canceled:this.canceled}))}reset(){yR(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,jA(this,yI).reset(),this.position.reset({x:0,y:0}),FA(this,CI,{x:0,y:0}),this.modifiers=[]})}};bI=AA(null),mI=new WeakMap,gI=new WeakMap,yI=new WeakMap,vI=new WeakMap,xI=new WeakMap,wI=new WeakMap,SI=new WeakMap,kI=new WeakMap,CI=new WeakMap,NA(bI,2,"shape",hI,RI),NA(bI,4,"canceled",pI,RI,vI),NA(bI,4,"activatorEvent",fI,RI,xI),NA(bI,4,"sourceIdentifier",dI,RI,wI),NA(bI,4,"targetIdentifier",uI,RI,SI),NA(bI,4,"modifiers",cI,RI,kI),NA(bI,2,"source",lI,RI),NA(bI,2,"target",sI,RI),NA(bI,2,"transform",aI,RI),DA(bI,RI);var _I={get rendering(){return Promise.resolve()}};function AI(e,t){return"function"==typeof e?e(t):null!=e?e:t}var PI=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=AI(n.plugins,[]),i=AI(n.sensors,[]),o=AI(n.modifiers,[]),a=null!=(t=n.renderer)?t:_I,s=new FP(this),l=new MI(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new nI(this),this.dragOperation=new RI(this),this.collisionObserver=new cP(this),this.plugins=[JP,...r],this.modifiers=o,this.sensors=i;const{destroy:c}=this,u=O_(()=>{var e,t,n;const r=vR(()=>this.dragOperation.modifiers),i=this.modifiers;for(const e of r)i.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}=VA(e);return new t(this,n)}))?n:i});this.destroy=()=>{u(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},II=e=>{throw TypeError(e)},TI=(e,t,n)=>t.has(e)||II("Cannot "+n),DI=(e,t,n)=>(TI(e,t,"read from private field"),t.get(e)),OI=(e,t,n)=>t.has(e)?II("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),NI=(e,t,n,r)=>(TI(e,t,"write to private field"),t.set(e,n),n),qI=(e,t,n)=>(TI(e,t,"access private method"),n);function LI(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function jI(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,i=(LI(n)?n.getKeyframes():[]).filter(t);i.length>0&&(r=[i[i.length-1],e])}return r}function zI(e){const{width:t,height:n,top:r,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:o,right:a}}function FI(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function $I(e){return"nodeType"in e}function BI(e){var t,n,r;return e?FI(e)?e:$I(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 HI(e){const{Document:t}=BI(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function VI(e){return!(!e||FI(e))&&(e instanceof BI(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function WI(e){return e instanceof BI(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function UI(e){return e?FI(e)?e.document:$I(e)?HI(e)?e:VI(e)||WI(e)?e.ownerDocument:document:document:document}function GI(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===i}function YI(e,t=e.getBoundingClientRect(),n=0){var r,i,o,a,s;let l=t;const{ownerDocument:c}=e,u=null!=(r=c.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==c.documentElement;){if(!GI(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),i=n*(e.bottom-e.top),o=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+i),left:Math.max(l.left,e.left-o),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const f=u.visualViewport,p=null!=(i=null==f?void 0:f.offsetTop)?i:0,h=null!=(o=null==f?void 0:f.offsetLeft)?o:0,m=null!=(a=null==f?void 0:f.width)?a:u.innerWidth,g=null!=(s=null==f?void 0:f.height)?s:u.innerHeight,y=n*g,b=n*m;return l={top:Math.max(l.top,p-y),right:Math.min(l.right,h+m+b),bottom:Math.min(l.bottom,p+g+y),left:Math.max(l.left,h-b),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function KI(e){return{x:e.clientX,y:e.clientY}}var XI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function JI(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(...JI(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...JI(i.document,t))}}catch(e){}return n}function QI(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ZI(){var e,t;const n=QI()?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 eT(e){return!(!e||!$I(e))&&e instanceof BI(e).ShadowRoot}function tT(e){if(e&&$I(e)){let t=e.getRootNode();if(eT(t))return t;if(t instanceof Document)return t}return UI(e)}function nT(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function rT(e){return"value"in e}function iT(e){return"CANVAS"===e.tagName}function oT(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:i,top:o}=r.getBoundingClientRect();return oT(e,{x:t-i,y:n-o})}}return r}var aT=new WeakMap;var sT=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:o}=t,a=[e,t];e.addEventListener(n,r,o),this.entries.add(a),i.push(a)}const o=this.entries;return function(){for(const e of i){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i),o.delete(e)}}}};function lT(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function cT(e,t){const n=()=>performance.now();let r,i;return function(...o){const a=this;i?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,o),i=n()},t-(n()-i))):(e.apply(a,o),i=n())}}var uT,dT=XI?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},fT=class extends dT{constructor(e){super(t=>{DI(this,uT)?e(t,this):NI(this,uT,!0)}),OI(this,uT,!1)}};uT=new WeakMap;var pT,hT,mT,gT,yT,bT,vT,xT,wT,ST,kT,CT=Array.from({length:100},(e,t)=>t/100),ET=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,OI(this,wT),this.disconnect=()=>{var e,t,n;NI(this,vT,!0),null==(e=DI(this,mT))||e.disconnect(),null==(t=DI(this,gT))||t.disconnect(),DI(this,yT).disconnect(),null==(n=DI(this,bT))||n.remove()},OI(this,pT,!0),OI(this,hT),OI(this,mT),OI(this,gT),OI(this,yT),OI(this,bT),OI(this,vT,!1),OI(this,xT,cT(()=>{var e,t,n;const{element:r}=this;if(null==(e=DI(this,gT))||e.disconnect(),DI(this,vT)||!DI(this,pT)||!r.isConnected)return;const i=null!=(t=r.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(n=i.defaultView)?n:window,s=r.getBoundingClientRect(),l=YI(r,s),{top:c,left:u,bottom:d,right:f}=l,p=-Math.floor(c),h=-Math.floor(u),m=`${p}px ${-Math.floor(a-f)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,NI(this,gT,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:oA.intersectionRatio(n,YI(r)))&&DI(this,xT).call(this)},{threshold:CT,rootMargin:m,root:i})),DI(this,gT).observe(r),qI(this,wT,ST).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),NI(this,pT,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=YI(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const i=e.ownerDocument;(null==n?void 0:n.debug)&&(NI(this,bT,document.createElement("div")),DI(this,bT).style.background="rgba(0,0,0,0.15)",DI(this,bT).style.position="fixed",DI(this,bT).style.pointerEvents="none",i.body.appendChild(DI(this,bT))),NI(this,yT,new IntersectionObserver(t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,c=DI(this,pT);NI(this,pT,a),(s||l)&&(c&&!a?(null==(n=DI(this,gT))||n.disconnect(),this.callback(null),null==(r=DI(this,mT))||r.disconnect(),NI(this,mT,void 0),DI(this,bT)&&(DI(this,bT).style.visibility="hidden")):DI(this,xT).call(this),a&&!DI(this,mT)&&(NI(this,mT,new fT(DI(this,xT))),DI(this,mT).observe(e)))},{threshold:CT,root:i})),DI(this,pT)&&!n.skipInitial&&this.callback(this.boundingClientRect),DI(this,yT).observe(e)}};pT=new WeakMap,hT=new WeakMap,mT=new WeakMap,gT=new WeakMap,yT=new WeakMap,bT=new WeakMap,vT=new WeakMap,xT=new WeakMap,wT=new WeakSet,ST=function(){DI(this,vT)||(qI(this,wT,kT).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,DI(this,hT))||(this.callback(this.boundingClientRect),NI(this,hT,this.boundingClientRect)))},kT=function(){if(DI(this,bT)){const{top:e,left:t,width:n,height:r}=YI(this.element);DI(this,bT).style.overflow="hidden",DI(this,bT).style.visibility="visible",DI(this,bT).style.top=`${Math.floor(e)}px`,DI(this,bT).style.left=`${Math.floor(t)}px`,DI(this,bT).style.width=`${Math.floor(n)}px`,DI(this,bT).style.height=`${Math.floor(r)}px`}};var MT,RT,_T,AT,PT=new WeakMap,IT=new WeakMap;function TT(e,t){let n=PT.get(e);if(!n){const t=new ET(e,t=>{const n=PT.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),PT.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(PT.delete(e),n.disconnect())}}var DT=class{constructor(e,t,n){this.callback=t,OI(this,MT),OI(this,RT,!1),OI(this,_T),OI(this,AT,cT(e=>{if(!DI(this,RT)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of DI(this,_T))if(e.target.contains(t)){this.callback(DI(this,MT).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=lT(e);for(;n;)t.add(n),n=lT(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=TT(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!IT.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}),IT.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=IT.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),IT.delete(r))}):()=>{}}(e,DI(this,AT));NI(this,_T,r),NI(this,MT,new ET(e,t,n)),this.disconnect=()=>{DI(this,RT)||(NI(this,RT,!0),i(),o(),DI(this,MT).disconnect())}}};function OT(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function NT(e){try{OT(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function qT(e){return!(!XI||!e)&&e===UI(e).scrollingElement}function LT(e){var t,n;const r=BI(e),i=qT(e)?function(e){var t,n,r,i;const{documentElement:o}=UI(e),a=BI(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:o.clientHeight,c=null!=(r=null==a?void 0:a.offsetTop)?r:0,u=null!=(i=null==a?void 0:a.offsetLeft)?i:0;return{top:c,left:u,right:u+s,bottom:c+l,width:s,height:l}}(e):zI(e),o=r.visualViewport,a=qT(e)?{height:null!=(t=null==o?void 0:o.height)?t:r.innerHeight,width:null!=(n=null==o?void 0:o.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:i,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 jT(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=LT(e),{x:s,y:l}=null!=t?t:{x:0,y:0},c=!n&&a.current.y+l>0,u=!r&&a.current.y+l<a.max.y,d=!i&&a.current.x+s>0,f=!o&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:f,x:d||f,y:c||u}}MT=new WeakMap,RT=new WeakMap,_T=new WeakMap,AT=new WeakMap;var zT=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))}},FT=new zT(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),$T=new zT(e=>setTimeout(e,50)),BT=new Map,HT=BT.clear.bind(BT);function VT(e,t=!1){if(!t)return WT(e);let n=BT.get(e);return n||(n=WT(e),BT.set(e,n),$T.schedule(HT),n)}function WT(e){return BI(e).getComputedStyle(e)}var UT={excludeElement:!0,escapeShadowDOM:!0};function GT(e,t=UT){const{limit:n,excludeElement:r,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=n&&o.size>=n)return o;if(!a)return o;if(HI(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&eT(a))return t(a.host);if(!VI(a))return WI(a)?t(a.parentElement):o;if(o.has(a))return o;const s=VT(a,!0);if(r&&a===e||function(e,t=VT(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)&&o.add(a),function(e,t=VT(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&o.add(e),o}return t(a.parentNode)}(e):o}function YT(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=lT(e);for(;r;){if(r===t)return n;const e=zI(r),{x:i,y:o}=KT(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*i,n.scaleY=n.scaleY*o,r=lT(r)}return n}function KT(e,t=zI(e)){const n=Math.round(t.width),r=Math.round(t.height);if(VI(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=VT(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function XT(e){if("none"===e)return null;const[t,n,r="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function JT(e){var t,n,r,i,o,a,s,l,c;const{scale:u,transform:d,translate:f}=e,p=function(e){if("none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(u),h=XT(f),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&&!p&&!h)return null;const g=null!=(t=null==p?void 0:p.x)?t:1,y=null!=(n=null==p?void 0:p.y)?n:1,b=null!=(r=null==h?void 0:h.x)?r:0,v=null!=(i=null==h?void 0:h.y)?i:0,x=null!=(o=null==m?void 0:m.x)?o:0,w=null!=(a=null==m?void 0:m.y)?a:0,S=null!=(s=null==m?void 0:m.scaleX)?s:1,k=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:b+x,y:v+w,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*S,scaleY:y*k}}var QT=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(QT||{}),ZT={x:.2,y:.2},eD={x:10,y:10};function tD(e,t,n,r=25,i=ZT,o=eD){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:f}=LT(e),p=YT(e),h=JT(VT(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,y=new oA(l.left*p.scaleX+p.x,l.top*p.scaleY+p.y,l.width*p.scaleX,l.height*p.scaleY),b={x:0,y:0},v={x:0,y:0},x=y.height*i.y,w=y.width*i.x;return x>0&&(!c||g&&!u)&&s<=y.top+x&&1!==(null==n?void 0:n.y)&&a>=y.left-o.x&&a<=y.right+o.x?(b.y=g?1:-1,v.y=r*Math.abs((y.top+x-s)/x)):x>0&&(!u||g&&!c)&&s>=y.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=y.left-o.x&&a<=y.right+o.x&&(b.y=g?-1:1,v.y=r*Math.abs((y.bottom-x-s)/x)),w>0&&(!f||m&&!d)&&a>=y.right-w&&-1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y?(b.x=m?-1:1,v.x=r*Math.abs((y.right-w-a)/w)):w>0&&(!d||m&&!f)&&a<=y.left+w&&1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y&&(b.x=m?1:-1,v.x=r*Math.abs((y.left+w-a)/w)),{direction:b,speed:v}}function nD(e,{block:t="nearest",inline:n="nearest"}={}){if(!VI(e))return;const r=GT(e),i=[];for(const o of r){if(!VI(o))continue;const{top:r,left:a}=iD(e,o);let s=r,l=a;for(const e of i)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<o.scrollTop;n!==s+e.offsetHeight>o.scrollTop+o.clientHeight&&(o.scrollTop="center"===t?s-o.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-o.clientHeight)}if("none"!==n){const t=l<o.scrollLeft;t!==l+e.offsetWidth>o.scrollLeft+o.clientWidth&&(o.scrollLeft="center"===n?l-o.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-o.clientWidth)}i.push(o)}}function rD(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!VI(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function iD(e,t){const n=rD(e),r=rD(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function oD({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function aD(e,t=VT(e).translate,n=!0){if(n){const t=jI(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=XT(e);if(t)return t}}}if(t){const e=XT(t);if(e)return e}return{x:0,y:0,z:0}}var sD=new zT(e=>setTimeout(e,0)),lD=new Map,cD=lD.clear.bind(lD);function uD(e,t){const n=function(e){const t=e.ownerDocument;let n=lD.get(t);if(n)return n;n=t.getAnimations(),lD.set(t,n),sD.schedule(cD);const r=n.filter(t=>LI(t.effect)&&t.effect.target===e);return lD.set(e,r),n}(e).filter(e=>{var n,r;if(LI(e.effect)){const{target:i}=e.effect;if(null==(r=i&&(null==(n=t.isValidTarget)?void 0:n.call(t,i)))||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 dD=class extends oA{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=YT(e),ignoreTransforms:s,getBoundingClientRect:l=zI}=t,c=uD(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||QI())&&t.contains(e)}),u=l(e);let d,{top:f,left:p,width:h,height:m}=u;const g=VT(e),y=JT(g),b={x:null!=(n=null==y?void 0:y.scaleX)?n:1,y:null!=(r=null==y?void 0:y.scaleY)?r:1},v=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,i,o,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=LI(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:c}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(i=l,a=!0),"string"==typeof c&&c&&(o=c,a=!0)}return a?JT({transform:null!=r?r:t.transform,translate:null!=i?i:t.translate,scale:null!=o?o:t.scale}):null}(e,g);null==c||c(),y&&(d=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-r)*parseFloat(n),l=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(u,y,g.transformOrigin),(s||v)&&(f=d.top,p=d.left,h=d.width,m=d.height));const x={width:null!=(i=null==d?void 0:d.width)?i:h,height:null!=(o=null==d?void 0:d.height)?o:m};if(v&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-r)*parseFloat(n),l=e.top+a+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width*r:e.width,u=i?e.height*i:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(d,v,g.transformOrigin);f=e.top,p=e.left,h=e.width,m=e.height,b.x=v.scaleX,b.y=v.scaleY}a&&(s||(p*=a.scaleX,h*=a.scaleX,f*=a.scaleY,m*=a.scaleY),p+=a.x,f+=a.y),super(p,f,h,m),this.scale=b,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function fD(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 pD=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(fD(n))for(const[r,i]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 i?i:`${i}px`)}}remove(e,t=""){const{element:n}=this;if(fD(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(fD(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function hD(e){return!!e&&(e instanceof BI(e).Element||$I(e)&&e.nodeType===Node.ELEMENT_NODE)}function mD(e){if(!e)return!1;const{KeyboardEvent:t}=BI(e.target);return e instanceof t}var gD={};function yD(e){const t=null==gD[e]?0:gD[e]+1;return gD[e]=t,`${e}-${t}`}var bD=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/iA.distance(t.shape.center,n),type:ZP.PointerIntersection,priority:QP.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:i}=e,o=iA.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:ZP.ShapeIntersection,priority:QP.Normal}}return null})(e)},vD=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?oA.from(r.current.boundingRectangle).corners:void 0,a=oA.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+iA.distance(iA.from(t),null!=(r=null==o?void 0:o[n])?r:i.current)},0),s=a/4;return{id:n.id,value:1/s,type:ZP.Collision,priority:QP.Normal}},xD=Object.create,wD=Object.defineProperty,SD=Object.defineProperties,kD=Object.getOwnPropertyDescriptor,CD=Object.getOwnPropertyDescriptors,ED=Object.getOwnPropertySymbols,MD=Object.prototype.hasOwnProperty,RD=Object.prototype.propertyIsEnumerable,_D=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),AD=e=>{throw TypeError(e)},PD=(e,t,n)=>t in e?wD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ID=(e,t)=>{for(var n in t||(t={}))MD.call(t,n)&&PD(e,n,t[n]);if(ED)for(var n of ED(t))RD.call(t,n)&&PD(e,n,t[n]);return e},TD=(e,t)=>SD(e,CD(t)),DD=(e,t)=>wD(e,"name",{value:t,configurable:!0}),OD=(e,t)=>{var n={};for(var r in e)MD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ED)for(var r of ED(e))t.indexOf(r)<0&&RD.call(e,r)&&(n[r]=e[r]);return n},ND=e=>{var t;return[,,,xD(null!=(t=null==e?void 0:e[_D("metadata")])?t:null)]},qD=["class","method","getter","setter","accessor","field","value","get","set"],LD=e=>void 0!==e&&"function"!=typeof e?AD("Function expected"):e,jD=(e,t,n,r,i)=>({kind:qD[e],name:t,metadata:r,addInitializer:e=>n._?AD("Already initialized"):i.push(LD(e||null))}),zD=(e,t)=>PD(t,_D("metadata"),e[3]),FD=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},$D=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=qD[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&kD(d<4?i:{get[n](){return VD(this,o)},set[n](e){return UD(this,o,e)}},n));d?p&&d<4&&DD(o,(d>2?"set ":d>1?"get ":"")+n):DD(i,n);for(var v=r.length-1;v>=0;v--)c=jD(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>HD(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?VD:GD)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>UD(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?p?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?LD(s)&&(d>4?g.unshift(s):d?p?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?AD("Object expected"):(LD(a=s.get)&&(b.get=a),LD(a=s.set)&&(b.set=a),LD(a=s.init)&&g.unshift(a));return d||zD(e,i),b&&wD(i,n,b),p?4^d?o:b:i},BD=(e,t,n)=>t.has(e)||AD("Cannot "+n),HD=(e,t)=>Object(t)!==t?AD('Cannot use the "in" operator on this value'):e.has(t),VD=(e,t,n)=>(BD(e,t,"read from private field"),n?n.call(e):t.get(e)),WD=(e,t,n)=>t.has(e)?AD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),UD=(e,t,n,r)=>(BD(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),GD=(e,t,n)=>(BD(e,t,"access private method"),n),YD="button",KD="draggable",XD="dnd-kit-description",JD="dnd-kit-announcement",QD={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."},ZD={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 eO(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var tO=["dragover","dragmove"],nO=class extends WA{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=XD,announcement:i=JD}={},announcements:o=ZD,screenReaderInstructions:a=QD,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:yD(r),c=n?`${i}-${n}`:yD(i);let u,d,f,p;const h=(e=p)=>{f&&e&&(null==f?void 0:f.nodeValue)!==e&&(f.nodeValue=e)},m=()=>FT.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),y=Object.entries(o).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const i=f;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(p=o,tO.includes(e)?g():(m(),g.cancel()))})),b=()=>{let e=[];(null==u?void 0:u.isConnected)||(u=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(u)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(c),f=document.createTextNode(""),d.appendChild(f),e.push(d)),e.length>0&&document.body.append(...e)},v=new Set;function x(){for(const e of v)e()}this.registerEffect(()=>{var e;v.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||v.add(b),eO(n)&&!QI()||n.hasAttribute("tabindex")||v.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||v.add(()=>n.setAttribute("role",YD)),n.hasAttribute("aria-roledescription")||v.add(()=>n.setAttribute("aria-roledescription",KD)),n.hasAttribute("aria-describedby")||v.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&v.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&v.add(()=>n.setAttribute("aria-disabled",e))}}v.size>0&&FT.schedule(x)}),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),y.forEach(e=>e())}}};var rO,iO,oO,aO,sO,lO,cO,uO,dO,fO,pO,hO,mO,gO=new Map,yO=class extends(sO=GA,aO=[I_],oO=[T_],iO=[T_],rO=[T_],sO){constructor(e,t){super(e,t),FD(cO,5,this),WD(this,dO),WD(this,lO,new Set),WD(this,uO,FD(cO,8,this,new Set)),FD(cO,11,this),this.registerEffect(GD(this,dO,fO))}register(e){return VD(this,lO).add(e),()=>{VD(this,lO).delete(e)}}addRoot(e){return vR(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{vR(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return tT(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return tT(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}};cO=ND(sO),lO=new WeakMap,uO=new WeakMap,dO=new WeakSet,fO=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of VD(this,lO))t.push(GD(this,dO,pO).call(this,n,e));return()=>{for(const e of t)e()}},pO=function(e,t){let n=gO.get(e);n||(n=new Map,gO.set(e,n));let r=n.get(t);if(!r){const i=HI(e)?GD(this,dO,hO).call(this,e,n,t):GD(this,dO,mO).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,0===r.refCount&&r.cleanup())}},hO=function(e,t,n){var r;const i=e.createElement("style"),{nonce:o}=null!=(r=this.options)?r:{};o&&i.setAttribute("nonce",o),i.textContent=n,e.head.prepend(i);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===i)return void e.head.prepend(i)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),i.remove(),t.delete(n),0===t.size&&gO.delete(e)}}},mO=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:i}=null!=r?r:{};if(!i)return null;const o=new i;return o.replaceSync(n),e.adoptedStyleSheets.push(o),{refCount:0,cleanup:()=>{var r;if(eT(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(o);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&gO.delete(e)}}},$D(cO,4,"additionalRoots",aO,yO,uO),$D(cO,2,"sourceRoot",oO,yO),$D(cO,2,"targetRoot",iO,yO),$D(cO,2,"roots",rO,yO),zD(cO,yO),yO.configure=HA(yO);var bO=yO,vO="data-dnd-",xO=`${vO}dropping`,wO="--dnd-",SO=`${vO}dragging`,kO=`${vO}placeholder`,CO=[SO,kO,"popover","aria-pressed","aria-grabbing"],EO=["view-transition-name"],MO=`\n :is(:root,:host) [${SO}] {\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(${wO}top, 0px) !important;\n left: var(${wO}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${wO}width, auto);\n max-width: var(${wO}width, auto);\n height: var(${wO}height, auto);\n max-height: var(${wO}height, auto);\n transform: var(${wO}transform, none) !important;\n transition: var(${wO}transition) !important;\n }\n\n :is(:root,:host) [${kO}] {\n transition: none;\n }\n\n :is(:root,:host) [${kO}='hidden'] {\n visibility: hidden;\n }\n\n [${SO}] * {\n pointer-events: none !important;\n }\n\n [${SO}]:not([${xO}]) {\n translate: var(${wO}translate) !important;\n }\n\n [${SO}][style*='${wO}scale'] {\n scale: var(${wO}scale) !important;\n transform-origin: var(${wO}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${SO}][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 [${SO}]::backdrop, [${vO}overlay]:not([${SO}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function RO(e,t="hidden"){return vR(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const i=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${vO}${yD("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),o=[],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(rT(e)&&rT(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),iT(e)&&iT(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,i]of e){if(!r.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!o)continue;const a=r.element;r.proxy=o,o.removeAttribute(i),aT.set(a,o),n.push(()=>{aT.delete(a),r.proxy=void 0})}}(i,a,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(kO,t)}(a,t),a.remove=()=>{o.forEach(e=>e()),s.call(a)},a})}function _O(e,t){return e===t||lT(e)===lT(t)}function AO(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&hD(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>NT(t))}function PO(e){return"TR"===e.tagName}var IO,TO,DO,OO,NO,qO,LO,jO=250,zO="ease";var FO=class extends(TO=WA,IO=[I_],TO){constructor(e,t){super(e,t),WD(this,NO),WD(this,OO,FD(DO,8,this)),FD(DO,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(bO),r=null==n?void 0:n.register(MO);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(GD(this,NO,qO).bind(this,n)),this.registerEffect(GD(this,NO,LO))}};DO=ND(TO),OO=new WeakMap,NO=new WeakSet,qO=function(e){const{overlay:t}=this;if(!t||!e)return;const n=tT(t);return n?e.addRoot(n):void 0},LO=function(){var e,t,n,r,i,o,a;const{state:s,manager:l,options:c}=this,{dragOperation:u}=l,{position:d,source:f,status:p}=u;if(p.idle)return s.current={},void(s.initial={});if(!f)return;const{element:h}=f,m=f.pluginConfig(FO),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==c?void 0:c.feedback)?t:"default",y="function"==typeof g?g(f,l):g;if(!h||"none"===y||!p.initialized||p.initializing)return;const{initial:b}=s,v=null!=(n=this.overlay)?n:h,x=YT(v),w=YT(h),S=!_O(h,v),k=new dD(h,{frameTransform:S?w:null,ignoreTransforms:!S}),C=w.scaleX/x.scaleX,E=w.scaleY/x.scaleY;let{width:M,height:R,top:_,left:A}=k;S&&(M/=C,R/=E);const P=new pD(v),I=VT(h),{transition:T,translate:D,boxSizing:O,paddingBlockStart:N,paddingBlockEnd:q,paddingInlineStart:L,paddingInlineEnd:j,borderInlineStartWidth:z,borderInlineEndWidth:F,borderBlockStartWidth:$,borderBlockEndWidth:B}=I,H=T.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),V=JT(I),W=I.transform,U="clone"===y,G="content-box"===O,Y=G?parseInt(L)+parseInt(j)+parseInt(z)+parseInt(F):0,K=G?parseInt(N)+parseInt(q)+parseInt($)+parseInt(B):0,X="move"===y||this.overlay?null:RO(f,U?"clone":"hidden"),J=vR(()=>mD(l.dragOperation.activatorEvent));if(!b.translate)if(this.overlay&&V)b.translate={x:V.x,y:V.y};else if("none"!==D){const e=XT(D);e&&(b.translate=e)}if(!b.transformOrigin){const e=vR(()=>d.current),t=A+(null!=(r=null==V?void 0:V.x)?r:0),n=_+(null!=(i=null==V?void 0:V.y)?i:0);b.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(M*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(R*x.scaleY)}}const{transformOrigin:Q}=b,Z=_*x.scaleY+x.y,ee=A*x.scaleX+x.x;if(!b.coordinates&&(b.coordinates={x:ee,y:Z},1!==C||1!==E)){const{scaleX:e,scaleY:t}=w,{x:n,y:r}=Q;b.coordinates.x+=(M*e-M)*n,b.coordinates.y+=(R*t-R)*r}b.dimensions||(b.dimensions={width:M,height:R}),b.frameTransform||(b.frameTransform=x);const te=b.coordinates.x-ee,ne=b.coordinates.y-Z,re=(b.dimensions.width*b.frameTransform.scaleX-M*x.scaleX)*Q.x,ie=(b.dimensions.height*b.frameTransform.scaleY-R*x.scaleY)*Q.y,oe={x:te/x.scaleX+re,y:ne/x.scaleY+ie},ae=A+oe.x,se=_+oe.y;v.setAttribute(SO,"true");const le=vR(()=>u.transform),ce=null!=(o=b.translate)?o:{x:0,y:0},ue=le.x*x.scaleX+ce.x,de=le.y*x.scaleY+ce.y,fe=ZI();if(P.set({width:M-Y,height:R-K,top:se+fe.y,left:ae+fe.x,translate:`${ue}px ${de}px 0`,transform:this.overlay?"none":W,transition:H?`${H}, translate 0ms linear`:"translate 0ms linear",scale:S?`${C} ${E}`:"","transform-origin":`${100*Q.x}% ${100*Q.y}%`},wO),X&&(h.insertAdjacentElement("afterend",X),null==c?void 0:c.rootElement)){("function"==typeof c.rootElement?c.rootElement(f):c.rootElement).appendChild(h)}let pe,he,me;OT(v)&&(v.hasAttribute("popover")||v.setAttribute("popover","manual"),NT(v),v.addEventListener("beforetoggle",AO));const ge=(ye={placeholder:X,element:h,feedbackElement:v,frameTransform:x,transformOrigin:Q,width:M,height:R,top:_,left:A,widthOffset:Y,heightOffset:K,delta:oe,styles:P,dragOperation:u,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>pe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new dD(ye.placeholder,{frameTransform:ye.frameTransform,ignoreTransforms:!0}),i=null!=(e=ye.transformOrigin)?e:{x:1,y:1},o=(ye.width-r.width)*i.x+ye.delta.x,a=(ye.height-r.height)*i.y+ye.delta.y,s=ZI();if(ye.styles.set({width:r.width-ye.widthOffset,height:r.height-ye.heightOffset,top:ye.top+a+s.y,left:ye.left+o+s.x},wO),null==(t=ye.getElementMutationObserver())||t.takeRecords(),PO(ye.element)&&PO(ye.placeholder)){const e=Array.from(ye.element.cells),t=Array.from(ye.placeholder.cells);ye.getSavedCellWidths()||ye.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=ye.getTranslate())?n:{x:0,y:0},c=ye.left+o+s.x+l.x,u=ye.top+a+s.y+l.y,d=r.width-ye.widthOffset,f=r.height-ye.heightOffset,p=ye.frameTransform;ye.dragOperation.shape=new oA(c*p.scaleX+p.x,u*p.scaleY+p.y,d*p.scaleX,f*p.scaleY)}));var ye;const be=new dD(v);vR(()=>u.shape=be);const ve=BI(v),xe=e=>{this.manager.actions.stop({event:e})},we=nT(ve);J&&ve.addEventListener("resize",xe),"idle"===vR(()=>f.status)&&requestAnimationFrame(()=>f.status="dragging"),X&&(ge.observe(X),pe=function(e,t,n){const r=new MutationObserver(r=>{let i=!1;for(const n of r){if(n.target!==e){i=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||CO.includes(r))continue;const o=e.getAttribute(r);if("style"===r){if(fD(e)&&fD(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(EO.includes(e)||e.startsWith(wO))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==o?t.setAttribute(r,o):t.removeAttribute(r)}i&&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 i of r)if(0!==i.addedNodes.length)for(const r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void NT(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void NT(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),NT(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,v));const Se=null==(a=l.dragOperation.source)?void 0:a.id,ke=()=>{var e;if(!J||null==Se)return;const t=l.registry.draggables.get(Se),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;VI(n)&&n.focus()},Ce=()=>{var e;if(null==pe||pe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ve.removeEventListener("resize",xe),OT(v)&&(v.removeEventListener("beforetoggle",AO),v.removeAttribute("popover")),v.removeAttribute(SO),P.reset(),me&&PO(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}f.status="idle";const t=null!=s.current.translate,n=u.status.dragging;X&&(!n&&t||X.parentElement!==v.parentElement)&&v.isConnected&&X.replaceWith(v),null==X||X.remove()},Ee=null==c?void 0:c.dropAnimation,Me=this,Re=O_(()=>{var e,t,n;const{transform:r,status:i}=u;if((r.x||r.y||s.current.translate)&&i.dragging){const i=null!=(e=b.translate)?e:{x:0,y:0},o={x:r.x/x.scaleX+i.x,y:r.y/x.scaleY+i.y},a=s.current.translate,l=vR(()=>u.modifiers),d=vR(()=>{var e;return null==(e=u.shape)?void 0:e.current}),f=null==c?void 0:c.keyboardTransition,p=J&&!we&&null!==f?`${null!=(t=null==f?void 0:f.duration)?t:250}ms ${null!=(n=null==f?void 0:f.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(P.set({transition:H?`${H}, translate ${p}`:`translate ${p}`,translate:`${o.x}px ${o.y}px 0`},wO),null==pe||pe.takeRecords(),d&&d!==be&&a&&!l.length){const e=iA.delta(o,a);u.shape=oA.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else u.shape=new dD(v);s.current.translate=o}},function(){if(u.status.dropped){this.dispose(),f.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==Me.dropAnimation?Me.dropAnimation:Ee;let t=s.current.translate;const n=null!=t;if(t||h===v||(t={x:0,y:0}),!t||null===e)return void Ce();l.renderer.rendering.then(()=>{!function(e){var t,n,r,i;const{animation:o}=e;if("function"==typeof o){const t=o({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=jO,easing:s=zO}=null!=o?o:{};NT(e.feedbackElement);const[,l]=null!=(t=jI(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const c=null!=(n=e.placeholder)?n:e.element,u={frameTransform:_O(e.feedbackElement,c)?null:void 0},d=new dD(e.feedbackElement,u),f=null!=(r=XT(VT(e.feedbackElement).translate))?r:e.translate,p=new dD(c,u),h=oA.delta(d,p,e.alignment),m=f.x-h.x,g=f.y-h.y,y=Math.round(d.intrinsicHeight)!==Math.round(p.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${p.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${p.intrinsicHeight}px`]}:{},b=Math.round(d.intrinsicWidth)!==Math.round(p.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${p.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${p.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},wO),e.feedbackElement.setAttribute(xO,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),oD({element:e.feedbackElement,keyframes:TD(ID(ID({},y),b),{translate:[`${f.x}px ${f.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:nT(BI(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(xO),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:f,element:h,feedbackElement:v,placeholder:X,translate:t,moved:n,transition:T,alignment:f.alignment,styles:P,animation:null!=e?e:void 0,getElementMutationObserver:()=>pe,cleanup:Ce,restoreFocus:ke})})}});return()=>{Ce(),Re()}},$D(DO,4,"overlay",IO,FO,OO),zD(DO,FO),FO.configure=HA(FO);var $O,BO,HO,VO,WO,UO,GO,YO=FO,KO=!0;HO=[I_],VO=QT.Forward,$O=[I_],BO=QT.Reverse;var XO=class{constructor(){WD(this,UO,FD(WO,8,this,KO)),FD(WO,11,this),WD(this,GO,FD(WO,12,this,KO)),FD(WO,15,this)}isLocked(e){return e!==QT.Idle&&(null==e?this[QT.Forward]===KO&&this[QT.Reverse]===KO:this[e]===KO)}unlock(e){e!==QT.Idle&&(this[e]=false)}};WO=ND(null),UO=new WeakMap,GO=new WeakMap,$D(WO,4,VO,HO,XO,UO),$D(WO,4,BO,$O,XO,GO),zD(WO,XO);var JO,QO,ZO,eN,tN,nN,rN=[QT.Forward,QT.Reverse],iN=class{constructor(){this.x=new XO,this.y=new XO}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},oN=class extends WA{constructor(e){super(e);const t=AR(new iN);let n=null;this.signal=t,zR(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new iN);const{delta:i}=e.dragOperation.position;if(n){const e={x:aN(i.x,n.x),y:aN(i.y,n.y)},r=t.peek();yR(()=>{for(const t of pA)for(const n of rN)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function aN(e,t){return Math.sign(e-t)}var sN=class extends(QO=GA,JO=[I_],QO){constructor(e){super(e),WD(this,eN,FD(ZO,8,this,!1)),FD(ZO,11,this),WD(this,tN),WD(this,nN,()=>{if(!VD(this,tN))return;const{element:e,by:t}=VD(this,tN);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 UD(this,tN,void 0),!1;const{position:i}=this.manager.dragOperation,o=null==i?void 0:i.current;if(o){const{by:i}=null!=e?e:{},a=i?{x:lN(i.x),y:lN(i.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=jT(e,i);if(r.x||r.y){const{speed:r,direction:l}=tD(e,o,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold);if(s)for(const e of pA)s[e].isLocked(l[e])&&(r[e]=0,l[e]=0);if(l.x||l.y){const{x:t,y:o}=null!=i?i:l,a=t*r.x,s=o*r.y;if(a||s){const t=null==(n=VD(this,tN))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!a||t.y&&!s)continue}return UD(this,tN,{element:e,by:{x:a,y:s}}),FT.schedule(VD(this,nN)),!0}}}}}return UD(this,tN,void 0),!1};let t=null,n=null;const r=A_(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=oT(tT(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t}),i=A_(()=>{const t=r.value,{documentElement:i}=UI(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=GT(r,{excludeElement:!1});return n=e,e}}if(t){const e=GT(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},P_);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new oN(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&mD(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function lN(e){return e>0?QT.Forward:e<0?QT.Reverse:QT.Idle}ZO=ND(QO),eN=new WeakMap,tN=new WeakMap,nN=new WeakMap,$D(ZO,4,"autoScrolling",JO,sN,eN),zD(ZO,sN);var cN=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()}),uN=class extends WA{constructor(e,t){super(e,t);const n=e.registry.plugins.get(sN);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=zR(()=>{var t,r,i;if(this.disabled)return;const{position:o,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==(i=this.options)?void 0:i.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>cN.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};uN.configure=HA(uN);var dN,fN=uN,pN={capture:!0,passive:!0},hN=class extends GA{constructor(e){super(e),WD(this,dN),this.handleScroll=()=>{null==VD(this,dN)&&UD(this,dN,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),UD(this,dN,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=zR(()=>{var e,n,r;if(t.status.dragging){const i=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return i.addEventListener("scroll",this.handleScroll,pN),()=>{i.removeEventListener("scroll",this.handleScroll,pN)}}})}};dN=new WeakMap;function mN(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var gN,yN=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}}),bN=class extends rI{constructor(e,t){super(e),this.manager=e,this.options=t,WD(this,gN,[]),this.listeners=new sT,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!hD(e.target))return;if(t.disabled)return;const{keyboardCodes:r=yN.keyboardCodes,preventActivation:i=yN.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){return zR(()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{mD(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}})}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(),nD(r);const{center:i}=new dD(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const o=UI(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];VD(this,gN).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=yN.keyboardCodes}=null!=n?n:{};if(wN(e,[...r.end,...r.cancel])){e.preventDefault();const t=wN(e,r.cancel);return void this.handleEnd(e,t)}wN(e,r.up)?this.handleMove("up",e):wN(e,r.down)&&this.handleMove("down",e),wN(e,r.left)?this.handleMove("left",e):wN(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:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:yN.offset;if("number"==typeof s&&(s={x:s,y:s}),i){switch(e){case"up":a={x:0,y:-s.y*o};break;case"down":a={x:0,y:s.y*o};break;case"left":a={x:-s.x*o,y:0};break;case"right":a={x:s.x*o,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(fN);!1===(null==e?void 0:e.disabled)&&(e.disable(),VD(this,gN).push(()=>{e.enable()}))}cleanup(){VD(this,gN).forEach(e=>e()),UD(this,gN,[])}destroy(){this.cleanup(),this.listeners.clear()}};gN=new WeakMap,bN.configure=HA(bN),bN.defaults=yN;var vN,xN=bN;function wN(e,t){return t.includes(e.code)}var SN,kN;vN=new WeakMap;SN=new WeakMap,kN=new WeakMap;var CN=class{};CN.Delay=class extends oI{constructor(){super(...arguments),WD(this,SN),WD(this,kN)}onEvent(e){switch(e.type){case"pointerdown":UD(this,kN,KI(e)),UD(this,SN,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!VD(this,kN))return;const{x:t,y:n}=KI(e);sA({x:t-VD(this,kN).x,y:n-VD(this,kN).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){VD(this,SN)&&(clearTimeout(VD(this,SN)),UD(this,kN,void 0),UD(this,SN,void 0))}},CN.Distance=class extends oI{constructor(){super(...arguments),WD(this,vN)}onEvent(e){switch(e.type){case"pointerdown":UD(this,vN,KI(e));break;case"pointermove":if(!VD(this,vN))return;const{x:t,y:n}=KI(e),r={x:t-VD(this,vN).x,y:n-VD(this,vN).y},{tolerance:i}=this.options;if(i&&sA(r,i))return void this.abort();sA(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){UD(this,vN,void 0)}};var EN,MN=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!hD(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?[new CN.Delay({value:250,tolerance:5})]:function(e){if(!hD(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(i)&&!e.defaultPrevented?[new CN.Delay({value:200,tolerance:0})]:[new CN.Delay({value:200,tolerance:10}),new CN.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r!==t.element&&(r!==t.handle&&(!!hD(r)&&(!(null==(n=t.handle)?void 0:n.contains(r))&&Boolean(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 ')))))}}),RN=class extends rI{constructor(e,t){super(e),this.manager=e,this.options=t,WD(this,EN,new Set),this.listeners=new sT,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=MN.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){return zR(()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=BI(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&&(TN(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>r.abort()})}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!hD(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=MN.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:i}=e,o=VI(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=YT(t.element),{x:s,y:l}=KI(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const c=this.activationConstraints(e,t,n);e.sensor=this;const u=new iI(c,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;const d=JI(),f=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:o?this.handleCancel:AN,options:{capture:!0}}]);VD(this,EN).add(()=>{f(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=KI(e),r=YT(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,FT.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=UI(t.target).body;try{i.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const o=hD(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:AN,options:{passive:!1}},{type:"click",listener:AN},{type:"contextmenu",listener:AN},{type:"keydown",listener:this.handleKeyDown}]);VD(this,EN).add(a)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},VD(this,EN).forEach(e=>e()),VD(this,EN).clear()}destroy(){this.cleanup(),this.listeners.clear()}};EN=new WeakMap,RN.configure=HA(RN),RN.defaults=MN;var _N=RN;function AN(e){e.preventDefault()}function PN(){}var IN=new WeakSet;function TN(e){e&&!IN.has(e)&&(e.addEventListener("touchmove",PN,{capture:!1,passive:!1}),IN.add(e))}var DN,ON,NN,qN,LN,jN,zN,FN,$N,BN,HN,VN,WN,UN,GN,YN,KN={modifiers:[],plugins:[nO,fN,class extends WA{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(bO),i=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(i){const e=this.destroy.bind(this);this.destroy=()=>{i(),e()}}}},YO,class extends WA{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(bO),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=zR(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return mN(),document.addEventListener("selectionchange",mN,{capture:!0}),()=>{document.removeEventListener("selectionchange",mN,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[_N,xN]},XN=class extends PI{constructor(e={}){const t=AI(e.plugins,KN.plugins),n=AI(e.sensors,KN.sensors),r=AI(e.modifiers,KN.modifiers);super(TD(ID({},e),{plugins:[hN,sN,bO,...t],sensors:n,modifiers:r}))}},JN=class extends(NN=LP,ON=[I_],DN=[I_],NN){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o}=n,a=OD(n,["element","effects","handle"]);super(ID({effects:()=>[...i(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(VA))?t:[...n.sensors]).map(e=>{const t=e instanceof rI?e:n.registry.register(e.plugin),r=e instanceof rI?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),WD(this,LN,FD(qN,8,this)),FD(qN,11,this),WD(this,jN,FD(qN,12,this)),FD(qN,15,this),this.element=r,this.handle=o}};qN=ND(NN),LN=new WeakMap,jN=new WeakMap,$D(qN,4,"handle",ON,JN,LN),$D(qN,4,"element",DN,JN,jN),zD(qN,JN);var QN=class extends($N=jP,FN=[I_],zN=[I_],$N){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=OD(n,["element","effects"]);const{collisionDetector:a=bD}=o,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new dD(n),i=vR(()=>this.shape);return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=AR(!1);super(TD(ID({},o),{collisionDetector:a,effects:()=>[...i(),()=>{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 DT(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),WD(this,GN),WD(this,HN,FD(BN,8,this)),FD(BN,11,this),WD(this,YN,FD(BN,12,this)),FD(BN,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){UD(this,GN,e,UN)}get element(){var e;return null!=(e=this.proxy)?e:VD(this,GN,WN)}};function ZN(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}BN=ND($N),HN=new WeakMap,GN=new WeakSet,YN=new WeakMap,VN=$D(BN,20,"#element",FN,GN,HN),WN=VN.get,UN=VN.set,$D(BN,4,"proxy",zN,QN,YN),zD(BN,QN);var eq="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?an.useLayoutEffect:an.useEffect;function tq(){const e=an.useState(0)[1];return an.useCallback(()=>{e(e=>e+1)},[e])}function nq(e,t=[],n=!1){const r=an.useRef(e);return r.current=e,function(e,t=!1){const n=an.useRef(e.peek()),r=an.useRef(!1),i=tq();return eq(()=>zR(()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?Rc.flushSync(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}(an.useMemo(()=>A_(()=>r.current()),t),n)}function rq(e,t){const n=an.useRef(new Map),r=tq();return eq(()=>{if(e)return zR(()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=vR(()=>r[1]),c=e[s];l!==c&&(o=!0,n.current.set(s,c),a=null!=(i=null==t?void 0:t(s,l,c))&&i)}o&&(a?queueMicrotask(()=>Rc.flushSync(r)):r())});n.current.clear()},[e]),an.useMemo(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function iq(e,t){e()}function oq(e){const t=an.useRef(e);return eq(()=>{t.current=e},[e]),t}function aq(e,t,n=an.useEffect,r=Object.is){const i=an.useRef(e);n(()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function sq(e,t){const n=an.useRef(ZN(e));eq(()=>{const r=ZN(e);r!==n.current&&(n.current=r,t(r))})}var lq=Object.defineProperty,cq=Object.defineProperties,uq=Object.getOwnPropertyDescriptors,dq=Object.getOwnPropertySymbols,fq=Object.prototype.hasOwnProperty,pq=Object.prototype.propertyIsEnumerable,hq=(e,t,n)=>t in e?lq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mq=new XN,gq=an.createContext(mq),yq=an.memo(an.forwardRef(({children:e},t)=>{const[n,r]=an.useState(0),i=an.useRef(null),o=an.useRef(null),a=an.useMemo(()=>({renderer:{get rendering(){var e;return null!=(e=i.current)?e:Promise.resolve()}},trackRendering(e){i.current||(i.current=new Promise(e=>{o.current=e})),an.startTransition(()=>{e(),r(e=>e+1)})}}),[]);return eq(()=>{var e;null==(e=o.current)||e.call(o),i.current=null},[e,n]),an.useImperativeHandle(t,()=>a),null})),bq=[void 0,P_];function vq(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:l}=t,c=((e,t)=>{var n={};for(var r in e)fq.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&dq)for(var r of dq(e))t.indexOf(r)<0&&pq.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const u=an.useRef(null),{plugins:d,modifiers:f,sensors:p}=c,h=AI(d,KN.plugins),m=AI(p,KN.sensors),g=AI(f,KN.modifiers),y=oq(i),b=oq(o),v=oq(s),x=oq(a),w=oq(l),S=oq(r),k=function(e){const t=an.useRef(null);t.current||(t.current=e());return an.useInsertionEffect(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=c.manager)?e:new XN(c)});return an.useEffect(()=>{if(!u.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=u.current,{monitor:n}=k;k.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=y.current;n&&t(()=>n(e,k))}),n.addEventListener("dragstart",e=>{var t;return null==(t=b.current)?void 0:t.call(b,e,k)}),n.addEventListener("dragover",e=>{const n=v.current;n&&t(()=>n(e,k))}),n.addEventListener("dragmove",e=>{const n=x.current;n&&t(()=>n(e,k))}),n.addEventListener("dragend",e=>{const n=w.current;n&&t(()=>n(e,k))}),n.addEventListener("collision",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,k)})];return()=>r.forEach(e=>e())},[k]),aq(h,()=>k&&(k.plugins=h),...bq),aq(m,()=>k&&(k.sensors=m),...bq),aq(g,()=>k&&(k.modifiers=g),...bq),vt.jsxs(gq.Provider,{value:k,children:[vt.jsx(yq,{ref:u,children:n}),n]})}function xq(){return an.useContext(gq)}function wq(e){var t;const n=null!=(t=xq())?t:void 0,[r]=an.useState(()=>e(n));return r.manager!==n&&(r.manager=n),eq(r.register,[n,r]),r}function Sq({children:e,className:t,dropAnimation:n,style:r,tag:i,disabled:o}){var a;const s=an.useRef(null),l=xq(),c=null!=(a=nq(()=>null==l?void 0:l.dragOperation.source,[l]).value)?a:null,u="function"==typeof o?o(c):o;an.useEffect(()=>{if(!s.current||!l||u)return;const e=l.plugins.find(e=>e instanceof YO);return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0},[l,u]),an.useEffect(()=>{if(!l)return;const e=l.plugins.find(e=>e instanceof YO);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[l,n]);const d=an.useMemo(()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?kq:e[t]});return new Proxy(l,{get:(t,n)=>"registry"===n?e:t[n]})},[l]);return vt.jsx(gq.Provider,{value:d,children:an.createElement(i||"div",{ref:s,className:t,style:r,"data-dnd-overlay":!0},function(){if(!c||u)return null;if("function"==typeof e)return vt.jsx(Cq,{source:c,children:e});return e}())})}function kq(){return()=>{}}function Cq({children:e,source:t}){return e(rq(t))}var Eq,Mq,Rq,_q,Aq,Pq=Object.create,Iq=Object.defineProperty,Tq=Object.getOwnPropertyDescriptor,Dq=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Oq=e=>{throw TypeError(e)},Nq=["class","method","getter","setter","accessor","field","value","get","set"],qq=e=>void 0!==e&&"function"!=typeof e?Oq("Function expected"):e,Lq=(e,t,n,r,i)=>({kind:Nq[e],name:t,metadata:r,addInitializer:e=>n._?Oq("Already initialized"):i.push(qq(e||null))}),jq=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=Nq[u+5],f=e[2]||(e[2]=[]),p=(i=i.prototype,Tq(i,n)),h=r.length-1;h>=0;h--)(l=Lq(u,n,s={},e[3],f)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(p[d],l),s._=1,qq(a)&&(p[d]=a);return p&&Iq(i,n,p),i},zq=(e,t,n)=>t.has(e)||Oq("Cannot "+n),Fq=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)}},$q=class extends(Rq=q_,Mq=[T_],Eq=[T_],Rq){constructor(e){super(Fq.from(e),(e,t)=>Fq.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(Aq,5,this),((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)})(this,_q,0),this.velocity={x:0,y:0}}get delta(){return Fq.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=Fq.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(zq(a=this,s=_q,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);yR(()=>{((e,t,n)=>{zq(e,t,"write to private field"),t.set(e,n)})(this,_q,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(Fq.from(e)),this.velocity={x:0,y:0}}};Aq=(e=>{var t;return[,,,Pq(null!=(t=null==e?void 0:e[Dq("metadata")])?t:null)]})(Rq),_q=new WeakMap,jq(Aq,2,"delta",Mq,$q),jq(Aq,2,"direction",Eq,$q),((e,t)=>{((e,t,n)=>{t in e?Iq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,Dq("metadata"),e[3])})(Aq,$q);var Bq=(e=>(e.Horizontal="x",e.Vertical="y",e))(Bq||{});Object.values(Bq);var Hq=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/Fq.distance(t.shape.center,n),type:ZP.PointerIntersection,priority:QP.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:i}=e,o=Fq.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:ZP.ShapeIntersection,priority:QP.Normal}}return null})(e)};function Vq(e){const{collisionDetector:t,data:n,disabled:r,element:i,id:o,accept:a,type:s}=e,l=wq(t=>new QN(((e,t)=>cq(e,uq(t)))(((e,t)=>{for(var n in t||(t={}))fq.call(t,n)&&hq(e,n,t[n]);if(dq)for(var n of dq(t))pq.call(t,n)&&hq(e,n,t[n]);return e})({},e),{register:!1,element:ZN(i)}),t)),c=rq(l);return aq(o,()=>l.id=o),sq(i,e=>l.element=e),aq(a,()=>l.accept=a,void 0,P_),aq(t,()=>l.collisionDetector=null!=t?t:Hq),aq(n,()=>n&&(l.data=n)),aq(r,()=>l.disabled=!0===r),aq(s,()=>l.type=s),{droppable:c,get isDropTarget(){return c.isDropTarget},ref:an.useCallback(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 Wq(e){const t=xq();an.useEffect(()=>{if(!t)return;const n=Object.entries(e).reduce((e,[n,r])=>{if(r){const i=n.replace(/^on/,"").toLowerCase(),o=t.monitor.addEventListener(i,r);e.push(o)}return e},[]);return()=>n.forEach(e=>null==e?void 0:e())},[t,e])}const Uq=e=>Array.from({length:e},(e,t)=>t),Gq=({id:e,sectionIndex:t,itemIndex:n})=>vt.jsx("span",{children:`${e}-${t}-${n}`}),Yq=an.memo(()=>{const e=zg(aR)??Gq,{startSectionIndex:t,startIndex:n,id:r}=zg(uR)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:vt.jsx(Sq,{dropAnimation:null,children:vt.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:vt.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),Kq=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=zg(uR),i=r?.toSectionIndex===e&&r.toIndex===t;return vt.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:i&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},Xq=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,Jq=an.memo(({sectionIndex:e})=>{const t=zg(ZM)[e],n=zg(eR),r=zg(tR),i=null!==zg(uR),o=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=Vq({id:a,type:"section",accept:"item",collisionPriority:QP.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:vt.jsxs(ld,{ref:s,sx:{margin:"4px",outline:Xq(l,i),borderRadius:"4px",boxSizing:"border-box"},children:[vt.jsx(ld,{sx:{position:"relative",top:"4px"},children:vt.jsx(Kq,{sectionIndex:e,itemIndex:0,isDragging:!1})}),vt.jsxs(ld,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[vt.jsx(Cu,{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:o.title}),vt.jsx(Cu,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:o.message})]})]})}),Qq=an.memo(({id:e,sectionIndex:t})=>{const n=zg(oR);return void 0===n?null:an.createElement(n,{id:e,sectionIndex:t})});var Zq=Object.defineProperty,eL=Object.defineProperties,tL=Object.getOwnPropertyDescriptors,nL=Object.getOwnPropertySymbols,rL=Object.prototype.hasOwnProperty,iL=Object.prototype.propertyIsEnumerable,oL=(e,t,n)=>t in e?Zq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aL=(e,t)=>{for(var n in t||(t={}))rL.call(t,n)&&oL(e,n,t[n]);if(nL)for(var n of nL(t))iL.call(t,n)&&oL(e,n,t[n]);return e},sL=(e,t)=>eL(e,tL(t)),lL=class extends EI{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return sL(aL({},e),{[t]:n})}};lL.configure=HA(lL);var cL=lL,uL=cL.configure({axis:"x",value:0});cL.configure({axis:"y",value:0});var dL=class extends EI{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,i="number"==typeof n?n:n.y;return sL(aL({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};dL.configure=HA(dL);var fL=Object.create,pL=Object.defineProperty,hL=Object.defineProperties,mL=Object.getOwnPropertyDescriptor,gL=Object.getOwnPropertyDescriptors,yL=Object.getOwnPropertySymbols,bL=Object.prototype.hasOwnProperty,vL=Object.prototype.propertyIsEnumerable,xL=e=>{throw TypeError(e)},wL=(e,t,n)=>t in e?pL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SL=(e,t)=>{for(var n in t||(t={}))bL.call(t,n)&&wL(e,n,t[n]);if(yL)for(var n of yL(t))vL.call(t,n)&&wL(e,n,t[n]);return e},kL=(e,t)=>hL(e,gL(t)),CL=["class","method","getter","setter","accessor","field","value","get","set"],EL=e=>void 0!==e&&"function"!=typeof e?xL("Function expected"):e,ML=(e,t,n,r,i)=>({kind:CL[e],name:t,metadata:r,addInitializer:e=>n._?xL("Already initialized"):i.push(EL(e||null))}),RL=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},_L=(e,t,n,r,i,o)=>{for(var a,s,l,c,u,d=7&t,f=e.length+1,p=CL[d+5],h=e[f-1]=[],m=e[f]||(e[f]=[]),g=(i=i.prototype,mL({get[n](){return PL(this,o)},set[n](e){return TL(this,o,e)}},n)),y=r.length-1;y>=0;y--)(c=ML(d,n,l={},e[3],m)).static=false,c.private=false,u=c.access={has:e=>n in e},u.get=e=>e[n],u.set=(e,t)=>e[n]=t,s=(0,r[y])({get:g.get,set:g.set},c),l._=1,void 0===s?EL(s)&&(g[p]=s):"object"!=typeof s||null===s?xL("Object expected"):(EL(a=s.get)&&(g.get=a),EL(a=s.set)&&(g.set=a),EL(a=s.init)&&h.unshift(a));return g&&pL(i,n,g),i},AL=(e,t,n)=>t.has(e)||xL("Cannot "+n),PL=(e,t,n)=>(AL(e,t,"read from private field"),t.get(e)),IL=(e,t,n)=>t.has(e)?xL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),TL=(e,t,n,r)=>(AL(e,t,"write to private field"),t.set(e,n),n);function DL(e){return e instanceof uj||e instanceof cj}var OL=class extends WA{constructor(e){super(e);const t=zR(()=>{const{dragOperation:t}=e;if(mD(t.activatorEvent)&&DL(t.source)&&t.status.initialized){const t=e.registry.plugins.get(sN);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(!mD(e.nativeEvent))return;if(!DL(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:c}=n,{center:u}=n.shape.current,d=[],f=[];yR(()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&DL(e)||!e.element)continue;let n=e.shape;const r=new dD(e.element,{getBoundingClientRect:e=>YI(e,void 0,.2)});r.height&&r.width&&(("down"==s&&u.y+10<r.center.y||"up"==s&&u.y-10>r.center.y||"left"==s&&u.x-10>r.center.x||"right"==s&&u.x+10<r.center.x)&&(d.push(e),e.shape=r,f.push(()=>e.shape=n)))}}),e.preventDefault(),i.disable();const p=i.computeCollisions(d,vD);yR(()=>f.forEach(e=>e()));const[h]=p;if(!h)return;const{id:m}=h,{index:g,group:y}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:o}=n;if(!e||!DL(e)||!o)return;const{index:a,group:s,target:l}=e.sortable,c=g!==a||y!==s,u=c?l:null==t?void 0:t.element;if(!u)return;nD(u);const d=new dD(u);if(!d)return;const f=oA.delta(d,oA.from(o.current.boundingRectangle),e.alignment);r.move({by:f}),c?r.setDropTarget(e.id).then(()=>i.enable()):i.enable()})})});this.destroy=()=>{n(),t()}}};var NL=Object.defineProperty,qL=Object.defineProperties,LL=Object.getOwnPropertyDescriptors,jL=Object.getOwnPropertySymbols,zL=Object.prototype.hasOwnProperty,FL=Object.prototype.propertyIsEnumerable,$L=(e,t,n)=>t in e?NL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BL=(e,t)=>{for(var n in t||(t={}))zL.call(t,n)&&$L(e,n,t[n]);if(jL)for(var n of jL(t))FL.call(t,n)&&$L(e,n,t[n]);return e},HL=(e,t)=>qL(e,LL(t));function VL(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function WL(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function UL(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const c=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>c(e,a.id)),i=e.findIndex(e=>c(e,s.id));if(-1===r||-1===i){if(WL(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const u=Object.entries(e);let d,f,p=-1,h=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>c(e,a.id)),-1!==p&&(d=e)),-1===h&&(h=t.findIndex(e=>c(e,s.id)),-1!==h&&(f=e)),-1!==p&&-1!==h)break;if(-1===p&&WL(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return HL(BL({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return HL(BL({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==f&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;f=s.id,h=t}if(null==d||null==f||d===f&&p===h){if(null!=d&&d===f&&p===h&&WL(a)){const t=null!=a.group&&a.group!==d,r=a.index!==p;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return HL(BL({},e),{[d]:n(e[d],p,a.index)});const r=e[d][p];return HL(BL({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===f)return HL(BL({},e),{[d]:n(e[d],p,h)});const y=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,b=e[d][p];return HL(BL({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[f]:[...e[f].slice(0,h+y),b,...e[f].slice(h+y)]})}(e,t,VL)}var GL="__default__";function YL(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function KL(e,t){return e.index-t.index}function XL(e){return Array.from(e).sort(KL)}var JL,QL,ZL,ej,tj,nj,rj,ij,oj=[OL,class extends WA{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof uj){const{sortable:e}=n,{group:r}=e;let i=t.get(r);i||(i=new Set,t.set(r,i)),i.add(e)}for(const[e,n]of t)t.set(e,new Set(XL(n)));return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!DL(i)||!DL(o))return;if(i.sortable===o.sortable)return;const a=t(),s=i.sortable.group===o.sortable.group,l=a.get(i.sortable.group),c=s?l:a.get(o.sortable.group);l&&c&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,u,d;const f=t();for(const[e,t]of a.entries()){const n=Array.from(t).entries();for(const[t,i]of n)if(i.index!==t||i.group!==e||!(null==(r=f.get(e))?void 0:r.has(i)))return}const p=i.sortable.element,h=o.sortable.element;if(!h||!p)return;if(!s&&o.id===i.sortable.group)return;const m=XL(l),g=s?m:XL(c),y=null!=(u=i.sortable.group)?u:GL,b=null!=(d=o.sortable.group)?d:GL,v={[y]:m,[b]:g},x=UL(v,e);if(v===x)return;const w=x[b].indexOf(i.sortable),S=x[b].indexOf(o.sortable);n.collisionObserver.disable(),YL(p,w,h,S),yR(()=>{for(const[e,t]of x[y].entries())t.index=e;if(!s)for(const[e,t]of x[b].entries())t.group=o.sortable.group,t.index=e}),n.actions.setDropTarget(i.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:i}=r;DL(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask(()=>{const e=t(),r=e.get(i.sortable.initialGroup);r&&n.renderer.rendering.then(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).entries();for(const[n,r]of e)if(r.index!==n||r.group!==t)return}const t=XL(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(YL(n,o.index,a,i.index),yR(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],aj={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},sj=new class{constructor(){M_(this,N_,new WeakMap)}get(e,t){var n;return e?null==(n=E_(this,N_).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return E_(this,N_).has(e)||E_(this,N_).set(e,new Map),null==(r=E_(this,N_).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=E_(this,N_).get(e))?void 0:t.clear():void 0}};QL=[I_],JL=[I_];var lj=class{constructor(e,t){IL(this,ej,RL(ZL,8,this)),RL(ZL,11,this),IL(this,tj),IL(this,nj),IL(this,rj,RL(ZL,12,this)),RL(ZL,15,this),IL(this,ij),this.register=()=>(yR(()=>{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=()=>{yR(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{yR(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=aj,plugins:c}=n,u=((e,t)=>{var n={};for(var r in e)bL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&yL)for(var r of yL(e))t.indexOf(r)<0&&vL.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);const d=AI(c,oj);this.droppable=new uj(u,t,this),this.draggable=new cj(kL(SL({},u),{plugins:d,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&sj.clear(this.manager),(null==r?void 0:r.dragging)&&sj.set(this.manager,this.id,vR(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=PL(this,nj),i=PL(this,tj);e===r&&t===i||(TL(this,nj,e),TL(this,tj,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(YO))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:s,sensors:a}),t,this),TL(this,ij,u.element),this.manager=t,this.index=o,TL(this,nj,o),this.group=i,TL(this,tj,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=sj.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=sj.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){vR(()=>{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 i=this.refreshShape();if(!i)return;const o=n.boundingRectangle.left-i.boundingRectangle.left,a=n.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=VT(r),l=aD(r,s,!1),c=aD(r,s);if(o||a){const n=nT(BI(r))?kL(SL({},t),{duration:0}):t;oD({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){yR(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){yR(()=>{const t=PL(this,ij),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),TL(this,ij,e)})}get element(){var e,t;const n=PL(this,ij);if(n)return null!=(t=null!=(e=aT.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(){return this.draggable.disabled&&this.droppable.disabled}set plugins(e){this.draggable.plugins=AI(e,oj)}set disabled(e){yR(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){yR(()=>{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:bD}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){yR(()=>{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)}};ZL=[,,,fL(null)],ej=new WeakMap,tj=new WeakMap,nj=new WeakMap,rj=new WeakMap,ij=new WeakMap,_L(ZL,4,"index",QL,lj,ej),_L(ZL,4,"group",JL,lj,rj),((e,t)=>{return wL(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(ZL,lj);var cj=class extends JN{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}},uj=class extends QN{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},dj=Object.defineProperty,fj=Object.defineProperties,pj=Object.getOwnPropertyDescriptors,hj=Object.getOwnPropertySymbols,mj=Object.prototype.hasOwnProperty,gj=Object.prototype.propertyIsEnumerable,yj=(e,t,n)=>t in e?dj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bj=(e,t)=>{for(var n in t||(t={}))mj.call(t,n)&&yj(e,n,t[n]);if(hj)for(var n of hj(t))gj.call(t,n)&&yj(e,n,t[n]);return e};function vj(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:i,data:o,element:a,handle:s,index:l,group:c,disabled:u,modifiers:d,sensors:f,target:p,type:h,plugins:m}=e,g=bj(bj({},aj),e.transition),y=wq(t=>new lj(((e,t)=>fj(e,pj(t)))(bj({},e),{transition:g,register:!1,handle:ZN(s),element:ZN(a),target:ZN(p)}),t)),b=rq(y,xj);return aq(i,()=>y.id=i),eq(()=>{yR(()=>{y.group=c,y.index=l})},[y,c,l]),aq(h,()=>y.type=h),aq(t,()=>y.accept=t,void 0,P_),aq(o,()=>o&&(y.data=o)),aq(l,()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&y.refreshShape()},iq),sq(s,e=>y.handle=e),sq(a,e=>y.element=e),sq(p,e=>y.target=e),aq(u,()=>y.disabled=!0===u),aq(f,()=>y.sensors=f),aq(n,()=>y.collisionDetector=n),aq(r,()=>y.collisionPriority=r),aq(m,()=>y.plugins=m,void 0,P_),aq(g,()=>y.transition=g,void 0,P_),aq(d,()=>y.modifiers=d,void 0,P_),aq(e.alignment,()=>y.alignment=e.alignment),{sortable:b,get isDragging(){return b.isDragging},get isDropping(){return b.isDropping},get isDragSource(){return b.isDragSource},get isDropTarget(){return b.isDropTarget},handleRef:an.useCallback(e=>{y.handle=null!=e?e:void 0},[y]),ref:an.useCallback(e=>{var t,n;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)},[y]),sourceRef:an.useCallback(e=>{var t,n;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)},[y]),targetRef:an.useCallback(e=>{var t,n;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)},[y])}}function xj(e,t,n){return!("isDragSource"!==e||n||!t)}const wj=({id:e,itemIndex:t,sectionIndex:n})=>vt.jsx("div",{children:`${n}:${t} - ${e}`}),Sj=({id:e,itemIndex:t,sectionIndex:n})=>{const r=zg(sR),i=zg(iR),o=zg(ZM).at(n)??0,a=zg(eR)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:c}=vj({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[uL],plugins:[OL],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),u=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=i??wj;return vt.jsx(Uf,{className:"section-item-container","data-testid":"section-item",onClick:u,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:vt.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[vt.jsx(Kq,{isDragging:l,itemIndex:t,sectionIndex:n}),vt.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:c}),t===o-1&&vt.jsx(Kq,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})},kj=an.memo(Sj),Cj=an.memo(({sectionIndex:e})=>{const t=zg(eR),n=zg(ZM).at(e)??0,r=t({sectionIndex:e});return vt.jsxs(ld,{className:"exploration-list",style:{overflow:"auto"},children:[vt.jsx(nf,{}),vt.jsx(Qq,{id:r,sectionIndex:e}),vt.jsx(nf,{}),vt.jsx(Jq,{sectionIndex:e}),vt.jsx(Of,{sx:{padding:"2px 8px"},children:Uq(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return vt.jsx(kj,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),Ej=[_N.configure({activationConstraints:[new CN.Distance({value:5})]}),xN],Mj=an.memo(()=>{const e=zg(QM),t=zg(eR),n=Fg(dR("start")),r=Fg(dR("over")),i=Fg(dR("end"));return vt.jsxs(vq,{sensors:Ej,onDragEnd:e=>{i(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[vt.jsx(ld,{style:{display:"flex",flexDirection:"column"},children:Uq(e).map(e=>vt.jsx(Cj,{sectionIndex:e},t({sectionIndex:e})))}),vt.jsx(Yq,{})]})}),Rj=an.memo(e=>vt.jsx(LM,{atoms:fR,atomFamilies:pR,children:vt.jsx(hR,{props:e,children:vt.jsx(Mj,{})})})),_j=Rg(null,(e,t,{event:n,id:r,toIndex:i})=>{const o=e(BE),a=e(gM),s=e(fM),l=e(pM);if(void 0===o||null===a||void 0===s||void 0===l)return;if(n.operation.canceled)return;const c=l[i];if(!c)return;const u=((e,t,n)=>{const r=n.findIndex(t=>t===e),i=n.findIndex(e=>e===t);if(-1===r||-1===i||r===i)return n;const o=[...n],[a]=o.splice(r,1);return o.splice(i,0,a),o})(r,c,s);t(XE,Object.fromEntries(u.map((e,t)=>[e,t]))),a.add(async()=>{o.updateColumnOrders(u)})}),Aj="ChartExploration.Table.ColumnSectionEmpty.Title",Pj="ChartExploration.Table.NoColumnsFound.Title",Ij="#177fe6",Tj=Rg(e=>{const t=e(VE),n=e(WE).length>0,r=(e=>e?Pj:Aj)(n),i=(e=>e?"":"ChartExploration.Table.ColumnSectionEmpty.Message")(n);return()=>({title:t(r),message:""===i?"":t(i)})}),Dj=({itemIndex:e})=>{const t=zg(dM(e));if(!t)return null;const n=t.title;return vt.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})},Oj=Rg(e=>{const t=e(pM),n=e(kM),r=t.filter(e=>n.has(e)).length;return 0===t.length?"disabled":0===r?"none":r===t.length?"all":"some"}),Nj=Rg(null,(e,t)=>{const n=e(pM),r=e(kM),i="all"!==e(Oj)&&"disabled"!==e(Oj),o=[],a=new Set(e(vM)),s=new Set(e(xM));if(i){const t=new Set(n.filter(e=>!r.has(e)));o.push(...Array.from(t).map(t=>({id:t,isAlternative:!0,type:e(hM)[t]}))),o.forEach(e=>a.add(e.id)),o.forEach(e=>s.delete(e.id))}else{const t=new Set(n.filter(e=>r.has(e)));o.push(...Array.from(t).map(t=>({id:t,isAlternative:!1,type:e(hM)[t]}))),o.forEach(e=>a.delete(e.id)),o.forEach(e=>s.add(e.id))}t(vM,a),t(xM,s),NE({items:o,handler:e(BE),model:e($E),currentColumnIds:e(fM),handlerQueue:e(gM)})}),qj=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},Lj=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,jj=e=>{const{currentTarget:t}=e,n=Lj(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),i=e?.querySelector(".exploration-section-header");if(i)return i;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 i=r.getElementsByClassName(t);return i.length>0?i[i.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},zj=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===Lm.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},Fj=(e,t)=>{const{currentTarget:n}=e;n===t.ref.current&&((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel")?.getElementsByTagName("input")[0];r&&qj(r)})(e,t)},$j=(e,t)=>{const{key:n}=e;switch(n){case Lm.Tab:dm(e),e.shiftKey?Fj(e,t):((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),i=r?.getElementsByClassName("exploration-item-focus")[0];i&&qj(i)})(e,t);break;case Lm.Down:(e=>{e.preventDefault();const t=e.currentTarget.closest(".exploration-list"),n=t?.getElementsByClassName("exploration-item-focus")[0];n&&qj(n)})(e);break;case Lm.Enter:case Lm.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)}},Bj=({children:e})=>vt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),Hj=({children:e})=>{const t=an.useRef(null),n=zg(Oj),[,r]=$g(Nj),i=zg(VE),o={ref:t,toggleAllCheckboxes:r,checkState:n};return vt.jsxs(ld,{ref:t,"aria-label":i("Common.Columns"),className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{$j(e,o)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${Ij} inset`}},children:[vt.jsx(Od,{inputProps:{"aria-label":i("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}}),vt.jsx(Bj,{children:e})]})},Vj=()=>{const e=zg(VE);return vt.jsx(Hj,{children:e("Common.Columns")})},Wj=(e,t)=>vt.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:vt.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"})}),Uj=an.forwardRef(Wj),Gj=(e,t)=>vt.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:[vt.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"}),vt.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"})]}),Yj=an.forwardRef(Gj),Kj=(e,t)=>vt.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:vt.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"})}),Xj=an.forwardRef(Kj),Jj=ic("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),Qj=ic(Xj)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${Ij} inset`}})),Zj=e=>{const t=e.key===Lm.Down?(e=>{const{currentTarget:t,key:n}=e,r=Lj(t),i=t.closest("li");let o=i?.nextElementSibling?.getElementsByClassName(r)[0];return o||(o=zj(t,n),o)?o:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):jj(e);t&&qj(t)},ez=(e,t)=>{const{key:n}=e;switch(n){case Lm.Tab:if(e.shiftKey)dm(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&&qj(e))}const n=jj(e);n&&qj(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void qj(t);const r=jj(e);r&&qj(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 qj(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&qj(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&&qj(n),!0}const i=zj(n,r);if(!i)return!1;qj(i)}return!0})(e,t);n?dm(e):e.stopPropagation()}break;case Lm.Enter:case Lm.Space:dm(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&&qj(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void qj(e)}n===t.items.explorationItemFocusRef.current&&t.toggleItem()})(e,t);break;case Lm.Down:case Lm.Up:dm(e),Zj(e)}},tz=({children:e})=>vt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),nz={dimension:Uj,measure:Yj},rz=({id:e,dragHandleRef:t,title:n,type:r})=>{const[i,o]=$g(kM),a=zg(VE),s=an.useRef(null),l=an.useRef(null),c=an.useRef(null);an.useEffect(()=>{t&&s.current&&t(s.current)},[t]);const u=nz[r],d=!i.has(e),f={id:e,itemIndex:itemIndex,toggleItem:()=>{o({id:e,isAlternative:d,type:r})},items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:c}};return vt.jsxs(ld,{ref:s,className:"exploration-item",onClick:t=>{t.stopPropagation(),-1!==e&&o({id:e,isAlternative:d,type:r})},onKeyDown:e=>{ez(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 ${Ij} inset`}},children:[vt.jsxs(ld,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{ez(e,f)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${Ij} inset`}},children:[vt.jsx(Od,{checked:i.has(e),"aria-label":a("ChartExploration.ListItem.Label",n),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0}}),vt.jsx(ld,{children:vt.jsx(u,{height:12,style:{opacity:1,marginRight:"8px"}})}),vt.jsx(tz,{children:n})]}),vt.jsx(Qj,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{ez(e,f)}})]})},iz=({id:e,itemIndex:t,dragHandleRef:n})=>{const r=zg(dM(t));return r?vt.jsx(rz,{id:e,dragHandleRef:n,title:r.title,type:r.type}):null},oz=()=>{const e=zg(cM),t=zg(Tj),n=zg(nM),r=zg(uM),i=Fg(_j);return!n&&vt.jsx(Rj,{numberOfSections:1,numberOfItemsInSection:[e],keyExtractor:r,emptyTexts:t,onDragEnd:i,dragOverlayRenderer:Dj,headerRenderer:Vj,itemRenderer:iz})},az=(e,t)=>vt.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:vt.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"})}),sz=an.forwardRef(az),lz=()=>{const[e,t]=$g(WE),n=zg(VE),r=sn.useRef(null),i=zg(cM),o=an.useCallback(e=>{t(e.target.value)},[t]),a=0===e.length||0===i?n("Common.Search.NoResultsAvailable"):n("ChartExploration.Table.Search.ResultsFound",i.toString());return vt.jsxs(ld,{ref:r,style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:0,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[vt.jsx(Jj,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:a}),vt.jsx(Up,{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:o,startAdornment:vt.jsx(Sf,{position:"start",children:vt.jsx(sz,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},cz=e=>{const t=tm();return vt.jsx(ac,{theme:t,children:vt.jsx(Dg,{children:vt.jsx(CM,{props:e,children:vt.jsxs(ld,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[vt.jsx(lz,{}),vt.jsx(oz,{})]})})})})},uz=e=>e.flags.isEnabled("VNA-655-STRAIGHT_TABLE_NEW_EXPLORATION")?{component:cz,classification:{tags:["exploration"],exclusive:!0}}:{component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}};var dz=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}(dz||{}),fz=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(fz||{}),pz=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(pz||{}),hz=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(hz||{});const mz=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,gz=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,i="}";switch(e.type){case pz.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case dz.BEGINNING_OF_WORD:t="*^",n="*";break;case dz.ENDS_WITH:t="*";break;case dz.STARTS_WITH:n="*";break;case dz.MATCHES_EXACTLY:break;case dz.CONTAINS:default:t="*",n="*"}const i=e.options.values?.[0]??"";return""!==i?`"${t}${i}${n}"`:""})(e);break;case pz.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===fz.GENERAL,r=t?.modifier?.type===hz.FIXED_VALUE,i=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===i.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let o,a,s="=";n&&r?(o=`${t.conditionField?.aggregator}(${mz(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(o="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(o=`${t.conditionField?.aggregator}(${mz(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${mz(t.firstValue?.field)})`):(o=`${mz(e.field)}`,a=`${t.firstValue?.aggregator}(total ${mz(t.firstValue?.field)})`);const l=`${s}${o}${i[0]}${a}`;let c="";if(i.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 ${o}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${mz(t.secondValue?.field)})`,a=` and ${o}`):(e=`${t.secondValue?.aggregator}(total ${mz(t.secondValue?.field)})`,a=` and ${o}`),c=`${a}${i[1]}${e}`}return`"${l}${c}"`})(e);break;case pz.CLEAR_SELECTION:t=`[${e.field}]=`,r="",i="";break;case pz.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${i}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},yz=[];for(let e=0;e<256;++e)yz.push((e+256).toString(16).slice(1));const bz=new Uint8Array(16);function vz(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(bz);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(yz[e[t+0]]+yz[e[t+1]]+yz[e[t+2]]+yz[e[t+3]]+"-"+yz[e[t+4]]+yz[e[t+5]]+"-"+yz[e[t+6]]+yz[e[t+7]]+"-"+yz[e[t+8]]+yz[e[t+9]]+"-"+yz[e[t+10]]+yz[e[t+11]]+yz[e[t+12]]+yz[e[t+13]]+yz[e[t+14]]+yz[e[t+15]]).toLowerCase()}(t)}(e)}const xz=()=>crypto?.randomUUID?.()??vz(),wz=({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}))],Sz=({previousColumns:e,nextColumns:t,qInterColumnSortOrder:n})=>{const r=new Map(e.map((e,t)=>[t,e.qDef.cId])),i=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:i.get(t))??e})};class kz extends e.HyperCubeHandler{#c;constructor(e,t){super(e),this.#c=t}#u(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]))}}#f(e,t){const n=this.hcProperties.qLayoutExclude?.allColumnOrder??{},r={};for(const[i,o]of Object.entries(n))r[i===e?t:i]=o;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.#u(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),i=r.qDef.cId;return this.#f(n,i),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.#u(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),i=r.qDef.cId;return this.#f(n,i),r}async#p(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.getDimensions().length)}}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.#p(t.id):this.#h(t.id));this.updateColumnOrders(t)}updateColumnOrders(e){const t=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:n,nextAllColumnOrderById:r})=>{const i=wz({qDimensions:e,qMeasures:t}),o=[...e,...t],a=new Map(r.map((e,t)=>[e,t])),s=i.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),c=s.filter(e=>!e.isDimension).map(e=>e.def),u=[...l,...c],d=new Map(u.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:l,qMeasures:c,qInterColumnSortOrder:Sz({previousColumns:o,nextColumns:u,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,i=Array.isArray(this.properties.filters)?this.properties.filters:[],o={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:xz(),qTags:Array.isArray(t)?t:[],isNumeric:n};return i.push(o),this.properties.filters=i,this.properties.qHyperCubeDef.qContextSetExpression=gz(i),o}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#y(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=gz(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.#y(e);return n}getLabels(){return this.getMeasures().reduce((e,t)=>(!t.qLibraryId&&t.qDef.qLabel&&e.push(t.qDef.qLabel),e),[])}getAddDimensionLabel(){return this.#c.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}const Cz=(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 Ez(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Mz(e){return e>0?0:1}function Rz(e){return e.translator.get("Visualizations.Descriptions.Column")}function _z(e){return{measures:{min:Mz,max:1e3,description:()=>Rz(e),add(e,t,n){const{qColumnOrder:r}=n.hcProperties;Ez(r,n.getDimensions().length+n.getMeasures().length-1)},remove(e,t,n,r){const{qColumnOrder:i}=n.hcProperties,o=(n.hcProperties.qDimensions?n.hcProperties.qDimensions.length:0)+r;Cz(i,o)}},dimensions:{min:Mz,max:1e3,description:()=>Rz(e),add(e,t,n){const{qColumnOrder:r}=n.hcProperties;return Ez(r,n.getDimensions().length-1),e},remove(e,t,n,r){if(e?.isAlternative)return;const{qColumnOrder:i}=n.hcProperties;Cz(i,r)}}}}const Az=e=>{const t=new kz({},e.translator),n=(t,n)=>{e.anything.logInfo?.(t,n)};return{properties(r){if(!("qHyperCubeDef"in r&&!!r.qHyperCubeDef))return r;const{qHyperCubeDef:i}=r,o=i.qLayoutExclude?.qHyperCubeDef,a=e.flags.isEnabled("qcb-35151-fix-duplicate-columns"),s=new Set,l=[];let c=0,u=0,d=0;[...i.qDimensions,...i.qMeasures,...o?.qDimensions??[],...o?.qMeasures??[]].forEach(e=>{c++;const t=e.qDef?.cId;if((e=>"string"==typeof e&&e.length>0)(t))if(s.has(t)){if(u++,a){const t=xz();e.qDef={...e.qDef,cId:t},l.push(t)}}else s.add(t),l.push(t);else if(d++,a){const t=xz();e.qDef={...e.qDef,cId:t},l.push(t)}});const f=u+d;if(0===f)return r;n("sn-table migrate: column cId issues detected",{issueCount:f,totalColumnCount:c,duplicateCount:u,missingCount:d});const p=r.components?.find(e=>"theme"===e.key);return e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&p?.nullValues&&!p.dimensionNullValues&&(p.dimensionNullValues={...p.nullValues}),a?(t.setProperties(r),t.updateColumnOrders(l),n("sn-table migrate: column cId cleanup completed",{replacementCount:f}),r):r}}};let Pz=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),Iz=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const Tz=e=>{switch(e?.type){case"url":return Pz.Link;case"image":return Pz.Image;case"indicator":return Pz.Indicator;case"miniChart":return Pz.MiniChart;default:return Pz.Text}},Dz=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:i}=r.properties.qHyperCubeDef,o=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!i&&e||i)&&o.push({value:"image",translation:"Object.Table.Representation.Image"}),o}}),Oz=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>Tz(e.qDef.representation)===Pz.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:i,qDimensions:o,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=o?.indexOf(e)??1/0;return(r?.slice(0,i)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},Nz=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:Dz({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>Tz(e.qDef.representation)===Pz.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>Tz(e.qDef.representation)===Pz.Link&&e.qDef.representation?.urlPosition===Iz.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>Tz(e.qDef.representation)===Pz.Link&&e.qDef.representation?.urlPosition===Iz.Attribute},...Oz(n)}},qz=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,i=!r?.("tableImages")&&t[Pz.Image],o=!r?.("qMiniChartDef")&&t[Pz.MiniChart],a=!r?.("tableIndicators")&&t[Pz.Indicator],s=i&&t[Pz.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&&i||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),o&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:i?{uses:"measureRepresentationItems.representationImage",show:e=>Tz(e.qDef.representation)===Pz.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:o?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};var Lz,jz={};var zz=(Lz||(Lz=1,function(e){(()=>{var t={370:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{default:()=>Ae});var o=r(370),a=r.n(o);const s=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},l=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},c={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var u="".concat(" ","(").concat(" "),d="".concat(" ",")").concat(" ");function f(e){return u+e+d}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function h(e){return!(!e.fullAccumulation&&!e.fullRange)}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function g(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function y(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function b(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function v(e){return void 0===e?")":", 0, ".concat(e,")")}function x(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function w(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(x("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(x("MaxString(".concat(t,")")),")'\"}")}function S(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=w(p(r[0],i),y(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var u=p(r[0],i),d=p(r[1],i),f=y(0),h=y(1),m=w(u,f),g=w(d,h);return"".concat(a,"({1<").concat(m,",").concat(g,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function k(e){return"".concat(e,"(")}function C(e){var t=e.properties,n=e.layout;return l(t,"qHyperCubeDef.qDimensions",l(n,"qHyperCube.qDimensionInfo",[])).length}const E={isFullRange:h,getNumDimensions:C,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=f(g(t));if(!n.showExcludedValues)return a;var s=S({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=y(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var u=y(0),d=y(1);return"If(Count(".concat(u,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:m,getNumStepComp:function(e,t){if(!h(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return m(e,t)},getAboveCompPrefix:b,getAboveCompSuffix:v,getAboveComp:function(e,t,n,r){return b(e,t)+n+v(r)},getFunctionPrefix:k,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return k(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:S,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===C({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=y(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:g,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(u);if(-1!==n){var r=t.indexOf(d);if(-1!==r)return t.substring(n+u.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:p,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=C({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:f,canExtract:function(e){var t=e.indexOf(u),n=e.indexOf(d);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:y,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=c.OPTIONS.find(function(t){return t.value===e.decomposition});return t?c.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(c.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return c.EXPRESSIONS[n]&&r.includes(c.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var _=a().bind(null,!0),A={},P=Array.isArray;function I(e){return null!=e&&!Array.isArray(e)&&"object"===R(e)}function T(e){return void 0===e}function D(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function O(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}}),e}function N(e,t){var n=!0;if(I(e)&&I(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){N(e[r],t[r])||(n=!1)}),n);if(P(e)&&P(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!N(e[r],t[r]))return!1;return!0}return e===t}A.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?_({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);N(o,a)||D(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):I(o)&&I(a)?r=r.concat(A.generate(a,o,s)):P(o)&&P(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(N(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(A.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){T(t[i])&&!D(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},A.apply=function(e,t){t.forEach(function(t){var n,r,i=O(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(P(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(P(a)&&P(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return M(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(I(a)&&I(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!D(n,e)&&delete n[e]}),_(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var u=O(e,t.from);P(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(P(i)?i.splice(+o,1):delete i[o])})},A.clone=function(e){return _({},e)},A.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},A.updateObject=function(e,t){Object.keys(e).length?A.apply(e,A.generate(e,t)):_(e,t)};const q=A;var L="accumulation";function j(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function z(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const $={translationKey:"properties.modifier.accumulation",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var s=o;void 0===s&&(s=E.getNumDimensions({properties:r,layout:i}));var c=l(r,"qHyperCubeDef.qDimensions",[]),u=E.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=E.getNumStepComp(n,s),f=E.getAboveComp(n,s,u,d),p=E.getRangeComp("RangeSum",f);if(E.needDimension({modifier:n,properties:r,layout:i})){var h=E.getDimComp(c,1),m=E.getDimComp(c,0),g=E.getAggrComp(p,h,m);p=n.showExcludedValues?E.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,valueComp:g}):g}return p},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(z(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(z(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(z(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=j(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=j(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(L))return!1;var o=j(t,e);return o&&!o.disabled}}}};var B="movingAverage";function H(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function V(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var W={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const U={translationKey:"properties.modifier.movingAverage",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return n;var c=a;void 0===c&&(c=E.getNumDimensions({properties:i,layout:o}));var u=l(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=E.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:s,treatMissingAsNull:d}),p=E.getNumStepComp(r,c),h=E.getAboveComp(r,c,f,p);if(r.nullSuppression)t=E.getRangeComp("RangeAvg",h);else{var m=E.getRangeComp("RangeSum",h),g=function(e,t){var n=E.getRowNoComp(e,t);if(!E.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(E.needDimension({modifier:r,properties:i,layout:o})){var b=E.getDimComp(u,1),v=E.getDimComp(u,0),x=E.getAggrComp(y,b,v);y=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,W)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=H(t,e);return o&&!o.disabled}}}};var G="timeSeriesDecomposition";function Y(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===G)return n[r]}function K(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===G)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var X={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const J={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?E.generateTSDExpression(n,t,r):t},extractInputExpression:E.extractInputExpression,initModifier:function(e,t){E.initModifier(e,X),""===e.decomposition&&t&&(e.decomposition=E.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(K(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:c.OPTIONS},steps:{refFn:function(t){return"".concat(K(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=Y(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=Y(t,e);return n&&!n.fullRange}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(G))return!1;var o=Y(t,e);return o&&!o.disabled}}}};var Q="difference";function Z(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===Q)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var ee={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const te={translationKey:"properties.modifier.difference",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var s=o;void 0===s&&(s=E.getNumDimensions({properties:r,layout:i}));var c=l(r,"qHyperCubeDef.qDimensions",[]),u=E.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=E.getAboveComp(n,s,u),f="".concat(u," - ").concat(d);if(E.needDimension({modifier:n,properties:r,layout:i})){var p=E.getDimComp(c,1),h=E.getDimComp(c,0),m=E.getAggrComp(f,p,h);f=n.showExcludedValues?E.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(ee).forEach(function(t){void 0===e[t]&&(e[t]=ee[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(Q))return!1;var o=function(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===Q)return n[r]}(t,e);return o&&!o.disabled}}}};var ne="normalization";function re(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===ne)return n[r]}function ie(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===ne)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function oe(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var ae={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function se(e){return 2===e?"{1}":""}function le(e,t,n){return 1===e?"{$<".concat(E.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ce(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,n){return 0===e&&t>1?"<".concat(E.getDimDefWithWrapper(n),">"):""}const de={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var s=o;void 0===s&&(s=E.getNumDimensions({properties:r,layout:i}));var c=l(r,"qHyperCubeDef.qDimensions",[]),u=E.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a,s){var l=se(t),c=le(t,n,r),u=""===l&&""===c?"":l||c,d=ce(i,o),f=ue(i,o,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=E.getDimDefWithWrapper(n);return t.join(", ")}(o);return s?"(If(".concat(e," < 0, null(), ").concat(e,"))/ Sum(").concat(u," ").concat(d).concat(f," Aggr(").concat(u," RangeMax( 0, ").concat(e,"), ").concat(p,"))"):"".concat(e,"/ Sum(").concat(u," ").concat(d).concat(f," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,f,s,n.primaryDimension,n.ignoreNegative)},initModifier:function(e){Object.keys(ae).forEach(function(t){void 0===e[t]&&(e[t]=ae[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ie(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(re(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(ie(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ie(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ie(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(re(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ie(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(re(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(ne))return!1;var o=re(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:se,getFieldSelectionComp:le,getTotalComp:ce,getSelectedDimComp:ue};var fe="library id deleted",pe="qDef.qDef",he="qDef.base.qDef",me="qLibraryId",ge="qDef.base.qLibraryId",ye="qDef.qLabel",be="qDef.qLabelExpression",ve="qDef.base.qLabel",xe="qDef.base.qLabelExpression",we="qDef.qAggrFunc",Se="qDef.base.qAggrFunc",ke="qDef.base";const Ce={getExpression:function(e){var t=l(e,he);return void 0!==t?t:l(e,pe)},getExpressionRef:function(e){return void 0!==l(e,he)?he:pe},getLibraryIdRef:function(e){return l(e,ge)?ge:me},getLibraryId:function(e){return l(e,ge)||l(e,me)},getLabelRef:function(e){return l(e,ke)?ve:ye},getLabelExpressionRef:function(e){return l(e,ke)?xe:be}};var Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(s(e,he,l(e,pe)),s(e,ge,l(e,me)),s(e,ve,l(e,ye)),s(e,xe,l(e,be)))},restoreBase:function(e){Ee.isValid(e)&&(s(e,pe,l(e,he)),s(e,me,l(e,ge)),s(e,ye,l(e,ve)),s(e,be,l(e,xe)),l(e,we)&&l(e,Se)&&s(e,we,l(e,Se)),delete e.qDef.base)},isValid:function(e){var t=l(e,he),n=l(e,ge);return void 0!==t||void 0!==n}};const Me=Ee;function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}var _e={accumulation:$,movingAverage:U,difference:te,normalization:de,timeSeriesDecomposition:J};const Ae={modifiers:_e,apply:Ie,applyModifiers:Te,cleanUpMeasure:De,destroy:function(e){e&&Pe[e.id]&&Pe[e.id].masterItemSubscriber&&(Pe[e.id].masterItemSubscriber&&Pe[e.id].masterItemSubscriber.unsubscribe(),delete Pe[e.id])},hasActiveModifiers:Oe,getActiveModifier:Ne,initBase:Me.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return _e[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return _e[e]&&_e[e].isApplicable({properties:n,layout:r})})},measureBase:Ce,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=je(e);We({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Xe({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:qe};var Pe={};function Ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,o=e.masterItem,s=!1;Pe[t.id]=Pe[t.id]||{isFirstTime:!0};var c=Pe[t.id].isFirstTime;if(Pe[t.id].isFirstTime=!1,n&&"object"===Re(n))return Te({model:t,properties:n});var u=t?t.layout:void 0,d=l(u,"qSelectionInfo.qInSelections");if(i||d)return Promise.resolve(s);var f=l(u,"qHyperCube.qMeasureInfo"),p=Pe[t.id].lastReloadTime;if(Pe[t.id].lastReloadTime=l(t,"app.layout.qLastReloadTime"),Oe({measures:f,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return l(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ve({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:t,lastReloadTime:p});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return We({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:o,isFirstTime:c})?t.getEffectiveProperties().then(function(e){var n=a()(!0,{},e);Fe(n);var r=Je(n);return Ue({model:t}).then(function(i){return Ge({libraryIds:r,model:t}).then(function(r){return h&&function(e){var t=e.properties;Le(t).forEach(function(e){return function(e){var t=e.measure;if(Ve({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Re(e)&&!e.disabled){if(n++,"object"!==Re(_e[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=_e[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&E.simplifyExpression(t.qDef.base.qDef)!==E.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:n}),Te({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:o,libraryItemsProps:r,dimensionAndFieldList:i})})}).catch(function(){return Promise.resolve(s)})}):Promise.resolve(s)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Re(e.base)})}(f)?t.getEffectiveProperties().then(function(e){return function(e){var t=e.model,n=e.properties,r=Je(n);return Qe({model:t,libraryIds:r}).then(function(){var e=a()(!0,{},n);return Le(n).forEach(function(e){return De(e)}),Ke({oldProperties:e,newProperties:n,model:t})})}({model:t,properties:e})}):Promise.resolve(s)}function Te(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,o=e.runUpdateIfChange,s=void 0!==o&&o,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=s?a()(!0,{},r):r),Fe(r);var f=Je(r);return Qe({model:t,libraryIds:f,masterItem:c}).then(function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,o=e.dimensionAndFieldList;if(t||(t=Le(n)),!t.length)return Promise.resolve();if(!i&&!Oe({measures:t,properties:n}))return t.forEach(function(e){return De(e)}),Promise.resolve();var s=i?void 0:Je(n);return Ue({model:r,dimensionAndFieldList:o}).then(function(e){return Ge({libraryIds:s,model:r,libraryItemsProps:i}).then(function(r){t.forEach(function(t){var i=t.qDef.modifiers;r&&We({modifiers:i,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,o=0;Me.isValid(t)||Me.initBase(t,!0);var s=t.qDef,c=s.modifiers,u=s.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Re(e)&&!e.disabled){if(o++,"object"!==Re(_e[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(o>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");_e[e.type].initModifier(e,t);var s=t.qLibraryId||u&&u.qLibraryId;s?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,o=e.libraryItemsProps[e.libraryId],s=o.qMeasure.qDef,l=""===s?s:_e[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||o.qMeasure.qLabel)&&(t.qDef.qLabel=t.qDef.base.qLabel||o.qMeasure.qLabel),(t.qDef.qLabelExpression||o.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=o.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&o.qMeasure.qNumFormat&&(t.qDef.qNumFormat=t.qDef.base.qNumFormat||o.qMeasure.qNumFormat,t.qDef.isCustomFormatted=o.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=o.qMeasure.coloring,n.base=a()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:s,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof _e[n.type].updateModifier&&_e[n.type].updateModifier(n,r.qHyperCubeDef);var o=Ce.getExpression(t),s=""===o?o:_e[n.type].generateExpression({expression:o,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||o,n.base=a()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=l(e,"qDef.qAggrFunc");"Expr"!==t||qe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&qe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}})}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),$e(t)):De(t)})})})}({measures:i,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return s?Ke({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)})}).catch(function(){return Promise.resolve(!1)})}function De(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some(function(e){return"object"===Re(e)&&!e.disabled&&!_e[e.type]})}(e)?Me.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,$e(e)}function Oe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return We({modifiers:je(e),properties:n,layout:r})})}function Ne(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(_e[r.type]&&!r.disabled)return r}}function qe(e){var t=Ne(e);return!t||_e[t.type].enableTotalsFunction(e)}function Le(e){return l(e,"qHyperCubeDef.qMeasures",[]).concat(l(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return l(e,"outputExpression.qValueExpression.qExpr")||l(e,"outputExpression")}function Fe(e){Le(e).forEach(function(e){return function(e){var t=Ne(e);t&&(void 0!==t.outputExpression&&ze(t)!==e.qDef.qDef?delete e.qDef.base:!Me.isValid(e)&&t.base&&(e.qDef.base=a()(!0,{},t.base)))}(e)})}function $e(e){var t=je(e);Array.isArray(t)&&t.forEach(function(t){"object"===Re(t)&&(t.disabled||!_e[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Be(e){return e.base||e.qDef&&e.qDef.base}function He(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ve(e){var t=e.measure,n=e.properties,r=e.layout;return!He(t)&&We({modifiers:je(t),properties:n,layout:r})}function We(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Re(e)||e.disabled||!_e[e.type])&&(void 0===i[e.type]&&(i[e.type]=_e[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ue(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ge(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a}).catch(function(){return null})}function Ye(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ke(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(l(t,"qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(l(n,"qHyperCubeDef.qMeasures"),Ye)||JSON.stringify(l(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(l(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&l(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):function(e,t,n){if(!e)return Promise.resolve();var r=q.generate(t,n);return a()(!0,t,n),r&&r.length?(r=r.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(r,!0)):Promise.resolve()}(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Xe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Re(e)&&!e.disabled&&_e[e.type]&&_e[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Je(e){var t=Le(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=je(t);if(We({modifiers:r,properties:e})){var o=He(t);o&&n.push(o),i=i||Xe({modifiers:r,properties:e})}}),l(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function Qe(e){var t=e.model,n=e.libraryIds,r=e.masterItem;return!r&&r!==fe&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Pe[t.id].masterItemSubscriber=Pe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){var t={},n=l(e,"qInfo.qType");return n&&a[n]&&a[n].forEach(function(n){t[n]=l(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=s(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(){Object.keys(r).forEach(function(e){i[e]||o[e]||(r[e].listener.dispose(),r[e].unbindCloseListnener(),delete r[e])})}var d=function(e,t){return e.once("closed",t),function(){return e.removeListener("closed",t)}};function f(e,i){return t.app[i](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),unbindCloseListnener:d(t,function(){return e=t.id,n(fe),delete r[e],void u();var e}),enabled:!1,properties:s(t.layout)}}).catch(function(){})}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),o={},t.forEach(function(e){o[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:a}),u(),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(f(e,"getMeasure"))}),Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(f(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose(),r[e].unbindCloseListnener()}),r={}}}}({model:t,callback:function(e){return Ie({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Pe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}for(var Ze in e.default=i.default,i)-1===["default"].indexOf(Ze)&&(e[Ze]=i[Ze]);Object.defineProperty(e,"__esModule",{value:!0})})()}(jz)),jz),Fz=st(zz);const $z="TOTAL_OFF",Bz={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1}},Hz={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}},Vz=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)=>(!Fz.hasActiveModifiers({measures:[e],properties:t.properties})||Fz.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")}),Wz={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:Fm.Auto,translation:"Common.Auto"},{value:Fm.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:Fm.Pixels,translation:"Object.Table.Column.Pixels"},{value:Fm.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:Fm.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===Fm.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:"20",show:e=>e.qDef.columnWidth?.type===Fm.Percentage}},Uz=e=>({...Bz,...e.flags.isEnabled("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?{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}]}]}]}}:{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}]}},...Hz,...Wz}),Gz=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:$z,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:$z,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!==$z},{uses:"divider"}]},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}}),Yz=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:Vz(e)}},Kz=e=>({dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:Gz(e)},presentation:{type:"items",translation:"properties.presentation",items:{...Uz(e),...Nz(e)}}}}}),Xz=e=>({measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:Yz(e)},presentation:{type:"items",translation:"properties.presentation",items:{...Uz(e),...qz(e,{[Pz.Image]:!0,[Pz.Indicator]:!0,[Pz.MiniChart]:!0})}}}}}),Jz=e=>({...Kz(e),...Xz(e)}),Qz=e=>({type:"items",translation:"Common.Data",component:"tabs-component",items:{columns:{component:"data-assets-panel",ref:"columns",tabName:"properties.DataAssetPanel.Columns",items:{...Jz(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}}}),Zz=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),eF=e=>Zz("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),tF={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}},nF=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")}),rF=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,i){const o=r?.(e,t,i)??!1,a=i.theme.current(),s=n(a,o);return{color:"transparent"===s?"none":s}}}),iF=(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},oF=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,n,r)=>{const i=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>iF(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...I(r).filter(e=>!a.includes(e)).map(e=>iF(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),aF=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],sF=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,i)=>{const o=i.theme.current();return((e,t,n)=>{const r=t.fontSize,i=t.fontSizes??[],o=Array.from(new Set([e,r,...i])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...o.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>iF(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...aF.filter(e=>!o.includes(e)).map(e=>iF(e,!1))];return[...a,...s.length>1?s:[]]})(t(o),o,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),lF=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:oF({ref:`${e}.fontFamily`,themeAccessor:t=>i(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:sF({ref:`${e}.fontSize`,themeAccessor:t=>i(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:rF(`${e}.fontColor`,void 0,t=>i(t,e,"color")??t.color)}},background:rF(`${e}.background`,"properties.background",(t,n)=>{const r=n?im.WHITE:im.TRANSPARENT;return i(t,e,"backgroundColor")??r},a)}}}}),cF=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:i,translation:o})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{nullValueText:i?eF(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:rF(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:rF(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),uF=(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}},dF=e=>e.grid?.zebraStripes?.show,fF={ref:"content.rowHeight",component:"integer",placeholder:1,maxlength:4,translation:"ThemeStyleEditor.style.rowHeight",change(e){null!=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)}},pF=e=>e?.content?.hoverEffect,hF={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:pF,ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show:pF,ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}},mF=(e,t,{properties:n})=>"sn-table"===n.visualization&&!0===n.usePagination,gF=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),yF=({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:lF({section:"header",defaultFontStyle:["bold"],translator:t,flags:e,getThemeValue:uF,disableNoneCallback:mF}),dimensionValueSection:lF({section:"dimensionValues",translator:t,flags:e,getThemeValue:uF}),measureValueSection:lF({section:"measureValues",translator:t,flags:e,getThemeValue:uF}),totalRowSection:lF({section:"totalValues",defaultFontStyle:["bold"],translation:"properties.totals",translator:t,flags:e,getThemeValue:uF,disableNoneCallback:mF}),subTotalRowSection:e.isEnabled("TLV-2303-SUB-TOTALS")?lF({section:"subTotalValues",defaultFontStyle:["bold"],translation:"properties.subTotals",translator:t,flags:e,getThemeValue:uF,disableNoneCallback:mF}):void 0,...gF(e)?{dimensionNullSection:cF({section:"dimensionNullValues",fallbackBackground:im.NULL_VALUE_BACKGROUND,getThemeValue:uF,isNullValueText:!0}),nullValues:cF({section:"nullValues",translation:"properties.pivot.measureNullValues",fallbackBackground:im.NULL_VALUE_BACKGROUND,getThemeValue:uF,isNullValueText:!0})}:{nullValues:cF({section:"nullValues",fallbackBackground:im.NULL_VALUE_BACKGROUND,getThemeValue:uF,isNullValueText:!1})},grid:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{rowHeight:{show:()=>!0,...fF},border:rF("grid.border","properties.border",e=>e.object?.straightTableV2?.grid?.borderColor??im.BORDER_MEDIUM),divider:rF("grid.divider","properties.pivot.divider",e=>e.object?.straightTableV2?.grid?.divider?.borderColor??im.BORDER_HEAVY)}}}},hoverEffectSection:hF,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:dF,ref:"grid.zebraStripes.color.odd",translation:"properties.zebraStripes.color.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundrOdd:{show:dF,ref:"grid.zebraStripes.background.odd",translation:"properties.zebraStripes.background.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1},zebraStripesColorEven:{show:dF,ref:"grid.zebraStripes.color.even",translation:"properties.zebraStripes.color.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundEven:{show:dF,ref:"grid.zebraStripes.background.even",translation:"properties.zebraStripes.background.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1}}}}}}}]}),bF=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[yF(e),nF(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:eF()]},...tF}}),vF={uses:"sorting"},xF={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},wF=e=>({type:"items",component:"accordion",items:{data:Qz(e),sorting:vF,addOns:xF,settings:bF(e)}});function SF(e){return{definition:wF(e),exploration:uz(e),data:_z(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(e,t,n,r,i){const o={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return Zy({exportFormat:e,initialProperties:t,extension:n,hypercubePath:r,defaultPropertyValues:o,viewDataMode:i})},exportProperties:(e,t)=>Gy({propertyTree:e,hyperCubePath:t}),...e.flags.isEnabled("VNA-505_toggle_field_visibility")&&{propertyHandler:t=>new kz(t,e.translator),usePropertyHandler:"sn-table-data"},migrate:Az(e)}}var kF,CF={exports:{}};
120
+ */function JC(){if(GC)return Cw;GC=1,Object.defineProperty(Cw,"__esModule",{value:!0}),Cw.default=function(t){return(0,e.createStyles)(t)};var e=XC;return Cw}var QC,ZC,eE={},tE={};function nE(){if(QC)return tE;QC=1;var e=fl();Object.defineProperty(tE,"__esModule",{value:!0}),tE.default=void 0;var t=(0,e(xw()).default)();return tE.default=t,tE}function rE(){if(ZC)return eE;ZC=1;var e=fl();Object.defineProperty(eE,"__esModule",{value:!0}),eE.default=void 0;var t=e(Vl()),n=XC,r=e(nE());var i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return eE.default=i,eE}var iE,oE,aE={},sE={};function lE(){if(iE)return sE;iE=1;var e=fl();Object.defineProperty(sE,"__esModule",{value:!0}),sE.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},sE.getUnit=n,sE.toUnitless=r,sE.convertLength=function(e){return function(t,i){var o=n(t);if(o===i)return t;var a=r(t);if("px"!==o)if("em"===o)a=r(t)*r(e);else if("rem"===o)return a=r(t)*r(e),t;var s=a;if("px"!==i)if("em"===i)s=a/r(e);else{if("rem"!==i)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+i}},sE.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,i=r+n;return t-r<i-t?r:i},sE.fontGrid=function(e){var t=e.lineHeight,n=e.pixels,r=e.htmlFontSize;return n/(t*r)},sE.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,i=e.max,o=e.unit,a=void 0===o?"rem":o,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,c=e.transform,u=void 0===c?null:c,d=(0,t.default)({},n,"".concat(r).concat(a)),f=(i-r)/l[l.length-1];return l.forEach(function(e){var i=r+f*e;null!==u&&(i=u(i)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*i)/1e4).concat(a))}),d};var t=e(Nb());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return sE}function cE(){if(oE)return aE;oE=1;var e=fl();Object.defineProperty(aE,"__esModule",{value:!0}),aE.default=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.breakpoints,a=void 0===o?["sm","md","lg"]:o,s=i.disableAlign,l=void 0!==s&&s,c=i.factor,u=void 0===c?2:c,d=i.variants,f=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,p=(0,t.default)({},e);p.typography=(0,t.default)({},p.typography);var h=p.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map(function(e){return p.breakpoints.values[e]});return f.forEach(function(e){var i=h[e],o=parseFloat(m(i.fontSize,"rem"));if(!(o<=1)){var a=o,s=1+(a-1)/u,c=i.lineHeight;if(!(0,r.isUnitless)(c)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(c)||(c=parseFloat(m(c,"rem"))/parseFloat(o));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:c,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},i,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),p};var t=e(Vl()),n=Cb,r=lE();return aE}var uE,dE={};function fE(){if(uE)return dE;uE=1;var e=fl();Object.defineProperty(dE,"__esModule",{value:!0}),dE.default=void 0;var t=e(Vl()),n=XC,r=e(nE()),i=function(e){var i=(0,n.styled)(e);return function(e,n){return i(e,(0,t.default)({defaultTheme:r.default},n))}};return dE.default=i,dE}var pE,hE={};function mE(){if(pE)return hE;pE=1;var e=fl();Object.defineProperty(hE,"__esModule",{value:!0}),hE.default=function(){return(0,t.useTheme)()||n.default};var t=XC;e(bt());var n=e(nE());return hE}var gE,yE={};function bE(){if(gE)return yE;gE=1;var e=fl();Object.defineProperty(yE,"__esModule",{value:!0}),yE.default=void 0;var t=e(Vl()),n=XC,r=e(nE());var i=function(e,i){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return yE.default=i,yE}var vE,xE,wE={};function SE(){if(vE)return wE;vE=1;var e=fl();Object.defineProperty(wE,"__esModule",{value:!0}),wE.default=void 0;var t=XC,n=e(nE()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return wE.default=r,wE}function kE(){return xE||(xE=1,function(e){var t=fl(),n=(tb||(tb=1,function(e){var t=ob().default;function n(r,i){if("function"==typeof WeakMap)var o=new WeakMap,a=new WeakMap;return(e.exports=n=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,s={__proto__:null,default:e};if(null===e||"object"!=t(e)&&"function"!=typeof e)return s;if(r=n?a:o){if(r.has(e))return r.get(e);r.set(e,s)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(s,l,i):s[l]=e[l]);return s},e.exports.__esModule=!0,e.exports.default=e.exports)(r,i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(rb)),rb.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 o.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return o.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 c.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return p.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 i=Eb();Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))});var o=n(xw()),a=t(kw()),s=t(JC()),l=t(rE()),c=t(cE()),u=t(fE()),d=mw();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 f=t(mE()),p=t(bE()),h=t(SE()),m=XC}(nb)),nb}var CE=kE();CE.alpha(Xe.GREYSCALE_0,.05),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5),CE.alpha(Xe.GREEN_PALE,.5),CE.alpha(Xe.BLUE_PALE,.5);!function(e=()=>{try{return window.localStorage}catch(e){return void("undefined"!=typeof window&&console.warn(e))}},t){var n;let r,i;const o={getItem:(n,o)=>{var a,s;const l=e=>{if(r!==(e=e||"")){try{i=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return o}r=e}return i},c=null!=(s=null==(a=e())?void 0:a.getItem(n))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(c)?c.then(l):l(c)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let a;try{a=null==(n=e())?void 0:n.subscribe}catch(e){}var s;!a&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(a=(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)}}),a&&(o.subscribe=(s=a,(e,t,n)=>s(e,e=>{let r;try{r=JSON.parse(e||"")}catch(e){r=n}t(r)})))}();const EE=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),ME=new WeakMap,RE=()=>{};function _E(e,t=RE){return((e,t,n)=>{const r=EE(()=>new WeakMap,ME,t);return EE(e,r,n)})(()=>{const n=new WeakMap,r=new WeakMap,i=Rg(0),o=Rg([]);o.INTERNAL_onInit=e=>{e.set(o,[()=>e.set(i,e=>e+1)])},i.debugPrivate=!0,o.debugPrivate=!0;const a=Rg(s=>{let l;s(i);try{l=s(a)}catch(e){}const c=s(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(c))return{v:c};if(c!==(null==l?void 0:l.p)&&c.then(e=>{r.set(c,e);const[t]=s(o);t()},e=>{n.set(c,e);const[t]=s(o);t()}),n.has(c))throw n.get(c);return r.has(c)?{p:c,v:r.get(c)}:l&&"v"in l?{p:c,f:t(l.v),v:l.v}:{p:c,f:t()}});return a.init=void 0,a.debugPrivate=!0,Rg(e=>{const t=e(a);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,t)}const AE=new WeakMap;function PE(e,t){const n=Tg(t),r=IE(n);for(const[i,...o]of e)r.has(i)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(i),n.set(i,...o))}const IE=e=>{let t=AE.get(e);return t||(t=new WeakSet,AE.set(e,t)),t};function TE(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function DE(e){const t=Rg(()=>[]),n=Rg(function(e){const[r,i,o]=e(t);o.has(n)&&(r.forEach(e),++i.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=kg(e),i=r[1],o=r[3],a=tg(r[6]),s=r[11],l=r[12],c=r[13],u=r[14],d=r[15],f=r[16],p=r[17],h=r[20],m=new Set;let g,y=0,b=!1,v=!1,x=!1;function w(){if(y)return;m.clear();let t=!0;const S=o=>{if(x)return e.get(o);if(o===n){const t=s(r,e,o);if(!Km(t)){if(!Gm(o))throw new Error("no atom init");h(r,e,o,o.init)}return Xm(t)}const a=u(r,e,o);try{return Xm(a)}finally{k.d.set(o,a.n),i.get(o)?.t.add(n),t?m.add(o):i.has(o)&&(p(r,e,n),c(r,e),l(r,e))}};S.peek=e.get;const C=(i,...u)=>{const m=s(r,e,i);try{if(++y,i===n){if(!Gm(i))throw new Error("atom not writable");const t=m.n,n=u[0];return h(r,e,i,n),p(r,e,i),void(t!==m.n&&(o.add(i),a.c?.(i),d(r,e,i)))}return f(r,e,i,u)}finally{t||(c(r,e),l(r,e)),--y}};C.recurse=(t,...i)=>{if(x){if(TE())throw new Error("set.recurse is not allowed in cleanup")}else try{return b=!0,p(r,e,n),C(t,...i)}finally{c(r,e),b=!1,v&&(v=!1,w())}};try{g?.();const e=n.effect(S,C);if("function"!=typeof e)return;g=()=>{if(!y)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{k.d.set(t,s(r,e,t).n)}),p(r,e,n),c(r,e)}}const S=function(e,t){let n=OE.get(e);n||(n=new Set,OE.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),k=s(r,e,n);k.v=void 0,Object.assign(e.get(t),[m,k,i]),a.c.add(n,function(){o.delete(n)}),a.m.add(n,function(){S.add(w),g&&S.delete(g)}),a.u.add(n,function(){S.delete(w),g&&S.add(g)}),a.c.add(n,function(){b?v=!0:S.add(w)})},TE()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const OE=new WeakMap;const NE=e=>{const{items:t,handler:n,model:r,handlerQueue:i}=e;void 0!==n&&void 0!==r&&i&&i.add(async()=>{await(async(e,t,n)=>{try{await t.toggleAlternatives(e,n)}catch(t){console.error(`Failed to toggle ${e.map(e=>e.id).join(", ")} from/to alternative`,t)}})(t,n,e.currentColumnIds)})};function qE(e,t){let n=null;const r=new Map,i=new Set;function o(i){let s;if(void 0===t)s=r.get(i);else for(const[e,n]of r)if(t(e,i)){s=n;break}if(void 0!==s){if(!n?.(s[1],i))return s[0];o.remove(i)}const l=e(i);return r.set(i,[l,Date.now()]),a("CREATE",i,l),l}function a(e,t,n){for(const r of i)r({type:e,param:t,atom:n})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>r.keys(),o.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,[i]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,i);break}},o.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,i]]of r)n(i,e)&&(r.delete(e),a("REMOVE",e,t))},o}const LE=e=>7005!==e.qError?.qErrorCode,jE=(e,t)=>{if(!e)return;const n=e.qHyperCube.qDimensionInfo.filter(e=>void 0!==e.cId).filter(LE).map(({cId:e,qFallbackTitle:n})=>({id:e,title:n??"",alternative:t,type:"dimension"})),r=e.qHyperCube.qMeasureInfo.filter(e=>void 0!==e.cId).filter(LE).map(({cId:e,qFallbackTitle:n})=>({id:e,title:n??"",alternative:t,type:"measure"}));return[...n,...r]},zE=(e,t)=>{const n=[],r={};return e.forEach(e=>{r[e.id]=e}),Object.keys(t).forEach(e=>{const i=t[e],o=r[e];o&&(n[i]=o)}),n},FE=(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 zE(e,t)}const r=t.map(e=>e.id),i=Object.keys(n).sort((e,t)=>n[e]-n[t]).filter(e=>r.includes(e)),o={...n};for(let e=0;e<r.length;e++){const t=i[e],a=r[e];t!==a&&(o[a]=n[t])}let a=0;const s=Object.entries(o).sort((e,t)=>e[1]-t[1]).map(([e])=>[e,a++]);return s.forEach(([e,t])=>{o[e]=t}),zE(e,o)},$E=Rg(),BE=Rg(),HE=Rg(),VE=Rg(e=>e(HE)?.translate??(e=>e)),WE=Rg(""),UE=Rg(e=>{const t=e(WE).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),GE=new WeakMap,YE={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},KE=_E(Rg(async e=>{const t=e($E);if(t){if(GE.has(t))return GE.get(t);try{const e=await t.app.createSessionObject(YE);return GE.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),XE=Rg(null),JE=Rg(),QE=DE((e,t)=>{const n=e($E),r=e(KE);if(!n||!r)return;const i=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const i=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qMeasures??[])}]);const o=await r.getLayout();t(JE,{layout:structuredClone(e),properties:structuredClone(i),altLayout:structuredClone(o)}),t(XE,null)};return i(),n.Invalidated?.bind(i),()=>{n.Invalidated?.unbind(i)}}),ZE=Rg(e=>e(JE)?.layout),eM=Rg(e=>e(JE)?.altLayout),tM=Rg(e=>e(JE)?.properties),nM=Rg(e=>void 0===e(ZE)||void 0===e(tM)),rM=Rg(e=>{const t=e(JE)?.layout;return t?.qHyperCube.qDimensionInfo.filter(LE)??[]}),iM=Rg(e=>{const t=e(JE)?.layout;return t?.qHyperCube.qMeasureInfo.filter(LE)??[]}),oM=Rg(e=>{const t=e(eM);return jE(t,!0)}),aM=Rg(e=>{const t=e(ZE);return jE(t,!1)}),sM=Rg(e=>{const t=e(tM),n=e(ZE);if(!t||!n)return[];const r=e(aM),i=e(oM),o=n.qHyperCube.qColumnOrder??[],a=e(XE);if(void 0===i||void 0===r)return[];if(a){return[...[...r,...i]].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()))(o,r.length),c=((e,t)=>e.length>0?e.map(e=>t[e]):t)(l,r),u=[...c,...i];return FE(u,c,s)}),lM=Rg(e=>{const t=e(sM),n=e(UE);return t.filter(n)}),cM=Rg(e=>e(lM).length),uM=Rg(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(lM);if(void 0===n)return`columns-section-${t}`;const i=r?.[n];return i?.id??`missing-item-${t}-${n}`}),dM=qE(e=>Rg(t=>t(lM)[e]),(e,t)=>e===t),fM=Rg(e=>e(sM).map(e=>e.id)),pM=Rg(e=>e(lM).map(e=>e.id)),hM=Rg(e=>{const t=e(sM),n={};return t.forEach(e=>{n[e.id]=e.type}),n});class mM{#e=[];#t=!1;#n=!1;#r;#i;#o;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#i=void 0,this.#o=void 0,this.#a=void 0}pause(){this.#i&&(clearTimeout(this.#a),this.#o?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#i=e,this.#o=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#o;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#o&&(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.#o?.(),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.#i)await this.#i;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 gM=Rg(null),yM=DE((e,t)=>{const n=e($E),r=e(BE),i=new mM({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(gM,i);const o=()=>{i.pause()},a=()=>{i.continue(500)},s=()=>{i.abort()};return n?.Invalidated?.bind(o),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{i.abort(),n?.Invalidated?.unbind(o),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),bM=Rg(e=>{const t=[...e(rM),...e(iM)].map(e=>e.cId);return new Set(t)}),vM=Rg(new Set),xM=Rg(new Set),wM=Rg(e=>{const t=e(vM),n=e(xM);return e(bM).difference(n).union(t)}),SM=DE((e,t)=>{e(bM),t(vM,new Set),t(xM,new Set)}),kM=Rg(e=>e(wM),(e,t,n)=>{if("string"!=typeof n.id)return;const r=e(wM).has(n.id),i=new Set(e(xM)),o=new Set(e(vM));r?(i.add(n.id),o.delete(n.id)):(o.add(n.id),i.delete(n.id)),t(xM,i),t(vM,o),NE({items:[n],handler:e(BE),model:e($E),currentColumnIds:e(fM),handlerQueue:e(gM)})}),CM=({props:e,children:t})=>(PE([[$E,e.args.model],[HE,e.args.apis],[BE,e.args.handler]]),zg(QE),zg(yM),zg(SM),t);function EM(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 MM(e){return"write"in e}const RM=new WeakMap,_M={},{read:AM,write:PM}=Rg(null);function IM(e,t,n){const[r,i,o,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=i.get(t);return r||(r=[NM(e,t,n),n],i.set(t,r)),r}const l=n??_M;let c=o.get(l);c||(c=new WeakMap,o.set(l,c));let u=c.get(t);if(!u){const[r,i]=a?IM(a,t,n):[t];u=[t.read===AM?r:NM(e,t,i),i],c.set(t,u)}return u}function TM(e){for(const t of e[5])t()}function DM(e,t,n,r,i){if(n.read===AM&&MM(n)&&MM(t)&&n.write!==PM&&e!==r){const{write:o}=n;return t.write=OM(e,n.write.bind(n),r,i),()=>{t.write=o}}}function OM(e,t,n,r=n){return function(i,o,...a){return t(function(t){const[r]=IM(e,t,n);return i(r)},function(t,...i){const[a]=IM(e,t,n),s=DM(e,a,t,n,r);try{return o(a,...i)}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 i=Object.getPrototypeOf(t),o=Object.create(i,r);return o.read!==AM&&(o.read=function(e,t,n){return function(r,i){return t(function(t){const[i]=IM(e,t,n);return r(i)},i)}}(e,t.read.bind(t),n)),MM(o)&&MM(t)&&o.write!==PM&&(o.write=OM(e,t.write.bind(t),n)),o}function qM({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const i=new WeakSet(e),o=RM.get(n),a=(null==o?void 0:o[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,o,new Set,void 0],l=s[0],c=s[5],u=function(e){const t=e[3],n=[...kg(t)],r=n[21],i=n[22],o=n[23],a={};let s,l;return n[21]=h(r),n[22]=f,n[23]=h(o),n[24]=function(e){return s??(s=m(e[0],c)),l??(l=[s,m(e[1],u),m(e[2]),g(e[3]),e[4],e[5],b(e[6]),h(e[7]),h(e[8]),h(e[9]),h(e[10]),d(s,e[11]),(t,...r)=>e[12](n,...r),(t,...r)=>e[13](n,...r),h(e[14]),h(e[15]),h(e[16]),h(e[17]),h(e[18]),h(e[19]),h(e[20]),h(e[21]),h(e[22]),h(e[23]),()=>e,e[25],(t,...r)=>e[26](n,...r),(t,...r)=>e[27](n,...r),e[28],...e.slice(25)]),l},Cg(...n);function c(t){const n=new WeakMap;return function(r){let i=n.get(r);if(i)return i;const o=t(r);if(!o)return;let a,s;return i=new Proxy(o,{get:(t,n)=>"d"===n?a??(a=m(o.d,function(t){return n=>t(IM(e,n)[0])})):"p"===n?s??(s=g(o.p)):Reflect.get(o,n)}),n.set(r,i),i}}function u(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const i=e(n);return i?(r={...i,d:g(i.d),t:g(i.t),get u(){return i.u},set u(e){i.u=e}},t.set(n,r),r):void 0}}function d(e,t){const n=h(t);return function(t,r,i){const o=e.get(i);if(o)return o;const a=n(t,r,i);return e.set(i,a),e.get(i)}}function f(t,n,r,...o){const[a,s]=IM(e,r),l=DM(e,a,r,s,e);try{return i(t,n,a,...o)}finally{null==l||l()}}function p(t,n){return function(r,...i){const[o]=IM(e,r);return(n?n(t):t)(o,...i)}}function h(t){return function(r,i,o,...a){const[s]=IM(e,o);return t(n,i,s,...a)}}function m(e,t){const n={get:p(e.get.bind(e),t),set:p(e.set.bind(e)),has:p(e.has.bind(e)),delete:p(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function g(t){return{get size(){return t.size},add:p(t.add.bind(t)),has:p(t.has.bind(t)),delete:p(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(p(e)),*[Symbol.iterator](){for(const n of t)yield IM(e,n)[0]}}}function y(t){if(!t)return;const n=p(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[i]=IM(e,n);return t.add(i,r)},n}function b(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>a[t]??(a[t]=y(e[t])),set(n){delete a[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=u,Object.assign(u,{name:r}),RM.set(u,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&&!i.has(t)&&l.delete(t):l.set(t,[NM(s,t,s),s])});c.add(t)}return u}const LM=function(e,t){return function(n){const{atoms:r=[],atomFamilies:i=[],children:o,scope:a,name:s}=n,l=t(),c=Array.from(r,e=>Array.isArray(e)?e[0]:e);function u(){return[a??qM({atoms:c,atomFamilies:i,parentStore:l,name:s}),function(e){return l!==e.parentStore||!EM(c,e.atoms)||!EM(i,e.atomFamilies)||a!==e.providedScope}]}const[[d,f],p]=an.useState(u);if(f({atoms:c,atomFamilies:i,parentStore:l,providedScope:a})){const e=RM.get(d);e&&TM(e),p(u)}return PE(Array.from(r).filter(Array.isArray),{store:d}),an.useEffect(()=>{const e=RM.get(d);return()=>{e&&TM(e)}},[d]),an.createElement(e,{store:d,children:o})}}(Dg,Tg);var jM=Object.defineProperty,zM=Object.defineProperties,FM=Object.getOwnPropertyDescriptors,$M=Object.getOwnPropertySymbols,BM=Object.prototype.hasOwnProperty,HM=Object.prototype.propertyIsEnumerable,VM=(e,t,n)=>t in e?jM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WM=(e,t)=>{for(var n in t||(t={}))BM.call(t,n)&&VM(e,n,t[n]);if($M)for(var n of $M(t))HM.call(t,n)&&VM(e,n,t[n]);return e},UM=(e,t)=>zM(e,FM(t));function GM(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function YM(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function KM(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const c=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>c(e,a.id)),i=e.findIndex(e=>c(e,s.id));if(-1===r||-1===i){if(YM(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const u=Object.entries(e);let d,f,p=-1,h=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>c(e,a.id)),-1!==p&&(d=e)),-1===h&&(h=t.findIndex(e=>c(e,s.id)),-1!==h&&(f=e)),-1!==p&&-1!==h)break;if(-1===p&&YM(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return UM(WM({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return UM(WM({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==f&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;f=s.id,h=t}if(null==d||null==f||d===f&&p===h){if(null!=d&&d===f&&p===h&&YM(a)){const t=null!=a.group&&a.group!==d,r=a.index!==p;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return UM(WM({},e),{[d]:n(e[d],p,a.index)});const r=e[d][p];return UM(WM({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===f)return UM(WM({},e),{[d]:n(e[d],p,h)});const y=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,b=e[d][p];return UM(WM({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[f]:[...e[f].slice(0,h+y),b,...e[f].slice(h+y)]})}(e,t,GM)}const XM=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,JM=Rg(),QM=Rg(e=>e(JM)?.numberOfSections??0),ZM=Rg(e=>e(JM)?.numberOfItemsInSection??[]),eR=Rg(e=>e(JM)?.keyExtractor??XM),tR=Rg(e=>e(JM)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),nR=Rg(e=>e(JM)?.onDragEnd),rR=Rg(e=>e(JM)?.onDragOver),iR=Rg(e=>e(JM)?.itemRenderer),oR=Rg(e=>e(JM)?.headerRenderer),aR=Rg(e=>e(JM)?.dragOverlayRenderer),sR=Rg(e=>e(JM)?.onClick),lR=Rg(e=>{const t=e(QM),n=e(ZM),r=e(eR),i={};for(let e=0;e<t;e++)i[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return i}),cR=Rg(null),uR=Rg(e=>e(cR),(e,t,n)=>{if(null===n)return void t(cR,null);const r=e(cR);t(cR,{...r,...n})}),dR=qE(e=>Rg(null,(t,n,r)=>{let i;"over"===e?i=t(rR):"end"===e&&(i=t(nR),n(uR,null));const{source:o,target:a}=r.operation;if("start"===e)return void n(uR,{id:o.id,startSection:o.data.sectionKey,startIndex:o.data.itemIndex,startSectionIndex:o.data.sectionIndex});if(null===a)return void n(uR,{toIndex:void 0,toSectionIndex:void 0});const s=o.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=KM(t(lR),r)[a.data.sectionIndex].indexOf(o.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(uR)?.startIndex;n(uR,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}i?.({id:o.id,toIndex:l,toSection:a.data.sectionKey,fromSection:o.data.sectionKey,startSection:t(uR)?.startSection??o.data.sectionKey,event:r})})),fR=[JM,QM,ZM,eR,tR,nR,iR,oR,sR,uR],pR=[dR],hR=({props:e,children:t})=>{const n=Fg(JM);return an.useLayoutEffect(()=>{n(e)},[e,n]),t};var mR=Symbol.for("preact-signals");function gR(){if(wR>1)wR--;else{var e,t=!1;for(!function(){var e=ER;for(ER=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==xR;){var n=xR;for(xR=void 0,SR++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&PR(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(SR=0,wR--,t)throw e}}function yR(e){if(wR>0)return e();CR=++kR,wR++;try{return e()}finally{gR()}}var bR=void 0;function vR(e){var t=bR;bR=void 0;try{return e()}finally{bR=t}}var xR=void 0,wR=0,SR=0,kR=0,CR=0,ER=void 0,MR=0;function RR(e){if(void 0!==bR){var t=e.n;if(void 0===t||t.t!==bR)return t={i:0,S:e,p:bR.s,n:void 0,t:bR,e:void 0,x:void 0,r:t},void 0!==bR.s&&(bR.s.n=t),bR.s=t,e.n=t,32&bR.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=bR.s,t.n=void 0,bR.s.n=t,bR.s=t),t}}function _R(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 AR(e,t){return new _R(e,t)}function PR(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 IR(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 TR(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 DR(e,t){_R.call(this,void 0),this.x=e,this.s=void 0,this.g=MR-1,this.f=4,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 OR(e,t){return new DR(e,t)}function NR(e){var t=e.m;if(e.m=void 0,"function"==typeof t){wR++;var n=bR;bR=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,qR(e),t}finally{bR=n,gR()}}}function qR(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,NR(e)}function LR(e){if(bR!==this)throw new Error("Out-of-order effect");TR(this),bR=e,this.f&=-2,8&this.f&&qR(this),gR()}function jR(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function zR(e,t){var n=new jR(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}_R.prototype.brand=mR,_R.prototype.h=function(){return!0},_R.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:vR(function(){var e;null==(e=t.W)||e.call(t)}))},_R.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&&vR(function(){var e;null==(e=t.Z)||e.call(t)}))}},_R.prototype.subscribe=function(e){var t=this;return zR(function(){var n=t.value,r=bR;bR=void 0;try{e(n)}finally{bR=r}},{name:"sub"})},_R.prototype.valueOf=function(){return this.value},_R.prototype.toString=function(){return this.value+""},_R.prototype.toJSON=function(){return this.value},_R.prototype.peek=function(){var e=this;return vR(function(){return e.value})},Object.defineProperty(_R.prototype,"value",{get:function(){var e=RR(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(SR>100)throw new Error("Cycle detected");!function(e){0!==wR&&0===SR&&e.l!==CR&&(e.l=CR,ER={S:e,v:e.v,i:e.i,o:ER})}(this),this.v=e,this.i++,MR++,wR++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{gR()}}}}),DR.prototype=new _R,DR.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===MR)return!0;if(this.g=MR,this.f|=1,this.i>0&&!PR(this))return this.f&=-2,!0;var e=bR;try{IR(this),bR=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 bR=e,TR(this),this.f&=-2,!0},DR.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)}_R.prototype.S.call(this,e)},DR.prototype.U=function(e){if(void 0!==this.t&&(_R.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)}},DR.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(DR.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=RR(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),jR.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()}},jR.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,NR(this),IR(this),wR++;var e=bR;return bR=this,LR.bind(this,e)},jR.prototype.N=function(){2&this.f||(this.f|=2,this.u=xR,xR=this)},jR.prototype.d=function(){this.f|=8,1&this.f||qR(this)},jR.prototype.dispose=function(){this.d()};var FR,$R,BR,HR,VR,WR,UR,GR,YR,KR,XR,JR,QR,ZR,e_,t_,n_,r_,i_,o_,a_=Object.create,s_=Object.defineProperty,l_=Object.defineProperties,c_=Object.getOwnPropertyDescriptor,u_=Object.getOwnPropertyDescriptors,d_=Object.getOwnPropertySymbols,f_=Object.prototype.hasOwnProperty,p_=Object.prototype.propertyIsEnumerable,h_=e=>{throw TypeError(e)},m_=(e,t,n)=>t in e?s_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g_=(e,t)=>s_(e,"name",{value:t,configurable:!0}),y_=["class","method","getter","setter","accessor","field","value","get","set"],b_=e=>void 0!==e&&"function"!=typeof e?h_("Function expected"):e,v_=(e,t,n,r,i)=>({kind:y_[e],name:t,metadata:r,addInitializer:e=>n._?h_("Already initialized"):i.push(b_(e||null))}),x_=(e,t)=>{return m_(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},w_=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},S_=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=y_[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&c_(d<4?i:{get[n](){return E_(this,o)},set[n](e){return R_(this,o,e)}},n));d?p&&d<4&&g_(o,(d>2?"set ":d>1?"get ":"")+n):g_(i,n);for(var v=r.length-1;v>=0;v--)c=v_(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>C_(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?E_:__)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>R_(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?p?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?b_(s)&&(d>4?g.unshift(s):d?p?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?h_("Object expected"):(b_(a=s.get)&&(b.get=a),b_(a=s.set)&&(b.set=a),b_(a=s.init)&&g.unshift(a));return d||x_(e,i),b&&s_(i,n,b),p?4^d?o:b:i},k_=(e,t,n)=>t.has(e)||h_("Cannot "+n),C_=(e,t)=>Object(t)!==t?h_('Cannot use the "in" operator on this value'):e.has(t),E_=(e,t,n)=>(k_(e,t,"read from private field"),n?n.call(e):t.get(e)),M_=(e,t,n)=>t.has(e)?h_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),R_=(e,t,n,r)=>(k_(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),__=(e,t,n)=>(k_(e,t,"access private method"),n);function A_(e,t){if(t){let n;return OR(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return OR(e)}function P_(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;const n=e.some((e,n)=>!P_(e,t[n]));return!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 i=n.some(n=>!P_(e[n],t[n]));return!i}return!1}function I_({get:e},t){return{init:e=>AR(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function T_(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=A_(e.bind(this)),n.set(this,t)),t.value}}function D_(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)=>l_(e,u_(t)))(((e,t)=>{for(var n in t||(t={}))f_.call(t,n)&&m_(e,n,t[n]);if(d_)for(var n of d_(t))p_.call(t,n)&&m_(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function O_(...e){const t=e.map(e=>zR(e));return()=>t.forEach(e=>e())}WR=[I_],VR=[I_],HR=[I_],BR=[D_()],$R=[D_()],FR=[D_()];var N_,q_=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,w_(UR,5,this),M_(this,JR),M_(this,GR,w_(UR,8,this)),w_(UR,11,this),M_(this,QR,w_(UR,12,this)),w_(UR,15,this),M_(this,n_,w_(UR,16,this)),w_(UR,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return E_(this,JR,i_)}get initial(){return E_(this,JR,KR)}get previous(){return E_(this,JR,e_)}set current(e){const t=vR(()=>E_(this,JR,i_));e&&t&&this.equals(t,e)||yR(()=>{E_(this,JR,KR)||R_(this,JR,e,XR),R_(this,JR,t,t_),R_(this,JR,e,o_)})}reset(e=this.defaultValue){yR(()=>{R_(this,JR,void 0,t_),R_(this,JR,e,XR),R_(this,JR,e,o_)})}};function L_(e){return vR(()=>{const t={};for(const n in e)t[n]=e[n];return t})}UR=[,,,a_(null)],GR=new WeakMap,JR=new WeakSet,QR=new WeakMap,n_=new WeakMap,YR=S_(UR,20,"#initial",WR,JR,GR),KR=YR.get,XR=YR.set,ZR=S_(UR,20,"#previous",VR,JR,QR),e_=ZR.get,t_=ZR.set,r_=S_(UR,20,"#current",HR,JR,n_),i_=r_.get,o_=r_.set,S_(UR,2,"current",BR,q_),S_(UR,2,"initial",$R,q_),S_(UR,2,"previous",FR,q_),x_(UR,q_);N_=new WeakMap;var j_,z_,F_,$_,B_,H_=Object.create,V_=Object.defineProperty,W_=Object.getOwnPropertyDescriptor,U_=Object.getOwnPropertySymbols,G_=Object.prototype.hasOwnProperty,Y_=Object.prototype.propertyIsEnumerable,K_=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),X_=e=>{throw TypeError(e)},J_=Math.pow,Q_=(e,t,n)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z_=["class","method","getter","setter","accessor","field","value","get","set"],eA=e=>void 0!==e&&"function"!=typeof e?X_("Function expected"):e,tA=(e,t,n,r,i)=>({kind:Z_[e],name:t,metadata:r,addInitializer:e=>n._?X_("Already initialized"):i.push(eA(e||null))}),nA=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=Z_[u+5],f=e[2]||(e[2]=[]),p=(i=i.prototype,W_(i,n)),h=r.length-1;h>=0;h--)(l=tA(u,n,s={},e[3],f)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(p[d],l),s._=1,eA(a)&&(p[d]=a);return p&&V_(i,n,p),i},rA=(e,t,n)=>t.has(e)||X_("Cannot "+n),iA=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)}},oA=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:i,width:o,height:a,scale:s}=this,l=new e(i+t,r+n,o,a);return l.scale=((e,t)=>{for(var n in t||(t={}))G_.call(t,n)&&Q_(e,n,t[n]);if(U_)for(var n of U_(t))Y_.call(t,n)&&Q_(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:o}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new iA((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:i,height:o}=this;return n===t.left&&r===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){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:i}){return new e(n,t,r,i)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==r?i:"end"==r?i+o:i+o/2};return iA.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 aA=class extends(F_=q_,z_=[T_],j_=[T_],F_){constructor(e){super(iA.from(e),(e,t)=>iA.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(B_,5,this),((e,t,n)=>{t.has(e)?X_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n)})(this,$_,0),this.velocity={x:0,y:0}}get delta(){return iA.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=iA.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(rA(a=this,s=$_,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);yR(()=>{((e,t,n)=>{rA(e,t,"write to private field"),t.set(e,n)})(this,$_,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(iA.from(e)),this.velocity={x:0,y:0}}};function sA({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(J_(r,2)+J_(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n&&i>n.y}B_=(e=>{var t;return[,,,H_(null!=(t=null==e?void 0:e[K_("metadata")])?t:null)]})(F_),$_=new WeakMap,nA(B_,2,"delta",z_,aA),nA(B_,2,"direction",j_,aA),((e,t)=>{Q_(t,K_("metadata"),e[3])})(B_,aA);var lA,cA,uA,dA,fA=(e=>(e.Horizontal="x",e.Vertical="y",e))(fA||{}),pA=Object.values(fA),hA=Object.create,mA=Object.defineProperty,gA=Object.defineProperties,yA=Object.getOwnPropertyDescriptor,bA=Object.getOwnPropertyDescriptors,vA=Object.getOwnPropertySymbols,xA=Object.prototype.hasOwnProperty,wA=Object.prototype.propertyIsEnumerable,SA=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),kA=e=>{throw TypeError(e)},CA=(e,t,n)=>t in e?mA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EA=(e,t)=>{for(var n in t||(t={}))xA.call(t,n)&&CA(e,n,t[n]);if(vA)for(var n of vA(t))wA.call(t,n)&&CA(e,n,t[n]);return e},MA=(e,t)=>gA(e,bA(t)),RA=(e,t)=>mA(e,"name",{value:t,configurable:!0}),_A=(e,t)=>{var n={};for(var r in e)xA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&vA)for(var r of vA(e))t.indexOf(r)<0&&wA.call(e,r)&&(n[r]=e[r]);return n},AA=e=>{var t;return[,,,hA(null!=(t=null==e?void 0:e[SA("metadata")])?t:null)]},PA=["class","method","getter","setter","accessor","field","value","get","set"],IA=e=>void 0!==e&&"function"!=typeof e?kA("Function expected"):e,TA=(e,t,n,r,i)=>({kind:PA[e],name:t,metadata:r,addInitializer:e=>n._?kA("Already initialized"):i.push(IA(e||null))}),DA=(e,t)=>CA(t,SA("metadata"),e[3]),OA=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},NA=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=PA[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&yA(d<4?i:{get[n](){return jA(this,o)},set[n](e){return FA(this,o,e)}},n));d?p&&d<4&&RA(o,(d>2?"set ":d>1?"get ":"")+n):RA(i,n);for(var v=r.length-1;v>=0;v--)c=TA(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>LA(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?jA:$A)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>FA(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?p?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?IA(s)&&(d>4?g.unshift(s):d?p?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?kA("Object expected"):(IA(a=s.get)&&(b.get=a),IA(a=s.set)&&(b.set=a),IA(a=s.init)&&g.unshift(a));return d||DA(e,i),b&&mA(i,n,b),p?4^d?o:b:i},qA=(e,t,n)=>t.has(e)||kA("Cannot "+n),LA=(e,t)=>Object(t)!==t?kA('Cannot use the "in" operator on this value'):e.has(t),jA=(e,t,n)=>(qA(e,t,"read from private field"),n?n.call(e):t.get(e)),zA=(e,t,n)=>t.has(e)?kA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),FA=(e,t,n,r)=>(qA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$A=(e,t,n)=>(qA(e,t,"access private method"),n);function BA(e,t){return{plugin:e,options:t}}function HA(e){return t=>BA(e,t)}function VA(e){return"function"==typeof e?{plugin:e,options:void 0}:e}lA=[I_];var WA=class{constructor(e,t){this.manager=e,this.options=t,zA(this,uA,OA(cA,8,this,!1)),OA(cA,11,this),zA(this,dA,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return vR(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=zR(e.bind(this));return jA(this,dA).add(t),t}destroy(){jA(this,dA).forEach(e=>e())}static configure(e){return BA(this,e)}};cA=AA(null),uA=new WeakMap,dA=new WeakMap,NA(cA,4,"disabled",lA,WA,uA),DA(cA,WA);var UA,GA=class extends WA{},YA=class{constructor(e){this.manager=e,this.instances=new Map,zA(this,UA,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(VA).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 jA(this,UA))if(!n.includes(e)){if(e.prototype instanceof GA)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);FA(this,UA,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 KA(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}UA=new WeakMap;var XA,JA,QA,ZA,eP,tP,nP,rP,iP,oP,aP,sP,lP=[],cP=class extends WA{constructor(e){super(e),zA(this,XA),zA(this,JA),this.computeCollisions=this.computeCollisions.bind(this),FA(this,JA,AR(lP)),this.destroy=O_(()=>{const e=this.computeCollisions(),t=vR(()=>this.manager.dragOperation.position.current);if(e!==lP){const e=jA(this,XA);if(FA(this,XA,t),e&&t.x==e.x&&t.y==e.y)return}else FA(this,XA,void 0);jA(this,JA).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){vR(()=>{e?jA(this,JA).value=this.computeCollisions():FA(this,XA,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return lP;const s=[],l=[];for(const o of null!=e?e:n.droppables){if(o.disabled)continue;if(i&&!o.accepts(i))continue;const e=null!=t?t:o.collisionDetector;if(!e)continue;l.push(o),o.shape;const n=vR(()=>e({droppable:o,dragOperation:r}));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?lP:(s.sort(KA),s)}get collisions(){return jA(this,JA).value}};XA=new WeakMap,JA=new WeakMap,eP=[I_],ZA=[I_],QA=[I_];var uP=class e{constructor(e,t){zA(this,iP,OA(rP,8,this)),OA(rP,11,this),zA(this,oP),zA(this,aP,OA(rP,12,this)),OA(rP,15,this),zA(this,sP,OA(rP,16,this)),OA(rP,19,this);const{effects:n,id:r,data:i={},disabled:o=!1,register:a=!0}=e;let s=r;FA(this,oP,AR(r)),this.manager=t,this.data=i,this.disabled=o,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=jA(this,oP).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:jA(this,oP).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return $A(t=e,tP,nP).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)}};rP=AA(null),tP=new WeakSet,nP=function(){const e=uP.pendingIdChanges;uP.pendingIdChanges=null,e&&yR(()=>{for(const[t,n]of e)jA(t,oP).value=n})},iP=new WeakMap,oP=new WeakMap,aP=new WeakMap,sP=new WeakMap,NA(rP,4,"manager",eP,uP,iP),NA(rP,4,"data",ZA,uP,aP),NA(rP,4,"disabled",QA,uP,sP),zA(uP,tP),DA(rP,uP),uP.pendingIdChanges=null;var dP,fP,pP,hP,mP,gP,yP,bP,vP,xP,wP,SP,kP,CP,EP,MP,RP,_P,AP,PP,IP,TP,DP,OP,NP=uP,qP=class{constructor(){this.map=AR(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const o=new Map(n);for(const[r,i]of n)if(i===t&&r!==e){o.delete(r);break}o.set(e,t),this.map.value=o;const a=O_(...t.effects());return this.cleanupFunctions.set(t,a),i},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 i=new Map(n);i.delete(e),this.map.value=i}}[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}},LP=class extends(yP=NP,gP=[I_],mP=[I_],hP=[I_],pP=[T_],fP=[T_],dP=[T_],yP){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o,plugins:a,effects:s}=n,l=_A(n,["modifiers","type","sensors","plugins","effects"]);super(MA(EA({},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}=VA(n);e.registry.plugins.register(t)}}]}}),t),OA(bP,5,this),zA(this,vP,OA(bP,8,this)),OA(bP,11,this),zA(this,xP,OA(bP,12,this)),OA(bP,15,this),zA(this,wP,OA(bP,16,this,this.isDragSource?"dragging":"idle")),OA(bP,19,this),this.type=i,this.sensors=o,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=VA(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}};bP=AA(yP),vP=new WeakMap,xP=new WeakMap,wP=new WeakMap,NA(bP,4,"type",gP,LP,vP),NA(bP,4,"modifiers",mP,LP,xP),NA(bP,4,"status",hP,LP,wP),NA(bP,2,"isDropping",pP,LP),NA(bP,2,"isDragging",fP,LP),NA(bP,2,"isDragSource",dP,LP),DA(bP,LP);var jP=class extends(_P=NP,RP=[I_],MP=[I_],EP=[I_],CP=[I_],kP=[I_],SP=[T_],_P){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(_A(n,["accept","collisionDetector","collisionPriority","type"]),t),OA(AP,5,this),zA(this,PP,OA(AP,8,this)),OA(AP,11,this),zA(this,IP,OA(AP,12,this)),OA(AP,15,this),zA(this,TP,OA(AP,16,this)),OA(AP,19,this),zA(this,DP,OA(AP,20,this)),OA(AP,23,this),zA(this,OP,OA(AP,24,this)),OA(AP,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=o,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}};AP=AA(_P),PP=new WeakMap,IP=new WeakMap,TP=new WeakMap,DP=new WeakMap,OP=new WeakMap,NA(AP,4,"accept",RP,jP,PP),NA(AP,4,"type",MP,jP,IP),NA(AP,4,"collisionDetector",EP,jP,TP),NA(AP,4,"collisionPriority",CP,jP,DP),NA(AP,4,"shape",kP,jP,OP),NA(AP,2,"isDropTarget",SP,jP),DA(AP,jP);var zP=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)}},FP=class extends zP{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function $P(e,t=!0){let n=!1;return MA(EA({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var BP,HP,VP,WP,UP,GP,YP,KP,XP,JP=class extends GA{constructor(e){super(e);let t=[];this.destroy=O_(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:i}=n;if(n.isDisabled())return;if(NP.pendingIdChanges)return;const o=$P({collisions:i});if(r.dispatch("collision",o),o.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(i,t))return;t=i;const[a]=i;vR(()=>{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()}))})})}},QP=(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))(QP||{}),ZP=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(ZP||{});YP=[I_],GP=[T_],UP=[T_],WP=[T_],VP=[T_],HP=[T_],BP=[T_];var eI=class{constructor(){OA(KP,5,this),zA(this,XP,OA(KP,8,this,"idle")),OA(KP,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};KP=AA(null),XP=new WeakMap,NA(KP,4,"value",YP,eI,XP),NA(KP,2,"current",GP,eI),NA(KP,2,"idle",UP,eI),NA(KP,2,"initializing",WP,eI),NA(KP,2,"initialized",VP,eI),NA(KP,2,"dragging",HP,eI),NA(KP,2,"dropped",BP,eI),DA(KP,eI);var tI,nI=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 vR(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=$P({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return vR(()=>{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:i}=e;yR(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)});const o=$P({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.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&&yR(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return vR(()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=$P({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,i,o,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!=(o=null==(i=e.by)?void 0:i.y)?o:0)};r.position.current=l})})}stop(e={}){return vR(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=vR(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=zR(()=>{"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 o=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),o?o.then(a).catch(()=>r.reset()):a()})}},rI=class extends WA{constructor(e,t){super(e,t),this.manager=e,this.options=t}},iI=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)}},oI=class{constructor(e){this.options=e,zA(this,tI)}set controller(e){FA(this,tI,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=jA(this,tI))||t.activate(e)}};tI=new WeakMap;var aI,sI,lI,cI,uI,dI,fI,pI,hI,mI,gI,yI,bI,vI,xI,wI,SI,kI,CI,EI=class extends WA{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},MI=class{constructor(e){this.draggables=new qP,this.droppables=new qP,this.plugins=new YA(e),this.sensors=new YA(e),this.modifiers=new YA(e)}register(e,t){if(e instanceof LP)return this.draggables.register(e.id,e);if(e instanceof jP)return this.droppables.register(e.id,e);if(e.prototype instanceof EI)return this.modifiers.register(e,t);if(e.prototype instanceof rI)return this.sensors.register(e,t);if(e.prototype instanceof WA)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof NP)return e instanceof LP?this.draggables.unregister(e.id,e):e instanceof jP?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof EI)return this.modifiers.unregister(e);if(e.prototype instanceof rI)return this.sensors.unregister(e);if(e.prototype instanceof WA)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()}};hI=[T_],pI=[I_],fI=[I_],dI=[I_],uI=[I_],cI=[I_],lI=[T_],sI=[T_],aI=[T_];var RI=class{constructor(e){OA(bI,5,this),zA(this,mI),zA(this,gI),zA(this,yI,new q_(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new eI,zA(this,vI,OA(bI,8,this,!1)),OA(bI,11,this),zA(this,xI,OA(bI,12,this,null)),OA(bI,15,this),zA(this,wI,OA(bI,16,this,null)),OA(bI,19,this),zA(this,SI,OA(bI,20,this,null)),OA(bI,23,this),zA(this,kI,OA(bI,24,this,[])),OA(bI,27,this),this.position=new aA({x:0,y:0}),zA(this,CI,{x:0,y:0}),FA(this,mI,e)}get shape(){const{current:e,initial:t,previous:n}=jA(this,yI);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?jA(this,yI).current=e:jA(this,yI).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=jA(this,mI).registry.draggables.get(t);return n&&FA(this,gI,n),null!=(e=null!=n?n:jA(this,gI))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=jA(this,mI).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(MA(EA({},this.snapshot()),{transform:n}));return FA(this,CI,n),n}snapshot(){return vR(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:jA(this,CI),shape:this.shape?L_(this.shape):null,position:L_(this.position),status:L_(this.status),canceled:this.canceled}))}reset(){yR(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,jA(this,yI).reset(),this.position.reset({x:0,y:0}),FA(this,CI,{x:0,y:0}),this.modifiers=[]})}};bI=AA(null),mI=new WeakMap,gI=new WeakMap,yI=new WeakMap,vI=new WeakMap,xI=new WeakMap,wI=new WeakMap,SI=new WeakMap,kI=new WeakMap,CI=new WeakMap,NA(bI,2,"shape",hI,RI),NA(bI,4,"canceled",pI,RI,vI),NA(bI,4,"activatorEvent",fI,RI,xI),NA(bI,4,"sourceIdentifier",dI,RI,wI),NA(bI,4,"targetIdentifier",uI,RI,SI),NA(bI,4,"modifiers",cI,RI,kI),NA(bI,2,"source",lI,RI),NA(bI,2,"target",sI,RI),NA(bI,2,"transform",aI,RI),DA(bI,RI);var _I={get rendering(){return Promise.resolve()}};function AI(e,t){return"function"==typeof e?e(t):null!=e?e:t}var PI=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=AI(n.plugins,[]),i=AI(n.sensors,[]),o=AI(n.modifiers,[]),a=null!=(t=n.renderer)?t:_I,s=new FP(this),l=new MI(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new nI(this),this.dragOperation=new RI(this),this.collisionObserver=new cP(this),this.plugins=[JP,...r],this.modifiers=o,this.sensors=i;const{destroy:c}=this,u=O_(()=>{var e,t,n;const r=vR(()=>this.dragOperation.modifiers),i=this.modifiers;for(const e of r)i.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}=VA(e);return new t(this,n)}))?n:i});this.destroy=()=>{u(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},II=e=>{throw TypeError(e)},TI=(e,t,n)=>t.has(e)||II("Cannot "+n),DI=(e,t,n)=>(TI(e,t,"read from private field"),t.get(e)),OI=(e,t,n)=>t.has(e)?II("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),NI=(e,t,n,r)=>(TI(e,t,"write to private field"),t.set(e,n),n),qI=(e,t,n)=>(TI(e,t,"access private method"),n);function LI(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function jI(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,i=(LI(n)?n.getKeyframes():[]).filter(t);i.length>0&&(r=[i[i.length-1],e])}return r}function zI(e){const{width:t,height:n,top:r,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:o,right:a}}function FI(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function $I(e){return"nodeType"in e}function BI(e){var t,n,r;return e?FI(e)?e:$I(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 HI(e){const{Document:t}=BI(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function VI(e){return!(!e||FI(e))&&(e instanceof BI(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function WI(e){return e instanceof BI(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function UI(e){return e?FI(e)?e.document:$I(e)?HI(e)?e:VI(e)||WI(e)?e.ownerDocument:document:document:document}function GI(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===i}function YI(e,t=e.getBoundingClientRect(),n=0){var r,i,o,a,s;let l=t;const{ownerDocument:c}=e,u=null!=(r=c.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==c.documentElement;){if(!GI(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),i=n*(e.bottom-e.top),o=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+i),left:Math.max(l.left,e.left-o),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const f=u.visualViewport,p=null!=(i=null==f?void 0:f.offsetTop)?i:0,h=null!=(o=null==f?void 0:f.offsetLeft)?o:0,m=null!=(a=null==f?void 0:f.width)?a:u.innerWidth,g=null!=(s=null==f?void 0:f.height)?s:u.innerHeight,y=n*g,b=n*m;return l={top:Math.max(l.top,p-y),right:Math.min(l.right,h+m+b),bottom:Math.min(l.bottom,p+g+y),left:Math.max(l.left,h-b),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function KI(e){return{x:e.clientX,y:e.clientY}}var XI="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function JI(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(...JI(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...JI(i.document,t))}}catch(e){}return n}function QI(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ZI(){var e,t;const n=QI()?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 eT(e){return!(!e||!$I(e))&&e instanceof BI(e).ShadowRoot}function tT(e){if(e&&$I(e)){let t=e.getRootNode();if(eT(t))return t;if(t instanceof Document)return t}return UI(e)}function nT(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function rT(e){return"value"in e}function iT(e){return"CANVAS"===e.tagName}function oT(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:i,top:o}=r.getBoundingClientRect();return oT(e,{x:t-i,y:n-o})}}return r}var aT=new WeakMap;var sT=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:o}=t,a=[e,t];e.addEventListener(n,r,o),this.entries.add(a),i.push(a)}const o=this.entries;return function(){for(const e of i){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i),o.delete(e)}}}};function lT(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function cT(e,t){const n=()=>performance.now();let r,i;return function(...o){const a=this;i?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,o),i=n()},t-(n()-i))):(e.apply(a,o),i=n())}}var uT,dT=XI?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},fT=class extends dT{constructor(e){super(t=>{DI(this,uT)?e(t,this):NI(this,uT,!0)}),OI(this,uT,!1)}};uT=new WeakMap;var pT,hT,mT,gT,yT,bT,vT,xT,wT,ST,kT,CT=Array.from({length:100},(e,t)=>t/100),ET=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,OI(this,wT),this.disconnect=()=>{var e,t,n;NI(this,vT,!0),null==(e=DI(this,mT))||e.disconnect(),null==(t=DI(this,gT))||t.disconnect(),DI(this,yT).disconnect(),null==(n=DI(this,bT))||n.remove()},OI(this,pT,!0),OI(this,hT),OI(this,mT),OI(this,gT),OI(this,yT),OI(this,bT),OI(this,vT,!1),OI(this,xT,cT(()=>{var e,t,n;const{element:r}=this;if(null==(e=DI(this,gT))||e.disconnect(),DI(this,vT)||!DI(this,pT)||!r.isConnected)return;const i=null!=(t=r.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(n=i.defaultView)?n:window,s=r.getBoundingClientRect(),l=YI(r,s),{top:c,left:u,bottom:d,right:f}=l,p=-Math.floor(c),h=-Math.floor(u),m=`${p}px ${-Math.floor(a-f)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,NI(this,gT,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:oA.intersectionRatio(n,YI(r)))&&DI(this,xT).call(this)},{threshold:CT,rootMargin:m,root:i})),DI(this,gT).observe(r),qI(this,wT,ST).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),NI(this,pT,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=YI(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const i=e.ownerDocument;(null==n?void 0:n.debug)&&(NI(this,bT,document.createElement("div")),DI(this,bT).style.background="rgba(0,0,0,0.15)",DI(this,bT).style.position="fixed",DI(this,bT).style.pointerEvents="none",i.body.appendChild(DI(this,bT))),NI(this,yT,new IntersectionObserver(t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,c=DI(this,pT);NI(this,pT,a),(s||l)&&(c&&!a?(null==(n=DI(this,gT))||n.disconnect(),this.callback(null),null==(r=DI(this,mT))||r.disconnect(),NI(this,mT,void 0),DI(this,bT)&&(DI(this,bT).style.visibility="hidden")):DI(this,xT).call(this),a&&!DI(this,mT)&&(NI(this,mT,new fT(DI(this,xT))),DI(this,mT).observe(e)))},{threshold:CT,root:i})),DI(this,pT)&&!n.skipInitial&&this.callback(this.boundingClientRect),DI(this,yT).observe(e)}};pT=new WeakMap,hT=new WeakMap,mT=new WeakMap,gT=new WeakMap,yT=new WeakMap,bT=new WeakMap,vT=new WeakMap,xT=new WeakMap,wT=new WeakSet,ST=function(){DI(this,vT)||(qI(this,wT,kT).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,DI(this,hT))||(this.callback(this.boundingClientRect),NI(this,hT,this.boundingClientRect)))},kT=function(){if(DI(this,bT)){const{top:e,left:t,width:n,height:r}=YI(this.element);DI(this,bT).style.overflow="hidden",DI(this,bT).style.visibility="visible",DI(this,bT).style.top=`${Math.floor(e)}px`,DI(this,bT).style.left=`${Math.floor(t)}px`,DI(this,bT).style.width=`${Math.floor(n)}px`,DI(this,bT).style.height=`${Math.floor(r)}px`}};var MT,RT,_T,AT,PT=new WeakMap,IT=new WeakMap;function TT(e,t){let n=PT.get(e);if(!n){const t=new ET(e,t=>{const n=PT.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),PT.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(PT.delete(e),n.disconnect())}}var DT=class{constructor(e,t,n){this.callback=t,OI(this,MT),OI(this,RT,!1),OI(this,_T),OI(this,AT,cT(e=>{if(!DI(this,RT)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of DI(this,_T))if(e.target.contains(t)){this.callback(DI(this,MT).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=lT(e);for(;n;)t.add(n),n=lT(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=TT(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!IT.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}),IT.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=IT.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),IT.delete(r))}):()=>{}}(e,DI(this,AT));NI(this,_T,r),NI(this,MT,new ET(e,t,n)),this.disconnect=()=>{DI(this,RT)||(NI(this,RT,!0),i(),o(),DI(this,MT).disconnect())}}};function OT(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function NT(e){try{OT(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function qT(e){return!(!XI||!e)&&e===UI(e).scrollingElement}function LT(e){var t,n;const r=BI(e),i=qT(e)?function(e){var t,n,r,i;const{documentElement:o}=UI(e),a=BI(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:o.clientHeight,c=null!=(r=null==a?void 0:a.offsetTop)?r:0,u=null!=(i=null==a?void 0:a.offsetLeft)?i:0;return{top:c,left:u,right:u+s,bottom:c+l,width:s,height:l}}(e):zI(e),o=r.visualViewport,a=qT(e)?{height:null!=(t=null==o?void 0:o.height)?t:r.innerHeight,width:null!=(n=null==o?void 0:o.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:i,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 jT(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=LT(e),{x:s,y:l}=null!=t?t:{x:0,y:0},c=!n&&a.current.y+l>0,u=!r&&a.current.y+l<a.max.y,d=!i&&a.current.x+s>0,f=!o&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:f,x:d||f,y:c||u}}MT=new WeakMap,RT=new WeakMap,_T=new WeakMap,AT=new WeakMap;var zT=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))}},FT=new zT(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),$T=new zT(e=>setTimeout(e,50)),BT=new Map,HT=BT.clear.bind(BT);function VT(e,t=!1){if(!t)return WT(e);let n=BT.get(e);return n||(n=WT(e),BT.set(e,n),$T.schedule(HT),n)}function WT(e){return BI(e).getComputedStyle(e)}var UT={excludeElement:!0,escapeShadowDOM:!0};function GT(e,t=UT){const{limit:n,excludeElement:r,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=n&&o.size>=n)return o;if(!a)return o;if(HI(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&eT(a))return t(a.host);if(!VI(a))return WI(a)?t(a.parentElement):o;if(o.has(a))return o;const s=VT(a,!0);if(r&&a===e||function(e,t=VT(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)&&o.add(a),function(e,t=VT(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&o.add(e),o}return t(a.parentNode)}(e):o}function YT(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=lT(e);for(;r;){if(r===t)return n;const e=zI(r),{x:i,y:o}=KT(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*i,n.scaleY=n.scaleY*o,r=lT(r)}return n}function KT(e,t=zI(e)){const n=Math.round(t.width),r=Math.round(t.height);if(VI(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=VT(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function XT(e){if("none"===e)return null;const[t,n,r="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function JT(e){var t,n,r,i,o,a,s,l,c;const{scale:u,transform:d,translate:f}=e,p=function(e){if("none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(u),h=XT(f),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&&!p&&!h)return null;const g=null!=(t=null==p?void 0:p.x)?t:1,y=null!=(n=null==p?void 0:p.y)?n:1,b=null!=(r=null==h?void 0:h.x)?r:0,v=null!=(i=null==h?void 0:h.y)?i:0,x=null!=(o=null==m?void 0:m.x)?o:0,w=null!=(a=null==m?void 0:m.y)?a:0,S=null!=(s=null==m?void 0:m.scaleX)?s:1,k=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:b+x,y:v+w,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*S,scaleY:y*k}}var QT=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(QT||{}),ZT={x:.2,y:.2},eD={x:10,y:10};function tD(e,t,n,r=25,i=ZT,o=eD){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:f}=LT(e),p=YT(e),h=JT(VT(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,y=new oA(l.left*p.scaleX+p.x,l.top*p.scaleY+p.y,l.width*p.scaleX,l.height*p.scaleY),b={x:0,y:0},v={x:0,y:0},x=y.height*i.y,w=y.width*i.x;return x>0&&(!c||g&&!u)&&s<=y.top+x&&1!==(null==n?void 0:n.y)&&a>=y.left-o.x&&a<=y.right+o.x?(b.y=g?1:-1,v.y=r*Math.abs((y.top+x-s)/x)):x>0&&(!u||g&&!c)&&s>=y.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=y.left-o.x&&a<=y.right+o.x&&(b.y=g?-1:1,v.y=r*Math.abs((y.bottom-x-s)/x)),w>0&&(!f||m&&!d)&&a>=y.right-w&&-1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y?(b.x=m?-1:1,v.x=r*Math.abs((y.right-w-a)/w)):w>0&&(!d||m&&!f)&&a<=y.left+w&&1!==(null==n?void 0:n.x)&&s>=y.top-o.y&&s<=y.bottom+o.y&&(b.x=m?1:-1,v.x=r*Math.abs((y.left+w-a)/w)),{direction:b,speed:v}}function nD(e,{block:t="nearest",inline:n="nearest"}={}){if(!VI(e))return;const r=GT(e),i=[];for(const o of r){if(!VI(o))continue;const{top:r,left:a}=iD(e,o);let s=r,l=a;for(const e of i)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<o.scrollTop;n!==s+e.offsetHeight>o.scrollTop+o.clientHeight&&(o.scrollTop="center"===t?s-o.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-o.clientHeight)}if("none"!==n){const t=l<o.scrollLeft;t!==l+e.offsetWidth>o.scrollLeft+o.clientWidth&&(o.scrollLeft="center"===n?l-o.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-o.clientWidth)}i.push(o)}}function rD(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!VI(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function iD(e,t){const n=rD(e),r=rD(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function oD({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function aD(e,t=VT(e).translate,n=!0){if(n){const t=jI(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=XT(e);if(t)return t}}}if(t){const e=XT(t);if(e)return e}return{x:0,y:0,z:0}}var sD=new zT(e=>setTimeout(e,0)),lD=new Map,cD=lD.clear.bind(lD);function uD(e,t){const n=function(e){const t=e.ownerDocument;let n=lD.get(t);if(n)return n;n=t.getAnimations(),lD.set(t,n),sD.schedule(cD);const r=n.filter(t=>LI(t.effect)&&t.effect.target===e);return lD.set(e,r),n}(e).filter(e=>{var n,r;if(LI(e.effect)){const{target:i}=e.effect;if(null==(r=i&&(null==(n=t.isValidTarget)?void 0:n.call(t,i)))||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 dD=class extends oA{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=YT(e),ignoreTransforms:s,getBoundingClientRect:l=zI}=t,c=uD(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||QI())&&t.contains(e)}),u=l(e);let d,{top:f,left:p,width:h,height:m}=u;const g=VT(e),y=JT(g),b={x:null!=(n=null==y?void 0:y.scaleX)?n:1,y:null!=(r=null==y?void 0:y.scaleY)?r:1},v=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,i,o,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=LI(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:c}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(i=l,a=!0),"string"==typeof c&&c&&(o=c,a=!0)}return a?JT({transform:null!=r?r:t.transform,translate:null!=i?i:t.translate,scale:null!=o?o:t.scale}):null}(e,g);null==c||c(),y&&(d=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-r)*parseFloat(n),l=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(u,y,g.transformOrigin),(s||v)&&(f=d.top,p=d.left,h=d.width,m=d.height));const x={width:null!=(i=null==d?void 0:d.width)?i:h,height:null!=(o=null==d?void 0:d.height)?o:m};if(v&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-r)*parseFloat(n),l=e.top+a+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width*r:e.width,u=i?e.height*i:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(d,v,g.transformOrigin);f=e.top,p=e.left,h=e.width,m=e.height,b.x=v.scaleX,b.y=v.scaleY}a&&(s||(p*=a.scaleX,h*=a.scaleX,f*=a.scaleY,m*=a.scaleY),p+=a.x,f+=a.y),super(p,f,h,m),this.scale=b,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function fD(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 pD=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(fD(n))for(const[r,i]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 i?i:`${i}px`)}}remove(e,t=""){const{element:n}=this;if(fD(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(fD(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function hD(e){return!!e&&(e instanceof BI(e).Element||$I(e)&&e.nodeType===Node.ELEMENT_NODE)}function mD(e){if(!e)return!1;const{KeyboardEvent:t}=BI(e.target);return e instanceof t}var gD={};function yD(e){const t=null==gD[e]?0:gD[e]+1;return gD[e]=t,`${e}-${t}`}var bD=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/iA.distance(t.shape.center,n),type:ZP.PointerIntersection,priority:QP.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:i}=e,o=iA.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:ZP.ShapeIntersection,priority:QP.Normal}}return null})(e)},vD=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?oA.from(r.current.boundingRectangle).corners:void 0,a=oA.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+iA.distance(iA.from(t),null!=(r=null==o?void 0:o[n])?r:i.current)},0),s=a/4;return{id:n.id,value:1/s,type:ZP.Collision,priority:QP.Normal}},xD=Object.create,wD=Object.defineProperty,SD=Object.defineProperties,kD=Object.getOwnPropertyDescriptor,CD=Object.getOwnPropertyDescriptors,ED=Object.getOwnPropertySymbols,MD=Object.prototype.hasOwnProperty,RD=Object.prototype.propertyIsEnumerable,_D=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),AD=e=>{throw TypeError(e)},PD=(e,t,n)=>t in e?wD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ID=(e,t)=>{for(var n in t||(t={}))MD.call(t,n)&&PD(e,n,t[n]);if(ED)for(var n of ED(t))RD.call(t,n)&&PD(e,n,t[n]);return e},TD=(e,t)=>SD(e,CD(t)),DD=(e,t)=>wD(e,"name",{value:t,configurable:!0}),OD=(e,t)=>{var n={};for(var r in e)MD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ED)for(var r of ED(e))t.indexOf(r)<0&&RD.call(e,r)&&(n[r]=e[r]);return n},ND=e=>{var t;return[,,,xD(null!=(t=null==e?void 0:e[_D("metadata")])?t:null)]},qD=["class","method","getter","setter","accessor","field","value","get","set"],LD=e=>void 0!==e&&"function"!=typeof e?AD("Function expected"):e,jD=(e,t,n,r,i)=>({kind:qD[e],name:t,metadata:r,addInitializer:e=>n._?AD("Already initialized"):i.push(LD(e||null))}),zD=(e,t)=>PD(t,_D("metadata"),e[3]),FD=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},$D=(e,t,n,r,i,o)=>{var a,s,l,c,u,d=7&t,f=!!(8&t),p=!!(16&t),h=d>3?e.length+1:d?f?1:2:0,m=qD[d+5],g=d>3&&(e[h-1]=[]),y=e[h]||(e[h]=[]),b=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&kD(d<4?i:{get[n](){return VD(this,o)},set[n](e){return UD(this,o,e)}},n));d?p&&d<4&&DD(o,(d>2?"set ":d>1?"get ":"")+n):DD(i,n);for(var v=r.length-1;v>=0;v--)c=jD(d,n,l={},e[3],y),d&&(c.static=f,c.private=p,u=c.access={has:p?e=>HD(i,e):e=>n in e},3^d&&(u.get=p?e=>(1^d?VD:GD)(e,i,4^d?o:b.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>UD(e,i,t,4^d?o:b.set):(e,t)=>e[n]=t)),s=(0,r[v])(d?d<4?p?o:b[m]:d>4?void 0:{get:b.get,set:b.set}:i,c),l._=1,4^d||void 0===s?LD(s)&&(d>4?g.unshift(s):d?p?o=s:b[m]=s:i=s):"object"!=typeof s||null===s?AD("Object expected"):(LD(a=s.get)&&(b.get=a),LD(a=s.set)&&(b.set=a),LD(a=s.init)&&g.unshift(a));return d||zD(e,i),b&&wD(i,n,b),p?4^d?o:b:i},BD=(e,t,n)=>t.has(e)||AD("Cannot "+n),HD=(e,t)=>Object(t)!==t?AD('Cannot use the "in" operator on this value'):e.has(t),VD=(e,t,n)=>(BD(e,t,"read from private field"),n?n.call(e):t.get(e)),WD=(e,t,n)=>t.has(e)?AD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),UD=(e,t,n,r)=>(BD(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),GD=(e,t,n)=>(BD(e,t,"access private method"),n),YD="button",KD="draggable",XD="dnd-kit-description",JD="dnd-kit-announcement",QD={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."},ZD={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 eO(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var tO=["dragover","dragmove"],nO=class extends WA{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=XD,announcement:i=JD}={},announcements:o=ZD,screenReaderInstructions:a=QD,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:yD(r),c=n?`${i}-${n}`:yD(i);let u,d,f,p;const h=(e=p)=>{f&&e&&(null==f?void 0:f.nodeValue)!==e&&(f.nodeValue=e)},m=()=>FT.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),y=Object.entries(o).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const i=f;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(p=o,tO.includes(e)?g():(m(),g.cancel()))})),b=()=>{let e=[];(null==u?void 0:u.isConnected)||(u=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(u)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(c),f=document.createTextNode(""),d.appendChild(f),e.push(d)),e.length>0&&document.body.append(...e)},v=new Set;function x(){for(const e of v)e()}this.registerEffect(()=>{var e;v.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||v.add(b),eO(n)&&!QI()||n.hasAttribute("tabindex")||v.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||v.add(()=>n.setAttribute("role",YD)),n.hasAttribute("aria-roledescription")||v.add(()=>n.setAttribute("aria-roledescription",KD)),n.hasAttribute("aria-describedby")||v.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&v.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&v.add(()=>n.setAttribute("aria-disabled",e))}}v.size>0&&FT.schedule(x)}),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),y.forEach(e=>e())}}};var rO,iO,oO,aO,sO,lO,cO,uO,dO,fO,pO,hO,mO,gO=new Map,yO=class extends(sO=GA,aO=[I_],oO=[T_],iO=[T_],rO=[T_],sO){constructor(e,t){super(e,t),FD(cO,5,this),WD(this,dO),WD(this,lO,new Set),WD(this,uO,FD(cO,8,this,new Set)),FD(cO,11,this),this.registerEffect(GD(this,dO,fO))}register(e){return VD(this,lO).add(e),()=>{VD(this,lO).delete(e)}}addRoot(e){return vR(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{vR(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return tT(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return tT(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}};cO=ND(sO),lO=new WeakMap,uO=new WeakMap,dO=new WeakSet,fO=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of VD(this,lO))t.push(GD(this,dO,pO).call(this,n,e));return()=>{for(const e of t)e()}},pO=function(e,t){let n=gO.get(e);n||(n=new Map,gO.set(e,n));let r=n.get(t);if(!r){const i=HI(e)?GD(this,dO,hO).call(this,e,n,t):GD(this,dO,mO).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,0===r.refCount&&r.cleanup())}},hO=function(e,t,n){var r;const i=e.createElement("style"),{nonce:o}=null!=(r=this.options)?r:{};o&&i.setAttribute("nonce",o),i.textContent=n,e.head.prepend(i);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===i)return void e.head.prepend(i)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),i.remove(),t.delete(n),0===t.size&&gO.delete(e)}}},mO=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:i}=null!=r?r:{};if(!i)return null;const o=new i;return o.replaceSync(n),e.adoptedStyleSheets.push(o),{refCount:0,cleanup:()=>{var r;if(eT(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(o);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&gO.delete(e)}}},$D(cO,4,"additionalRoots",aO,yO,uO),$D(cO,2,"sourceRoot",oO,yO),$D(cO,2,"targetRoot",iO,yO),$D(cO,2,"roots",rO,yO),zD(cO,yO),yO.configure=HA(yO);var bO=yO,vO="data-dnd-",xO=`${vO}dropping`,wO="--dnd-",SO=`${vO}dragging`,kO=`${vO}placeholder`,CO=[SO,kO,"popover","aria-pressed","aria-grabbing"],EO=["view-transition-name"],MO=`\n :is(:root,:host) [${SO}] {\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(${wO}top, 0px) !important;\n left: var(${wO}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${wO}width, auto);\n max-width: var(${wO}width, auto);\n height: var(${wO}height, auto);\n max-height: var(${wO}height, auto);\n transform: var(${wO}transform, none) !important;\n transition: var(${wO}transition) !important;\n }\n\n :is(:root,:host) [${kO}] {\n transition: none;\n }\n\n :is(:root,:host) [${kO}='hidden'] {\n visibility: hidden;\n }\n\n [${SO}] * {\n pointer-events: none !important;\n }\n\n [${SO}]:not([${xO}]) {\n translate: var(${wO}translate) !important;\n }\n\n [${SO}][style*='${wO}scale'] {\n scale: var(${wO}scale) !important;\n transform-origin: var(${wO}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${SO}][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 [${SO}]::backdrop, [${vO}overlay]:not([${SO}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function RO(e,t="hidden"){return vR(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const i=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${vO}${yD("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),o=[],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(rT(e)&&rT(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),iT(e)&&iT(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,i]of e){if(!r.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!o)continue;const a=r.element;r.proxy=o,o.removeAttribute(i),aT.set(a,o),n.push(()=>{aT.delete(a),r.proxy=void 0})}}(i,a,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(kO,t)}(a,t),a.remove=()=>{o.forEach(e=>e()),s.call(a)},a})}function _O(e,t){return e===t||lT(e)===lT(t)}function AO(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&hD(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>NT(t))}function PO(e){return"TR"===e.tagName}var IO,TO,DO,OO,NO,qO,LO,jO=250,zO="ease";var FO=class extends(TO=WA,IO=[I_],TO){constructor(e,t){super(e,t),WD(this,NO),WD(this,OO,FD(DO,8,this)),FD(DO,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(bO),r=null==n?void 0:n.register(MO);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(GD(this,NO,qO).bind(this,n)),this.registerEffect(GD(this,NO,LO))}};DO=ND(TO),OO=new WeakMap,NO=new WeakSet,qO=function(e){const{overlay:t}=this;if(!t||!e)return;const n=tT(t);return n?e.addRoot(n):void 0},LO=function(){var e,t,n,r,i,o,a;const{state:s,manager:l,options:c}=this,{dragOperation:u}=l,{position:d,source:f,status:p}=u;if(p.idle)return s.current={},void(s.initial={});if(!f)return;const{element:h}=f,m=f.pluginConfig(FO),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==c?void 0:c.feedback)?t:"default",y="function"==typeof g?g(f,l):g;if(!h||"none"===y||!p.initialized||p.initializing)return;const{initial:b}=s,v=null!=(n=this.overlay)?n:h,x=YT(v),w=YT(h),S=!_O(h,v),k=new dD(h,{frameTransform:S?w:null,ignoreTransforms:!S}),C=w.scaleX/x.scaleX,E=w.scaleY/x.scaleY;let{width:M,height:R,top:_,left:A}=k;S&&(M/=C,R/=E);const P=new pD(v),I=VT(h),{transition:T,translate:D,boxSizing:O,paddingBlockStart:N,paddingBlockEnd:q,paddingInlineStart:L,paddingInlineEnd:j,borderInlineStartWidth:z,borderInlineEndWidth:F,borderBlockStartWidth:$,borderBlockEndWidth:B}=I,H=T.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),V=JT(I),W=I.transform,U="clone"===y,G="content-box"===O,Y=G?parseInt(L)+parseInt(j)+parseInt(z)+parseInt(F):0,K=G?parseInt(N)+parseInt(q)+parseInt($)+parseInt(B):0,X="move"===y||this.overlay?null:RO(f,U?"clone":"hidden"),J=vR(()=>mD(l.dragOperation.activatorEvent));if(!b.translate)if(this.overlay&&V)b.translate={x:V.x,y:V.y};else if("none"!==D){const e=XT(D);e&&(b.translate=e)}if(!b.transformOrigin){const e=vR(()=>d.current),t=A+(null!=(r=null==V?void 0:V.x)?r:0),n=_+(null!=(i=null==V?void 0:V.y)?i:0);b.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(M*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(R*x.scaleY)}}const{transformOrigin:Q}=b,Z=_*x.scaleY+x.y,ee=A*x.scaleX+x.x;if(!b.coordinates&&(b.coordinates={x:ee,y:Z},1!==C||1!==E)){const{scaleX:e,scaleY:t}=w,{x:n,y:r}=Q;b.coordinates.x+=(M*e-M)*n,b.coordinates.y+=(R*t-R)*r}b.dimensions||(b.dimensions={width:M,height:R}),b.frameTransform||(b.frameTransform=x);const te=b.coordinates.x-ee,ne=b.coordinates.y-Z,re=(b.dimensions.width*b.frameTransform.scaleX-M*x.scaleX)*Q.x,ie=(b.dimensions.height*b.frameTransform.scaleY-R*x.scaleY)*Q.y,oe={x:te/x.scaleX+re,y:ne/x.scaleY+ie},ae=A+oe.x,se=_+oe.y;v.setAttribute(SO,"true");const le=vR(()=>u.transform),ce=null!=(o=b.translate)?o:{x:0,y:0},ue=le.x*x.scaleX+ce.x,de=le.y*x.scaleY+ce.y,fe=ZI();if(P.set({width:M-Y,height:R-K,top:se+fe.y,left:ae+fe.x,translate:`${ue}px ${de}px 0`,transform:this.overlay?"none":W,transition:H?`${H}, translate 0ms linear`:"translate 0ms linear",scale:S?`${C} ${E}`:"","transform-origin":`${100*Q.x}% ${100*Q.y}%`},wO),X&&(h.insertAdjacentElement("afterend",X),null==c?void 0:c.rootElement)){("function"==typeof c.rootElement?c.rootElement(f):c.rootElement).appendChild(h)}let pe,he,me;OT(v)&&(v.hasAttribute("popover")||v.setAttribute("popover","manual"),NT(v),v.addEventListener("beforetoggle",AO));const ge=(ye={placeholder:X,element:h,feedbackElement:v,frameTransform:x,transformOrigin:Q,width:M,height:R,top:_,left:A,widthOffset:Y,heightOffset:K,delta:oe,styles:P,dragOperation:u,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>pe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new dD(ye.placeholder,{frameTransform:ye.frameTransform,ignoreTransforms:!0}),i=null!=(e=ye.transformOrigin)?e:{x:1,y:1},o=(ye.width-r.width)*i.x+ye.delta.x,a=(ye.height-r.height)*i.y+ye.delta.y,s=ZI();if(ye.styles.set({width:r.width-ye.widthOffset,height:r.height-ye.heightOffset,top:ye.top+a+s.y,left:ye.left+o+s.x},wO),null==(t=ye.getElementMutationObserver())||t.takeRecords(),PO(ye.element)&&PO(ye.placeholder)){const e=Array.from(ye.element.cells),t=Array.from(ye.placeholder.cells);ye.getSavedCellWidths()||ye.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=ye.getTranslate())?n:{x:0,y:0},c=ye.left+o+s.x+l.x,u=ye.top+a+s.y+l.y,d=r.width-ye.widthOffset,f=r.height-ye.heightOffset,p=ye.frameTransform;ye.dragOperation.shape=new oA(c*p.scaleX+p.x,u*p.scaleY+p.y,d*p.scaleX,f*p.scaleY)}));var ye;const be=new dD(v);vR(()=>u.shape=be);const ve=BI(v),xe=e=>{this.manager.actions.stop({event:e})},we=nT(ve);J&&ve.addEventListener("resize",xe),"idle"===vR(()=>f.status)&&requestAnimationFrame(()=>f.status="dragging"),X&&(ge.observe(X),pe=function(e,t,n){const r=new MutationObserver(r=>{let i=!1;for(const n of r){if(n.target!==e){i=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||CO.includes(r))continue;const o=e.getAttribute(r);if("style"===r){if(fD(e)&&fD(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(EO.includes(e)||e.startsWith(wO))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==o?t.setAttribute(r,o):t.removeAttribute(r)}i&&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 i of r)if(0!==i.addedNodes.length)for(const r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void NT(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void NT(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),NT(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,v));const Se=null==(a=l.dragOperation.source)?void 0:a.id,ke=()=>{var e;if(!J||null==Se)return;const t=l.registry.draggables.get(Se),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;VI(n)&&n.focus()},Ce=()=>{var e;if(null==pe||pe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ve.removeEventListener("resize",xe),OT(v)&&(v.removeEventListener("beforetoggle",AO),v.removeAttribute("popover")),v.removeAttribute(SO),P.reset(),me&&PO(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}f.status="idle";const t=null!=s.current.translate,n=u.status.dragging;X&&(!n&&t||X.parentElement!==v.parentElement)&&v.isConnected&&X.replaceWith(v),null==X||X.remove()},Ee=null==c?void 0:c.dropAnimation,Me=this,Re=O_(()=>{var e,t,n;const{transform:r,status:i}=u;if((r.x||r.y||s.current.translate)&&i.dragging){const i=null!=(e=b.translate)?e:{x:0,y:0},o={x:r.x/x.scaleX+i.x,y:r.y/x.scaleY+i.y},a=s.current.translate,l=vR(()=>u.modifiers),d=vR(()=>{var e;return null==(e=u.shape)?void 0:e.current}),f=null==c?void 0:c.keyboardTransition,p=J&&!we&&null!==f?`${null!=(t=null==f?void 0:f.duration)?t:250}ms ${null!=(n=null==f?void 0:f.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(P.set({transition:H?`${H}, translate ${p}`:`translate ${p}`,translate:`${o.x}px ${o.y}px 0`},wO),null==pe||pe.takeRecords(),d&&d!==be&&a&&!l.length){const e=iA.delta(o,a);u.shape=oA.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else u.shape=new dD(v);s.current.translate=o}},function(){if(u.status.dropped){this.dispose(),f.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==Me.dropAnimation?Me.dropAnimation:Ee;let t=s.current.translate;const n=null!=t;if(t||h===v||(t={x:0,y:0}),!t||null===e)return void Ce();l.renderer.rendering.then(()=>{!function(e){var t,n,r,i;const{animation:o}=e;if("function"==typeof o){const t=o({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=jO,easing:s=zO}=null!=o?o:{};NT(e.feedbackElement);const[,l]=null!=(t=jI(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const c=null!=(n=e.placeholder)?n:e.element,u={frameTransform:_O(e.feedbackElement,c)?null:void 0},d=new dD(e.feedbackElement,u),f=null!=(r=XT(VT(e.feedbackElement).translate))?r:e.translate,p=new dD(c,u),h=oA.delta(d,p,e.alignment),m=f.x-h.x,g=f.y-h.y,y=Math.round(d.intrinsicHeight)!==Math.round(p.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${p.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${p.intrinsicHeight}px`]}:{},b=Math.round(d.intrinsicWidth)!==Math.round(p.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${p.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${p.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},wO),e.feedbackElement.setAttribute(xO,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),oD({element:e.feedbackElement,keyframes:TD(ID(ID({},y),b),{translate:[`${f.x}px ${f.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:nT(BI(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(xO),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:f,element:h,feedbackElement:v,placeholder:X,translate:t,moved:n,transition:T,alignment:f.alignment,styles:P,animation:null!=e?e:void 0,getElementMutationObserver:()=>pe,cleanup:Ce,restoreFocus:ke})})}});return()=>{Ce(),Re()}},$D(DO,4,"overlay",IO,FO,OO),zD(DO,FO),FO.configure=HA(FO);var $O,BO,HO,VO,WO,UO,GO,YO=FO,KO=!0;HO=[I_],VO=QT.Forward,$O=[I_],BO=QT.Reverse;var XO=class{constructor(){WD(this,UO,FD(WO,8,this,KO)),FD(WO,11,this),WD(this,GO,FD(WO,12,this,KO)),FD(WO,15,this)}isLocked(e){return e!==QT.Idle&&(null==e?this[QT.Forward]===KO&&this[QT.Reverse]===KO:this[e]===KO)}unlock(e){e!==QT.Idle&&(this[e]=false)}};WO=ND(null),UO=new WeakMap,GO=new WeakMap,$D(WO,4,VO,HO,XO,UO),$D(WO,4,BO,$O,XO,GO),zD(WO,XO);var JO,QO,ZO,eN,tN,nN,rN=[QT.Forward,QT.Reverse],iN=class{constructor(){this.x=new XO,this.y=new XO}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},oN=class extends WA{constructor(e){super(e);const t=AR(new iN);let n=null;this.signal=t,zR(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new iN);const{delta:i}=e.dragOperation.position;if(n){const e={x:aN(i.x,n.x),y:aN(i.y,n.y)},r=t.peek();yR(()=>{for(const t of pA)for(const n of rN)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function aN(e,t){return Math.sign(e-t)}var sN=class extends(QO=GA,JO=[I_],QO){constructor(e){super(e),WD(this,eN,FD(ZO,8,this,!1)),FD(ZO,11,this),WD(this,tN),WD(this,nN,()=>{if(!VD(this,tN))return;const{element:e,by:t}=VD(this,tN);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 UD(this,tN,void 0),!1;const{position:i}=this.manager.dragOperation,o=null==i?void 0:i.current;if(o){const{by:i}=null!=e?e:{},a=i?{x:lN(i.x),y:lN(i.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=jT(e,i);if(r.x||r.y){const{speed:r,direction:l}=tD(e,o,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold);if(s)for(const e of pA)s[e].isLocked(l[e])&&(r[e]=0,l[e]=0);if(l.x||l.y){const{x:t,y:o}=null!=i?i:l,a=t*r.x,s=o*r.y;if(a||s){const t=null==(n=VD(this,tN))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!a||t.y&&!s)continue}return UD(this,tN,{element:e,by:{x:a,y:s}}),FT.schedule(VD(this,nN)),!0}}}}}return UD(this,tN,void 0),!1};let t=null,n=null;const r=A_(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=oT(tT(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t}),i=A_(()=>{const t=r.value,{documentElement:i}=UI(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=GT(r,{excludeElement:!1});return n=e,e}}if(t){const e=GT(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},P_);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new oN(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&mD(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function lN(e){return e>0?QT.Forward:e<0?QT.Reverse:QT.Idle}ZO=ND(QO),eN=new WeakMap,tN=new WeakMap,nN=new WeakMap,$D(ZO,4,"autoScrolling",JO,sN,eN),zD(ZO,sN);var cN=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()}),uN=class extends WA{constructor(e,t){super(e,t);const n=e.registry.plugins.get(sN);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=zR(()=>{var t,r,i;if(this.disabled)return;const{position:o,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==(i=this.options)?void 0:i.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>cN.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};uN.configure=HA(uN);var dN,fN=uN,pN={capture:!0,passive:!0},hN=class extends GA{constructor(e){super(e),WD(this,dN),this.handleScroll=()=>{null==VD(this,dN)&&UD(this,dN,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),UD(this,dN,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=zR(()=>{var e,n,r;if(t.status.dragging){const i=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return i.addEventListener("scroll",this.handleScroll,pN),()=>{i.removeEventListener("scroll",this.handleScroll,pN)}}})}};dN=new WeakMap;function mN(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var gN,yN=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}}),bN=class extends rI{constructor(e,t){super(e),this.manager=e,this.options=t,WD(this,gN,[]),this.listeners=new sT,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!hD(e.target))return;if(t.disabled)return;const{keyboardCodes:r=yN.keyboardCodes,preventActivation:i=yN.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){return zR(()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{mD(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}})}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(),nD(r);const{center:i}=new dD(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const o=UI(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];VD(this,gN).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=yN.keyboardCodes}=null!=n?n:{};if(wN(e,[...r.end,...r.cancel])){e.preventDefault();const t=wN(e,r.cancel);return void this.handleEnd(e,t)}wN(e,r.up)?this.handleMove("up",e):wN(e,r.down)&&this.handleMove("down",e),wN(e,r.left)?this.handleMove("left",e):wN(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:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:yN.offset;if("number"==typeof s&&(s={x:s,y:s}),i){switch(e){case"up":a={x:0,y:-s.y*o};break;case"down":a={x:0,y:s.y*o};break;case"left":a={x:-s.x*o,y:0};break;case"right":a={x:s.x*o,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(fN);!1===(null==e?void 0:e.disabled)&&(e.disable(),VD(this,gN).push(()=>{e.enable()}))}cleanup(){VD(this,gN).forEach(e=>e()),UD(this,gN,[])}destroy(){this.cleanup(),this.listeners.clear()}};gN=new WeakMap,bN.configure=HA(bN),bN.defaults=yN;var vN,xN=bN;function wN(e,t){return t.includes(e.code)}var SN,kN;vN=new WeakMap;SN=new WeakMap,kN=new WeakMap;var CN=class{};CN.Delay=class extends oI{constructor(){super(...arguments),WD(this,SN),WD(this,kN)}onEvent(e){switch(e.type){case"pointerdown":UD(this,kN,KI(e)),UD(this,SN,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!VD(this,kN))return;const{x:t,y:n}=KI(e);sA({x:t-VD(this,kN).x,y:n-VD(this,kN).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){VD(this,SN)&&(clearTimeout(VD(this,SN)),UD(this,kN,void 0),UD(this,SN,void 0))}},CN.Distance=class extends oI{constructor(){super(...arguments),WD(this,vN)}onEvent(e){switch(e.type){case"pointerdown":UD(this,vN,KI(e));break;case"pointermove":if(!VD(this,vN))return;const{x:t,y:n}=KI(e),r={x:t-VD(this,vN).x,y:n-VD(this,vN).y},{tolerance:i}=this.options;if(i&&sA(r,i))return void this.abort();sA(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){UD(this,vN,void 0)}};var EN,MN=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!hD(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?[new CN.Delay({value:250,tolerance:5})]:function(e){if(!hD(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(i)&&!e.defaultPrevented?[new CN.Delay({value:200,tolerance:0})]:[new CN.Delay({value:200,tolerance:10}),new CN.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r!==t.element&&(r!==t.handle&&(!!hD(r)&&(!(null==(n=t.handle)?void 0:n.contains(r))&&Boolean(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 ')))))}}),RN=class extends rI{constructor(e,t){super(e),this.manager=e,this.options=t,WD(this,EN,new Set),this.listeners=new sT,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=MN.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){return zR(()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=BI(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&&(TN(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>r.abort()})}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!hD(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=MN.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:i}=e,o=VI(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=YT(t.element),{x:s,y:l}=KI(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const c=this.activationConstraints(e,t,n);e.sensor=this;const u=new iI(c,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;const d=JI(),f=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:o?this.handleCancel:AN,options:{capture:!0}}]);VD(this,EN).add(()=>{f(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=KI(e),r=YT(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,FT.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=UI(t.target).body;try{i.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const o=hD(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:AN,options:{passive:!1}},{type:"click",listener:AN},{type:"contextmenu",listener:AN},{type:"keydown",listener:this.handleKeyDown}]);VD(this,EN).add(a)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},VD(this,EN).forEach(e=>e()),VD(this,EN).clear()}destroy(){this.cleanup(),this.listeners.clear()}};EN=new WeakMap,RN.configure=HA(RN),RN.defaults=MN;var _N=RN;function AN(e){e.preventDefault()}function PN(){}var IN=new WeakSet;function TN(e){e&&!IN.has(e)&&(e.addEventListener("touchmove",PN,{capture:!1,passive:!1}),IN.add(e))}var DN,ON,NN,qN,LN,jN,zN,FN,$N,BN,HN,VN,WN,UN,GN,YN,KN={modifiers:[],plugins:[nO,fN,class extends WA{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(bO),i=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(i){const e=this.destroy.bind(this);this.destroy=()=>{i(),e()}}}},YO,class extends WA{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(bO),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=zR(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return mN(),document.addEventListener("selectionchange",mN,{capture:!0}),()=>{document.removeEventListener("selectionchange",mN,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[_N,xN]},XN=class extends PI{constructor(e={}){const t=AI(e.plugins,KN.plugins),n=AI(e.sensors,KN.sensors),r=AI(e.modifiers,KN.modifiers);super(TD(ID({},e),{plugins:[hN,sN,bO,...t],sensors:n,modifiers:r}))}},JN=class extends(NN=LP,ON=[I_],DN=[I_],NN){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o}=n,a=OD(n,["element","effects","handle"]);super(ID({effects:()=>[...i(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(VA))?t:[...n.sensors]).map(e=>{const t=e instanceof rI?e:n.registry.register(e.plugin),r=e instanceof rI?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),WD(this,LN,FD(qN,8,this)),FD(qN,11,this),WD(this,jN,FD(qN,12,this)),FD(qN,15,this),this.element=r,this.handle=o}};qN=ND(NN),LN=new WeakMap,jN=new WeakMap,$D(qN,4,"handle",ON,JN,LN),$D(qN,4,"element",DN,JN,jN),zD(qN,JN);var QN=class extends($N=jP,FN=[I_],zN=[I_],$N){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=OD(n,["element","effects"]);const{collisionDetector:a=bD}=o,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new dD(n),i=vR(()=>this.shape);return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=AR(!1);super(TD(ID({},o),{collisionDetector:a,effects:()=>[...i(),()=>{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 DT(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),WD(this,GN),WD(this,HN,FD(BN,8,this)),FD(BN,11,this),WD(this,YN,FD(BN,12,this)),FD(BN,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){UD(this,GN,e,UN)}get element(){var e;return null!=(e=this.proxy)?e:VD(this,GN,WN)}};function ZN(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}BN=ND($N),HN=new WeakMap,GN=new WeakSet,YN=new WeakMap,VN=$D(BN,20,"#element",FN,GN,HN),WN=VN.get,UN=VN.set,$D(BN,4,"proxy",zN,QN,YN),zD(BN,QN);var eq="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?an.useLayoutEffect:an.useEffect;function tq(){const e=an.useState(0)[1];return an.useCallback(()=>{e(e=>e+1)},[e])}function nq(e,t=[],n=!1){const r=an.useRef(e);return r.current=e,function(e,t=!1){const n=an.useRef(e.peek()),r=an.useRef(!1),i=tq();return eq(()=>zR(()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?Rc.flushSync(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}(an.useMemo(()=>A_(()=>r.current()),t),n)}function rq(e,t){const n=an.useRef(new Map),r=tq();return eq(()=>{if(e)return zR(()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=vR(()=>r[1]),c=e[s];l!==c&&(o=!0,n.current.set(s,c),a=null!=(i=null==t?void 0:t(s,l,c))&&i)}o&&(a?queueMicrotask(()=>Rc.flushSync(r)):r())});n.current.clear()},[e]),an.useMemo(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function iq(e,t){e()}function oq(e){const t=an.useRef(e);return eq(()=>{t.current=e},[e]),t}function aq(e,t,n=an.useEffect,r=Object.is){const i=an.useRef(e);n(()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function sq(e,t){const n=an.useRef(ZN(e));eq(()=>{const r=ZN(e);r!==n.current&&(n.current=r,t(r))})}var lq=Object.defineProperty,cq=Object.defineProperties,uq=Object.getOwnPropertyDescriptors,dq=Object.getOwnPropertySymbols,fq=Object.prototype.hasOwnProperty,pq=Object.prototype.propertyIsEnumerable,hq=(e,t,n)=>t in e?lq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mq=new XN,gq=an.createContext(mq),yq=an.memo(an.forwardRef(({children:e},t)=>{const[n,r]=an.useState(0),i=an.useRef(null),o=an.useRef(null),a=an.useMemo(()=>({renderer:{get rendering(){var e;return null!=(e=i.current)?e:Promise.resolve()}},trackRendering(e){i.current||(i.current=new Promise(e=>{o.current=e})),an.startTransition(()=>{e(),r(e=>e+1)})}}),[]);return eq(()=>{var e;null==(e=o.current)||e.call(o),i.current=null},[e,n]),an.useImperativeHandle(t,()=>a),null})),bq=[void 0,P_];function vq(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:l}=t,c=((e,t)=>{var n={};for(var r in e)fq.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&dq)for(var r of dq(e))t.indexOf(r)<0&&pq.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const u=an.useRef(null),{plugins:d,modifiers:f,sensors:p}=c,h=AI(d,KN.plugins),m=AI(p,KN.sensors),g=AI(f,KN.modifiers),y=oq(i),b=oq(o),v=oq(s),x=oq(a),w=oq(l),S=oq(r),k=function(e){const t=an.useRef(null);t.current||(t.current=e());return an.useInsertionEffect(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=c.manager)?e:new XN(c)});return an.useEffect(()=>{if(!u.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=u.current,{monitor:n}=k;k.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=y.current;n&&t(()=>n(e,k))}),n.addEventListener("dragstart",e=>{var t;return null==(t=b.current)?void 0:t.call(b,e,k)}),n.addEventListener("dragover",e=>{const n=v.current;n&&t(()=>n(e,k))}),n.addEventListener("dragmove",e=>{const n=x.current;n&&t(()=>n(e,k))}),n.addEventListener("dragend",e=>{const n=w.current;n&&t(()=>n(e,k))}),n.addEventListener("collision",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,k)})];return()=>r.forEach(e=>e())},[k]),aq(h,()=>k&&(k.plugins=h),...bq),aq(m,()=>k&&(k.sensors=m),...bq),aq(g,()=>k&&(k.modifiers=g),...bq),vt.jsxs(gq.Provider,{value:k,children:[vt.jsx(yq,{ref:u,children:n}),n]})}function xq(){return an.useContext(gq)}function wq(e){var t;const n=null!=(t=xq())?t:void 0,[r]=an.useState(()=>e(n));return r.manager!==n&&(r.manager=n),eq(r.register,[n,r]),r}function Sq({children:e,className:t,dropAnimation:n,style:r,tag:i,disabled:o}){var a;const s=an.useRef(null),l=xq(),c=null!=(a=nq(()=>null==l?void 0:l.dragOperation.source,[l]).value)?a:null,u="function"==typeof o?o(c):o;an.useEffect(()=>{if(!s.current||!l||u)return;const e=l.plugins.find(e=>e instanceof YO);return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0},[l,u]),an.useEffect(()=>{if(!l)return;const e=l.plugins.find(e=>e instanceof YO);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[l,n]);const d=an.useMemo(()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?kq:e[t]});return new Proxy(l,{get:(t,n)=>"registry"===n?e:t[n]})},[l]);return vt.jsx(gq.Provider,{value:d,children:an.createElement(i||"div",{ref:s,className:t,style:r,"data-dnd-overlay":!0},function(){if(!c||u)return null;if("function"==typeof e)return vt.jsx(Cq,{source:c,children:e});return e}())})}function kq(){return()=>{}}function Cq({children:e,source:t}){return e(rq(t))}var Eq,Mq,Rq,_q,Aq,Pq=Object.create,Iq=Object.defineProperty,Tq=Object.getOwnPropertyDescriptor,Dq=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Oq=e=>{throw TypeError(e)},Nq=["class","method","getter","setter","accessor","field","value","get","set"],qq=e=>void 0!==e&&"function"!=typeof e?Oq("Function expected"):e,Lq=(e,t,n,r,i)=>({kind:Nq[e],name:t,metadata:r,addInitializer:e=>n._?Oq("Already initialized"):i.push(qq(e||null))}),jq=(e,t,n,r,i,o)=>{for(var a,s,l,c,u=7&t,d=Nq[u+5],f=e[2]||(e[2]=[]),p=(i=i.prototype,Tq(i,n)),h=r.length-1;h>=0;h--)(l=Lq(u,n,s={},e[3],f)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(p[d],l),s._=1,qq(a)&&(p[d]=a);return p&&Iq(i,n,p),i},zq=(e,t,n)=>t.has(e)||Oq("Cannot "+n),Fq=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)}},$q=class extends(Rq=q_,Mq=[T_],Eq=[T_],Rq){constructor(e){super(Fq.from(e),(e,t)=>Fq.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(Aq,5,this),((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)})(this,_q,0),this.velocity={x:0,y:0}}get delta(){return Fq.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=Fq.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(zq(a=this,s=_q,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);yR(()=>{((e,t,n)=>{zq(e,t,"write to private field"),t.set(e,n)})(this,_q,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(Fq.from(e)),this.velocity={x:0,y:0}}};Aq=(e=>{var t;return[,,,Pq(null!=(t=null==e?void 0:e[Dq("metadata")])?t:null)]})(Rq),_q=new WeakMap,jq(Aq,2,"delta",Mq,$q),jq(Aq,2,"direction",Eq,$q),((e,t)=>{((e,t,n)=>{t in e?Iq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,Dq("metadata"),e[3])})(Aq,$q);var Bq=(e=>(e.Horizontal="x",e.Vertical="y",e))(Bq||{});Object.values(Bq);var Hq=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/Fq.distance(t.shape.center,n),type:ZP.PointerIntersection,priority:QP.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:i}=e,o=Fq.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:ZP.ShapeIntersection,priority:QP.Normal}}return null})(e)};function Vq(e){const{collisionDetector:t,data:n,disabled:r,element:i,id:o,accept:a,type:s}=e,l=wq(t=>new QN(((e,t)=>cq(e,uq(t)))(((e,t)=>{for(var n in t||(t={}))fq.call(t,n)&&hq(e,n,t[n]);if(dq)for(var n of dq(t))pq.call(t,n)&&hq(e,n,t[n]);return e})({},e),{register:!1,element:ZN(i)}),t)),c=rq(l);return aq(o,()=>l.id=o),sq(i,e=>l.element=e),aq(a,()=>l.accept=a,void 0,P_),aq(t,()=>l.collisionDetector=null!=t?t:Hq),aq(n,()=>n&&(l.data=n)),aq(r,()=>l.disabled=!0===r),aq(s,()=>l.type=s),{droppable:c,get isDropTarget(){return c.isDropTarget},ref:an.useCallback(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 Wq(e){const t=xq();an.useEffect(()=>{if(!t)return;const n=Object.entries(e).reduce((e,[n,r])=>{if(r){const i=n.replace(/^on/,"").toLowerCase(),o=t.monitor.addEventListener(i,r);e.push(o)}return e},[]);return()=>n.forEach(e=>null==e?void 0:e())},[t,e])}const Uq=e=>Array.from({length:e},(e,t)=>t),Gq=({id:e,sectionIndex:t,itemIndex:n})=>vt.jsx("span",{children:`${e}-${t}-${n}`}),Yq=an.memo(()=>{const e=zg(aR)??Gq,{startSectionIndex:t,startIndex:n,id:r}=zg(uR)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:vt.jsx(Sq,{dropAnimation:null,children:vt.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:vt.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),Kq=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=zg(uR),i=r?.toSectionIndex===e&&r.toIndex===t;return vt.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:i&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},Xq=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,Jq=an.memo(({sectionIndex:e})=>{const t=zg(ZM)[e],n=zg(eR),r=zg(tR),i=null!==zg(uR),o=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=Vq({id:a,type:"section",accept:"item",collisionPriority:QP.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:vt.jsxs(ld,{ref:s,sx:{margin:"4px",outline:Xq(l,i),borderRadius:"4px",boxSizing:"border-box"},children:[vt.jsx(ld,{sx:{position:"relative",top:"4px"},children:vt.jsx(Kq,{sectionIndex:e,itemIndex:0,isDragging:!1})}),vt.jsxs(ld,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[vt.jsx(Cu,{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:o.title}),vt.jsx(Cu,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:o.message})]})]})}),Qq=an.memo(({id:e,sectionIndex:t})=>{const n=zg(oR);return void 0===n?null:an.createElement(n,{id:e,sectionIndex:t})});var Zq=Object.defineProperty,eL=Object.defineProperties,tL=Object.getOwnPropertyDescriptors,nL=Object.getOwnPropertySymbols,rL=Object.prototype.hasOwnProperty,iL=Object.prototype.propertyIsEnumerable,oL=(e,t,n)=>t in e?Zq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aL=(e,t)=>{for(var n in t||(t={}))rL.call(t,n)&&oL(e,n,t[n]);if(nL)for(var n of nL(t))iL.call(t,n)&&oL(e,n,t[n]);return e},sL=(e,t)=>eL(e,tL(t)),lL=class extends EI{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return sL(aL({},e),{[t]:n})}};lL.configure=HA(lL);var cL=lL,uL=cL.configure({axis:"x",value:0});cL.configure({axis:"y",value:0});var dL=class extends EI{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,i="number"==typeof n?n:n.y;return sL(aL({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};dL.configure=HA(dL);var fL=Object.create,pL=Object.defineProperty,hL=Object.defineProperties,mL=Object.getOwnPropertyDescriptor,gL=Object.getOwnPropertyDescriptors,yL=Object.getOwnPropertySymbols,bL=Object.prototype.hasOwnProperty,vL=Object.prototype.propertyIsEnumerable,xL=e=>{throw TypeError(e)},wL=(e,t,n)=>t in e?pL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SL=(e,t)=>{for(var n in t||(t={}))bL.call(t,n)&&wL(e,n,t[n]);if(yL)for(var n of yL(t))vL.call(t,n)&&wL(e,n,t[n]);return e},kL=(e,t)=>hL(e,gL(t)),CL=["class","method","getter","setter","accessor","field","value","get","set"],EL=e=>void 0!==e&&"function"!=typeof e?xL("Function expected"):e,ML=(e,t,n,r,i)=>({kind:CL[e],name:t,metadata:r,addInitializer:e=>n._?xL("Already initialized"):i.push(EL(e||null))}),RL=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},_L=(e,t,n,r,i,o)=>{for(var a,s,l,c,u,d=7&t,f=e.length+1,p=CL[d+5],h=e[f-1]=[],m=e[f]||(e[f]=[]),g=(i=i.prototype,mL({get[n](){return PL(this,o)},set[n](e){return TL(this,o,e)}},n)),y=r.length-1;y>=0;y--)(c=ML(d,n,l={},e[3],m)).static=false,c.private=false,u=c.access={has:e=>n in e},u.get=e=>e[n],u.set=(e,t)=>e[n]=t,s=(0,r[y])({get:g.get,set:g.set},c),l._=1,void 0===s?EL(s)&&(g[p]=s):"object"!=typeof s||null===s?xL("Object expected"):(EL(a=s.get)&&(g.get=a),EL(a=s.set)&&(g.set=a),EL(a=s.init)&&h.unshift(a));return g&&pL(i,n,g),i},AL=(e,t,n)=>t.has(e)||xL("Cannot "+n),PL=(e,t,n)=>(AL(e,t,"read from private field"),t.get(e)),IL=(e,t,n)=>t.has(e)?xL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),TL=(e,t,n,r)=>(AL(e,t,"write to private field"),t.set(e,n),n);function DL(e){return e instanceof uj||e instanceof cj}var OL=class extends WA{constructor(e){super(e);const t=zR(()=>{const{dragOperation:t}=e;if(mD(t.activatorEvent)&&DL(t.source)&&t.status.initialized){const t=e.registry.plugins.get(sN);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(!mD(e.nativeEvent))return;if(!DL(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:c}=n,{center:u}=n.shape.current,d=[],f=[];yR(()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&DL(e)||!e.element)continue;let n=e.shape;const r=new dD(e.element,{getBoundingClientRect:e=>YI(e,void 0,.2)});r.height&&r.width&&(("down"==s&&u.y+10<r.center.y||"up"==s&&u.y-10>r.center.y||"left"==s&&u.x-10>r.center.x||"right"==s&&u.x+10<r.center.x)&&(d.push(e),e.shape=r,f.push(()=>e.shape=n)))}}),e.preventDefault(),i.disable();const p=i.computeCollisions(d,vD);yR(()=>f.forEach(e=>e()));const[h]=p;if(!h)return;const{id:m}=h,{index:g,group:y}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:o}=n;if(!e||!DL(e)||!o)return;const{index:a,group:s,target:l}=e.sortable,c=g!==a||y!==s,u=c?l:null==t?void 0:t.element;if(!u)return;nD(u);const d=new dD(u);if(!d)return;const f=oA.delta(d,oA.from(o.current.boundingRectangle),e.alignment);r.move({by:f}),c?r.setDropTarget(e.id).then(()=>i.enable()):i.enable()})})});this.destroy=()=>{n(),t()}}};var NL=Object.defineProperty,qL=Object.defineProperties,LL=Object.getOwnPropertyDescriptors,jL=Object.getOwnPropertySymbols,zL=Object.prototype.hasOwnProperty,FL=Object.prototype.propertyIsEnumerable,$L=(e,t,n)=>t in e?NL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BL=(e,t)=>{for(var n in t||(t={}))zL.call(t,n)&&$L(e,n,t[n]);if(jL)for(var n of jL(t))FL.call(t,n)&&$L(e,n,t[n]);return e},HL=(e,t)=>qL(e,LL(t));function VL(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function WL(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function UL(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const c=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>c(e,a.id)),i=e.findIndex(e=>c(e,s.id));if(-1===r||-1===i){if(WL(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const u=Object.entries(e);let d,f,p=-1,h=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>c(e,a.id)),-1!==p&&(d=e)),-1===h&&(h=t.findIndex(e=>c(e,s.id)),-1!==h&&(f=e)),-1!==p&&-1!==h)break;if(-1===p&&WL(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return HL(BL({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return HL(BL({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==f&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;f=s.id,h=t}if(null==d||null==f||d===f&&p===h){if(null!=d&&d===f&&p===h&&WL(a)){const t=null!=a.group&&a.group!==d,r=a.index!==p;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return HL(BL({},e),{[d]:n(e[d],p,a.index)});const r=e[d][p];return HL(BL({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===f)return HL(BL({},e),{[d]:n(e[d],p,h)});const y=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,b=e[d][p];return HL(BL({},e),{[d]:[...e[d].slice(0,p),...e[d].slice(p+1)],[f]:[...e[f].slice(0,h+y),b,...e[f].slice(h+y)]})}(e,t,VL)}var GL="__default__";function YL(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function KL(e,t){return e.index-t.index}function XL(e){return Array.from(e).sort(KL)}var JL,QL,ZL,ej,tj,nj,rj,ij,oj=[OL,class extends WA{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof uj){const{sortable:e}=n,{group:r}=e;let i=t.get(r);i||(i=new Set,t.set(r,i)),i.add(e)}for(const[e,n]of t)t.set(e,new Set(XL(n)));return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!DL(i)||!DL(o))return;if(i.sortable===o.sortable)return;const a=t(),s=i.sortable.group===o.sortable.group,l=a.get(i.sortable.group),c=s?l:a.get(o.sortable.group);l&&c&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,u,d;const f=t();for(const[e,t]of a.entries()){const n=Array.from(t).entries();for(const[t,i]of n)if(i.index!==t||i.group!==e||!(null==(r=f.get(e))?void 0:r.has(i)))return}const p=i.sortable.element,h=o.sortable.element;if(!h||!p)return;if(!s&&o.id===i.sortable.group)return;const m=XL(l),g=s?m:XL(c),y=null!=(u=i.sortable.group)?u:GL,b=null!=(d=o.sortable.group)?d:GL,v={[y]:m,[b]:g},x=UL(v,e);if(v===x)return;const w=x[b].indexOf(i.sortable),S=x[b].indexOf(o.sortable);n.collisionObserver.disable(),YL(p,w,h,S),yR(()=>{for(const[e,t]of x[y].entries())t.index=e;if(!s)for(const[e,t]of x[b].entries())t.group=o.sortable.group,t.index=e}),n.actions.setDropTarget(i.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:i}=r;DL(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask(()=>{const e=t(),r=e.get(i.sortable.initialGroup);r&&n.renderer.rendering.then(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).entries();for(const[n,r]of e)if(r.index!==n||r.group!==t)return}const t=XL(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(YL(n,o.index,a,i.index),yR(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],aj={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},sj=new class{constructor(){M_(this,N_,new WeakMap)}get(e,t){var n;return e?null==(n=E_(this,N_).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return E_(this,N_).has(e)||E_(this,N_).set(e,new Map),null==(r=E_(this,N_).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=E_(this,N_).get(e))?void 0:t.clear():void 0}};QL=[I_],JL=[I_];var lj=class{constructor(e,t){IL(this,ej,RL(ZL,8,this)),RL(ZL,11,this),IL(this,tj),IL(this,nj),IL(this,rj,RL(ZL,12,this)),RL(ZL,15,this),IL(this,ij),this.register=()=>(yR(()=>{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=()=>{yR(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{yR(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=aj,plugins:c}=n,u=((e,t)=>{var n={};for(var r in e)bL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&yL)for(var r of yL(e))t.indexOf(r)<0&&vL.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);const d=AI(c,oj);this.droppable=new uj(u,t,this),this.draggable=new cj(kL(SL({},u),{plugins:d,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&sj.clear(this.manager),(null==r?void 0:r.dragging)&&sj.set(this.manager,this.id,vR(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=PL(this,nj),i=PL(this,tj);e===r&&t===i||(TL(this,nj,e),TL(this,tj,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(YO))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:s,sensors:a}),t,this),TL(this,ij,u.element),this.manager=t,this.index=o,TL(this,nj,o),this.group=i,TL(this,tj,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=sj.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=sj.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){vR(()=>{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 i=this.refreshShape();if(!i)return;const o=n.boundingRectangle.left-i.boundingRectangle.left,a=n.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=VT(r),l=aD(r,s,!1),c=aD(r,s);if(o||a){const n=nT(BI(r))?kL(SL({},t),{duration:0}):t;oD({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){yR(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){yR(()=>{const t=PL(this,ij),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),TL(this,ij,e)})}get element(){var e,t;const n=PL(this,ij);if(n)return null!=(t=null!=(e=aT.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(){return this.draggable.disabled&&this.droppable.disabled}set plugins(e){this.draggable.plugins=AI(e,oj)}set disabled(e){yR(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){yR(()=>{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:bD}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){yR(()=>{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)}};ZL=[,,,fL(null)],ej=new WeakMap,tj=new WeakMap,nj=new WeakMap,rj=new WeakMap,ij=new WeakMap,_L(ZL,4,"index",QL,lj,ej),_L(ZL,4,"group",JL,lj,rj),((e,t)=>{return wL(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(ZL,lj);var cj=class extends JN{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}},uj=class extends QN{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},dj=Object.defineProperty,fj=Object.defineProperties,pj=Object.getOwnPropertyDescriptors,hj=Object.getOwnPropertySymbols,mj=Object.prototype.hasOwnProperty,gj=Object.prototype.propertyIsEnumerable,yj=(e,t,n)=>t in e?dj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bj=(e,t)=>{for(var n in t||(t={}))mj.call(t,n)&&yj(e,n,t[n]);if(hj)for(var n of hj(t))gj.call(t,n)&&yj(e,n,t[n]);return e};function vj(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:i,data:o,element:a,handle:s,index:l,group:c,disabled:u,modifiers:d,sensors:f,target:p,type:h,plugins:m}=e,g=bj(bj({},aj),e.transition),y=wq(t=>new lj(((e,t)=>fj(e,pj(t)))(bj({},e),{transition:g,register:!1,handle:ZN(s),element:ZN(a),target:ZN(p)}),t)),b=rq(y,xj);return aq(i,()=>y.id=i),eq(()=>{yR(()=>{y.group=c,y.index=l})},[y,c,l]),aq(h,()=>y.type=h),aq(t,()=>y.accept=t,void 0,P_),aq(o,()=>o&&(y.data=o)),aq(l,()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&y.refreshShape()},iq),sq(s,e=>y.handle=e),sq(a,e=>y.element=e),sq(p,e=>y.target=e),aq(u,()=>y.disabled=!0===u),aq(f,()=>y.sensors=f),aq(n,()=>y.collisionDetector=n),aq(r,()=>y.collisionPriority=r),aq(m,()=>y.plugins=m,void 0,P_),aq(g,()=>y.transition=g,void 0,P_),aq(d,()=>y.modifiers=d,void 0,P_),aq(e.alignment,()=>y.alignment=e.alignment),{sortable:b,get isDragging(){return b.isDragging},get isDropping(){return b.isDropping},get isDragSource(){return b.isDragSource},get isDropTarget(){return b.isDropTarget},handleRef:an.useCallback(e=>{y.handle=null!=e?e:void 0},[y]),ref:an.useCallback(e=>{var t,n;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)},[y]),sourceRef:an.useCallback(e=>{var t,n;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)},[y]),targetRef:an.useCallback(e=>{var t,n;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)},[y])}}function xj(e,t,n){return!("isDragSource"!==e||n||!t)}const wj=({id:e,itemIndex:t,sectionIndex:n})=>vt.jsx("div",{children:`${n}:${t} - ${e}`}),Sj=({id:e,itemIndex:t,sectionIndex:n})=>{const r=zg(sR),i=zg(iR),o=zg(ZM).at(n)??0,a=zg(eR)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:c}=vj({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[uL],plugins:[OL],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),u=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=i??wj;return vt.jsx(Uf,{className:"section-item-container","data-testid":"section-item",onClick:u,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:vt.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[vt.jsx(Kq,{isDragging:l,itemIndex:t,sectionIndex:n}),vt.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:c}),t===o-1&&vt.jsx(Kq,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})},kj=an.memo(Sj),Cj=an.memo(({sectionIndex:e})=>{const t=zg(eR),n=zg(ZM).at(e)??0,r=t({sectionIndex:e});return vt.jsxs(ld,{className:"exploration-list",style:{overflow:"auto"},children:[vt.jsx(nf,{}),vt.jsx(Qq,{id:r,sectionIndex:e}),vt.jsx(nf,{}),vt.jsx(Jq,{sectionIndex:e}),vt.jsx(Of,{sx:{padding:"2px 8px"},children:Uq(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return vt.jsx(kj,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),Ej=[_N.configure({activationConstraints:[new CN.Distance({value:5})]}),xN],Mj=an.memo(()=>{const e=zg(QM),t=zg(eR),n=Fg(dR("start")),r=Fg(dR("over")),i=Fg(dR("end"));return vt.jsxs(vq,{sensors:Ej,onDragEnd:e=>{i(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[vt.jsx(ld,{style:{display:"flex",flexDirection:"column"},children:Uq(e).map(e=>vt.jsx(Cj,{sectionIndex:e},t({sectionIndex:e})))}),vt.jsx(Yq,{})]})}),Rj=an.memo(e=>vt.jsx(LM,{atoms:fR,atomFamilies:pR,children:vt.jsx(hR,{props:e,children:vt.jsx(Mj,{})})})),_j=Rg(null,(e,t,{event:n,id:r,toIndex:i})=>{const o=e(BE),a=e(gM),s=e(fM),l=e(pM);if(void 0===o||null===a||void 0===s||void 0===l)return;if(n.operation.canceled)return;const c=l[i];if(!c)return;const u=((e,t,n)=>{const r=n.findIndex(t=>t===e),i=n.findIndex(e=>e===t);if(-1===r||-1===i||r===i)return n;const o=[...n],[a]=o.splice(r,1);return o.splice(i,0,a),o})(r,c,s);t(XE,Object.fromEntries(u.map((e,t)=>[e,t]))),a.add(async()=>{o.updateColumnOrders(u)})}),Aj="ChartExploration.Table.ColumnSectionEmpty.Title",Pj="ChartExploration.Table.NoColumnsFound.Title",Ij="#177fe6",Tj=Rg(e=>{const t=e(VE),n=e(WE).length>0,r=(e=>e?Pj:Aj)(n),i=(e=>e?"":"ChartExploration.Table.ColumnSectionEmpty.Message")(n);return()=>({title:t(r),message:""===i?"":t(i)})}),Dj=({itemIndex:e})=>{const t=zg(dM(e));if(!t)return null;const n=t.title;return vt.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})},Oj=Rg(e=>{const t=e(pM),n=e(kM),r=t.filter(e=>n.has(e)).length;return 0===t.length?"disabled":0===r?"none":r===t.length?"all":"some"}),Nj=Rg(null,(e,t)=>{const n=e(pM),r=e(kM),i="all"!==e(Oj)&&"disabled"!==e(Oj),o=[],a=new Set(e(vM)),s=new Set(e(xM));if(i){const t=new Set(n.filter(e=>!r.has(e)));o.push(...Array.from(t).map(t=>({id:t,isAlternative:!0,type:e(hM)[t]}))),o.forEach(e=>a.add(e.id)),o.forEach(e=>s.delete(e.id))}else{const t=new Set(n.filter(e=>r.has(e)));o.push(...Array.from(t).map(t=>({id:t,isAlternative:!1,type:e(hM)[t]}))),o.forEach(e=>a.delete(e.id)),o.forEach(e=>s.add(e.id))}t(vM,a),t(xM,s),NE({items:o,handler:e(BE),model:e($E),currentColumnIds:e(fM),handlerQueue:e(gM)})}),qj=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},Lj=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,jj=e=>{const{currentTarget:t}=e,n=Lj(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),i=e?.querySelector(".exploration-section-header");if(i)return i;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 i=r.getElementsByClassName(t);return i.length>0?i[i.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},zj=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===Lm.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},Fj=(e,t)=>{const{key:n}=e;switch(n){case Lm.Tab:e.shiftKey||(dm(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),i=r?.getElementsByClassName("exploration-item-focus")[0];i&&qj(i)})(e,t));break;case Lm.Down:(e=>{e.preventDefault();const t=e.currentTarget.closest(".exploration-list"),n=t?.getElementsByClassName("exploration-item-focus")[0];n&&qj(n)})(e);break;case Lm.Enter:case Lm.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)}},$j=({children:e})=>vt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),Bj=({children:e})=>{const t=an.useRef(null),n=zg(Oj),[,r]=$g(Nj),i=zg(VE),o={ref:t,toggleAllCheckboxes:r,checkState:n};return vt.jsxs(ld,{ref:t,"aria-label":i("Common.Columns"),className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{Fj(e,o)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${Ij} inset`}},children:[vt.jsx(Od,{inputProps:{"aria-label":i("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}}),vt.jsx($j,{children:e})]})},Hj=()=>{const e=zg(VE);return vt.jsx(Bj,{children:e("Common.Columns")})},Vj=(e,t)=>vt.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:vt.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"})}),Wj=an.forwardRef(Vj),Uj=(e,t)=>vt.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:[vt.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"}),vt.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"})]}),Gj=an.forwardRef(Uj),Yj=(e,t)=>vt.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:vt.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"})}),Kj=an.forwardRef(Yj),Xj=ic("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),Jj=ic(Kj)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${Ij} inset`}})),Qj=e=>{const t=e.key===Lm.Down?(e=>{const{currentTarget:t,key:n}=e,r=Lj(t),i=t.closest("li");let o=i?.nextElementSibling?.getElementsByClassName(r)[0];return o||(o=zj(t,n),o)?o:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):jj(e);t&&qj(t)},Zj=(e,t)=>{const{key:n}=e;switch(n){case Lm.Tab:if(e.shiftKey)dm(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&&qj(e))}const n=jj(e);n&&qj(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void qj(t);const r=jj(e);r&&qj(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 qj(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&qj(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&&qj(n),!0}const i=zj(n,r);if(!i)return!1;qj(i)}return!0})(e,t);n?dm(e):e.stopPropagation()}break;case Lm.Enter:case Lm.Space:dm(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&&qj(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void qj(e)}n===t.items.explorationItemFocusRef.current&&t.toggleItem()})(e,t);break;case Lm.Down:case Lm.Up:dm(e),Qj(e)}},ez=({children:e})=>vt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),tz={dimension:Wj,measure:Gj},nz=({id:e,dragHandleRef:t,title:n,type:r,itemIndex:i})=>{const[o,a]=$g(kM),s=zg(VE),l=an.useRef(null),c=an.useRef(null),u=an.useRef(null);an.useEffect(()=>{t&&l.current&&t(l.current)},[t]);const d=tz[r],f=!o.has(e),p={id:e,itemIndex:i,toggleItem:()=>{a({id:e,isAlternative:f,type:r})},items:{explorationItemRef:l,explorationItemFocusRef:c,draggableIconRef:u}};return vt.jsxs(ld,{ref:l,className:"exploration-item",onClick:t=>{t.stopPropagation(),-1!==e&&a({id:e,isAlternative:f,type:r})},onKeyDown:e=>{Zj(e,p)},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 ${Ij} inset`}},children:[vt.jsxs(ld,{ref:c,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{Zj(e,p)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${Ij} inset`}},children:[vt.jsx(Od,{checked:o.has(e),"aria-label":s("ChartExploration.ListItem.Label",n),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0}}),vt.jsx(ld,{children:vt.jsx(d,{height:12,style:{opacity:1,marginRight:"8px"}})}),vt.jsx(ez,{children:n})]}),vt.jsx(Jj,{ref:u,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{Zj(e,p)}})]})},rz=({id:e,itemIndex:t,dragHandleRef:n})=>{const r=zg(dM(t));return r?vt.jsx(nz,{id:e,dragHandleRef:n,title:r.title,type:r.type,itemIndex:t}):null},iz=()=>{const e=zg(cM),t=zg(Tj),n=zg(nM),r=zg(uM),i=Fg(_j);return!n&&vt.jsx(Rj,{numberOfSections:1,numberOfItemsInSection:[e],keyExtractor:r,emptyTexts:t,onDragEnd:i,dragOverlayRenderer:Dj,headerRenderer:Hj,itemRenderer:rz})},oz=(e,t)=>vt.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:vt.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"})}),az=an.forwardRef(oz),sz=()=>{const[e,t]=$g(WE),n=zg(VE),r=sn.useRef(null),i=zg(cM),o=an.useCallback(e=>{t(e.target.value)},[t]),a=0===e.length||0===i?n("Common.Search.NoResultsAvailable"):n("ChartExploration.Table.Search.ResultsFound",i.toString());return vt.jsxs(ld,{ref:r,style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:0,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[vt.jsx(Xj,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:a}),vt.jsx(Up,{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:o,startAdornment:vt.jsx(Sf,{position:"start",children:vt.jsx(az,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},lz=e=>{const t=tm();return vt.jsx(ac,{theme:t,children:vt.jsx(Dg,{children:vt.jsx(CM,{props:e,children:vt.jsxs(ld,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[vt.jsx(sz,{}),vt.jsx(iz,{})]})})})})},cz=e=>e.flags.isEnabled("VNA-655-STRAIGHT_TABLE_NEW_EXPLORATION")?{component:lz,classification:{tags:["exploration"],exclusive:!0}}:{component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}};var uz=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}(uz||{}),dz=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(dz||{}),fz=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(fz||{}),pz=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(pz||{});const hz=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,mz=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,i="}";switch(e.type){case fz.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case uz.BEGINNING_OF_WORD:t="*^",n="*";break;case uz.ENDS_WITH:t="*";break;case uz.STARTS_WITH:n="*";break;case uz.MATCHES_EXACTLY:break;case uz.CONTAINS:default:t="*",n="*"}const i=e.options.values?.[0]??"";return""!==i?`"${t}${i}${n}"`:""})(e);break;case fz.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===dz.GENERAL,r=t?.modifier?.type===pz.FIXED_VALUE,i=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===i.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let o,a,s="=";n&&r?(o=`${t.conditionField?.aggregator}(${hz(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(o="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(o=`${t.conditionField?.aggregator}(${hz(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${hz(t.firstValue?.field)})`):(o=`${hz(e.field)}`,a=`${t.firstValue?.aggregator}(total ${hz(t.firstValue?.field)})`);const l=`${s}${o}${i[0]}${a}`;let c="";if(i.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 ${o}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${hz(t.secondValue?.field)})`,a=` and ${o}`):(e=`${t.secondValue?.aggregator}(total ${hz(t.secondValue?.field)})`,a=` and ${o}`),c=`${a}${i[1]}${e}`}return`"${l}${c}"`})(e);break;case fz.CLEAR_SELECTION:t=`[${e.field}]=`,r="",i="";break;case fz.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${i}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},gz=[];for(let e=0;e<256;++e)gz.push((e+256).toString(16).slice(1));const yz=new Uint8Array(16);function bz(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(yz);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(gz[e[t+0]]+gz[e[t+1]]+gz[e[t+2]]+gz[e[t+3]]+"-"+gz[e[t+4]]+gz[e[t+5]]+"-"+gz[e[t+6]]+gz[e[t+7]]+"-"+gz[e[t+8]]+gz[e[t+9]]+"-"+gz[e[t+10]]+gz[e[t+11]]+gz[e[t+12]]+gz[e[t+13]]+gz[e[t+14]]+gz[e[t+15]]).toLowerCase()}(t)}(e)}const vz=()=>crypto?.randomUUID?.()??bz(),xz=({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}))],wz=({previousColumns:e,nextColumns:t,qInterColumnSortOrder:n})=>{const r=new Map(e.map((e,t)=>[t,e.qDef.cId])),i=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:i.get(t))??e})};class Sz extends e.HyperCubeHandler{#c;constructor(e,t){super(e),this.#c=t}#u(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]))}}#f(e,t){const n=this.hcProperties.qLayoutExclude?.allColumnOrder??{},r={};for(const[i,o]of Object.entries(n))r[i===e?t:i]=o;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.#u(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),i=r.qDef.cId;return this.#f(n,i),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.#u(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),i=r.qDef.cId;return this.#f(n,i),r}async#p(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.getDimensions().length)}}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.#p(t.id):this.#h(t.id));this.updateColumnOrders(t)}updateColumnOrders(e){const t=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:n,nextAllColumnOrderById:r})=>{const i=xz({qDimensions:e,qMeasures:t}),o=[...e,...t],a=new Map(r.map((e,t)=>[e,t])),s=i.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),c=s.filter(e=>!e.isDimension).map(e=>e.def),u=[...l,...c],d=new Map(u.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:l,qMeasures:c,qInterColumnSortOrder:wz({previousColumns:o,nextColumns:u,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,i=Array.isArray(this.properties.filters)?this.properties.filters:[],o={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:vz(),qTags:Array.isArray(t)?t:[],isNumeric:n};return i.push(o),this.properties.filters=i,this.properties.qHyperCubeDef.qContextSetExpression=mz(i),o}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#y(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=mz(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.#y(e);return n}getLabels(){return this.getMeasures().reduce((e,t)=>(!t.qLibraryId&&t.qDef.qLabel&&e.push(t.qDef.qLabel),e),[])}getAddDimensionLabel(){return this.#c.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}const kz=(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 Cz(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Ez(e){return e>0?0:1}function Mz(e){return e.translator.get("Visualizations.Descriptions.Column")}function Rz(e){return{measures:{min:Ez,max:1e3,description:()=>Mz(e),add(e,t,n){const{qColumnOrder:r}=n.hcProperties;Cz(r,n.getDimensions().length+n.getMeasures().length-1)},remove(e,t,n,r){const{qColumnOrder:i}=n.hcProperties,o=(n.hcProperties.qDimensions?n.hcProperties.qDimensions.length:0)+r;kz(i,o)}},dimensions:{min:Ez,max:1e3,description:()=>Mz(e),add(e,t,n){const{qColumnOrder:r}=n.hcProperties;return Cz(r,n.getDimensions().length-1),e},remove(e,t,n,r){if(e?.isAlternative)return;const{qColumnOrder:i}=n.hcProperties;kz(i,r)}}}}const _z=e=>{const t=new Sz({},e.translator),n=(t,n)=>{e.anything.logInfo?.(t,n)};return{properties(r){if(!("qHyperCubeDef"in r&&!!r.qHyperCubeDef))return r;const{qHyperCubeDef:i}=r,o=i.qLayoutExclude?.qHyperCubeDef,a=e.flags.isEnabled("qcb-35151-fix-duplicate-columns"),s=new Set,l=[];let c=0,u=0,d=0;[...i.qDimensions,...i.qMeasures,...o?.qDimensions??[],...o?.qMeasures??[]].forEach(e=>{c++;const t=e.qDef?.cId;if((e=>"string"==typeof e&&e.length>0)(t))if(s.has(t)){if(u++,a){const t=vz();e.qDef={...e.qDef,cId:t},l.push(t)}}else s.add(t),l.push(t);else if(d++,a){const t=vz();e.qDef={...e.qDef,cId:t},l.push(t)}});const f=u+d;if(0===f)return r;n("sn-table migrate: column cId issues detected",{issueCount:f,totalColumnCount:c,duplicateCount:u,missingCount:d});const p=r.components?.find(e=>"theme"===e.key);return e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&p?.nullValues&&!p.dimensionNullValues&&(p.dimensionNullValues={...p.nullValues}),a?(t.setProperties(r),t.updateColumnOrders(l),n("sn-table migrate: column cId cleanup completed",{replacementCount:f}),r):r}}};let Az=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),Pz=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const Iz=e=>{switch(e?.type){case"url":return Az.Link;case"image":return Az.Image;case"indicator":return Az.Indicator;case"miniChart":return Az.MiniChart;default:return Az.Text}},Tz=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:i}=r.properties.qHyperCubeDef,o=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!i&&e||i)&&o.push({value:"image",translation:"Object.Table.Representation.Image"}),o}}),Dz=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>Iz(e.qDef.representation)===Az.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:i,qDimensions:o,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=o?.indexOf(e)??1/0;return(r?.slice(0,i)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},Oz=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:Tz({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>Iz(e.qDef.representation)===Az.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>Iz(e.qDef.representation)===Az.Link&&e.qDef.representation?.urlPosition===Pz.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>Iz(e.qDef.representation)===Az.Link&&e.qDef.representation?.urlPosition===Pz.Attribute},...Dz(n)}},Nz=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,i=!r?.("tableImages")&&t[Az.Image],o=!r?.("qMiniChartDef")&&t[Az.MiniChart],a=!r?.("tableIndicators")&&t[Az.Indicator],s=i&&t[Az.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&&i||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),o&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:i?{uses:"measureRepresentationItems.representationImage",show:e=>Iz(e.qDef.representation)===Az.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:o?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};var qz,Lz={};var jz=(qz||(qz=1,function(e){(()=>{var t={370:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{default:()=>Ae});var o=r(370),a=r.n(o);const s=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},l=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},c={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var u="".concat(" ","(").concat(" "),d="".concat(" ",")").concat(" ");function f(e){return u+e+d}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function h(e){return!(!e.fullAccumulation&&!e.fullRange)}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function g(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function y(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function b(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function v(e){return void 0===e?")":", 0, ".concat(e,")")}function x(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function w(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(x("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(x("MaxString(".concat(t,")")),")'\"}")}function S(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=w(p(r[0],i),y(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var u=p(r[0],i),d=p(r[1],i),f=y(0),h=y(1),m=w(u,f),g=w(d,h);return"".concat(a,"({1<").concat(m,",").concat(g,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function k(e){return"".concat(e,"(")}function C(e){var t=e.properties,n=e.layout;return l(t,"qHyperCubeDef.qDimensions",l(n,"qHyperCube.qDimensionInfo",[])).length}const E={isFullRange:h,getNumDimensions:C,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=f(g(t));if(!n.showExcludedValues)return a;var s=S({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=y(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var u=y(0),d=y(1);return"If(Count(".concat(u,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:m,getNumStepComp:function(e,t){if(!h(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return m(e,t)},getAboveCompPrefix:b,getAboveCompSuffix:v,getAboveComp:function(e,t,n,r){return b(e,t)+n+v(r)},getFunctionPrefix:k,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return k(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:S,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===C({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=y(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:g,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(u);if(-1!==n){var r=t.indexOf(d);if(-1!==r)return t.substring(n+u.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:p,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=C({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:f,canExtract:function(e){var t=e.indexOf(u),n=e.indexOf(d);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:y,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=c.OPTIONS.find(function(t){return t.value===e.decomposition});return t?c.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(c.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return c.EXPRESSIONS[n]&&r.includes(c.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var _=a().bind(null,!0),A={},P=Array.isArray;function I(e){return null!=e&&!Array.isArray(e)&&"object"===R(e)}function T(e){return void 0===e}function D(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function O(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}}),e}function N(e,t){var n=!0;if(I(e)&&I(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){N(e[r],t[r])||(n=!1)}),n);if(P(e)&&P(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!N(e[r],t[r]))return!1;return!0}return e===t}A.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?_({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);N(o,a)||D(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):I(o)&&I(a)?r=r.concat(A.generate(a,o,s)):P(o)&&P(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(N(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(A.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){T(t[i])&&!D(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},A.apply=function(e,t){t.forEach(function(t){var n,r,i=O(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(P(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(P(a)&&P(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return M(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(I(a)&&I(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!D(n,e)&&delete n[e]}),_(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var u=O(e,t.from);P(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(P(i)?i.splice(+o,1):delete i[o])})},A.clone=function(e){return _({},e)},A.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},A.updateObject=function(e,t){Object.keys(e).length?A.apply(e,A.generate(e,t)):_(e,t)};const q=A;var L="accumulation";function j(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function z(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const $={translationKey:"properties.modifier.accumulation",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var s=o;void 0===s&&(s=E.getNumDimensions({properties:r,layout:i}));var c=l(r,"qHyperCubeDef.qDimensions",[]),u=E.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=E.getNumStepComp(n,s),f=E.getAboveComp(n,s,u,d),p=E.getRangeComp("RangeSum",f);if(E.needDimension({modifier:n,properties:r,layout:i})){var h=E.getDimComp(c,1),m=E.getDimComp(c,0),g=E.getAggrComp(p,h,m);p=n.showExcludedValues?E.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,valueComp:g}):g}return p},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(z(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(z(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(z(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=j(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=j(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(L))return!1;var o=j(t,e);return o&&!o.disabled}}}};var B="movingAverage";function H(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function V(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var W={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const U={translationKey:"properties.modifier.movingAverage",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return n;var c=a;void 0===c&&(c=E.getNumDimensions({properties:i,layout:o}));var u=l(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=E.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:s,treatMissingAsNull:d}),p=E.getNumStepComp(r,c),h=E.getAboveComp(r,c,f,p);if(r.nullSuppression)t=E.getRangeComp("RangeAvg",h);else{var m=E.getRangeComp("RangeSum",h),g=function(e,t){var n=E.getRowNoComp(e,t);if(!E.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(E.needDimension({modifier:r,properties:i,layout:o})){var b=E.getDimComp(u,1),v=E.getDimComp(u,0),x=E.getAggrComp(y,b,v);y=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,W)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=H(t,e);return o&&!o.disabled}}}};var G="timeSeriesDecomposition";function Y(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===G)return n[r]}function K(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===G)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var X={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const J={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?E.generateTSDExpression(n,t,r):t},extractInputExpression:E.extractInputExpression,initModifier:function(e,t){E.initModifier(e,X),""===e.decomposition&&t&&(e.decomposition=E.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(K(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:c.OPTIONS},steps:{refFn:function(t){return"".concat(K(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=Y(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=Y(t,e);return n&&!n.fullRange}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(G))return!1;var o=Y(t,e);return o&&!o.disabled}}}};var Q="difference";function Z(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===Q)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var ee={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const te={translationKey:"properties.modifier.difference",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var s=o;void 0===s&&(s=E.getNumDimensions({properties:r,layout:i}));var c=l(r,"qHyperCubeDef.qDimensions",[]),u=E.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=E.getAboveComp(n,s,u),f="".concat(u," - ").concat(d);if(E.needDimension({modifier:n,properties:r,layout:i})){var p=E.getDimComp(c,1),h=E.getDimComp(c,0),m=E.getAggrComp(f,p,h);f=n.showExcludedValues?E.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(ee).forEach(function(t){void 0===e[t]&&(e[t]=ee[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(Q))return!1;var o=function(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===Q)return n[r]}(t,e);return o&&!o.disabled}}}};var ne="normalization";function re(e,t){var n=l(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===ne)return n[r]}function ie(e,t){var n=function(e,t){var n=l(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===ne)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function oe(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var ae={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function se(e){return 2===e?"{1}":""}function le(e,t,n){return 1===e?"{$<".concat(E.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ce(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,n){return 0===e&&t>1?"<".concat(E.getDimDefWithWrapper(n),">"):""}const de={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return E.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var s=o;void 0===s&&(s=E.getNumDimensions({properties:r,layout:i}));var c=l(r,"qHyperCubeDef.qDimensions",[]),u=E.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a,s){var l=se(t),c=le(t,n,r),u=""===l&&""===c?"":l||c,d=ce(i,o),f=ue(i,o,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=E.getDimDefWithWrapper(n);return t.join(", ")}(o);return s?"(If(".concat(e," < 0, null(), ").concat(e,"))/ Sum(").concat(u," ").concat(d).concat(f," Aggr(").concat(u," RangeMax( 0, ").concat(e,"), ").concat(p,"))"):"".concat(e,"/ Sum(").concat(u," ").concat(d).concat(f," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,f,s,n.primaryDimension,n.ignoreNegative)},initModifier:function(e){Object.keys(ae).forEach(function(t){void 0===e[t]&&(e[t]=ae[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ie(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(re(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(ie(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ie(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ie(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(re(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ie(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(re(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(ne))return!1;var o=re(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:se,getFieldSelectionComp:le,getTotalComp:ce,getSelectedDimComp:ue};var fe="library id deleted",pe="qDef.qDef",he="qDef.base.qDef",me="qLibraryId",ge="qDef.base.qLibraryId",ye="qDef.qLabel",be="qDef.qLabelExpression",ve="qDef.base.qLabel",xe="qDef.base.qLabelExpression",we="qDef.qAggrFunc",Se="qDef.base.qAggrFunc",ke="qDef.base";const Ce={getExpression:function(e){var t=l(e,he);return void 0!==t?t:l(e,pe)},getExpressionRef:function(e){return void 0!==l(e,he)?he:pe},getLibraryIdRef:function(e){return l(e,ge)?ge:me},getLibraryId:function(e){return l(e,ge)||l(e,me)},getLabelRef:function(e){return l(e,ke)?ve:ye},getLabelExpressionRef:function(e){return l(e,ke)?xe:be}};var Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(s(e,he,l(e,pe)),s(e,ge,l(e,me)),s(e,ve,l(e,ye)),s(e,xe,l(e,be)))},restoreBase:function(e){Ee.isValid(e)&&(s(e,pe,l(e,he)),s(e,me,l(e,ge)),s(e,ye,l(e,ve)),s(e,be,l(e,xe)),l(e,we)&&l(e,Se)&&s(e,we,l(e,Se)),delete e.qDef.base)},isValid:function(e){var t=l(e,he),n=l(e,ge);return void 0!==t||void 0!==n}};const Me=Ee;function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}var _e={accumulation:$,movingAverage:U,difference:te,normalization:de,timeSeriesDecomposition:J};const Ae={modifiers:_e,apply:Ie,applyModifiers:Te,cleanUpMeasure:De,destroy:function(e){e&&Pe[e.id]&&Pe[e.id].masterItemSubscriber&&(Pe[e.id].masterItemSubscriber&&Pe[e.id].masterItemSubscriber.unsubscribe(),delete Pe[e.id])},hasActiveModifiers:Oe,getActiveModifier:Ne,initBase:Me.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return _e[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return _e[e]&&_e[e].isApplicable({properties:n,layout:r})})},measureBase:Ce,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=je(e);We({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Xe({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:qe};var Pe={};function Ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,o=e.masterItem,s=!1;Pe[t.id]=Pe[t.id]||{isFirstTime:!0};var c=Pe[t.id].isFirstTime;if(Pe[t.id].isFirstTime=!1,n&&"object"===Re(n))return Te({model:t,properties:n});var u=t?t.layout:void 0,d=l(u,"qSelectionInfo.qInSelections");if(i||d)return Promise.resolve(s);var f=l(u,"qHyperCube.qMeasureInfo"),p=Pe[t.id].lastReloadTime;if(Pe[t.id].lastReloadTime=l(t,"app.layout.qLastReloadTime"),Oe({measures:f,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return l(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ve({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:t,lastReloadTime:p});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return We({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:o,isFirstTime:c})?t.getEffectiveProperties().then(function(e){var n=a()(!0,{},e);Fe(n);var r=Je(n);return Ue({model:t}).then(function(i){return Ge({libraryIds:r,model:t}).then(function(r){return h&&function(e){var t=e.properties;Le(t).forEach(function(e){return function(e){var t=e.measure;if(Ve({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Re(e)&&!e.disabled){if(n++,"object"!==Re(_e[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=_e[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&E.simplifyExpression(t.qDef.base.qDef)!==E.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:n}),Te({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:o,libraryItemsProps:r,dimensionAndFieldList:i})})}).catch(function(){return Promise.resolve(s)})}):Promise.resolve(s)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Re(e.base)})}(f)?t.getEffectiveProperties().then(function(e){return function(e){var t=e.model,n=e.properties,r=Je(n);return Qe({model:t,libraryIds:r}).then(function(){var e=a()(!0,{},n);return Le(n).forEach(function(e){return De(e)}),Ke({oldProperties:e,newProperties:n,model:t})})}({model:t,properties:e})}):Promise.resolve(s)}function Te(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,o=e.runUpdateIfChange,s=void 0!==o&&o,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=s?a()(!0,{},r):r),Fe(r);var f=Je(r);return Qe({model:t,libraryIds:f,masterItem:c}).then(function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,o=e.dimensionAndFieldList;if(t||(t=Le(n)),!t.length)return Promise.resolve();if(!i&&!Oe({measures:t,properties:n}))return t.forEach(function(e){return De(e)}),Promise.resolve();var s=i?void 0:Je(n);return Ue({model:r,dimensionAndFieldList:o}).then(function(e){return Ge({libraryIds:s,model:r,libraryItemsProps:i}).then(function(r){t.forEach(function(t){var i=t.qDef.modifiers;r&&We({modifiers:i,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,o=0;Me.isValid(t)||Me.initBase(t,!0);var s=t.qDef,c=s.modifiers,u=s.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Re(e)&&!e.disabled){if(o++,"object"!==Re(_e[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(o>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");_e[e.type].initModifier(e,t);var s=t.qLibraryId||u&&u.qLibraryId;s?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,o=e.libraryItemsProps[e.libraryId],s=o.qMeasure.qDef,l=""===s?s:_e[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||o.qMeasure.qLabel)&&(t.qDef.qLabel=t.qDef.base.qLabel||o.qMeasure.qLabel),(t.qDef.qLabelExpression||o.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=o.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&o.qMeasure.qNumFormat&&(t.qDef.qNumFormat=t.qDef.base.qNumFormat||o.qMeasure.qNumFormat,t.qDef.isCustomFormatted=o.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=o.qMeasure.coloring,n.base=a()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:s,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof _e[n.type].updateModifier&&_e[n.type].updateModifier(n,r.qHyperCubeDef);var o=Ce.getExpression(t),s=""===o?o:_e[n.type].generateExpression({expression:o,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||o,n.base=a()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=l(e,"qDef.qAggrFunc");"Expr"!==t||qe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&qe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}})}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),$e(t)):De(t)})})})}({measures:i,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return s?Ke({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)})}).catch(function(){return Promise.resolve(!1)})}function De(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some(function(e){return"object"===Re(e)&&!e.disabled&&!_e[e.type]})}(e)?Me.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,$e(e)}function Oe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return We({modifiers:je(e),properties:n,layout:r})})}function Ne(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(_e[r.type]&&!r.disabled)return r}}function qe(e){var t=Ne(e);return!t||_e[t.type].enableTotalsFunction(e)}function Le(e){return l(e,"qHyperCubeDef.qMeasures",[]).concat(l(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return l(e,"outputExpression.qValueExpression.qExpr")||l(e,"outputExpression")}function Fe(e){Le(e).forEach(function(e){return function(e){var t=Ne(e);t&&(void 0!==t.outputExpression&&ze(t)!==e.qDef.qDef?delete e.qDef.base:!Me.isValid(e)&&t.base&&(e.qDef.base=a()(!0,{},t.base)))}(e)})}function $e(e){var t=je(e);Array.isArray(t)&&t.forEach(function(t){"object"===Re(t)&&(t.disabled||!_e[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Be(e){return e.base||e.qDef&&e.qDef.base}function He(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ve(e){var t=e.measure,n=e.properties,r=e.layout;return!He(t)&&We({modifiers:je(t),properties:n,layout:r})}function We(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Re(e)||e.disabled||!_e[e.type])&&(void 0===i[e.type]&&(i[e.type]=_e[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ue(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ge(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a}).catch(function(){return null})}function Ye(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ke(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(l(t,"qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(l(n,"qHyperCubeDef.qMeasures"),Ye)||JSON.stringify(l(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(l(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&l(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):function(e,t,n){if(!e)return Promise.resolve();var r=q.generate(t,n);return a()(!0,t,n),r&&r.length?(r=r.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(r,!0)):Promise.resolve()}(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Xe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Re(e)&&!e.disabled&&_e[e.type]&&_e[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Je(e){var t=Le(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=je(t);if(We({modifiers:r,properties:e})){var o=He(t);o&&n.push(o),i=i||Xe({modifiers:r,properties:e})}}),l(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function Qe(e){var t=e.model,n=e.libraryIds,r=e.masterItem;return!r&&r!==fe&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Pe[t.id].masterItemSubscriber=Pe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){var t={},n=l(e,"qInfo.qType");return n&&a[n]&&a[n].forEach(function(n){t[n]=l(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=s(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(){Object.keys(r).forEach(function(e){i[e]||o[e]||(r[e].listener.dispose(),r[e].unbindCloseListnener(),delete r[e])})}var d=function(e,t){return e.once("closed",t),function(){return e.removeListener("closed",t)}};function f(e,i){return t.app[i](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),unbindCloseListnener:d(t,function(){return e=t.id,n(fe),delete r[e],void u();var e}),enabled:!1,properties:s(t.layout)}}).catch(function(){})}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),o={},t.forEach(function(e){o[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:a}),u(),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(f(e,"getMeasure"))}),Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(f(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose(),r[e].unbindCloseListnener()}),r={}}}}({model:t,callback:function(e){return Ie({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Pe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}for(var Ze in e.default=i.default,i)-1===["default"].indexOf(Ze)&&(e[Ze]=i[Ze]);Object.defineProperty(e,"__esModule",{value:!0})})()}(Lz)),Lz),zz=st(jz);const Fz="TOTAL_OFF",$z={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1}},Bz={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}},Hz=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)=>(!zz.hasActiveModifiers({measures:[e],properties:t.properties})||zz.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")}),Vz={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:Fm.Auto,translation:"Common.Auto"},{value:Fm.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:Fm.Pixels,translation:"Object.Table.Column.Pixels"},{value:Fm.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:Fm.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===Fm.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:"20",show:e=>e.qDef.columnWidth?.type===Fm.Percentage}},Wz=e=>({...$z,...e.flags.isEnabled("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?{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}]}]}]}}:{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}]}},...Bz,...Vz}),Uz=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:Fz,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:Fz,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!==Fz},{uses:"divider"}]},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}}),Gz=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:Hz(e)}},Yz=e=>({dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:Uz(e)},presentation:{type:"items",translation:"properties.presentation",items:{...Wz(e),...Oz(e)}}}}}),Kz=e=>({measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:Gz(e)},presentation:{type:"items",translation:"properties.presentation",items:{...Wz(e),...Nz(e,{[Az.Image]:!0,[Az.Indicator]:!0,[Az.MiniChart]:!0})}}}}}),Xz=e=>({...Yz(e),...Kz(e)}),Jz=e=>({type:"items",translation:"Common.Data",component:"tabs-component",items:{columns:{component:"data-assets-panel",ref:"columns",tabName:"properties.DataAssetPanel.Columns",items:{...Xz(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}}}),Qz=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),Zz=e=>Qz("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),eF={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}},tF=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")}),nF=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,i){const o=r?.(e,t,i)??!1,a=i.theme.current(),s=n(a,o);return{color:"transparent"===s?"none":s}}}),rF=(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},iF=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,n,r)=>{const i=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>rF(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...I(r).filter(e=>!a.includes(e)).map(e=>rF(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),oF=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],aF=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,i)=>{const o=i.theme.current();return((e,t,n)=>{const r=t.fontSize,i=t.fontSizes??[],o=Array.from(new Set([e,r,...i])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...o.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>rF(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...oF.filter(e=>!o.includes(e)).map(e=>rF(e,!1))];return[...a,...s.length>1?s:[]]})(t(o),o,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),sF=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:iF({ref:`${e}.fontFamily`,themeAccessor:t=>i(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:aF({ref:`${e}.fontSize`,themeAccessor:t=>i(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:nF(`${e}.fontColor`,void 0,t=>i(t,e,"color")??t.color)}},background:nF(`${e}.background`,"properties.background",(t,n)=>{const r=n?im.WHITE:im.TRANSPARENT;return i(t,e,"backgroundColor")??r},a)}}}}),lF=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:i,translation:o})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{nullValueText:i?Zz(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:nF(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:nF(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),cF=(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}},uF=e=>e.grid?.zebraStripes?.show,dF={ref:"content.rowHeight",component:"integer",placeholder:1,maxlength:4,translation:"ThemeStyleEditor.style.rowHeight",change(e){null!=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)}},fF=e=>e?.content?.hoverEffect,pF={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:fF,ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show:fF,ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}},hF=(e,t,{properties:n})=>"sn-table"===n.visualization&&!0===n.usePagination,mF=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),gF=({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:sF({section:"header",defaultFontStyle:["bold"],translator:t,flags:e,getThemeValue:cF,disableNoneCallback:hF}),dimensionValueSection:sF({section:"dimensionValues",translator:t,flags:e,getThemeValue:cF}),measureValueSection:sF({section:"measureValues",translator:t,flags:e,getThemeValue:cF}),totalRowSection:sF({section:"totalValues",defaultFontStyle:["bold"],translation:"properties.totals",translator:t,flags:e,getThemeValue:cF,disableNoneCallback:hF}),subTotalRowSection:e.isEnabled("TLV-2303-SUB-TOTALS")?sF({section:"subTotalValues",defaultFontStyle:["bold"],translation:"properties.subTotals",translator:t,flags:e,getThemeValue:cF,disableNoneCallback:hF}):void 0,...mF(e)?{dimensionNullSection:lF({section:"dimensionNullValues",fallbackBackground:im.NULL_VALUE_BACKGROUND,getThemeValue:cF,isNullValueText:!0}),nullValues:lF({section:"nullValues",translation:"properties.pivot.measureNullValues",fallbackBackground:im.NULL_VALUE_BACKGROUND,getThemeValue:cF,isNullValueText:!0})}:{nullValues:lF({section:"nullValues",fallbackBackground:im.NULL_VALUE_BACKGROUND,getThemeValue:cF,isNullValueText:!1})},grid:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{rowHeight:{show:()=>!0,...dF},border:nF("grid.border","properties.border",e=>e.object?.straightTableV2?.grid?.borderColor??im.BORDER_MEDIUM),divider:nF("grid.divider","properties.pivot.divider",e=>e.object?.straightTableV2?.grid?.divider?.borderColor??im.BORDER_HEAVY)}}}},hoverEffectSection:pF,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:uF,ref:"grid.zebraStripes.color.odd",translation:"properties.zebraStripes.color.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundrOdd:{show:uF,ref:"grid.zebraStripes.background.odd",translation:"properties.zebraStripes.background.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1},zebraStripesColorEven:{show:uF,ref:"grid.zebraStripes.color.even",translation:"properties.zebraStripes.color.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundEven:{show:uF,ref:"grid.zebraStripes.background.even",translation:"properties.zebraStripes.background.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1}}}}}}}]}),yF=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[gF(e),tF(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:Zz()]},...eF}}),bF={uses:"sorting"},vF={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},xF=e=>({type:"items",component:"accordion",items:{data:Jz(e),sorting:bF,addOns:vF,settings:yF(e)}});function wF(e){return{definition:xF(e),exploration:cz(e),data:Rz(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(e,t,n,r,i){const o={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return Zy({exportFormat:e,initialProperties:t,extension:n,hypercubePath:r,defaultPropertyValues:o,viewDataMode:i})},exportProperties:(e,t)=>Gy({propertyTree:e,hyperCubePath:t}),...e.flags.isEnabled("VNA-505_toggle_field_visibility")&&{propertyHandler:t=>new Sz(t,e.translator),usePropertyHandler:"sn-table-data"},migrate:_z(e)}}var SF,kF={exports:{}};
121
121
  /*!
122
122
  * CSSJanus. https://www.mediawiki.org/wiki/CSSJanus
123
123
  *
@@ -136,6 +136,6 @@ function wo(e,t){let n;return n=t?ro(e).withConfig({displayName:t.label,shouldFo
136
136
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
137
137
  * See the License for the specific language governing permissions and
138
138
  * limitations under the License.
139
- */var EF=(kF||(kF=1,function(e,t){var n;function r(e,t){var n=[],r=0;function i(e){return n.push(e),t}function o(){return n[r++]}return{tokenize:function(t){return t.replace(e,i)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),o)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",i="(?:[0-9]*\\.[0-9]+|[0-9]+)",o="(?: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])",c="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",u="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",d="(?:[_a-z0-9-]|"+n+"|"+u+")",f=i+"(?:\\s*"+o+"|-?(?:[_a-z]|"+n+"|"+u+")"+d+"*)?",p="((?:-?"+f+")|(?:inherit|auto))",h="((?:-?"+f+")|(?:inherit|auto)|(?:calc\\((?:(?:(?:\\(|\\)|\\t| )|(?:-?"+i+"(?:\\s*"+o+")?)|(?:\\+|\\-|\\*|\\/)){3,})\\)))",m="(#?"+d+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",g="(?:[!#$%&*-~]|"+n+"|"+u+")*?",y="(?![a-zA-Z])",b="(?!("+d+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",v="(?!"+g+s+"\\))",x="(?="+g+s+"\\))",w="(\\s*(?:!important\\s*)?[;}])",S=/`TMP`/g,k=/`TMPLTR`/g,C=/`TMPRTL`/g,E=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),M=new RegExp("("+c+b+"[^;}]+;?)","gi"),R=new RegExp("("+c+"[^\\}]*?})","gi"),_=new RegExp("("+a+")ltr","gi"),A=new RegExp("("+a+")rtl","gi"),P=new RegExp(l+"(left)"+y+v+b,"gi"),I=new RegExp(l+"(right)"+y+v+b,"gi"),T=new RegExp(l+"(left)"+x,"gi"),D=new RegExp(l+"(right)"+x,"gi"),O=/(:dir\( *)ltr( *\))/g,N=/(:dir\( *)rtl( *\))/g,q=new RegExp(l+"(ltr)"+x,"gi"),L=new RegExp(l+"(rtl)"+x,"gi"),j=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+w,"gi"),$=new RegExp("((?:-color|border-style)\\s*:\\s*)"+m+"(\\s+)"+m+"(\\s+)"+m+"(\\s+)"+m+w,"gi"),B=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+f+")","gi"),H=new RegExp("(background-position-x\\s*:\\s*)(-?"+i+"%)","gi"),V=new RegExp("(border-radius\\s*:\\s*)"+p+"(?:(?:\\s+"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?)?(?:(?:(?:\\s*\\/\\s*)"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?(?:\\s+"+p+")?)?"+w,"gi"),W=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+p,"gi"),U=new RegExp("(text-shadow\\s*:\\s*)"+p+"(\\s*)"+m,"gi"),G=new RegExp("(text-shadow\\s*:\\s*)"+m+"(\\s*)"+p,"gi"),Y=new RegExp("(text-shadow\\s*:\\s*)"+p,"gi"),K=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+p+"(\\s*\\))","gi"),X=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+p+"((?:\\s*,\\s*"+p+"){0,2}\\s*\\))","gi");function J(e,t,n){var r,i;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(i=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(i)+"%"):n=100-parseFloat(n)+"%"),t+n}function Q(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 Z(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter(function(e){return e}),i=n.slice(6,10).filter(function(e){return e}),o=n[10]||"";return t+(i.length?Q(r)+" / "+Q(i):Q(r))+o}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,i){return t+n+ee(r)+i}function re(e,t,n,r,i){return t+n+r+ee(i)}return{transform:function(n,i){var o=new r(M,"`NOFLIP_SINGLE`"),a=new r(R,"`NOFLIP_CLASS`"),s=new r(E,t);return n=s.tokenize(a.tokenize(o.tokenize(n.replace("`","%60")))),i.transformDirInUrl&&(n=n.replace(O,"$1`TMPLTR`$2").replace(N,"$1`TMPRTL`$2").replace(q,"$1"+e).replace(L,"$1ltr").replace(S,"rtl").replace(k,"ltr").replace(C,"rtl")),i.transformEdgeInUrl&&(n=n.replace(T,"$1"+e).replace(D,"$1left").replace(S,"right")),n=n.replace(_,"$1"+e).replace(A,"$1ltr").replace(S,"rtl").replace(P,"$1"+e).replace(I,"$1left").replace(S,"right").replace(j,"$1$2"+e).replace(z,"$1$2e-resize").replace(S,"w-resize").replace(V,Z).replace(W,te).replace(U,re).replace(G,re).replace(Y,te).replace(K,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=o.detokenize(a.detokenize(s.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var i;return"object"==typeof t?i=t:(i={},"boolean"==typeof t&&(i.transformDirInUrl=t),"boolean"==typeof r&&(i.transformEdgeInUrl=r)),n.transform(e,i)}:"undefined"!=typeof window&&(window.cssjanus=n)}(CF,CF.exports)),CF.exports),MF=st(EF),RF="comm",_F="rule",AF="decl",PF=Math.abs,IF=String.fromCharCode;function TF(e){return e.trim()}function DF(e,t,n){return e.replace(t,n)}function OF(e,t){return 0|e.charCodeAt(t)}function NF(e,t,n){return e.slice(t,n)}function qF(e){return e.length}function LF(e,t){return t.push(e),e}var jF=1,zF=1,FF=0,$F=0,BF=0,HF="";function VF(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:jF,column:zF,length:a,return:"",siblings:s}}function WF(){return BF=$F>0?OF(HF,--$F):0,zF--,10===BF&&(zF=1,jF--),BF}function UF(){return BF=$F<FF?OF(HF,$F++):0,zF++,10===BF&&(zF=1,jF++),BF}function GF(){return OF(HF,$F)}function YF(){return $F}function KF(e,t){return NF(HF,e,t)}function XF(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 JF(e){return TF(KF($F-1,e$(91===e?e+2:40===e?e+1:e)))}function QF(e){for(;(BF=GF())&&BF<33;)UF();return XF(e)>2||XF(BF)>3?"":" "}function ZF(e,t){for(;--t&&UF()&&!(BF<48||BF>102||BF>57&&BF<65||BF>70&&BF<97););return KF(e,YF()+(t<6&&32==GF()&&32==UF()))}function e$(e){for(;UF();)switch(BF){case e:return $F;case 34:case 39:34!==e&&39!==e&&e$(BF);break;case 40:41===e&&e$(e);break;case 92:UF()}return $F}function t$(e,t){for(;UF()&&e+BF!==57&&(e+BF!==84||47!==GF()););return"/*"+KF(t,$F-1)+"*"+IF(47===e?e:UF())}function n$(e){for(;!XF(GF());)UF();return KF(e,$F)}function r$(e){return function(e){return HF="",e}(i$("",null,null,null,[""],e=function(e){return jF=zF=1,FF=qF(HF=e),$F=0,[]}(e),0,[0],e))}function i$(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,g=1,y=1,b=0,v=0,x="",w=i,S=o,k=r,C=x;g;)switch(h=v,v=UF()){case 40:108!=h&&58==OF(C,d-1)?(b++,C+="("):C+=JF(v);break;case 41:b--,C+=")";break;case 34:case 39:case 91:C+=JF(v);break;case 9:case 10:case 13:case 32:if(b>0){C+=IF(v);break}C+=QF(h);break;case 92:C+=ZF(YF()-1,7);continue;case 47:switch(GF()){case 42:case 47:LF(a$(t$(UF(),YF()),t,n,l),l),5!=XF(h||1)&&5!=XF(GF()||1)||!qF(C)||" "===NF(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[c++]=qF(C)*y;case 125*m:case 59:case 0:if(b>0&&v){C+=IF(v);break}switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(C=DF(C,/\f/g,"")),p>0&&(qF(C)-d||0===m)&&LF(p>32?s$(C+";",r,n,d-1,l):s$(DF(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(LF(k=o$(C,t,n,c,u,i,s,x,w=[],S=[],d,o),o),123===v)if(0===u)i$(C,t,k,k,w,o,d,s,S);else{switch(f){case 99:if(110===OF(C,3))break;case 108:if(97===OF(C,2))break;default:u=0;case 100:case 109:case 115:}u?i$(e,k,k,r&&LF(o$(e,k,k,0,0,i,s,x,i,w=[],d,S),S),i,S,d,s,r?w:S):i$(C,k,k,k,[""],S,0,s,S)}}c=u=p=0,m=y=1,x=C="",d=a;break;case 58:d=1+qF(C),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==WF())continue;switch(C+=IF(v),v*m){case 38:y=u>0?1:(C+="\f",-1);break;case 44:if(b>0)break;s[c++]=(qF(C)-1)*y,y=1;break;case 64:45===GF()&&(C+=JF(UF())),f=GF(),u=d=qF(x=C+=n$(YF())),v++;break;case 45:45===h&&2==qF(C)&&(m=0)}}return o}function o$(e,t,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,p=0===i?o:[""],h=function(e){return e.length}(p),m=0,g=0,y=0;m<r;++m)for(var b=0,v=NF(e,f+1,f=PF(g=a[m])),x=e;b<h;++b)(x=TF(g>0?p[b]+" "+v:DF(v,/&\f/g,p[b])))&&(l[y++]=x);return VF(e,t,n,0===i?_F:s,l,c,u,d)}function a$(e,t,n,r){return VF(e,t,n,RF,IF(BF),NF(e,2,-2),0,r)}function s$(e,t,n,r,i){return VF(e,t,n,AF,NF(e,0,r),NF(e,r+1,-1),r,i)}function l$(e,t,n){switch(e.type){case"@import":case AF:case RF:return e.return=e.return||e.value;case _F:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(e){e.type===RF&&(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),l$);return qF(r)?e.return=e.value+"{"+r+"}":""}function c$(e,t,n,r){if("@keyframes"===e.type||"@supports"===e.type||e.type===_F&&(!e.parent||"@media"===e.parent.type||e.parent.type===_F)){var i=MF.transform(l$(e));e.children=i?r$(i)[0].children:[],e.return=""}}Object.defineProperty(c$,"name",{value:"stylisRTLPlugin"});const u$=qE(({options:e,...t})=>Rg(wm(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);let d$=class{#b={on:new Map,once:new Map};#v=10;#x(e){this.listenerCount(e)>this.#v&&console.warn(`Possible EventEmitter memory leak detected. ${this.listenerCount(e)} listeners added to "${String(e)}".`)}#w(e,t,n){const r=this.#b[e].get(t)??new Set;r.add(n),this.#b[e].set(t,r),this.#x(t)}setMaxListeners(e){this.#v=e}on(e,t){this.#w("on",e,t)}once(e,t){this.#w("once",e,t)}off(e,t){this.#b.on.get(e)?.delete(t),this.#b.once.get(e)?.delete(t)}emit(e,...t){this.#b.on.get(e)?.forEach(e=>{e(...t)}),this.#b.once.get(e)?.forEach(e=>{e(...t)}),this.#b.once.delete(e)}listenerCount(e){return(this.#b.on.get(e)?.size??0)+(this.#b.once.get(e)?.size??0)}removeAllListeners(e){void 0===e?(this.#b.on.clear(),this.#b.once.clear()):(this.#b.on.delete(e),this.#b.once.delete(e))}};const f$=Rg(()=>new d$);let p$=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),h$=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}({}),m$=function(e){return e.A="ascending",e.D="descending",e}({}),g$=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const y$=[0,0],b$=e=>"number"==typeof e&&!Number.isNaN(+e),v$=e=>b$(e.qNum),x$=e=>"string"==typeof e&&e.length>0&&!Number.isNaN(+e),w$=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),S$=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},k$=(e,t,n)=>{const r={previousColor:(i=e.localPaletteColors)[(o=t)-(o>0?1:0)],nextColor:i[o+(o<i.length-1?1:0)]};var i,o;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,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===o.value?1:(r-a.value)/(o.value-a.value);return a.gradient&&o.gradient?r-a.value<o.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:o.gradient?{color:l.color,t:c/2}:{color:i.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return h(e.localPaletteColors[t].color??"").blend(h(s.color??""),s.t)},C$=(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:w$(t,e.value)}))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map((e,t)=>({color:S$(r,t,n)}))),r},E$=(e,t,n,r)=>{const i=C$(e,n,r),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:i,localPaletteColors:o}=e;for(let a=0;a<o.length;a++){const o=i&&i[a]?i[a].value:1;if(t>=r&&t<o){n=k$(e,a,t);break}r=o}return n})(i,t);return a},M$=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!b$(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||!b$(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)},R$=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=M$(e,t),i=Math.abs(t);return{min:n??t-i,max:r??t+i}})(n,t),i=((e,t,n)=>{const{limits:r,paletteColors:i,localPaletteColors:o}=e.segments;if(!r||!b$(t))return 0;let a=n&&b$(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=i||o;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:i}},_$=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=R$(i,t),a=((e,t,n,r)=>{const{segments:i}=e;if(!i||!n)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,n.limitPaletteColorIndex))return S$(i,n.limitPaletteColorIndex,r);const a=w$(n.limitRange,t);return E$(i,a,n.limitRange,r)})(i,t,o,r),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},A$=(tm().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)"),P$=4/3,I$="12px",T$="600",D$="Source Sans Pro, sans-serif",O$={height:"auto",fontSize:I$,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"}},N$={"<i>":{fontStyle:"italic"},"<b>":{fontWeight:T$},"<u>":{textDecoration:"underline"},"<s>":{textDecoration:"line-through"}},q$=(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,L$=(e,t)=>e.representation.type===Pz.Image&&"fitHeight"===e.representation.imageSize?q$(t,e.representation):e.align,j$=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",z$=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},F$=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,$$=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",B$=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",H$=24,V$=ic("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0})),W$=ic(ld,{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?j$(e,r):void 0})),U$=ic(ld,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})(({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:n})=>{const r=e?"24px":"";let i;switch(n){case"left":i={gridTemplateColumns:t?`20px 2fr ${r}`:`1fr ${r}`};break;case"center":{const n=e||t;i={gridTemplateColumns:n?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:n?2:1},[`& .${Dm}`]:{gridColumn:3}};break}case"right":i={gridTemplateColumns:t?`${r} 2fr 20px`:`${r} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${Dm}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...i}}),G$=ic(ld,{shouldForwardProp:e=>"rightAligned"!==e})(({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})),Y$=ic(ld,{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"})),K$=ic(bu,{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})),X$=Rg(),J$=Rg(0),Q$=Rg(0),Z$=e=>parseInt(e??O$.fontSize,10)*P$,eB=4/3,tB=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function nB(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const rB=(e,t)=>e?{borderBottomColor:im.DARK_MODE_BORDER,borderRightColor:im.DARK_MODE_BORDER,borderLeftColor:im.DARK_MODE_BORDER,borderTopColor:im.DARK_MODE_BORDER}:{borderLeftColor:im.BORDER_MEDIUM,borderRightColor:im.BORDER_MEDIUM,borderTopColor:im.BORDER_HEAVY,borderBottomColor:t?im.BORDER_HEAVY:im.BORDER_LIGHT},iB=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*eB+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},oB=e=>e.components?.find(e=>"theme"===e.key),aB=(e,t,n,r=!1)=>{const i=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),o=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:i,color:tB(n?.fontColor)?nB(im.TEXT,t,n?.fontColor):o||im.TEXT,fontSize:n?.fontSize&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...rB(t.background.isDark,r)};return Object.keys(s).forEach(e=>{const t=e;null==s[t]&&delete s[t]}),s};function sB(e,t,n){const r=oB(e)?.header,i=aB("header",t,r,n);return i.background=(e=>{if(void 0===e)return;const t=h(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),i.hoverBackground=sm(i.background??im.WHITE,$m),i.activeBackground=sm(i.background??im.WHITE,Bm),i}const lB=(e,t)=>{const n=e.toLowerCase().match(/<[^>]+>/g)??[];return n.forEach(e=>(e=>e in N$)(e)&&Object.assign(t,N$[e])),t};function cB(e,t,n){const r={};let i={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return t?.qValues?.forEach((e,t)=>{const o=e.qText,a=o&&cm(o);a&&(r[n[t]]=a),i=o?lB(o,i):i}),r.cellBackgroundColor&&!r.cellForegroundColor&&(r.cellForegroundColor=om(r.cellBackgroundColor)),{...e,...r,color:r.cellForegroundColor||e.color,background:r.cellBackgroundColor||e.background,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textDecoration:i.textDecoration}}const uB=25e4,dB=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,fB=5e6,pB=5e5;const hB={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,i="",o=!1;-1===n?r=e:(r=e.slice(0,n),i=e.slice(n+1),o=!0),t.push(function(e,t,n){return{key:mB(e),value:mB(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,i,o))}),t}};function mB(e){try{return decodeURIComponent(e)}catch{return e}}function gB(e){if(!(this instanceof gB))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:()=>hB.fromSearchString(t.search)}})}function yB(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")}gB.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},gB.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=yB(t.key),t.value?n+=`=${yB(t.value)}`:n+=t.useEqualSign?"=":"";return n};var bB=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}},vB=class{decode(e){let t="";const n=new bB(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const xB=e=>e>=0&&e<=1114111,wB=e=>e.match(/[\s]/);var SB=class extends vB{decodeCharacter(e){e.mark();const t=e.next();let n,r,i;if(null==t||"\\"!==t)return e.reset(),null;const o=e.next();if(null==o)return e.reset(),null;switch(o){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(o,16))return o;for(n=o,r=0;r<5&&(i=e.next(),null!=i&&!wB(i));r++){if("NaN"===parseInt(i,16)){e.pushback(i);break}n+=i}const a=parseInt(n,16);return xB(a)?String.fromCharCode(a):"�"}},kB=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}},CB=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.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 kB.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return kB.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||kB.newInstanceIfNeeded(e,t,this._value)}},EB=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 CB);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const MB=(()=>{const e=[],t=[],n=new EB;let r,i,o;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="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["&notin"]="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(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)));return n})();var RB=class extends vB{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,i="";for(t=Math.min(e.remainder().length,MB.getMaxKeyLength()),r=0;r<t;r++)i+=e.next().toLowerCase();const o=MB.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),o.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)&&xB(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)&&xB(r)?String.fromCharCode(r):null}},_B=class extends vB{decodeCharacter(e){e.mark();const t=e.next();let n,r,i,o;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)i=e.nextHex(),null!=i&&(n+=i);return 2===n.length&&(o=parseInt(n,16),xB(o))?String.fromCharCode(o):(e.reset(),null)}};let AB;"undefined"!=typeof document&&(AB=document.createElement("div"));const PB=Array.prototype.indexOf,IB=[",",".","_"," "],TB=[",",".","-","_"," "],DB={width:["%"],height:["%"]},OB={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},NB={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":OB.image,"background-color":OB.color,"border-color":OB.color,"border-image":OB.image,color:OB.color,icon:OB.image,"list-style-image":OB.image,"outline-color":OB.color},qB={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function LB(e,t,n){let r;if(t){if(PB)return PB.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 jB(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return AB.appendChild(n),t=AB.innerHTML,AB.removeChild(n),t}function zB(e,t,n){let r,i,o,a,s,l,c,u,d;for(e=$B(e).toLowerCase(),t=$B(t),o=0;o<qB.attr_name.length;o++)if(e.match(qB.attr_name[o]))throw new Error(`Unsafe attribute name used: ${e}`);for(o=0;o<qB.attr_val.length;o++)if(t.toLowerCase().match(qB.attr_val[o]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=DB[e],r||(r=TB),i="",!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");i+=s}i+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&LB(c,r)<0?(d=u.toString(16),i+=`&#x${d};`):i+=c;return n||(i+='"'),i}function FB(e,t,n){let r,i,o,a,s,l,c,u,d,f;if(e=$B(e).toLowerCase(),t=$B(t),LB(e,qB.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<qB.css_val.length;r++)if(t.toLowerCase().indexOf(qB.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(i=NB[e],i||(i=OB.default),o="",!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");o+=s}o+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&LB(c,i)<0?(d=u.toString(16),f="000000".substr(d.length),o+=`\\${f}${d}`):o+=c;return o}function $B(e,t){let n,r,i,o,a=!1;if(null===e)return null;n=e,r=e,i=0;const s=[new RB,new _B,new SB];for(;!a;){r=n;for(let e=0;e<s.length;e++)o=s[e].decode(n),o!==n&&(i++,n=o);r!==n||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const BB=[];for(let e=0;e<255;e++)BB[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const HB={html:e=>jB(e.unsafe),css(e){let t,n=[];const r=[],i={};let o="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=FB(t,n[t],!0),o+=FB(t,n[t],!0),i[t]=r[t]);return e.map?i:o},attr(e){let t=[];const n=[],r={};let i="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=zB(e,t[e],!0),i+=zB(e,t[e],!0),r[e]=n[e]);return e.map?r:i}};function VB(e,t){throw new Error(t)}var WB={canonicalize:$B,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 i=1;const o=arguments.length;for(;i<o;i++)if(null!=(e=arguments[i]))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?HB.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&VB(this,"Invalid parameter type"),HB.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&VB(this,"Invalid parameter type"),HB.attr(e)):void VB(this,"Invalid parameter type")},encodeForAttr:zB,encodeForAttr2:function(e){return zB("nonsens",e,!0)},encodeForCSS:FB,encodeForHref:function(e){$B(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new gB(e),n=gB.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+gB.encodeSearchParams(r)+t.hash;const i=decodeURI(e).toLowerCase();if(-1!==i.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==i.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,i,o,a,s;for(t||(t=IB),s="",n=0;n<e.length;n++)i=e.charAt(n),o=e.charCodeAt(n),LB(i,t)>=0||null==BB[o]?s+=i:(r=o.toString(16),o<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:jB,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=$B(t).toLowerCase():VB(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=pB,maxByteSizeImage:r=fB}=t??{},{mimeType:i,encoding:o,data:a}=(e=>{const[,t,n,r]=dB.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})(i,o,a);return"image/svg+xml"===i?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 UB=(e,t)=>t.qAttrExps?.qValues?.[e],GB=(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"}}},YB=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:i,imageBox:o,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!WB.isSafeDataURL(t))?{type:Pz.Text,url:void 0,text:e,labelStructure:i}:{type:Pz.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:GB(r,a),labelStructure:i,imageBox:o},KB=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:Pz.Text,text:r};const{minY:i,maxY:o}=((e,t,n)=>{const r="global"===t.yAxis?.scale,i="zeroCenter"===t.yAxis?.position,o=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(i){const e=Math.max(Math.abs(o),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,o),maxY:Math.max(0,a)}:{minY:o,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:i,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:Pz.MiniChart,text:r,miniChart:a}},XB=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=r?.qValues?.[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return n?.urlPosition===Iz.Attribute?void 0:n?.urlLabel},JB=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:Pz.Link,url:WB.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:Pz.Text,url:void 0,text:t,labelStructure:e}}},QB=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:c})=>{const u=Tz(t),d=s(e);return u===Pz.Image&&c[Pz.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,i,o)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=UB(n.imageUrl??-1,e)?.qText;return o&&(o.maskedValue=t??""),YB({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:u,direction:i})}if("label"===l){const t=o?o.originalValue:r;if(-1===n.imageLabel)return YB({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:u,direction:i});const l=UB(n.imageLabel??-1,e)?.qText??r;return YB({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:u,direction:i})}return{type:Pz.Text,url:void 0,labelStructure:o,text:r}})(e,t,n,d,l,a):u===Pz.Link?((e,t,n,r,i)=>{const{urlPosition:o}=t??{};if(o===Iz.Attribute){const o=XB(n.url??-1,e,t);return JB({labelStructure:r,text:i||o||"",url:o})}if(o===Iz.Dimension){const o=XB(n.urlLabel??-1,e,t)||i;return r&&(r.maskedValue=o),JB({text:o,labelStructure:r,url:r?.originalValue??i})}return{type:Pz.Text,url:void 0,text:i,labelStructure:r}})(e,t,n,a,d):u===Pz.Indicator&&c[Pz.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:Pz.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,i,d):u===Pz.MiniChart&&c[Pz.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?KB(e,t,o,d):{type:Pz.Text,url:void 0,text:d,labelStructure:a}},ZB=Rg(e=>{const t=e(yy),n=e(ey);return e(ty),{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}}),eH=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),tH=({cId:e})=>e??xz(),nH=1e4;function rH(e,t){return[...t].reverse().find(t=>t*e<=nH)||Math.floor(nH/e)}function iH(e,t){if(t?.skipTotals)return{atTop:!1,atBottom:!1};const n=e.qHyperCube.qDimensionInfo.length>0,r=e.qHyperCube.qMeasureInfo.length>0,i=e.qHyperCube.qGrandTotalRow.length>0,o=e.totals?.show,a=e.totals?.position;if(i&&(n&&r||!o&&!n)){if(o||"top"===a)return{atTop:!0,atBottom:!1};if("bottom"===a)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function oH(e,t,n,r){return t?0===n?e.totals?.label??"":"":e.qHyperCube.qGrandTotalRow.at(r)?.qText??""}function aH(e,t){const n=e.qHyperCube.qGrandTotalRow.at(t);return b$(n?.qNum)}function sH(e,t,n,r,i){return e&&!e.auto?r&&"rtl"===i&&"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"!==i?{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 lH=(e,t,n,r)=>"auto"!==t?t:r||"rtl"!==n?e?"right":"left":e?"left":"right",cH=(e,t)=>{if(!e)return;const{background:n,foreground:r}=e,i=h(n??""),o=h(r??""),a=t?"getRGB":"getRGBA",s=i.isInvalid()?void 0:i[a](),l=s?sm(s,$m):void 0,c=s?sm(s,Bm):void 0;return o.isInvalid()&&void 0!==s?{background:s,color:om(s),headerMenuHoverBackground:l,headerMenuActiveBackground:c}:{background:s,color:o.isInvalid()?void 0:o.getRGBA(),headerMenuHoverBackground:l,headerMenuActiveBackground:c}};const uH=(e,t,n,r=()=>!1)=>{const{qHyperCube:{qColumnOrder:i,qDimensionInfo:o,qMeasureInfo:a}}=e,s=o.length+a.length,l=((e,t,n)=>{const r=t.length,{visible:i,hiddenDim:o,hiddenMea:a}=e.reduce((e,i)=>{const o=i<r,{qError:a}=o?t[i]:n[i-r];return 7005===a?.qErrorCode?o?e.hiddenDim.push(i):e.hiddenMea.push(i):e.visible.push(i),e},{visible:[],hiddenDim:[],hiddenMea:[]});return i.map((e,t)=>{const n=e<r,i=(n?o:a).filter(t=>t<e).length,s=e-i;return{colIdx:e,pageColIdx:t,visibleDimInfoIdx:n?s:void 0,visibleMeasureInfoIdx:n?void 0:s-r}})})(i.length===s?i:Array.from(Array(s).keys()),o,a);return l.map(i=>function(e,t,n,r,i=()=>!1){const{qDimensionInfo:o,qMeasureInfo:a,qEffectiveInterColumnSortOrder:s}=e.qHyperCube,{colIdx:l,pageColIdx:c,visibleDimInfoIdx:u,visibleMeasureInfoIdx:d}=t,f=o.length,p=l<f,h=p?o[l]:a[l-f],m=p&&o[l].qGrouping===Hm.Cyclic,g=l===s[0];let y,b,v="",x=!1,w=-1,S=0,k=[];const{representation:C,conditionalColoring:E}=h;if(p&&void 0!==u){const e=h;v=e.qGroupFieldDefs[e.qGroupPos],S=e.qGroupPos,k=e.qGroupFallbackTitles,x=e.qLocked??!1,w=u,({qDimensionType:y}=e)}else({qMiniChart:b}=h);const{qFallbackTitle:M,textAlign:R,qAttrExprInfo:_,qSortIndicator:A,qReverseSort:P,qApprMaxGlyphCount:I,columnWidth:T,qLibraryId:D,headerColor:O}=h;return{isDim:p,isCyclic:m,isLocked:x,fieldId:v,colIdx:l,qLibraryId:D,pageColIdx:c,qApprMaxGlyphCount:I,qReverseSort:P,columnWidth:T??{type:Fm.Auto},selectionColIdx:w,isActivelySorted:g,id:tH(h),label:M??"",groupDimensionPos:S,groupDimensionLabels:k,qAttrExprInfoIDs:_.map(e=>e.id),qAttrExprInfoIndex:eH(h),sortDirection:A&&"N"!==A?A:"A",totalInfo:oH(e,p,c,d??-1),...!p&&{isTotalNumeric:aH(e,d??-1)},...sH(R,y,p,n,r),representation:C,conditionalColoring:p?void 0:E,qMiniChart:b,headerColor:i("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?cH(O,n):void 0}}(e,i,t,n,r))},dH=(e,t,n,r)=>e?(r?n.nullValueRepresentation?.dimensionText:void 0)??t.qText??"-":n.nullValueRepresentation?.text??t.qText??"-",fH=(e,t)=>t?-2===e.qElemNumber:!!e.qIsNull,pH={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},hH=Rg(e=>{const t=e(mH),n=e(Yg),r=e(ZB),i=n.qHyperCube.qSize.qcy,o=r.visibleHeight??t.rowsPerPage,a=r.visibleTop??t.page*o,s=r.visibleHeight??Math.min(o,i-a),l=n.qHyperCube.qSize.qcx;return t.page>0&&a>=i?{...t,page:0}:s*l>nH?{...t,rowsPerPage:rH(l,t.rowsPerPageOptions),page:0}:t}),mH=Rg(pH),gH=Rg(e=>{const t=e(Yg),n=e(yy),r=e(ZB);return py(t,n)?{page:r.page||pH.page,rowsPerPage:r.rowsPerPage||pH.rowsPerPage,rowsPerPageOptions:pH.rowsPerPageOptions}:e(hH)},(e,t,n)=>{t(mH,e=>({...e,...n}))}),yH=!0,bH=e=>-1===e.qElemNumber||!!e.qIsTotalCell,vH=Rg(async e=>{const t=e(Yg),n=e(yy),r=e(my),{page:i,rowsPerPage:o}=e(gH),a=e(ZB),s=e(Sy),l=e(Wg),c=e(Xg),u=e(Ug),d=t.qHyperCube.qSize.qcx,f=t.qHyperCube.qSize.qcy,p=Math.ceil(f/o),h=a.visibleTop??i*o,m=a.visibleHeight??Math.min(o,f-h),g=f>10,y=iH(t,n),b=uH(t,yH,r,u),v=l.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),x=await(async(e,t,n)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const r=t.qHyperCube.qDataPages.at(0),i=r?.qArea;return r&&i?.qLeft===n.qLeft&&i.qTop===n.qTop&&i.qWidth===n.qWidth&&i.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});c||(a.qTop=h,a.qHeight=m,a.rowsPerPage=o,a.page=i);const w=x.at(0)?.qMatrix.map((e,n)=>{const i=[],o=e.some(bH);return b.forEach((a,s)=>{const c=e[s],u=!a.isDim&&c.qIsNull,d=a.isDim&&fH(c,a.isDim),f=u||d?dH(a.isDim,c,t,v):c.qText,p=u?x$(f):v$(c),g=v$(c)&&!x$(c.qText??"");i[s]={id:xz(),...c,align:lH(p,a.bodyTextAlign,r,yH),rowIdx:n+h,colIdx:a.colIdx,pageRowIdx:n,pageColIdx:s,selectionColIdx:a.selectionColIdx,isSelectable:a.isDim&&!a.isLocked&&!o,isTotalRow:o,isLastRow:n===m-1,isNumeric:p,isDual:g,isNull:(!u||!p)&&fH(c,a.isDim),representation:QB({cell:c,representationProperties:a.representation,attrExprInfoIndex:a.qAttrExprInfoIndex,env:l,conditionalColoring:a.conditionalColoring,miniChartOnMeasure:a.qMiniChart,getText:()=>f,direction:r,enabledFeatures:{[Pz.Image]:!0,[Pz.Indicator]:!0,[Pz.MiniChart]:!0}})}}),i})??[];return{totalColumnCount:d,totalRowCount:f,totalPages:p,paginationNeeded:g,totalsPosition:y,columns:b,rows:w}}),xH=_E(vH,e=>e),wH=Rg(e=>{const t=e(Yg),n=e(yy),r=e(sy),i=e(my),o=e(Ug),a=uH(t,false,i,o),s=iH(t,n),l=t.qHyperCube.qSize.qcy,c=Math.min(uB,l),u=l>uB&&!!r.active;return{totalsPosition:s,columns:a,rows:[],totalRowCount:l,totalColumnCount:t.qHyperCube.qSize.qcx,totalPages:Math.ceil(l/c),paginationNeeded:u}}),SH={totalsPosition:{atTop:!1,atBottom:!1},columns:[],rows:[],totalRowCount:0,totalColumnCount:0,totalPages:0,paginationNeeded:!1},kH=Rg(),CH=Rg(e=>{const t=e(vy),n=e(kH);return n||(t?e(xH)??SH:e(wH))}),EH=Rg(e=>e(CH).totalsPosition),MH=Rg(e=>e(CH).columns),RH=Rg(e=>e(MH).length),_H=Rg(e=>e(CH).rows),AH=Rg(e=>e(CH).totalRowCount),PH=Rg(e=>e(CH).totalColumnCount),IH=Rg(e=>e(CH).paginationNeeded),TH=Rg(e=>{const t=e(_y),n=e(Iy),r=e(Yg),i=e(EH),o=e(_H),a=i.atTop,s=function(e,t,n,r){const i=oB(e)?.content,o=aB("content",t,i);o.background=t.background.color;const a=iB(o.fontSize,n,r),s=i?.hoverColor,l=i?.hoverFontColor,c=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),u=t.getStyle("object","","straightTableV2.content.hover.color"),d=tB(l)||!!u,f=tB(s)||!!c,p=d||f;let h;h=tB(s)?nB(im.HOVER,t,s):c||(d?"":im.HOVER);const m=p?nB(om(h),t,l):"";return{...o,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(r,n,o.length,t),l=sB(r,n,!a),c=function(e,t,n){const r=oB(e)?.content,i=aB("content",t,r),{borderBottomColor:o,borderTopColor:a,background:s}=sB(e,t,n);return{...i,borderBottomColor:o,background:s,borderTopColor:a}}(r,n,a);return{body:s,head:l,totals:c}}),DH=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},OH=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:i}=e.background,o=DH(e,t?.background),a=e.getStyle("","",n);return{backgroundColor:o||r||a,backgroundFromStyling:o,sheetColorFromCSS:i}},NH=(e,t,n,r=im.WHITE)=>{const{backgroundColor:i,backgroundFromStyling:o,sheetColorFromCSS:a}=OH(e,t,n);return hm(o,i,a,r)??r},qH=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return I$}},LH=e=>e?.some(e=>"italic"===e)?"italic":"normal",jH=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?T$:"normal",zH=e=>!1===e?1:3,FH=e=>e?.some(e=>"underline"===e)?"underline":"none",$H=Rg(e=>{const t=e(yy),n=e(vy),r=e(Iy),i=e(Yg),o=e(TH),a=e(Ug),{header:s,dimensionValues:l,measureValues:c,totalValues:u,subTotalValues:d,nullValues:f,dimensionNullValues:p,grid:h,content:m}=oB(i)??{},g=a("VNA-670-SEPARATE_NULL_VALUE_STYLING"),y=n?im.WHITE:im.TRANSPARENT,b=NH(r,s,"object.straightTableV2.dimension.label.name.backgroundColor",y),v=t?.maxLineCount??m?.rowHeight??r.getStyle("object.straightTableV2","grid","lineClamp"),x=(g?p:void 0)??f;return{header:{fontFamily:s?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.name","fontFamily")??o.head.fontFamily??D$,fontSize:qH(s?.fontSize??r.getStyle("object.straightTableV2.dimension","label.name","fontSize")??o.head.fontSize),fontStyle:LH(s?.fontStyle),fontWeight:jH(s?.fontStyle,T$),textDecoration:FH(s?.fontStyle),color:DH(r,s?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.name","color")??o.head.color??im.TEXT,background:b},headerMenuHoverBackground:sm(b,$m),headerMenuActiveBackground:sm(b,Bm),dimension:{values:{fontFamily:l?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??o.body.fontFamily??D$,fontSize:qH(l?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.dimension","label.value","fontSize")??o.body.fontSize),fontStyle:LH(l?.fontStyle),fontWeight:jH(l?.fontStyle,"normal"),textDecoration:FH(l?.fontStyle),color:DH(r,l?.fontColor)??DH(r,m?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.value","color")??o.body.color??im.TEXT,background:OH(r,l,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??o.body.background??im.TRANSPARENT}},measure:{values:{fontFamily:c?.fontFamily??r.getStyle("object.straightTableV2.measure","label.value","fontFamily")??o.body.fontFamily??D$,fontSize:qH(c?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.measure","label.value","fontSize")??o.body.fontSize),fontStyle:LH(c?.fontStyle),fontWeight:jH(c?.fontStyle,"normal"),textDecoration:FH(c?.fontStyle),color:DH(r,c?.fontColor)??DH(r,m?.fontColor)??r.getStyle("object.straightTableV2.measure","label.value","color")??o.body.color??im.TEXT,background:OH(r,c,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??o.body.background??im.TRANSPARENT}},totalRow:{fontFamily:u?.fontFamily??r.getStyle("object.straightTableV2.total","label.value","fontFamily")??o.totals.fontFamily??D$,fontSize:qH(u?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.total","label.value","fontSize")??o.totals.fontSize),fontStyle:LH(u?.fontStyle),fontWeight:jH(u?.fontStyle,T$),textDecoration:FH(u?.fontStyle),color:DH(r,u?.fontColor)??DH(r,m?.fontColor)??r.getStyle("object.straightTableV2.total","label.value","color")??o.totals.color??im.TEXT,background:NH(r,u,"object.straightTableV2.total.label.value.backgroundColor",y)},subTotalRow:{fontFamily:d?.fontFamily??r.getStyle("object.straightTableV2.subTotal","label.value","fontFamily")??o.totals.fontFamily??D$,fontSize:qH(d?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.subTotal","label.value","fontSize")??o.totals.fontSize),fontStyle:LH(d?.fontStyle),fontWeight:jH(d?.fontStyle,T$),textDecoration:FH(d?.fontStyle),color:DH(r,d?.fontColor)??DH(r,m?.fontColor)??r.getStyle("object.straightTableV2.subTotal","label.value","color")??o.totals.color??im.TEXT,background:NH(r,d,"object.straightTableV2.subTotal.label.value.backgroundColor",y)},dimensionNull:{fontStyle:LH(x?.fontStyle),fontWeight:jH(x?.fontStyle,"normal"),textDecoration:FH(x?.fontStyle),color:DH(r,x?.fontColor)??DH(r,m?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??o.body.color??im.TEXT,background:DH(r,x?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??im.NULL_VALUE_BACKGROUND},measureNull:{fontStyle:LH(f?.fontStyle),fontWeight:jH(f?.fontStyle,"normal"),textDecoration:FH(f?.fontStyle),color:DH(r,f?.fontColor)??DH(r,m?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??o.body.color??im.TEXT,background:DH(r,f?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??im.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:v??zH(i.multiline?.wrapTextInCells),headerLineClamp:zH(i.multiline?.wrapTextInHeaders),border:DH(r,h?.border)??r.getStyle("object.straightTableV2","grid","borderColor")??(r.background.isDark?im.DARK_MODE_BORDER:im.BORDER_MEDIUM),divider:DH(r,h?.divider)??r.getStyle("object.straightTableV2.grid","","divider.borderColor")??im.BORDER_HEAVY,hoverColors:{color:DH(r,m?.hoverFontColor)??r.getStyle("object.straightTableV2","","grid.hover.color")??o.body.hoverColors?.color,background:DH(r,m?.hoverColor)??r.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??o.body.hoverColors?.background},zebraStripes:{show:!!h?.zebraStripes?.show,odd:{color:DH(r,h?.zebraStripes?.color?.odd),background:DH(r,h?.zebraStripes?.background?.odd)},even:{color:DH(r,h?.zebraStripes?.color?.even),background:DH(r,h?.zebraStripes?.background?.even)},overrideDimNullValueBackground:void 0===DH(r,x?.background),overrideDimNullValueColor:void 0===DH(r,x?.fontColor),overrideMeasNullValueBackground:void 0===DH(r,f?.background),overrideMeasNullValueColor:void 0===DH(r,f?.fontColor)},lastRowBottomBorder:o.body.lastRowBottomBorder},selectedColors:am(r),contentStaticLineCount:v}}),BH=Rg(e=>{const t=e($H);return Math.max(Z$(t.header.fontSize)+8,32)}),HH=Rg(e=>{const t=e($H),n=Z$(t.totalRow.fontSize);return Math.max(n+9,24)}),VH=Rg(e=>{const t=e($H),n=e(Jg),r=e(Qg);return Math.max(n>0?Z$(t.dimension.values.fontSize):0,r>0?Z$(t.measure.values.fontSize):0)}),WH=Rg(e=>{const t=e($H),n=e(VH),r=(t.contentStaticLineCount||1)*n;return Math.max(r+9,24)}),UH=Rg(e=>{const t=e($H),n=Z$(t.subTotalRow.fontSize),r=(t.contentStaticLineCount||1)*n;return Math.max(r+9,24)}),GH=(e,t,n)=>{if(!e.length)return[];const r=[],i=[];let o=t;if(e.forEach((e,a)=>{const{columnWidth:{type:s,pixels:l,percentage:c},label:u,qApprMaxGlyphCount:d,totalInfo:f}=e;let p=0;const h=()=>{r[a]=Math.min(zm.PixelsMax,Math.max(zm.PixelsMin,p)),o-=r[a]};switch(s){case Fm.Pixels:p=(e=>void 0===e||Number.isNaN(+e)?zm.PixelsDefault:+e)(l),h();break;case Fm.Percentage:p=(e=>void 0===e||Number.isNaN(+e)?zm.PercentageDefault:+e)(c)/100*t,h();break;case Fm.FitToContent:e.representation?.type===Pz.Image?i.push(a):(p=n(u,f,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case Fm.Auto:i.push(a);break;default:throw new Error(`${s} is not a valid column width type`)}}),i.length){const e=o/i.length;i.forEach(t=>{r[t]=Math.max(zm.AutoMinTable,e)})}return r},YH=Rg(e=>{const t=e($H),n=e(CH).totalsPosition,r=e(ny),{measureText:i}=e(u$({...t.header,fontWeight:T$})),{measureText:o}=e(u$({...t.totalRow,fontWeight:T$})),{estimateWidth:a}=e(u$(t.dimension.values)),{estimateWidth:s}=e(u$(t.measure.values)),l=n.atBottom||n.atTop;return(e,t,n,c,u,d,f)=>{let p;if(r){const t=4;let n=25;n+=t+24,c&&(n+=20+t),u&&(n+=20),p=i(e)+n}else{let t=9;t+=16,f&&(t+=H$),t+=H$,t+=H$,p=i(e)+t}const h=d?a:s;return Math.max(p,l?o(t)+24+1:0,h(n))}}),KH=Rg(null),XH=Rg(e=>{const t=e(CH),n=e(Ry).width,r=e(Q$),i=e(YH);return GH(t.columns,n-r,i)}),JH=Rg(e=>e(KH)??e(XH),(e,t,n)=>{t(KH,n)}),QH=DE(e=>{const t=e(f$);!1===e(X$)&&t.emit("done-adjusting-column-width")}),ZH=DE((e,t)=>{e(Yg),t(KH,null)}),eV=Rg(e=>e(JH).reduce((e,t)=>e+t,0)),tV=({children:e})=>(zg(ZH),zg(QH),e);function nV(e){const t=tm();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),jl({...t,direction:e})}const rV={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},iV={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},oV=ic("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":{...rV},"&::-moz-range-track":{...rV},"&::-ms-track":{...rV},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...iV},"&::-moz-range-thumb":{...iV},"&::-ms-thumb":{...iV},"&: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"}})),aV=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:c,accessibilityRelatedArgs:u,direction:d="ltr"})=>{const f=Pm({translator:u.translator}),p=an.useRef({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!c,g=()=>m?p.current.columnWidth-h:"100%",y={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},b=t=>{p.current={initWidth:e,columnWidth:e,initX:t??p.current.initX}};_m(()=>{m&&b()},[e]);const v=e=>{const t=Math.max(e,zm.PixelsMin);p.current.columnWidth=t,o(t)},x=()=>{if(p.current.columnWidth!==p.current.initWidth){const e={type:Fm.Pixels,pixels:p.current.columnWidth};a(e)}l?.(!1)},w=e=>{const t="rtl"===d?p.current.initWidth+p.current.initX-e.clientX:p.current.initWidth+e.clientX-p.current.initX;v(t)},S=e=>{dm(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),x()},k=e=>{const t="rtl"===d?p.current.initWidth+-p.current.initX-e.touches[0].clientX:p.current.initWidth+e.touches[0].clientX-p.current.initX;v(t)},C=e=>{dm(e),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",C),x()},E=!r&&s?e=>{if(e.key===Lm.Left||e.key===Lm.Right){dm(e);const t=5,n=e.key===Lm.Left?t:-t,r="rtl"===d?n:-n;l?.(!0),v(p.current.columnWidth+r)}else e.key===Lm.Space||e.key===Lm.Enter?(dm(e),s(e),l?.(!1),x()):e.key===Lm.Esc&&(dm(e),s(e),l?.(!1),v(p.current.initWidth))}:void 0,M=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(u.columnLabel)]);return vt.jsx(oV,{style:y,hoverColor:i,isLastColumn:n,className:jm,"data-testid":jm,onMouseDown:e=>{dm(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),l?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:Fm.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(dm(e),document.addEventListener("touchmove",k),document.addEventListener("touchend",C),l?.(!0),b(e.touches[0].clientX))},onKeyDown:E,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":zm.PixelsMin,"aria-valuemax":zm.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},sV=(e,t)=>vt.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:vt.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})}),lV=an.forwardRef(sV),cV=({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},uV=ic(ld,{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"})),dV=ic(lV,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),fV=ic(Cp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),pV=ic(nf)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),hV=ic(Ap)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),mV=ic(Ap,{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"})),gV=ic("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"})),yV=ic("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),bV=ic(Cu)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),vV=ic(Jf,{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})),xV=(e,t)=>vt.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:vt.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}),wV=an.forwardRef(xV),SV=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?SV(t):t:e.parentElement?.children?.[0]},kV=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?kV(t):t},CV=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===Lm.Down||t===Lm.Up){const n=e=>t===Lm.Down?SV(e):kV(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},EV=(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 MV={};const RV=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:i,enabled:o,subMenus:a,isSubMenu:s,isActive:l,direction:c,isPagination:u})=>{const[d,f]=an.useState(!1),p=sn.useRef(null),h=an.useCallback(e=>{e.stopPropagation(),f(!1)},[f]);return vt.jsxs(vt.Fragment,{children:[vt.jsxs(mV,{ref:a?p:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),MV={}),a?.length&&(f(!0),MV[r]=f,e.stopPropagation()))},disabled:!o,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:CV,children:[l?vt.jsx(gV,{direction:c,isPagination:u}):null,vt.jsxs(yV,{children:[vt.jsx(vV,{direction:c,isPagination:u,children:vt.jsx(i,{})}),vt.jsx(bV,{variant:"body2",children:r})]}),a?.length?vt.jsx(wV,{}):null]},t),a?.length?vt.jsx(IV,{isSubMenu:!0,open:d,anchorEl:p.current,onClose:h,menuGroups:EV(a,MV),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:u}):null]})},_V=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&vt.jsx(hV,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>vt.jsx(RV,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),AV=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((i,o)=>[_V({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?vt.jsx(pV,{"data-testid":"group-divider",variant:"middle"}):void 0]),PV={appear:0,enter:0,exit:0},IV=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?vt.jsx(fV,{className:Om,open:t,anchorEl:e,onClose:n,transitionDuration:PV,MenuListProps:{id:Nm},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:AV({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,TV=({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>an.useCallback(()=>{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"===i?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:i,onPopoverClose:o})}},[e,t,n,r?.qStateName,i,o]),DV=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),OV=(e,t)=>e.some(e=>t[e]>0),NV={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},qV=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=an.useState(null),[a,s]=an.useState(NV);return _m(()=>{e||(s(NV),o(null))},[e]),an.useEffect(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=DV(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};i=u.qInfo?.qId,a?l():(o(c),d&&s((e=>({canSelectAll:OV(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:OV(["qSelected"],e),canSelectPossible:OV(["qOption"],e),canSelectAlternative:OV(["qAlternative"],e),canSelectExcluded:OV(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},LV=(e,t)=>vt.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:vt.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"})}),jV=an.forwardRef(LV),zV=(e,t)=>vt.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:vt.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"})}),FV=an.forwardRef(zV),$V=(e,t)=>vt.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:vt.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"})}),BV=an.forwardRef($V),HV=(e,t)=>vt.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:vt.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"})}),VV=an.forwardRef(HV),WV=(e,t)=>vt.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:vt.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"})}),UV=an.forwardRef(WV),GV=(e,t)=>vt.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:vt.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"})}),YV=an.forwardRef(GV),KV=(e,t)=>vt.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:vt.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"})}),XV=an.forwardRef(KV),JV=(e,t)=>vt.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:vt.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"})}),QV=an.forwardRef(JV),ZV=(e,t)=>vt.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:vt.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"})}),eW=an.forwardRef(ZV),tW=(e,t)=>vt.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:vt.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"})}),nW=an.forwardRef(tW),rW=(e,t)=>vt.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:vt.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"})}),iW=an.forwardRef(rW),oW=(e,t)=>vt.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:vt.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"})}),aW=an.forwardRef(oW),sW=(e,t)=>vt.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:vt.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"})}),lW=an.forwardRef(sW);let cW=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const uW="/qListObjectDef",dW=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:f})=>{const p=[];if(n[cW.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);p.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"A")),r(!1)},icon:jV,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),r(!1)},icon:VV,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:XV,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:Uj,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&p.push(...t)}if(e.isDim&&o?.select){const i=[];n[cW.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:QV,enabled:!0}]}]),!e.isLocked&&n[cW.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:lW,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(uW))},icon:eW,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(uW))},icon:aW,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(uW))},icon:nW,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(uW))},icon:iW,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(uW))},icon:FV,enabled:l.canClearSelections}]}]]}]}]),f&&!f.alwaysFullyExpanded&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await f.expandCallback()},icon:YV,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await f.collapseCallback()},icon:UV,enabled:!0}]}]),i.length>0&&p.push(...i)}return n[cW.AdjusterHeaderSize]&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:BV,enabled:!0}]}]),p},fW=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:i,interactions:o,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:c,selectionRelatedArgs:u,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:f,model:p,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:y=Im})=>{const b=an.useRef(null),v=Pm({translator:i}),{qLibraryId:x,fieldId:w,headTextAlign:S}=r,k=u?.app,{fieldInstance:C,selectionActionsEnabledStatus:E}=qV({open:e,headerData:r,app:k,qStateName:u?.qStateName}),M=cV({model:p,headerData:r}),R=TV({qLibraryId:x,fieldId:w,searchRelatedArgs:c,selectionRelatedArgs:u,direction:h}),_=an.useCallback(e=>{e.stopPropagation(),t(!1)},[t]),A=an.useCallback(e=>{e.stopPropagation(),t(e=>!e)},[t]);return o.active?vt.jsxs(uV,{rightAligned:"right"===S,shouldShowMenuIcon:s,className:Dm,onClick:!1===g?A:void 0,ref:b,isAccessibleHeader:g,children:[s?vt.jsx(dV,{height:y,className:Tm,"data-testid":Tm,isInteractionsActive:o.active??!1,children:vt.jsx(lV,{})}):null,vt.jsx(IV,{open:e,anchorEl:!1===g?b.current:n.current,onClose:_,menuGroups:dW({headerData:r,translator:v,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:R,interactions:o,fieldInstance:C,selectionActionsEnabledStatus:E,anchorRef:n,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:f}),direction:h,isPagination:m})]}):null},pW=e=>e.isDark?{background:e.color,borderColor:im.DARK_MODE_BORDER,color:im.DARK_MODE_TEXT,disabledColor:im.DARK_MODE_DISABLED,iconColor:im.DARK_MODE_TEXT}:{background:e.color,borderColor:im.BORDER_MEDIUM,color:im.TEXT,disabledColor:im.DISABLED},hW=ic(ld,{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}`})),mW=ic(ch,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),gW=ic(bd,{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)})),yW=ic(Cu)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),bW=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=an.useMemo(()=>pW(r.background),[r]);if(!n.active)return null;const a=i?vt.jsx(hW,{footerStyle:o,children:e}):null;return t?_c.createPortal(e,t):a},vW=(e,t)=>vt.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:vt.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})}),xW=an.forwardRef(vW),wW=(e,t)=>vt.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:vt.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})}),SW=an.forwardRef(wW),kW={},CW=an.createContext(kW),EW=()=>an.useContext(CW),MW=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:f,interactions:p,rect:h,layout:m,visibilityThreshold:g})=>{const y=(e=>!e.enabled||e.active)(u)?0:-1,b=an.useMemo(()=>pW(f.background),[f]),v=i?i.getBoundingClientRect().width:h.width,x=Pm({translator:d}),w=an.useMemo(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:x,theme:f,interactions:p,rect:h,layout:m,footerStyle:b,tabIndex:y,width:v,visibilityThreshold:g}),[t,n,r,i,o,a,s,l,c,u,x,f,p,h,m,b,y,v,g]);return vt.jsx(CW.Provider,{value:w,children:e})},RW=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:i,translator:o,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":o.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?o.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{i(t)}});let _W=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),AW=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 PW=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:i,footerStyle:o,handleChangePage:a,translator:s,tabIndex:l}=EW(),c=0===t.page,u=RW({type:_W.FirstPage,disabledCondition:c,pageNumber:0,footerStyle:o,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(i?.firstPage||AW.FirstPage)?null:vt.jsx(gW,{...u,disabled:!r.active,children:"rtl"===e?vt.jsx(SW,{height:Im}):vt.jsx(xW,{height:Im})})},IW=(e,t,n=!1)=>{n&&e.key===Lm.Tab&&!e.shiftKey&&(dm(e),um(e.target,t,!1))},TW=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:i,width:o,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:c,translator:u,tabIndex:d}=EW(),f=t.page>=r-1,p=RW({type:_W.LastPage,disabledCondition:f,pageNumber:r-1,footerStyle:l,handleChangePage:c,translator:u,interactions:a,tabIndex:d}),h=n.enabled?e=>{IW(e,n,i)}:void 0;return o<=(s?.lastPage||AW.LastPage)?null:vt.jsx(gW,{...p,onKeyDown:h,disabled:!a.active,children:"rtl"===e?vt.jsx(xW,{height:Im}):vt.jsx(SW,{height:Im})})},DW=(e,t)=>vt.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:vt.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}),OW=an.forwardRef(DW),NW=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:i,width:o,interactions:a,footerStyle:s,handleChangePage:l,translator:c,tabIndex:u}=EW(),d=t.page>=r-1,f=RW({type:_W.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:c,interactions:a,tabIndex:u}),p=!(o>AW.FirstPage&&o>AW.LastPage)&&n.enabled?e=>{IW(e,n,i)}:void 0;return vt.jsx(gW,{...f,onKeyDown:p,disabled:!a.active,children:"rtl"===e?vt.jsx(OW,{height:Im}):vt.jsx(wV,{height:Im})})},qW=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:i,translator:o,tabIndex:a}=EW(),s=0===t.page,l=RW({type:_W.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:i,translator:o,interactions:n,tabIndex:a});return vt.jsx(gW,{...l,disabled:!n.active,children:"rtl"===e?vt.jsx(wV,{height:Im}):vt.jsx(OW,{height:Im})})},LW=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=EW(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||AW.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return vt.jsx(yW,{variant:"caption",dir:"ltr",children:s})},jW=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=EW(),c=i.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,f=`${d}-label-${c}`,p={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":f};return vt.jsxs(vt.Fragment,{children:[vt.jsxs(yW,{variant:"caption",id:f,children:[u,":"]}),vt.jsx(mW,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:p,disabled:!l.active,children:n})]})},zW=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=EW();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||AW.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=vt.jsx(vt.Fragment,{children:e.rowsPerPageOptions.map(e=>vt.jsx("option",{value:e,children:e},e))});return vt.jsx(jW,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},FW=1e3,$W="…",BW=({totalPages:e,page:t})=>{const n=Math.min(e,FW),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-FW):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+o;return vt.jsx("option",{value:t,children:t+1},t)});return o>0&&a.unshift(vt.jsx("option",{value:$W,disabled:!0,children:$W},"startMoreOptions")),i<e-1&&a.push(vt.jsx("option",{value:$W,disabled:!0,children:$W},"endMoreOptions")),vt.jsx(vt.Fragment,{children:a})},HW=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=EW(),{page:o}=e;if(t<=(i?.selectPage||AW.SelectPage))return null;const a=vt.jsx(BW,{totalPages:n,page:o});return vt.jsx(jW,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})},VW=e=>vt.jsxs(MW,{...e,children:[vt.jsx(zW,{}),vt.jsx(HW,{}),vt.jsx(LW,{}),vt.jsx(PW,{}),vt.jsx(qW,{}),vt.jsx(NW,{}),vt.jsx(TW,{})]});var WW=an.memo(VW);const UW=e=>vt.jsx(bW,{...e,children:vt.jsx(WW,{...e})}),GW=(e,t,n)=>{const r=n.size,i=r>=t.size;if(r){e({keys:[i?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===r?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",r.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},YW=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},KW=e=>e.ctrlKey||e.metaKey,XW=e=>e.shiftKey&&KW(e),JW=e=>[Lm.Left,Lm.Right,Lm.Up,Lm.Down].includes(e),QW=e=>e.shiftKey&&JW(e.key),ZW=e=>(e=>JW(e)||[Lm.Home,Lm.End,Lm.PageUp,Lm.PageDown].includes(e))(e.key)&&!XW(e),eU=(e,t)=>{const{api:n,rows:r,colIdx:i}=e,{cell:o,announce:a,evt:s}=t;let l=new Map;if(-1===i)n?.begin(["/qHyperCubeDef"]);else{if(i!==o.selectionColIdx)return e;l=new Map(r)}return l=((e,t,n)=>{const{qElemNumber:r,rowIdx:i}=t;return n.ctrlKey||n.metaKey?(new Map).set(r,i):(e.has(r)?e.delete(r):e.set(r,i),new Map(e))})(l,o,s),GW(a,r,l),l.size?(n?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[o.selectionColIdx]]}),{...e,rows:l,colIdx:o.selectionColIdx}):(n?.cancel(),{...e,rows:l,colIdx:-1})},tU=(e,t)=>{const{api:n,rows:r,colIdx:i,pageRows:o,firstCell:a}=e,{cell:s,announce:l,evt:c}=t;if(!(a||"key"in c&&QW(c)))return e;-1===i&&n?.begin(["/qHyperCubeDef"]);const u=((e,t,n,r,i)=>{const o=new Map(t);if("key"in r&&QW(r)){o.set(n.qElemNumber,n.rowIdx);const t=r.key===Lm.Down?1:-1,i=e[n.pageRowIdx+t][n.pageColIdx];return o.set(i.qElemNumber,n.rowIdx+t),o}if(!i)return t;const a=Math.min(i.pageRowIdx,n.pageRowIdx),s=Math.max(i.pageRowIdx,n.pageRowIdx);for(let t=a;t<=s;t++){const n=e[t][i.pageColIdx];o.set(n.qElemNumber,n.rowIdx)}return o})(o,r,s,c,a);return GW(l,r,u),{...e,rows:u,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},nU=e=>{const{api:t,rows:n,colIdx:r,isSelectMultiValues:i,mouseupOutsideCallback:o}=e;return o&&document.removeEventListener("mouseup",o),i&&t?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(n.values()),[r]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},rU=(e,t)=>{switch(t.type){case h$.Select:return eU(e,t.payload);case h$.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 h$.SelectMouseUp:return((e,t)=>nU(e.isSelectMultiValues||e.firstCell!==t.cell?e:eU(e,t)))(e,t.payload);case h$.SelectMultiAdd:return tU(e,t.payload);case h$.SelectMultiEnd:return nU(e);case h$.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case h$.Clear:return e.rows.size?{...e,rows:new Map}:e;case h$.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},iU=Rg(e=>{const t=e(oy);return function(e,t){return Rg(e,function(e,n,r){n(this,t(e(this),r))})}({pageRows:e(CH).rows,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1},rU)}),oU=Rg(e=>e(e(iU)),(e,t,n)=>{t(e(iU),n)}),aU=qE(e=>Rg(t=>{const{colIdx:n,rows:r,api:i}=t(oU);return"object"==typeof e&&i?.isModal()?n!==e.selectionColIdx?p$.Disabled:r.has(e.qElemNumber)?p$.Selected:p$.Possible:p$.Inactive}),(e,t)=>"object"!=typeof e||"object"!=typeof t?e===t:e.qElemNumber===t.qElemNumber&&e.selectionColIdx===t.selectionColIdx),sU=Rg(e=>{const t=e(eV),n=e(Ry).width,r=e(Q$);return t>0&&t+r<n}),lU=()=>{const[e,t]=an.useState(!1);return Wq({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?vt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},cU=(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}),uU=Rg(e=>{const t=e(Jg),n=e(ky);if(void 0!==n)return async(e,r)=>{const{isDim:i,colIdx:o,qReverseSort:a,sortDirection:s,isActivelySorted:l}=e,c=i?o:o-t,u=await n.getEffectiveProperties(),d=u.qHyperCubeDef.qInterColumnSortOrder,f=[],p=r!==s||l;if(!i){const e=u.qHyperCubeDef.qMeasures.at(c)?.qSortBy;void 0===e?.qSortByNumeric&&f.push({qPath:`/qHyperCubeDef/qMeasures/${c}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}l||(d.splice(d.indexOf(o),1),d.unshift(o),f.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${d.join(",")}]`})),p&&f.push({qPath:`/qHyperCubeDef/${i?"qDimensions":"qMeasures"}/${c}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),n.applyPatches(f,!0)}}),dU=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),fU=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:i})=>(e<r?e++:t<i&&(t++,e=n),[t,e]),pU=e=>e.atTop?2:1,hU=(e,t)=>({top:e?pU(t):0,bottom:e&&t.atBottom?1:0}),mU=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],gU=e=>e?.setAttribute("tabIndex","0"),yU=e=>e?.setAttribute("tabIndex","-1"),bU=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(yU)},vU=e=>{e?.focus(),gU(e)},xU=e=>{setTimeout(()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${jm}`);vU(t)},0)},wU=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:i,direction:o})=>{bU(t);const a=((e,t,n,r,i={top:0,bottom:0})=>{const o=i.top>0,a=i.top,s=t.getElementsByClassName("sn-table-row").length-1-i.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[c,u]=n;switch(e.key){case Lm.Down:c<s&&c++;break;case Lm.Up:c>a&&c--;break;case Lm.Right:if(o)break;[c,u]="rtl"===r?dU({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0}):fU({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case Lm.Left:if(o)break;[c,u]="rtl"===r?fU({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):dU({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0});break;case Lm.Home:(KW(e)||o)&&(c=a),o||(u=0);break;case Lm.End:(KW(e)||o)&&(c=s),o||(u=l);break;case Lm.PageDown:c=Math.min(s,c+10);break;case Lm.PageUp:c=Math.max(a,c-10)}return[c,u]})(e,t,n,o,i),s=mU(t,a);return vU(s),((e,t)=>{const n=t.getElementsByClassName("sn-table-container")[0];if(!n?.scrollTo)return;const[r,i]=e;if(r<2)n.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],o=t.getElementsByClassName("sn-table-row")[r].getElementsByClassName("sn-table-cell")[i];if(!o||!e)return;if(o.offsetTop-e.offsetHeight<n.scrollTop){const t=n.scrollTop-o.offsetHeight-e.offsetHeight;n.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),r(a),{nextCell:s,nextCellCoord:a}},SU=(e,t,n,r)=>{bU(t),n(e),r.enabled&&!r.active?r.focus?.():vU(mU(t,e))},kU=(e,t,n)=>{const r=e.currentTarget;if(!n.enabled||t.current||!r)return;const i=e.relatedTarget??document.activeElement,o=!!i&&r.contains(i),a=!!i?.closest(`.${Om}`);o||a||((e=>{const t=e.querySelector(`.${g$.First}`),n=e.querySelector(`.${g$.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),n.blur?.(!1))},CU=(e,t)=>vt.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:vt.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"})}),EU=an.forwardRef(CU),MU=ic(Rh,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"color"!==e})(({headerStyle:e,interactions:t,hoverBackground:n,background:r,color:i})=>({...O$,...e,cursor:t.active?"pointer":"default",background:r,color:i,verticalAlign:"bottom",boxSizing:"border-box","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?n:r}})),RU=ic("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})(({align:e,dir:t})=>({minWidth:I$,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}})),_U=parseInt(I$,10)/2,AU=ic("div")({position:"absolute",bottom:-_U,left:`calc(50% - ${_U}px)`}),PU=ic(Hh)({position:"sticky",top:0,zIndex:1}),IU={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},TU=ic(ld)({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"}}),DU=ic("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:i=!1})=>r&&!i||1===e&&!t?{...IU,whiteSpace:"nowrap",display:n?"block":void 0}:{...IU,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"}),OU=ic("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),NU="cell-text",qU=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:i=!1,isDual:o=!1,lineClamp:a})=>{const s=zg($H);return i?vt.jsx(DU,{"data-testid":NU,ref:t,className:"sn-table-cell-text",lineClamp:s.grid.headerLineClamp,isPagination:r,isHeadCell:!0,style:{direction:n?"ltr":void 0},children:e}):vt.jsx(DU,{"data-testid":NU,ref:t,className:"sn-table-cell-text",isDual:o,isNumeric:n,lineClamp:a??s.grid.contentLineClamp,isPagination:r,style:{direction:n?"ltr":void 0},children:e})},LU=e=>{const{column:t,isInteractionEnabled:n,open:r,setOpen:i,isPagination:o,forwardRef:a}=e,s=zg(Zg),l=zg(uU),c=zg(my),u=zg(sy),d=zg(Vg),f=zg(Ty),p=zg(Bg),h=zg(JH)[t.pageColIdx],m=zg(Sy),g=an.useRef(null),y=an.useRef(null),b=(({column:e,columnWidth:t})=>{const n=zg($H),{measureText:r}=Sm({fontSize:n.header.fontSize,fontFamily:n.header.fontFamily,fontWeight:T$});let i=!1,o=!1,a=!1;const s=e.isLocked,l=e.isActivelySorted,c=t-25,u=s?20:0,d=l?20:0;let f=r(e.label);return s&&f+u<=c&&(a=!0,f+=u,l&&f+d<=c&&(o=!0,f+=d)),!s&&l&&f+d<=c&&(o=!0,f+=d),f+24<=c&&(i=!0),{shouldShowMenuIcon:i,shouldShowSortIcon:o,shouldShowLockIcon:a}})({column:t,columnWidth:h}),{StartIcon:v,EndIcon:x,LockIcon:w}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},i)=>{const o="A"===e?vt.jsx(jV,{height:I$,"data-testid":"head-cell-sort-ascending-icon"}):vt.jsx(VV,{height:I$,"data-testid":"head-cell-sort-descending-icon"}),a=n?vt.jsx(RU,{align:t,dir:i,children:o}):void 0,s=r?vt.jsx(G$,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:vt.jsx(EU,{height:I$,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(t,b,c);return vt.jsxs(U$,{shouldShowMenuIcon:b.shouldShowMenuIcon,shouldShowLockIcon:b.shouldShowLockIcon,alignment:z$(t,o,c),children:[w,vt.jsxs(W$,{className:"sn-table-head-label",textAlign:t.headTextAlign,direction:c,isPagination:o,children:[v,vt.jsx(qU,{forwardRef:a,isPagination:o,isHeadCell:!0,children:t.label}),x]}),n?vt.jsxs(vt.Fragment,{children:[vt.jsx(fW,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:f,anchorRef:g,menuAvailabilityFlags:{[cW.Sorting]:!0,[cW.Searching]:!0,[cW.Selections]:!0,[cW.AdjusterHeaderSize]:!0},open:r,setOpen:i,interactions:u,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),l?.(t,n)??Promise.resolve())},searchRelatedArgs:{embed:d,listboxRef:y},selectionRelatedArgs:{app:p,qStateName:s},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:xU},shouldShowMenuIcon:b.shouldShowMenuIcon,model:m,direction:c,isPagination:o,isAccessibleHeader:!0}),vt.jsx(V$,{ref:y,direction:c,isPagination:o}),vt.jsx(V$,{ref:g,direction:c})]}):null]})},jU=(e,t)=>vt.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:vt.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"})}),zU=an.forwardRef(jU),FU=(e,t)=>e.isCyclic&&t,$U=({column:e})=>{const t=zg($H),n=zg(my),r=zg(Sy),i=sn.useRef(null),[o,a]=sn.useState(!1),s=cV({model:r,headerData:{...e,dimensionInfoIndex:e.colIdx}});return vt.jsxs(vt.Fragment,{children:[vt.jsx(K$,{hoverBackground:e.headerColor?.headerMenuHoverBackground??t.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??t.headerMenuActiveBackground,isActive:o,tabIndex:-1,onClick:e=>{e.stopPropagation(),a(!0)},children:vt.jsx(zU,{ref:i,height:16,"data-testid":"head-cell-cyclic-icon"})}),vt.jsx(IV,{open:o,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:Uj,isActive:e.groupDimensionPos===n}))}]],anchorEl:i.current,direction:n,isPagination:!1})]})},BU=e=>e.isLocked,HU=({column:e})=>{const t=zg(Bg),n=zg(Zg),r=zg($H);return vt.jsx(K$,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??r.headerMenuHoverBackground,onClick:r=>{r.stopPropagation(),(async(e,t,n)=>{const r=DV(t??"$",n);let i;try{const t=await(e?.createSessionObject(r));i=t?.id,await(t?.unlock("/qListObjectDef"))}catch(e){console.error("Failed to unlock field from table header",e)}finally{i&&(await(e?.destroySessionObject(i))||console.error("Failed to destroy session object when unlocking field from table header"))}})(t,n,e)},children:vt.jsx(EU,{height:16,"data-testid":"head-cell-lock-icon"})})},VU=({column:e,menuIconRef:t,open:n,setOpen:r})=>{const i=zg($H);return vt.jsx(K$,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??i.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??i.headerMenuActiveBackground,isActive:n,order:e.isDim?void 0:-1,onClick:e=>{e.stopPropagation(),r(e=>!e)},ref:t,children:vt.jsx(lV,{height:16})})},WU=({anchorRef:e,column:t,isPagination:n,listboxRef:r,open:i,setOpen:o})=>{const a=zg(Bg),s=zg(my),l=zg(Vg),c=zg(sy),u=zg(Sy),d=zg(Zg),f=zg(Ty),p=zg(uU);return vt.jsx(fW,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:f,anchorRef:e,menuAvailabilityFlags:{[cW.Sorting]:!0,[cW.Searching]:!0,[cW.Selections]:!0,[cW.AdjusterHeaderSize]:!0},open:i,setOpen:o,interactions:c,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),p?.(t,n)??Promise.resolve())},searchRelatedArgs:{embed:l,listboxRef:r},selectionRelatedArgs:{app:a,qStateName:d},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:xU},shouldShowMenuIcon:!1,model:u,direction:s,isPagination:n})},UU=Rg();UU.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 GU=({ref:e,callback:t})=>{const n=zg(UU),r=an.useRef(t);r.current=t,an.useLayoutEffect(()=>{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])},YU=ic(ld)({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",boxSizing:"border-box"}),KU=({children:e})=>{const t=sn.useRef(null),[n,r]=an.useState(()=>new Set(e.filter(({props:e})=>void 0!==e.prio&&e.children).map(({key:e})=>e))),i=an.useMemo(()=>Array.from(e).sort((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)),[e]),o=an.useCallback(e=>{const t=new Set,n=e.contentBoxSize.at(0)?.inlineSize??0;let o=0;i.forEach(e=>{if(e.props.ignore||!e.props.children)return;const r=e.props.minWidth+1;void 0===e.props.prio||o+r<=n?o+=r:t.add(e.key)}),r(e=>e.size===t.size&&[...e].every(e=>t.has(e))?e:t)},[i]);return GU({ref:t,callback:o}),vt.jsx(YU,{ref:t,"data-testid":"responsive-container",children:e.filter(e=>!n.has(e.key))})},XU=({children:e})=>e,JU=(e,t)=>!e.isLocked&&e.isDim&&t,QU=({column:e,open:t,setOpen:n})=>{const r=zg($H),i=zg(Zg),o=zg(my),a=zg(Vg);zg(Bg);const s=sn.useRef(null),l=an.useCallback(()=>{n(!1)},[n]),c=TV({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:a,listboxRef:s},selectionRelatedArgs:{qStateName:i},direction:o,onPopoverClose:l});return vt.jsx(K$,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??r.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??r.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),c(),n(!0)},children:vt.jsx(QV,{ref:s,height:16,"data-testid":"head-cell-search-icon"})})},ZU=(e,t)=>vt.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:vt.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"})}),eG=an.forwardRef(ZU),tG=(e,t)=>vt.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:vt.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"})}),nG=an.forwardRef(tG),rG=({column:e})=>{const{sortDirection:t,isActivelySorted:n}=e,r="A"===t?vt.jsx(nG,{height:I$,"data-testid":"head-cell-sort-ascending-icon"}):vt.jsx(eG,{height:I$,"data-testid":"head-cell-sort-descending-icon"});return n?vt.jsx(AU,{children:r}):void 0},iG=0,oG=1,aG=2,sG=3,lG=e=>{const{column:t,open:n,setOpen:r,isPagination:i,forwardRef:o,columnWidth:a,isInteractionEnabled:s}=e,l=zg($H),c=zg(my),{measureText:u}=Sm(l.header),[d,f]=an.useState(!1),p=an.useRef(null),h=an.useRef(null),m=an.useRef(null),g="number"==typeof a&&a>zm.PixelsMin+18;return vt.jsxs(vt.Fragment,{children:[vt.jsxs(KU,{children:[vt.jsx(XU,{prio:aG,minWidth:H$,children:BU(t)?vt.jsx(HU,{column:t}):null},"Lock"),vt.jsx(XU,{prio:oG,minWidth:H$,children:FU(t,s)?vt.jsx($U,{column:t}):null},"Cyclic"),vt.jsx(XU,{ignore:!0,children:vt.jsx(rG,{column:t})},"Sort"),vt.jsx(XU,{minWidth:u(t.label)+8,children:vt.jsx(Y$,{justifyContent:t.headTextAlign,children:vt.jsx(qU,{forwardRef:o,isPagination:i,isHeadCell:!0,children:t.label})})},"Text"),vt.jsx(XU,{prio:g?void 0:iG,minWidth:H$,children:d||JU(t,s)?vt.jsx(QU,{open:d,setOpen:f,column:t}):null},"Search"),vt.jsx(XU,{prio:sG,minWidth:H$,children:s?vt.jsx(VU,{menuIconRef:m,column:t,open:n,setOpen:r}):null},"Menu")]}),s?vt.jsxs(vt.Fragment,{children:[vt.jsx(V$,{ref:h,direction:c,isPagination:i}),vt.jsx(V$,{ref:p,direction:c}),vt.jsx(WU,{anchorRef:m.current?m:p,column:t,isPagination:i,listboxRef:h,open:n,setOpen:r})]}):null]})},cG=ic("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({background:e,applicableStyle:t,color:n})=>({...t,background:e,color:n})),uG=()=>{},dG=({column:e,isPagination:t})=>{const n=zg($H),r=zg(my),i=zg(sU),o=zg(EH),a=!1,s=zg(ny)?LU:lG;return vt.jsx(cG,{className:"sn-table-cell",applicableStyle:{...n.header,...cU(n,o,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:$$(r,a,i),borderLeftWidth:B$(r,a,i),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:vt.jsx(s,{column:e,isInteractionEnabled:!1,isPagination:t,open:!1,setOpen:uG})})},fG=({isPagination:e})=>{const t=zg(MH),[n,r]=an.useState();Wq({onDragStart:e=>{const t=e.operation.source?.id;r(t)},onDragEnd:()=>{}});const i=n?t.find(e=>e.id===n):void 0;return i?vt.jsx(Sq,{children:vt.jsx("div",{style:{background:"white",height:"100%",display:"flex",position:"relative"},children:vt.jsx(dG,{column:i,isPagination:e})})}):null},pG=_E(Rg(async e=>{e(Yg);const t=e(ky);return t?.getEffectiveProperties()}),e=>e),hG=Rg(e=>e(pG)?.qHyperCubeDef),mG=[_N.configure({activationConstraints:[new CN.Distance({value:5})],preventActivation:e=>{const t=e.target;return t instanceof HTMLElement&&t.classList.contains("nebula-table-utils-column-adjuster")}})],gG=KN.plugins.filter(e=>e!==nO),yG=(e,t,n)=>{const r=JSON.stringify(t),i=JSON.stringify(n);if(r!==i)return{qPath:e,qOp:"Replace",qValue:i}},bG=(e,t,n,r,i)=>{if(!e||!t||r===i)return;const o=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:n,visibleColumnIds:r,sourceId:i,targetId:o})=>{const a=wz({qDimensions:e,qMeasures:t}),s=[...e,...t],l=r.findIndex(e=>e===i),c=r.findIndex(e=>e===o);if(l<0||c<0||l===c)return;const u=((e,t,n)=>{const r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r})(r,l,c),d=new Map(u.map((e,t)=>[e,t])),f=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}),p=f.filter(e=>e.isDimension).map(e=>e.def),h=f.filter(e=>!e.isDimension).map(e=>e.def),m=[...p,...h],g=new Map(m.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:p,qMeasures:h,qInterColumnSortOrder:Sz({previousColumns:s,nextColumns:m,qInterColumnSortOrder:n}),qColumnOrder:u.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:i});if(!o)return;const a=[yG("/qHyperCubeDef/qDimensions",t.qDimensions,o.qDimensions),yG("/qHyperCubeDef/qMeasures",t.qMeasures,o.qMeasures),yG("/qHyperCubeDef/qInterColumnSortOrder",t.qInterColumnSortOrder,o.qInterColumnSortOrder),yG("/qHyperCubeDef/qColumnOrder",t.qColumnOrder,o.qColumnOrder)].filter(e=>void 0!==e);0!==a.length&&e.applyPatches(a,!0)},vG=({children:e})=>{const t=zg(ky),n=zg(hG),r=zg(MH);return vt.jsx(vq,{onDragOver:e=>{const i=e.operation.source?.id,o=e.operation.target?.id;void 0!==o&&i!==o&&bG(t,n,r,i,o)},sensors:mG,plugins:gG,children:e})};function xG(e,t){const n=an.useRef(!1);an.useEffect(()=>{n.current?e():n.current=!0},t)}const wG=(e,t)=>{const n=zg(wy);an.useEffect(()=>{const r=e.current;if(!r)return;const i=e=>{kU(e,t,n)};return r.addEventListener("focusout",i),()=>{r.removeEventListener("focusout",i)}},[e,t,n])},SG=Rg(y$),kG=qE(e=>Rg(t=>{const[n,r]=t(SG);return 0===n&&r===e})),CG=()=>{const e=zg(Hg);an.useEffect(()=>{e.notifyIsDoneRendering()})};var EG={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 MG=Rg(e=>{const t=e(Ty),n=e(_y);let r;return function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(EG).forEach(t=>{e.add(EG[t])})}(t),({keys:e,politeness:i="polite"})=>{const o=e.map(e=>{if(Array.isArray(e)){const[n,...r]=e;return t.get(n,r)}return t.get(e)}).join(" "),a=n.querySelector(`.${g$.First}`),s=n.querySelector(`.${g$.Second}`);if(!a||!s)return void console.error("could not find aria-live elements, which means accessibility is not working properly");let l;r===g$.First?(l=s,r=g$.Second):(l=a,r=g$.First),l.innerHTML=l.innerHTML.endsWith(" ­")?o:`${o} ­`,l.setAttribute("aria-live",i)}}),RG=(e,t)=>{const n=zg(MG),r=zg(_y),i=zg(PH),o=zg(AH),a=zg(_H),s=zg(EH),[l,c]=$g(SG),u=zg(iy),d=zg(wy);xG(()=>{const t=((e,t,n=!1)=>{const r=[pU(t),e[1]];return n?r:y$})(l,s,u);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:i,keyboard:o,announce:a})=>{if(bU(t),i(e),!(e=>!e.enabled||e.active)(o))return;const s=mU(t,e);n.current?(vU(s),n.current=!1):gU(s),r&&(a({keys:[s?.textContent??""]}),YW(a,s,r))})({resetCellCoord:t,rootElement:r,shouldRefocus:e,setFocusedCellCoord:c,isSelectionMode:u,keyboard:d,announce:n})},[a.length,o,i,t])},_G=e=>{dm(e),KW(e)&&Um(e.currentTarget)},AG=e=>{ZW(e.evt)&&(dm(e.evt),wU(e))},PG=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:i}=e;if(!ZW(t))return;dm(t);const o=((e,t)=>[e.pageRowIdx+pU(t),e.pageColIdx])(r,n),a=hU(i,n),{nextCell:s,nextCellCoord:l}=wU({...e,cellCoord:o,allowedRows:a});l[0]!==o[0]&&(({evt:e,isSelectionsEnabled:t,cell:n,selectionDispatch:r,announce:i,isSelectionMode:o,nextCell:a})=>{e.shiftKey&&t&&n.isSelectable?r({type:h$.SelectMultiAdd,payload:{cell:n,evt:e,announce:i}}):YW(i,a,o)})({...e,nextCell:s})},IG=e=>{const{evt:t}=e;XW(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:i,handleChangePage:o})=>{dm(e);const a=Math.ceil(t/n)-1;e.key===Lm.Right&&r<a?(i(),o(r+1)):e.key===Lm.Left&&r>0&&(i(),o(r-1))})(e):t.key===Lm.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{t.enabled&&!n&&(dm(e),t.blur?.(!0))})(e):JW(t.key)&&dm(t)},TG=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains(p$.Disabled))return void dm(t);const r={...e,isSelectionMode:!!n?.isModal()};switch(t.key){case Lm.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:i})=>{dm(e),t.isSelectable&&n&&r({type:h$.Select,payload:{cell:t,evt:e,announce:i}})})(r);break;case Lm.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{dm(n),e&&(t?.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case Lm.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(dm(n),t?.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case Lm.C:_G(t);break;case Lm.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const i=e.shiftKey||!r;t.enabled&&n&&i&&(dm(e),um(e.currentTarget,t,e.shiftKey))})(r);break;default:PG(r)}},DG=e=>{const t=zg(X$),n=Fg(J$),r=Fg(Q$),i=zg(f$),o=an.useRef();GU({ref:e,callback:a=>{const s=()=>{if(e.current){const e=a.borderBoxSize.at(0)?.inlineSize??0,t=a.borderBoxSize.at(0)?.blockSize??0,i=a.contentBoxSize.at(0)?.inlineSize??0,o=t-(a.contentBoxSize.at(0)?.blockSize??0);r(e-i),n(o)}};t?(o.current&&i.off("done-adjusting-column-width",o.current),i.once("done-adjusting-column-width",s),o.current=s):s()}}),an.useEffect(()=>{const e=i;return()=>{o.current&&e.off("done-adjusting-column-width",o.current)}},[i])},OG=ic("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),NG=ic(Ih,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})(({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"})),qG=ic(mh,{shouldForwardProp:e=>"borderRight"!==e})(({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e})),LG=()=>vt.jsxs(vt.Fragment,{children:[vt.jsx(OG,{className:g$.First,"data-testid":g$.First,"aria-live":"polite","aria-atomic":"true"}),vt.jsx(OG,{className:g$.Second,"data-testid":g$.Second,"aria-live":"polite","aria-atomic":"true"})]}),jG=e=>{const t=an.useRef(new Map),n=an.useRef(null);an.useEffect(()=>{n.current=e(t.current),t.current.forEach((e,t)=>{n.current?.observe(t)});const r=t.current,i=n.current;return()=>{i.disconnect(),r.clear()}},[e,n,t]);const r=an.useCallback((e,r)=>{t.current.set(e,r),n.current?.observe(e)},[t,n]),i=an.useCallback(e=>{t.current.delete(e),n.current?.unobserve(e)},[n,t]);return an.useMemo(()=>({addTask:r,removeTask:i}),[r,i])},zG=e=>new ResizeObserver(t=>{t.forEach(t=>{const n=e.get(t.target);n?.(t)})}),FG=()=>jG(zG),$G=({updateShouldRefocus:e,tableWrapperRef:t})=>{const n=zg(oy),r=zg(wy),i=Fg(oU);an.useEffect(()=>{const o=()=>{i({type:h$.Reset})},a=()=>{i({type:h$.Clear})},s=()=>{t.current?.contains(document.activeElement)?e():r.enabled&&r.blur?.(!0),o()};return n?.on("deactivated",o),n?.on("canceled",o),n?.on("confirmed",s),n?.on("cleared",a),()=>{n?.removeListener("deactivated",o),n?.removeListener("canceled",o),n?.removeListener("confirmed",s),n?.removeListener("cleared",a)}},[n,r,i,e,t])},BG=e=>{e.stopPropagation()},HG=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:BG,color:im.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),VG=({href:e,text:t,interactions:n,color:r})=>vt.jsx(Af,{...HG({href:e,text:t,interactions:n,color:r}),children:t}),WG=window.requestIdleCallback??(e=>setTimeout(()=>{e({})},0)),UG=window.cancelIdleCallback??(e=>{clearTimeout(e)}),GG="qDimensionInfo/0",YG="qMeasureInfo/0",KG="x",XG="y";function JG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function QG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZG(Object(n),!0).forEach(function(t){QG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return JG(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?JG(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var nY=Object.prototype.hasOwnProperty,rY=Object.prototype.toString,iY=Object.defineProperty,oY=Object.getOwnPropertyDescriptor,aY=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===rY.call(e)},sY=function(e){if(!e||"[object Object]"!==rY.call(e))return!1;var t,n=nY.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&nY.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||nY.call(e,t)},lY=function(e,t){iY&&"__proto__"===t.name?iY(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},cY=function(e,t){if("__proto__"===t){if(!nY.call(e,t))return;if(oY)return oY(e,t).value}return e[t]},uY=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=cY(s,n),s!==(i=cY(t,n))&&(u&&i&&(sY(i)||(o=aY(i)))?(o?(o=!1,a=r&&aY(r)?r:[]):a=r&&sY(r)?r:{},lY(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&lY(s,{name:n,newValue:i}));return s};function dY(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),s=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some((e,t)=>e!==t)){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function fY(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function pY(e){let t=e.cache,n=e.f,r=e.mainCell,i=e.p,o=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,c=e.target,u=e.targetProp,d=e.columnOrder,f=r;if(i.field&&i.field!==n){const e=dY(i.field,o,{cache:t},d);if(-1===e)return;f=uY({qRow:a},e(s))}c[u]=fY(i,f,{key:l})}function hY(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),c=r.normalizeConfig(i[e],t),u=c.props,d=c.main,f=Object.keys(u),p=!!i[e].trackBy,h=typeof i[e].trackBy,m={},g=[],y=[];for(let t=0;t<a.qDataPages.length;t++){const o=dY(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let c=0;c<a.qDataPages[t].qMatrix.length;c++){const b=a.qDataPages[t].qArea.qTop+c,v=uY({qRow:b},o(a.qDataPages[t].qMatrix[c])),x=fY(d,v,{key:s});if(!(d.filter&&!d.filter(v))){for(let e=0;e<f.length;e++){const r=u[f[e]];let i=r.fields||[r];r.fields&&(x[f[e]]=[]);for(let o=0;o<i.length;o++)pY({cache:n,f:l,mainCell:v,p:i[o],prop:f[e],page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[c],sourceKey:s,target:r.fields?x[f[e]]:x,targetProp:r.fields?o:f[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[f[e]].map(e=>e.value),n=x[f[e]].map(e=>e.label);x[f[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[f[e]].value)}}}p&&r.track({cfg:i[e],itemData:v,obj:x,target:g,tracker:m,trackType:h}),y.push(x)}}}const b=p?r.collect(g,{main:d,propsArr:f,props:u}):y;o=[...o,...b]}return o}function mY(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function gY(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=bY)):void 0===t&&(t=yY);for(var n,r,i,o,a,s=new wY(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new wY(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(xY)}function yY(e){return e.children}function bY(e){return Array.isArray(e)?e[1]:null}function vY(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function xY(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function wY(e){this.data=e,this.depth=this.height=0,this.parent=null}function SY(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}wY.prototype=gY.prototype={constructor:wY,count:function(){return this.eachAfter(mY)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return gY(this).eachBefore(vY)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var kY={depth:-1},CY={},EY={};function MY(e){return e.id}function RY(e){return e.parentId}function _Y(){var e,t=MY,n=RY;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){e=`${e}`;let t=e.length;PY(e,t-1)&&!PY(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(AY),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(AY(e)),f.push(EY));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new wY(o),null!=(u=p(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?CY:c)),null!=(u=h(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===CY)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===EY&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===EY;--e)c.data=null}if(s.parent=kY,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(xY),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=SY(e),r):t},r.parentId=function(e){return arguments.length?(n=SY(e),r):n},r.path=function(t){return arguments.length?(e=SY(t),r):e},r}function AY(e){let t=e.length;if(t<2)return"";for(;--t>1&&!PY(e,t););return e.slice(0,t)}function PY(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function IY(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=IY(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=IY(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function TY(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...TY(e[i].children,t-1,n)]);return r}function DY(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>TY(e.children,r-1,n)}return!1}const OY=/^qDimensionInfo(?:\/(\d+))?/,NY=/^\/?qMeasureInfo\/(\d+)/,qY=/\/qAttrExprInfo\/(\d+)/,LY=/\/qAttrDimInfo\/(\d+)/;function jY(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t)).filter(t=>t<e.qDimensionInfo.length)}function zY(e,t){let n=t.cube;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,p=jY(n);return OY.test(d)&&(i=!0,o=+OY.exec(d)[1],d=r.replace(OY,"")),NY.test(d)&&("K"===n.qMode?c=+NY.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+NY.exec(d)[1],u=0):u=+NY.exec(d)[1],d=d.replace(NY,"")),d&&(LY.exec(d)?s=+LY.exec(d)[1]:qY.exec(d)&&(a=+qY.exec(d)[1])),l=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function FY(e,t){let n,r,i=DY(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function $Y(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function BY(e){let t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,p,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(h=g.map(f),f=null),p&&(y=g.map(p),p=null),h=d.reduce?d.reduce(h):h,y=d.reduceLabel?d.reduceLabel(y,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=h)):(h=i,y=i)),s.fields){const e=f?f(h):h;c.push(e),u.push(p&&null!=y?p(y):null!=y?y:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const HY=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=IY(r,e);return o&&o[0]?(t.tree=gY(o[0],n.children||(e=>e[i])),t.tree):null};const VY=e=>{let t=e.propsArr,n=e.props,r=e.cube;e.cache;let i=e.itemDepthObject,o=e.f;for(let e=0;e<t.length;e++){const a=n[t[e]],s=a.fields?a.fields:[a];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==o){const e=FY(i,zY(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function WY(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=eY({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map(e=>a[e]),c=_Y().id(e=>e.__id).parentId(e=>e.__parent)(l);return c}(t):HY(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=jY(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const s=r.normalizeConfig(eY(eY({},e),{},{field:a?a.key():void 0}),t),c=s.props,u=s.main,d=Object.keys(c);l[o]={propsArr:d,props:c,main:u};const f=a?zY(a,{cube:i}):{fieldDepth:0};VY({propsArr:d,props:c,cube:i,cache:n,itemDepthObject:f,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=$Y(r,a,{key:o});BY({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function UY(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!HY(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),u=r.normalizeConfig(i[a],t),d=u.props,f=u.main,p=Object.keys(d),h=zY(c,{cube:s}),m=FY({fieldDepth:0},h),g=m.nodeFn,y=m.attrFn,b=m.valueFn;VY({propsArr:p,props:d,cube:s,cache:n,itemDepthObject:h,f:c});const v=!!i[a].trackBy,x=typeof i[a].trackBy,w={},S=[],k=g(n.tree),C=[];for(let e=0;e<k.length;e++){const t=k[e],n=y?y(b(t)):b(t);if(f.filter&&!f.filter(n))continue;const o=$Y(f,n,{key:l});BY({propsArr:p,props:d,item:t,itemData:n,ret:o,sourceKey:l}),v&&r.track({cfg:i[a],itemData:n,obj:o,target:S,tracker:w,trackType:x}),C.push(o)}const E=v?r.collect(S,{main:f,propsArr:p,props:d}):C;o=[...o,...E]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var GY=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){
139
+ */var CF=(SF||(SF=1,function(e,t){var n;function r(e,t){var n=[],r=0;function i(e){return n.push(e),t}function o(){return n[r++]}return{tokenize:function(t){return t.replace(e,i)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),o)}}}n=new function(){var e="`TMP`",t="`COMMENT`",n="[^\\u0020-\\u007e]",i="(?:[0-9]*\\.[0-9]+|[0-9]+)",o="(?: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])",c="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",u="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",d="(?:[_a-z0-9-]|"+n+"|"+u+")",f=i+"(?:\\s*"+o+"|-?(?:[_a-z]|"+n+"|"+u+")"+d+"*)?",p="((?:-?"+f+")|(?:inherit|auto))",h="((?:-?"+f+")|(?:inherit|auto)|(?:calc\\((?:(?:(?:\\(|\\)|\\t| )|(?:-?"+i+"(?:\\s*"+o+")?)|(?:\\+|\\-|\\*|\\/)){3,})\\)))",m="(#?"+d+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",g="(?:[!#$%&*-~]|"+n+"|"+u+")*?",y="(?![a-zA-Z])",b="(?!("+d+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",v="(?!"+g+s+"\\))",x="(?="+g+s+"\\))",w="(\\s*(?:!important\\s*)?[;}])",S=/`TMP`/g,k=/`TMPLTR`/g,C=/`TMPRTL`/g,E=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),M=new RegExp("("+c+b+"[^;}]+;?)","gi"),R=new RegExp("("+c+"[^\\}]*?})","gi"),_=new RegExp("("+a+")ltr","gi"),A=new RegExp("("+a+")rtl","gi"),P=new RegExp(l+"(left)"+y+v+b,"gi"),I=new RegExp(l+"(right)"+y+v+b,"gi"),T=new RegExp(l+"(left)"+x,"gi"),D=new RegExp(l+"(right)"+x,"gi"),O=/(:dir\( *)ltr( *\))/g,N=/(:dir\( *)rtl( *\))/g,q=new RegExp(l+"(ltr)"+x,"gi"),L=new RegExp(l+"(rtl)"+x,"gi"),j=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+w,"gi"),$=new RegExp("((?:-color|border-style)\\s*:\\s*)"+m+"(\\s+)"+m+"(\\s+)"+m+"(\\s+)"+m+w,"gi"),B=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+f+")","gi"),H=new RegExp("(background-position-x\\s*:\\s*)(-?"+i+"%)","gi"),V=new RegExp("(border-radius\\s*:\\s*)"+p+"(?:(?:\\s+"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?)?(?:(?:(?:\\s*\\/\\s*)"+p+")(?:\\s+"+p+")?(?:\\s+"+p+")?(?:\\s+"+p+")?)?"+w,"gi"),W=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+p,"gi"),U=new RegExp("(text-shadow\\s*:\\s*)"+p+"(\\s*)"+m,"gi"),G=new RegExp("(text-shadow\\s*:\\s*)"+m+"(\\s*)"+p,"gi"),Y=new RegExp("(text-shadow\\s*:\\s*)"+p,"gi"),K=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+p+"(\\s*\\))","gi"),X=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+p+"((?:\\s*,\\s*"+p+"){0,2}\\s*\\))","gi");function J(e,t,n){var r,i;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(i=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(i)+"%"):n=100-parseFloat(n)+"%"),t+n}function Q(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 Z(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter(function(e){return e}),i=n.slice(6,10).filter(function(e){return e}),o=n[10]||"";return t+(i.length?Q(r)+" / "+Q(i):Q(r))+o}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,i){return t+n+ee(r)+i}function re(e,t,n,r,i){return t+n+r+ee(i)}return{transform:function(n,i){var o=new r(M,"`NOFLIP_SINGLE`"),a=new r(R,"`NOFLIP_CLASS`"),s=new r(E,t);return n=s.tokenize(a.tokenize(o.tokenize(n.replace("`","%60")))),i.transformDirInUrl&&(n=n.replace(O,"$1`TMPLTR`$2").replace(N,"$1`TMPRTL`$2").replace(q,"$1"+e).replace(L,"$1ltr").replace(S,"rtl").replace(k,"ltr").replace(C,"rtl")),i.transformEdgeInUrl&&(n=n.replace(T,"$1"+e).replace(D,"$1left").replace(S,"right")),n=n.replace(_,"$1"+e).replace(A,"$1ltr").replace(S,"rtl").replace(P,"$1"+e).replace(I,"$1left").replace(S,"right").replace(j,"$1$2"+e).replace(z,"$1$2e-resize").replace(S,"w-resize").replace(V,Z).replace(W,te).replace(U,re).replace(G,re).replace(Y,te).replace(K,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=o.detokenize(a.detokenize(s.detokenize(n)))}}},e.exports?t.transform=function(e,t,r){var i;return"object"==typeof t?i=t:(i={},"boolean"==typeof t&&(i.transformDirInUrl=t),"boolean"==typeof r&&(i.transformEdgeInUrl=r)),n.transform(e,i)}:"undefined"!=typeof window&&(window.cssjanus=n)}(kF,kF.exports)),kF.exports),EF=st(CF),MF="comm",RF="rule",_F="decl",AF=Math.abs,PF=String.fromCharCode;function IF(e){return e.trim()}function TF(e,t,n){return e.replace(t,n)}function DF(e,t){return 0|e.charCodeAt(t)}function OF(e,t,n){return e.slice(t,n)}function NF(e){return e.length}function qF(e,t){return t.push(e),e}var LF=1,jF=1,zF=0,FF=0,$F=0,BF="";function HF(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:LF,column:jF,length:a,return:"",siblings:s}}function VF(){return $F=FF>0?DF(BF,--FF):0,jF--,10===$F&&(jF=1,LF--),$F}function WF(){return $F=FF<zF?DF(BF,FF++):0,jF++,10===$F&&(jF=1,LF++),$F}function UF(){return DF(BF,FF)}function GF(){return FF}function YF(e,t){return OF(BF,e,t)}function KF(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 XF(e){return IF(YF(FF-1,ZF(91===e?e+2:40===e?e+1:e)))}function JF(e){for(;($F=UF())&&$F<33;)WF();return KF(e)>2||KF($F)>3?"":" "}function QF(e,t){for(;--t&&WF()&&!($F<48||$F>102||$F>57&&$F<65||$F>70&&$F<97););return YF(e,GF()+(t<6&&32==UF()&&32==WF()))}function ZF(e){for(;WF();)switch($F){case e:return FF;case 34:case 39:34!==e&&39!==e&&ZF($F);break;case 40:41===e&&ZF(e);break;case 92:WF()}return FF}function e$(e,t){for(;WF()&&e+$F!==57&&(e+$F!==84||47!==UF()););return"/*"+YF(t,FF-1)+"*"+PF(47===e?e:WF())}function t$(e){for(;!KF(UF());)WF();return YF(e,FF)}function n$(e){return function(e){return BF="",e}(r$("",null,null,null,[""],e=function(e){return LF=jF=1,zF=NF(BF=e),FF=0,[]}(e),0,[0],e))}function r$(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,g=1,y=1,b=0,v=0,x="",w=i,S=o,k=r,C=x;g;)switch(h=v,v=WF()){case 40:108!=h&&58==DF(C,d-1)?(b++,C+="("):C+=XF(v);break;case 41:b--,C+=")";break;case 34:case 39:case 91:C+=XF(v);break;case 9:case 10:case 13:case 32:if(b>0){C+=PF(v);break}C+=JF(h);break;case 92:C+=QF(GF()-1,7);continue;case 47:switch(UF()){case 42:case 47:qF(o$(e$(WF(),GF()),t,n,l),l),5!=KF(h||1)&&5!=KF(UF()||1)||!NF(C)||" "===OF(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[c++]=NF(C)*y;case 125*m:case 59:case 0:if(b>0&&v){C+=PF(v);break}switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(C=TF(C,/\f/g,"")),p>0&&(NF(C)-d||0===m)&&qF(p>32?a$(C+";",r,n,d-1,l):a$(TF(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(qF(k=i$(C,t,n,c,u,i,s,x,w=[],S=[],d,o),o),123===v)if(0===u)r$(C,t,k,k,w,o,d,s,S);else{switch(f){case 99:if(110===DF(C,3))break;case 108:if(97===DF(C,2))break;default:u=0;case 100:case 109:case 115:}u?r$(e,k,k,r&&qF(i$(e,k,k,0,0,i,s,x,i,w=[],d,S),S),i,S,d,s,r?w:S):r$(C,k,k,k,[""],S,0,s,S)}}c=u=p=0,m=y=1,x=C="",d=a;break;case 58:d=1+NF(C),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==VF())continue;switch(C+=PF(v),v*m){case 38:y=u>0?1:(C+="\f",-1);break;case 44:if(b>0)break;s[c++]=(NF(C)-1)*y,y=1;break;case 64:45===UF()&&(C+=XF(WF())),f=UF(),u=d=NF(x=C+=t$(GF())),v++;break;case 45:45===h&&2==NF(C)&&(m=0)}}return o}function i$(e,t,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,p=0===i?o:[""],h=function(e){return e.length}(p),m=0,g=0,y=0;m<r;++m)for(var b=0,v=OF(e,f+1,f=AF(g=a[m])),x=e;b<h;++b)(x=IF(g>0?p[b]+" "+v:TF(v,/&\f/g,p[b])))&&(l[y++]=x);return HF(e,t,n,0===i?RF:s,l,c,u,d)}function o$(e,t,n,r){return HF(e,t,n,MF,PF($F),OF(e,2,-2),0,r)}function a$(e,t,n,r,i){return HF(e,t,n,_F,OF(e,0,r),OF(e,r+1,-1),r,i)}function s$(e,t,n){switch(e.type){case"@import":case _F:case MF:return e.return=e.return||e.value;case RF:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(e){e.type===MF&&(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),s$);return NF(r)?e.return=e.value+"{"+r+"}":""}function l$(e,t,n,r){if("@keyframes"===e.type||"@supports"===e.type||e.type===RF&&(!e.parent||"@media"===e.parent.type||e.parent.type===RF)){var i=EF.transform(s$(e));e.children=i?n$(i)[0].children:[],e.return=""}}Object.defineProperty(l$,"name",{value:"stylisRTLPlugin"});const c$=qE(({options:e,...t})=>Rg(wm(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);let u$=class{#b={on:new Map,once:new Map};#v=10;#x(e){this.listenerCount(e)>this.#v&&console.warn(`Possible EventEmitter memory leak detected. ${this.listenerCount(e)} listeners added to "${String(e)}".`)}#w(e,t,n){const r=this.#b[e].get(t)??new Set;r.add(n),this.#b[e].set(t,r),this.#x(t)}setMaxListeners(e){this.#v=e}on(e,t){this.#w("on",e,t)}once(e,t){this.#w("once",e,t)}off(e,t){this.#b.on.get(e)?.delete(t),this.#b.once.get(e)?.delete(t)}emit(e,...t){this.#b.on.get(e)?.forEach(e=>{e(...t)}),this.#b.once.get(e)?.forEach(e=>{e(...t)}),this.#b.once.delete(e)}listenerCount(e){return(this.#b.on.get(e)?.size??0)+(this.#b.once.get(e)?.size??0)}removeAllListeners(e){void 0===e?(this.#b.on.clear(),this.#b.once.clear()):(this.#b.on.delete(e),this.#b.once.delete(e))}};const d$=Rg(()=>new u$);let f$=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),p$=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}({}),h$=function(e){return e.A="ascending",e.D="descending",e}({}),m$=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const g$=[0,0],y$=e=>"number"==typeof e&&!Number.isNaN(+e),b$=e=>y$(e.qNum),v$=e=>"string"==typeof e&&e.length>0&&!Number.isNaN(+e),x$=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),w$=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},S$=(e,t,n)=>{const r={previousColor:(i=e.localPaletteColors)[(o=t)-(o>0?1:0)],nextColor:i[o+(o<i.length-1?1:0)]};var i,o;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,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===o.value?1:(r-a.value)/(o.value-a.value);return a.gradient&&o.gradient?r-a.value<o.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:o.gradient?{color:l.color,t:c/2}:{color:i.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return h(e.localPaletteColors[t].color??"").blend(h(s.color??""),s.t)},k$=(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:x$(t,e.value)}))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map((e,t)=>({color:w$(r,t,n)}))),r},C$=(e,t,n,r)=>{const i=k$(e,n,r),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:i,localPaletteColors:o}=e;for(let a=0;a<o.length;a++){const o=i&&i[a]?i[a].value:1;if(t>=r&&t<o){n=S$(e,a,t);break}r=o}return n})(i,t);return a},E$=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!y$(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||!y$(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)},M$=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=E$(e,t),i=Math.abs(t);return{min:n??t-i,max:r??t+i}})(n,t),i=((e,t,n)=>{const{limits:r,paletteColors:i,localPaletteColors:o}=e.segments;if(!r||!y$(t))return 0;let a=n&&y$(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=i||o;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:i}},R$=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=M$(i,t),a=((e,t,n,r)=>{const{segments:i}=e;if(!i||!n)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,n.limitPaletteColorIndex))return w$(i,n.limitPaletteColorIndex,r);const a=x$(n.limitRange,t);return C$(i,a,n.limitRange,r)})(i,t,o,r),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},_$=(tm().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)"),A$=4/3,P$="12px",I$="600",T$="Source Sans Pro, sans-serif",D$={height:"auto",fontSize:P$,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"}},O$={"<i>":{fontStyle:"italic"},"<b>":{fontWeight:I$},"<u>":{textDecoration:"underline"},"<s>":{textDecoration:"line-through"}},N$=(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,q$=(e,t)=>e.representation.type===Az.Image&&"fitHeight"===e.representation.imageSize?N$(t,e.representation):e.align,L$=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",j$=(e,t,n)=>{if(!t&&"rtl"===n){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},z$=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,F$=(e,t,n)=>"rtl"===e||t&&!n?"0px":"1px",$$=(e,t,n)=>"rtl"===e?t&&!n?"0px":"1px":"0px",B$=24,H$=ic("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0})),V$=ic(ld,{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?L$(e,r):void 0})),W$=ic(ld,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})(({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:n})=>{const r=e?"24px":"";let i;switch(n){case"left":i={gridTemplateColumns:t?`20px 2fr ${r}`:`1fr ${r}`};break;case"center":{const n=e||t;i={gridTemplateColumns:n?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:n?2:1},[`& .${Dm}`]:{gridColumn:3}};break}case"right":i={gridTemplateColumns:t?`${r} 2fr 20px`:`${r} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${Dm}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...i}}),U$=ic(ld,{shouldForwardProp:e=>"rightAligned"!==e})(({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})),G$=ic(ld,{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"})),Y$=ic(bu,{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})),K$=Rg(),X$=Rg(0),J$=Rg(0),Q$=e=>parseInt(e??D$.fontSize,10)*A$,Z$=4/3,eB=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function tB(e,t,n={index:-1}){const r=t.getColorPickerColor(n);return r&&"none"!==r?r:e}const nB=(e,t)=>e?{borderBottomColor:im.DARK_MODE_BORDER,borderRightColor:im.DARK_MODE_BORDER,borderLeftColor:im.DARK_MODE_BORDER,borderTopColor:im.DARK_MODE_BORDER}:{borderLeftColor:im.BORDER_MEDIUM,borderRightColor:im.BORDER_MEDIUM,borderTopColor:im.BORDER_HEAVY,borderBottomColor:t?im.BORDER_HEAVY:im.BORDER_LIGHT},rB=(e,t,n)=>{if(e&&t&&n){const r=(e=>parseInt(e,10)*Z$+8+1)(e);return r*(t+2)<n.clientHeight-40?"1px":"0px"}return"0px"},iB=e=>e.components?.find(e=>"theme"===e.key),oB=(e,t,n,r=!1)=>{const i=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),o=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:i,color:eB(n?.fontColor)?tB(im.TEXT,t,n?.fontColor):o||im.TEXT,fontSize:n?.fontSize&&`${n.fontSize}px`||a,padding:n&&"padding"in n?n.padding:void 0,...nB(t.background.isDark,r)};return Object.keys(s).forEach(e=>{const t=e;null==s[t]&&delete s[t]}),s};function aB(e,t,n){const r=iB(e)?.header,i=oB("header",t,r,n);return i.background=(e=>{if(void 0===e)return;const t=h(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),i.hoverBackground=sm(i.background??im.WHITE,$m),i.activeBackground=sm(i.background??im.WHITE,Bm),i}const sB=(e,t)=>{const n=e.toLowerCase().match(/<[^>]+>/g)??[];return n.forEach(e=>(e=>e in O$)(e)&&Object.assign(t,O$[e])),t};function lB(e,t,n){const r={};let i={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return t?.qValues?.forEach((e,t)=>{const o=e.qText,a=o&&cm(o);a&&(r[n[t]]=a),i=o?sB(o,i):i}),r.cellBackgroundColor&&!r.cellForegroundColor&&(r.cellForegroundColor=om(r.cellBackgroundColor)),{...e,...r,color:r.cellForegroundColor||e.color,background:r.cellBackgroundColor||e.background,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textDecoration:i.textDecoration}}const cB=25e4,uB=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,dB=5e6,fB=5e5;const pB={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,i="",o=!1;-1===n?r=e:(r=e.slice(0,n),i=e.slice(n+1),o=!0),t.push(function(e,t,n){return{key:hB(e),value:hB(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,i,o))}),t}};function hB(e){try{return decodeURIComponent(e)}catch{return e}}function mB(e){if(!(this instanceof mB))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:()=>pB.fromSearchString(t.search)}})}function gB(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")}mB.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},mB.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=gB(t.key),t.value?n+=`=${gB(t.value)}`:n+=t.useEqualSign?"=":"";return n};var yB=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}},bB=class{decode(e){let t="";const n=new yB(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const vB=e=>e>=0&&e<=1114111,xB=e=>e.match(/[\s]/);var wB=class extends bB{decodeCharacter(e){e.mark();const t=e.next();let n,r,i;if(null==t||"\\"!==t)return e.reset(),null;const o=e.next();if(null==o)return e.reset(),null;switch(o){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(o,16))return o;for(n=o,r=0;r<5&&(i=e.next(),null!=i&&!xB(i));r++){if("NaN"===parseInt(i,16)){e.pushback(i);break}n+=i}const a=parseInt(n,16);return vB(a)?String.fromCharCode(a):"�"}},SB=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}},kB=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.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 SB.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return SB.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||SB.newInstanceIfNeeded(e,t,this._value)}},CB=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 kB);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const EB=(()=>{const e=[],t=[],n=new CB;let r,i,o;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="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["&notin"]="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(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)));return n})();var MB=class extends bB{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,i="";for(t=Math.min(e.remainder().length,EB.getMaxKeyLength()),r=0;r<t;r++)i+=e.next().toLowerCase();const o=EB.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),o.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)&&vB(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)&&vB(r)?String.fromCharCode(r):null}},RB=class extends bB{decodeCharacter(e){e.mark();const t=e.next();let n,r,i,o;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)i=e.nextHex(),null!=i&&(n+=i);return 2===n.length&&(o=parseInt(n,16),vB(o))?String.fromCharCode(o):(e.reset(),null)}};let _B;"undefined"!=typeof document&&(_B=document.createElement("div"));const AB=Array.prototype.indexOf,PB=[",",".","_"," "],IB=[",",".","-","_"," "],TB={width:["%"],height:["%"]},DB={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},OB={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":DB.image,"background-color":DB.color,"border-color":DB.color,"border-image":DB.image,color:DB.color,icon:DB.image,"list-style-image":DB.image,"outline-color":DB.color},NB={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function qB(e,t,n){let r;if(t){if(AB)return AB.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 LB(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return _B.appendChild(n),t=_B.innerHTML,_B.removeChild(n),t}function jB(e,t,n){let r,i,o,a,s,l,c,u,d;for(e=FB(e).toLowerCase(),t=FB(t),o=0;o<NB.attr_name.length;o++)if(e.match(NB.attr_name[o]))throw new Error(`Unsafe attribute name used: ${e}`);for(o=0;o<NB.attr_val.length;o++)if(t.toLowerCase().match(NB.attr_val[o]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=TB[e],r||(r=IB),i="",!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");i+=s}i+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&qB(c,r)<0?(d=u.toString(16),i+=`&#x${d};`):i+=c;return n||(i+='"'),i}function zB(e,t,n){let r,i,o,a,s,l,c,u,d,f;if(e=FB(e).toLowerCase(),t=FB(t),qB(e,NB.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<NB.css_val.length;r++)if(t.toLowerCase().indexOf(NB.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(i=OB[e],i||(i=DB.default),o="",!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");o+=s}o+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&qB(c,i)<0?(d=u.toString(16),f="000000".substr(d.length),o+=`\\${f}${d}`):o+=c;return o}function FB(e,t){let n,r,i,o,a=!1;if(null===e)return null;n=e,r=e,i=0;const s=[new MB,new RB,new wB];for(;!a;){r=n;for(let e=0;e<s.length;e++)o=s[e].decode(n),o!==n&&(i++,n=o);r!==n||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const $B=[];for(let e=0;e<255;e++)$B[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const BB={html:e=>LB(e.unsafe),css(e){let t,n=[];const r=[],i={};let o="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=zB(t,n[t],!0),o+=zB(t,n[t],!0),i[t]=r[t]);return e.map?i:o},attr(e){let t=[];const n=[],r={};let i="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=jB(e,t[e],!0),i+=jB(e,t[e],!0),r[e]=n[e]);return e.map?r:i}};function HB(e,t){throw new Error(t)}var VB={canonicalize:FB,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 i=1;const o=arguments.length;for(;i<o;i++)if(null!=(e=arguments[i]))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?BB.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&HB(this,"Invalid parameter type"),BB.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&HB(this,"Invalid parameter type"),BB.attr(e)):void HB(this,"Invalid parameter type")},encodeForAttr:jB,encodeForAttr2:function(e){return jB("nonsens",e,!0)},encodeForCSS:zB,encodeForHref:function(e){FB(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new mB(e),n=mB.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+mB.encodeSearchParams(r)+t.hash;const i=decodeURI(e).toLowerCase();if(-1!==i.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==i.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,i,o,a,s;for(t||(t=PB),s="",n=0;n<e.length;n++)i=e.charAt(n),o=e.charCodeAt(n),qB(i,t)>=0||null==$B[o]?s+=i:(r=o.toString(16),o<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:LB,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=FB(t).toLowerCase():HB(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=fB,maxByteSizeImage:r=dB}=t??{},{mimeType:i,encoding:o,data:a}=(e=>{const[,t,n,r]=uB.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})(i,o,a);return"image/svg+xml"===i?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 WB=(e,t)=>t.qAttrExps?.qValues?.[e],UB=(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"}}},GB=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:i,imageBox:o,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!VB.isSafeDataURL(t))?{type:Az.Text,url:void 0,text:e,labelStructure:i}:{type:Az.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:UB(r,a),labelStructure:i,imageBox:o},YB=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:Az.Text,text:r};const{minY:i,maxY:o}=((e,t,n)=>{const r="global"===t.yAxis?.scale,i="zeroCenter"===t.yAxis?.position,o=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(i){const e=Math.max(Math.abs(o),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,o),maxY:Math.max(0,a)}:{minY:o,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:i,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:Az.MiniChart,text:r,miniChart:a}},KB=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=r?.qValues?.[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return n?.urlPosition===Pz.Attribute?void 0:n?.urlLabel},XB=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:Az.Link,url:VB.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:Az.Text,url:void 0,text:t,labelStructure:e}}},JB=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:c})=>{const u=Iz(t),d=s(e);return u===Az.Image&&c[Az.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,i,o)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=WB(n.imageUrl??-1,e)?.qText;return o&&(o.maskedValue=t??""),GB({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:u,direction:i})}if("label"===l){const t=o?o.originalValue:r;if(-1===n.imageLabel)return GB({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:u,direction:i});const l=WB(n.imageLabel??-1,e)?.qText??r;return GB({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:u,direction:i})}return{type:Az.Text,url:void 0,labelStructure:o,text:r}})(e,t,n,d,l,a):u===Az.Link?((e,t,n,r,i)=>{const{urlPosition:o}=t??{};if(o===Pz.Attribute){const o=KB(n.url??-1,e,t);return XB({labelStructure:r,text:i||o||"",url:o})}if(o===Pz.Dimension){const o=KB(n.urlLabel??-1,e,t)||i;return r&&(r.maskedValue=o),XB({text:o,labelStructure:r,url:r?.originalValue??i})}return{type:Az.Text,url:void 0,text:i,labelStructure:r}})(e,t,n,a,d):u===Az.Indicator&&c[Az.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:Az.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,i,d):u===Az.MiniChart&&c[Az.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?YB(e,t,o,d):{type:Az.Text,url:void 0,text:d,labelStructure:a}},QB=Rg(e=>{const t=e(yy),n=e(ey);return e(ty),{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}}),ZB=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),eH=({cId:e})=>e??vz(),tH=1e4;function nH(e,t){return[...t].reverse().find(t=>t*e<=tH)||Math.floor(tH/e)}function rH(e,t){if(t?.skipTotals)return{atTop:!1,atBottom:!1};const n=e.qHyperCube.qDimensionInfo.length>0,r=e.qHyperCube.qMeasureInfo.length>0,i=e.qHyperCube.qGrandTotalRow.length>0,o=e.totals?.show,a=e.totals?.position;if(i&&(n&&r||!o&&!n)){if(o||"top"===a)return{atTop:!0,atBottom:!1};if("bottom"===a)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function iH(e,t,n,r){return t?0===n?e.totals?.label??"":"":e.qHyperCube.qGrandTotalRow.at(r)?.qText??""}function oH(e,t){const n=e.qHyperCube.qGrandTotalRow.at(t);return y$(n?.qNum)}function aH(e,t,n,r,i){return e&&!e.auto?r&&"rtl"===i&&"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"!==i?{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 sH=(e,t,n,r)=>"auto"!==t?t:r||"rtl"!==n?e?"right":"left":e?"left":"right",lH=(e,t)=>{if(!e)return;const{background:n,foreground:r}=e,i=h(n??""),o=h(r??""),a=t?"getRGB":"getRGBA",s=i.isInvalid()?void 0:i[a](),l=s?sm(s,$m):void 0,c=s?sm(s,Bm):void 0;return o.isInvalid()&&void 0!==s?{background:s,color:om(s),headerMenuHoverBackground:l,headerMenuActiveBackground:c}:{background:s,color:o.isInvalid()?void 0:o.getRGBA(),headerMenuHoverBackground:l,headerMenuActiveBackground:c}};const cH=(e,t,n,r=()=>!1)=>{const{qHyperCube:{qColumnOrder:i,qDimensionInfo:o,qMeasureInfo:a}}=e,s=o.length+a.length,l=((e,t,n)=>{const r=t.length,{visible:i,hiddenDim:o,hiddenMea:a}=e.reduce((e,i)=>{const o=i<r,{qError:a}=o?t[i]:n[i-r];return 7005===a?.qErrorCode?o?e.hiddenDim.push(i):e.hiddenMea.push(i):e.visible.push(i),e},{visible:[],hiddenDim:[],hiddenMea:[]});return i.map((e,t)=>{const n=e<r,i=(n?o:a).filter(t=>t<e).length,s=e-i;return{colIdx:e,pageColIdx:t,visibleDimInfoIdx:n?s:void 0,visibleMeasureInfoIdx:n?void 0:s-r}})})(i.length===s?i:Array.from(Array(s).keys()),o,a);return l.map(i=>function(e,t,n,r,i=()=>!1){const{qDimensionInfo:o,qMeasureInfo:a,qEffectiveInterColumnSortOrder:s}=e.qHyperCube,{colIdx:l,pageColIdx:c,visibleDimInfoIdx:u,visibleMeasureInfoIdx:d}=t,f=o.length,p=l<f,h=p?o[l]:a[l-f],m=p&&o[l].qGrouping===Hm.Cyclic,g=l===s[0];let y,b,v="",x=!1,w=-1,S=0,k=[];const{representation:C,conditionalColoring:E}=h;if(p&&void 0!==u){const e=h;v=e.qGroupFieldDefs[e.qGroupPos],S=e.qGroupPos,k=e.qGroupFallbackTitles,x=e.qLocked??!1,w=u,({qDimensionType:y}=e)}else({qMiniChart:b}=h);const{qFallbackTitle:M,textAlign:R,qAttrExprInfo:_,qSortIndicator:A,qReverseSort:P,qApprMaxGlyphCount:I,columnWidth:T,qLibraryId:D,headerColor:O}=h;return{isDim:p,isCyclic:m,isLocked:x,fieldId:v,colIdx:l,qLibraryId:D,pageColIdx:c,qApprMaxGlyphCount:I,qReverseSort:P,columnWidth:T??{type:Fm.Auto},selectionColIdx:w,isActivelySorted:g,id:eH(h),label:M??"",groupDimensionPos:S,groupDimensionLabels:k,qAttrExprInfoIDs:_.map(e=>e.id),qAttrExprInfoIndex:ZB(h),sortDirection:A&&"N"!==A?A:"A",totalInfo:iH(e,p,c,d??-1),...!p&&{isTotalNumeric:oH(e,d??-1)},...aH(R,y,p,n,r),representation:C,conditionalColoring:p?void 0:E,qMiniChart:b,headerColor:i("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?lH(O,n):void 0}}(e,i,t,n,r))},uH=(e,t,n,r)=>e?(r?n.nullValueRepresentation?.dimensionText:void 0)??t.qText??"-":n.nullValueRepresentation?.text??t.qText??"-",dH=(e,t)=>t?-2===e.qElemNumber:!!e.qIsNull,fH={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},pH=Rg(e=>{const t=e(hH),n=e(Yg),r=e(QB),i=n.qHyperCube.qSize.qcy,o=r.visibleHeight??t.rowsPerPage,a=r.visibleTop??t.page*o,s=r.visibleHeight??Math.min(o,i-a),l=n.qHyperCube.qSize.qcx;return t.page>0&&a>=i?{...t,page:0}:s*l>tH?{...t,rowsPerPage:nH(l,t.rowsPerPageOptions),page:0}:t}),hH=Rg(fH),mH=Rg(e=>{const t=e(Yg),n=e(yy),r=e(QB);return py(t,n)?{page:r.page||fH.page,rowsPerPage:r.rowsPerPage||fH.rowsPerPage,rowsPerPageOptions:fH.rowsPerPageOptions}:e(pH)},(e,t,n)=>{t(hH,e=>({...e,...n}))}),gH=!0,yH=e=>-1===e.qElemNumber||!!e.qIsTotalCell,bH=Rg(async e=>{const t=e(Yg),n=e(yy),r=e(my),{page:i,rowsPerPage:o}=e(mH),a=e(QB),s=e(Sy),l=e(Wg),c=e(Xg),u=e(Ug),d=t.qHyperCube.qSize.qcx,f=t.qHyperCube.qSize.qcy,p=Math.ceil(f/o),h=a.visibleTop??i*o,m=a.visibleHeight??Math.min(o,f-h),g=f>10,y=rH(t,n),b=cH(t,gH,r,u),v=l.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),x=await(async(e,t,n)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const r=t.qHyperCube.qDataPages.at(0),i=r?.qArea;return r&&i?.qLeft===n.qLeft&&i.qTop===n.qTop&&i.qWidth===n.qWidth&&i.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});c||(a.qTop=h,a.qHeight=m,a.rowsPerPage=o,a.page=i);const w=x.at(0)?.qMatrix.map((e,n)=>{const i=[],o=e.some(yH);return b.forEach((a,s)=>{const c=e[s],u=!a.isDim&&c.qIsNull,d=a.isDim&&dH(c,a.isDim),f=u||d?uH(a.isDim,c,t,v):c.qText,p=u?v$(f):b$(c),g=b$(c)&&!v$(c.qText??"");i[s]={id:vz(),...c,align:sH(p,a.bodyTextAlign,r,gH),rowIdx:n+h,colIdx:a.colIdx,pageRowIdx:n,pageColIdx:s,selectionColIdx:a.selectionColIdx,isSelectable:a.isDim&&!a.isLocked&&!o,isTotalRow:o,isLastRow:n===m-1,isNumeric:p,isDual:g,isNull:(!u||!p)&&dH(c,a.isDim),representation:JB({cell:c,representationProperties:a.representation,attrExprInfoIndex:a.qAttrExprInfoIndex,env:l,conditionalColoring:a.conditionalColoring,miniChartOnMeasure:a.qMiniChart,getText:()=>f,direction:r,enabledFeatures:{[Az.Image]:!0,[Az.Indicator]:!0,[Az.MiniChart]:!0}})}}),i})??[];return{totalColumnCount:d,totalRowCount:f,totalPages:p,paginationNeeded:g,totalsPosition:y,columns:b,rows:w}}),vH=_E(bH,e=>e),xH=Rg(e=>{const t=e(Yg),n=e(yy),r=e(sy),i=e(my),o=e(Ug),a=cH(t,false,i,o),s=rH(t,n),l=t.qHyperCube.qSize.qcy,c=Math.min(cB,l),u=l>cB&&!!r.active;return{totalsPosition:s,columns:a,rows:[],totalRowCount:l,totalColumnCount:t.qHyperCube.qSize.qcx,totalPages:Math.ceil(l/c),paginationNeeded:u}}),wH={totalsPosition:{atTop:!1,atBottom:!1},columns:[],rows:[],totalRowCount:0,totalColumnCount:0,totalPages:0,paginationNeeded:!1},SH=Rg(),kH=Rg(e=>{const t=e(vy),n=e(SH);return n||(t?e(vH)??wH:e(xH))}),CH=Rg(e=>e(kH).totalsPosition),EH=Rg(e=>e(kH).columns),MH=Rg(e=>e(EH).length),RH=Rg(e=>e(kH).rows),_H=Rg(e=>e(kH).totalRowCount),AH=Rg(e=>e(kH).totalColumnCount),PH=Rg(e=>e(kH).paginationNeeded),IH=Rg(e=>{const t=e(_y),n=e(Iy),r=e(Yg),i=e(CH),o=e(RH),a=i.atTop,s=function(e,t,n,r){const i=iB(e)?.content,o=oB("content",t,i);o.background=t.background.color;const a=rB(o.fontSize,n,r),s=i?.hoverColor,l=i?.hoverFontColor,c=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),u=t.getStyle("object","","straightTableV2.content.hover.color"),d=eB(l)||!!u,f=eB(s)||!!c,p=d||f;let h;h=eB(s)?tB(im.HOVER,t,s):c||(d?"":im.HOVER);const m=p?tB(om(h),t,l):"";return{...o,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(r,n,o.length,t),l=aB(r,n,!a),c=function(e,t,n){const r=iB(e)?.content,i=oB("content",t,r),{borderBottomColor:o,borderTopColor:a,background:s}=aB(e,t,n);return{...i,borderBottomColor:o,background:s,borderTopColor:a}}(r,n,a);return{body:s,head:l,totals:c}}),TH=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?"transparent":n}},DH=(e,t,n)=>{const{objectColorFromCSS:r,sheetColorFromCSS:i}=e.background,o=TH(e,t?.background),a=e.getStyle("","",n);return{backgroundColor:o||r||a,backgroundFromStyling:o,sheetColorFromCSS:i}},OH=(e,t,n,r=im.WHITE)=>{const{backgroundColor:i,backgroundFromStyling:o,sheetColorFromCSS:a}=DH(e,t,n);return hm(o,i,a,r)??r},NH=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return P$}},qH=e=>e?.some(e=>"italic"===e)?"italic":"normal",LH=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?I$:"normal",jH=e=>!1===e?1:3,zH=e=>e?.some(e=>"underline"===e)?"underline":"none",FH=Rg(e=>{const t=e(yy),n=e(vy),r=e(Iy),i=e(Yg),o=e(IH),a=e(Ug),{header:s,dimensionValues:l,measureValues:c,totalValues:u,subTotalValues:d,nullValues:f,dimensionNullValues:p,grid:h,content:m}=iB(i)??{},g=a("VNA-670-SEPARATE_NULL_VALUE_STYLING"),y=n?im.WHITE:im.TRANSPARENT,b=OH(r,s,"object.straightTableV2.dimension.label.name.backgroundColor",y),v=t?.maxLineCount??m?.rowHeight??r.getStyle("object.straightTableV2","grid","lineClamp"),x=(g?p:void 0)??f;return{header:{fontFamily:s?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.name","fontFamily")??o.head.fontFamily??T$,fontSize:NH(s?.fontSize??r.getStyle("object.straightTableV2.dimension","label.name","fontSize")??o.head.fontSize),fontStyle:qH(s?.fontStyle),fontWeight:LH(s?.fontStyle,I$),textDecoration:zH(s?.fontStyle),color:TH(r,s?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.name","color")??o.head.color??im.TEXT,background:b},headerMenuHoverBackground:sm(b,$m),headerMenuActiveBackground:sm(b,Bm),dimension:{values:{fontFamily:l?.fontFamily??r.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??o.body.fontFamily??T$,fontSize:NH(l?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.dimension","label.value","fontSize")??o.body.fontSize),fontStyle:qH(l?.fontStyle),fontWeight:LH(l?.fontStyle,"normal"),textDecoration:zH(l?.fontStyle),color:TH(r,l?.fontColor)??TH(r,m?.fontColor)??r.getStyle("object.straightTableV2.dimension","label.value","color")??o.body.color??im.TEXT,background:DH(r,l,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??o.body.background??im.TRANSPARENT}},measure:{values:{fontFamily:c?.fontFamily??r.getStyle("object.straightTableV2.measure","label.value","fontFamily")??o.body.fontFamily??T$,fontSize:NH(c?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.measure","label.value","fontSize")??o.body.fontSize),fontStyle:qH(c?.fontStyle),fontWeight:LH(c?.fontStyle,"normal"),textDecoration:zH(c?.fontStyle),color:TH(r,c?.fontColor)??TH(r,m?.fontColor)??r.getStyle("object.straightTableV2.measure","label.value","color")??o.body.color??im.TEXT,background:DH(r,c,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??o.body.background??im.TRANSPARENT}},totalRow:{fontFamily:u?.fontFamily??r.getStyle("object.straightTableV2.total","label.value","fontFamily")??o.totals.fontFamily??T$,fontSize:NH(u?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.total","label.value","fontSize")??o.totals.fontSize),fontStyle:qH(u?.fontStyle),fontWeight:LH(u?.fontStyle,I$),textDecoration:zH(u?.fontStyle),color:TH(r,u?.fontColor)??TH(r,m?.fontColor)??r.getStyle("object.straightTableV2.total","label.value","color")??o.totals.color??im.TEXT,background:OH(r,u,"object.straightTableV2.total.label.value.backgroundColor",y)},subTotalRow:{fontFamily:d?.fontFamily??r.getStyle("object.straightTableV2.subTotal","label.value","fontFamily")??o.totals.fontFamily??T$,fontSize:NH(d?.fontSize??m?.fontSize??r.getStyle("object.straightTableV2.subTotal","label.value","fontSize")??o.totals.fontSize),fontStyle:qH(d?.fontStyle),fontWeight:LH(d?.fontStyle,I$),textDecoration:zH(d?.fontStyle),color:TH(r,d?.fontColor)??TH(r,m?.fontColor)??r.getStyle("object.straightTableV2.subTotal","label.value","color")??o.totals.color??im.TEXT,background:OH(r,d,"object.straightTableV2.subTotal.label.value.backgroundColor",y)},dimensionNull:{fontStyle:qH(x?.fontStyle),fontWeight:LH(x?.fontStyle,"normal"),textDecoration:zH(x?.fontStyle),color:TH(r,x?.fontColor)??TH(r,m?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??o.body.color??im.TEXT,background:TH(r,x?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??im.NULL_VALUE_BACKGROUND},measureNull:{fontStyle:qH(f?.fontStyle),fontWeight:LH(f?.fontStyle,"normal"),textDecoration:zH(f?.fontStyle),color:TH(r,f?.fontColor)??TH(r,m?.fontColor)??r.getStyle("object.straightTableV2.null","label.value","color")??o.body.color??im.TEXT,background:TH(r,f?.background)??r.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??im.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:v??jH(i.multiline?.wrapTextInCells),headerLineClamp:jH(i.multiline?.wrapTextInHeaders),border:TH(r,h?.border)??r.getStyle("object.straightTableV2","grid","borderColor")??(r.background.isDark?im.DARK_MODE_BORDER:im.BORDER_MEDIUM),divider:TH(r,h?.divider)??r.getStyle("object.straightTableV2.grid","","divider.borderColor")??im.BORDER_HEAVY,hoverColors:{color:TH(r,m?.hoverFontColor)??r.getStyle("object.straightTableV2","","grid.hover.color")??o.body.hoverColors?.color,background:TH(r,m?.hoverColor)??r.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??o.body.hoverColors?.background},zebraStripes:{show:!!h?.zebraStripes?.show,odd:{color:TH(r,h?.zebraStripes?.color?.odd),background:TH(r,h?.zebraStripes?.background?.odd)},even:{color:TH(r,h?.zebraStripes?.color?.even),background:TH(r,h?.zebraStripes?.background?.even)},overrideDimNullValueBackground:void 0===TH(r,x?.background),overrideDimNullValueColor:void 0===TH(r,x?.fontColor),overrideMeasNullValueBackground:void 0===TH(r,f?.background),overrideMeasNullValueColor:void 0===TH(r,f?.fontColor)},lastRowBottomBorder:o.body.lastRowBottomBorder},selectedColors:am(r),contentStaticLineCount:v}}),$H=Rg(e=>{const t=e(FH);return Math.max(Q$(t.header.fontSize)+8,32)}),BH=Rg(e=>{const t=e(FH),n=Q$(t.totalRow.fontSize);return Math.max(n+9,24)}),HH=Rg(e=>{const t=e(FH),n=e(Jg),r=e(Qg);return Math.max(n>0?Q$(t.dimension.values.fontSize):0,r>0?Q$(t.measure.values.fontSize):0)}),VH=Rg(e=>{const t=e(FH),n=e(HH),r=(t.contentStaticLineCount||1)*n;return Math.max(r+9,24)}),WH=Rg(e=>{const t=e(FH),n=Q$(t.subTotalRow.fontSize),r=(t.contentStaticLineCount||1)*n;return Math.max(r+9,24)}),UH=(e,t,n)=>{if(!e.length)return[];const r=[],i=[];let o=t;if(e.forEach((e,a)=>{const{columnWidth:{type:s,pixels:l,percentage:c},label:u,qApprMaxGlyphCount:d,totalInfo:f}=e;let p=0;const h=()=>{r[a]=Math.min(zm.PixelsMax,Math.max(zm.PixelsMin,p)),o-=r[a]};switch(s){case Fm.Pixels:p=(e=>void 0===e||Number.isNaN(+e)?zm.PixelsDefault:+e)(l),h();break;case Fm.Percentage:p=(e=>void 0===e||Number.isNaN(+e)?zm.PercentageDefault:+e)(c)/100*t,h();break;case Fm.FitToContent:e.representation?.type===Az.Image?i.push(a):(p=n(u,f,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case Fm.Auto:i.push(a);break;default:throw new Error(`${s} is not a valid column width type`)}}),i.length){const e=o/i.length;i.forEach(t=>{r[t]=Math.max(zm.AutoMinTable,e)})}return r},GH=Rg(e=>{const t=e(FH),n=e(kH).totalsPosition,r=e(ny),{measureText:i}=e(c$({...t.header,fontWeight:I$})),{measureText:o}=e(c$({...t.totalRow,fontWeight:I$})),{estimateWidth:a}=e(c$(t.dimension.values)),{estimateWidth:s}=e(c$(t.measure.values)),l=n.atBottom||n.atTop;return(e,t,n,c,u,d,f)=>{let p;if(r){const t=4;let n=25;n+=t+24,c&&(n+=20+t),u&&(n+=20),p=i(e)+n}else{let t=9;t+=16,f&&(t+=B$),t+=B$,t+=B$,p=i(e)+t}const h=d?a:s;return Math.max(p,l?o(t)+24+1:0,h(n))}}),YH=Rg(null),KH=Rg(e=>{const t=e(kH),n=e(Ry).width,r=e(J$),i=e(GH);return UH(t.columns,n-r,i)}),XH=Rg(e=>e(YH)??e(KH),(e,t,n)=>{t(YH,n)}),JH=DE(e=>{const t=e(d$);!1===e(K$)&&t.emit("done-adjusting-column-width")}),QH=DE((e,t)=>{e(Yg),t(YH,null)}),ZH=Rg(e=>e(XH).reduce((e,t)=>e+t,0)),eV=({children:e})=>(zg(QH),zg(JH),e);function tV(e){const t=tm();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),jl({...t,direction:e})}const nV={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},rV={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},iV=ic("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":{...nV},"&::-moz-range-track":{...nV},"&::-ms-track":{...nV},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...rV},"&::-moz-range-thumb":{...rV},"&::-ms-thumb":{...rV},"&: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"}})),oV=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:c,accessibilityRelatedArgs:u,direction:d="ltr"})=>{const f=Pm({translator:u.translator}),p=an.useRef({initWidth:e,columnWidth:e,initX:0}),h=n?0:1,m=r&&!c,g=()=>m?p.current.columnWidth-h:"100%",y={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},b=t=>{p.current={initWidth:e,columnWidth:e,initX:t??p.current.initX}};_m(()=>{m&&b()},[e]);const v=e=>{const t=Math.max(e,zm.PixelsMin);p.current.columnWidth=t,o(t)},x=()=>{if(p.current.columnWidth!==p.current.initWidth){const e={type:Fm.Pixels,pixels:p.current.columnWidth};a(e)}l?.(!1)},w=e=>{const t="rtl"===d?p.current.initWidth+p.current.initX-e.clientX:p.current.initWidth+e.clientX-p.current.initX;v(t)},S=e=>{dm(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),x()},k=e=>{const t="rtl"===d?p.current.initWidth+-p.current.initX-e.touches[0].clientX:p.current.initWidth+e.touches[0].clientX-p.current.initX;v(t)},C=e=>{dm(e),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",C),x()},E=!r&&s?e=>{if(e.key===Lm.Left||e.key===Lm.Right){dm(e);const t=5,n=e.key===Lm.Left?t:-t,r="rtl"===d?n:-n;l?.(!0),v(p.current.columnWidth+r)}else e.key===Lm.Space||e.key===Lm.Enter?(dm(e),s(e),l?.(!1),x()):e.key===Lm.Esc&&(dm(e),s(e),l?.(!1),v(p.current.initWidth))}:void 0,M=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(u.columnLabel)]);return vt.jsx(iV,{style:y,hoverColor:i,isLastColumn:n,className:jm,"data-testid":jm,onMouseDown:e=>{dm(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),l?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:Fm.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(dm(e),document.addEventListener("touchmove",k),document.addEventListener("touchend",C),l?.(!0),b(e.touches[0].clientX))},onKeyDown:E,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":zm.PixelsMin,"aria-valuemax":zm.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},aV=(e,t)=>vt.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:vt.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})}),sV=an.forwardRef(aV),lV=({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},cV=ic(ld,{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"})),uV=ic(sV,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),dV=ic(Cp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),fV=ic(nf)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),pV=ic(Ap)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),hV=ic(Ap,{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"})),mV=ic("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"})),gV=ic("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),yV=ic(Cu)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),bV=ic(Jf,{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})),vV=(e,t)=>vt.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:vt.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}),xV=an.forwardRef(vV),wV=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?wV(t):t:e.parentElement?.children?.[0]},SV=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?SV(t):t},kV=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===Lm.Down||t===Lm.Up){const n=e=>t===Lm.Down?wV(e):SV(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},CV=(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 EV={};const MV=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:i,enabled:o,subMenus:a,isSubMenu:s,isActive:l,direction:c,isPagination:u})=>{const[d,f]=an.useState(!1),p=sn.useRef(null),h=an.useCallback(e=>{e.stopPropagation(),f(!1)},[f]);return vt.jsxs(vt.Fragment,{children:[vt.jsxs(hV,{ref:a?p:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),EV={}),a?.length&&(f(!0),EV[r]=f,e.stopPropagation()))},disabled:!o,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:kV,children:[l?vt.jsx(mV,{direction:c,isPagination:u}):null,vt.jsxs(gV,{children:[vt.jsx(bV,{direction:c,isPagination:u,children:vt.jsx(i,{})}),vt.jsx(yV,{variant:"body2",children:r})]}),a?.length?vt.jsx(xV,{}):null]},t),a?.length?vt.jsx(PV,{isSubMenu:!0,open:d,anchorEl:p.current,onClose:h,menuGroups:CV(a,EV),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:u}):null]})},RV=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&vt.jsx(pV,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>vt.jsx(MV,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),_V=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((i,o)=>[RV({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?vt.jsx(fV,{"data-testid":"group-divider",variant:"middle"}):void 0]),AV={appear:0,enter:0,exit:0},PV=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?vt.jsx(dV,{className:Om,open:t,anchorEl:e,onClose:n,transitionDuration:AV,MenuListProps:{id:Nm},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:_V({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,IV=({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>an.useCallback(()=>{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"===i?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:i,onPopoverClose:o})}},[e,t,n,r?.qStateName,i,o]),TV=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),DV=(e,t)=>e.some(e=>t[e]>0),OV={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},NV=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=an.useState(null),[a,s]=an.useState(OV);return _m(()=>{e||(s(OV),o(null))},[e]),an.useEffect(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=TV(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};i=u.qInfo?.qId,a?l():(o(c),d&&s((e=>({canSelectAll:DV(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:DV(["qSelected"],e),canSelectPossible:DV(["qOption"],e),canSelectAlternative:DV(["qAlternative"],e),canSelectExcluded:DV(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},qV=(e,t)=>vt.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:vt.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"})}),LV=an.forwardRef(qV),jV=(e,t)=>vt.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:vt.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"})}),zV=an.forwardRef(jV),FV=(e,t)=>vt.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:vt.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"})}),$V=an.forwardRef(FV),BV=(e,t)=>vt.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:vt.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"})}),HV=an.forwardRef(BV),VV=(e,t)=>vt.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:vt.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"})}),WV=an.forwardRef(VV),UV=(e,t)=>vt.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:vt.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"})}),GV=an.forwardRef(UV),YV=(e,t)=>vt.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:vt.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"})}),KV=an.forwardRef(YV),XV=(e,t)=>vt.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:vt.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"})}),JV=an.forwardRef(XV),QV=(e,t)=>vt.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:vt.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"})}),ZV=an.forwardRef(QV),eW=(e,t)=>vt.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:vt.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"})}),tW=an.forwardRef(eW),nW=(e,t)=>vt.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:vt.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"})}),rW=an.forwardRef(nW),iW=(e,t)=>vt.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:vt.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"})}),oW=an.forwardRef(iW),aW=(e,t)=>vt.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:vt.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"})}),sW=an.forwardRef(aW);let lW=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const cW="/qListObjectDef",uW=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:f})=>{const p=[];if(n[lW.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);p.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"A")),r(!1)},icon:LV,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),r(!1)},icon:HV,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:KV,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:Wj,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&p.push(...t)}if(e.isDim&&o?.select){const i=[];n[lW.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:JV,enabled:!0}]}]),!e.isLocked&&n[lW.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:sW,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(cW))},icon:ZV,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(cW))},icon:oW,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(cW))},icon:tW,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(cW))},icon:rW,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(cW))},icon:zV,enabled:l.canClearSelections}]}]]}]}]),f&&!f.alwaysFullyExpanded&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await f.expandCallback()},icon:GV,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await f.collapseCallback()},icon:WV,enabled:!0}]}]),i.length>0&&p.push(...i)}return n[lW.AdjusterHeaderSize]&&p.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:$V,enabled:!0}]}]),p},dW=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:i,interactions:o,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:c,selectionRelatedArgs:u,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:f,model:p,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:y=Im})=>{const b=an.useRef(null),v=Pm({translator:i}),{qLibraryId:x,fieldId:w,headTextAlign:S}=r,k=u?.app,{fieldInstance:C,selectionActionsEnabledStatus:E}=NV({open:e,headerData:r,app:k,qStateName:u?.qStateName}),M=lV({model:p,headerData:r}),R=IV({qLibraryId:x,fieldId:w,searchRelatedArgs:c,selectionRelatedArgs:u,direction:h}),_=an.useCallback(e=>{e.stopPropagation(),t(!1)},[t]),A=an.useCallback(e=>{e.stopPropagation(),t(e=>!e)},[t]);return o.active?vt.jsxs(cV,{rightAligned:"right"===S,shouldShowMenuIcon:s,className:Dm,onClick:!1===g?A:void 0,ref:b,isAccessibleHeader:g,children:[s?vt.jsx(uV,{height:y,className:Tm,"data-testid":Tm,isInteractionsActive:o.active??!1,children:vt.jsx(sV,{})}):null,vt.jsx(PV,{open:e,anchorEl:!1===g?b.current:n.current,onClose:_,menuGroups:uW({headerData:r,translator:v,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:R,interactions:o,fieldInstance:C,selectionActionsEnabledStatus:E,anchorRef:n,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:f}),direction:h,isPagination:m})]}):null},fW=e=>e.isDark?{background:e.color,borderColor:im.DARK_MODE_BORDER,color:im.DARK_MODE_TEXT,disabledColor:im.DARK_MODE_DISABLED,iconColor:im.DARK_MODE_TEXT}:{background:e.color,borderColor:im.BORDER_MEDIUM,color:im.TEXT,disabledColor:im.DISABLED},pW=ic(ld,{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}`})),hW=ic(ch,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),mW=ic(bd,{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)})),gW=ic(Cu)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),yW=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=an.useMemo(()=>fW(r.background),[r]);if(!n.active)return null;const a=i?vt.jsx(pW,{footerStyle:o,children:e}):null;return t?_c.createPortal(e,t):a},bW=(e,t)=>vt.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:vt.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})}),vW=an.forwardRef(bW),xW=(e,t)=>vt.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:vt.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})}),wW=an.forwardRef(xW),SW={},kW=an.createContext(SW),CW=()=>an.useContext(kW),EW=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:f,interactions:p,rect:h,layout:m,visibilityThreshold:g})=>{const y=(e=>!e.enabled||e.active)(u)?0:-1,b=an.useMemo(()=>fW(f.background),[f]),v=i?i.getBoundingClientRect().width:h.width,x=Pm({translator:d}),w=an.useMemo(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:x,theme:f,interactions:p,rect:h,layout:m,footerStyle:b,tabIndex:y,width:v,visibilityThreshold:g}),[t,n,r,i,o,a,s,l,c,u,x,f,p,h,m,b,y,v,g]);return vt.jsx(kW.Provider,{value:w,children:e})},MW=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:i,translator:o,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":o.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?o.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{i(t)}});let RW=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),_W=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 AW=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:i,footerStyle:o,handleChangePage:a,translator:s,tabIndex:l}=CW(),c=0===t.page,u=MW({type:RW.FirstPage,disabledCondition:c,pageNumber:0,footerStyle:o,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(i?.firstPage||_W.FirstPage)?null:vt.jsx(mW,{...u,disabled:!r.active,children:"rtl"===e?vt.jsx(wW,{height:Im}):vt.jsx(vW,{height:Im})})},PW=(e,t,n=!1)=>{n&&e.key===Lm.Tab&&!e.shiftKey&&(dm(e),um(e.target,t,!1))},IW=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:i,width:o,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:c,translator:u,tabIndex:d}=CW(),f=t.page>=r-1,p=MW({type:RW.LastPage,disabledCondition:f,pageNumber:r-1,footerStyle:l,handleChangePage:c,translator:u,interactions:a,tabIndex:d}),h=n.enabled?e=>{PW(e,n,i)}:void 0;return o<=(s?.lastPage||_W.LastPage)?null:vt.jsx(mW,{...p,onKeyDown:h,disabled:!a.active,children:"rtl"===e?vt.jsx(vW,{height:Im}):vt.jsx(wW,{height:Im})})},TW=(e,t)=>vt.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:vt.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}),DW=an.forwardRef(TW),OW=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:i,width:o,interactions:a,footerStyle:s,handleChangePage:l,translator:c,tabIndex:u}=CW(),d=t.page>=r-1,f=MW({type:RW.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:c,interactions:a,tabIndex:u}),p=!(o>_W.FirstPage&&o>_W.LastPage)&&n.enabled?e=>{PW(e,n,i)}:void 0;return vt.jsx(mW,{...f,onKeyDown:p,disabled:!a.active,children:"rtl"===e?vt.jsx(DW,{height:Im}):vt.jsx(xV,{height:Im})})},NW=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:i,translator:o,tabIndex:a}=CW(),s=0===t.page,l=MW({type:RW.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:i,translator:o,interactions:n,tabIndex:a});return vt.jsx(mW,{...l,disabled:!n.active,children:"rtl"===e?vt.jsx(xV,{height:Im}):vt.jsx(DW,{height:Im})})},qW=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=CW(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||_W.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return vt.jsx(gW,{variant:"caption",dir:"ltr",children:s})},LW=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=CW(),c=i.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,f=`${d}-label-${c}`,p={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":f};return vt.jsxs(vt.Fragment,{children:[vt.jsxs(gW,{variant:"caption",id:f,children:[u,":"]}),vt.jsx(hW,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:p,disabled:!l.active,children:n})]})},jW=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=CW();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||_W.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=vt.jsx(vt.Fragment,{children:e.rowsPerPageOptions.map(e=>vt.jsx("option",{value:e,children:e},e))});return vt.jsx(LW,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},zW=1e3,FW="…",$W=({totalPages:e,page:t})=>{const n=Math.min(e,zW),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-zW):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+o;return vt.jsx("option",{value:t,children:t+1},t)});return o>0&&a.unshift(vt.jsx("option",{value:FW,disabled:!0,children:FW},"startMoreOptions")),i<e-1&&a.push(vt.jsx("option",{value:FW,disabled:!0,children:FW},"endMoreOptions")),vt.jsx(vt.Fragment,{children:a})},BW=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=CW(),{page:o}=e;if(t<=(i?.selectPage||_W.SelectPage))return null;const a=vt.jsx($W,{totalPages:n,page:o});return vt.jsx(LW,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})},HW=e=>vt.jsxs(EW,{...e,children:[vt.jsx(jW,{}),vt.jsx(BW,{}),vt.jsx(qW,{}),vt.jsx(AW,{}),vt.jsx(NW,{}),vt.jsx(OW,{}),vt.jsx(IW,{})]});var VW=an.memo(HW);const WW=e=>vt.jsx(yW,{...e,children:vt.jsx(VW,{...e})}),UW=(e,t,n)=>{const r=n.size,i=r>=t.size;if(r){e({keys:[i?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===r?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",r.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},GW=(e,t,n)=>{n&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},YW=e=>e.ctrlKey||e.metaKey,KW=e=>e.shiftKey&&YW(e),XW=e=>[Lm.Left,Lm.Right,Lm.Up,Lm.Down].includes(e),JW=e=>e.shiftKey&&XW(e.key),QW=e=>(e=>XW(e)||[Lm.Home,Lm.End,Lm.PageUp,Lm.PageDown].includes(e))(e.key)&&!KW(e),ZW=(e,t)=>{const{api:n,rows:r,colIdx:i}=e,{cell:o,announce:a,evt:s}=t;let l=new Map;if(-1===i)n?.begin(["/qHyperCubeDef"]);else{if(i!==o.selectionColIdx)return e;l=new Map(r)}return l=((e,t,n)=>{const{qElemNumber:r,rowIdx:i}=t;return n.ctrlKey||n.metaKey?(new Map).set(r,i):(e.has(r)?e.delete(r):e.set(r,i),new Map(e))})(l,o,s),UW(a,r,l),l.size?(n?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[o.selectionColIdx]]}),{...e,rows:l,colIdx:o.selectionColIdx}):(n?.cancel(),{...e,rows:l,colIdx:-1})},eU=(e,t)=>{const{api:n,rows:r,colIdx:i,pageRows:o,firstCell:a}=e,{cell:s,announce:l,evt:c}=t;if(!(a||"key"in c&&JW(c)))return e;-1===i&&n?.begin(["/qHyperCubeDef"]);const u=((e,t,n,r,i)=>{const o=new Map(t);if("key"in r&&JW(r)){o.set(n.qElemNumber,n.rowIdx);const t=r.key===Lm.Down?1:-1,i=e[n.pageRowIdx+t][n.pageColIdx];return o.set(i.qElemNumber,n.rowIdx+t),o}if(!i)return t;const a=Math.min(i.pageRowIdx,n.pageRowIdx),s=Math.max(i.pageRowIdx,n.pageRowIdx);for(let t=a;t<=s;t++){const n=e[t][i.pageColIdx];o.set(n.qElemNumber,n.rowIdx)}return o})(o,r,s,c,a);return UW(l,r,u),{...e,rows:u,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},tU=e=>{const{api:t,rows:n,colIdx:r,isSelectMultiValues:i,mouseupOutsideCallback:o}=e;return o&&document.removeEventListener("mouseup",o),i&&t?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(n.values()),[r]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},nU=(e,t)=>{switch(t.type){case p$.Select:return ZW(e,t.payload);case p$.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 p$.SelectMouseUp:return((e,t)=>tU(e.isSelectMultiValues||e.firstCell!==t.cell?e:ZW(e,t)))(e,t.payload);case p$.SelectMultiAdd:return eU(e,t.payload);case p$.SelectMultiEnd:return tU(e);case p$.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case p$.Clear:return e.rows.size?{...e,rows:new Map}:e;case p$.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},rU=Rg(e=>{const t=e(oy);return function(e,t){return Rg(e,function(e,n,r){n(this,t(e(this),r))})}({pageRows:e(kH).rows,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1},nU)}),iU=Rg(e=>e(e(rU)),(e,t,n)=>{t(e(rU),n)}),oU=qE(e=>Rg(t=>{const{colIdx:n,rows:r,api:i}=t(iU);return"object"==typeof e&&i?.isModal()?n!==e.selectionColIdx?f$.Disabled:r.has(e.qElemNumber)?f$.Selected:f$.Possible:f$.Inactive}),(e,t)=>"object"!=typeof e||"object"!=typeof t?e===t:e.qElemNumber===t.qElemNumber&&e.selectionColIdx===t.selectionColIdx),aU=Rg(e=>{const t=e(ZH),n=e(Ry).width,r=e(J$);return t>0&&t+r<n}),sU=()=>{const[e,t]=an.useState(!1);return Wq({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?vt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},lU=(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}),cU=Rg(e=>{const t=e(Jg),n=e(ky);if(void 0!==n)return async(e,r)=>{const{isDim:i,colIdx:o,qReverseSort:a,sortDirection:s,isActivelySorted:l}=e,c=i?o:o-t,u=await n.getEffectiveProperties(),d=u.qHyperCubeDef.qInterColumnSortOrder,f=[],p=r!==s||l;if(!i){const e=u.qHyperCubeDef.qMeasures.at(c)?.qSortBy;void 0===e?.qSortByNumeric&&f.push({qPath:`/qHyperCubeDef/qMeasures/${c}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}l||(d.splice(d.indexOf(o),1),d.unshift(o),f.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${d.join(",")}]`})),p&&f.push({qPath:`/qHyperCubeDef/${i?"qDimensions":"qMeasures"}/${c}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),n.applyPatches(f,!0)}}),uU=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r})=>(e>n?e--:t>n&&(t--,e=r),[t,e]),dU=({colIdx:e,rowIdx:t,firstColIdx:n,lastColIdx:r,lastRowIdx:i})=>(e<r?e++:t<i&&(t++,e=n),[t,e]),fU=e=>e.atTop?2:1,pU=(e,t)=>({top:e?fU(t):0,bottom:e&&t.atBottom?1:0}),hU=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],mU=e=>e?.setAttribute("tabIndex","0"),gU=e=>e?.setAttribute("tabIndex","-1"),yU=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(gU)},bU=e=>{e?.focus(),mU(e)},vU=e=>{setTimeout(()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${jm}`);bU(t)},0)},xU=({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,allowedRows:i,direction:o})=>{yU(t);const a=((e,t,n,r,i={top:0,bottom:0})=>{const o=i.top>0,a=i.top,s=t.getElementsByClassName("sn-table-row").length-1-i.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[c,u]=n;switch(e.key){case Lm.Down:c<s&&c++;break;case Lm.Up:c>a&&c--;break;case Lm.Right:if(o)break;[c,u]="rtl"===r?uU({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0}):dU({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case Lm.Left:if(o)break;[c,u]="rtl"===r?dU({colIdx:u,rowIdx:c,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):uU({colIdx:u,rowIdx:c,lastColIdx:l,firstColIdx:0});break;case Lm.Home:(YW(e)||o)&&(c=a),o||(u=0);break;case Lm.End:(YW(e)||o)&&(c=s),o||(u=l);break;case Lm.PageDown:c=Math.min(s,c+10);break;case Lm.PageUp:c=Math.max(a,c-10)}return[c,u]})(e,t,n,o,i),s=hU(t,a);return bU(s),((e,t)=>{const n=t.getElementsByClassName("sn-table-container")[0];if(!n?.scrollTo)return;const[r,i]=e;if(r<2)n.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],o=t.getElementsByClassName("sn-table-row")[r].getElementsByClassName("sn-table-cell")[i];if(!o||!e)return;if(o.offsetTop-e.offsetHeight<n.scrollTop){const t=n.scrollTop-o.offsetHeight-e.offsetHeight;n.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),r(a),{nextCell:s,nextCellCoord:a}},wU=(e,t,n,r)=>{yU(t),n(e),r.enabled&&!r.active?r.focus?.():bU(hU(t,e))},SU=(e,t,n)=>{const r=e.currentTarget;if(!n.enabled||t.current||!r)return;const i=e.relatedTarget??document.activeElement,o=!!i&&r.contains(i),a=!!i?.closest(`.${Om}`);o||a||((e=>{const t=e.querySelector(`.${m$.First}`),n=e.querySelector(`.${m$.Second}`);t&&n&&(t.innerHTML="",n.innerHTML="")})(r),n.blur?.(!1))},kU=(e,t)=>vt.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:vt.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"})}),CU=an.forwardRef(kU),EU=ic(Rh,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"color"!==e})(({headerStyle:e,interactions:t,hoverBackground:n,background:r,color:i})=>({...D$,...e,cursor:t.active?"pointer":"default",background:r,color:i,verticalAlign:"bottom",boxSizing:"border-box","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?n:r}})),MU=ic("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})(({align:e,dir:t})=>({minWidth:P$,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}})),RU=parseInt(P$,10)/2,_U=ic("div")({position:"absolute",bottom:-RU,left:`calc(50% - ${RU}px)`}),AU=ic(Hh)({position:"sticky",top:0,zIndex:1}),PU={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},IU=ic(ld)({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"}}),TU=ic("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:i=!1})=>r&&!i||1===e&&!t?{...PU,whiteSpace:"nowrap",display:n?"block":void 0}:{...PU,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"}),DU=ic("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),OU="cell-text",NU=({children:e,forwardRef:t,isNumeric:n=!1,isPagination:r=!1,isHeadCell:i=!1,isDual:o=!1,lineClamp:a})=>{const s=zg(FH);return i?vt.jsx(TU,{"data-testid":OU,ref:t,className:"sn-table-cell-text",lineClamp:s.grid.headerLineClamp,isPagination:r,isHeadCell:!0,style:{direction:n?"ltr":void 0},children:e}):vt.jsx(TU,{"data-testid":OU,ref:t,className:"sn-table-cell-text",isDual:o,isNumeric:n,lineClamp:a??s.grid.contentLineClamp,isPagination:r,style:{direction:n?"ltr":void 0},children:e})},qU=e=>{const{column:t,isInteractionEnabled:n,open:r,setOpen:i,isPagination:o,forwardRef:a}=e,s=zg(Zg),l=zg(cU),c=zg(my),u=zg(sy),d=zg(Vg),f=zg(Ty),p=zg(Bg),h=zg(XH)[t.pageColIdx],m=zg(Sy),g=an.useRef(null),y=an.useRef(null),b=(({column:e,columnWidth:t})=>{const n=zg(FH),{measureText:r}=Sm({fontSize:n.header.fontSize,fontFamily:n.header.fontFamily,fontWeight:I$});let i=!1,o=!1,a=!1;const s=e.isLocked,l=e.isActivelySorted,c=t-25,u=s?20:0,d=l?20:0;let f=r(e.label);return s&&f+u<=c&&(a=!0,f+=u,l&&f+d<=c&&(o=!0,f+=d)),!s&&l&&f+d<=c&&(o=!0,f+=d),f+24<=c&&(i=!0),{shouldShowMenuIcon:i,shouldShowSortIcon:o,shouldShowLockIcon:a}})({column:t,columnWidth:h}),{StartIcon:v,EndIcon:x,LockIcon:w}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:n,shouldShowLockIcon:r},i)=>{const o="A"===e?vt.jsx(LV,{height:P$,"data-testid":"head-cell-sort-ascending-icon"}):vt.jsx(HV,{height:P$,"data-testid":"head-cell-sort-descending-icon"}),a=n?vt.jsx(MU,{align:t,dir:i,children:o}):void 0,s=r?vt.jsx(U$,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:vt.jsx(CU,{height:P$,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(t,b,c);return vt.jsxs(W$,{shouldShowMenuIcon:b.shouldShowMenuIcon,shouldShowLockIcon:b.shouldShowLockIcon,alignment:j$(t,o,c),children:[w,vt.jsxs(V$,{className:"sn-table-head-label",textAlign:t.headTextAlign,direction:c,isPagination:o,children:[v,vt.jsx(NU,{forwardRef:a,isPagination:o,isHeadCell:!0,children:t.label}),x]}),n?vt.jsxs(vt.Fragment,{children:[vt.jsx(dW,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:f,anchorRef:g,menuAvailabilityFlags:{[lW.Sorting]:!0,[lW.Searching]:!0,[lW.Selections]:!0,[lW.AdjusterHeaderSize]:!0},open:r,setOpen:i,interactions:u,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),l?.(t,n)??Promise.resolve())},searchRelatedArgs:{embed:d,listboxRef:y},selectionRelatedArgs:{app:p,qStateName:s},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:vU},shouldShowMenuIcon:b.shouldShowMenuIcon,model:m,direction:c,isPagination:o,isAccessibleHeader:!0}),vt.jsx(H$,{ref:y,direction:c,isPagination:o}),vt.jsx(H$,{ref:g,direction:c})]}):null]})},LU=(e,t)=>vt.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:vt.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"})}),jU=an.forwardRef(LU),zU=(e,t)=>e.isCyclic&&t,FU=({column:e})=>{const t=zg(FH),n=zg(my),r=zg(Sy),i=sn.useRef(null),[o,a]=sn.useState(!1),s=lV({model:r,headerData:{...e,dimensionInfoIndex:e.colIdx}});return vt.jsxs(vt.Fragment,{children:[vt.jsx(Y$,{hoverBackground:e.headerColor?.headerMenuHoverBackground??t.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??t.headerMenuActiveBackground,isActive:o,tabIndex:-1,onClick:e=>{e.stopPropagation(),a(!0)},children:vt.jsx(jU,{ref:i,height:16,"data-testid":"head-cell-cyclic-icon"})}),vt.jsx(PV,{open:o,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:Wj,isActive:e.groupDimensionPos===n}))}]],anchorEl:i.current,direction:n,isPagination:!1})]})},$U=e=>e.isLocked,BU=({column:e})=>{const t=zg(Bg),n=zg(Zg),r=zg(FH);return vt.jsx(Y$,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??r.headerMenuHoverBackground,onClick:r=>{r.stopPropagation(),(async(e,t,n)=>{const r=TV(t??"$",n);let i;try{const t=await(e?.createSessionObject(r));i=t?.id,await(t?.unlock("/qListObjectDef"))}catch(e){console.error("Failed to unlock field from table header",e)}finally{i&&(await(e?.destroySessionObject(i))||console.error("Failed to destroy session object when unlocking field from table header"))}})(t,n,e)},children:vt.jsx(CU,{height:16,"data-testid":"head-cell-lock-icon"})})},HU=({column:e,menuIconRef:t,open:n,setOpen:r})=>{const i=zg(FH);return vt.jsx(Y$,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??i.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??i.headerMenuActiveBackground,isActive:n,order:e.isDim?void 0:-1,onClick:e=>{e.stopPropagation(),r(e=>!e)},ref:t,children:vt.jsx(sV,{height:16})})},VU=({anchorRef:e,column:t,isPagination:n,listboxRef:r,open:i,setOpen:o})=>{const a=zg(Bg),s=zg(my),l=zg(Vg),c=zg(sy),u=zg(Sy),d=zg(Zg),f=zg(Ty),p=zg(cU);return vt.jsx(dW,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:f,anchorRef:e,menuAvailabilityFlags:{[lW.Sorting]:!0,[lW.Searching]:!0,[lW.Selections]:!0,[lW.AdjusterHeaderSize]:!0},open:i,setOpen:o,interactions:c,sortRelatedArgs:{sortFromMenu:(e,n)=>(e.stopPropagation(),p?.(t,n)??Promise.resolve())},searchRelatedArgs:{embed:l,listboxRef:r},selectionRelatedArgs:{app:a,qStateName:d},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:vU},shouldShowMenuIcon:!1,model:u,direction:s,isPagination:n})},WU=Rg();WU.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 UU=({ref:e,callback:t})=>{const n=zg(WU),r=an.useRef(t);r.current=t,an.useLayoutEffect(()=>{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])},GU=ic(ld)({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",boxSizing:"border-box"}),YU=({children:e})=>{const t=sn.useRef(null),[n,r]=an.useState(()=>new Set(e.filter(({props:e})=>void 0!==e.prio&&e.children).map(({key:e})=>e))),i=an.useMemo(()=>Array.from(e).sort((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)),[e]),o=an.useCallback(e=>{const t=new Set,n=e.contentBoxSize.at(0)?.inlineSize??0;let o=0;i.forEach(e=>{if(e.props.ignore||!e.props.children)return;const r=e.props.minWidth+1;void 0===e.props.prio||o+r<=n?o+=r:t.add(e.key)}),r(e=>e.size===t.size&&[...e].every(e=>t.has(e))?e:t)},[i]);return UU({ref:t,callback:o}),vt.jsx(GU,{ref:t,"data-testid":"responsive-container",children:e.filter(e=>!n.has(e.key))})},KU=({children:e})=>e,XU=(e,t)=>!e.isLocked&&e.isDim&&t,JU=({column:e,open:t,setOpen:n})=>{const r=zg(FH),i=zg(Zg),o=zg(my),a=zg(Vg);zg(Bg);const s=sn.useRef(null),l=an.useCallback(()=>{n(!1)},[n]),c=IV({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:a,listboxRef:s},selectionRelatedArgs:{qStateName:i},direction:o,onPopoverClose:l});return vt.jsx(Y$,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??r.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??r.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),c(),n(!0)},children:vt.jsx(JV,{ref:s,height:16,"data-testid":"head-cell-search-icon"})})},QU=(e,t)=>vt.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:vt.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"})}),ZU=an.forwardRef(QU),eG=(e,t)=>vt.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:vt.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"})}),tG=an.forwardRef(eG),nG=({column:e})=>{const{sortDirection:t,isActivelySorted:n}=e,r="A"===t?vt.jsx(tG,{height:P$,"data-testid":"head-cell-sort-ascending-icon"}):vt.jsx(ZU,{height:P$,"data-testid":"head-cell-sort-descending-icon"});return n?vt.jsx(_U,{children:r}):void 0},rG=0,iG=1,oG=2,aG=3,sG=e=>{const{column:t,open:n,setOpen:r,isPagination:i,forwardRef:o,columnWidth:a,isInteractionEnabled:s}=e,l=zg(FH),c=zg(my),{measureText:u}=Sm(l.header),[d,f]=an.useState(!1),p=an.useRef(null),h=an.useRef(null),m=an.useRef(null),g="number"==typeof a&&a>zm.PixelsMin+18;return vt.jsxs(vt.Fragment,{children:[vt.jsxs(YU,{children:[vt.jsx(KU,{prio:oG,minWidth:B$,children:$U(t)?vt.jsx(BU,{column:t}):null},"Lock"),vt.jsx(KU,{prio:iG,minWidth:B$,children:zU(t,s)?vt.jsx(FU,{column:t}):null},"Cyclic"),vt.jsx(KU,{ignore:!0,children:vt.jsx(nG,{column:t})},"Sort"),vt.jsx(KU,{minWidth:u(t.label)+8,children:vt.jsx(G$,{justifyContent:t.headTextAlign,children:vt.jsx(NU,{forwardRef:o,isPagination:i,isHeadCell:!0,children:t.label})})},"Text"),vt.jsx(KU,{prio:g?void 0:rG,minWidth:B$,children:d||XU(t,s)?vt.jsx(JU,{open:d,setOpen:f,column:t}):null},"Search"),vt.jsx(KU,{prio:aG,minWidth:B$,children:s?vt.jsx(HU,{menuIconRef:m,column:t,open:n,setOpen:r}):null},"Menu")]}),s?vt.jsxs(vt.Fragment,{children:[vt.jsx(H$,{ref:h,direction:c,isPagination:i}),vt.jsx(H$,{ref:p,direction:c}),vt.jsx(VU,{anchorRef:m.current?m:p,column:t,isPagination:i,listboxRef:h,open:n,setOpen:r})]}):null]})},lG=ic("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({background:e,applicableStyle:t,color:n})=>({...t,background:e,color:n})),cG=()=>{},uG=({column:e,isPagination:t})=>{const n=zg(FH),r=zg(my),i=zg(aU),o=zg(CH),a=!1,s=zg(ny)?qU:sG;return vt.jsx(lG,{className:"sn-table-cell",applicableStyle:{...n.header,...lU(n,o,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:F$(r,a,i),borderLeftWidth:$$(r,a,i),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:vt.jsx(s,{column:e,isInteractionEnabled:!1,isPagination:t,open:!1,setOpen:cG})})},dG=({isPagination:e})=>{const t=zg(EH),[n,r]=an.useState();Wq({onDragStart:e=>{const t=e.operation.source?.id;r(t)},onDragEnd:()=>{}});const i=n?t.find(e=>e.id===n):void 0;return i?vt.jsx(Sq,{children:vt.jsx("div",{style:{background:"white",height:"100%",display:"flex",position:"relative"},children:vt.jsx(uG,{column:i,isPagination:e})})}):null},fG=_E(Rg(async e=>{e(Yg);const t=e(ky);return t?.getEffectiveProperties()}),e=>e),pG=Rg(e=>e(fG)?.qHyperCubeDef),hG=[_N.configure({activationConstraints:[new CN.Distance({value:5})],preventActivation:e=>{const t=e.target;return t instanceof HTMLElement&&t.classList.contains("nebula-table-utils-column-adjuster")}})],mG=KN.plugins.filter(e=>e!==nO),gG=(e,t,n)=>{const r=JSON.stringify(t),i=JSON.stringify(n);if(r!==i)return{qPath:e,qOp:"Replace",qValue:i}},yG=(e,t,n,r,i)=>{if(!e||!t||r===i)return;const o=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:n,visibleColumnIds:r,sourceId:i,targetId:o})=>{const a=xz({qDimensions:e,qMeasures:t}),s=[...e,...t],l=r.findIndex(e=>e===i),c=r.findIndex(e=>e===o);if(l<0||c<0||l===c)return;const u=((e,t,n)=>{const r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r})(r,l,c),d=new Map(u.map((e,t)=>[e,t])),f=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}),p=f.filter(e=>e.isDimension).map(e=>e.def),h=f.filter(e=>!e.isDimension).map(e=>e.def),m=[...p,...h],g=new Map(m.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:p,qMeasures:h,qInterColumnSortOrder:wz({previousColumns:s,nextColumns:m,qInterColumnSortOrder:n}),qColumnOrder:u.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:i});if(!o)return;const a=[gG("/qHyperCubeDef/qDimensions",t.qDimensions,o.qDimensions),gG("/qHyperCubeDef/qMeasures",t.qMeasures,o.qMeasures),gG("/qHyperCubeDef/qInterColumnSortOrder",t.qInterColumnSortOrder,o.qInterColumnSortOrder),gG("/qHyperCubeDef/qColumnOrder",t.qColumnOrder,o.qColumnOrder)].filter(e=>void 0!==e);0!==a.length&&e.applyPatches(a,!0)},bG=({children:e})=>{const t=zg(ky),n=zg(pG),r=zg(EH);return vt.jsx(vq,{onDragOver:e=>{const i=e.operation.source?.id,o=e.operation.target?.id;void 0!==o&&i!==o&&yG(t,n,r,i,o)},sensors:hG,plugins:mG,children:e})};function vG(e,t){const n=an.useRef(!1);an.useEffect(()=>{n.current?e():n.current=!0},t)}const xG=(e,t)=>{const n=zg(wy);an.useEffect(()=>{const r=e.current;if(!r)return;const i=e=>{SU(e,t,n)};return r.addEventListener("focusout",i),()=>{r.removeEventListener("focusout",i)}},[e,t,n])},wG=Rg(g$),SG=qE(e=>Rg(t=>{const[n,r]=t(wG);return 0===n&&r===e})),kG=()=>{const e=zg(Hg);an.useEffect(()=>{e.notifyIsDoneRendering()})};var CG={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 EG=Rg(e=>{const t=e(Ty),n=e(_y);let r;return function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(CG).forEach(t=>{e.add(CG[t])})}(t),({keys:e,politeness:i="polite"})=>{const o=e.map(e=>{if(Array.isArray(e)){const[n,...r]=e;return t.get(n,r)}return t.get(e)}).join(" "),a=n.querySelector(`.${m$.First}`),s=n.querySelector(`.${m$.Second}`);if(!a||!s)return void console.error("could not find aria-live elements, which means accessibility is not working properly");let l;r===m$.First?(l=s,r=m$.Second):(l=a,r=m$.First),l.innerHTML=l.innerHTML.endsWith(" ­")?o:`${o} ­`,l.setAttribute("aria-live",i)}}),MG=(e,t)=>{const n=zg(EG),r=zg(_y),i=zg(AH),o=zg(_H),a=zg(RH),s=zg(CH),[l,c]=$g(wG),u=zg(iy),d=zg(wy);vG(()=>{const t=((e,t,n=!1)=>{const r=[fU(t),e[1]];return n?r:g$})(l,s,u);(({resetCellCoord:e,rootElement:t,shouldRefocus:n,isSelectionMode:r,setFocusedCellCoord:i,keyboard:o,announce:a})=>{if(yU(t),i(e),!(e=>!e.enabled||e.active)(o))return;const s=hU(t,e);n.current?(bU(s),n.current=!1):mU(s),r&&(a({keys:[s?.textContent??""]}),GW(a,s,r))})({resetCellCoord:t,rootElement:r,shouldRefocus:e,setFocusedCellCoord:c,isSelectionMode:u,keyboard:d,announce:n})},[a.length,o,i,t])},RG=e=>{dm(e),YW(e)&&Um(e.currentTarget)},_G=e=>{QW(e.evt)&&(dm(e.evt),xU(e))},AG=e=>{const{evt:t,totalsPosition:n,cell:r,isSelectionMode:i}=e;if(!QW(t))return;dm(t);const o=((e,t)=>[e.pageRowIdx+fU(t),e.pageColIdx])(r,n),a=pU(i,n),{nextCell:s,nextCellCoord:l}=xU({...e,cellCoord:o,allowedRows:a});l[0]!==o[0]&&(({evt:e,isSelectionsEnabled:t,cell:n,selectionDispatch:r,announce:i,isSelectionMode:o,nextCell:a})=>{e.shiftKey&&t&&n.isSelectable?r({type:p$.SelectMultiAdd,payload:{cell:n,evt:e,announce:i}}):GW(i,a,o)})({...e,nextCell:s})},PG=e=>{const{evt:t}=e;KW(t)?(({evt:e,totalRowCount:t,rowsPerPage:n,page:r,updateShouldRefocus:i,handleChangePage:o})=>{dm(e);const a=Math.ceil(t/n)-1;e.key===Lm.Right&&r<a?(i(),o(r+1)):e.key===Lm.Left&&r>0&&(i(),o(r-1))})(e):t.key===Lm.Esc?(({evt:e,keyboard:t,isSelectionMode:n})=>{t.enabled&&!n&&(dm(e),t.blur?.(!0))})(e):XW(t.key)&&dm(t)},IG=e=>{const{evt:t,selectionsAPI:n}=e;if(t.currentTarget.classList.contains(f$.Disabled))return void dm(t);const r={...e,isSelectionMode:!!n?.isModal()};switch(t.key){case Lm.Space:(({evt:e,cell:t,isSelectionsEnabled:n,selectionDispatch:r,announce:i})=>{dm(e),t.isSelectable&&n&&r({type:p$.Select,payload:{cell:t,evt:e,announce:i}})})(r);break;case Lm.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{dm(n),e&&(t?.confirm(),r({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(r);break;case Lm.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:n,announce:r})=>{e&&(dm(n),t?.cancel(),r({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(r);break;case Lm.C:RG(t);break;case Lm.Tab:(({evt:e,keyboard:t,isSelectionMode:n,paginationNeeded:r})=>{const i=e.shiftKey||!r;t.enabled&&n&&i&&(dm(e),um(e.currentTarget,t,e.shiftKey))})(r);break;default:AG(r)}},TG=e=>{const t=zg(K$),n=Fg(X$),r=Fg(J$),i=zg(d$),o=an.useRef();UU({ref:e,callback:a=>{const s=()=>{if(e.current){const e=a.borderBoxSize.at(0)?.inlineSize??0,t=a.borderBoxSize.at(0)?.blockSize??0,i=a.contentBoxSize.at(0)?.inlineSize??0,o=t-(a.contentBoxSize.at(0)?.blockSize??0);r(e-i),n(o)}};t?(o.current&&i.off("done-adjusting-column-width",o.current),i.once("done-adjusting-column-width",s),o.current=s):s()}}),an.useEffect(()=>{const e=i;return()=>{o.current&&e.off("done-adjusting-column-width",o.current)}},[i])},DG=ic("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),OG=ic(Ih,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})(({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"})),NG=ic(mh,{shouldForwardProp:e=>"borderRight"!==e})(({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e})),qG=()=>vt.jsxs(vt.Fragment,{children:[vt.jsx(DG,{className:m$.First,"data-testid":m$.First,"aria-live":"polite","aria-atomic":"true"}),vt.jsx(DG,{className:m$.Second,"data-testid":m$.Second,"aria-live":"polite","aria-atomic":"true"})]}),LG=e=>{const t=an.useRef(new Map),n=an.useRef(null);an.useEffect(()=>{n.current=e(t.current),t.current.forEach((e,t)=>{n.current?.observe(t)});const r=t.current,i=n.current;return()=>{i.disconnect(),r.clear()}},[e,n,t]);const r=an.useCallback((e,r)=>{t.current.set(e,r),n.current?.observe(e)},[t,n]),i=an.useCallback(e=>{t.current.delete(e),n.current?.unobserve(e)},[n,t]);return an.useMemo(()=>({addTask:r,removeTask:i}),[r,i])},jG=e=>new ResizeObserver(t=>{t.forEach(t=>{const n=e.get(t.target);n?.(t)})}),zG=()=>LG(jG),FG=({updateShouldRefocus:e,tableWrapperRef:t})=>{const n=zg(oy),r=zg(wy),i=Fg(iU);an.useEffect(()=>{const o=()=>{i({type:p$.Reset})},a=()=>{i({type:p$.Clear})},s=()=>{t.current?.contains(document.activeElement)?e():r.enabled&&r.blur?.(!0),o()};return n?.on("deactivated",o),n?.on("canceled",o),n?.on("confirmed",s),n?.on("cleared",a),()=>{n?.removeListener("deactivated",o),n?.removeListener("canceled",o),n?.removeListener("confirmed",s),n?.removeListener("cleared",a)}},[n,r,i,e,t])},$G=e=>{e.stopPropagation()},BG=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:$G,color:im.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),HG=({href:e,text:t,interactions:n,color:r})=>vt.jsx(Af,{...BG({href:e,text:t,interactions:n,color:r}),children:t}),VG=window.requestIdleCallback??(e=>setTimeout(()=>{e({})},0)),WG=window.cancelIdleCallback??(e=>{clearTimeout(e)}),UG="qDimensionInfo/0",GG="qMeasureInfo/0",YG="x",KG="y";function XG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function JG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QG(Object(n),!0).forEach(function(t){JG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return XG(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?XG(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tY=Object.prototype.hasOwnProperty,nY=Object.prototype.toString,rY=Object.defineProperty,iY=Object.getOwnPropertyDescriptor,oY=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===nY.call(e)},aY=function(e){if(!e||"[object Object]"!==nY.call(e))return!1;var t,n=tY.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&tY.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||tY.call(e,t)},sY=function(e,t){rY&&"__proto__"===t.name?rY(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},lY=function(e,t){if("__proto__"===t){if(!tY.call(e,t))return;if(iY)return iY(e,t).value}return e[t]},cY=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=lY(s,n),s!==(i=lY(t,n))&&(u&&i&&(aY(i)||(o=oY(i)))?(o?(o=!1,a=r&&oY(r)?r:[]):a=r&&aY(r)?r:{},sY(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&sY(s,{name:n,newValue:i}));return s};function uY(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),s=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some((e,t)=>e!==t)){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function dY(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function fY(e){let t=e.cache,n=e.f,r=e.mainCell,i=e.p,o=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,c=e.target,u=e.targetProp,d=e.columnOrder,f=r;if(i.field&&i.field!==n){const e=uY(i.field,o,{cache:t},d);if(-1===e)return;f=cY({qRow:a},e(s))}c[u]=dY(i,f,{key:l})}function pY(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),c=r.normalizeConfig(i[e],t),u=c.props,d=c.main,f=Object.keys(u),p=!!i[e].trackBy,h=typeof i[e].trackBy,m={},g=[],y=[];for(let t=0;t<a.qDataPages.length;t++){const o=uY(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let c=0;c<a.qDataPages[t].qMatrix.length;c++){const b=a.qDataPages[t].qArea.qTop+c,v=cY({qRow:b},o(a.qDataPages[t].qMatrix[c])),x=dY(d,v,{key:s});if(!(d.filter&&!d.filter(v))){for(let e=0;e<f.length;e++){const r=u[f[e]];let i=r.fields||[r];r.fields&&(x[f[e]]=[]);for(let o=0;o<i.length;o++)fY({cache:n,f:l,mainCell:v,p:i[o],prop:f[e],page:a.qDataPages[t],rowIdx:b,row:a.qDataPages[t].qMatrix[c],sourceKey:s,target:r.fields?x[f[e]]:x,targetProp:r.fields?o:f[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[f[e]].map(e=>e.value),n=x[f[e]].map(e=>e.label);x[f[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[f[e]].value)}}}p&&r.track({cfg:i[e],itemData:v,obj:x,target:g,tracker:m,trackType:h}),y.push(x)}}}const b=p?r.collect(g,{main:d,propsArr:f,props:u}):y;o=[...o,...b]}return o}function hY(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function mY(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=yY)):void 0===t&&(t=gY);for(var n,r,i,o,a,s=new xY(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new xY(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(vY)}function gY(e){return e.children}function yY(e){return Array.isArray(e)?e[1]:null}function bY(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function vY(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function xY(e){this.data=e,this.depth=this.height=0,this.parent=null}function wY(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}xY.prototype=mY.prototype={constructor:xY,count:function(){return this.eachAfter(hY)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return mY(this).eachBefore(bY)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var SY={depth:-1},kY={},CY={};function EY(e){return e.id}function MY(e){return e.parentId}function RY(){var e,t=EY,n=MY;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){e=`${e}`;let t=e.length;AY(e,t-1)&&!AY(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(_Y),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(_Y(e)),f.push(CY));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new xY(o),null!=(u=p(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?kY:c)),null!=(u=h(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===kY)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===CY&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===CY;--e)c.data=null}if(s.parent=SY,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(vY),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=wY(e),r):t},r.parentId=function(e){return arguments.length?(n=wY(e),r):n},r.path=function(t){return arguments.length?(e=wY(t),r):e},r}function _Y(e){let t=e.length;if(t<2)return"";for(;--t>1&&!AY(e,t););return e.slice(0,t)}function AY(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function PY(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=PY(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=PY(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function IY(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...IY(e[i].children,t-1,n)]);return r}function TY(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>IY(e.children,r-1,n)}return!1}const DY=/^qDimensionInfo(?:\/(\d+))?/,OY=/^\/?qMeasureInfo\/(\d+)/,NY=/\/qAttrExprInfo\/(\d+)/,qY=/\/qAttrDimInfo\/(\d+)/;function LY(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t)).filter(t=>t<e.qDimensionInfo.length)}function jY(e,t){let n=t.cube;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,p=LY(n);return DY.test(d)&&(i=!0,o=+DY.exec(d)[1],d=r.replace(DY,"")),OY.test(d)&&("K"===n.qMode?c=+OY.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+OY.exec(d)[1],u=0):u=+OY.exec(d)[1],d=d.replace(OY,"")),d&&(qY.exec(d)?s=+qY.exec(d)[1]:NY.exec(d)&&(a=+NY.exec(d)[1])),l=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function zY(e,t){let n,r,i=TY(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function FY(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function $Y(e){let t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,p,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(h=g.map(f),f=null),p&&(y=g.map(p),p=null),h=d.reduce?d.reduce(h):h,y=d.reduceLabel?d.reduceLabel(y,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=h)):(h=i,y=i)),s.fields){const e=f?f(h):h;c.push(e),u.push(p&&null!=y?p(y):null!=y?y:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const BY=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=PY(r,e);return o&&o[0]?(t.tree=mY(o[0],n.children||(e=>e[i])),t.tree):null};const HY=e=>{let t=e.propsArr,n=e.props,r=e.cube;e.cache;let i=e.itemDepthObject,o=e.f;for(let e=0;e<t.length;e++){const a=n[t[e]],s=a.fields?a.fields:[a];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==o){const e=zY(i,jY(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function VY(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=ZG({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map(e=>a[e]),c=RY().id(e=>e.__id).parentId(e=>e.__parent)(l);return c}(t):BY(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=LY(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const s=r.normalizeConfig(ZG(ZG({},e),{},{field:a?a.key():void 0}),t),c=s.props,u=s.main,d=Object.keys(c);l[o]={propsArr:d,props:c,main:u};const f=a?jY(a,{cube:i}):{fieldDepth:0};HY({propsArr:d,props:c,cube:i,cache:n,itemDepthObject:f,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=FY(r,a,{key:o});$Y({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function WY(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!BY(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),u=r.normalizeConfig(i[a],t),d=u.props,f=u.main,p=Object.keys(d),h=jY(c,{cube:s}),m=zY({fieldDepth:0},h),g=m.nodeFn,y=m.attrFn,b=m.valueFn;HY({propsArr:p,props:d,cube:s,cache:n,itemDepthObject:h,f:c});const v=!!i[a].trackBy,x=typeof i[a].trackBy,w={},S=[],k=g(n.tree),C=[];for(let e=0;e<k.length;e++){const t=k[e],n=y?y(b(t)):b(t);if(f.filter&&!f.filter(n))continue;const o=FY(f,n,{key:l});$Y({propsArr:p,props:d,item:t,itemData:n,ret:o,sourceKey:l}),v&&r.track({cfg:i[a],itemData:n,obj:o,target:S,tracker:w,trackType:x}),C.push(o)}const E=v?r.collect(S,{main:f,propsArr:p,props:d}):C;o=[...o,...E]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var UY=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){
140
140
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
141
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,f):"";if(n=(t="-"===(e=e.substring(p,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,v=0;v<f;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}});function YY(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const KY={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"},XY=/%\)?$/,JY=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,QY=/^\(oct\)/i,ZY=/^\(dec\)/i,eK=/^\(hex\)/i,tK=/^\(bin\)/i,nK=/^\(rom\)/i,rK=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,iK=/#|0/g;function oK(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function aK(e,t,n){let r;return JY.test(t)?e=oK(e,Number(/\d{2}/.exec(t)[0]),t,n):QY.test(t)?e=oK(e,8,t,n):ZY.test(t)?e=oK(e,10,t,n):eK.test(t)?e=oK(e,16,t,n):tK.test(t)?e=oK(e,2,t,n):nK.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function sK(e,t,n){const r=YY(e);return n?r:new RegExp(r||"",t)}function lK(e,t,n,r){let i,o,a,s,l,c,u,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=YY(m)),h&&(h=YY(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",s=a?p.substr(0,p.indexOf(a)):p,l=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(sK(c,"g"),t)),u=n,n=".",u&&(a=a.replace(sK(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(u);let y;g[1]&&(y=g[1].match(iK)),e.prefix=s||"",e.postfix=l||"",e.pattern=p,e.maxPrecision=y?y.length:2,e.percentage=XY.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(sK(t,null,!0),"|").concat(sK(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class cK{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return KY;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new cK(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],rK.test(e[0])&&(r.positive.isFunctional=!0),e[1]?rK.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?rK.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||lK(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&lK(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&lK(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=aK(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=GY(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=GY(l,e)}e=e.replace(u.numericRegex,e=>e===a?u.groupTemp:e===o?u.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function uK(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.size,r=void 0===n?5e3:n,i=t.multipleArguments,o=void 0!==i&&i,a=t.toKey,s=void 0===a?e=>e:a;let l,c,u=Object.create(null),d=Object.create(null),f=0,p=0;return l=o?function(){return c=s(...arguments),l.has(c)?l.get(c):l.set(c,e(...arguments))}:t=>(c=s(t),l.has(c)?l.get(c):l.set(c,e(t))),l.set=(e,t)=>(f>=r&&(delete u[d[p]],delete d[p],f--,p++),u[e]=t,d[f]=e,f++,t),l.get=e=>u[e],l.has=e=>e in u,l.clear=()=>{u=Object.create(null),d=Object.create(null),f=0,p=0},l.size=()=>f,l}function dK(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new cK(...t)}(i,e,t,n,r),a=uK(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const fK="D",pK="T",hK="TS",mK="IV",gK=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],yK=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],bK=["January","February","March","April","May","June","July","August","September","October","November","December"],vK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xK(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function wK(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function SK(e,t){let n,r=function(e){const t=e,n=24*wK(t),r=60*wK(n),i=60*wK(r),o=1e3*wK(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class kK{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:gK,qDayNames:yK,qLongMonthNames:bK,qMonthNames:vK}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[pK]:r.qTimeFmt||"hh:mm:ss",[fK]:r.qDateFmt||"YYYY-MM-DD",[hK]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new kK(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=SK(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:xK("".concat(t.year).slice(-2),2),YYY:xK("".concat(t.year).slice(-3),3),def:e=>xK("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:xK("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:xK("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>xK("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>xK("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>xK("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>xK("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r});return s}}function CK(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kK(...t)}function EK(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=CK(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=uK(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==mK?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=CK(i,e,t),r=uK(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function MK(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,c=t.sourceField;const u=s||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),d="dimension"===l?"first":"avg",f=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return EK(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),dK(n,r,i,o,t)}(n,o),p="dimension"===l?"first":(e,t)=>f(t),h={id:()=>r,key:()=>i,raw:()=>n,title:()=>n.qFallbackTitle||n.label,type:()=>l,origin:()=>c,items:()=>(e||(e=a(h)),e),min:()=>n.qMin,max:()=>n.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:d,reduceLabel:p,formatter:()=>f,tags:()=>n.qTags};return h}function RK(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:MK(uY({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=RK("qAttrDimInfo",t,n,a,uY({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=RK("qAttrExprInfo",t,n,a,uY({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=RK("qMeasureInfo",t,n,a,uY({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function _K(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.data,r=e.config,i=void 0===r?{}:r;const o={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},a=n;if(!a)throw new Error('Missing "data" input');if(!a.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const s=_K.util,l={cache:o,cube:a,localeInfo:i.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:i.virtualFields},c={key:()=>t,raw:()=>a,field:e=>function(e,t){let n=t.cache;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,l),fields:()=>o.fields.slice(),extract:e=>l.extractor(e,c,o,s),hierarchy:e=>l.hierarchy(e,c,o,s),_cache:()=>o};"K"===a.qMode||"T"===a.qMode||!a.qMode&&a.qNodesOnDim?(l.extractor=UY,l.hierarchy=WY,l.pages="K"===a.qMode?a.qStackedDataPages:a.qTreeDataPages):"S"===a.qMode?(l.extractor=hY,l.pages=a.qDataPages,l.hierarchy=WY):l.extractor=()=>[],l.fieldExtractor=e=>l.extractor({field:e},c,o,s);const u="S"===a.qMode?e=>e.qElemNumber:void 0,d="S"===a.qMode?e=>e.qNum:void 0;o.wrappedFields.push(...RK("qDimensionInfo",a,t,"",uY({},l,{value:u,type:"dimension"}))),o.wrappedFields.push(...RK("qMeasureInfo",a,t,"",uY({},l,{value:d,type:"measure"}))),o.fields=o.wrappedFields.map(e=>e.instance);const f=e=>{e.forEach(e=>{o.allFields.push(e.instance),f(e.measures),f(e.attrDims),f(e.attrExps)})};return f(o.wrappedFields),(i.virtualFields||[]).forEach(e=>{const n=c.field(e.from),r=MK(eY({meta:n.raw(),id:"".concat(t,"/").concat(e.key),sourceField:n,fieldExtractor:e=>l.extractor({field:e},c,o,s),key:e.key,type:n.type(),localeInfo:l.localeInfo,value:n.value},e.override||{}));o.virtualFields.push(r)}),o.allFields.push(...o.virtualFields),c}const AK=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],PK=/\/qDimensionInfo(?:\/(\d+))?/,IK=/\/qMeasureInfo\/(\d+)/,TK=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,DK=/\/qAttrExprInfo\/(\d+)/,OK=/\/?qHyperCube/,NK=/\/?qTreeData/,qK=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),LK=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function jK(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach(e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;OK.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=qK):NK.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=LK);let s=!0;if(PK.test(e)&&(r=+PK.exec(e)[1]),IK.test(e)&&(i=+IK.exec(e)[1]),TK.test(e)){i=-1,r=0;const e=+TK.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(DK.test(e)){const e=i;if(t){i=0;const a=IY(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce((e,t)=>e+t.qAttrExprInfo.length,i),r=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+DK.exec(n)[1]}else r>-1?(r=-1,i=+DK.exec(n)[1]):i+=+DK.exec(n)[1]+1}return AK.forEach(e=>{let t=tY(e,2),r=t[0],i=t[1];n=n.replace(r,i)}),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach(e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach(e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||s>=o)&&o>-1?n.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})}):n.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}}),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function zK(e){_K.util=e.data("matrix").util,e.data("q",_K),e.formatter("q-number",dK),e.formatter("q-time",EK)}zK.qBrushHelper=jK,zK.selections=jK;var FK=Object.prototype.hasOwnProperty,$K=Object.prototype.toString,BK=Object.defineProperty,HK=Object.getOwnPropertyDescriptor,VK=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===$K.call(e)},WK=function(e){if(!e||"[object Object]"!==$K.call(e))return!1;var t,n=FK.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&FK.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||FK.call(e,t)},UK=function(e,t){BK&&"__proto__"===t.name?BK(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},GK=function(e,t){if("__proto__"===t){if(!FK.call(e,t))return;if(HK)return HK(e,t).value}return e[t]},YK=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=GK(s,n),s!==(i=GK(t,n))&&(u&&i&&(WK(i)||(o=VK(i)))?(o?(o=!1,a=r&&VK(r)?r:[]):a=r&&WK(r)?r:{},UK(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&UK(s,{name:n,newValue:i}));return s},KK="2.11.5";function XK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function JK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QK(Object(n),!0).forEach(function(t){JK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return XK(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?XK(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tX(e){return!!e.changedTouches}function nX(e){return"number"==typeof e&&!isNaN(e)}function rX(e){return"number"!=typeof e||isNaN(e)}function iX(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function oX(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function aX(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function sX(e){const t=eX(iX(e),4),n=t[0],r=t[1];return{x:n,y:r,width:t[2]-n,height:t[3]-r}}function lX(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function cX(e){const t=e||{},n=t.x,r=t.y,i=t.width,o=t.height,a=t.x1,s=t.x2,l=t.y1,c=t.y2,u=t.cx,d=t.cy,f=t.r,p=t.vertices;return nX(u)&&nX(d)&&nX(f)?"circle":nX(a)&&nX(s)&&nX(l)&&nX(c)?"line":nX(n)&&nX(r)&&nX(i)&&nX(o)?"rect":nX(n)&&nX(r)?"point":Array.isArray(p)?p.every(e=>Array.isArray(e))?"geopolygon":"polygon":null}function uX(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}function dX(e){return function(){return e}}const fX=Math.abs,pX=Math.atan2,hX=Math.cos,mX=Math.max,gX=Math.min,yX=Math.sin,bX=Math.sqrt,vX=1e-12,xX=Math.PI,wX=xX/2,SX=2*xX;function kX(e){return e>=1?wX:e<=-1?-wX:Math.asin(e)}const CX=Math.PI,EX=2*CX,MX=1e-6,RX=EX-MX;function _X(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class AX{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?_X:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _X;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>MX)if(Math.abs(u*s-l*c)>MX&&i){let f=n-o,p=r-a,h=s*s+l*l,m=f*f+p*p,g=Math.sqrt(h),y=Math.sqrt(d),b=i*Math.tan((CX-Math.acos((h+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>MX&&this._append`L${e+v*c},${t+v*u}`,this._append`A${i},${i},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>MX||Math.abs(this._y1-c)>MX)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%EX+EX),d>RX?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>MX&&this._append`A${n},${n},0,${+(d>=CX)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function PX(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new AX(t)}function IX(e){return e.innerRadius}function TX(e){return e.outerRadius}function DX(e){return e.startAngle}function OX(e){return e.endAngle}function NX(e){return e&&e.padAngle}function qX(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/bX(s*s+l*l),u=c*l,d=-c*s,f=e+u,p=t+d,h=n+u,m=r+d,g=(f+h)/2,y=(p+m)/2,b=h-f,v=m-p,x=b*b+v*v,w=i-o,S=f*m-h*p,k=(v<0?-1:1)*bX(mX(0,w*w*x-S*S)),C=(S*v-b*k)/x,E=(-S*b-v*k)/x,M=(S*v+b*k)/x,R=(-S*b+v*k)/x,_=C-g,A=E-y,P=M-g,I=R-y;return _*_+A*A>P*P+I*I&&(C=M,E=R),{cx:C,cy:E,x01:-u,y01:-d,x11:C*(i/w-1),y11:E*(i/w-1)}}function LX(){var e=IX,t=TX,n=dX(0),r=null,i=DX,o=OX,a=NX,s=null,l=PX(c);function c(){var c,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-wX,h=o.apply(this,arguments)-wX,m=fX(h-p),g=h>p;if(s||(s=c=l()),f<d&&(u=f,f=d,d=u),f>vX)if(m>SX-vX)s.moveTo(f*hX(p),f*yX(p)),s.arc(0,0,f,p,h,!g),d>vX&&(s.moveTo(d*hX(h),d*yX(h)),s.arc(0,0,d,h,p,g));else{var y,b,v=p,x=h,w=p,S=h,k=m,C=m,E=a.apply(this,arguments)/2,M=E>vX&&(r?+r.apply(this,arguments):bX(d*d+f*f)),R=gX(fX(f-d)/2,+n.apply(this,arguments)),_=R,A=R;if(M>vX){var P=kX(M/d*yX(E)),I=kX(M/f*yX(E));(k-=2*P)>vX?(w+=P*=g?1:-1,S-=P):(k=0,w=S=(p+h)/2),(C-=2*I)>vX?(v+=I*=g?1:-1,x-=I):(C=0,v=x=(p+h)/2)}var T=f*hX(v),D=f*yX(v),O=d*hX(S),N=d*yX(S);if(R>vX){var q,L=f*hX(x),j=f*yX(x),z=d*hX(w),F=d*yX(w);if(m<xX)if(q=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,f=d*l-u*c;if(!(f*f<vX))return[e+(f=(u*(t-o)-d*(e-i))/f)*l,t+f*c]}(T,D,z,F,L,j,O,N)){var $=T-q[0],B=D-q[1],H=L-q[0],V=j-q[1],W=1/yX(function(e){return e>1?0:e<-1?xX:Math.acos(e)}(($*H+B*V)/(bX($*$+B*B)*bX(H*H+V*V)))/2),U=bX(q[0]*q[0]+q[1]*q[1]);_=gX(R,(d-U)/(W-1)),A=gX(R,(f-U)/(W+1))}else _=A=0}C>vX?A>vX?(y=qX(z,F,T,D,f,A,g),b=qX(L,j,O,N,f,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<R?s.arc(y.cx,y.cy,A,pX(y.y01,y.x01),pX(b.y01,b.x01),!g):(s.arc(y.cx,y.cy,A,pX(y.y01,y.x01),pX(y.y11,y.x11),!g),s.arc(0,0,f,pX(y.cy+y.y11,y.cx+y.x11),pX(b.cy+b.y11,b.cx+b.x11),!g),s.arc(b.cx,b.cy,A,pX(b.y11,b.x11),pX(b.y01,b.x01),!g))):(s.moveTo(T,D),s.arc(0,0,f,v,x,!g)):s.moveTo(T,D),d>vX&&k>vX?_>vX?(y=qX(O,N,L,j,d,-_,g),b=qX(T,D,z,F,d,-_,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),_<R?s.arc(y.cx,y.cy,_,pX(y.y01,y.x01),pX(b.y01,b.x01),!g):(s.arc(y.cx,y.cy,_,pX(y.y01,y.x01),pX(y.y11,y.x11),!g),s.arc(0,0,d,pX(y.cy+y.y11,y.cx+y.x11),pX(b.cy+b.y11,b.cx+b.x11),g),s.arc(b.cx,b.cy,_,pX(b.y11,b.x11),pX(b.y01,b.x01),!g))):s.arc(0,0,d,S,w,g):s.lineTo(O,N)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xX/2;return[hX(r)*n,yX(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:dX(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:dX(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:dX(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:dX(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:dX(+e),c):i},c.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:dX(+e),c):o},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:dX(+e),c):a},c.context=function(e){return arguments.length?(s=null==e?null:e,c):s},c}function jX(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function zX(e){this._context=e}function FX(e){return new zX(e)}function $X(e){return e[0]}function BX(e){return e[1]}function HX(e,t,n){var r=null,i=dX(!0),o=null,a=FX,s=null,l=PX(c);function c(c){var u,d,f,p,h,m=(c=jX(c)).length,g=!1,y=new Array(m),b=new Array(m);for(null==o&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&i(p=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],b[f]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(p,u,c),b[u]=+t(p,u,c),s.point(r?+r(p,u,c):y[u],n?+n(p,u,c):b[u]))}if(h)return s=null,h+""||null}function u(){return function(e,t){var n=dX(!0),r=null,i=FX,o=null,a=PX(s);function s(s){var l,c,u,d=(s=jX(s)).length,f=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?$X:dX(e),t="function"==typeof t?t:void 0===t?BX:dX(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:dX(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:dX(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:dX(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?$X:dX(+e),t="function"==typeof t?t:dX(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?BX:dX(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:dX(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:dX(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:dX(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:dX(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:dX(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:dX(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:dX(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function VX(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function WX(e){return e}function UX(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function GX(e){this._context=e}function YX(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function KX(e,t){this._context=e,this._k=(1-t)/6}zX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},GX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:UX(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:UX(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},KX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:YX(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:YX(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var XX=function e(t){function n(e){return new KX(e,t)}return n.tension=function(t){return e(+t)},n}(0);function JX(e,t){this._context=e,this._alpha=t}JX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>vX){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>vX){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var QX=function e(t){function n(e){return t?new JX(e,t):new KX(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ZX(e){return e<0?-1:1}function eJ(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(ZX(o)+ZX(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function tJ(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function nJ(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function rJ(e){this._context=e}function iJ(e){this._context=new oJ(e)}function oJ(e){this._context=e}function aJ(e){this._context=e}function sJ(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function lJ(e,t){this._context=e,this._t=t}function cJ(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function uJ(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function dJ(e,t){return e[t]}function fJ(e){const t=[];return t.key=e,t}function pJ(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function hJ(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function mJ(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map(e=>i[e])},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function gJ(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function yJ(e){return(e=gJ(Math.abs(e)))?e[1]:NaN}rJ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nJ(this,this._t0,tJ(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,nJ(this,tJ(this,n=eJ(this,e,t)),n);break;default:nJ(this,this._t0,n=eJ(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(iJ.prototype=Object.create(rJ.prototype)).point=function(e,t){rJ.prototype.point.call(this,t,e)},oJ.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},aJ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=sJ(e),i=sJ(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},lJ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var bJ,vJ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xJ(e){if(!(t=vJ.exec(e)))throw new Error("invalid format: "+e);var t;return new wJ({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function wJ(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function SJ(e,t){var n=gJ(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}xJ.prototype=wJ.prototype,wJ.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var kJ={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>SJ(100*e,t),r:SJ,s:function(e,t){var n=gJ(e,t);if(!n)return bJ=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(bJ=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+gJ(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function CJ(e){return e}var EJ,MJ,RJ,_J=Array.prototype.map,AJ=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function PJ(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?CJ:(t=_J.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?CJ:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(_J.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e,t){var n=(e=xJ(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,g=e.comma,y=e.precision,b=e.trim,v=e.type;"n"===v?(g=!0,v="g"):kJ[v]||(void 0===y&&(y=12),b=!0,v="g"),(h||"0"===n&&"="===d)&&(h=!0,n="0",d="=");var x=(t&&void 0!==t.prefix?t.prefix:"")+("$"===p?i:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),w=("$"===p?o:/[%p]/.test(v)?l:"")+(t&&void 0!==t.suffix?t.suffix:""),S=kJ[v],k=/[defgprs%]/.test(v);function C(e){var t,i,o,l=x,p=w;if("c"===v)p=S(e)+p,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:S(Math.abs(e),y),b&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==f&&(C=!1),l=(C?"("===f?f:c:"-"===f||"("===f?"":f)+l,p=("s"!==v||isNaN(e)||void 0===bJ?"":AJ[8+bJ/3])+p+(C&&"("===f?")":""),k)for(t=-1,i=e.length;++t<i;)if(48>(o=e.charCodeAt(t))||o>57){p=(46===o?a+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}g&&!h&&(e=r(e,1/0));var E=l.length+e.length+p.length,M=E<m?new Array(m-E+1).join(n):"";switch(g&&h&&(e=r(M+e,M.length?m-p.length:1/0),M=""),d){case"<":e=l+e+p+M;break;case"=":e=l+M+e+p;break;case"^":e=M.slice(0,E=M.length>>1)+l+e+p+M.slice(E);break;default:e=M+l+e+p}return s(e)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(yJ(t)/3))),r=Math.pow(10,-n),i=d(((e=xJ(e)).type="f",e),{suffix:AJ[8+n/3]});return function(e){return i(r*e)}}}}!function(e){EJ=PJ(e),MJ=EJ.format,RJ=EJ.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const IJ=new Date,TJ=new Date;function DJ(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>DJ(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(IJ.setTime(+t),TJ.setTime(+r),e(IJ),e(TJ),Math.floor(n(IJ,TJ))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const OJ=6e4,NJ=864e5,qJ=6048e5,LJ=DJ(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*OJ)/NJ,e=>e.getDate()-1);LJ.range;const jJ=DJ(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/NJ,e=>e.getUTCDate()-1);jJ.range;const zJ=DJ(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/NJ,e=>Math.floor(e/NJ));function FJ(e){return DJ(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*OJ)/qJ)}zJ.range;const $J=FJ(0),BJ=FJ(1),HJ=FJ(2),VJ=FJ(3),WJ=FJ(4),UJ=FJ(5),GJ=FJ(6);function YJ(e){return DJ(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/qJ)}$J.range,BJ.range,HJ.range,VJ.range,WJ.range,UJ.range,GJ.range;const KJ=YJ(0),XJ=YJ(1),JJ=YJ(2),QJ=YJ(3),ZJ=YJ(4),eQ=YJ(5),tQ=YJ(6);KJ.range,XJ.range,JJ.range,QJ.range,ZJ.range,eQ.range,tQ.range;const nQ=DJ(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());nQ.every=e=>isFinite(e=Math.floor(e))&&e>0?DJ(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,nQ.range;const rQ=DJ(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function iQ(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function oQ(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aQ(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=iQ,n=(t,n)=>iQ(e(t),n),r=(t,n)=>e(t)-n):(t=e===iQ||e===oQ?e:sQ,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function sQ(){return 0}rQ.every=e=>isFinite(e=Math.floor(e))&&e>0?DJ(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,rQ.range;const lQ=aQ(iQ).right;aQ(function(e){return null===e?NaN:+e}).center;var cQ=lQ;class uQ extends Map{constructor(e,t=fQ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(dQ(this,e))}has(e){return super.has(dQ(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function dQ({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function fQ(e){return null!==e&&"object"==typeof e?e.valueOf():e}const pQ=Math.sqrt(50),hQ=Math.sqrt(10),mQ=Math.sqrt(2);function gQ(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=pQ?10:o>=hQ?5:o>=mQ?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?gQ(e,t,2*n):[s,l,c]}function yQ(e,t,n){return gQ(e=+e,t=+t,n=+n)[2]}function bQ(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function vQ(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function xQ(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function wQ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=_Q(i),u=AQ(i),d=_Q(o),f=AQ(o),p=_Q(a),h=AQ(a),m=_Q(s),g=AQ(s),y=_Q(l),b=AQ(l),v={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:XQ,e:XQ,f:tZ,g:fZ,G:hZ,H:JQ,I:QQ,j:ZQ,L:eZ,m:nZ,M:rZ,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:LZ,s:jZ,S:iZ,u:oZ,U:aZ,V:lZ,w:cZ,W:uZ,x:null,X:null,y:dZ,Y:pZ,Z:mZ,"%":qZ},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:gZ,e:gZ,f:wZ,g:TZ,G:OZ,H:yZ,I:bZ,j:vZ,L:xZ,m:SZ,M:kZ,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:LZ,s:jZ,S:CZ,u:EZ,U:MZ,V:_Z,w:AZ,W:PZ,x:null,X:null,y:IZ,Y:DZ,Z:NZ,"%":qZ},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:FQ,e:FQ,f:UQ,g:qQ,G:NQ,H:BQ,I:BQ,j:$Q,L:WQ,m:zQ,M:HQ,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:jQ,Q:YQ,s:KQ,S:VQ,u:IQ,U:TQ,V:DQ,w:PQ,W:OQ,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:qQ,Y:NQ,Z:LQ,"%":GQ};function S(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=SQ[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function k(e,t){return function(n){var r,i,o=xQ(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=vQ(xQ(o.y,0,1))).getUTCDay(),r=i>4||0===i?XJ.ceil(r):XJ(r),r=jJ.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=bQ(xQ(o.y,0,1))).getDay(),r=i>4||0===i?BJ.ceil(r):BJ(r),r=LJ.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?vQ(xQ(o.y,0,1)).getUTCDay():bQ(xQ(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,vQ(o)):bQ(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in SQ?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}var SQ={"-":"",_:" ",0:"0"},kQ=/^\s*\d+/,CQ=/^%/,EQ=/[\\^$*+?|[\]().{}]/g;function MQ(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function RQ(e){return e.replace(EQ,"\\$&")}function _Q(e){return new RegExp("^(?:"+e.map(RQ).join("|")+")","i")}function AQ(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function PQ(e,t,n){var r=kQ.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function IQ(e,t,n){var r=kQ.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function TQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function DQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function OQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function NQ(e,t,n){var r=kQ.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function qQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function LQ(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jQ(e,t,n){var r=kQ.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function zQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function FQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $Q(e,t,n){var r=kQ.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function BQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function HQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function VQ(e,t,n){var r=kQ.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function WQ(e,t,n){var r=kQ.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function UQ(e,t,n){var r=kQ.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function GQ(e,t,n){var r=CQ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function YQ(e,t,n){var r=kQ.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function KQ(e,t,n){var r=kQ.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function XQ(e,t){return MQ(e.getDate(),t,2)}function JQ(e,t){return MQ(e.getHours(),t,2)}function QQ(e,t){return MQ(e.getHours()%12||12,t,2)}function ZQ(e,t){return MQ(1+LJ.count(nQ(e),e),t,3)}function eZ(e,t){return MQ(e.getMilliseconds(),t,3)}function tZ(e,t){return eZ(e,t)+"000"}function nZ(e,t){return MQ(e.getMonth()+1,t,2)}function rZ(e,t){return MQ(e.getMinutes(),t,2)}function iZ(e,t){return MQ(e.getSeconds(),t,2)}function oZ(e){var t=e.getDay();return 0===t?7:t}function aZ(e,t){return MQ($J.count(nQ(e)-1,e),t,2)}function sZ(e){var t=e.getDay();return t>=4||0===t?WJ(e):WJ.ceil(e)}function lZ(e,t){return e=sZ(e),MQ(WJ.count(nQ(e),e)+(4===nQ(e).getDay()),t,2)}function cZ(e){return e.getDay()}function uZ(e,t){return MQ(BJ.count(nQ(e)-1,e),t,2)}function dZ(e,t){return MQ(e.getFullYear()%100,t,2)}function fZ(e,t){return MQ((e=sZ(e)).getFullYear()%100,t,2)}function pZ(e,t){return MQ(e.getFullYear()%1e4,t,4)}function hZ(e,t){var n=e.getDay();return MQ((e=n>=4||0===n?WJ(e):WJ.ceil(e)).getFullYear()%1e4,t,4)}function mZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+MQ(t/60|0,"0",2)+MQ(t%60,"0",2)}function gZ(e,t){return MQ(e.getUTCDate(),t,2)}function yZ(e,t){return MQ(e.getUTCHours(),t,2)}function bZ(e,t){return MQ(e.getUTCHours()%12||12,t,2)}function vZ(e,t){return MQ(1+jJ.count(rQ(e),e),t,3)}function xZ(e,t){return MQ(e.getUTCMilliseconds(),t,3)}function wZ(e,t){return xZ(e,t)+"000"}function SZ(e,t){return MQ(e.getUTCMonth()+1,t,2)}function kZ(e,t){return MQ(e.getUTCMinutes(),t,2)}function CZ(e,t){return MQ(e.getUTCSeconds(),t,2)}function EZ(e){var t=e.getUTCDay();return 0===t?7:t}function MZ(e,t){return MQ(KJ.count(rQ(e)-1,e),t,2)}function RZ(e){var t=e.getUTCDay();return t>=4||0===t?ZJ(e):ZJ.ceil(e)}function _Z(e,t){return e=RZ(e),MQ(ZJ.count(rQ(e),e)+(4===rQ(e).getUTCDay()),t,2)}function AZ(e){return e.getUTCDay()}function PZ(e,t){return MQ(XJ.count(rQ(e)-1,e),t,2)}function IZ(e,t){return MQ(e.getUTCFullYear()%100,t,2)}function TZ(e,t){return MQ((e=RZ(e)).getUTCFullYear()%100,t,2)}function DZ(e,t){return MQ(e.getUTCFullYear()%1e4,t,4)}function OZ(e,t){var n=e.getUTCDay();return MQ((e=n>=4||0===n?ZJ(e):ZJ.ceil(e)).getUTCFullYear()%1e4,t,4)}function NZ(){return"+0000"}function qZ(){return"%"}function LZ(e){return+e}function jZ(e){return Math.floor(+e/1e3)}const zZ=mJ();zZ("d3-number",function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=PJ(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o}),zZ("d3-time",function(e){let t=wQ({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=wQ(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r});const FZ={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return zZ(t.type||"d3-number")(t.format||"")})(e)};function $Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.id,r=void 0===n?FZ.id:n,i=t.key,o=void 0===i?FZ.key:i,a=t.min,s=void 0===a?FZ.min:a,l=t.max,c=void 0===l?FZ.max:l,u=t.type,d=void 0===u?FZ.type:u,f=t.tags,p=void 0===f?FZ.tags:f,h=t.title,m=void 0===h?FZ.title:h,g=t.values,y=void 0===g?FZ.values:g,b=t.value,v=void 0===b?FZ.value:b,x=t.label,w=void 0===x?FZ.label:x,S=t.formatter,k=void 0===S?FZ.formatter:S;return{id:()=>r(e),key:()=>o(e),raw:()=>e,tags:()=>p(e),type:()=>d(e),min:()=>s(e),max:()=>c(e),title:()=>m(e),items:()=>y(e),formatter:()=>k(e),value:v,label:w}}const BZ=e=>e.filter(e=>"number"==typeof e&&!isNaN(e)),HZ=e=>e.reduce((e,t)=>e+t,0),VZ={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=BZ(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=BZ(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=BZ(e);return t.length?t.reduce((e,t)=>e+t,0):NaN},avg:e=>{const t=BZ(e),n=t.length;return n?HZ(t)/n:NaN}};function WZ(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach(a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map(n=>WZ(e,t,{main:n},r).main):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=VZ[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?VZ[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=VZ[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?VZ[l.field.reduceLabel]:l.field.reduceLabel))}),i}function UZ(e,t){const n=WZ(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{}).main;return{props:WZ(e,t,e.props||{},n),main:n}}function GZ(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function YZ(e,t){let n=t.main,r=t.propsArr,i=t.props,o=[];const a=n.field.formatter(),s={};return r.forEach(e=>{s[e]=i[e].field?i[e].field.formatter():e=>e}),o.push(...e.map(e=>{const t=GZ(e.items,n,a);return r.forEach(n=>{t[n]=GZ(e.items,i[n],s[n],n)}),t})),o}function KZ(e){let t=e.cfg,n=e.itemData,r=e.obj,i=e.target,o=e.tracker;const a="function"===e.trackType?t.trackBy(n):n[t.trackBy];let s=o[a];s||(s=o[a]={items:[],id:a},i.push(s)),s.items.push(r)}function XZ(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function JZ(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const QZ={diverging:function(e,t){const n=e.length;if(n<=0)return;const r=e[t[0]].length;for(let i=0;i<r;++i){let r=0,o=0;for(let a=0;a<n;++a){const n=e[t[a]][i],s=n[1]-n[0];s>=0?(n[0]=r,r+=s,n[1]=r):s<0?(n[1]=o,o+=s,n[0]=o):n[0]=r}}},none:cJ,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}cJ(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}cJ(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,cJ(e,t)}}},ZZ={ascending:function(e){var t=e.map(hJ);return uJ(e).sort(function(e,n){return t[e]-t[n]})},insideout:function(e){var t,n,r=e.length,i=e.map(hJ),o=function(e){var t=e.map(pJ);return uJ(e).sort(function(e,n){return t[e]-t[n]})}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:uJ,reverse:function(e){return uJ(e).reverse()}};function e0(e,t,n,r){const i=r||e.items,o={},a=t.stackKey,s=t.value,l=t.startProp||"start",c=t.endProp||"end",u=t.offset||"none",d=t.order||"none",f=t.valueRef||"";let p=0,h={};for(let e=0;e<i.length;e++){let t=i[e],n=f?t[f]:null;if(n&&n.source){let e="".concat(n.source.key||"","/").concat(n.source.field);h[e]||(h[e]=n.source)}let r=a(t);o[r]=o[r]||{items:[]},o[r].items.push(t),p=Math.max(p,o[r].items.length)}const m=Array.apply(null,{length:p}).map(Number.call,Number),g=Object.keys(o).map(e=>o[e].items),y=function(){var e=dX([]),t=uJ,n=cJ,r=dJ;function i(i){var o,a,s=Array.from(e.apply(this,arguments),fJ),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=jX(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:dX(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:dX(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?uJ:"function"==typeof e?e:dX(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?cJ:e,i):n},i}().keys(m).value((e,t)=>e[t]?s(e[t]):0).order(ZZ[d]).offset(QZ[u]);let b=y(g),v=[];for(let e=0;e<b.length;e++){let t=b[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[l]={value:n[0]},r[c]={value:n[1]},v.push(n[0],n[1]))}}let x=Object.keys(h).map(e=>{let t=n(h[e].key);return t?t.field(h[e].field):null}).filter(e=>!!e);const w=$Z({title:x.map(e=>e.title()).join(", "),min:JZ(v),max:XZ(v),type:"measure",formatter:x[0]?x[0].formatter:void 0});e.fields.push(w)}function t0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map(e=>({value:e,label:String(e)}));else if(e){if("collection"in e)n=ZK({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map(e=>({value:o(e),label:String(a(e))}));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach(e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))}),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map(t=>({value:o(t),label:String(a(t)),source:{field:e.field}})))}else e.fields&&e.fields.forEach(e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))});n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&(Array.isArray(e.stack.stackByKey)?e.stack.stackByKey.forEach(r=>{const i=n.items.filter(e=>{var t;return(null===(t=e.key)||void 0===t?void 0:t.value)&&e.key.value===r});e0(n,e.stack,t.dataset,i)}):e0(n,e.stack,t.dataset,n.items))}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function n0(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t0;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function r0(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const i0=Symbol("implicit");function o0(){var e=new uQ,t=[],n=[],r=i0;function i(i){let o=e.get(i);if(void 0===o){if(r!==i0)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new uQ;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return o0(t,n).unknown(r)},r0.apply(i,arguments),i}function a0(){var e,t,n=o0().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,f=d?a:o,p=d?o:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return f+e*t});return i(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return a0(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},r0.apply(d(),arguments)}function s0(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function l0(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function c0(){}var u0=.7,d0=1/u0,f0="\\s*([+-]?\\d+)\\s*",p0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",h0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",m0=/^#([0-9a-f]{3,8})$/,g0=new RegExp(`^rgb\\(${f0},${f0},${f0}\\)$`),y0=new RegExp(`^rgb\\(${h0},${h0},${h0}\\)$`),b0=new RegExp(`^rgba\\(${f0},${f0},${f0},${p0}\\)$`),v0=new RegExp(`^rgba\\(${h0},${h0},${h0},${p0}\\)$`),x0=new RegExp(`^hsl\\(${p0},${h0},${h0}\\)$`),w0=new RegExp(`^hsla\\(${p0},${h0},${h0},${p0}\\)$`),S0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function k0(){return this.rgb().formatHex()}function C0(){return this.rgb().formatRgb()}function E0(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=m0.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?M0(t):3===n?new A0(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?R0(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?R0(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=g0.exec(e))?new A0(t[1],t[2],t[3],1):(t=y0.exec(e))?new A0(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=b0.exec(e))?R0(t[1],t[2],t[3],t[4]):(t=v0.exec(e))?R0(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=x0.exec(e))?N0(t[1],t[2]/100,t[3]/100,1):(t=w0.exec(e))?N0(t[1],t[2]/100,t[3]/100,t[4]):S0.hasOwnProperty(e)?M0(S0[e]):"transparent"===e?new A0(NaN,NaN,NaN,0):null}function M0(e){return new A0(e>>16&255,e>>8&255,255&e,1)}function R0(e,t,n,r){return r<=0&&(e=t=n=NaN),new A0(e,t,n,r)}function _0(e,t,n,r){return 1===arguments.length?function(e){return e instanceof c0||(e=E0(e)),e?new A0((e=e.rgb()).r,e.g,e.b,e.opacity):new A0}(e):new A0(e,t,n,null==r?1:r)}function A0(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function P0(){return`#${O0(this.r)}${O0(this.g)}${O0(this.b)}`}function I0(){const e=T0(this.opacity);return`${1===e?"rgb(":"rgba("}${D0(this.r)}, ${D0(this.g)}, ${D0(this.b)}${1===e?")":`, ${e})`}`}function T0(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function D0(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function O0(e){return((e=D0(e))<16?"0":"")+e.toString(16)}function N0(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new L0(e,t,n,r)}function q0(e){if(e instanceof L0)return new L0(e.h,e.s,e.l,e.opacity);if(e instanceof c0||(e=E0(e)),!e)return new L0;if(e instanceof L0)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new L0(a,s,l,e.opacity)}function L0(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function j0(e){return(e=(e||0)%360)<0?e+360:e}function z0(e){return Math.max(0,Math.min(1,e||0))}function F0(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}s0(c0,E0,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:k0,formatHex:k0,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return q0(this).formatHsl()},formatRgb:C0,toString:C0}),s0(A0,_0,l0(c0,{brighter(e){return e=null==e?d0:Math.pow(d0,e),new A0(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?u0:Math.pow(u0,e),new A0(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new A0(D0(this.r),D0(this.g),D0(this.b),T0(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:P0,formatHex:P0,formatHex8:function(){return`#${O0(this.r)}${O0(this.g)}${O0(this.b)}${O0(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:I0,toString:I0})),s0(L0,function(e,t,n,r){return 1===arguments.length?q0(e):new L0(e,t,n,null==r?1:r)},l0(c0,{brighter(e){return e=null==e?d0:Math.pow(d0,e),new L0(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?u0:Math.pow(u0,e),new L0(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new A0(F0(e>=240?e-240:e+120,i,r),F0(e,i,r),F0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new L0(j0(this.h),z0(this.s),z0(this.l),T0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=T0(this.opacity);return`${1===e?"hsl(":"hsla("}${j0(this.h)}, ${100*z0(this.s)}%, ${100*z0(this.l)}%${1===e?")":`, ${e})`}`}}));var $0=e=>()=>e;function B0(e){return 1===(e=+e)?H0:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):$0(isNaN(t)?n:t)}}function H0(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):$0(isNaN(e)?t:e)}var V0=function e(t){var n=B0(t);function r(e,t){var r=n((e=_0(e)).r,(t=_0(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=H0(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function W0(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function U0(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Z0(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function G0(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Y0(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function K0(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Z0(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var X0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,J0=new RegExp(X0.source,"g");function Q0(e,t){var n,r,i,o=X0.lastIndex=J0.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=X0.exec(e))&&(r=J0.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Y0(n,r)})),o=J0.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Z0(e,t){var n,r=typeof t;return null==t||"boolean"===r?$0(t):("number"===r?Y0:"string"===r?(n=E0(t))?(t=n,V0):Q0:t instanceof E0?V0:t instanceof Date?G0:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?W0:Array.isArray(t)?U0:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?K0:Y0)(e,t)}function e1(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function t1(e){return+e}var n1=[0,1];function r1(e){return e}function i1(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function o1(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=i1(i,r),o=n(a,o)):(r=i1(r,i),o=n(o,a)),function(e){return o(r(e))}}function a1(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=i1(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=cQ(e,t,1,r)-1;return o[n](i[n](t))}}function s1(){var e,t,n,r,i,o,a=n1,s=n1,l=Z0,c=r1;function u(){var e=Math.min(a.length,s.length);return c!==r1&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?a1:o1,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Y0)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,t1),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=e1,u()},d.clamp=function(e){return arguments.length?(c=!!e||r1,u()):c!==r1},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function l1(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?yQ(t,e,n):yQ(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=xJ(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(yJ(t)/3)))-yJ(Math.abs(e)))}(o,a))||(r.precision=i),RJ(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yJ(t)-yJ(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-yJ(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return MJ(r)}function c1(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?gQ(t,e,n):gQ(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return l1(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=yQ(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function u1(){var e=s1()(r1,r1);return e.copy=function(){return t=e,u1().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},r0.apply(e,arguments),c1(e)}function d1(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[cQ(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return d1().domain(t).range(n).unknown(e)},r0.apply(i,arguments)}function f1(e){return void 0===e?e=>e:t=>e(t)}function p1(e){return Math.max(0,Math.min(1,e))}function h1(e){return"object"==typeof e}function m1(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function g1(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...m1(t,o,a)),o-=a-o,a=e[i],r.push(...m1(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...m1(t,o,a))):r.push(...m1(t,o,a))}return r.filter(e=>e>=n.min()&&e<=n.max())}function y1(e){let t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,l=void 0===s?void 0:s;const c=rX(a)||rX(t)?2:Math.max(t/a,2),u=Math.min(1e3,Math.round(c));let d=n.ticks(u);d.length<=1&&(d=n.ticks(u+1));const f=i>0?g1(d,i,n):d;f.sort((e,t)=>e-t);const p=f.map(f1(l));return f.map((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:p[t],value:e,isMinor:-1===d.indexOf(e)}})}function b1(e){let t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,l=void 0===s?void 0:s;const c=rX(a)||rX(t)?2:Math.max(t/a,2),u=Math.min(1e3,Math.round(c)),d=u>10?10:u;n.nice(d);const f=n.ticks(u),p=i>0?g1(f,i,n):f;p.sort((e,t)=>e-t);const h=p.map(f1(l));return p.map((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:h[t],value:e,isMinor:-1===f.indexOf(e)}})}function v1(e){let t,n=e.settings,r=e.scale,i=e.distance,o=e.formatter,a=void 0===o?e=>e:o;const s=n.minorTicks&&!rX(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter(e=>"object"==typeof e?!rX(e.value):!rX(e));t=function(e){let t=e.values,n=e.scale,r=e.formatter,i=void 0===r?e=>e:r;return t.sort((e,t)=>(h1(e)?e.value:e)-(h1(t)?t.value:t)).filter((e,t,r)=>{const i=h1(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t}).map(e=>{const t=h1(e),r=t?e.value:e,o=n(r);return{position:o,value:r,label:t&&void 0!==e.label?e.label:i(r),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?p1(n(e.start)):o,end:t&&!isNaN(e.end)?p1(n(e.end)):o}})}({values:e,scale:r.copy(),formatter:a})}else if(rX(n.ticks.count)){t=(n.ticks.tight?b1:y1)({distance:i,minorCount:s,unitDivider:n.ticks.distance,scale:r,formatter:a}),n.ticks.forceBounds&&function(e,t,n){const r=e.map(e=>e.position),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,a)}else{t=function(e){let t=e.count,n=e.minorCount,r=e.scale,i=e.formatter;return r.ticks((t-1)*n+t).map((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!==0,value:e}})}({count:Math.min(1e3,n.ticks.count),minorCount:s,scale:r.copy(),formatter:a})}return t}function x1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach(i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]}),r}const w1={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},S1={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},k1={count:NaN};function C1(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function E1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=u1(),i={instance:null,invert:!1},o={data:t,resources:n},a=x1(e,w1,o);let s;function l(e){return rX(e)?NaN:r(e)}a.ticks=x1(e.ticks,S1,o),a.minorTicks=x1(e.minorTicks,k1,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=YK(!0,{},a,e.settings),e.scale=l,s=v1(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=E1(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return C1(i,l),i.instance(e)},l.normInvert=function(e){return C1(i,l),i.instance.invert(e)};const c=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map(e=>e.min()).filter(e=>!isNaN(e)),r=t.map(e=>e.max()).filter(e=>!isNaN(e));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter(e=>!isNaN(e));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]),u=c.mini,d=c.maxi;return l.domain([u,d]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const M1={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function R1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=x1(e,M1,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let t=e.scale;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}})}(t,n.trackBy)}}const c=a0();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=YK({datum:i[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const _1={depth:0};function A1(e,t,n){return e.ancestors().map(e=>t(YK({datum:e.data},n))).reverse().slice(1).toString()}const P1=e=>e.min(),I1=e=>e.max();function T1(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(P1).filter(nX);i=e.length?Math.min(...e):i}if(!r){const e=t.map(I1).filter(nX);o=e.length?Math.max(...e):o}}return[i,o]}const D1={domain:[],range:[],invert:!1,min:NaN,max:NaN};function O1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=E1(e,t,n).clamp(!0).interpolate(V0),i=x1(e,D1,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;YK(!0,s,r);const l=eX(T1(i,t?t.fields:[]),2),c=l[0],u=l[1],d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[],p=a?i.range:f;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),c,u)),s}const N1={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function q1(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const L1={domain:[],range:[]};const j1={domain:[],range:[],unknown:void 0},z1={domain:[],range:[],override:!1};const F1=mJ();function $1(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach(e=>{r.extract.push({field:e})}));const i=t0(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map(e=>"dimension"===e.type()?"band":"linear");return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}F1("linear",E1),F1("band",R1),F1("h-band",function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=x1(t,M1,i);o.ticks=x1(t.ticks,_1,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=R1(o);const s=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter(e=>{if(e.depth>0){const t=A1(e,i,n),d=e.leaves()||[e],f=i(YK({datum:e.data},n)),p=o(YK({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:f,label:p,leftEdge:A1(d[0],i,n),rightEdge:A1(d[Math.max(d.length-1,0)],i,n),node:e};h?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(p)),(r<=0&&!h||e.depth===r)&&c.push(m),l[t]=m}});const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),l=s.values,c=s.labels,u=s.items,d=s.ticks,f=function(e){const t=String(e),n=u[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};YK(!0,f,a),f.bandwidth=function(e){const t=u[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=f(t.leftEdge),r=f(t.rightEdge);return Math.abs(e-r)+n}return n},f.step=function(e){const t=u[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},f.data=()=>n,f.datum=e=>{const t=u[String(e)];return t?t.node.data:null},f.copy=()=>e(t,n,r),f.labels=()=>c,f.ticks=()=>d.map(e=>{const t=f(e.key),n=f.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}});const p=a.pxScale;return f.pxScale=function(e){return a=p(e),f},f.domain(l),f}),F1("sequential-color",O1),F1("threshold-color",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=d1(),i=x1(e,N1,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return rX(e)?NaN:r(e)}Object.keys(r).forEach(e=>s[e]=r[e]);const l=eX(T1(i,t.fields),2),c=l[0],u=l[1],d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[];let p=a?i.range:f,h=[];return h=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=u1().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(p,c,u):[c+(u-c)/2],p.length>h.length+1?h=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(p,c,u):p.length<h.length+1&&(p=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=O1().domain([n,r]).range(t);return[n,...q1(e),r].map(e=>i(e))}(h,p,c,u)),s.data=()=>t,s.range(i.invert?p.slice().reverse():p),s.domain(h),s}),F1("categorical-color",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=o0(),i={data:t,resources:n},o=x1(e,L1,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=YK({datum:l[e]},i),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(u),r}(e,t,n),i=n.theme,o=x1(e,j1,{data:t,resources:n});let a;if(o.explicit=x1(e.explicit,z1,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map((t,r)=>[e.indexOf(t),t,n[r]]).sort((e,t)=>e[0]-t[0]);r.forEach(t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])})}a.length=e.length}return r.range(a),r});var B1={};function H1(){H1.init.call(this)}B1.isObject=function(e){return"object"==typeof e&&null!==e},B1.isNumber=function(e){return"number"==typeof e},B1.isUndefined=function(e){return void 0===e},B1.isFunction=function(e){return"function"==typeof e};var V1=H1;H1.EventEmitter=H1,H1.prototype._events=void 0,H1.prototype._maxListeners=void 0,H1.defaultMaxListeners=10,H1.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},H1.prototype.setMaxListeners=function(e){if(!B1.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},H1.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],B1.isUndefined(n))return!1;if(B1.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(B1.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},H1.prototype.addListener=function(e,t){var n;if(!B1.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,B1.isFunction(t.listener)?t.listener:t),this._events[e]?B1.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,B1.isObject(this._events[e])&&!this._events[e].warned)&&((n=B1.isUndefined(this._maxListeners)?H1.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,B1.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),B1.isFunction(console.trace)&&console.trace()));return this},H1.prototype.on=H1.prototype.addListener,H1.prototype.once=function(e,t){if(!B1.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},H1.prototype.removeListener=function(e,t){var n,r,i,o;if(!B1.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||B1.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(B1.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},H1.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],B1.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},H1.prototype.listeners=function(e){return this._events&&this._events[e]?B1.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},H1.listenerCount=function(e,t){return e._events&&e._events[t]?B1.isFunction(e._events[t])?1:e._events[t].length:0};var W1={mixin:e=>(Object.keys(V1.prototype).forEach(t=>{e[t]=V1.prototype[t]}),V1.init(e),e)};function U1(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;var s=o.min;e=void 0===s?e:s;var l=o.max;t=void 0===l?t:l,void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const c=Math.max(e,Math.min(t-r,n));n!==c&&(n=c,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return W1.mixin(i),i}function G1(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||U1();return o.update({min:n,max:r,viewSize:i}),o}function Y1(e,t){return e<=t}function K1(e,t){return e<t}function X1(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function J1(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=n.includeMax,i=void 0===r||r,o=n.includeMin;e=i?Y1:K1,t=void 0===o||o?Y1:K1},i.add=e=>{let t=e.min,n=e.max;const i=X1(r,t),o=X1(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let t=e.min,n=e.max;const i=X1(r,t),o=X1(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let t=e.min,n=e.max;const i=X1(r,t,!0),o=X1(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function Q1(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const Z1={key:void 0,includeMin:!0,includeMax:!0};function e2(e){let t=e.items,n=e.collection,r=e.vc;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function t2(e){let t=e.items,n=e.collection;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function n2(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function r2(e){let t=e.key,n=e.collection,r=e.obj,i=e.fn,o=e.value;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function i2(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function o2(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?YK({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce((e,t)=>t(e),r):r}function a2(e){return e.replace(/(-[a-z])/g,e=>e.toUpperCase().replace("-",""))}function s2(e){return e.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase()))}function l2(e,t,n){let r=n.ranges,i=n.interceptors,o=n.rc,a=n.aliases,s=n.rangeConfig;const l=o2(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach(e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}}),c}function c2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vc,n=void 0===t?Q1:t,r=e.rc,i=void 0===r?J1:r,o=!1,a={},s={},l={},c={sources:{},default:YK({},Z1)};const u={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},d=()=>{const e={values:{},ranges:{}};return Object.keys(s).forEach(t=>{e.values[t]=s[t].values()}),Object.keys(a).forEach(t=>{e.ranges[t]=a[t].ranges()}),e},f={ls:[],clear(){this.ls.forEach(e=>e.clear())},start(){this.ls.forEach(e=>e.start())},end(){this.ls.forEach(e=>e.end())},update(){const e=d();this.ls.forEach(t=>t._state(e))},updateValues(){const e=d();this.ls.forEach(t=>t._state({values:e.values}))},updateRanges(){const e=d();this.ls.forEach(t=>t._state({ranges:e.ranges}))}},p={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(c={sources:{},default:YK({},Z1)},e.ranges.forEach(e=>{const t={};Object.keys(Z1).filter(e=>"key"!==e).forEach(n=>{t[n]=void 0!==e[n]?e[n]:Z1[n]}),void 0!==e.key?c.sources[e.key]=t:c.default=t}),Object.keys(a).forEach(e=>a[e].configure(c.sources[e]||c.default)),p.emit("update",[],[]))},link:e=>{if(p===e)throw new Error("Can't link to self");f.ls.push(e),e._state(d())},_state:e=>{if(!e)return d();if(e.values){const t=[];Object.keys(e.values).forEach(n=>{s[n]&&e.values[n].join(";")===s[n].toString()||t.push({key:n,values:e.values[n]})}),Object.keys(s).forEach(n=>{e.values[n]||t.push({key:n,values:[]})}),t.length&&p.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach(n=>{a[n]&&e.ranges[n].join(";")===a[n].toString()||t.push({key:n,ranges:e.ranges[n]})}),Object.keys(a).forEach(n=>{e.ranges[n]||t.push({key:n,ranges:[]})}),t.length&&p.setRanges(t)}},start:function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];p.emit("start",...t),f.start()}},end:function(){if(o){o=!1,a={},s={};for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];p.emit("end",...t),f.end()}},isActive:()=>o,clear:()=>{const e=p.brushes().filter(e=>"value"===e.type&&e.brush.values().length).map(e=>({id:e.id,values:e.brush.values()})),t=Object.keys(a).length>0||e.length;a={},s={},t&&(p.emit("update",[],e),f.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(a).map(e=>({type:"range",id:e,brush:a[e]}))),e=e.concat(Object.keys(s).map(e=>({type:"value",id:e,brush:s[e]}))),e},addValue:(e,t)=>{p.addValues([{key:e,value:t}])},addValues:e=>{const t=o2(u.addValues,e,l),r=e2({vc:n,collection:s,items:t});p.emit("add-values",t),r.length&&(o||(o=!0,p.emit("start")),p.emit("update",r,[]),f.updateValues())}};return p.setValues=e=>{const t=o2(u.setValues,e,l),r=function(e){let t=e.items,n=e.vCollection,r=e.vc;const i={},o=n2(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||r2({key:a,value:e,collection:n,obj:i,fn:r})},f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)a=f[e],o[a].forEach(d);return l=i2(c,i),s=i2(i,c),[s,l]}({items:t,vCollection:s,vc:n});p.emit("set-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,p.emit("start")),p.emit("update",r[0],r[1]),f.updateValues())},p.removeValue=(e,t)=>{p.removeValues([{key:e,value:t}])},p.removeValues=e=>{const t=o2(u.removeValues,e,l),n=t2({collection:s,items:t});p.emit("remove-values",t),n.length&&(p.emit("update",[],n),f.updateValues())},p.addAndRemoveValues=(e,t)=>{const r=o2(u.addValues,e,l),i=o2(u.removeValues,t,l),a=e2({vc:n,collection:s,items:r}),c=t2({collection:s,items:i});p.emit("add-values",r),p.emit("remove-values",i),(a.length||c.length)&&(o||(o=!0,p.emit("start")),p.emit("update",a,c),f.updateValues())},p.toggleValue=(e,t)=>{p.toggleValues([{key:e,value:t}])},p.toggleValues=e=>{const t=o2(u.toggleValues,e,l),r=function(e){let t=e.items,n=e.values,r=e.vc;const i={},o={},a=[],s=[],l=n2(t);let c,u,d;const f=Object.keys(l);for(let e=0,t=f.length;e<t;e++){c=f[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):r2({key:c,value:u,collection:n,obj:i,fn:r})}const p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)c=p[e],a.push({id:c,values:i[c]});const h=Object.keys(o);for(let e=0,t=h.length;e<t;e++)c=h[e],s.push({id:c,values:o[c]});return[a,s]}({items:t,values:s,vc:n});p.emit("toggle-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,p.emit("start")),p.emit("update",r[0],r[1]),f.updateValues())},p.containsValue=(e,t)=>{let n=l[e]||e;return!!s[n]&&s[n].contains(t)},p.addRange=(e,t)=>{p.addRanges([{key:e,range:t}])},p.addRanges=e=>{l2(e,"add",{ranges:a,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),f.updateRanges())},p.removeRange=(e,t)=>{p.removeRanges([{key:e,range:t}])},p.removeRanges=e=>{l2(e,"remove",{ranges:a,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),f.updateRanges())},p.setRange=(e,t)=>{p.setRanges([{key:e,range:t}])},p.setRanges=e=>{l2(e,"set",{ranges:a,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),f.updateRanges())},p.toggleRange=(e,t)=>{p.toggleRanges([{key:e,range:t}])},p.toggleRanges=e=>{l2(e,"toggle",{ranges:a,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),f.updateRanges())},p.containsRangeValue=(e,t)=>{let n=l[e]||e;return!!a[n]&&a[n].containsValue(t)},p.containsRange=(e,t)=>{let n=l[e]||e;return!!a[n]&&a[n].containsRange(t)},p.containsMappedData=(e,t,n)=>{let r=[];const i=Object.keys(e);let o,c,u,d;for(let t=0,n=i.length;t<n;t++){if(o=i[t],"value"===o)c=e,r[t]={key:"",i:t,bool:!1};else{if("source"===o)continue;c=e[o],r[t]={key:o,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in l&&(u=l[u]),d=c.value,a[u]?r[t].bool=Array.isArray(d)?a[u].containsRange({min:d[0],max:d[1]}):a[u].containsValue(d):s[u]&&s[u].contains(d)&&(r[t].bool=!0))}return t?(r=r.filter(e=>-1!==t.indexOf(e.key)),"and"===n?!!r.length&&!r.some(e=>!1===e.bool):"xor"===n?!!r.length&&r.some(e=>e.bool)&&r.some(e=>!1===e.bool):r.some(e=>e.bool)):r.some(e=>e.bool)},p.intercept=(e,t)=>{const n=a2(e);u[n]&&u[n].push(t)},p.removeInterceptor=(e,t)=>{const n=a2(e);if(!u[n])return;const r=u[n].indexOf(t);-1!==r&&u[n].splice(r,1)},p.removeAllInterceptors=e=>{const t=[];if(e){const n=a2(e);u[n]&&u[n].length&&t.push({name:e,handlers:u[n]})}else Object.keys(u).forEach(e=>{u[e].length&&t.push({name:s2(e),handlers:u[e]})});t.forEach(e=>{e.handlers.slice().forEach(t=>p.removeInterceptor(e.name,t))})},p.addKeyAlias=(e,t)=>{l[e]=t},p.removeKeyAlias=e=>{delete l[e]},W1.mixin(p),p}function u2(e){return e*e*e}function d2(e){return--e*e*e+1}function f2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}mJ();const p2=["stroke","fill","color","backgroundColor","thumbColor"];function h2(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=m2(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function m2(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?Y0:"string"===r?(i=E0(t))&&p2.includes(n)?(t=i,V0):Q0:t instanceof E0?V0:t instanceof Date?G0:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?W0:Array.isArray(t)?h2:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?g2:Y0)(e,t)}function g2(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=m2(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function y2(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const b2={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},v2=/^\$/;function x2(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function w2(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function S2(e,t){return e.pxScale?e.pxScale(t):e}const k2={normalizeSettings:function(e,t,n){const r=YK({},e),i=YK({},t);return Object.keys(r).forEach(e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(x2(o)){let n=t[e];"string"==typeof n&&v2.test(n)&&(n=b2[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))}),Object.keys(t).forEach(e=>{if(e in r)return;const n=t[e];"string"===typeof n&&v2.test(n)?i[e]=b2[n]:i[e]=n}),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,f=u&&o in s,p=d?s[c.ref]:f?s[o]:a;x2(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&p?(r[o]=c.scale(p.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&p?r[o]=p.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:w2};function C2(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((e,t)=>Array.isArray(t.children)?(e.push(...C2(t.children)),e):(e.push(t),e),[])}function E2(e,t){let n=t.context,r=t.data,i=t.style,o=t.filter,a=t.mode;const s=e.chart.brush(n),l=r,c=i.active||{},u=i.inactive||{},d=[];Object.keys(c).forEach(e=>{d.push(e)}),Object.keys(u).forEach(e=>{-1===d.indexOf(e)&&d.push(e)});const f=[];let p=!1;const h=()=>{let t=C2(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=()=>{const e=h(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach(t=>{e[r].__style[t]=e[r][t]}));const t=s.containsMappedData(n,i,a),o=f.indexOf(e[r]);let l=!1;t&&-1===o?(f.push(e[r]),l=!0):t||-1===o||(f.splice(o,1),l=!0),e[r].needToUpdate=l||p,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=YK({},e[i],e[i].__style),n=e[i].isActive;d.forEach(r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,f):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,f):u[r]:e[i].__style[r]}),r=!0}delete e[i].needToUpdate}return p=!1,r},g=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1}).suppressRender,n=h(),r=n.length;for(let e=0;e<r;e++)n[e].data&&(n[e].__style=n[e].__style||{},d.forEach(t=>{n[e].__style[t]=n[e][t],t in u&&(n[e][t]="function"==typeof u[t]?u[t].call(null,n[e]):u[t])}));p=!0,f.length=0,t||e.renderer.render(e.nodes)},y=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1}).suppressRender,n=h(),r=n.length;for(let e=0;e<r;e++)n[e].__style&&(Object.keys(n[e].__style).forEach(t=>{n[e][t]=n[e].__style[t]}),n[e].__style=void 0);f.length=0,t||e.renderer.render(e.nodes)},b=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{f.length=0,p=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",b)}}}function M2(e){let t=e.nodes,n=e.action,r=e.chart,i=e.trigger;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let t=e.dataPoints,n=e.action,r=e.chart,i=e.trigger;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach(e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}})}i.contexts.forEach(e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)})}({dataPoints:o,action:n,chart:r,trigger:i})}function R2(e){let t=e.collisions,n=e.t,r=e.config,i=e.action,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map(e=>e.node);return M2({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function _2(e,t,n){const r=n.element().getBoundingClientRect();let i=tX(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&tX(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!tX(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function A2(e,t,n){return e?"function"==typeof e?e(t):e:n}const P2={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function I2(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function T2(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function D2(e){return-e/180*Math.PI}function O2(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(D2(e))}function N2(e,t){return{x:e.x+t.x,y:e.y+t.y}}function q2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function L2(e,t){return{x:e.x*t,y:e.y*t}}function j2(e,t){return e.x-t.x}function z2(e,t){return e.y-t.y}function F2(e,t){return j2(e,t)**2+z2(e,t)**2}function $2(e,t){return Math.sqrt(F2(e,t))}function B2(e,t){return e.x*t.x+e.y*t.y}function H2(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=q2(e,n);return N2({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const V2={up:0,down:180,left:90,right:-90};function W2(e){let t=e.x,n=e.y,r=e.size;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const U2=mJ();U2.add("circle",function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}}),U2.add("diamond",function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:I2([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}}),U2.add("saltire",function(e){const t=D2(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=T2(e.x,e.y,o,i).map(e=>H2(e,t,s));return{type:"path",fill:"black",d:I2(l)}}),U2.add("square",function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}}),U2.add("triangle",function(e){const t=e.size,n={x:e.x,y:e.y},r=V2[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=D2(r);return s=s.map(e=>H2(e,l,n)),{type:"path",fill:"black",d:I2(s)}}),U2.add("line",function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:W2(e)}}),U2.add("star",function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=D2(i),c=D2(i+s/2),u=Math.sin(l),d=Math.cos(l),f=Math.sin(c),p=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+p*o,y:e.y+f*o})}return{type:"path",fill:"black",d:I2(n)}}),U2.add("n-polygon",function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=D2(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:I2(t)}}),U2.add("cross",function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:I2(T2(t,n,e.size,o))}}),U2.add("bar",function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=D2(90);o=o.map(n=>H2(n,e,t))}const a=sX(o);return a.type="rect",a.fill="black",a}),U2.add("rect",function(e){const t=e.x,n=e.y,r=e.size,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}}),U2.add("image",function(e){const t=e.x,n=e.y,r=e.imageSettings||{},i=r.width,o=r.height,a=r.imageSrc,s=r.position;return{type:"image",x:t,y:n,width:i,height:o,src:a,symbol:r.symbol,r:10,cx:0,cy:0,imageScalingFactor:r.imageScalingFactor,imagePosition:s}});const G2=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U2;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach(n=>{void 0!==P2[n]&&"transform"!==n&&(e[n]=t[n])})}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function Y2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.dock,r=void 0===n?"center":n,i=e.displayOrder,o=void 0===i?0:i,a=e.prioOrder,s=void 0===a?0:a,l=e.preferredSize,c=void 0===l?0:l,u=e.minimumLayoutMode,d=e.show,f=void 0===d||d;r=r||"center";return{computePreferredSize(e){let n=e.inner,r=e.outer,i=e.children;return"function"==typeof c?c({inner:n,outer:r,children:i,dock:this.dock()},t):c},dock(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},displayOrder(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},prioOrder(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s},minimumLayoutMode(e){return void 0!==e?(u=e,this):"function"==typeof u?u(t):u},show(e){return void 0!==e?(f=e,this):"function"==typeof f?f(t):f}}}function K2(e,t,n){const r=t.require,i=void 0===r?[]:r,o=t.mediator||{},a=n.settings,s=n.formatter,l=n.scale,c=n.data,u=n.renderer,d=n.chart,f=n.dockConfig,p=n.mediator,h=n.instance,m=n.rect,g=n.style,y=n.registries,b=n.resolver,v=n.update,x=n._DO_NOT_USE_getInfo,w=n.symbol,S=n.isVisible;e.emit=()=>{},S&&(e.isVisible=S),Object.defineProperty(e,"settings",{get:a}),Object.defineProperty(e,"data",{get:c}),Object.defineProperty(e,"formatter",{get:s}),Object.defineProperty(e,"scale",{get:l}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:g}),Object.defineProperty(e,"registries",{get:y}),m&&Object.defineProperty(e,"rect",{get:m}),x&&(e._DO_NOT_USE_getInfo=x),Object.keys(t).forEach(n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some(e=>e===r)||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])}),i.forEach(t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:u}):"chart"===t?Object.defineProperty(e,"chart",{get:d}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:f}):"instance"===t?Object.defineProperty(e,"instance",{get:h}):"update"===t&&v?Object.defineProperty(e,"update",{get:v}):"resolver"===t?Object.defineProperty(e,"resolver",{get:b}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:w})}),Object.keys(o).forEach(t=>{e.mediator.on(t,o[t].bind(e))})}function X2(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function J2(e,t,n){Object.keys(n.on||{}).forEach(r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)}),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function Q2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.defaultSettings,r=void 0===n?{}:n,i=e._DO_NOT_USE_getInfo,o=void 0===i?()=>({}):i,a=t.chart,s=t.container,l=t.mediator,c=t.registries,u=t.theme,d=t.renderer,f=W1.mixin({});let p,h,m,g,y,b=t.settings||{},v=YK(!0,{},r,b),x=[],w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k2,n={};return{resolve:function(r){let i=r.data,o=r.settings,a=r.defaults,s=void 0===a?{}:a,l=r.scaled;const c=n.norm=t.normalizeSettings(o,s,e.chart),u={scale:e.chart.scale,formatter:e.chart.formatter};l&&Object.keys(l).forEach(e=>{c[e]&&t.updateScaleSize(c,e,l[e])});const d=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:u};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:u};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],d.push(o)}}return{settings:n.norm,items:d}}}}({chart:a}),S=!1;const k={nodes:[],chart:a,config:v.brush||{},renderer:null},C={tap:[],over:[]},E=[],M={},R=YK({},b);function _(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==b[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(M,...l):r&&(a=e[t])),o&&("function"==typeof b[t]?a=b[t].call(R,...l):r&&(a=b[t])),i||o||(a=n.call(M,...l)),a}}const A=_("preferredSize",()=>0,!0),P=_("resize",e=>e.inner),I=_("created"),T=_("beforeMount"),D=_("mounted"),O=_("beforeUnmount"),N=_("beforeUpdate"),q=_("updated"),L=_("beforeRender"),j=_("beforeDestroy"),z=_("destroyed"),F=e.render,$=()=>{v.brush&&(v.brush.consume||[]).forEach(e=>{e.context&&e.style&&E.push(E2(k,e))})},B=()=>{v.brush&&(v.brush.trigger||[]).forEach(e=>{"over"===e.on?C.over.push(e):C.tap.push(e)})};Object.defineProperty(k,"data",{get:()=>x});const H=v.renderer||e.renderer,V=H?d||c.renderer(H)():d||c.renderer()();"function"==typeof V.settings&&V.settings(v.rendererSettings),k.renderer=V;const W={resources:a.logger?{logger:a.logger()}:{}};let U=Y2(X2(v,A,a.logger()),W);const G=e=>{e.key=v.key,e.element=V.element()},Y=()=>{};Y.dockConfig=()=>U,Y.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(b=e.settings,v=YK(!0,{},r,e.settings),U=Y2(X2(v,A,a.logger()),W),k.config=v.brush||{}),v.scale&&(p=a.scale(v.scale)),v.data){const e=v.rendererSettings,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=t0(v.data,{dataset:a.dataset,collection:a.dataCollection},{logger:a.logger()},a.dataCollection);t?t.isFirst?(x=n,x.items&&(x.items=[...n.items])):x.items&&(x.items=[...x.items,...n.items||[]]):x=n}else x=p?p.data():[];"string"==typeof v.formatter||"object"==typeof v.formatter?h=a.formatter(v.formatter):p&&p.data().fields&&(h=p.data().fields[0].formatter()),y=u.style(v.style||{})},Y.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=P({inner:e,outer:t});g=n?V.size(n):V.size(e),R.rect=YK(!0,{computedPhysical:g.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),g=YK(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},g)},Y.getRect=()=>R.rect;const K=()=>{const e=V.renderArgs?V.renderArgs.slice(0):[],t=v.rendererSettings;let n=x;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return x.items&&r&&(n=ZK(ZK({},x),{},{items:x.items.slice(r.start,r.end)})),e.push({data:n}),e};let X,J,Q;function Z(e){const t=v.rendererSettings,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?k.nodes=[...e||[]]:k.nodes&&(k.nodes=[...k.nodes,...e||[]]):k.nodes=e}Y.beforeMount=T,Y.beforeRender=()=>{L({size:g})},Y.render=()=>{const e=F.call(M,...K());Z(e),V.render(e),X=e,J=R.rect.computed},Y.hide=()=>{Y.unmount(),V.size({x:0,y:0,width:0,height:0}),V.clear()},Y.beforeUpdate=()=>{N({settings:v,data:x})},Y.update=()=>{Q&&Q.stop();const e=v,t=e.rendererSettings,n=e.brush,r=e.animations;if("function"==typeof(null==t?void 0:t.transform)&&t.transform())return V.render(),void(X=null);const i=F.call(M,...K());Z(i),E.forEach(e=>e.cleanUp()),E.length=0,C.tap=[],C.over=[],n&&($(),B()),E.forEach(e=>{e.isActive()&&e.update()}),X&&r&&("function"==typeof r.enabled?r.enabled():r.enabled)?(r.compensateForLayoutChanges&&r.compensateForLayoutChanges({currentNodes:X,currentRect:R.rect.computed,previousRect:J}),Q=function(e,t,n,r){let i,o=e.old,a=e.current,s=t.renderer,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},f=[],p=null;const h=n.trackBy||y2,m={start(){let e={};if(o.forEach((t,n)=>{let r=h(t,n);e[r]=t}),a.forEach((t,n)=>{let r=h(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter(e=>!e.dummy),r=t.points.filter(e=>!e.dummy),i=r.map(e=>e.data.major.value),o=n.filter(e=>i.includes(e.data.major.value)).map(e=>e.data.major.value),a=n.filter(e=>o.includes(e.data.major.value)),s=r.filter(e=>o.includes(e.data.major.value));return{old:a,current:s}}(e[r],t);d.ips.push(g2(YK({},e[r],{points:n.old}),YK({},t,{points:n.current}))),l.push(YK({},e[r],{commonPoints:n.old}))}else d.ips.push(g2(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(g2(YK({},t,{r:.001,opacity:0}),t))}),Object.keys(e).forEach(t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(g2(e[t],YK({},e[t],{r:1e-4,opacity:0}))))}),f.push({name:"exiting",easing:u2,duration:200,tweens:u.ips,nodes:[...l]}),f.push({name:"updating",easing:f2,duration:400,tweens:d.ips,nodes:[]}),f.push({name:"entering",easing:d2,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,o=r.getValue("animations.updatingStageMeta"),a=o.isInit,s=o.shouldBeRemoved;!1===a?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",s&&0===i)}f.length&&(p=s.getScene(a),f[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=f[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,o=[],a=e.tweens.map(n=>n(e.easing(Math.min(1,t))));const l=n.adjustTweenedNodes;if(l&&l(a),o.push(...a),o.push(...e.nodes),s.render(o),t>=1){f.shift();const e=r.getValue("animations.updatingStageMeta"),t=e.isInit,n=e.shouldBeRemoved;f.length?"updating"===f[0].name&&n&&f.shift():(!0===t&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}i&&(i=window.requestAnimationFrame(m.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return p}};return m}({old:X,current:i},{renderer:V},r,a.storage),Q.start()):V.render(i),X=i,J=R.rect.computed,V.setKey&&"string"==typeof b.key&&V.setKey(b.key)},Y.updated=q,Y.destroy=()=>{Y.unmount(),j(m),V.destroy(),z(),m=null};const ee=e=>{k.nodes=e,E.forEach(e=>{e.isActive()&&e.update()}),V.render(e)};return K2(M,e,{settings:()=>v,data:()=>x,scale:()=>p,formatter:()=>h,renderer:()=>V,chart:()=>a,dockConfig:()=>U,mediator:()=>l,instance:()=>R,rect:()=>R.rect,style:()=>y,update:()=>ee,registries:()=>c,resolver:()=>w,symbol:()=>G2(c.symbol)}),K2(R,b,{settings:()=>v,data:()=>x,scale:()=>p,formatter:()=>h,renderer:()=>V,chart:()=>a,dockConfig:()=>U,mediator:()=>l,style:()=>y,_DO_NOT_USE_getInfo:o.bind(M),isVisible:()=>S}),Y.getBrushedShapes=function(e,t,n){const r=[];if(v.brush&&v.brush.consume){const i=a.brush(e),o=V.findShapes("*");v.brush.consume.filter(t=>t.context===e).forEach(e=>{for(let a=0;a<o.length;a++){const s=o[a];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(G(s),r.push(s),o.splice(a,1),a--)}})}return r},Y.findShapes=e=>{var t;const n=(null!==(t=Q)&&void 0!==t&&t.inProgress()?Q.targetScene:V).findShapes(e);for(let e=0,t=n.length;e<t;e++)G(n[e]);return n},Y.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=V.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map(e=>e.node);for(let e=0,t=r.length;e<t;e++)G(r[e]);return r},Y.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];M2({nodes:e,action:t.action||"toggle",trigger:t,chart:a,data:k.data})},Y.mount=()=>{m=V.element&&V.element()?m:V.appendTo(s),V.setKey&&"string"==typeof b.key&&V.setKey(b.key),v.brush&&($(),B()),J2(R,f,b),J2(M,f,e),S=!0},Y.mounted=()=>D(m),Y.unmount=()=>{[R,M].forEach(e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach(e=>{let n=e.event,r=e.listener;t.removeListener(n,r)}),e.eventListeners.length=0),e.emit=()=>{}}(e,f)}),C.tap=[],C.over=[],E.forEach(e=>{e.cleanUp()}),E.length=0,O(),S=!1},Y.onBrushTap=e=>{C.tap.forEach(t=>{(function(e){let t=e.e,n=e.t,r=e.config;return R2({collisions:_2(t,n,r.renderer),t:n,config:r,action:A2(n.action,t,"toggle")})})({e:e,t:t,config:k})&&"stop"===t.globalPropagation&&a.toggleBrushing(!0)})},Y.onBrushOver=e=>{C.over.forEach(t=>{(function(e){let t=e.e,n=e.t,r=e.config;return R2({collisions:_2(t,n,r.renderer),t:n,config:r,action:A2(n.action,t,"set")})})({e:e,t:t,config:k})&&"stop"===t.globalPropagation&&a.toggleBrushing(!0)})},Y.def=M,Y.ctx=R,Y.renderer=()=>V,Y.set({settings:b}),I(),Y}function Z2(e){const t=YK(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function e5(e,t,n){const r=N2(function(e,t){const n=B2(e,t)/B2(t,t)||1;return{x:t.x*n,y:t.y*n}}(q2(n,e),q2(t,e)),e);return r}function t5(e,t,n){return $2(e,n)+$2(t,n)-$2(e,t)<1e-12}function n5(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function r5(e){return e.x1===e.x2&&e.y1===e.y2}function i5(e){return e.width<=0||e.height<=0}function o5(e){return e.r<=0}function a5(e){return e.edges.length<=2}function s5(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=h5(e,lX(t.edges[r])),!0===n)return!0;return!1}function l5(e,t){let n=!1;const r=t.numPolygons,i=t.polygons;for(let t=0;t<r;t++){if(n=k5(e,i[t]),!0===n)return!0}return!1}function c5(e,t){if(o5(e))return!1;return F2({x:e.cx,y:e.cy},t)<=e.r**2}function u5(e,t){if(i5(t)||o5(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function d5(e,t){if(o5(e)||r5(t))return!1;const n=eX(oX(t),2),r=n[0],i=n[1];if(c5(e,r)||c5(e,i))return!0;const o={x:e.cx,y:e.cy},a=e5(r,i,o);return F2(a,o)<=e.r**2&&t5(r,i,a)}function f5(e,t){if(a5(t)||o5(e))return!1;if(p5(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(d5(e,lX(t.edges[r])))return!0}return!1}function p5(e,t){if(a5(e)||!b5(e.boundingRect(),t))return!1;const n=t.x,r=t.y,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function h5(e,t){if(a5(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(x5(t,lX(e.edges[n])))return!0}const n=eX(oX(t),2),r=n[0],i=n[1];return p5(e,r)||p5(e,i)}function m5(e,t){if(a5(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(v5(t,lX(e.edges[n])))return!0}const n=eX(aX(t),4),r=n[0],i=n[1],o=n[2],a=n[3];return p5(e,r)||p5(e,i)||p5(e,o)||p5(e,a)}function g5(e,t){return!i5(e)&&!i5(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function y5(e,t){if(i5(e)||i5(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every(t=>b5(e,t))}function b5(e,t){return!i5(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function v5(e,t){if(r5(t)||i5(e))return!1;const n=eX(oX(t),2),r=n[0],i=n[1];if(b5(e,r)||b5(e,i))return!0;const o=aX(e);let a=o.length;for(let e=0;e<a;e++){if(x5(lX([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function x5(e,t){const n=eX(oX(e),2),r=n[0],i=n[1],o=eX(oX(t),2),a=o[0],s=o[1],l=j2(i,r),c=z2(i,r),u=j2(s,a),d=z2(s,a),f=j2(r,a),p=z2(r,a);let h=d*l-u*c;const m=u*p-d*f,g=l*p-c*f;let y,b;if(0===l&&0===c)return!1;if(0===u&&0===d)return!1;if(0===h){if(0===m&&0===g){if(0===l){if(0===c)return r.x===i.x&&r.y===i.y;y=z2(a,r)/c,b=z2(s,r)/c}else y=(a.x-r.x)/l,b=(s.x-r.x)/l;return!(y<0&&b<0||y>1&&b>1)}return!1}const v=m/h;return h=g/h,v>=0&&v<=1&&h>=0&&h<=1}function w5(e,t){if(r5(e))return!1;const n=eX(oX(e),2);return t5(n[0],n[1],t)}function S5(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!g5(n,r)&&(y5(n,r)?s5(e,t):s5(t,e))}function k5(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!g5(n,r)&&(y5(r,n)?function(e,t){let n=!1;const r=e.numPolygons,i=e.polygons;for(let e=0;e<r;e++)if(n=S5(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=M5(e,lX(t.edges[r])),!0===n)return!0;return!1}(e,t))}function C5(e,t){if(o5(e))return!1;if(E5(t,{x:e.cx,y:e.cy}))return!0;const n=t.numPolygons,r=t.polygons;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(d5(e,lX(n.edges[t])))return!0}}return!1}function E5(e,t){if(!b5(e.boundingRect(),t))return!1;const n=t.x,r=t.y,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function M5(e,t){const n=eX(oX(t),2),r=n[0],i=n[1];if(E5(e,r)||E5(e,i))return!0;const o=e.numPolygons,a=e.polygons;for(let e=0;e<o;e++){const n=a[e];for(let e=0,r=n.edges.length;e<r;e++){if(x5(t,lX(n.edges[e])))return!0}}return!1}function R5(e,t){const n=eX(aX(t),4),r=n[0],i=n[1],o=n[2],a=n[3];if(E5(e,r)||E5(e,i)||E5(e,o)||E5(e,a))return!0;const s=e.numPolygons,l=e.polygons;for(let e=0;e<s;e++){const n=l[e];for(let e=0,r=n.edges.length;e<r;e++){if(v5(t,lX(n.edges[e])))return!0}}return!1}const _5=/^\$/,A5="@extend";function P5(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function I5(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&P5(e),_5.test(r)?(n.push(e),I5(r,t,n)):r}let r=e;const i=YK(!0,{},t,e),o={};if(e[A5]){const o=e[A5];-1!==n.indexOf(o)&&P5(o);let a=n.slice();a.push(o),r=YK(!0,{},I5(i[o],t,a),e)}return Object.keys(r).forEach(e=>{let t=n.slice();if(e===A5||_5.test(e))return;o[e]=r[e];let a=o[e];_5.test(a)&&a in i?(-1!==n.indexOf(a)&&P5(a),t.push(a),a=i[a],"object"==typeof a||_5.test(a)&&a in i?o[e]=I5(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=I5(a,i,t))}),o}function T5(e,t){return I5(e,t,[])}function D5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach(e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map(e=>e?e.length:0)}})},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>T5(e,n),setStyle:t=>{n=YK({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function O5(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function N5(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return YK(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function q5(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function L5(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function j5(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function z5(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function F5(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function $5(e,t,n,r,i){const o=YK({},t),a=YK({},n);j5(o,r),z5(a,r),F5(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(j5(t,r),z5(n,r),!0)}function B5(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function H5(e){return sX([].concat(...e.map(aX)))}function V5(e){let t=e.visible,n=e.layoutRect,r=e.reducedRect,i=e.containerRect,o=e.translation;const a=q5(r.x,r.y,r.width,r.height),s=q5(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort((e,t)=>e.config.displayOrder()-t.config.displayOrder());return t.sort((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n}).forEach(e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map(e=>l[e]).filter(e=>!!e);n.length>0&&(t=H5(n.map(e=>e.outerRect)),c=H5(n.map(e=>e.r)))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=B5(c),t.edgeBleed=e.edgeBleed,t.computed=B5(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0}),u}function W5(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function U5(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function G5(e){let t=N5(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const r=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),O5(r),O5(n),{logicalContainerRect:r,containerRect:n}}(e,t),i=r.logicalContainerRect,o=r.containerRect,a=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];U5(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map(e=>e.replace(/^\s*@/,"")):[];W5(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,i),s=eX(a,2),l=s[0],c=s[1],u=function(e){let t=e.layoutRect,n=e.visible,r=e.hidden,i=e.settings;const o=q5(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort((e,t)=>e.config.prioOrder()-t.config.prioOrder());for(let e=0;e<s.length;++e){const n=s[e];L5(n,o,t),$5(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every(e=>t.some(t=>t.key===e));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter(e=>-1!==s.indexOf(e));return n.length=0,n.push(...l),F5(t,o,a),o}({layoutRect:i,visible:l,hidden:c,settings:t}),d=V5({visible:l,layoutRect:i,reducedRect:u,containerRect:o,translation:{x:e.x,y:e.y}});return c.forEach(e=>{e.comp.visible=!1;const t=q5();e.comp.resize(t,t)}),{visible:l.map(e=>e.comp),hidden:c.map(e=>e.comp),ordered:d.map(e=>e.comp)}},n.settings=function(e){t=N5(e)},n}const Y5=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},K5=e=>null==e?void 0:e.map(e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(ZK(ZK({},n),{},{children:K5(e.children)}))}}),X5=(e,t)=>({visible:[],hidden:t,ordered:[]}),J5=e=>(t,n)=>{var r;const i=n.map((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(ZK(ZK({},t),{},{children:K5(e.children)}))}}),o=e=>n[e.index],a=null!==(r=e(t,i))&&void 0!==r?r:{},s=a.visible,l=void 0===s?i:s,c=a.hidden,u=void 0===c?[]:c,d=a.ordered,f=void 0===d?l:d;return{visible:l.map(o),hidden:u.map(o),ordered:f.map(o)}},Q5=e=>"function"==typeof e?J5(e):(e=>{const t=G5(e);return J5((e,n)=>t.layout(e,n))})(e);function Z5(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=cX(e),a=YK(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function e3(e,t){const n=[];let r=0;t.forEach(e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)}),t.forEach((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach(t=>{e.insertBefore(t,r)})):(o&&o.forEach(t=>{e.appendChild(t,r)}),e.appendChild(r))})(e,t,n[r]))}function t3(e,t){let n=e.element,r=e.data,i=void 0===r?[]:r,o=e.settings,a=void 0===o?{}:o,s=e.on,l=void 0===s?{}:s;const c=t.registries,u=t.logger,d=D5(t.style,t.palettes),f=[],p=YK({},e),h=function(){const e={};return W1.mixin(e),e}();let m=[],g=null,y=null,b=null,v=[],x=()=>{},w=()=>{};const S={};let k=!1;const C=function(e){let t=e.createComponent;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map(e=>o(e)).filter(e=>!!e))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find(e=>r.hasKey&&r.key===e.key);i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let t=e.compList,n=e.data,r=e.excludeFromUpdate,i=e.formatters,a=e.scales;return e.settingsList.map(e=>{const s=Y5(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)}).filter(e=>!!e)},c=e=>{let t=e.components,n=e.hidden,r=e.layoutFn,i=e.ordered,o=e.rect,a=e.visible;const s=r(o,t),l=s.visible,u=s.hidden,d=s.ordered;a.push(...l),n.push(...u),i.push(...d),l.forEach(e=>{if(e.children){var t,r;const o=Q5(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}}),u.forEach(e=>{e.children&&c({components:e.children,hidden:n,layoutFn:X5,ordered:i,rect:null,visible:a})})};return n.destroy=()=>{r.forEach(e=>e.instance.destroy()),r=[],i=[]},n.findComponentByKey=e=>Y5(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let t=e.layoutSettings,n=e.rect;const r=[],o=[],a=[],s=Q5(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let t=e.components;i=t.map(e=>o(e)).filter(e=>!!e)},n.update=e=>{let t=e.components,n=e.data,r=e.excludeFromUpdate,o=e.formatters,a=e.scales;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!c.component.has(e.type))return u.warn("Unknown component: ".concat(e.type)),!1;return{instance:Q2(c.component(e.type),{settings:e,chart:p,mediator:h,registries:c,theme:d,container:n}),settings:YK(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function E(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(p,...a):n.call(p,...a),i}}const M=()=>{let e;a.dockLayout?(u.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=a.dockLayout):e=a.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const t=e.getBoundingClientRect();return{x:0,y:0,width:t.width,height:t.height}}return{x:0,y:0,width:0,height:0}}(n);return C.layout({layoutSettings:e,rect:t})},R=E("created"),_=E("beforeMount"),A=E("mounted"),P=E("beforeUpdate"),I=E("updated"),T=E("beforeRender"),D=E("beforeDestroy"),O=E("destroyed"),N=function(e,t){let n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).partialData;const r=t.formatters,i=void 0===r?{}:r,o=t.scales,a=void 0===o?{}:o,s=t.scroll,l=void 0===s?{}:s;x=function(e,t){let n=t.types,r=t.logger;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}}),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:u,types:c.data}),n||Object.keys(S).forEach(e=>S[e].clear()),t.palettes&&d.setPalettes(t.palettes),t.style&&d.setStyle(t.style),w=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t0;const i={};return(e||[]).forEach(e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)}),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=YK(r,{fields:e}))}return r}}(t.collections,{dataset:x},{logger:u});const f={theme:d,logger:u};g=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$1;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(a,{dataset:x,collection:w},ZK(ZK({},f),{},{scale:c.scale})),y=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n0;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:x,collection:w},ZK(ZK({},f),{},{formatter:c.formatter})),b=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=G1(e[r],t?t[r]:null));return n}(l,b)};function q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter(e=>!!e.key).map(e=>e.key);v.forEach(e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()}),v=e.map(e=>{const r=e.key&&t[e.key]?t[e.key]:c.interaction(e.type)(p,h,n);return r.set(e),r})}const L=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return m.forEach(e=>{const t=e.instance.getRect();b5(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)}),a},j=()=>{if(f.length||!n)return;Object.keys(l).forEach(e=>{const t=l[e].bind(p);n.addEventListener(e,t),f.push({key:e,listener:t})});const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=L(e)},r=t=>{const n=e.comps||L(t);if(!n.every(e=>e.instance.def.disableTriggers)&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=tX(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),k){k=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=L(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),k){k=!1;break}}}}),i.forEach(e=>{n.addEventListener(e.key,e.listener),f.push(e)})},z=()=>{f.forEach(e=>{let t=e.key,r=e.listener;return n.removeEventListener(t,r)}),f.length=0},F=()=>{n.innerHTML="",(()=>{const e=a.components,t=void 0===e?[]:e;T(),N(i,a),C.set({components:t});const r=M(),o=r.visible,s=r.hidden,l=r.ordered;m=o,s.forEach(e=>{e.instance.hide(),e.visible=!1}),o.forEach(e=>e.instance.beforeMount()),o.forEach(e=>e.instance.mount()),o.forEach(e=>e.instance.beforeRender()),o.forEach(e=>e.instance.render()),o.forEach(e=>e.instance.mounted()),o.forEach(e=>{e.visible=!0}),e3(n,l)})(),j(),q(a.interactions)};return p.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.excludeFromUpdate,n=void 0===t?[]:t;e.data&&(i=e.data),e.settings&&(a=e.settings,q(e.settings.interactions)),P(),N(i,a);const r=a,o=r.formatters,s=r.scales,l=r.components,c=void 0===l?[]:l;C.update({components:c,data:i,excludeFromUpdate:n,formatters:o,scales:s}),C.forEach(e=>{e.updateWith&&e.instance.set(e.updateWith)}),C.forEach(e=>{e.updateWith&&e.instance.beforeUpdate()}),M()},p.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.partialData,r=e.excludeFromUpdate,o=void 0===r?[]:r;let s;e.data&&(i=e.data),e.settings&&(a=e.settings,q(e.settings.interactions)),P(),N(i,a,{partialData:t});const l=a,c=l.formatters,u=l.scales,d=l.components,f=void 0===d?[]:d;C.update({components:f,data:i,excludeFromUpdate:o,formatters:c,scales:u}),C.forEach(e=>{e.updateWith&&e.instance.set(e.updateWith)}),C.forEach(e=>{e.updateWith&&e.instance.beforeUpdate()});const p=[],h=[];let g;if(t)C.forEach(e=>{(e.updateWith||e.applyTransform)&&e.visible&&p.push(e)}),g=p;else{const e=M(),t=e.visible,n=e.hidden,r=e.ordered;m=t,g=t,s=r,t.forEach(e=>{e.updateWith&&e.visible?p.push(e):h.push(e)}),n.forEach(e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1})}h.forEach(e=>e.instance.beforeMount()),h.forEach(e=>e.instance.mount()),g.forEach(e=>e.instance.beforeRender()),g.forEach(e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()}),t||e3(n,s),h.forEach(e=>e.instance.mounted()),p.forEach(e=>e.instance.updated()),m.forEach(e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1}),I()},p.destroy=()=>{D(),C.destroy(),z(),q(),delete p.update,delete p.destroy,O()},p.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return m.filter(e=>null==r||e.key===r).forEach(r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]}),i},p.findShapes=e=>{let t=[];return m.forEach(n=>{const r=n.instance.findShapes(e);t=[...t,...r]}),t},p.componentsFromPoint=e=>L(e).map(e=>e.instance.ctx),p.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=m;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map(e=>e.key);o=m.filter(t=>-1!==e.indexOf(t.key)).map(n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]}))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=Z5(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},p.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;m.filter(e=>r===e.key).forEach(r=>{let i=e.filter(e=>e.key===r.key);r.instance.brushFromShapes(i,t.components[n])})}},p.scroll=function(){return function(e,t){return t[e]||(t[e]=U1()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",b)},p.dataset=e=>x(e),p.dataCollection=e=>w(e),p.scales=function(){return g.all()},p.formatters=function(){return y.all()},p.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return S[e]||(S[e]=c2()),S[e]},p.scale=function(e){return g.get(e)},p.formatter=function(e){return y.get(e)},p.toggleBrushing=function(e){k=void 0!==e?e:!k},p.component=e=>{const t=C.findComponentByKey(e);return null==t?void 0:t.instance.ctx},p.logger=()=>u,p.theme=()=>d,p.storage=Z2({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(p,"interactions",{get:()=>({instances:v,on(){j(),v.forEach(e=>e.on())},off(){z(),v.forEach(e=>e.off())}})}),R(),n&&(_(),F(),A(n),p.element=n),p}const n3=e=>{let t=mJ(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var r3=mJ();function i3(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const o3=e=>e.filter(e=>"number"==typeof e&&!isNaN(e));const a3=e=>{let t=e.key,n=e.data,r=e.cache,i=e.config;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let t=e.data,n=e.config;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map(e=>e.split(a))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,n=e.source,r=e.data,i=e.cache,o=e.config,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map((e,t)=>t):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map(e=>({key:e,title:e})),Array.isArray(r[0])?c=u.map(()=>[]):(c={},u.forEach(e=>{c[e.key]=[]}));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=o3(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push($Z(YK({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:r,source:t,config:i})};function s3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.data,r=e.config;const i={fields:[]},o={key:()=>t,raw:()=>n,field:e=>function(e,t){let n=t.cache;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:i}),fields:()=>i.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach(e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const o=UZ(e,t),a=o.props,s=o.main,l=Object.keys(a),c=!!e.trackBy,u=typeof e.trackBy,d={},f=[],p=n.items(),h=[];for(let t=0;t<p.length;t++){const n=p[t];if(s.filter&&!s.filter(n))continue;const r=i3(s,n,{key:i});l.forEach(e=>{const o=a[e];let s=o.field?o.field.items()[t]:n;r[e]=i3(o,s,{key:i})}),c&&KZ({cfg:e,itemData:n,obj:r,target:f,tracker:d,trackType:u}),h.push(r)}r=c?[...r,...YZ(f,{main:s,propsArr:l,props:a})]:[...r,...h]}}),r}(e,o),hierarchy:()=>null};return a3({key:t,data:n,config:r,cache:i}),o}s3.util={normalizeConfig:UZ,collect:YZ,track:KZ};const l3=mJ();l3.default("matrix"),l3("matrix",s3),l3("default",s3);const c3=mJ();function u3(e,t,n){return Math.max(e,Math.min(t,n))}function d3(e){let t=e.item,n=e.value,r=e.boxCenter,i=e.rendWidth,o=e.rendHeight,a="x",s="y",l=i,c=o,u=n<.5?90:-90;return e.flipXY&&(a="y",s="x",l=o,c=i,u=n<.5?180:0),(0,e.symbol)(YK({},t.oob,{[a]:r*l,[s]:Math.max(t.oob.size/2,Math.min(n*c,c-t.oob.size/2)),startAngle:u}))}function f3(e){let t=e.item,n=e.boxWidth,r=e.boxPadding,i=e.rendWidth,o=e.rendHeight,a="x",s="y",l="width",c="height",u=i,d=o;e.flipXY&&(a="y",s="x",l="height",c="width",u=o,d=i);const f=function(e){let t=e.start,n=e.end,r=e.minPx,i=void 0===r?.1:r,o=e.maxPx,a=void 0===o?1:o;const s=Math.max(t,n),l=Math.min(t,n),c=u3(-.1,1.2,s),u=u3(-.1,1.2,l),d=c*a-u*a,f=Math.max(i,d),p=(f-d)/2;return{actualDiff:f,startModifier:p,actualLow:u*a-p}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:d}),p=f.actualDiff,h=f.actualLow;return YK({},t.box,{type:"rect",[a]:(r+t.major)*u,[s]:h,[c]:p,[l]:n*u,data:t.data||{},collider:{type:null}})}function p3(e){let t=e.item,n=e.from,r=e.to,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x1",l="y1",c="x2",u="y2",d=o,f=a;return e.flipXY&&(s="y1",l="x1",c="y2",u="x2",d=a,f=o),YK({},t.line,{type:"line",[u]:Math.floor(n*f),[s]:i*d,[l]:Math.floor(r*f),[c]:i*d,data:t.data||{},collider:{type:null}})}function h3(e){let t=e.item,n=e.key,r=e.position,i=e.width,o=e.boxCenter,a=e.rendWidth,s=e.rendHeight,l="x1",c="y1",u="x2",d="y2",f=a,p=s;e.flipXY&&(l="y1",c="x1",u="y2",d="x2",f=s,p=a);const h=i/2;return YK({type:"line"},t[n],{[c]:Math.floor(r*p),[l]:(o-h)*f,[d]:Math.floor(r*p),[u]:(o+h)*f,r:h*f,cx:o*f,cy:r*p,width:i*f,data:t.data||{},collider:{type:null}})}function m3(e,t,n){const r=t.box,i=r.width,o=r.maxWidthPx,a=r.minWidthPx,s=e>=0?1:-1;let l=Math.min(s*e*i,isNaN(o)?n:o/n);return l=isNaN(a)?l:Math.max(a/n,l),l*s}c3("native",function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach(e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})})}function c(){a.forEach(e=>{let t=e.key,r=e.listener;n.removeEventListener(t,r)}),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}});const g3={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},y3=Object.keys(g3),b3={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let t=e.data;const n=this.rect,r=n.width,i=n.height,o="horizontal"===this.settings.settings.orientation,a=this.style,s=this.resolver,l=this.symbol,c=y3.filter(e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show),u={};c.forEach(e=>u[e]=g3[e]);const d=function(e){let t=e.keys,n=e.data,r=e.defaultSettings,i=e.style,o=e.settings,a=e.width,s=e.height,l=e.resolver;const c=YK(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let f;f="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:YK(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:YK(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const p=o.minor||{},h={};["start","end","min","max","med"].forEach(e=>{(p[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:p.scale,ref:e})});let m,g={major:f,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:YK(!0,{},h,p)})};for(let e=0,r=t.length;e<r;e++)o[m]&&!1===o[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:o[m],scaled:u}));return g}({keys:c,data:t,defaultSettings:u,style:a,settings:this.settings.settings,width:r,height:i,resolver:s});d.settings,d.items;const f=function(e){let t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e.symbol;const s=[],l=i.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,f=i.major.settings,p=["start","end","min","max","med"].filter(e=>void 0!==i.minor.settings[e]),h=p.length,m=o.filter(e=>"oob"!==e);let g,y,b,v,x,w,S,k,C;const E=o?o.length:0,M=m?m.length:0;function R(){S?g.push(d3({item:b,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):k&&g.push(d3({item:b,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a}))}const _={box:function(){b.box&&nX(b.start)&&nX(b.end)&&g.push(f3({item:b,boxWidth:v,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){nX(b.min)&&nX(b.start)&&g.push(p3({item:b,from:b.min,to:b.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),nX(b.max)&&nX(b.end)&&g.push(p3({item:b,from:b.max,to:b.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){b.median&&nX(b.med)&&g.push(h3({item:b,key:"median",position:b.med,width:v,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;nX(b.min)&&g.push(h3({item:b,key:"whisker",position:b.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),nX(b.max)&&g.push(h3({item:b,key:"whisker",position:b.max,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))}}};function A(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=b[p[r]],nX(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,k=n>1&&n!==Number.MAX_VALUE,C=S||k}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let r=null,a=null;void 0!==f.binStart?(r=t.binStart,a=t.binEnd,y=f.binStart.scale):(y=f.major.scale,r=y?t.major:0);let c=0;y?y.bandwidth?(c=y.bandwidth(),r-=c/2):c=a-r:c=1,b=YK({},{major:r,majorEnd:a},i.minor.items[e]);for(let t=0;t<E;t++)b[o[t]]=i[o[t]].items[e];if(v=m3(c,b,d),x=(c-v)/2,w=x+b.major+v/2,A(),C)b.oob&&R();else for(let e=0;e<M;e++)b[m[e]]&&!1===b[m[e]].show||_[m[e]]();const u={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(u)}return s}({width:r,height:i,flipXY:o,resolved:d,keys:c,symbol:l});return f}};const v3={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},x3=/px$/,w3={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},S3={imageSrc:void 0,imageScalingFactor:void 0,position:"center-center",symbol:"rectangle",width:void 0,height:void 0},k3={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function C3(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function E3(e,t,n,r){let i=t.width,o=t.height;return e.filter(e=>!1!==e.show&&!isNaN(e.x+e.y)).map(e=>{let t=e,a=x3.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);rX(a)&&(t=v3,a=n.min+t.size*(n.max-n.min));const s=function(e){let t=w3.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),l=eX(s,2),c=l[0],u=ZK(ZK({},l[1]),{},{type:c,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity,imageSettings:t.imageSettings});t===e.errorShape&&(u.width=t.width);const d=r(u);return d.data=e.data,d})}const M3={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let t=e.data;const n=this.resolver.resolve({data:t,defaults:YK({},w3,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),r=this.rect,i=r.width,o=r.height,a=YK({},k3,this.settings.settings.sizeLimits),s=n.items;s.length>0&&"image"===s[0].shape&&t.items.forEach((e,t)=>{s[t].imageSettings=YK({},S3,this.settings.settings.imageSettings)});const l=function(e,t,n,r,i){const o=C3(e?e.scale:void 0,n),a=C3(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,i,o,a);return E3(s,this.rect,l,this.settings.shapeFn||this.symbol)}};const R3={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function _3(e,t,n,r){let i=t.x,o=t.y,a=t.width,s=t.height;const l=LX(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,f=d/100;return e.map((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=f*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const p=l.centroid(e),h=i.offset?function(e,t,n,r){let i=eX(e,2),o=i[0],a=i[1];const s=Math.sqrt(o*o+a*a);o/=s,a/=s;const l=n-r;return{x:o*t*l,y:a*t*l}}(p,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(h.x,", ").concat(h.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+h.x,y:c.y+h.y}}},i})}function A3(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const P3={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let t=e.data;const n=[],r=[],i=this.settings.settings,o=this.resolver.resolve({data:t,defaults:YK({},R3,this.style.slice),settings:i.slice}).items;let a=0;for(let e=0,t=o.length;e<t;e++){const t=A3(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=WX,t=VX,n=null,r=dX(0),i=dX(SX),o=dX(0);function a(a){var s,l,c,u,d,f=(a=jX(a)).length,p=0,h=new Array(f),m=new Array(f),g=+r.apply(this,arguments),y=Math.min(SX,Math.max(-SX,i.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/f,o.apply(this,arguments)),v=b*(y<0?-1:1);for(s=0;s<f;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(p+=d);for(null!=t?h.sort(function(e,n){return t(m[e],m[n])}):null!=n&&h.sort(function(e,t){return n(a[e],a[t])}),s=0,c=p?(y-f*v)/p:0;s<f;++s,g=u)l=h[s],u=g+((d=m[l])>0?d*c:0)+v,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:dX(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:dX(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:dX(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:dX(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return _3(s(n),YK({},this.rect,{x:0,y:0}),r,a)}};const I3=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach(e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)})}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach(t=>{const n=e[t];n.items=[],n.append.forEach(e=>{n.items.push({key:e,type:"append"})}),n.round.forEach(e=>{n.items.push({key:e,type:"round"})})}),t.multiple=e=>e.forEach(e=>t(e)),t}();class T3{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[T3.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=T3.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&I3(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function D3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new T3(...t)}function O3(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const N3={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=D3(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,w2(this,"x",this.rect.width),w2(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=YK({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=YK({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=O3(this.x,this.rect.width),this.lines.y=O3(this.y,this.rect.height),this.lines.y=this.lines.y.map(e=>YK(e,{flipXY:!0}));let e=e=>{let t=e.dir,n=e.isMinor,r=this.lines[t].filter(e=>!!e.isMinor===n),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach(e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})})};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function q3(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function L3(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function j3(e,t,n){return e<t||e>n}function z3(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function F3(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function $3(e){var t,n;let r=e.chart,i=e.blueprint,o=e.renderer,a=e.p,s=e.settings,l=e.items,c=e.slopeLine,u=!0,d=!1,f=!1,p=!1,h=!1,m=YK(!0,{},s.style.line,a.line||{}),g=YK(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=c?i.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):i.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=YK(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},c="";t=z3(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=o.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=o.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,b=F3(a.flipXY?e.vAlign:e.align),v=F3(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*i.width,e.maxWidthPx),w=g.height+2*y,S=a.flipXY?w:x,k=a.flipXY?x:w;if(f=i.processItem({fn:t=>{let n=t.width,r=t.height,o=a.position*n-(a.flipXY?w:x)*(1-b);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(v*r-k*v),0),width:a.flipXY?S:Math.min(S,i.width-o),height:k,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),f.x<-1||f.x+f.width>i.width+1||f.y<-1||f.y+f.height>i.height+1)f=void 0;else{p={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+y,y:f.y+f.height/2+g.height/3,maxWidth:f.width-2*y-n.width,anchor:"start"},c&&(h={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+3+(f.width-(n.width+2*y)),y:p.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?g5(f,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&v5(f,t)&&(u=!1)}}}if(d&&l.push(d),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var y,b,v;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(b=c.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(v=c.label)||void 0===v?void 0:v.showValue)){var x;const t=z3(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(x=c.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var w,S,k;const e=o.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.min()*t+n>=i.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r((i.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?g.padding:3*g.padding,f=void 0!==a||c.slope>0?3*g.padding:g.padding,p=function(e,t,n,r,i,o){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*o.padding:2*o.padding,e.isRtl,n*i.width+a;if(1===n)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding);if(n>.8)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding)}else if(e.slope>0)return t.x2-(r.width+2*o.padding);return e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(c,d,a,e,i,g),h=Math.min(d.y1,d.y2);null!==(w=c.label)&&void 0!==w&&w.stroke&&(t={type:"rect",x:c.isRtl?Math.max(p,u)-2:Math.max(p,u)+2,y:Math.abs(Math.max(h,f)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(S=null===(k=c.label)||void 0===k?void 0:k.stroke)&&void 0!==S?S:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(p,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,f)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,i){for(let o=0,a=e.length;o<a;o++){const a=e[o];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+i)return!0}return!1})(l,y,e,u,f)||(t&&l.push(t),l.push(y))}}u&&f&&p&&(l.push(f,p),h&&l.push(h))}function B3(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function H3(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function V3(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function W3(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const U3={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=D3(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(H3).map(e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=V3(t,e.value);return YK(e,{scale:t,position:n})}return YK(e,{position:e.value})}),this.lines.y=this.lines.y.filter(H3).map(e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=V3(t,e.value);return YK(e,{scale:t,position:n,flipXY:!0})}return YK(e,{position:e.value,flipXY:!0})}),this.lines.x=this.lines.x.filter(e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(B3(e)),!1)),this.lines.y=this.lines.y.filter(e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(B3(e)),!1)));let n=[];return[...this.lines.x,...this.lines.y].forEach(r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max(),s=n.min(),l=n.max();i=ZK(ZK({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=o*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,f=(l-r.value)/r.slope;let p=[];j3(c,s,l)||(p[0]={x:V3(e,o),y:V3(n,c)}),j3(d,o,a)||(p[1]={x:V3(e,d),y:1}),j3(u,s,l)||(p[2]={x:V3(e,a),y:V3(n,u)}),j3(f,o,a)||(p[3]={x:V3(e,f),y:0});const h=p.filter(e=>!!e).length;if(h>2&&function(e){W3(e[0],e[1])&&(e[1]=void 0),W3(e[1],e[2])&&(e[2]=void 0),W3(e[2],e[3])&&(e[3]=void 0),W3(e[3],e[0])&&(e[3]=void 0)}(p),p=p.filter(e=>!!e),p.length<2)return void t["y".concat(c>l?0:1)].push(B3(r));i.x1=p[0].x,i.y1=p[0].y,i.x2=p[1].x,i.y2=p[1].y}else i=void 0;$3({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}}),e.style.oob.show&&function(e){let t=e.blueprint,n=e.oob,r=e.settings,i=e.items;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let r=t.width,i=t.height,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:q3(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,f=u.cy||u.y;const p=s.map(e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")")),h=p.reduce((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t),"");let m={type:"text",text:s.length||"",title:h,x:d-.4*a.width,y:f+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:L3(d,f,a.width,c),x:d,y:f,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function G3(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){YK(e,t.style)}(t,e),t}function Y3(e){return"string"==typeof e||"number"==typeof e?e:"-"}function K3(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map(e=>H2(e,r,{x:t.x,y:t.y})),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},f=r>=0?[u,d]:[d,u];c.push(...f),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function X3(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function J3(e,t){var n,r;const i={type:"text",text:Y3(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+X3(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+X3(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach(n=>{e[n]=t.style[n]})}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),K3(e,i,t),i}function Q3(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){YK(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function Z3(e){return!e.isMinor&&e.position>=0&&e.position<=1}function e4(e){let t=e.rect,n=e.state,r=e.majorTicks,i=e.measure;return e.horizontal?function(e){let t=e.majorTicks,n=e.measureText,r=e.rect;const i="layered"===e.state.labels.activeMode?2:1,o=r.width,a=t.map(e=>e.label).map(e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":"")).map(n).map(e=>e.width);for(let e=0;e<t.length;++e){const n=t[e];if(i*o*Math.abs(n.start-n.end)<a[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let t=e.majorTicks,n=e.measureText;const r=e.rect.height,i=n("M").height;return!(t.length<2)&&r*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:i,rect:t})}function t4(e){let t=e.value,n=e.maxValue,r=e.minValue,i=e.range,o=e.modifier;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function n4(e){let t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=e.state,l=0;const c={left:0,top:0,right:0,bottom:0},u=a.labels,d=u.maxLengthPx,f=u.minLengthPx;if(a.labels.show){const e=a.align,u="top"===e||"bottom"===e,p=u?n.inner.width:n.inner.height,h=o.ticks({settings:a,distance:p,formatter:r}).filter(Z3),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=t4({value:t.width,maxValue:d,minValue:f}),t};if(t&&u&&"auto"===a.labels.mode&&(!function(e){let t=e.majorTicks,n=e.measure,r=e.rect,i=e.state,o=e.settings;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,f=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(f=s*u*Math.abs(r.start-r.end),o+c>f)return!0}else{const e=t.reduce((e,t)=>Math.min(Math.abs(t.start-t.end),e),1/0);if(f=s*u*e,d=n("M").width*l*a,d+c>f)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&e4({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:u})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>t4({value:t.width,maxValue:d,minValue:f})*Math.sin(e)+t.height*Math.cos(e)}else g=u?e=>e.height:e=>t4({value:e.width,maxValue:d,minValue:f});if(u&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=h.map(e=>e.label);else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const b=y.map(m),v=b.map(g),x=Math.max(...v,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=h[r]?h[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let t=e.majorTicks,n=e.measureText,r=e.rect,i=e.bleedSize,o=e.angle;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:h,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const r4=(e,t,n)=>e.width*Math.abs(t.position-n.position);function i4(e){let t=e.layered,n=e.major,r=e.innerRect,i=e.outerRect,o=e.tick,a=e.index;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?r4(r,o,l)/2-2:1/0,d=c?r4(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let t=e.innerRect,n=e.outerRect,r=e.tick,i=e.prevWidth;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let t=e.innerRect,n=e.outerRect,r=e.tick,i=e.nextWidth;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function o4(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,i=r+e.style.strokeWidth,o={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:i}},ticks:[]};return function(e,t){YK(e,t.style)}(o,e),o}function a4(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function s4(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o;let c=a-e.position*l;c-=Math.PI/2;const u=a4(r.cx,r.cy,i+s,c),d=a4(r.cx,r.cy,i,c),f={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=ZK({},t.style);YK(e,n)}(f,t),f}function l4(e){return"string"==typeof e||"number"==typeof e?e:"-"}function c4(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function u4(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:o+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const f=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,i+s+6,u);let p;p="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:l4(e.label),align:d,x:f.x,y:f.y,maxHeight:t.maxHeight,maxWidth:c4(t,d,f),anchor:p,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach(n=>{e[n]=t.style[n]})}(h,t),function(e,t){e.boundingRect=t.textBounds(e)}(h,t),function(e,t,n){let r,i;const o=parseFloat(n.fontSize)||0;r=t.y-o/2,i=e.innerRect.height-(t.y+o/2),(r<0||i<0)&&(n.text="")}(t,f,h),h}function d4(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function f4(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function p4(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=d4(e)+e.labels.margin,t}function h4(e,t){return e.map(e=>Q3(e,t))}function m4(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function g4(e){let t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.scale,o=e.tilted,a=e.layered,s=e.tick;const l=t.height,c=m4(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-p4(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-p4(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=t4({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function y4(e){let t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.outerRect,o=e.tilted,a=e.layered,s=e.tick,l=e.index,c=e.major;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-p4(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-p4(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=i4({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=t4({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function b4(e){let t;function n(){return t=y4,n}function r(){return t=g4,r}function i(e){let n=e.settings,r=e.scale,i=e.innerRect,o=e.outerRect,a=e.measureText,s=e.ticks,l=e.state,c=e.textBounds;const u=[],d=function(e){return e.filter(e=>!e.isMinor)}(s),f=function(e){return e.filter(e=>e.isMinor)}(s),p={innerRect:i,align:n.align,outerRect:o},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(p.startAngle=n.arc.startAngle,p.endAngle=n.arc.endAngle,p.radius=n.arc.radius),n.line.show&&(p.style=n.line,p.padding=n.paddingStart,n.arc?u.push(o4(p)):u.push(G3(p))),n.ticks.show&&(p.style=n.ticks,p.tickSize=n.ticks.tickSize,p.padding=d4(n),n.arc?(p.padding=f4(n),g=function(e,t){return e.map(e=>s4(e,t))}(d,p)):g=h4(d,p)),n.labels.show){const e=p4(n);p.style=n.labels,p.padding=e,p.tilted=h,p.layered=m,p.angle=n.labels.tiltAngle,p.paddingEnd=n.paddingEnd,p.textBounds=c;const s=(e,s)=>{p.textRect=function(e){let t=e.style;return(0,e.measureText)({text:e.tick.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:p.style});const l=t({textMetrics:p.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});p.maxWidth=l.width,p.maxHeight=l.height,p.stepSize=function(e){let t=e.innerRect,n=e.scale,r=e.settings,i=e.tick;return("top"===r.align||"bottom"===r.align?t.width:t.height)*m4(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(p.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=f4(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map((e,r)=>{n(e,r);const i=u4(e,t);return i.data=e.data,i})}(d,p,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map((e,r)=>{n(e,r);const i=J3(e,t);return i.data=e.data,i})}(d,p,s):function(e,t,n,r){const i=t.padding,o=p4(n);return e.map((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=J3(e,t);return l.data=e.data,l})}(d,p,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>g5(uX(1,e[t].boundingRect),uX(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(l,g,p),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&f.length>0&&(p.style=n.minorTicks,p.tickSize=n.minorTicks.tickSize,p.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...h4(f,p))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const v4={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},x4={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0,centerEndLabels:!1},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const w4={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let t=e.state,n=e.style,r=e.settings;const i=YK(!0,{},t.isDiscrete?v4:x4,n),o=YK(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const s=o.paddingStart,l=o.paddingEnd;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=b4(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const t=this.formatter,n=this.state,r=this.scale,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=S2(r,i);const o=function(e){let t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=0;const l=n4({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:e.state}),c=l.size,u=l.edgeBleed;if(s+=c,l.isToLarge)return{size:s};if(a.ticks.show&&(s+=a.ticks.margin,s+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>s&&(s=e)}if(a.line.show){const e=a.line.strokeWidth/2;s+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return s+=a.paddingStart,s+=a.paddingEnd,{size:s,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).settings;this.setState(e)},resize(e){const t=e.inner,n=e.outer,r=YK({},t,function(e){let t=e.align,n=e.inner;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return YK(this.state.innerRect,r),YK(this.state.outerRect,i),n},beforeRender(){const e=this.scale,t=this.formatter,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=S2(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter(e=>e.position>=0&&e.position<=1)},render(){const e=this.state,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),I3.multiple(t),t}};const S4={render:()=>[]};function k4(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map(e=>e.title());r=e.join(t)}return r}function C4(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const E4={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=k4(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const e=this.title,t=this.definitionSettings,n=this.rect,r=[];return r.push(function(e){let t=e.title,n=e.definitionSettings,r=e.dock,i=e.rect,o=e.measureText,a=e.style;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:C4(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};YK(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(YK(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=k4(t,n,this.scale)}};function M4(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function R4(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const _4={require:["chart","renderer"],on:{panStart(e){const t=R4(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=M4(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=R4(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=R4(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=R4(e,this.renderer);M4(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function A4(e){let t=e.h,n=e.isVertical,r=e.value,i=e.pos,o=e.align,a=e.borderHit,s=e.state,l=e.idx;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,f="100%",p="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(f="".concat(s.targetRect.x+s.targetRect.width,"px"),p="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,f="".concat(s.rect.width-d,"px"),p="".concat(s.rect.height-d,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:i,"px"),top:"".concat(n?i:d,"px"),height:n?"".concat(a,"px"):p,width:n?f:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:YK({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function P4(e){let t=e.h,n=e.isVertical,r=e.label,i=e.otherValue,o=e.rangeIdx,a=e.idx,s=e.pos,l=e.align,c=e.state,u=e.value;const d="end"!==l,f="outside"===c.settings.bubbles.placement;let p,h="none";n?(p=d?"left":"right",f&&(h=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(p=d?"top":"bottom",f&&(h=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const b=m?t("input",{type:"text",value:u,style:ZK(ZK({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[p]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[b])}function I4(e){let t=e.h,n=e.isVertical,r=e.top,i=e.height,o=e.color,a=e.on,s=e.opacity;return t("div",YK({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function T4(e){let t=e.borderHit,n=e.els,r=e.isVertical,i=e.state,o=e.vStart,a=e.vEnd,s=e.idx,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,f=Math.abs(u-d),p=Math.min(u,d)+l,h=p+f;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),f={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(f.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[I4(f)]))}const m=u<d?o:a,g=u<d?a:o,y=eX(c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],2),b=y[0],v=y[1],x=m+1e-5>=b&&m-1e-5<=v,w=g-1e-5<=v&&g+1e-5>=b;x&&n.push(A4({h:i.h,isVertical:r,borderHit:t,value:m,pos:p,align:"start",state:i,idx:s})),w&&n.push(A4({h:i.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:i,idx:s}));const S=i.settings.bubbles;if(S&&S.show){S.fontSize,S.fontFamily,S.fill;const e=[o,a];x&&n.push(P4({h:i.h,isVertical:r,align:S.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,e)),pos:p,state:i})),w&&n.push(P4({h:i.h,isVertical:r,align:S.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(i.format(g,e)),pos:h,state:i}))}}function D4(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function O4(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach((r,i)=>{e.active&&i===e.active.idx||T4({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})}),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=D4(e);r=e.active.start+t,i=e.active.end+t}T4({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function N4(e){return{min:e.scale.min(),max:e.scale.max()}}function q4(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function L4(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function j4(e){e.renderer.render(O4(e))}function z4(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map(e=>e.id()),i=t.brushes().filter(e=>"range"===e.type&&-1!==r.indexOf(e.id))[0];return i?i.brush.ranges():[]}function F4(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function $4(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function B4(e){const t=e.reduce((e,t)=>(e.push(...aX(t.bounds)),e),[]);return sX(t)}const H4={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=z4(this.state,this.state.brushInstance),this.state.active=null,j4(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=S2(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map(t=>e.chart.component(t)).filter(e=>!!e&&!!e.rect),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=B4(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=S2(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=B4(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)}),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map(e=>({min:e.min,max:e.max}));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=ZK({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach(t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)})}(this.state,e,t,n),this.emit("bubbleEnd"),j4(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,j4(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=E1(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>$4(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(F4(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=c2(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach(e=>{if(!$4(r,[e.min,e.max]))return;const o=n.indexOf(F4(e.min,t)),a=n.indexOf(F4(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))}),i}(e,i);return this.state.ranges=z4(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[O4(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=YK({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(p/t.size),c.start=t.scale.normInvert(f/t.size);let h=t.ranges;const m=N4(t);let g,y,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),m.min=b>0?h[b-1].max:m.min,m.max=b+1<h.length?h[b+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=c.start&&c.start<=h[g].max){b=g,m.min=g?h[g-1].max:m.min,m.max=g+1<h.length?h[g+1].min:m.max;break}if(c.start<h[g].min){m.max=h[g].min,m.min=g?h[g-1].max:m.min;break}}-1===b&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==b)if(y={idx:b,start:h[b].min,end:h[b].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(f-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(f-n)<=o&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!b5(t.targetRect,{x:u,y:d})||Object.keys(c).forEach(e=>t[e]=c[e])}({e:e,state:this.state,renderer:this.renderer,ranges:z4,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=N4(e);L4(e,e.current,n)}(this.state,z4),j4(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map(e=>({min:e.min,max:e.max}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=D4(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach(n=>{if(e.fauxBrushInstance){let r=z4(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter(e=>-1===i.indexOf(e)),s=i.filter(e=>-1===o.indexOf(e)),l=a.map(e=>({key:n.id(),value:e})),c=s.map(e=>({key:n.id(),value:e}));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)})}(this.state),j4(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;j4(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function V4(e){e.renderer.render(O4(e))}function W4(e){return e.rc.ranges()}function U4(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const G4={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map(e=>this.chart.component(e)).filter(e=>!!e&&!!e.rect),a=o[0]?o.slice(1).reduce((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)}),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=J1(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i}),l=e.settings.brush.components.reduce((e,t)=>e.key===s.key?e:t);return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=p,m=f;c.start=f,c.current=p;let g=t.ranges;const y=q4(t);let b,v,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(b=0;b<g.length;b++){if(g[b].min<=m&&m<=g[b].max){x=b,y.min=b?g[b-1].max:y.min,y.max=b+1<g.length?g[b+1].min:y.max;break}if(m<g[b].min){y.max=g[b].min,y.min=b?g[b-1].max:y.min;break}}-1===x&&g.length&&b>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(v={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=v.start,t=v.end;Math.abs(f-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(f-t)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!b5(t.targetRect,{x:u,y:d})||Object.keys(c).forEach(e=>t[e]=c[e])}({e:e,state:this.state,renderer:this.renderer,ranges:W4,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=q4(e);L4(e,e.current,n)}(this.state,W4),V4(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map(e=>({min:e.min,max:e.max}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=D4(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach(t=>{n=[...n,...U4(e,t)]}),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),V4(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function Y4(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map(e=>e.id()),i=t.brushes().filter(e=>"range"===e.type&&-1!==r.indexOf(e.id))[0];return i?i.brush.ranges():[]}(e).map(i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}})}function K4(e,t,n,r){function i(){!function(e){e.renderer.render(Y4(e))}(e)}function o(){!function(e){e.renderer.render(Y4(e))}(e)}function a(){!function(e){e.renderer.render(Y4(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function X4(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const J4={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=S2(this.chart.scale(e.scale),r);return X4(this.state),K4(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,Y4(this.state)},beforeDestroy(){X4(this.state)}};function Q4(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function Z4(e,t,n){return F2(e,t.points[0])<n.settings.snapIndicator.threshold**2}function e6(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function t6(e){let t=e.state,n=e.start,r=void 0===n?null:n,i=e.end,o=void 0===i?null:i;null!==r&&(t.snapIndicator.x1=r.x,t.snapIndicator.y1=r.y),null!==o&&(t.snapIndicator.x2=o.x,t.snapIndicator.y2=o.y)}function n6(e,t){e.snapIndicator.visible=t}const r6={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map(e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"}));const n=Q4(this.state.rendererBounds,e);e6(this.state,n),t6({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=Q4(this.state.rendererBounds,e);Z4(t,this.state,this.settings)?n6(this.state,!0):n6(this.state,!1),e6(this.state,t),t6({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter(e=>e.visible);t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;n6(this.state,!1);Z4(Q4(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map(e=>({x:e.x+n,y:e.y+r})),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach(e=>{e.contexts.forEach(e=>{t.brush(e).end()})}),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function i6(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function o6(e){let t=e.orientation,n=e.targetNodes,r=e.labels,i=e.container,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i6;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const d=r[t],f=d.textBounds,p=d.node;if(f[s]<i[s]||f[s]+f[l]>i[s]+i[l])return!1;for(let e=o(f,a,s,l,c);e<a.length;e++)if(g5(f,a[e].textBounds))return!1;const h=o(f,n,s,l,u),m=f[s]+f[l];for(let e=h;e<n.length;e++){const t=n[e].node;if(m<t.localBounds[s])break;if(g5(f,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}function a6(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function s6(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function l6(e){return ZK(ZK({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function c6(e,t,n){return n?e.width>=t.height:e.width>=t.width}function u6(e,t,n){return n?e.height>=t.width:e.height>=t.height}function d6(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||c6(t,n,!0),a=u6(t,n,!r)):(o=c6(t,n),a=i||u6(t,n,!1)),o&&a}function f6(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function p6(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return c6(e,t,n.rotate)&&u6(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=f6(e.x,e.width,i.height,n.align)+o,r.y=f6(e.y,e.height,i.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(i.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=f6(e.x,e.width,i.width,n.align),r.y=f6(e.y,e.height,i.height,n.justify)+o),r}function h6(e){let t=e.bar,n=e.view,r=e.direction,i=e.position,o=e.padding,a=void 0===o?4:o,s=e.measured;const l={};if(YK(l,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(l.y=0,l.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(l.y=o,l.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(l.x=0,l.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(l.x=o,l.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(l,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=n.top,i=void 0===r?4:r,o=n.bottom,a=void 0===o?4:o,s=n.left,l=void 0===s?4:s,c=n.right,u=void 0===c?4:c,d="function"==typeof l?l(t):l,f="function"==typeof u?u(t):u,p="function"==typeof i?i(t):i,h="function"==typeof a?a(t):a;e.x+=d,e.width-=d+f,e.y+=p,e.height-=p+h}(l,s,a),l}function m6(e){let t,n,r,i,o,a=e.direction,s=e.fitsHorizontally,l=e.measured,c=e.node,u=e.orientation,d=e.placementSettings,f=e.rect,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h6;const h=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=p({bar:c.localBounds,view:f,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(i),t=!o||i[m]>t[m]?i:t,d6(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=h.indexOf(n)),r=d[o],{bounds:n,placement:r}}function g6(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o=i.top,a=void 0===o?4:o,s=i.bottom,l=void 0===s?4:s,c=i.left,u=void 0===c?4:c,d=i.right,f=void 0===d?4:d,p="function"==typeof u?u(t):u,h="function"==typeof f?f(t):f,m="function"==typeof a?a(t):a,g="function"==typeof l?l(t):l,y=e.x+e.dx,b=e.y+e.dy,v=n?Math.min(t.width,r.height):Math.min(t.height,r.width),x=n?Math.min(t.height,r.height):Math.min(t.width,r.width),w=.5*t.height,S=1e-9;return{x:(n?y-w:y)-p-S,y:(n?b:b-w)-m-S,width:x+(p+h)-S,height:v+(m+g)-S}}function y6(e){let t=e.chart,n=e.targetNodes,r=e.rect,i=e.fitsHorizontally,o=e.collectiveOrientation,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m6,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p6,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o6;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,f,p,h,m,g,y,b,v,x,w,S,k,C;for(let e=0,l=n.length;e<l;e++){g=null,f=n[e],p=f.node,k=a6(p,t),v=f.direction,C="left"===v||"right"===v?"h":"v";for(let t=0;t<f.texts.length;t++){if(h=f.texts[t],!s6(h))continue;x=f.labelSettings[t],b=f.measurements[t],S=x.placements;const n=a({direction:v,fitsHorizontally:i,lblStngs:x,measured:b,node:p,orientation:C,placements:S,placementSettings:f.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){var E;m=w.justify;const t="function"==typeof x.linkData?x.linkData(k,e):void 0,n="function"==typeof w.overflow?w.overflow(k,e):w.overflow;"up"===v&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===o||i);if(d=s(g,h,{justify:"h"===C?w.align:m,align:"h"===C?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=g6(d,b,r,g,w.padding);y="function"==typeof w.fill?w.fill(ZK(ZK({},k),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(ZK(ZK({},k),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=g6(d,b,r,g,w.background.padding))),c.push(d),u.labels.push({node:p,textBounds:n})}}}}const M=c.filter(l(u));return[...M.filter(e=>void 0!==e.backgroundBounds).map(l6),...M]}function b6(e){const t=2*Math.PI;return(e%t+t)%t}function v6(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function x6(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function w6(e,t,n){let r=t.x,i=t.y;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function S6(e){let t,n,r=e.radius,i=e.size,o=e.angle,a=i.width,s=i.height,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=w6(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=w6(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=w6(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=w6(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function k6(e){let t=e.slice,n=e.measured,r=e.padding,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=b6((i+o)/2);let d=s-r,f={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(f.angle=u-Math.PI/2,f.anchor="end"):(f.angle=u+Math.PI/2,f.anchor="start"),f}function C6(e){let t=e.context,n=e.node,r=e.bounds;let i=n.desc.slice;const o=b6((i.start+i.end)/2);switch(Math.floor(o/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function E6(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function M6(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function R6(e){let t,n,r=e.slice,i=e.direction,o=e.position,a=e.padding,s=e.measured,l=e.view,c=e.context,u=e.store,d=r.start,f=r.end,p=r.innerRadius,h=r.offset;switch(o){case"into":t="rotate"===i?k6({slice:r,measured:s,padding:a}):function(e){let t=e.slice,n=e.padding,r=e.measured,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius;const l=b6((i+o)/2);let c=S6({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",v5(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||v5(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||u5({cx:0,cy:0,r:a},c)?null:(v6(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:f,innerRadius:0,outerRadius:p},t="rotate"===i?k6({slice:n,measured:s,padding:a}):function(e){let t=e.slice,n=e.padding,r=e.measured,i=e.store;const o=t.start,a=t.end,s=t.outerRadius,l=b6((o+a)/2);let c=S6({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",v6(c,n),i.insideLabelBounds.some(e=>g5(e,c))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let t=e.slice,n=e.measured,r=e.padding,i=e.view,o=t.start,a=t.end,s=t.outerRadius,l=t.offset,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=b6((o+a)/2);let f=Math.sin(d)*c,p=-Math.cos(d)*c,h=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=p<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<h&&(h=t)}if(Math.sin(m)>.001){let e=f<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<h&&(h=t)}if(h<=0||h<n.minReqWidth)return null;let g={x:f,y:p,width:h,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let t=e.slice,n=e.measured,r=e.padding,i=e.view,o=e.context,a=t.start,s=t.end,l=t.outerRadius,c=t.offset;const u=b6((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,f=Math.sin(u)*d,p=-Math.cos(u)*d,h=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(f+c.x));e<h&&(h=e)}else{let e=Math.abs(i.x-(f+c.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:f,y:p,width:h,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=h.x,t.y+=h.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const r=n.start,i=n.end,o=n.offset,a=n.outerRadius,s=b6((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function _6(e){let t=e.context,n=e.direction,r=e.measured,i=e.node,o=e.placementSettings,a=e.rect,s=e.store,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R6;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function A6(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const P6=/\n+|\r+|\r\n/,I6=/\s/,T6=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function D6(e){return"string"==typeof e?-1!==e.search(P6):-1!==String(e).search(P6)}function O6(e){return-1!==e.search(I6)}function N6(e){return-1!==e.search(T6)}function q6(e,t,n){return Math.max(t,Math.min(n,e))}function L6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.string,n=e.separator,r=void 0===n?"":n,i=e.reverse,o=void 0!==i&&i,a=e.measureText,s=void 0===a?e=>({width:e.length,height:1}):a,l=e.mandatoryBreakIdentifiers,c=void 0===l?[D6]:l,u=e.noBreakAllowedIdentifiers,d=void 0===u?[]:u,f=e.suppressIdentifier,p=void 0===f?[O6,D6,e=>""===e]:f,h=e.hyphenationIdentifiers,m=void 0===h?[N6]:h;const g=String(t).split(r);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(g);const y=g.length,b=o?e=>e>=0:e=>e<y;let v=o?y:-1;function x(e){const t=q6(e,0,y-1),n=g[t],r=s(n),i=function(e,t,n,r,i){return r.some(r=>r(e,t,n))?1:i.some(r=>r(e,t,n))?0:2}(n,t,g,c,d);return{index:t,value:n,breakOpportunity:i,suppress:p.some(e=>e(n,t,g)),hyphenation:m.some(e=>e(n,t,g)),width:r.width,height:r.height,done:!1}}return{next:function(e){return isNaN(e)?o?v--:v++:v=q6(e,0,y-1),b(v)?x(v):{done:!0}},peek:x,length:y}}const j6="…",z6=/^\s*\d+(\.\d+)?px\s*$/i;function F6(e){return"string"===typeof e&&z6.test(e)}function $6(e){const t=e["font-size"]||e.fontSize;return F6(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function B6(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=$6(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function H6(e,t){return{lines:[],line:"",width:0,maxLines:B6(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function V6(e){e.lines.push(e.line),e.line="",e.width=0}function W6(e,t){e.line+=t.value,e.width+=t.width}function U6(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function G6(e,t,n){const r=L6({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?U6(e,t,r):t,V6(e),W6(e,t)):W6(e,t)}}function Y6(e,t){const n=L6({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=H6(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){V6(r),i=!1;break}1===e.breakOpportunity?V6(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?U6(r,e,n):e,V6(r),W6(r,e)):W6(r,e)}return{lines:r.lines,reduced:i}}function K6(e,t){const n=L6({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=H6(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){V6(r),i=!1;break}1===e.breakOpportunity?V6(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?V6(r):e.width>r.maxWidth?G6(r,e,t):(V6(r),W6(r,e)):W6(r,e)}return{lines:r.lines,reduced:i}}function X6(e){return{"break-all":Y6,"break-word":K6}[e.wordBreak]}function J6(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=X6(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||D6(n.text)){const o=($6(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach((a,s)=>{const l=YK({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=j6:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)}),i}(a,n,o,i.height)}}}}function Q6(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,i="string"==typeof e.text?e.text:"".concat(e.text),o=e.maxWidth;if(void 0===o)return i;let a=t({text:i,fontSize:r,fontFamily:n}).width;if(a<=o)return i;let s=0,l=i.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:i.substr(0,e)+j6,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+j6}function Z6(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const e8={},t8={},n8={fontSize:void 0,fontFamily:void 0};let r8;function i8(e,t){return!e&&!t||e===t}function o8(e){let t=e.text,n=e.fontWeight,r=e.fontSize,i=e.fontFamily;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof t8[o]&&(r8=r8||document.createElement("canvas").getContext("2d"),function(e){let t=e.fontWeight,n=e.fontSize,r=e.fontFamily;i8(n8.fontWeight,t)&&i8(n8.fontSize,n)&&i8(n8.fontFamily,r)||(r8.font=[t,n,r].filter(e=>!!e).join(" "),n8.fontWeight=t,n8.fontSize=n,n8.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),t8[o]=r8.measureText(t).width),t8[o]}function a8(e){return"number"!=typeof e8[e]&&(e8[e]=function(e){if(F6(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),e8[e]}function s8(e){let t=e.text,n=e.fontWeight,r=e.fontSize;return{width:o8({text:t,fontWeight:n,fontSize:r,fontFamily:e.fontFamily}),height:a8(r)}}function l8(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s8;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+Z6(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function c8(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s8;const n=X6(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||D6(e.text))){const o=n(e,e=>t({text:e,fontFamily:i,fontSize:r})),a=YK({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?j6:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=l8(a,t);return c.height=$6(e)*o.lines.length,c}return l8(e,t)}function u8(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function d8(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function f8(e){return{type:"circle",bounds:{cx:e.cx,cy:e.cy,r:e.r}}}function p8(e){return e.desc&&e.desc.slice?function(e){let t=e.start,n=e.end,r=e.innerRadius,i=e.outerRadius,o=e.offset;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return f8({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?f8(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var h8={bar:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y6;const l=YK({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map(e=>YK({},l,t,e)),u=t.labels.map(e=>e.placements.map(n=>YK({},l,t,e,n))),d=function(e){let t=e.nodes,n=e.rect,r=e.chart,i=e.labelSettings,o=e.placementSettings,a=e.settings,s=e.renderer;const l={},c=[];let u,d,f,p,h,m,g,y=!0,b=!1;for(let e=0;e<t.length;e++){if(d=t[e],p=d.localBounds,!g5(p,n))continue;let v=a6(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],f="function"==typeof m.label?m.label(v,e):void 0,s6(f)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=f,h=s.measureText(l),u.measurements.push(h),u.texts.push(f),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&h.width<=p.width-8);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:b}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:u}),f=d.fitsHorizontally,p=d.hasHorizontalDirection,h=d.targetNodes,m=function(e){let t=e.orientation,n=void 0===t?"auto":t,r=e.defaultOrientation,i=void 0===r?"h":r;switch(n.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return i}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),g="h"===m?"y":"x",y="h"===m?"height":"width";return h.sort((e,t)=>e.node.localBounds[g]+e.node.localBounds[y]-(t.node.localBounds[g]+t.node.localBounds[y])),s({chart:n,targetNodes:h,stngs:t,rect:i,fitsHorizontally:f,collectiveOrientation:m})},slice:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_6,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:M6;const c=YK({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map(e=>YK({},c,t,e)),d=t.labels.map(e=>e.placements.map(n=>YK({},c,t,e,n))),f=[],p={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o].desc.slice,s=b6((a.start+a.end)/2);switch(Math.floor(s/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>b6((e.desc.slice.start+e.desc.slice.end)/2)-b6((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const h={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=E6(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=A6(c,r,o),b=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:p}),v=b.bounds,x=b.placement;if(v&&x){if("outside"===x.position&&"rotate"!==m){C6({context:h,node:t,bounds:v});if(!n5(x6(v),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(v,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),f.push(o),v.line&&(v.line.stroke=n,f.push(v.line)))}}}return f},rows:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.renderer,o=e.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d8;const s=YK({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=YK({},s,t),c=t.labels.map(e=>YK({},l,e)),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=u8(t,n),s=p8(t),f=s.type,p=s.bounds;if(!p)continue;let h,m=0,g=[],y=[],b="circle"===f?2*p.r*.9:p.height;for(m+=l.padding,h=0;h<c.length;h++){let t=c[h],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=i.measureText(u);if(m+=r.height+t.padding,m>b)break;y.push(n),g.push(r)}const v=h,x=Math.max(0,b-m);let w;for(w="circle"===f?p.cy-.9*p.r:p.y,w+=l.justify*x+l.padding,h=0;h<v;h++){let t,n=c[h];if("circle"===f){let e=Math.max(Math.abs(w-p.cy),Math.abs(w+g[h].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:w,width:2*n-2*l.padding,height:g[h].height}}else t={x:p.x+l.padding,y:w,width:p.width-2*l.padding,height:g[h].height};w+=g[h].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const s="function"==typeof n.linkData?n.linkData(o,e):void 0;let u=a(t,y[h],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:g[h]});if(u){if(u.text&&u.text!==j6){const e=Q6(u,i.measureText);if(j6===e)continue;u.ellipsed=e}void 0!==s&&(u.data=s),d.push(u)}}}return d}};const m8={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach(e=>{e.strategy&&h8[e.strategy.type]&&e.component&&t.push(...function(e,t){let n=e.chart,r=e.source,i=e.rect,o=e.renderer,a=e.style;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter(e=>e.key===r.component);return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},h8[e.strategy.type]))}),t}};const g8={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function y8(e){let t=e.x,n=void 0===t?0:t,r=e.y,i=e.item,o=e.globalMetrics,a=e.createSymbol,s=e.direction,l=void 0===s?"ltr":s,c=i.label.displayObject,u=i.label.bounds,d=i.symbol.meta;const f="rtl"===l;let p={x:f?n+o.maxLabelBounds.width:n+o.maxSymbolSize+o.spacing,y:r,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},h=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:f?n+o.maxLabelBounds.width+o.spacing:n,y:r,width:o.maxSymbolSize,height:p.height},d.size,{align:void 0===d.align?.5:d.align,justify:void 0===d.justify?.5:d.justify});const m=a(YK({},d,h));return delete m.collider,c.anchor=f?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(p,c,{textMetrics:u,fontSize:parseInt(c.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:i.label.displayObject.data,children:[m,c],collider:{type:"rect",x:n,y:r,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:p}}function b8(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function v8(e,t){let n,r,i,o,a=t.onScroll,s=void 0===a?()=>{}:a,l=null,c=0;const u={itemize:t=>{n=function(e,t){let n,r,i=e.resolved,o=e.dock,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,d=0,f=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=YK({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),f=Math.max(r.label.bounds.height,f)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,f),width:u+8+d},maxLabelBounds:{width:d,height:f}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),l=isNaN(n.layout.scrollOffset)?l:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,c=u.getContentOverflow(i);const a=u.extent();l=Math.max(0,Math.min(l,c)),o=YK({},i);const s="horizontal"===u.orientation()?"x":"y";return o[s]-=l,o["x"===s?"width":"height"]=a,function(e,t,n){let r=e.viewRect,i=n.itemized,o=n.create,a=void 0===o?y8:o,s=n.parallels,l=n.createSymbol;const c=i.layout.direction,u=i.globalMetrics,d=i.items,f="horizontal"===i.layout.orientation;let p=0;const h=[],m=u.maxItemBounds.height,g=u.maxItemBounds.width,y=i.layout.margin.vertical+m,b=i.layout.margin.horizontal+g;let v=t.x,x=t.y,w=r.x-t.x;for(let e=0;e<d.length;e++){let n=a({y:x,x:"rtl"===c?r.x+w+r.width-g-(v-t.x):v,item:d[e],globalMetrics:u,direction:c,createSymbol:l});if((f&&v>=r.x-g||!f&&x>=r.y-m)&&h.push(n.item),p++,p>=s?(p=0,f?(v+=b,x=t.y):(x+=y,v=t.x)):f?x+=y:v+=b,!f&&x>r.y+r.height)break;if(f&&v>r.x+r.width)break}return h}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return b8(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,b8(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===u.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===u.orientation()?o.x<i.x:o.y<i.y,next:()=>{u.scroll(-u.getNextSize())},prev:()=>{u.scroll(u.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(c,l-e));t!==l&&(l=t,s())},offset:()=>l,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>b8(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return u}function x8(e){return Object.keys(e).filter(t=>e[t]).join(" ")}const w8={up:"▲",right:"▶",down:"▼",left:"◀"};function S8(e,t){let n=t.size,r=t.isActive,i=t.direction,o=t.nav,a={},s="";const l=t.attrs;o&&o.button&&("function"==typeof o.button.class?a=o.button.class({direction:i}):o.button.class&&(a=o.button.class),"function"==typeof o.button.content&&(s=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(l.tabindex=o.button.tabIndex));const c={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(a).length||(c.border="0",c.background="none"),(!r||o&&o.disabled)&&(l.disabled="disabled"),e("button",YK({class:x8(a),style:c},l),[s||e("span",{style:{pointerEvents:"none"}},[w8[i]])])}function k8(e){let t;const n={itemize:e=>{t=function(e){let t=e.dock;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:e.navigation}}(e)},render:r=>function(e,t,n,r){let i=t.rect,o=t.itemRenderer;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const f=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[S8(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),S8(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(f)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function C8(e){let t;const n={itemize:n=>{t=function(e,t){let n=e.resolved;if(!1===n.title.item.show)return null;const r=YK({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let r=e.rect;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(YK({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function E8(e,t,n,r){let i,o,a,s=r.itemRenderer,l=r.navigationRenderer,c=r.titleRenderer,u=r.isPreliminary,d=void 0!==u&&u,f=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){i={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-i.width-(i.width?t.spacing:0),n=p.height;s.parallelize(e,d?void 0:n);const r=s.extent()>e?l.extent():0,u=s.spread(),h=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:p.y+Math.max(0,(h-u)/2),width:p.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},i.y=o.y;"rtl"===s.direction()&&(a.x=p.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),f=Math.max(i.height,h,s.spread())}else{const e=p.height-i.height-(i.height?t.spacing:0),n=p.width;s.parallelize(e,d?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},o={x:p.x,y:i.y+i.height+(i.height?t.spacing:0),width:p.width,height:p.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},f=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=YK({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:YK({},e,i),content:YK({},e,o),navigation:YK({},e,a),orientation:n,preferredSize:f}}function M8(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map((t,n)=>{const i=e.scale.datum?YK({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i})}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:YK(!0,{},g8.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:g8.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:YK(!0,{},g8.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=YK(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:YK(!0,{},g8.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:YK(!0,{},{show:g8.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function R8(e){const t=e.rect,n=e.settings,r=e.state,i=e.itemRenderer,o=e.navigationRenderer,a=e.titleRenderer,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=E8(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:YK({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},u}const _8={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=R8(this);this.update(e)},this.itemRenderer=v8(this,{onScroll:this.onScroll}),this.navigationRenderer=k8(this),this.titleRenderer=C8(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),M8(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=E8(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){M8(this)},render(){return R8(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function A8(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function P8(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function I8(e){return P8(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function T8(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function D8(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}});return o}(e,i),a=P8((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),c=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),u={isVertical:t,nodes:[],title:{anchor:I8(e.settings),textMetrics:l,textBounds:c,requiredWidth:()=>{if(!n.show)return 0;let e=c.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=c.height;return t&&(e+=n.padding),Math.min(e,u.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map(e=>e.textMetrics.width)),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...u.ticks.values.map(e=>e.textMetrics.height))+e.stgns.tick.padding:0,height:Math.max(...o.map(e=>e.textMetrics.height))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return u}const O8={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=T8(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce((e,t)=>e+t.textMetrics.height,0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map(e=>e.textMetrics.height))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=D8(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=D8(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=T8(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return A8(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map(e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))}));return r.sort((e,t)=>e.offset-t.offset)}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return A8(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map(a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}});return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const N8={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function q8(e,t){let n=t.generatorType,r=t.item,i=t.data,o=t.major,a=t.minor,s=t.layerObj,l=t.stngs,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function L8(e){const t=function(e){let t=e.data,n=e.stngs,r=e.rect,i=e.resolver,o=e.style,a=e.domain;const s=r.width,l=r.height,c=i.resolve({data:t,defaults:N8.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let f=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:f++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const p=Object.keys(d).map(e=>(d[e].consumableData=ZK({points:d[e].dataItems},d[e].dataItems[0]),d[e])),h={items:p.map(e=>e.consumableData)},m=n.layers||{};return{coordinates:c,metaLayers:p,layers:i.resolve({data:h,defaults:{curve:N8.layers.curve,show:N8.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:h,defaults:YK({},N8.layers.line,o.line),settings:m.line}),areas:i.resolve({data:h,defaults:YK({},N8.layers.area,o.area),settings:m.area})}}(e),n=t.metaLayers,r=t.coordinates,i=t.layers,o=t.lines,a=t.areas,s=[];return n.forEach((t,n)=>{const l=i.items[n];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,f;for(let n=0;n<t.items.length;n++){if(d=t.items[n],f=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=r.settings.minor.scale?r.settings.minor.scale(f.minor0?f.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const p=c.sort((e,t)=>e-t)[Math.floor((c.length-1)/2)];s.push({layerObj:l,lineObj:o.items[n],areaObj:a.items[n],median:p,points:u,consumableData:t.consumableData})}),s}const j8={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let t=e.data;const n=this.rect,r=n.width,i=n.height;this.stngs=this.settings.settings||{};const o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,a=L8({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=a.map(e=>({id:e.layerObj.id,data:e.layerObj.data})).sort(this.stngs.layers.sort).map(e=>e.id);a.sort((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id))}else a.sort((e,t)=>e.median-t.median);return function(e,t){let n=t.width,r=t.height,i=t.missingMinor0,o=t.stngs;const a=[],s=o.layers||{};return e.forEach(e=>{const t=e.lineObj,l=e.layerObj,c=e.areaObj,u=e.points;let d={size:r,p:"y"},f={size:n,p:"x"};if("vertical"===o.orientation){const e=YK(!0,{},f);f=YK(!0,{},d),d=YK(!0,{},e)}s.area&&!1!==c.show&&a.push(q8(u,{data:e.consumableData,item:c,generatorType:"area",major:f,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(q8(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:f,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(q8(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:f,minor:d,layerObj:l,stngs:o},"none")))}),a}(a,{width:r,height:i,missingMinor0:o,stngs:this.stngs})}};function z8(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function F8(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function $8(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const B8={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=z8(this,e,!1);b5({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map(e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})),this.state.start=z8(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=z8(this,e),function(e){if(e.state.active){const t=F8(e,e.state.start),n=F8(e,e.state.end),r=e.chart.shapesAt($8(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([YK({type:"rect"},$8(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach(e=>{Array.isArray(e.contexts)&&e.contexts.forEach(e=>{t.brush(e).end()})}),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function H8(e,t,n){let r=n.renderer,i=n.style,o=n.props,a=n.h;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:x8(YK({"pic-tooltip":!0},s.tooltip)),style:YK({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:x8(YK({"pic-tooltip-content":!0},s.content))},l),a("div",{class:x8(YK({"pic-tooltip-arrow":!0},s.arrow)),style:YK({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function V8(e){let t=e.defaultDuration,n=e.defaultDelay,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach(t=>t(e))},e.on=(e,n)=>{Array.isArray(e)?e.forEach(e=>t[e].push(n)):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach(e=>{t[e].length=0})},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout(()=>{e(),o=!0,r=null,a.set("active")},c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function W8(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function U8(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function G8(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function Y8(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function K8(e){let t=e.area,n=e.vx,r=e.vy,i=e.width,o=e.height,a=e.offset;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,f=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,f+=l+u>t.height?-(l+u-t.height):0,{x:d,y:f}}function X8(e){let t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.dockOrder,a=e.x,s=e.y;const l=n.targetBounds,c=W8(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:G8(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},f=U8(r,i,t.offset),p=[],h="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=K8({area:d,vx:h,vy:m,width:r,height:i,offset:f[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=G8(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,p.push(y)}return p.sort((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x)),p[0]}function J8(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return YK({scaleRatio:i.scaleRatio},i.computedInner)}const Q8={bounds:function(e){let t=e.resources,n=e.nodes,r=e.pointer,i=e.width,o=e.height,a=e.options;const s=r.targetBounds,l=t.getNodeBoundsRelativeToTarget(n[0]),c=l.x,u=l.y,d=l.width,f=l.height,p={left:{x:c,y:u+f/2},right:{x:c+d,y:u+f/2},top:{x:c+d/2,y:u},bottom:{x:c+d/2,y:u+f},inside:{x:c+d/2,y:u+f/2}},h=W8(a.offset),m=h[a.dock];if(m)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:m},computedArrowStyle:G8(a.offset)[a.dock],dock:a.dock};const g={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},y=U8(i,o,a.offset),b=["top","left","right","bottom","inside"];for(let e=0;e<b.length;e+=1){const t=b[e];if(Y8(g,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,i,o,y[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:h[t]},computedArrowStyle:G8(a.offset)[t],dock:t}}const v=function(e){let t=e.options,n=e.docks,r=e.dockOffsets,i=e.targetBounds,o=e.area,a=e.width;const s="top",l="target"===t.area?n[s].x:i.left+n[s].x,c=("target"===t.area?n[s].y:(i.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let f=n.top.x;return u<0&&u+d>o.width||(u<0?f-=u:u+d>o.width&&(f-=u+d-o.width)),f}({options:a,docks:p,dockOffsets:y,targetBounds:s,area:g,width:i});return{computedTooltipStyle:{left:"".concat(v,"px"),top:"".concat(p.top.y,"px"),transform:h.top},computedArrowStyle:G8(a.offset+v-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let t=e.options,n=e.pointer,r=e.width,i=e.height;return X8({x:n.x,y:n.y,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.nodes,a=e.resources;const s=o[0],l=n.dx,c=n.dy,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,f=c+u.y+u.height/2,p=s.desc.slice,h=p.start,m=p.end,g=p.outerRadius,y=(h+m)/2-Math.PI/2,b=2*Math.PI,v=(y%b+b)%b;let x=["top","left","right","bottom"];return"auto"===t.dock&&(x=v<=Math.PI/4||v>=7*Math.PI/4?["right","top","bottom","left"]:v<=3*Math.PI/4?["bottom","left","right","top"]:v<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),X8({x:d+g*u.scaleRatio.x*Math.cos(v),y:f+g*u.scaleRatio.y*Math.sin(v),pointer:n,width:r,height:i,options:t,dockOrder:x})}};function Z8(e,t){let n=e.width,r=e.height,i=t.chart,o=t.state,a=t.props;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>J8(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=J8(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=YK(c,a.placement(s))),"object"===l&&Q8[a.placement.type]?c=YK(c,a.placement):"string"===l&&Q8[a.placement]&&(c=YK(c,{type:a.placement})),s.options=c;const u=Q8[c.type](s);let d=s.resources.getComponentBoundsFromNode(s.nodes[0]),f=d.x,p=d.y,h=d.width,m=d.height;return f+=s.pointer.dx,h+=f,p+=s.pointer.dy,m+=p,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,f,parseFloat(u.computedTooltipStyle.left)),h),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(u.computedTooltipStyle.top)),m),"px"),u}let e7;function t7(){e7=null}const n7={duration:8e3,delay:500,filter:e=>e.filter(e=>e.data&&void 0!==e.data.value),extract:e=>e.node.data.value,content:e=>{let t=e.h;return e.data.map(e=>t("div",{},e))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data)),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const r7={require:["chart","renderer"],defaultSettings:{settings:n7,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.nodes,i=n.duration,o=n.delay;!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let n=t.chart,r=t.state,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,f=i-a.left,p=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:f,cy:p,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(r)?this.props.filter(r):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke(()=>this.invokeRenderer(this.state.activeNodes),i,o)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=V8({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",()=>{!function(e){e7&&e7!==e&&e7()}(t),e7=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}),this.dispatcher.on(["cancelled","fulfilled"],()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,YK({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,YK({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),e7===t&&(e7=null),this.state.tooltipElm=void 0}),this.dispatcher.on("active",()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})},created(){this.init(this.settings)},beforeUpdate(e){let t=e.settings;this.dispatcher&&(this.dispatcher.destroy(),t7()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),t7()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const e=this.state.targetElement.getBoundingClientRect(),t=e.width,n=e.height;this.renderer.destroy(),this.renderer.size({width:t,height:n}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let n=t.chart,r=t.scale,i=t.props,o=t.h;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach(e=>{if("function"==typeof i.extract){const t=YK({node:e},a);s.push(i.extract(t))}}),s}(e,this),n=Z8(H8(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=H8(t,n,this)}};const i7={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter(e=>e.key===this.props.target),t=e.filter(e=>e.collider).map(e=>e.collider);t.forEach(e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}}),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var o7={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},a7=/([astvzqmhlc])([^astvzqmhlc]*)/gi,s7=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function l7(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(a7,(e,n,r)=>{const i=function(e){const t=e.match(s7);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<o7[o])return"";for(t.push([a,...i.splice(0,o7[o])]);i.length>=o7[o]&&i.length&&o7[o];)t.push([a,...i.splice(0,o7[o])]);return""}),t}const c7=2*Math.PI;function u7(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function d7(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function f7(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=u7(e,t),s=u7(t,n),l=u7(n,r),c={x:d7(.5,e.x,t.x,n.x,r.x),y:d7(.5,e.y,t.y,n.y,r.y)},u=u7(a,s),d=u7(s,l);return f7(e,a,u,c,i,o-1),f7(c,d,l,r,i,o-1),i}function p7(e,t,n){const r=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return f7(e,r.cp1,r.cp2,n)}function h7(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],f=e[7],p=e[1],h=e[2];if("a"===e[0]&&(d+=t,f+=n),t===f&&n===f)return r;if(!p||!h)return r.push({x:d,y:f}),r;var m=function(e,t,n,r,i,o,a,s,l){let c,u,d,f,p,h;const m=D2(n%360),g=Math.cos(m),y=Math.sin(m),b=(s-o)/2,v=(l-a)/2,x=g*b+y*v,w=g*v-y*b;h=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const S=e*w,k=t*x,C=S**2+k**2,E=(e*t)**2-C;let M=Math.sqrt(Math.max(E/C,0));r===i&&(M=-M);const R=M*(S/t),_=M*(-k/e);f=g*R-y*_+(s+o)/2,p=y*R+g*_+(l+a)/2;const A=(x-R)/e,P=(w-_)/t,I=(-x-R)/e,T=(-w-_)/t;return c=Math.atan2(P,A),c+=c<0?c7:0,u=Math.atan2(T,I),u+=u<0?c7:0,d=u-c,!i&&c<u?d-=c7:i&&u<c&&(d+=c7),d%=c7,{startAngle:c,sweepAngle:d,cx:f,cy:p,rx:e,ry:t}}(p,h,a,i,o,d,f,t,n);s=m.cx,l=m.cy,p=m.rx,h=m.ry,c=m.sweepAngle,u=m.startAngle;const g=Math.abs(c*Math.sqrt((p**2+h**2)/2)),y=Math.ceil(g/10),b=c/y;for(let e=1;e<=y;e++){const t=(u+b*e)%c7,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*p+-i*n,y:l+i*h+n*i})}return r}function m7(e){const t=l7(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(...h7(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...h7(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...f7({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...f7({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...f7({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...f7({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...p7({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...p7({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...p7({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...p7({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const g7={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter(e=>e.key===this.props.target),t=[];e.forEach(e=>{m7(e.attrs.d).forEach(e=>{e.forEach(e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})})})}),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var y7=[function(e){e.component("box",b3),e.component("box-marker",b3)},function(e){e.component("point",M3),e.component("point-marker",M3)},function(e){e.component("pie",P3)},function(e){e.component("grid-line",N3)},function(e){e.component("ref-line",U3)},function(e){e.component("axis",w4)},function(e){e.component("container",S4)},function(e){e.component("text",E4)},function(e){e.component("scrollbar",_4)},function(e){e.component("brush-range",H4),e.component("brush-area-dir",G4)},function(e){e.component("range",J4)},function(e){e.component("brush-lasso",r6)},function(e){e.component("labels",m8)},function(e){e.component("legend-cat",_8)},function(e){e.component("legend-seq",O8)},function(e){e.component("line",j8)},function(e){e.component("brush-area",B8)},function(e){e.component("tooltip",r7)},function(e){e.component("debug-collider",i7)},function(e){e.component("debug-path-to-points",g7)}];let b7=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map(e=>e.toJSON())}}};class v7{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.minWidth,u=void 0===c?0:c,d=e.minHeight,f=void 0===d?0:d;this.set({x:n,y:i,width:a,height:l,minWidth:u,minHeight:f})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.minWidth,u=void 0===c?0:c,d=e.minHeight,f=void 0===d?0:d;this.type="rect",a>=0?(this.x=n,this.width=Math.max(a,u)):(this.x=n+Math.min(a,-u),this.width=-Math.min(a,-u)),l>=0?(this.y=i,this.height=Math.max(l,f)):(this.y=i+Math.min(l,-f),this.height=-Math.min(l,-f))}containsPoint(e){return b5(this,e)}intersectsLine(e){return v5(this,lX(e))}intersectsRect(e){return g5(this,sX(e))}intersectsCircle(e){return u5(e,this)}intersectsPolygon(e){return m5(e,this)}intersectsGeoPolygon(e){return R5(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class x7{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.minRadius,l=void 0===s?0:s;this.set({cx:n,cy:i,r:a,minRadius:l})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.minRadius,l=void 0===s?0:s;this.type="circle",this.cx=n,this.cy=i,this.r=Math.max(a,l),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return c5(this,e)}intersectsLine(e){return d5(this,lX(e))}intersectsRect(e){return u5(this,sX(e))}intersectsCircle(e){return n=e,!o5(t=this)&&!o5(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return f5(this,e)}intersectsGeoPolygon(e){return C5(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class w7{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.tolerance,u=void 0===c?0:c;this.set({x1:n,y1:i,x2:a,y2:l,tolerance:u})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.tolerance,u=void 0===c?0:c;this.type="line",this.x1=n,this.y1=i,this.x2=a,this.y2=l,this.tolerance=Math.max(0,Math.round(u)),this.vectors=this.points(),this.zeroSize=n===a&&i===l}containsPoint(e){if(this.tolerance>0){return d5({cx:e.x,cy:e.y,r:this.tolerance},this)}return w5(this,e)}intersectsLine(e){return x5(this,lX(e))}intersectsRect(e){return v5(sX(e),this)}intersectsCircle(e){return d5(e,this)}intersectsPolygon(e){return h5(e,this)}intersectsGeoPolygon(e){return M5(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class S7{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;this.set({vertices:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;if(this.type="polygon",this.vertices=t.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return p5(this,e)}intersectsCircle(e){return f5(e,this)}intersectsLine(e){return h5(this,lX(e))}intersectsRect(e){return m5(this,sX(e))}intersectsPolygon(e){return S5(this,e)}intersectsGeoPolygon(e){return k5(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function k7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new S7(...t)}function C7(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function E7(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class M7{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[[]]:e;this.set({vertices:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;this.type="geopolygon",this.vertices=t.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)E7(this.vertices[e]),this.vertices[e].length>2&&C7(this.vertices[e]),this.polygons[e]=k7({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return E5(this,e)}intersectsCircle(e){return C5(e,this)}intersectsLine(e){return M5(this,lX(e))}intersectsRect(e){return R5(this,sX(e))}intersectsPolygon(e){return k5(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!g5(n,r)&&(y5(r,n)?l5(t,e):l5(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function R7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new M7(...t)}function _7(e,t){return e.x!==t.x||e.y!==t.y}class A7{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).points,t=void 0===e?[]:e;this.set({points:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).points,t=void 0===e?[]:e;if(this.type="polyline",this.segments=[],this._points=t.slice(),this._points.length>1)for(let e=0,t=this._points.length-1;e<t;e++)_7(this._points[e],this._points[e+1])&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y})}containsPoint(e){return this.segments.some(t=>w5(t,e))}intersectsCircle(e){return this.segments.some(t=>d5(e,t))}intersectsLine(e){const t=lX(e);return this.segments.some(e=>x5(e,t))}intersectsRect(e){const t=sX(e);return this.segments.some(e=>v5(t,e))}intersectsPolygon(e){return this.segments.some(t=>h5(e,t))}intersectsGeoPolygon(e){return this.segments.some(t=>M5(e,t))}points(){return this._points}}const P7=mJ();function I7(e,t){return P7.get(e)(t)}P7.add("rect",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new v7(...t)}),P7.add("circle",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new x7(...t)}),P7.add("line",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new w7(...t)}),P7.add("polygon",k7),P7.add("geopolygon",R7),P7.add("polyline",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new A7(...t)});class T7{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach(e=>{const t=I7(e.type,e);t&&this.geometries.push(t)})}containsPoint(e){return this.geometries.some(t=>t.containsPoint(e))}intersectsLine(e){return this.geometries.some(t=>t.intersectsLine(e))}intersectsRect(e){return this.geometries.some(t=>t.intersectsRect(e))}intersectsCircle(e){return this.geometries.some(t=>t.intersectsCircle(e))}intersectsPolygon(e){return this.geometries.some(t=>t.intersectsPolygon(e))}intersectsGeoPolygon(e){return this.geometries.some(t=>t.intersectsGeoPolygon(e))}}class D7{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new D7).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof D7&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map(e=>e.join("\t")).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const O7=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function N7(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function q7(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function L7(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function j7(e,t){t.args.length>=6&&e.transform(...t.args)}function z7(e,t){const n=function(e){let t,n=[];for(;null!==(t=O7.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter(e=>e.trim().length>0).map(e=>Number(e))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?N7(t,r):"scale"===r.cmd?q7(t,r):"matrix"===r.cmd?j7(t,r):"translate"===r.cmd&&L7(t,r)}const F7={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},$7={type:(e,t)=>t.filter(t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()}),attr:(e,t,n,r)=>r.filter(r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}}),universal:e=>e,tag:(e,t)=>t.filter(t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))})};function B7(e,t){if(!t||!t.length||!e||"function"!=typeof $7[e.type])return[];switch(e.type){case"type":case"tag":return $7[e.type](e.value,t);case"attr":return $7[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return $7[e.type](t);default:return[]}}var H7={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach(e=>{e=e.trim(),n=[];const a=t=>{i=e.match(F7[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(F7).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););}),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach(e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=B7(e,n),s=!0}),s&&t.push(n);const l=t[0].filter(e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0});r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function V7(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every(e=>Array.isArray(e))?i.map(e=>n.transformPoints(e)):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=sX(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=lX(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:I2(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=I2(i[t],!0);o={type:"path",d:e}}return o}class W7{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const n=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n.x,y:n.y,width:n.width,height:n.height}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map(e=>V7(e,t,n))}:V7(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map(e=>new W7(e)),this._parent=()=>e.parent?new W7(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const t=e.getBoundingClientRect(),n=t.left,r=void 0===n?0:n,a=t.top;i-=r,o-=void 0===a?0:a}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function U7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new W7(...t)}class G7{constructor(e){this._node=U7(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function Y7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new G7(...t)}function K7(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=Y7(n);const e=n.parent;e&&"stage"!==e.type&&K7(e,t.parent)}}function X7(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const i={x:t.cx,y:t.cy};var r=e.inverseModelViewMatrix.transformPoint(i);n.cx=r.x,n.cy=r.y,n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every(e=>Array.isArray(e))?R7(n):k7(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=Y7(i);return K7(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=Y7(e);return K7(e,t),t}return null}(e,t,r)}function J7(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=X7(i,t,r);a&&n.push(a),!i.children||a||i.collider||J7(i.children,t,n,r)}}function Q7(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==X7(r,t,n))return!0;if(r.children&&!r.collider)return Q7(r.children,t,n)}return!1}function Z7(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(cX(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=aX(e).map(e=>L2(e,t)),["intersectsRect",n];case"line":return n=oX(e).map(e=>L2(e,t)),["intersectsLine",n];case"point":return n=L2(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map(e=>L2(e,t)),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map(e=>e.map(e=>L2(e,t))),["intersectsGeoPolygon",n];default:return[]}}function e9(e,t){const n=eX(Z7(t,e.dpi),2),r=n[0],i=n[1],o=[];return r&&(J7([e],r,o,i),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function t9(e,t){const n=eX(Z7(t,e.dpi),2);return Q7([e],n[0],n[1])}class n9 extends b7{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const t=e.data,n=e.desc,r=e.tag,i=e.strokeReference,o=e.fillReference;var a,s;a=this.attrs,s=e,Object.keys(P2).forEach(e=>{const t=s[e];void 0!==t&&(a[P2[e]]=t)}),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=YK(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return H7.find(e,this).map(e=>U7(e))}getItemsFrom(e){return e9(this,e)}containsPoint(e){return t9(this,e)}intersectsLine(e){return t9(this,e)}intersectsRect(e){return t9(this,e)}intersectsCircle(e){return t9(this,e)}intersectsPolygon(e){return t9(this,e)}intersectsGeoPolygon(e){return t9(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new D7;void 0!==this.attrs.transform&&z7(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new D7;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new T7(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=I7("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=I7(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class r9 extends b7{addChild(e){if(!(e&&e instanceof b7))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const i9=r9.prototype;class o9 extends n9{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=e.collider,n=YK({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},r=eX(e.bounds(t),3),i=r[0],o=r[2],a=i.x,s=i.y,l=o.x,c=o.y,u=isNaN(n.width)?l:Math.max(l,n.width+n.x),d=isNaN(n.height)?c:Math.max(c,n.height+n.y);n.x=isNaN(n.x)?a:Math.min(a,n.x),n.y=isNaN(n.y)?s:Math.min(s,n.y),n.width=u-n.x,n.height=d-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=YK({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=i9.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=YK({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=i9.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=YK({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(i9.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=YK(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(i9.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=YK(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function a9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new o9(...t)}class s9 extends o9{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const l9=r9.prototype,c9=["x1","x2","y1","y2","id","offset","style"];class u9 extends n9{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=c9.length;r!==i;r++)n=c9[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return l9.addChild.call(this,e)}addChildren(e){return l9.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return l9.removeChild.call(this,e),this}removeChildren(e){return l9.removeChildren.call(this,e),this}}function d9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new u9(...t)}const f9=r9.prototype,p9=["patternUnits","x","y","width","height","id"];class h9 extends n9{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=p9.length;r!==i;r++)n=p9[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return f9.addChild.call(this,e)}addChildren(e){return f9.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return f9.removeChild.call(this,e),this}removeChildren(e){return f9.removeChildren.call(this,e),this}}class m9 extends n9{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.rx,u=void 0===c?0:c,d=e.ry,f=void 0===d?0:d,p=e.collider,h=YK({type:"rect",x:n,y:i,width:a,height:l},p);super.set(e),a>=0?(this.attrs.x=n,this.attrs.width=a):(this.attrs.x=n+a,this.attrs.width=-a),l>=0?(this.attrs.y=i,this.attrs.height=l):(this.attrs.y=i+l,this.attrs.height=-l),u>0&&(this.attrs.rx=u),f>0&&(this.attrs.ry=f),this.collider=h,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=aX(this.attrs),n=eX(iX(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t),4),r=n[0],i=n[1],o=n[2],a=n[3];return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class g9 extends n9{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.collider,l=YK({type:"circle",cx:n,cy:i,r:a},s);super.set(e),this.attrs.cx=n,this.attrs.cy=i,this.attrs.r=a,this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.attrs,n=t.cx,r=t.cy,i=t.r,o=t.r,a=n-i,s=r-o;let l=2*i,c=2*o,u=[{x:a,y:s},{x:a+l,y:s},{x:a+l,y:s+c},{x:a,y:s+c}];if(e&&this.modelViewMatrix){u=this.modelViewMatrix.transformPoints(u);const t=eX(iX(u),4),n=t[0],r=t[1];l=t[2]-n,c=t[3]-r,this.__bounds[e]=[{x:n,y:r},{x:n+l,y:r},{x:n+l,y:r+c},{x:n,y:r+c}]}else this.__bounds[e]=u;return this.__bounds[e]}}class y9 extends n9{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.collider;super.set(e),this.attrs.x1=n,this.attrs.y1=i,this.attrs.x2=a,this.attrs.y2=l;const u={type:"line",x1:n,y1:i,x2:a,y2:l};this.collider=YK(u,c),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=oX(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const n=eX(iX(t),4),r=n[0],i=n[1],o=n[2],a=n[3],s=r!==o||i!==a;return this.__boundingRect[e]={x:r,y:i,width:s?Math.max(1,o-r):0,height:s?Math.max(1,a-i):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const b9=Math.PI/2;function v9(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function x9(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const w9={step:function(e){return new lJ(e,.5)},stepAfter:function(e){return new lJ(e,1)},stepBefore:function(e){return new lJ(e,0)},linear:FX,basis:function(e){return new GX(e)},cardinal:XX.tension(0),catmullRom:QX,monotonex:function(e){return new rJ(e)},monotoney:function(e){return new iJ(e)},natural:function(e){return new aJ(e)}};function S9(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class k9 extends n9{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=LX();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const t=e.major,n=e.minor,r=e.layerObj,i=e.points,o=e.stngs,a=e.generatorType,s=HX(),l=o.coordinates?o.coordinates.defined:null;s[t.p](e=>e.major*t.size)["".concat(n.p,"1")](e=>e.minor*n.size)["".concat(n.p,"0")](e=>e.minor0*n.size).curve(w9["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined(e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined):s.defined(e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=m7(this.attrs.d),this.segments.length>1&&this.segments.every(e=>S9(e)))return void(this.collider=YK({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach(t=>{if(t.length<=1);else if(S9(t))this.collider=YK({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=v9(s,a),u=v9(s,l),d=(c+u)/2,f=d+Math.PI,p=Math.max(d,f),h=Math.min(d,f),m=c>u;if(1===n){const e=v9(a,s);r.push(x9(a,e-b9,t)),i.unshift(x9(a,e+b9,t))}const g=m?p:h,y=m?h:p;if(r.push(x9(s,g,t)),i.unshift(x9(s,y,t)),n===o-1){const e=v9(l,s);r.push(x9(l,e+b9,t)),i.unshift(x9(l,e-b9,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=YK({type:"polyline",points:t},e.collider)})}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:m7(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=eX(iX(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points),4),n=t[0],r=t[1],i=t[2],o=t[3];return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function C9(e){let t=e.data,n=e._boundingRect,r=e._textBoundsFn;return null!=t&&(n||r)}class E9 extends n9{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.dx,a=void 0===o?0:o,s=e.dy,l=void 0===s?0:s,c=e.textBoundsFn,u=e.text,d=e.title,f=e.collider,p=e.boundingRect,h=e.ellipsed;super.set(e),this.attrs.x=n,this.attrs.y=i,this.attrs.dx=a,this.attrs.dy=l,this.attrs.text=u,void 0!==d&&(this.attrs.title=String(d)),"object"==typeof p?this._textBoundsFn=()=>p:"function"==typeof c&&(this._textBoundsFn=c),"string"==typeof h&&(this.ellipsed=h),this.collider=YK({type:C9(this)?"bounds":null},f),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=aX(e),r=eX(iX(t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n),4),i=r[0],o=r[1],a=r[2],s=r[3];return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}let M9=class extends n9{constructor(){super("image"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.rx,u=void 0===c?0:c,d=e.ry,f=void 0===d?0:d,p=e.src,h=e.collider,m=e.cx,g=void 0===m?0:m,y=e.cy,b=void 0===y?0:y,v=e.r,x=void 0===v?0:v,w=e.opacity,S=e.imageScalingFactor,k=e.imagePosition,C=e.symbol;let E;E="circle"===e.symbol?YK({type:"circle",cx:g,cy:b,r:x},h):YK({type:"bounds",x:n,y:i,width:a,height:l},h),super.set(e),a>=0?(this.attrs.x=n,this.attrs.width=a):(this.attrs.x=n+a,this.attrs.width=-a),l>=0?(this.attrs.y=i,this.attrs.height=l):(this.attrs.y=i+l,this.attrs.height=-l),u>0&&(this.attrs.rx=u),f>0&&(this.attrs.ry=f),p&&(this.attrs.src=p),this.attrs.r=x,this.attrs.cx=g,this.attrs.cy=b,this.attrs.opacity=void 0!==w?w:1,this.attrs.imageScalingFactor=void 0!==S?S:1,this.attrs.imagePosition=k||"center-center",this.attrs.symbol=C||"rectangle",this.collider=E,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},e.collider||(this.attrs.updateCollider=this.updateCollider.bind(this))}updateCollider(e){let t;t="circle"===e.symbol?YK(this.collider,{type:"circle",cx:e.cx,cy:e.cy,r:e.r}):YK(this.collider,{type:"bounds",x:e.x,y:e.y,width:e.width,height:e.height}),this.collider=t}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=aX(this.attrs),n=eX(iX(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t),4),r=n[0],i=n[1],o=n[2],a=n[3];return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];if("circle"===this._node.symbol){const t=this.boundingRect(e),n=Math.min(t.width,t.height)/2,r=t.x-n,i=t.y-n;let o=2*n,a=2*n,s=[{x:r,y:i},{x:r+o,y:i},{x:r+o,y:i+a},{x:r,y:i+a}];if(e&&this.modelViewMatrix){s=this.modelViewMatrix.transformPoints(s);const t=eX(iX(s),4),n=t[0],r=t[1];o=t[2]-n,a=t[3]-r,this.__bounds[e]=[{x:n,y:r},{x:n+o,y:r},{x:n+o,y:r+a},{x:n,y:r+a}]}else this.__bounds[e]=s;return this.__bounds[e]}const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}};const R9=mJ();function _9(e,t){return R9.get(e)(t)}R9.add("rect",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new m9(...t)}),R9.add("circle",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new g9(...t)}),R9.add("text",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new E9(...t)}),R9.add("line",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new y9(...t)}),R9.add("path",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new k9(...t)}),R9.add("stage",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new s9(...t)}),R9.add("container",a9),R9.add("defs",a9),R9.add("linearGradient",d9),R9.add("radialGradient",d9),R9.add("conicGradient",d9),R9.add("stop",d9),R9.add("pattern",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new h9(...t)}),R9.add("image",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new M9(...t)});const A9=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return YK(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function P9(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function I9(e,t,n){e.node=n[t],e.index=t}function T9(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(I9(o,a,e),P9(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=A9.save(o.node);const s=_9(o.node.type,o.node);s&&(o.node.transform&&(n.save(),z7(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&T9(o.node.children,s,n,r),o.node.transform&&n.restore()),A9.restore()}}function D9(e){let t=e.items,n=e.stage,r=e.dpi,i=e.on,o=void 0===i?{}:i;return n||(n=_9("stage",r)),T9(t,n,new D7,o),n}function O9(e,t,n){const r=n.orientation,i=n.degree,o=n.stops,a=void 0===o?[]:o;let s=null;if("radial"===r){const n=t.boundingRect();s=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,i=n.y||0;s=e.createConicGradient(t,r,i)}else{const r=O2(i);["x1","x2","y1","y2"].forEach(e=>{e in n&&(r[e]=n[e])});const o=t.boundingRect();s=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=a.length;e<t;e++){let t=a[e];s.addColorStop(t.offset,t.color)}return s}function N9(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach(e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)}),n.fill(),n.restore(),n.createPattern(t,"repeat")}function q9(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=e.y,r=e.width,i=e.height,o=e.scaleRatio,a=e.margin,s=e.edgeBleed;const l={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return l.x=isNaN(t)?l.x:t,l.y=isNaN(n)?l.y:n,l.width=isNaN(r)?l.width:r,l.height=isNaN(i)?l.height:i,void 0!==o&&(l.scaleRatio.x=isNaN(o.x)?l.scaleRatio.x:o.x,l.scaleRatio.y=isNaN(o.y)?l.scaleRatio.y:o.y),void 0!==a&&(l.margin.left=isNaN(a.left)?0:a.left,l.margin.top=isNaN(a.top)?0:a.top),"object"==typeof s&&["left","right","top","bottom"].forEach(e=>{!isNaN(s[e])&&s[e]>0&&(l.edgeBleed[e]=s[e],l.edgeBleed.bool=!0)}),l.computedPhysical={x:Math.round(l.margin.left+(l.x-l.edgeBleed.left)*l.scaleRatio.x),y:Math.round(l.margin.top+(l.y-l.edgeBleed.top)*l.scaleRatio.y),width:Math.round((l.width+l.edgeBleed.left+l.edgeBleed.right)*l.scaleRatio.x),height:Math.round((l.height+l.edgeBleed.top+l.edgeBleed.bottom)*l.scaleRatio.y)},l}function L9(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:s8,textBounds:c8,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function j9(e){return t=>{let n=t.node;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const z9=200,F9=200;class $9{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,n=e.rect,r=e.dpiRatio,i=e.canvasBufferSize;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*z9,height:n.computedPhysical.height+2*F9},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const B9=mJ();function H9(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function V9(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function W9(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function U9(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function G9(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=O9(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=O9(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),U9(t,o,n,a),o.modelViewMatrix&&W9(o.modelViewMatrix.elements,t),B9.has(o.type)&&B9.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&G9(o.children,t,n,r),t.restore()}}function Y9(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D9;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=q9();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",H9]];let l;const c=L9();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach(t=>{void 0!==e[t]&&(r[t]=e[t])}),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new $9(e)),n.appendChild(e),e),c.getScene=r=>{const i=V9(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[J6(c.measureText),j9(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||N9(e,t,n),r[i]):N9(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=V9(u),f=t&&r.transform();if(f)return e.width=e.width,function(e){let t=e.el,n=e.dpiRatio,r=e.transform;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:f}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const p=c.getScene(n),h=!i||!p.equals(i);l.clear();const m=o||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),G9(p.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&p.children.unshift(...i.children),i=p,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=q9(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function K9(e,t){B9.add(e,t)}function X9(e,t){return Math.max(0,Math.min(e,t))}const J9=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Q9=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Z9=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function eee(e){return J9.test(e)}function tee(e){return Q9.test(e)||Z9.test(e)}function nee(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],eee(n))return"ltr";if(tee(n))return"rtl"}return"ltr"}const ree={start:"end",end:"start",center:"center",middle:"middle"};function iee(e,t){return"rtl"===t?ree[e]:e}function oee(e,t){if(oee.cache[e])return void t(oee.cache[e]);const n=new Image;n.src=e,n.onload=()=>{oee.cache[e]=n,t(n)},n.onerror=e=>{console.error("Image load error",e)}}function aee(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=aee([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=aee(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function see(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function lee(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function cee(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(see(i.diff.added,i.object,t),lee(i.diff.removed,r),cee(i.diff.items,t,n,r)))}function uee(e,t,n,r,i,o){const a=aee(e,t);return see(a.added,n,r),lee(a.removed,o),cee(a.items,r,i,o),a.items}oee.cache={},K9("rect",function(e,t){let n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=X9(r/2,o>0?o:a),a=X9(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()}),K9("circle",function(e,t){let n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()}),K9("line",function(e,t){let n=t.g,r=t.doStroke;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()}),K9("path",function(e,t){let n=t.g,r=t.doStroke,i=t.doFill;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)}),K9("text",function(e,t){let n=t.g,r=t.ellipsed,i=t.doStroke;const o=r||Q6(e,s8);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter(e=>!!e).join(" ");const a=nee(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=iee("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=Z6(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)}),K9("image",function(e,t){let n=t.g;const r=n.canvas,i=n.getTransform(),o=window.devicePixelRatio||1,a=r.clientWidth*o,s=r.clientHeight*o;r.width===a&&r.height===s||(r.width=a,r.height=s),oee(e.src,t=>{if(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.width,r.height),n.setTransform(i),n.globalAlpha=e.opacity,e.width||e.height||(e.width=t.naturalWidth*e.imageScalingFactor,e.height=t.naturalHeight*e.imageScalingFactor),function(e){const t=e.imagePosition||"center-center";let n=e.width,r=e.height;if("circle"===e.symbol){const t=Math.min(e.width,e.height)/2;n=2*t,r=2*t}switch(t){case"top-center":e.y-=r/2;break;case"center-left":e.x-=n/2;break;case"center-right":e.x+=n/2;break;case"top-left":e.x-=n/2,e.y-=r/2;break;case"top-right":e.x+=n/2,e.y-=r/2;break;case"bottom-left":e.x-=n/2,e.y+=r/2;break;case"bottom-right":e.x+=n/2,e.y+=r/2;break;case"bottom-center":e.y+=r/2}}(e),"circle"===e.symbol){const r=e.x,i=e.y;e.r=Math.min(e.width,e.height)/2;const o=r-e.width/2,a=i-e.height/2;n.save(),n.beginPath(),n.arc(r,i,e.r,0,2*Math.PI),n.clip(),n.drawImage(t,o,a,e.width,e.height),n.restore()}else e.x-=e.width/2,e.y-=e.height/2,n.drawImage(t,e.x,e.y,e.width,e.height);n.globalAlpha=1,e.updateCollider&&e.updateCollider(e)})});const dee="http://www.w3.org/2000/svg",fee=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(dee,"container"===e?"g":e);return t.appendChild(n),n},pee=e=>{e.parentNode&&e.parentNode.removeChild(e)};function hee(e){let t=e.element,n=e.attrs;return function(){const e=n.width,r=n.height,i=n.imagePosition,o=n.imageScalingFactor,a=n.symbol;let s=n.x,l=void 0===s?0:s,c=n.y,u=void 0===c?0:c,d=e>0?e:this.naturalWidth,f=r>0?r:this.naturalHeight;switch(o&&(d*=o,f*=o),i){case"top-center":u-=f/2;break;case"center-left":l-=d/2;break;case"center-right":l+=d/2;break;case"top-left":l-=d/2,u-=f/2;break;case"top-right":l+=d/2,u-=f/2;break;case"bottom-left":l-=d/2,u+=f/2;break;case"bottom-right":l+=d/2,u+=f/2;break;case"bottom-center":u+=f/2}if(t.setAttribute("width",d),t.setAttribute("height",f),t.setAttribute("x",l-d/2),t.setAttribute("y",u-f/2),t.setAttribute("preserveAspectRatio","none"),"circle"===a){const e=t.ownerSVGElement;if(!e)return;const n="clip-".concat(Math.random().toString(36).substr(2,9));if(!e.querySelector("#".concat(n))){const t=e.querySelector("defs")||e.insertBefore(document.createElementNS(dee,"defs"),e.firstChild),r=document.createElementNS(dee,"clipPath");r.setAttribute("id",n);const i=document.createElementNS(dee,"circle");i.setAttribute("cx",l),i.setAttribute("cy",u),i.setAttribute("r",Math.min(d,f)/2),r.appendChild(i),t.appendChild(r)}t.setAttribute("clip-path","url(#".concat(n,")"))}}}const mee=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":case"image":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||Q6(t.attrs,s8);const n=nee(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",iee(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(dee,"title");n.textContent=t.attrs.title,e.appendChild(n)}else if("image"===t.type&&"src"===n){e.setAttributeNS("http://www.w3.org/1999/xlink","href",t.attrs.src);let n=new Image;n.src=t.attrs.src,n.onload=hee({element:e,attrs:t.attrs})}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?Z6(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class gee{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function yee(){return new gee(uee,fee,mee,pee)}function bee(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function vee(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dee,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D9;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:yee)();let r,i,o,a=!1,s=q9();const l={transform:void 0,disableScreenReader:!1},c=L9(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bee,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach(a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach(e=>{t.children.push(e)}),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")})},clear(){n={}}};return i}(u.children),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bee,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let t=i[o],r=t.orientation,a=t.degree,c=t.stops,u=void 0===c?[]:c,d={};void 0===a&&(a=90),"radial"===r?d.type="radialGradient":(d=O2(a),["x1","x2","y1","y2"].forEach(e=>{e in i[o]&&(d[e]=i[o][e])}),d.type="linearGradient"),d.id=l,d.children=u.map(e=>{let t=e.offset,n=e.color,r=e.opacity;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}}),e.push(d),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach(t=>{void 0!==e[t]&&(l[t]=e[t])}),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},f.onCreate,d.onCreate,J6(c.measureText),j9(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const e=t.horizontalScaling,n=t.horizontalSkewing,r=t.verticalSkewing,o=t.verticalScaling,a=t.horizontalMoving,s=t.verticalMoving;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),f.clear(),d.clear(),u.children.length=0;const p=c.getScene(e),h=!o||!p.equals(o),m=a||h;return m&&(c.clear(),n.render(p.children,i)),a=!1,o=p,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=q9(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var xee,wee,See,kee,Cee,Eee,Mee,Ree={},_ee=[],Aee=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Pee(e,t){for(var n in t)e[n]=t[n];return e}function Iee(e){var t=e.parentNode;t&&t.removeChild(e)}function Tee(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?xee.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Dee(e,a,r,i,null)}function Dee(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++See:i};return null==i&&null!=wee.vnode&&wee.vnode(o),o}function Oee(e){return e.children}function Nee(e,t){this.props=e,this.context=t}function qee(e,t){if(null==t)return e.__?qee(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?qee(e):null}function Lee(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Lee(e)}}function jee(e){(!e.__d&&(e.__d=!0)&&kee.push(e)&&!zee.__r++||Cee!==wee.debounceRendering)&&((Cee=wee.debounceRendering)||Eee)(zee)}function zee(){var e,t,n,r,i,o,a,s;for(kee.sort(Mee);e=kee.shift();)e.__d&&(t=kee.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Pee({},o)).__v=o.__v+1,Yee(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?qee(o):a,o.__h),Kee(r,o),o.__e!=a&&Lee(o)),kee.length>t&&kee.sort(Mee));zee.__r=0}function Fee(e,t,n,r,i,o,a,s,l,c){var u,d,f,p,h,m,g,y=r&&r.__k||_ee,b=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(p=n.__k[u]=null==(p=t[u])||"boolean"==typeof p||"function"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?Dee(null,p,null,null,p):Array.isArray(p)?Dee(Oee,{children:p},null,null,null):p.__b>0?Dee(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=y[u])||f&&p.key==f.key&&p.type===f.type)y[u]=void 0;else for(d=0;d<b;d++){if((f=y[d])&&p.key==f.key&&p.type===f.type){y[d]=void 0;break}f=null}Yee(e,p,f=f||Ree,i,o,a,s,l,c),h=p.__e,(d=p.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||h,p)),null!=h?(null==m&&(m=h),"function"==typeof p.type&&p.__k===f.__k?p.__d=l=$ee(p,l,e):l=Bee(e,p,f,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=qee(f))}for(n.__e=m,u=b;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=Hee(r).nextSibling),Qee(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Jee(g[u],g[++u],g[++u])}function $ee(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?$ee(r,t,n):Bee(n,r,r,i,r.__e,t));return t}function Bee(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function Hee(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Hee(n)))return r;return null}function Vee(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Aee.test(t)?n:n+"px"}function Wee(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Vee(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Vee(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Gee:Uee,o):e.removeEventListener(t,o?Gee:Uee,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Uee(e){return this.l[e.type+!1](wee.event?wee.event(e):e)}function Gee(e){return this.l[e.type+!0](wee.event?wee.event(e):e)}function Yee(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,h,m,g,y,b,v,x,w,S,k,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=wee.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,b):(t.__c=u=new Nee(g,b),u.constructor=C,u.render=Zee),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Pee({},u.__s)),Pee(u.__s,C.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,b),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,b),null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(f,p,h)})}if(u.context=b,u.props=g,u.__P=e,x=wee.__r,w=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=Pee(Pee({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(h=u.getSnapshotBeforeUpdate(f,p)),k=null!=c&&c.type===Oee&&null==c.key?c.props.children:c,Fee(e,Array.isArray(k)?k:[k],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Xee(n.__e,t,n,r,i,o,a,l);(c=wee.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),wee.__e(e,t,n)}}function Kee(e,t){wee.__c&&wee.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){wee.__e(e,t.__v)}})}function Xee(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,f=t.props,p=t.type,h=0;if("svg"===p&&(i=!0),null!=o)for(;h<o.length;h++)if((l=o[h])&&"setAttribute"in l==!!p&&(p?l.localName===p:3===l.nodeType)){e=l,o[h]=null;break}if(null==e){if(null===p)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),o=null,s=!1}if(null===p)d===f||s&&e.data===f||(e.data=f);else{if(o=o&&xee.call(e.childNodes),c=(d=n.props||Ree).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||Wee(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||Wee(e,o,t[o],n[o],r)}(e,f,d,i,s),u)t.__k=[];else if(h=t.props.children,Fee(e,Array.isArray(h)?h:[h],t,n,r,i&&"foreignObject"!==p,o,a,o?o[0]:n.__k&&qee(n,0),s),null!=o)for(h=o.length;h--;)null!=o[h]&&Iee(o[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==e.value||"progress"===p&&!h||"option"===p&&h!==d.value)&&Wee(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&Wee(e,"checked",h,d.checked,!1))}return e}function Jee(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){wee.__e(e,n)}}function Qee(e,t,n){var r,i;if(wee.unmount&&wee.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Jee(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){wee.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Qee(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Iee(e.__e),e.__=e.__e=e.__d=void 0}function Zee(e,t,n){return this.constructor(e,n)}function ete(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,t=void 0===e?document.createElement.bind(document):e;let n,r,i=q9();const o={transform:void 0,disableScreenReader:!1},a=L9();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach(t=>{void 0!==e[t]&&(o[t]=e[t])}),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const e=t.horizontalScaling,r=t.horizontalSkewing,i=t.verticalSkewing,o=t.verticalScaling,a=t.horizontalMoving,s=t.verticalMoving;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return o.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?Tee("div",null,e):e,r=function(e,t,n){var r,i,o;wee.__&&wee.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Yee(t,e=(!r&&n||t).__k=Tee(Oee,null,[e]),i||Ree,Ree,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?xee.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Kee(o,e)}(a,n,r),!0},a.renderArgs=[Tee],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=q9(e)),i),a}xee=_ee.slice,wee={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},See=0,Nee.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Pee({},this.state),"function"==typeof e&&(e=e(Pee({},n),this.props)),e&&Pee(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),jee(this))},Nee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),jee(this))},Nee.prototype.render=Oee,kee=[],Eee="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Mee=function(e,t){return e.__v.__b-t.__v.__b},zee.__r=0;var tte=[function(e){e.renderer("svg",vee)},function(e){e.renderer("canvas",Y9)},function(e){e.renderer("dom",ete)}];const nte={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const rte=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.level,n=void 0===t?nte.OFF:t,r=e.pipe,i=void 0===r?console:r,o=n;const a={[nte.OFF]:()=>{},[nte.ERROR]:function(){return i.error(...arguments)},[nte.WARN]:function(){return i.warn(...arguments)},[nte.INFO]:function(){return i.info(...arguments)},[nte.DEBUG]:function(){return i.log(...arguments)}},s=function(e){if(e&&!(o<e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(a[e]||a[nte.DEBUG])(...n)}};return{log:s,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(nte.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(nte.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(nte.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(nte.DEBUG,...t)},level:e=>("number"==typeof e&&(o=e),o),LOG_LEVEL:nte}}(t.logger),i={component:mJ(n.component,"component",r),data:mJ(n.data,"data",r),formatter:mJ(n.formatter,"formatter",r),interaction:mJ(n.interaction,"interaction",r),renderer:n3(n.renderer),scale:mJ(n.scale,"scale",r),symbol:mJ(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:YK({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>t3(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach(e=>{o[e]=i[e]}),o.version=KK,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:r3,data:l3,formatter:zZ,interaction:c3,renderer:n3(),scale:F1,symbol:U2});y7.forEach(rte.use),tte.forEach(rte.use),[].forEach(rte.use);const ite=e=>({key:"bars",type:"box",data:{extract:{field:GG,props:{start:0,end:{field:YG}}}},settings:{major:{scale:KG},minor:{scale:XG},box:{maxWidthPx:8,fill:{fn:e}}}}),ote=e=>({key:"p",type:"point",data:{extract:{field:GG,props:{y:{field:YG}}}},settings:{x:{scale:KG},y:{scale:XG},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),ate=({qNum:e})=>void 0===e?0:Math.sign(e),ste=(e,t)=>{const{primary:n,nil:r,others:i}=e.getDataColorSpecials(),o=lm(e,t?.negative,n),a=lm(e,t?.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:GG,props:{start:0,end:{field:YG,value:ate}}}},settings:{major:{scale:KG},minor:{scale:XG},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?r:-3===e.datum.value?i:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?o:a}}}}},lte=(e,{type:t,showDots:n,colors:r,colorMin:i,colorMax:o})=>{const a=((e,t,n,r)=>{const{primary:i,nil:o,others:a}=e.getDataColorSpecials(),s=lm(e,t?.main,i),l=lm(e,t?.max,s),c=lm(e,t?.min,s),u=lm(e,t?.first,s),d=lm(e,t?.last,s);return e=>{const t=XG in e.datum?XG:"end";return-2===e.datum.value?o:-3===e.datum.value?a:e.datum[t].value>=r?l:e.datum[t].value<=n?c:e.data.items.at(0)===e.datum?u:e.data.items.at(-1)===e.datum?d:s}})(e,r,i,o);switch(t){case"bars":return[ite(a)];case"dots":return[ote(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:GG,props:{v:{field:YG}}}},settings:{coordinates:{major:{scale:KG},minor:{scale:XG,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(lm(e,r?.main,e.getDataColorSpecials().primary));return n?[t,ote(a)]:[t]}case"posNeg":return[ste(e,r)];default:return[]}},cte=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"}),ute=(e,t,n,r)=>({y:{data:{field:YG},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:GG}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),dte=rte();dte.use(zK),dte.renderer.prio(["canvas"]);const fte={resolve:()=>{},promise:{}},pte=({chart:e,element:t,requestId:n,theme:r,isSnapshot:i,direction:o,miniChartData:a,downloadService:s})=>{const{resolveChartPromise:l,addChartPromiseToQueue:c}=(e=>{const t=an.useRef(e.isDownloadedAsPDForImage?We():fte);return{addChartPromiseToQueue:an.useCallback(()=>{e.waitForPromise(t.current.promise)},[e]),resolveChartPromise:t.current.resolve}})(s),u=an.useCallback(()=>{if(null===t.current||null!==e.current)return;c();n.current=WG(()=>{t.current&&(e.current=(({element:e,theme:t,isSnapshot:n,miniChartData:r,onChartRendered:i,direction:o})=>{const{type:a,qMatrix:s,minY:l,maxY:c}=r;return dte.chart({element:e,data:{type:"q",key:"qHyperCube",data:cte(s)},settings:{scales:ute(a,l,c,o),components:lte(t,r),strategy:n?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{i()}})})({element:t.current,theme:r,isSnapshot:i,miniChartData:a,direction:o,onChartRendered:l}))},{timeout:2e3})},[t,e,c,n,r,i,a,o,l]);return{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:an.useCallback(()=>{null!==n.current&&UG(n.current),n.current=null,l()},[n,l])}},hte=e=>{const t=an.useRef(null),n=an.useRef(!1);return an.useCallback(r=>{const i=r.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(UG(e.current),e.current=null)})(t),n.current?0!==i?null!==e.current&&(t.current=WG(()=>{e.current?.update()},{timeout:2e3})):n.current=!1:n.current=!0},[e])},mte=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:i,downloadService:o,direction:a})=>{const s=an.useRef(null),l=an.useRef(null),c=an.useRef(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:d}=pte({element:s,chart:l,requestId:c,theme:n,isSnapshot:r,direction:a,miniChartData:i,downloadService:o});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:n,renderChartWithRequestIdleCallback:r,chart:i})=>{const o=an.useCallback(e=>{e.isIntersecting?r():n()},[r,n]);an.useEffect(()=>{if(!e.current||!t)return()=>{};const r=e.current;return t.addTask(r,o),()=>{t.removeTask(r),n(),i.current?.destroy(),i.current=null}},[i,e,t,n,o])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:u,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:n,intersectionObserverTaskScheduler:r})=>{an.useEffect(()=>r?()=>{}:(e(),()=>{t(),n.current?.destroy(),n.current=null}),[r,t,e,n])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:u,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:n})=>{const r=hte(t);an.useEffect(()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}},[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},gte=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s})=>{const l=mte({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s});return vt.jsx("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},yte=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}`},bte=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},vte=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const i=zg(my),{url:o,text:a,imageSize:s,resolvedImagePosition:l}=e,c="fitHeight"===s,u=vt.jsx("img",{src:o,alt:a,style:{...t,width:c?"auto":"100%",height:"100%",maxHeight:n,objectFit:bte(s),objectPosition:yte(l),overflow:"hidden"}});return r?vt.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:c?n:"100%",overflow:"hidden",display:"flex",justifyContent:c?q$(i,e):void 0},children:u}):u},xte=(e,t)=>vt.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:vt.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})}),wte=an.forwardRef(xte),Ste=(e,t)=>vt.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:vt.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"})}),kte=an.forwardRef(Ste),Cte=(e,t)=>vt.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:[vt.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"}),vt.jsx("use",{fillRule:"evenodd"})]}),Ete=an.forwardRef(Cte),Mte=(e,t)=>vt.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:vt.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"})}),Rte=an.forwardRef(Mte),_te=(e,t)=>vt.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:vt.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"})}),Ate=an.forwardRef(_te),Pte=(e,t)=>vt.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:vt.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"})}),Ite=an.forwardRef(Pte),Tte=(e,t)=>vt.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:vt.jsx("path",{d:"M2 7.5h12v1H2z"})}),Dte=an.forwardRef(Tte),Ote=(e,t)=>vt.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:vt.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"})}),Nte=an.forwardRef(Ote),qte=(e,t)=>vt.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:vt.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"})}),Lte=an.forwardRef(qte),jte=(e,t)=>vt.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:vt.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"})}),zte=an.forwardRef(jte),Fte=(e,t)=>vt.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:vt.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"})}),$te=an.forwardRef(Fte),Bte=(e,t)=>vt.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:vt.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})}),Hte=(e,t)=>vt.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:vt.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"})}),Vte=(e,t)=>vt.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:vt.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"})}),Wte=(e,t)=>vt.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:vt.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"})}),Ute={m:an.forwardRef(Bte),"ï":zte,R:nG,S:eG,T:an.forwardRef(Hte),U:an.forwardRef(Vte),P:Lte,Q:Ite,"è":an.forwardRef(Wte),"¢":Rte,"©":Ete,"23F4":Ate,2013:$te,"&":Nte,add:wte,"minus-2":Dte,dot:kte},Gte=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&Ute[t];return i&&vt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:vt.jsx(i,{style:{height:e}})})},Yte=({representation:e,cellValue:t,paginationCellAlign:n})=>{const r=zg($H),i=zg(my),o=zg(Iy),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=_$(e,t,i,o),d=(e=>parseInt(e||I$,10))(r.measure.values.fontSize),{color:f,iconKey:p,position:h}=u||{};return l?vt.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:n??"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:c?f:void 0},children:["left"===h&&Gte({size:d,iconKey:p,color:f}),vt.jsx(qU,{isNumeric:!0,children:a}),"right"===h&&Gte({size:d,iconKey:p,color:f})]}):Gte({size:d,iconKey:p,color:f})},Kte=(e,t,n)=>e.contentStaticLineCount?t*(n??e.grid.contentLineClamp):t,Xte=({forwardRef:e,cell:t,style:n,virtualizedCell:r,lineClamp:i,intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const l=zg($H),c=zg(VH),u=zg(Hg),d=zg(Yg),f=zg(Iy),p=zg(my),h=zg(sy),m=zg(iy);if(t.representation.type===Pz.Image&&!t.representation.url?.trim())return null;if(t.representation.type===Pz.Image)return vt.jsx(vte,{representation:t.representation,textStyle:n,maxImageHeight:Kte(l,c,i),wrapInContainer:!r});let g=t.representation.text;t.representation.type!==Pz.Link||m||t.isNull||(g=vt.jsx(VG,{href:t.representation.url,text:t.representation.text,interactions:h,color:n.cellForegroundColor}));const y=(e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN)(t.qIsNull?t.representation.text:t.qNum);return t.representation.type!==Pz.Indicator||Number.isNaN(y)?t.representation.type===Pz.MiniChart&&t.representation.miniChart&&!t.isNull?vt.jsx(gte,{height:Kte(l,c,i),intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:f,isSnapshot:!!d.snapshotData,direction:p,downloadService:u}):vt.jsx(qU,{forwardRef:e,isDual:t.isDual,isNumeric:t.isNumeric,lineClamp:i,isPagination:!r,children:g}):vt.jsx(Yte,{representation:t.representation,cellValue:y,paginationCellAlign:r?void 0:s})},Jte=()=>vt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"0.75em",height:"0.75em",children:vt.jsx("path",{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"})}),Qte=ic("div")({"& path":{stroke:"none !important"}}),Zte=({children:e,cellSelectionState:t,hideTickIcon:n})=>t!==p$.Selected||n?e:vt.jsxs(OU,{children:[e,vt.jsx(Qte,{children:vt.jsx(Jte,{})})]}),ene=e=>{const t=function(){const e=xq(),t=nq(()=>null==e?void 0:e.dragOperation.source,[e]),n=nq(()=>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},tne=(e,t,n,r)=>({handleMouseDown:r=>{e?.(r);const i=r.target;if(t.isSelectable&&"A"!==i.tagName){const e=()=>{n({type:h$.SelectMultiEnd})};n({type:h$.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:h$.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:h$.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),nne=e=>{const t=zg(IH),n=zg(EH),r=zg(MG),i=zg(_y),o=zg(my),a=Fg(SG),s=Fg(oU),l=zg(wy),c=zg(uy),u=zg(oy),d=d=>{TG({evt:d,rootElement:i,selectionsAPI:u,cell:e,selectionDispatch:s,isSelectionsEnabled:c,setFocusedCellCoord:a,announce:r,keyboard:l,paginationNeeded:t,totalsPosition:n,direction:o})},f=e=>{((e,t)=>{e.key===Lm.Shift&&t({type:h$.SelectMultiEnd})})(e,s)},p=()=>{((e,t,n,r,i)=>{const{pageRowIdx:o,pageColIdx:a}=e,s=i.atTop?o+2:o+1;SU([s,a],t,n,r)})(e,i,a,l,n)};if(!c)return{onKeyDown:d,onKeyUp:f,onMouseDown:p};const{handleMouseDown:h,handleMouseOver:m,handleMouseUp:g}=tne(p,e,s,r);return{onKeyDown:d,onKeyUp:f,onMouseDown:h,onMouseUp:g,onMouseOver:m}},rne=e=>{an.useEffect(()=>()=>{aU.remove(e)},[e])},ine=(e,t,n,r)=>{if(!n.isNull)return e;const i=r?t.dimensionNull:t.measureNull,o={...e,...i};if(!t.grid.zebraStripes.show)return o;const a=r?t.grid.zebraStripes.overrideDimNullValueColor:t.grid.zebraStripes.overrideMeasNullValueColor,s=r?t.grid.zebraStripes.overrideDimNullValueBackground:t.grid.zebraStripes.overrideMeasNullValueBackground;return a&&(o.color=e.color),s&&(o.background=e.background),o},one=(e,t,n)=>{const{color:r,background:i}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...i?{background:i}:void 0}},ane=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return one(t,e,r?"even":"odd")}return e},sne=(e,t)=>{const n=zg($H),r=zg(aU(e)),i=zg(Ug),o=e.isTotalRow&&i("TLV-2303-SUB-TOTALS");rne(e);let a=t.isDim?n.dimension.values:n.measure.values;a=ane(a,n,e),a=o?n.subTotalRow:a,a=ine(a,n,e,t.isDim);const s=e.isNull||o&&t.isDim?a:cB(a,e.qAttrExps,t.qAttrExprInfoIDs),l=o?s:function(e,t,n){return t===p$.Selected?{...e,...n}:t===p$.Disabled?{...e,background:`${A$}, ${e.background}`}:e}(s,r,n.selectedColors);return{cellStyle:{...l,borderColor:n.grid.border},representationStyle:s,cellSelectionState:r}},lne=ic(Sh,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})(({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}})),cne=ic(Hh,{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}}})),une=ic(Rh,{shouldForwardProp:e=>"cellStyle"!==e})(({cellStyle:e,theme:t})=>({...O$,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",boxSizing:"border-box",width:"100%",height:"100%"})),dne=ic(Rh,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})(({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...O$,...e,fontWeight:T$,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})),fne=({cell:e,column:t,columnIndex:n,intersectionObserverTaskScheduler:r,resizeObserverTaskScheduler:i})=>{const o=zg(my),a=zg(sy),{onKeyDown:s,onKeyUp:l,onMouseDown:c,onMouseUp:u,onMouseOver:d}=nne(e),{cellStyle:f,representationStyle:p,cellSelectionState:h}=sne(e,t),m=ene(t.id);return vt.jsx(une,{cellStyle:{...f,opacity:m},scope:0===n?"row":void 0,component:0===n?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${h} ${qm}`,title:a.passive?e.representation.text:void 0,onKeyDown:s,onKeyUp:l,onMouseDown:c,onMouseUp:u,onMouseOver:d,children:vt.jsx(Zte,{cellSelectionState:h,hideTickIcon:!!e.isTotalRow,children:vt.jsx(Xte,{cell:e,style:p,intersectionObserverTaskScheduler:r,resizeObserverTaskScheduler:i,paginationCellAlign:F$(o,e.align)})})})},pne=Rg(0),hne=({column:e,totalsPosition:t,onKeyDown:n,onMouseDown:r})=>{const i=zg($H),o=zg(cy),a=zg(pne),s=ene(e.id);return vt.jsx(dne,{totalsStyle:{...i.totalRow,...cU(i,t,!1),opacity:s},headRowHeight:a,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${qm}`,tabIndex:-1,title:o?e.totalInfo:void 0,onKeyDown:n,onMouseDown:r,children:vt.jsx(qU,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},mne=()=>{const e=zg(EH),t=zg(MH),n=zg(_H),r=zg(_y),i=zg(ly),o=zg(my),a=Fg(SG),s=zg(iy),l=zg(wy);return vt.jsx(Hh,{className:"sn-table-row sn-table-totals-row",children:t.map((t,c)=>{const u=[e.atTop?1:n.length+1,c];return vt.jsx(hne,{column:t,totalsPosition:e,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case Lm.C:_G(n);break;case Lm.Space:n.preventDefault();break;default:AG(e)}else dm(n)})({evt:e,rootElement:r,cellCoord:u,setFocusedCellCoord:a,isSelectionMode:s,isInteractionEnabled:i,direction:o})},onMouseDown:()=>{SU(u,r,a,l)}},t.id)})})};var gne=an.memo(mne);const yne=({updateShouldRefocus:e,tableWrapperRef:t})=>{const n=zg(_H),r=zg(EH),i=zg(MH),o=zg($H),a=zg(WH),s=zg(UH),l=zg(Yg),c=!!oB(l)?.content?.hoverEffect;$G({updateShouldRefocus:e,tableWrapperRef:t});const u=(e=>{const t=an.useCallback(t=>new IntersectionObserver(e=>{e.forEach(e=>{const n=t.get(e.target);n?.(e)})},{root:e.current}),[e]);return jG(t)})(t),d=FG();return vt.jsxs(lne,{lastRowBottomBorder:o.grid.lastRowBottomBorder,children:[r.atTop?vt.jsx(gne,{}):void 0,n.map((e,t)=>{const n=e.at(0)?.isTotalRow??!1;return vt.jsx(cne,{hoverColors:o.grid.hoverColors,hover:c,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:n?s:a,children:i.map((t,n)=>{const{id:r}=t,i=e[n];return vt.jsx(fne,{columnIndex:n,cell:i,column:t,intersectionObserverTaskScheduler:u,resizeObserverTaskScheduler:d},r)})},`row-${t}`)}),r.atBottom?vt.jsx(gne,{}):void 0]})};var bne=an.memo(yne);const vne=(e,t)=>!!e?.skipHeader||!!t.hideHeader,xne=Rg(e=>{const t=e(Yg),n=e(Sy);if(n)return(e,{isDim:r,colIdx:i})=>{const o=r?i:i-t.qHyperCube.qDimensionInfo.length,a=`/qHyperCubeDef/${r?"qDimensions":"qMeasures"}/${o}/qDef/columnWidth`,s=t.qHyperCube[r?"qDimensionInfo":"qMeasureInfo"].at(o)?.columnWidth,l=s?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...s,...e})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(e)};n.applyPatches([l],!0)}}),wne=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:i,label:o}=e,a=zg(xne),s=zg(my),l=zg(ly),c=zg(Ty),[u,d]=$g(JH);if(!l)return null;return vt.jsx(aV,{columnWidth:u.at(i)??0,isLastColumn:t,keyValue:`adjuster-${i}`,updateWidthCallback:e=>{n?.();const t=[...u];t[i]=e,d(t)},confirmWidthCallback:t=>{a?.(t,e)},handleBlur:e=>{(e=>{yU(e);const t=e.closest(".sn-table-cell");vU(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:c,columnLabel:o},direction:s})},Sne=e=>e.target?.getAttribute("class")?.includes(jm),kne=({isInteractionEnabled:e,column:t})=>{const[n,r]=an.useState(!1),i=zg(uU),o=zg(X$);return{open:n,setOpen:r,handleOpenMenu:t=>{!e||Sne(t)||o||r(!0)},toggleSortOrder:n=>{e&&!Sne(n)&&!o&&(e=>null!==e.target.closest(".sn-table-cell"))(n)&&(n.stopPropagation(),i?.(t,"A"===t.sortDirection?"D":"A"))}}};var Cne=class extends EI{constructor(e,t){super(e,t),this.boundingRectangle=AR(null),this.destroy=zR(()=>{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 i=()=>{this.boundingRectangle.value=zI(n)},o=()=>{r||(r=setTimeout(()=>{i(),r=void 0},25))},a=new ResizeObserver(i);return a.observe(n),document.addEventListener("scroll",o,{passive:!0,capture:!0}),()=>{document.removeEventListener("scroll",o,{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:i,current:o}=t,{height:a,width:s}=o.boundingRectangle,l=i.center.x-s/2,c=i.center.y-a/2,u=function(e,t,n){const r=aL({},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 oA(l,c,s,a),n,r);return u}};Cne.configure=HA(Cne);const Ene=({invert:e})=>({dragOperation:t,droppable:n})=>{if(!n.shape)return null;const{shape:r}=t;if(!r)return null;const i=function(e){return e.sortable?.index}(n);if(void 0===i)return null;const o=function(e){return e.source.index}(t);if(void 0===o)return null;if(o===i)return null;const a=o<i!==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/iA.distance(n.shape.center,s),type:ZP.Collision,priority:QP.Normal}:null},Mne=[Cne.configure({element:e=>{const t=e.activatorEvent?.target;return t instanceof HTMLElement?t.closest(".sn-table-head-row"):null}})],Rne=(e,t)=>{const n=zg(my),r=zg(Ug),i=!zg(fy)||!r("TLV-1531_DRAG_AND_DROP_COLUMNS");return vj({id:e.id,disabled:i,index:t,type:"item",accept:"item",group:"column",modifiers:Mne,data:e,plugins:e=>[...e,YO.configure({feedback:"clone"})],collisionDetector:Ene({invert:"rtl"===n})})},_ne=({column:e,columnIndex:t,columnsLength:n})=>{const r=zg($H),i=zg(_y),o=zg(my),a=zg(sy),s=zg(MH),l=zg(EH),c=zg(JH)[t],u=Fg(SG),d=zg(kG(t)),f=zg(fy),p=zg(wy),{open:h,setOpen:m,handleOpenMenu:g,toggleSortOrder:y}=kne({isInteractionEnabled:f,column:e}),b=Fg(X$),{ref:v,isDragging:x}=Rne(e,t),w=ene(e.id),S=zg(ny),k=S?LU:lG,C=e.isActivelySorted?m$[e.sortDirection]:void 0,E=h?Nm:void 0,M=h?"true":void 0,R=t===n-1,_=[0,e.pageColIdx],A={width:c,zIndex:s.length-t},P=d&&0===t&&!p.enabled&&f?0:-1;return vt.jsxs(MU,{"data-dragging":x,ref:v,headerStyle:{...r.header,...cU(r,l,!0),opacity:w},background:S&&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:A,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${qm}`,tabIndex:P,title:a.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:n,handleOpenMenu:r}=e;if(t)switch(n.key){case Lm.C:_G(n);break;case Lm.Enter:case Lm.Space:r?.(n);break;default:AG(e)}else dm(n)})({evt:e,rootElement:i,cellCoord:_,setFocusedCellCoord:u,isInteractionEnabled:f,handleOpenMenu:g,direction:o})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:i,isInteractionEnabled:o})=>{e.preventDefault(),o&&SU(n,t,r,i)})({evt:e,rootElement:i,cellCoord:_,setFocusedCellCoord:u,keyboard:p,isInteractionEnabled:f})},onClick:S?g:y,"aria-sort":C,"aria-controls":E,"aria-expanded":M,"aria-haspopup":"true",children:[vt.jsx(k,{column:e,isInteractionEnabled:f,open:h,setOpen:m,isPagination:!0,columnWidth:c}),vt.jsx(wne,{column:e,isLastColumn:R,setIsAdjustingWidth:b})]},e.id)},Ane=()=>{const e=zg(MH),t=zg($H),n=zg(Yg),r=zg(yy),i=Fg(pne),o=zg(JH),a=an.useRef(null),s=vne(r,n);return an.useEffect(()=>{a.current&&i(a.current.getBoundingClientRect().height)},[t.header.fontSize,o,i,s]),vt.jsx(Lh,{style:{visibility:s?"collapse":void 0},children:vt.jsx(PU,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map((t,n)=>vt.jsx(_ne,{column:t,columnIndex:n,columnsLength:e.length},t.id))})})};var Pne=an.memo(Ane);const Ine=()=>{const e=zg(MG),[t,n]=$g(gH),{page:r,rowsPerPage:i}=t,o=zg(gy),{totalColumnCount:a,totalRowCount:s,totalPages:l,paginationNeeded:c,rows:u,columns:d}=zg(CH),f=zg($H),p=zg(ZB),h=zg(Yg),m=zg(Iy),g=zg(Ry),y=zg(_y),b=zg(yy),v=zg(my),x=zg(sy),w=zg(Ty),S=zg(sU),k=Fg(oU),C=zg(iy),E=zg(wy),M=an.useRef(!1),R=an.useRef(null),_=an.useRef(null),A=`${w.get("SNTable.Accessibility.RowsAndColumns",[String(u.length),String(d.length)])} ${w.get("SNTable.Accessibility.NavigationInstructions")}`,P=py(h,b),I=P?p.scrollLeft??0:0,T=P?p.rowPartialHeight??0:0,D=an.useCallback(()=>{M.current=y.getElementsByTagName("table")[0].contains(document.activeElement)},[y]),O=an.useCallback(r=>{n({...t,page:r}),e({keys:[["SNTable.Pagination.PageStatusReport",(r+1).toString(),l.toString()]],politeness:"assertive"})},[t,n,l,e]),N=an.useCallback(r=>{n({...t,page:0,rowsPerPage:r}),e({keys:[["SNTable.Pagination.RowsPerPageChange",r.toString()]],politeness:"assertive"})},[e,t,n]);return(e=>{const t=zg(my),n=zg(ZB);an.useEffect(()=>{const r=e.current;if(!r)return;const i=e=>{((e,t,n)=>{if(0===e.deltaX)return;e.stopPropagation();const r=n.scrollWidth-n.offsetWidth,{scrollLeft:i}=n;let o=i+e.deltaX;t&&(o=r+o),r>0&&(o<0||o>r+1)&&e.preventDefault()})(e,"rtl"===t,r)},o=e=>{n.scrollLeft=e.currentTarget?.scrollLeft||0};return r.addEventListener("wheel",i),r.addEventListener("scroll",o),()=>{r.removeEventListener("wheel",i),r.removeEventListener("scroll",o)}},[e,t,n])})(R),wG(_,M),(()=>{const e=zg(_y),t=zg(wy),n=zg(SG);_m(()=>{const r=mU(e,n);t.active?vU(r):(r?.blur(),bU(e))},[t.active,e])})(),RG(M,r),an.useEffect(()=>{const e=R.current;e&&(e.scrollLeft=I,e.scrollTop=T)},[t,s,I,T]),xG(()=>{k({type:h$.UpdatePageRows,payload:{pageRows:u}})},[u]),CG(),DG(R),vt.jsxs(vG,{children:[vt.jsxs(TU,{ref:_,dir:v,onKeyDown:e=>{IG({evt:e,totalRowCount:s,page:r,rowsPerPage:i,handleChangePage:O,updateShouldRefocus:D,keyboard:E,isSelectionMode:C})},"data-testid":"sn-table",children:[vt.jsx(LG,{}),vt.jsxs(NG,{ref:R,className:"sn-table-container",fullHeight:!!o||!x.active||!c,interactions:x,tabIndex:-1,role:"application","data-testid":"table-container",children:[vt.jsxs(qG,{stickyHeader:!0,"aria-label":A,borderRight:S?`1px solid ${f.grid.border}`:void 0,children:[vt.jsx(Pne,{}),vt.jsx(bne,{updateShouldRefocus:D,tableWrapperRef:_})]}),vt.jsx(lU,{})]}),vt.jsx(UW,{footerContainer:o,pageInfo:t,paginationNeeded:c,theme:m,totalRowCount:s,totalColumnCount:a,totalPages:l,keyboard:E,translator:w,interactions:x,rect:g,layout:h,handleChangePage:O,handleChangeRowsPerPage:N,isSelectionMode:C,direction:v})]}),vt.jsx(fG,{isPagination:!0})]})};var Tne=an.memo(Ine);const Dne=Rg(0),One=Rg(e=>{const t=e(Kg);return Math.min(uB,t)}),Nne=Rg(e=>{const t=e(Kg);return t===uB?0:Math.floor(t/uB)}),qne=Rg(e=>{const t=e(Dne),n=e(Nne);return Math.min(t,n)}),Lne=Rg(e=>({page:e(qne),rowsPerPage:e(One),rowsPerPageOptions:[]}),(e,t,n)=>{const r=e(Nne);t(Dne,Math.max(0,Math.min(n,r)))}),jne=Rg(null),zne=Rg(null),Fne=Rg(e=>{const t=e(Lne),n=e(Kg);return Math.min(t.rowsPerPage,n-t.page*t.rowsPerPage)}),$ne=Rg(null),Bne=Rg(null),Hne=Rg(e=>e(EH).atTop?2:1),Vne=Rg(e=>e(EH).atTop?1:e(Hne)+e(Fne)),Wne=Rg(e=>hU(Boolean(e(iy)),e(EH))),Une=Rg(e=>({firstBodyRowIdx:e(Hne),totalsRowIdx:e(Vne),allowedRows:e(Wne)})),Gne=Rg(e=>({rootElement:e(_y),totalsPosition:e(EH),rowCount:e(Fne),colCount:e(RH),columnWidths:e(JH)})),Yne=Rg(e=>({scrollToCell:e($ne),scrollableContainerElement:e(Bne)})),Kne=Rg(e=>({keyboard:e(wy),isInSelectionMode:e(iy),selectionsAPI:e(oy),isSelectionsEnabled:e(uy)})),Xne=Rg(e=>({direction:e(my),isInteractionEnabled:e(fy),paginationNeeded:e(IH),announce:e(MG),shouldRefocusRef:e(jne)})),Jne=10,Qne=e=>e.atTop?2:1,Zne=e=>{e.querySelectorAll(".sn-table-cell[tabindex='0']").forEach(e=>{e.setAttribute("tabIndex","-1")})},ere=e=>{e&&(e.focus(),(e=>{e?.setAttribute("tabIndex","0")})(e))},tre=(e,[t,n],r,i)=>{const o=Qne(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-o;return a>=0&&a<i?e.querySelector(`.sn-table-body .sn-table-cell[rowindex="${a}"][columnindex="${n}"]`):e.querySelector(`.sn-table-totals-row [data-col="${n}"]`)},nre=(e,t,n,r,i,o,a,s,l)=>{if(!e)return l(!1),()=>{};const[c,u]=n,d=c-Qne(r),f=d>=0&&d<i;let p=a,h=!1,m=null;const g=()=>h||s&&!s(),y=()=>{g()||(f&&e(d,u),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})(tre(t,n,r,i),o);if(!e)return p>0?(p-=1,void y()):void l(!1);l(!0)}))};return y(),()=>{h=!0,null!==m&&cancelAnimationFrame(m)}},rre=(e,t,n,r,i,o)=>e<o?[t,e+1]:t<r?[t+1,i]:[t,e],ire=(e,t,n,r,i,o)=>e>i?[t,e-1]:t>n?[t-1,o]:[t,e],ore=(e,[t,n],r,i,o,a={top:0,bottom:0},s)=>{const l=a.top>0,c=a.top,u=r-1-a.bottom,d=i-1;switch(e.key){case Lm.Down:case Lm.Up:t=((e,t,n,r)=>e===Lm.Down&&t<r?t+1:e===Lm.Up&&t>n?t-1:t)(e.key,t,c,u);break;case Lm.Right:l||([t,n]=((e,t,n,r,i,o,a)=>"rtl"===a?ire(e,t,n,0,i,o):rre(e,t,0,r,i,o))(n,t,c,u,0,d,o));break;case Lm.Left:l||([t,n]=((e,t,n,r,i,o,a)=>"rtl"===a?rre(e,t,0,r,i,o):ire(e,t,n,0,i,o))(n,t,c,u,0,d,o));break;case Lm.Home:l?t=Math.max(c,t-Jne):(KW(e)&&(t=c),n=0);break;case Lm.End:l?t=Math.min(u,t+Jne):(KW(e)&&(t=u),n=d);break;case Lm.PageDown:t=Math.min(u,t+Jne);break;case Lm.PageUp:if(l)t=Math.max(c,t-Jne);else{const e=s?Qne(s):1,n=t-e;t=n>0&&n<=Jne?e:Math.max(c,t-Jne)}}return[t,n]},are=[Lm.Home,Lm.End,Lm.PageUp,Lm.PageDown],sre=()=>{const e=an.useRef(!1),t=an.useRef(0),n=an.useRef(0),r=an.useRef(null),i=an.useRef(null),o=an.useRef(null),a=an.useRef(0),s=Fg(SG),l=Fg(oU),c=zg(Ug)("VNA-700-KEYBOARD_NAV_VIRTUALIZED_STRAIGHT_TABLE"),{rootElement:u,totalsPosition:d,rowCount:f,colCount:p,columnWidths:h}=zg(Gne),{firstBodyRowIdx:m,allowedRows:g,totalsRowIdx:y}=zg(Une),{scrollToCell:b,scrollableContainerElement:v}=zg(Yne),{keyboard:x,isInSelectionMode:w,selectionsAPI:S,isSelectionsEnabled:k}=zg(Kne),{direction:C,announce:E,isInteractionEnabled:M,paginationNeeded:R,shouldRefocusRef:_}=zg(Xne),A=an.useMemo(()=>(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]);an.useEffect(()=>()=>{t.current+=1,n.current+=1,a.current+=1,r.current?.(),r.current=null,i.current?.(),i.current=null,o.current?.(),o.current=null},[]);const P=an.useCallback((e,t,n,r)=>{const i=t=>{if(r&&!r())return void n?.(!1);const o=tre(u,e,d,f);if(o)return document.activeElement!==o&&ere(o),document.activeElement===o?void n?.(!0):t>0?void requestAnimationFrame(()=>{i(t-1)}):void n?.(!1);t>0?requestAnimationFrame(()=>{i(t-1)}):n?.(!1)};requestAnimationFrame(()=>{i(t)})},[u,d,f]),I=an.useCallback((e,t)=>{const r=a.current+1;a.current=r;let o=0;const s=Date.now()+5e3,l=()=>{if(a.current!==r)return;if(n.current!==t)return;if(u instanceof HTMLElement&&!u.isConnected)return;if(Date.now()>s||o>=5)return;const c=document.activeElement;c&&c!==document.body&&c!==document.documentElement||(o+=1,_&&(_.current=!0),i.current?.(),i.current=nre(b,u,e,d,f,v,10,()=>a.current===r&&n.current===t,()=>{P(e,300,()=>{_&&(_.current=!1)},()=>a.current===r&&n.current===t)})),requestAnimationFrame(()=>{requestAnimationFrame(l)})};requestAnimationFrame(()=>{requestAnimationFrame(l)})},[P,u,f,b,v,_,d]),T=an.useCallback(()=>(_&&(_.current=!0),t.current+=1,t.current),[_]),D=an.useCallback(()=>{t.current+=1,o.current?.(),o.current=null},[]),O=an.useCallback((e,n)=>{const r=i=>{t.current===e&&(o.current?.(),o.current=nre(b,u,n,d,f,v,10,()=>t.current===e,()=>{if(t.current!==e)return;const o=tre(u,n,d,f);o&&document.activeElement!==o&&ere(o),i>0?requestAnimationFrame(()=>{r(i-1)}):t.current===e&&_&&(_.current=!1)}))};requestAnimationFrame(()=>{requestAnimationFrame(()=>{r(300)})})},[u,d,f,b,_,v]),N=an.useCallback((e,t)=>{if(!ZW(e))return;dm(e),D(),n.current+=1;const i=n.current;a.current+=1,r.current?.(),r.current=null;const o=((e,t)=>Qne(t)+e+(t.atBottom?1:0))(f,d),l=ore(e,t,o,p,C,g,d);Zne(u),s(l);const[,c]=l,[,h]=t;return c!==h&&((e,t,n)=>{if(!e)return;const r=t[n]??0,i=t[n+1]??r,{scrollLeft:o,clientWidth:a}=e;r<o?e.scrollLeft=r:i>o+a&&(e.scrollLeft=i-a)})(v,A,c),_&&(_.current=!0),r.current=nre(b,u,l,d,f,v,10,()=>n.current===i,()=>{P(l,300,t=>{_&&(_.current=!1),t&&(e=>are.includes(e))(e.key)&&I(l,i)},()=>n.current===i)}),l},[u,d,f,p,C,b,s,g,v,_,P,D,A,I]),q=an.useCallback(e=>{e.key===Lm.Esc?x.enabled&&!w&&(dm(e),x.blur?.(!0)):JW(e.key)&&dm(e)},[x,w]),L=an.useCallback((e,t,n)=>{switch(e.key){case Lm.C:dm(e),M&&(e.ctrlKey||e.metaKey)&&Um(e.currentTarget);break;case Lm.Enter:case Lm.Space:if(!M)return void dm(e);n?.(e);break;default:N(e,[0,t])}},[N,M]),j=an.useCallback((t,r,i,o)=>{const a=[r+m,i];switch(t.key){case Lm.Space:if(dm(t),o.isSelectable&&k){e.current=!0;const n=T();l({type:h$.Select,payload:{cell:o,evt:t,announce:E}}),O(n,a)}break;case Lm.Enter:if(dm(t),e.current=!1,w){T(),s(y$),S?.confirm(),v&&(v.scrollTop=0,v.scrollLeft=0);const e=t=>{b?.(0,0),t>0&&requestAnimationFrame(()=>{e(t-1)})};e(10),n.current+=1;const t=n.current;P(y$,300,()=>{_&&(_.current=!1)},()=>n.current===t)}break;case Lm.Esc:if(e.current=!1,w){dm(t);const e=T();S?.cancel(),O(e,a)}break;case Lm.C:dm(t),M&&(t.ctrlKey||t.metaKey)&&Um(t.currentTarget);break;case Lm.Tab:{const e=t.shiftKey||!R;x.enabled&&w&&e&&(dm(t),um(t.currentTarget,x,t.shiftKey));break}default:{const n=t.key===Lm.Left||t.key===Lm.Right,r=w||Boolean(S?.isModal())||e.current;if(n&&r){dm(t);break}const i=N(t,a);!!i&&i[0]!==a[0]&&t.shiftKey&&k&&o.isSelectable&&l({type:h$.SelectMultiAdd,payload:{cell:o,evt:t,announce:E}});break}}},[m,N,k,l,E,w,S,x,R,M,T,O,s,b,v,P,_]),z=an.useCallback(t=>{t.key===Lm.Space&&(e.current=!1),t.key===Lm.Shift&&l({type:h$.SelectMultiEnd})},[l]),F=an.useCallback((e,t)=>{if(w)dm(e);else{if(e.key!==Lm.Space)return e.key===Lm.C?(dm(e),void(M&&(e.ctrlKey||e.metaKey)&&Um(e.currentTarget))):void N(e,[y,t]);e.preventDefault()}},[w,N,y,M]),$=an.useCallback(e=>{D(),n.current+=1;const t=n.current;Zne(u),s(e),x.enabled&&x.focus?.(),P(e,2,n=>{n&&I(e,t)},()=>n.current===t)},[u,s,x,P,D,I]);return{handleWrapperKeyDown:q,handleHeadKeyDown:L,handleBodyKeyDown:j,handleBodyKeyUp:z,handleTotalsKeyDown:F,focusHeadCellOnClick:an.useCallback(e=>{c&&$([0,e])},[$,c]),focusBodyCellOnClick:an.useCallback((e,t)=>{c&&$([e+m,t])},[$,m,c]),focusTotalsCellOnClick:an.useCallback(e=>{c&&$([y,e])},[$,y,c])}};var lre=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function cre(e,t){return e===t||!(!lre(e)||!lre(t))}function ure(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!cre(e[n],t[n]))return!1;return!0}function dre(e,t){var n;void 0===t&&(t=ure);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}var fre="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function pre(e){cancelAnimationFrame(e.id)}function hre(e,t){var n=fre();var r={id:requestAnimationFrame(function i(){fre()-n>=t?e.call(null):r.id=requestAnimationFrame(i)})};return r}var mre=-1;function gre(e){if(void 0===e&&(e=!1),-1===mre||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),mre=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return mre}var yre=null;function bre(e){if(void 0===e&&(e=!1),null===yre||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"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?yre="positive-descending":(t.scrollLeft=1,yre=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),yre}return yre}var vre=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function xre(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,o=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,f=e.getRowStartIndexForOffset,p=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,jc(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:jc(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=dre(function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=dre(function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,f=r._getItemStyleCache(m&&s,m&&l,m&&c),p=e+":"+t;if(f.hasOwnProperty(p))i=f[p];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;f[p]=i={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:o(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=dre(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,c=o;if("rtl"===t)switch(bre()){case"negative":c=-o;break;case"positive-descending":c=l-i-o}c=Math.max(0,Math.min(c,l-i));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&pre(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=hre(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}mc(t,e),t.getDerivedStateFromProps=function(e,t){return wre(e,t),g(e),null};var y=t.prototype;return y.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)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,u=o.columnCount,d=o.height,f=o.rowCount,p=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,y=gre();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==i&&(i=Math.max(0,Math.min(i,f-1)));var b=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>p?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?c(this.props,i,n,g,this._instanceProps,v):g})},y.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()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(bre()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&pre(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,i=e.direction,o=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,f=e.itemKey,p=void 0===f?vre:f,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,w=this._getHorizontalRangeToRender(),S=w[0],k=w[1],C=this._getVerticalRangeToRender(),E=C[0],M=C[1],R=[];if(r>0&&g)for(var _=E;_<=M;_++)for(var A=S;A<=k;A++)R.push(an.createElement(t,{columnIndex:A,data:d,isScrolling:b?x:void 0,key:p({columnIndex:A,data:d,rowIndex:_}),rowIndex:_,style:this._getItemStyle(_,A)}));var P=a(this.props,this._instanceProps),I=s(this.props,this._instanceProps);return an.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:rn({position:"relative",height:o,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},an.createElement(c||u||"div",{children:R,ref:l,style:{height:P,pointerEvents:x?"none":void 0,width:I}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],c=o[3],u=this._getVerticalRangeToRender(),d=u[0],f=u[1],p=u[2],h=u[3];this._callOnItemsRendered(a,s,d,f,l,c,p,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,b,g,x,v)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,o=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,f=n||o||a||1;if(0===t||0===s)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),h=i(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,f),g=u&&"forward"!==c?1:Math.max(1,f);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,h+g)),p,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),h=p(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,h+g)),d,h]},t}(an.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var wre=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Sre=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},kre=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},Cre=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=o(c);i[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},Ere=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?Mre(e,t,n,o,0,r):Rre(e,t,n,Math.max(0,o),r)},Mre=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=Cre(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},Rre=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&Cre(e,t,r,n).offset<i;)r+=a,a*=2;return Mre(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},_re=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=Cre(e,t,n,o),c="column"===e?kre(t,o):Sre(t,o),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return i>=d&&i<=u?i:d>u||i<d?d:u}},Are=xre({getColumnOffset:function(e,t,n){return Cre("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return Ere("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=Cre("column",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=Cre("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:Sre,getEstimatedTotalWidth:kre,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return _re("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return _re("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return Cre("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return Ere("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=Cre("row",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=Cre("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),Pre=function(e,t){return e};function Ire(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,jc(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:jc(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=dre(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=dre(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),f=i(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===l,h="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:p?0:d,height:p?"100%":f,width:p?f:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=dre(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(bre()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-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,i=t.scrollHeight,o=t.scrollTop;r.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-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&&pre(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=hre(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}mc(t,e),t.getDerivedStateFromProps=function(e,t){return Tre(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=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"===i?l.scrollWidth>l.clientWidth?gre():0:l.scrollHeight>l.clientHeight?gre():0}this.scrollTo(o(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 i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(bre()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&pre(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,o=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,f=void 0===d?Pre:d,p=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,y=e.useIsScrolling,b=e.width,v=this.state.isScrolling,x="horizontal"===i||"horizontal"===p,w=x?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),k=S[0],C=S[1],E=[];if(c>0)for(var M=k;M<=C;M++)E.push(an.createElement(t,{data:u,key:f(M,u),index:M,isScrolling:y?v:void 0,style:this._getItemStyle(M)}));var R=r(this.props,this._instanceProps);return an.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:rn({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},g)},an.createElement(s||l||"div",{children:E,ref:a,style:{height:x?"100%":R,pointerEvents:v?"none":void 0,width:x?R:"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],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),f=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+f)),c,u]},t}(an.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Tre=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Dre=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var c=r(l);i[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return i[t]},Ore=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=Dre(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},Nre=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&Dre(e,n,t).offset<r;)n+=o,o*=2;return Ore(e,t,Math.min(n,i-1),Math.floor(n/2),r)},qre=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},Lre=Ire({getItemOffset:function(e,t,n){return Dre(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:qre,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=Dre(e,t,i),f=qre(e,i),p=Math.max(0,Math.min(f-u,d.offset)),h=Math.max(0,d.offset-u+d.size+o);switch("smart"===n&&(n=r>=h-u&&r<=p+u?"auto":"center"),n){case"start":return p;case"end":return h;case"center":return Math.round(h+(p-h)/2);default:return r>=h&&r<=p?r:r<h?h:p}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?Ore(e,t,i,0,n):Nre(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===i||"horizontal"===s?l:o,u=Dre(e,t,r),d=n+c,f=u.offset+u.size,p=t;p<a-1&&f<d;)p++,f+=Dre(e,p,r).size;return p},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 jre(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 zre=["style"],Fre=["style"];function $re(e,t){var n=e.style,r=on(e,zre),i=t.style,o=on(t,Fre);return!jre(n,i)&&!jre(r,o)}const Bre=Rg(0),Hre=Rg(0),Vre=Rg(0),Wre=Rg(e=>e(Bre)+e(Hre)),Ure=Rg(e=>{const t=e(Ry),n=e(IH),r=t.height-(n?41:0);return{width:t.width,height:r}}),Gre=Rg(e=>{const t=e(Ure),n=e(J$),r=e(Q$);return{width:t.width-r,height:t.height-n}}),Yre=Rg(e=>{const t=e(Gre),n=e(Wre),r=e(Vre);return Math.min(t.height-n,r)}),Kre=Rg(-1),Xre=qE(e=>Rg(t=>t(Kre)===e)),Jre=({style:e})=>vt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var Qre=sn.memo(Jre,$re);const Zre=Rg(e=>{const t=e(Gre),n=e(WH),r=e(Wre),i=e(Vre)+r,o=e(Fne)*n+r;return i<2*t.height?i:o}),eie=Rg(e=>e(Zre)<=e(Ure).height),tie=()=>{},nie=e=>{e.preventDefault()};const rie=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{rowsInPage:i,columns:o,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:c,onKeyDown:u,onKeyUp:d,onCellClick:f}=r,p=zg(Xre(t)),h=Fg(Kre),m=zg($H),g=zg(my),y=zg(cy),b=zg(fy),v=zg(sU),x=zg(Ug),w=zg(eie),S=i[t]?.[e],{handleMouseDown:k,handleMouseOver:C,handleMouseUp:E,cellSelectionState:M}=function(e){const t="object"==typeof e,n=zg(uy),r=Fg(oU),i=zg(aU(e));if(rne(e),t&&n){const{handleMouseDown:t,handleMouseOver:n,handleMouseUp:o}=tne(nie,e,r,tie);return{handleMouseDown:t,handleMouseOver:n,handleMouseUp:o,cellSelectionState:i}}return{cellSelectionState:i}}(S),R=((e,t,n,r)=>{const i=an.useRef(null),o=n&&(!n.isNumeric||n.isDual),a=n?.isTotalRow??!1,s=an.useCallback(n=>{const i=n.contentBoxSize.at(0)?.blockSize;i&&o&&r(i,e,t,a)},[a,t,r,e,o]);return GU({ref:i,callback:s}),i})(t,e,S,s),_=o[e]?.isDim?m.dimension.values:m.measure.values,A=ene(o[e].id);if("object"==typeof S){const r=((e,t,n,r,i,o,a)=>{const s=e.isTotalRow&&a("TLV-2303-SUB-TOTALS");let l=ane(i,o,e);l=s?o.subTotalRow:l,l=ine(l,o,e,t.isDim);const c=e.isNull||s&&t.isDim?l:cB(l,e.qAttrExps,t.qAttrExprInfoIDs);return r!==p$.Selected||s?r!==p$.Disabled||s?n?{...c,...o.grid.hoverColors}:c:{...c,color:n?o.grid.hoverColors?.color:c.color,background:`${A$}, ${n?o.grid.hoverColors?.background:c.background}`}:{...c,...o.selectedColors}})(S,o[e],a&&p,M,_,m,x),i={rowindex:t,columnindex:e},s=n=>{b&&f?.(t,e),k?.(n)},P=u?n=>{u(n,t,e,S)}:void 0;return vt.jsx("div",{className:`sn-table-cell ${M} ${qm}`,tabIndex:-1,style:{...n,...r,display:"flex",alignItems:"start",borderColor:m.grid.border,borderTop:"0px",borderBottomWidth:!w&&S.isLastRow?"0px":"1px",borderRightWidth:$$(g,S.isLastColumn,v),borderLeftWidth:B$(g,S.isLastColumn,v),justifyContent:L$(S,g),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:S.align,opacity:A},onMouseDown:s,onMouseUp:E,onMouseOver:C,onMouseEnter:a?()=>{h(t)}:void 0,onMouseLeave:a?()=>{h(-1)}:void 0,onKeyDown:P,onKeyUp:d,title:y?S.representation.text:void 0,...i,children:vt.jsx(Zte,{cellSelectionState:M,hideTickIcon:!!S.isTotalRow,children:vt.jsx(Xte,{forwardRef:m.contentStaticLineCount||1===l?void 0:R,cell:S,style:r,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:c})})})}return vt.jsx(Qre,{style:{...n,..._,borderColor:m.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:A}})};var iie=an.memo(rie,$re);const oie=Rg(async e=>{const t=e(Yg),n=e(Sy),r=e(Lne).page,{qDataPages:i}=t.qHyperCube;if(0!==r||0===i.length){const e=r*Math.min(uB,t.qHyperCube.qSize.qcy);if(n&&"getHyperCubeData"in n)return n.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:e,qWidth:50,qHeight:100}])}return[...i]}),aie=_E(oie),sie=Rg(e=>{const t=e(Fne),n=e(Gre),r=e(WH);return Math.min(t,Math.ceil(n.height/r))}),lie=Rg(e=>{const t=e(JH),n=e(Gre);return t.reduce((e,t)=>e.width<n.width?{width:e.width+t,count:e.count+1}:e,{count:0,width:0}).count}),cie=e=>{const t=an.useRef(e);return t.current=e,t},uie=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,die=e=>-1===e.qElemNumber||!!e.qIsTotalCell,fie=(e,t,n,r,i)=>{const o=e[n];if(!o)return!0;for(let e=t;e<t+r;e++){const t=o[e];if(t?.rowIdx!==i)return!0}return!1},pie=(e,t,n,r)=>{const i=e.slice(n,r);return 0===i.length||i.some(e=>!e[t])},hie=(e,t,n,r,i,o,a,s)=>{e.forEach(e=>{e.qMatrix.forEach((l,c)=>{const u=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:f}=((e,t,n,r,i,o,a,s,l,c)=>{const{qSize:u}=a.qHyperCube,d=r.qTop+n,f=i+n,p=e[f]??[],h=t.some(die);return t.forEach((e,t)=>{const n=t+r.qLeft;if(p.at(n))return;const{colIdx:i,isDim:m,isLocked:g,bodyTextAlign:y,selectionColIdx:b,qAttrExprInfoIndex:v,representation:x,conditionalColoring:w,qMiniChart:S}=o[n],k=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),C=!m&&e.qIsNull,E=m&&fH(e,m),M=C||E?dH(m,e,a,k):e.qText,R=C?x$(M):v$(e),_=v$(e)&&!x$(e.qText??"");p[n]={id:xz(),...e,align:lH(R,y,c),rowIdx:d,colIdx:i,isSelectable:m&&!g&&!h,isTotalRow:h,pageRowIdx:f,pageColIdx:n,selectionColIdx:b,isLastRow:d===u.qcy-1,isLastColumn:n===u.qcx-1,isNumeric:R,isDual:_,isNull:(!C||!R)&&fH(e,m),representation:QB({cell:e,representationProperties:x,attrExprInfoIndex:v,env:s,conditionalColoring:w,miniChartOnMeasure:S,getText:()=>M,direction:c,enabledFeatures:{[Pz.Image]:!0,[Pz.Indicator]:!0,[Pz.MiniChart]:!0}})},l(p[n],d,n)}),{row:p,pageRowIdx:f}})(n,l,c,e.qArea,u,r,i,o,a,s);n[f]=d})})},mie=({gridState:e,setEstimatedCellHeight:t})=>{const n=zg(Yg),r=zg(Iy),i=zg(Sy),o=zg(Wg),a=zg(my),s=zg(Lne),l=zg(aie),c=zg(MH),u=zg(Fne),d=zg(sie),f=zg(lie),p=an.useRef([]),h=an.useCallback((e,r)=>{const i=Array.isArray(r)?r.slice(0,u):(e=>Array(e).fill(void 0))(u);return hie(e,s,i,c,n,o,t,a),p.current=i,i},[u,s,c,n,o,t,a]),[m,g]=an.useState(()=>h(l??[]));_m(()=>{g(h(l??[]))},[l,a,u]);const y=((e,t)=>{const n=an.useRef(new Set),r=an.useRef(new Set),i=an.useRef(new Set),o=cie(e),a=cie(t),s=an.useMemo(()=>({enqueue:e=>{const t=uie(e);i.current.has(t)||(n.current.add(e),i.current.add(t),1===n.current.size&&setTimeout(async()=>{const e=Array.from(n.current.values());if(0!==e.length){n.current.clear(),r.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 o.current(t);r.current.has(e)&&a.current(n)}catch(t){e.forEach(e=>{i.current.delete(uie(e))}),console.error("Failed to fetch pages",t)}finally{r.current.delete(e)}}},75))},clear:()=>{n.current.clear(),r.current.clear(),i.current.clear()}}),[o,a]);return s})(e=>i&&"getHyperCubeData"in i?i.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([]),e=>{g(t=>h(e,t))}),b=an.useCallback((e,t,n,r)=>{for(let i=e;i<e+n;i++)if(pie(p.current,i,t,r)){const e={qLeft:i,qTop:t,qHeight:r,qWidth:1};y.enqueue(e)}},[y]),v=an.useCallback((e,t,n,r)=>{for(let i=t;i<t+r;i++){const t=Math.max(0,i-s.page*s.rowsPerPage);if(fie(p.current,e,t,n,i)){const t={qLeft:e,qTop:i,qHeight:1,qWidth:n};y.enqueue(t)}}},[y,s]);return an.useEffect(()=>{if(void 0===l)return;const{qcx:t,qcy:r}=n.qHyperCube.qSize,i=e.current.overscanRowStartIndex,o=e.current.overscanColumnStartIndex,a=i+s.page*s.rowsPerPage,c=t-o,u=s.rowsPerPage-i,p=Math.min(100,c,t,f+5),h=Math.min(100,u,r,d+25);return v(o,a,p,h),()=>{y.clear()}},[l,n,d,f,s,y,v,e,r]),{rowsInPage:m,loadRows:v,loadColumns:b}},gie=e=>{let t=0;return e.forEach(e=>{e>t&&(t=e)}),t},yie=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,bie=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const i=zg($H),o=zg(JH),{estimateLineCount:a}=Sm(i.dimension.values),s=Z$(i.dimension.values.fontSize),l=e||t||1===n;return an.useCallback((e,t,i)=>{if(l||e.representation.type===Pz.Image||e.isNumeric&&!e.isDual)return;const c=(e=>Math.max(0,e-24-1))(o[i]),u=e.representation.text?a({text:e.representation.text,maxWidth:c,isNumeric:!1}):1,d=Math.min(n,Math.max(1,u));r(d*s,t,i,e.isTotalRow??!1)},[l,o,a,n,s,r])},vie=({isStaticNbrOfLines:e,minRowHeight:t,state:n,staticRowHeight:r=0})=>{const i=zg(ZB);an.useLayoutEffect(()=>{const o=e?r:((e,t)=>{const n=0===t?0:e/t;return Math.ceil(n)})(n.sumHeight,n.rowHeights.size);i.estimatedRowHeight=Math.max(o,t)},[e,t,n,r,i])},xie=({isSnapshot:e,gridRef:t})=>{const n=zg($H),r=zg(Fne),[i,o]=an.useState(()=>({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})),a=zg(VH),s=zg(WH),l=zg(UH),c=!!n.contentStaticLineCount,u=Math.max(8e6/r,s,l)-9,d=u+9,f=Math.max(1,Math.min(n.grid.contentLineClamp,Math.round(u/a))),p=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:n})=>n?t*e+8+1:void 0)({lineClamp:f,lineHeight:a,isStaticNbrOfLines:c});(({gridRef:e,setState:t})=>{const n=zg(Yg),r=zg(Lne),i=zg(JH),o=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,o,a]),_m(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})},[i])})({gridRef:t,setState:o});const h=(({setState:e,maxCellHeight:t,gridRef:n})=>{const r=zg(WH),i=zg(UH);return an.useCallback((o,a,s,l=!1)=>{an.startTransition(()=>{e(e=>{const c=l?i:r,u=Math.max(c,o+9),d=Math.min(t,u),f=e.cellHeightsInGrid.get(a)??e.cellHeightsInGrid.set(a,new Map).get(a);if(!yie(f.get(s),d))return e;const p={...e},h=e.rowHeights.get(a);f.set(s,d);const m=void 0===h||d>=h?d:gie(f);return p.rowHeights.set(a,m),p.sumHeight=e.sumHeight-(h??0)+m,n.current?.resetAfterIndices({columnIndex:s,rowIndex:a,shouldForceUpdate:!1}),p})})},[e,t,r,i,n])})({maxCellHeight:d,setState:o,gridRef:t}),m=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>an.useCallback((i,o,a,s)=>{e||t||1===n||r(i,o,a,s)},[e,t,n,r]))({isSnapshot:e,isStaticNbrOfLines:c,lineClamp:f,setCellHeight:h}),g=bie({isSnapshot:e,isStaticNbrOfLines:c,lineClamp:f,setCellHeight:h}),y=an.useCallback(e=>c?p??s:i.rowHeights.get(e)??s,[c,s,i.rowHeights,p]);return vie({isStaticNbrOfLines:c,minRowHeight:s,state:i,staticRowHeight:p}),{setMeasuredCellHeight:m,setEstimatedCellHeight:g,getRowHeight:y,lineClamp:f}},wie=(e,t)=>{an.useLayoutEffect(()=>()=>{t(0)},[e,t]);const n=an.useCallback(e=>{const n=e.contentBoxSize.at(0)?.blockSize;void 0!==n&&t(n)},[t]);GU({ref:e,callback:n})};let Sie=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const kie=({loadRows:e,loadColumns:t,gridState:n})=>{const r=zg(ZB),i=zg(Yg),o=zg(Lne),a=zg(Fne);return an.useCallback(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:c,overscanRowStopIndex:u,visibleColumnStartIndex:d,visibleColumnStopIndex:f,visibleRowStartIndex:p,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let i,o;return i=r>t?Sie.Down:r<t?Sie.Up:Sie.None,o=n>e?Sie.Right:n<e?Sie.Left:Sie.None,{verticalScrollDirection:i,horizontalScrollDirection:o}})(n.current,s,c);if(n.current.overscanColumnStartIndex=s,n.current.overscanColumnStopIndex=l,n.current.overscanRowStartIndex=c,n.current.overscanRowStopIndex=u,c>a)return;const y=s,b=c+o.page*o.rowsPerPage,v=l-s+1,x=u-c+1;if(r.visibleLeft=d,r.visibleWidth=f-d+1,r.visibleTop=p+o.page*o.rowsPerPage,r.visibleHeight=h-p+1,r.page=o.page,r.rowsPerPage=o.rowsPerPage,m===Sie.Down){const t=x+25;e(y,b,v,c+t>a?a-c:t)}else if(m===Sie.Up){const t=x+25,n=o.page*o.rowsPerPage,r=Math.max(n,b-25);e(y,r,v,t)}if(g===Sie.Right){const e=i.qHyperCube.qSize.qcx-y,n=v+5,r=Math.min(e,n);t(y,b,r,x)}else if(g===Sie.Left){const e=Math.max(0,y-5),n=Math.min(i.qHyperCube.qSize.qcx,v+5);t(e,b,n,x)}},[n,a,o.page,o.rowsPerPage,r,e,i.qHyperCube.qSize.qcx,t])};const Cie=({columnIndex:e,data:t,rowIndex:n})=>{const r=t.rowsInPage[n]?.[e];return r?.id??`${n}-${e}`},Eie=(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)},Mie={overflow:"hidden",willChange:"auto"},Rie=an.forwardRef((e,t)=>{const{handleBodyKeyDown:n,handleBodyKeyUp:r,focusBodyCellOnClick:i}=sre(),o=zg(MH),a=zg(Gre),s=Fg(Vre),l=zg(Yre),c=zg(ZB),u=zg(Yg),d=zg(my),f=zg(JH),p=zg(Fne),h=zg(Bne),m=Fg($ne),g=an.useRef(null),y=an.useRef(null),b=an.useRef(null),v=an.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),x=an.useRef(0),w=!!oB(u)?.content?.hoverEffect,{setMeasuredCellHeight:S,setEstimatedCellHeight:k,getRowHeight:C,lineClamp:E}=xie({isSnapshot:!!u.snapshotData,gridRef:g}),{rowsInPage:M,loadRows:R,loadColumns:_}=mie({gridState:v,setEstimatedCellHeight:k}),A=kie({loadRows:R,loadColumns:_,gridState:v}),P=FG(),I=an.useMemo(()=>({rowsInPage:M,columns:o,isHoverEnabled:w,lineClamp:E,setMeasuredCellHeight:S,resizeObserverTaskScheduler:P,onKeyDown:n,onKeyUp:r,onCellClick:i}),[M,o,w,E,S,P,n,r,i]);return an.useLayoutEffect(()=>{1===x.current&&g.current?.scrollToItem({rowIndex:p-1,align:"start"})}),function(e){const t=Fg(oU),{shouldRefocusRef:n}=zg(Xne),r=zg(_y),i=zg(zne);an.useEffect(()=>{t({type:h$.UpdatePageRows,payload:{pageRows:e}})},[t,e]);const o=an.useCallback(()=>{n&&(n.current=r.contains(document.activeElement))},[n,r]);$G({updateShouldRefocus:o,tableWrapperRef:{current:i}})}(M),an.useImperativeHandle(t,()=>({interpolatedScrollTo:(e,t)=>{const n=(b.current?.clientHeight??l)-l,r=Math.round(n*e);x.current=e,1===x.current?(g.current?.scrollToItem({rowIndex:p-1,align:"start"}),g.current?.scrollTo({scrollLeft:t})):g.current?.scrollTo({scrollTop:r,scrollLeft:t})}}),[b,l,p]),an.useEffect(()=>(m(()=>(e,t)=>{g.current?.scrollToItem({rowIndex:e,columnIndex:t,align:"auto"}),Eie(h,y.current)}),()=>{m(null)}),[h,m]),wie(b,s),vt.jsx(Are,{"data-key":"body",ref:g,outerRef:y,innerRef:b,style:Mie,columnCount:o.length,columnWidth:e=>f[e],height:l,rowCount:p,rowHeight:C,estimatedRowHeight:c.estimatedRowHeight,width:a.width,itemData:I,onItemsRendered:A,itemKey:Cie,className:"sn-table-body",direction:d,children:iie})});var _ie=an.memo(Rie);const Aie=({children:e})=>{const t=zg(eV),n=zg(Zre);return vt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:t,height:n},children:e})},Pie=(e,t)=>{const n=an.useRef(null),r=zg(JH);an.useLayoutEffect(()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)},[t,n,e,r.length]);const i=an.useCallback(n=>{const r=n.contentBoxSize.at(0)?.blockSize;r&&t(r+9,e)},[e,t]);return GU({ref:n,callback:i}),n},Iie=ic("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({interactions:e,hoverBackground:t,background:n,applicableStyle:r,color:i})=>({...r,background:n,color:i,"&&:hover:not(:has(button:hover))":{background:e.active?t:void 0}})),Tie=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:i,setMeasuredCellHeight:o,onKeyDown:a,onCellClick:s}=n,l=zg($H),c=zg(my),u=zg(sy),d=zg(sU),f=Fg(X$),p=zg(EH),h=zg(fy),m=zg(JH)[e],g=zg(wy),y=zg(kG(e)),b=r[e],{open:v,setOpen:x,handleOpenMenu:w,toggleSortOrder:S}=kne({isInteractionEnabled:h,column:b}),k=zg(ny),C=Pie(e,o),E=r.length-1===e,M=k?LU:lG,{ref:R,isDragging:_}=Rne(b,e),A=ene(b.id),P=y&&!g.enabled&&h?0:-1,I=a?t=>{a(t,e,w)}:void 0;return vt.jsxs(Iie,{"data-dragging":_,ref:R,className:`sn-table-cell ${qm}`,title:u.passive?b.label:void 0,onClick:k?w:S,applicableStyle:{...l.header,...cU(l,p,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:$$(c,E,d),borderLeftWidth:B$(c,E,d),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:b.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===b.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:A},interactions:u,hoverBackground:b.headerColor?.headerMenuHoverBackground??l.headerMenuHoverBackground,background:k&&v?b.headerColor?.headerMenuActiveBackground??l.headerMenuActiveBackground:b.headerColor?.background??l.header.background,color:b.headerColor?.color??l.header.color,tabIndex:P,onKeyDown:I,onMouseDown:t=>{t.preventDefault(),h&&s?.(e)},"data-col":e,children:[vt.jsx(M,{forwardRef:C,column:b,isInteractionEnabled:h,open:v,setOpen:x,columnWidth:m}),vt.jsx(wne,{column:b,isLastColumn:E,onColumnResize:i,setIsAdjustingWidth:f})]})},Die=e=>{const[t,n]=an.useState(new Map);_m(()=>{n(new Map)},[e.length]);const r=an.useCallback((e,t)=>{n(n=>yie(n.get(t),e)?new Map(n).set(t,e):n)},[]);return{rowHeight:an.useMemo(()=>gie(t),[t]),setMeasuredCellHeight:r}},Oie=(e,t)=>{an.useImperativeHandle(e,()=>({scrollTo:e=>t.current?.scrollTo(e)}),[t])},Nie=e=>{const t=zg(Iy),n=zg(Yg),r=zg(Lne),i=zg(JH);_m(()=>{e.current?.resetAfterIndex(0,!1)},[n,r,e,i,t])},qie={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},Lie=an.forwardRef((e,t)=>{const{columResizeHandler:n}=e,r=zg(MH),i=zg(Gre),o=Fg(Bre),a=sn.useRef(null),s=an.useRef(null),l=zg(BH),c=zg(Yg),u=zg(yy),d=zg(my),f=zg(JH),{rowHeight:p,setMeasuredCellHeight:h}=Die(r),m=vne(u,c),{handleHeadKeyDown:g,focusHeadCellOnClick:y}=sre();return Oie(t,a),Nie(a),wie(s,o),vt.jsx(Lre,{className:"sn-table-head-row",ref:a,outerRef:s,layout:"horizontal",style:{...qie,...m?{display:"none"}:void 0},itemCount:r.length,itemSize:e=>f[e],height:Math.max(p+8,l),width:i.width,itemKey:e=>r[e].id,itemData:{columns:r,columResizeHandler:n,setMeasuredCellHeight:h,onKeyDown:g,onCellClick:y},direction:d,children:Tie})});var jie=an.memo(Lie);const zie=an.forwardRef((e,t)=>{const{children:n,onScroll:r}=e,i=zg(my),o=zg(dy),{width:a,height:s}=zg(Ure),l=Fg(Bne),c=an.useCallback(e=>{l(e),"function"==typeof t?t(e):t&&(t.current=e)},[t,l]);return vt.jsx("div",{"data-testid":"scrollable-container",ref:c,style:{overflow:o?"auto":"hidden",width:a,height:s},onScroll:r,dir:i,tabIndex:-1,children:n})}),Fie=({children:e})=>{const t=zg(my),n=zg(Gre);return vt.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})},$ie=({index:e,style:t,data:n})=>{const{columns:r,totals:i,setMeasuredCellHeight:o,onKeyDown:a,onCellClick:s}=n,l=zg($H),c=zg(Yg),u=zg(my),d=zg(cy),f=zg(fy),p=zg(sU),h=zg(eie),m=Pie(e,o),g=r[e].totalInfo,{totalsTextAlign:y,isTotalNumeric:b}=r[e],v=c.qHyperCube.qSize.qcx-1===e,x=ene(r[e].id),w=a?t=>{a(t,e)}:void 0;return vt.jsx("div",{className:`sn-table-cell ${qm}`,tabIndex:-1,title:d?g:void 0,"data-col":e,onKeyDown:w,onMouseDown:t=>{t.preventDefault(),f&&s?.(e)},style:{...t,...l.totalRow,...cU(l,i,!1),background:l.totalRow.background,display:"flex",alignItems:i.atTop?"end":"start",borderStyle:"solid",borderRightWidth:$$(u,v,p),borderLeftWidth:B$(u,v,p),borderTopWidth:i.atBottom?"1px":"0px",borderBottomWidth:h&&i.atBottom||i.atTop?"1px":"0px",padding:"4px 12px",justifyContent:y,textAlign:y,boxSizing:"border-box",cursor:"default",opacity:x},children:vt.jsx(qU,{forwardRef:b?void 0:m,isNumeric:b,children:g})})},Bie=an.forwardRef((e,t)=>{const{totals:n}=e,r=zg(MH),i=zg(Gre),o=Fg(Hre),a=an.useRef(null),s=an.useRef(null),l=zg(HH),c=zg(my),u=zg(Yg),d=zg(JH),{rowHeight:f,setMeasuredCellHeight:p}=Die(r),{handleTotalsKeyDown:h,focusTotalsCellOnClick:m}=sre();return Oie(t,a),Nie(a),wie(s,o),vt.jsx(Lre,{className:"sn-table-totals-row",ref:a,outerRef:s,layout:"horizontal",style:qie,itemCount:u.qHyperCube.qSize.qcx,itemSize:e=>d[e],height:Math.max(f,l),width:i.width,itemData:{columns:r,totals:n,setMeasuredCellHeight:p,onKeyDown:h,onCellClick:m},direction:c,children:$ie})});var Hie=an.memo(Bie);const Vie=(e,t,n)=>{const r=zg(my),i=zg(ZB);return an.useCallback(o=>{const{scrollHeight:a,clientHeight:s,scrollTop:l}=o.currentTarget,c=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:i}=e,o=n-r;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(o.currentTarget,r),u=Math.max(0,Math.min(1,l/(a-s)));i.scrollTopRatio=u,i.scrollLeft=c,n.current?.interpolatedScrollTo(Number.isNaN(u)?0:u,c),e.current?.scrollTo(c),t.current?.scrollTo(c)},[i,n,e,t,r])},Wie=()=>{const e=zg(EH),t=an.useRef(null),n=an.useRef(null),r=an.useRef(null),i=an.useRef(null),o=Vie(n,r,i),a=an.useCallback(()=>{t.current&&(t.current.scrollTop=0)},[t]);CG(),(e=>{const t=zg(RH),n=zg(Lne),r=zg(Iy),i=zg(Fne);an.useEffect(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollLeft=0,e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[t,e]),an.useEffect(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[n,i,r,e])})(t),DG(t);const s=vt.jsx(Hie,{ref:r,totals:e},"totals");return vt.jsxs(vG,{children:[vt.jsx(zie,{ref:t,onScroll:o,children:vt.jsxs(Aie,{children:[vt.jsxs(Fie,{children:[vt.jsx(jie,{ref:n,columResizeHandler:a}),e.atTop?s:null,vt.jsx(_ie,{ref:i}),e.atBottom?s:null]}),vt.jsx(lU,{})]})}),vt.jsx(fG,{isPagination:!1})]})};var Uie=an.memo(Wie);const Gie=()=>{const e=zg(Yg),t=zg(Ry),n=zg(sy),{paginationNeeded:r,totalRowCount:i,totalColumnCount:o,totalPages:a}=zg(CH),s=zg(Iy),l=zg(Ty),c=zg(wy),[u,d]=$g(Lne),f=an.useRef(null),p=an.useRef(!1),h=Fg(jne),m=Fg(zne);an.useEffect(()=>{h(p)},[h]);const g=sn.useCallback(e=>{f.current=e,m(e)},[m]),{handleWrapperKeyDown:y}=sre();return(()=>{const e=zg(_y),{keyboard:t}=zg(Kne),n=zg(SG),r=zg(EH),i=zg(Fne),{scrollToCell:o}=zg(Yne),{shouldRefocusRef:a}=zg(Xne),s=an.useRef({focusedCellCoord:n,totalsPosition:r,rowCount:i,scrollToCell:o,rootElement:e}),l=an.useRef(null),c=an.useRef(null);an.useLayoutEffect(()=>{s.current={focusedCellCoord:n,totalsPosition:r,rowCount:i,scrollToCell:o,rootElement:e}},[n,r,i,o,e]),an.useEffect(()=>{let e=!1;const{focusedCellCoord:n,totalsPosition:r,rowCount:i,scrollToCell:o,rootElement:u}=s.current;if("function"==typeof u.querySelector){if(t.active){const[t,a]=n,d=r.atTop?2:1;if(t>=d&&t<d+i){null!==c.current&&(cancelAnimationFrame(c.current),c.current=null),o?.(t-d,a);const n=t=>{if(e)return;const r=tre(s.current.rootElement,s.current.focusedCellCoord,s.current.totalsPosition,s.current.rowCount);r&&document.activeElement!==r&&ere(r),r&&document.activeElement===r||t>0&&(l.current=requestAnimationFrame(()=>{n(t-1)}))};l.current=requestAnimationFrame(()=>{e||n(5)})}else{const e=tre(u,n,r,i);ere(e)}}else null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),c.current=requestAnimationFrame(()=>{if(e)return;const t=s.current;if(a?.current)return;if(t.rootElement.contains(document.activeElement))return;const n=tre(t.rootElement,t.focusedCellCoord,t.totalsPosition,t.rowCount);n?.blur(),Zne(t.rootElement)});return()=>{e=!0,null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),null!==c.current&&(cancelAnimationFrame(c.current),c.current=null)}}},[t.active,e,a])})(),wG(f,p),vt.jsxs(TU,{ref:g,"data-testid":"sn-table",onKeyDown:y,children:[vt.jsx(LG,{}),vt.jsx(Uie,{}),vt.jsx(UW,{paginationNeeded:r,handleChangePage:e=>{d(e)},pageInfo:u,totalRowCount:i,totalColumnCount:o,totalPages:a,keyboard:c,translator:l,theme:s,interactions:n,rect:t,layout:e})]})};var Yie=an.memo(Gie);const Kie=t=>{const n=t.get(Sy),r=t.get(vy),i=t.get(Gg),o=t.get(my);e.useEffect(()=>{i&&n&&(r?function(e){const t=e.get(my),n=e.get(Py),r=nV(t);n.render(vt.jsx(Wi,{stylisPlugins:"rtl"===t?[c$]:void 0,children:vt.jsx(ac,{theme:r,children:vt.jsx(Dg,{store:e,children:vt.jsx(tV,{children:vt.jsx(Tne,{})})})})}))}(t):function(e){const t=e.get(my),n=e.get(Py),r=nV(t);n.render(vt.jsx(sn.StrictMode,{children:vt.jsx(ac,{theme:r,children:vt.jsx(Dg,{store:e,children:vt.jsx(tV,{children:vt.jsx(Yie,{})})})})}))}(t))},[i,r,t,n,o])};function Xie(e,t){const n=e.getElementsByClassName("sn-table-container")[0];if(!n)return{};const r=n.getBoundingClientRect(),i=e.getElementsByClassName("sn-table-head-row")[0],o=i?.getBoundingClientRect()??{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=a?.getBoundingClientRect()??{height:0},l=e.getElementsByClassName("sn-table-data-row"),c={top:r.y+o.height+(t.atTop?s.height:0),bottom:r.y+r.height-(t.atBottom?s.height:0)},u=((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,c),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,c),f=((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,c,u);return{visibleRowStartIndex:u,visibleRowEndIndex:d,rowPartialHeight:f}}const Jie=(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]}},Qie=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const Zie=(e,t,n,r,i)=>{if(e<0)return 0;const o=n.qHyperCube.qSize.qcy,a=r.rowsPerPage||pH.rowsPerPage,s=i?.isMultiPage?0:3;return Math.min(o,a,e-t+1+s)},eoe=(e,t,n,r,i)=>{if(r&&!r.isMultiPage)return r;const o=iH(e,r);if(i){const{visibleRowStartIndex:i=-1,visibleRowEndIndex:a=-1,rowPartialHeight:s}=Xie(n,o);return{rowPartialHeight:s,scrollLeft:t.scrollLeft,visibleTop:t.qTop+i,visibleHeight:Zie(a,i,e,t,r),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:o}}const{visibleRowStartIndex:a=-1,visibleRowEndIndex:s=-1}=function(e,t){const n=e.querySelector(".sn-table-body"),r=n?.getBoundingClientRect(),i=n?.querySelectorAll(".sn-table-body .sn-table-cell");if(!i||!r)return{};const{scrollTopRatio:o=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:c=0}=t,u=l*c,d=a-u,f=d+s-1,p=Jie(d,i),h=p?.getBoundingClientRect();if(!p||!h)return{};const m=r.y;if(1-o<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+u,visibleRowEndIndex:f+u};const g=r.y+r.height,y=(Qie(h,m,g)?d:d+1)+u;let b=f+u;const v=Jie(f,i),x=v?.getBoundingClientRect();return v&&x&&(Qie(x,m,g)||(b=f-1+u)),{visibleRowStartIndex:y,visibleRowEndIndex:b}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:a,visibleHeight:Zie(s,a,e,t,r),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:o}},toe={version:JSON.stringify("6.37.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:[]};var noe=e=>({properties:{initial:toe},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:e=>Zy({...e}),exportProperties:Gy,exploration:uz(e)});const roe=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),ioe=e=>e.getStyle("object","straightTableV2","backgroundColor");return function(t){return{qae:noe(t),ext:SF(t),component(){const n=e.useStaleLayout(),r=e.useMemo(()=>Pg(),[!1!==n.usePagination]);r.set(Wg,t);const i=e.useElement();r.set(_y,i),r.set(Yg,n),r.set(Bg,e.useApp()),r.set(Sy,e.useModel()),r.set(sy,e.useInteractionState()),r.set(Ty,e.useTranslator()),r.set(oy,e.useSelections()),r.set(hy,e.useOptions()),r.set(wy,e.useKeyboard()),r.set(Ry,e.useRect()),r.set(Vg,e.useEmbed());const o=ym(n,i,roe,ioe);r.set(Iy,o),r.set(Gg,Rm(o,n,t)),r.set(Hg,Ye()),(t=>{const n=t.get(Py);e.useEffect(()=>()=>{n.unmount()},[n])})(r),e.onContextMenu?.((e,t)=>{const n=t.target,r=n?.closest(`.${qm}`);r?.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{Um(r)}})}),(({store:t})=>{const n=t.get(Yg),r=t.get(Sy),i=t.get(_y),o=t.get(My),a=t.get(yy),s=t.get(vy);e.onTakeSnapshot(async e=>{const l=e;if(!l.snapshotData||!r||l.snapshotData.content)return l;if("getHyperCubeData"in r){const e=t.get(ZB),{rowPartialHeight:c,scrollLeft:u,scrollTopRatio:d,visibleLeft:f,visibleWidth:p,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:y}=eoe(n,e,i,a,s);l.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:h,qWidth:n.qHyperCube.qSize.qcx,qHeight:m}]),l.snapshotData.content={rowPartialHeight:c,scrollLeft:u,scrollTopRatio:d,visibleLeft:f,visibleWidth:p,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:y,size:{width:o.width,height:o.height},estimatedRowHeight:e.estimatedRowHeight}}return l}),e.useImperativeHandle(()=>({getViewState:()=>eoe(n,t.get(ZB),i,a,s)}),[n,t,i,s])})({store:r}),Kie(r)}}}});
141
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,f):"";if(n=(t="-"===(e=e.substring(p,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,v=0;v<f;v++)m+=d.charAt(v),!((v-y+1)%l)&&v<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}});function GY(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const YY={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"},KY=/%\)?$/,XY=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,JY=/^\(oct\)/i,QY=/^\(dec\)/i,ZY=/^\(hex\)/i,eK=/^\(bin\)/i,tK=/^\(rom\)/i,nK=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,rK=/#|0/g;function iK(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function oK(e,t,n){let r;return XY.test(t)?e=iK(e,Number(/\d{2}/.exec(t)[0]),t,n):JY.test(t)?e=iK(e,8,t,n):QY.test(t)?e=iK(e,10,t,n):ZY.test(t)?e=iK(e,16,t,n):eK.test(t)?e=iK(e,2,t,n):tK.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function aK(e,t,n){const r=GY(e);return n?r:new RegExp(r||"",t)}function sK(e,t,n,r){let i,o,a,s,l,c,u,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=GY(m)),h&&(h=GY(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",s=a?p.substr(0,p.indexOf(a)):p,l=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(aK(c,"g"),t)),u=n,n=".",u&&(a=a.replace(aK(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(u);let y;g[1]&&(y=g[1].match(rK)),e.prefix=s||"",e.postfix=l||"",e.pattern=p,e.maxPrecision=y?y.length:2,e.percentage=KY.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(aK(t,null,!0),"|").concat(aK(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class lK{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return YY;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new lK(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],nK.test(e[0])&&(r.positive.isFunctional=!0),e[1]?nK.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?nK.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||sK(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&sK(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&sK(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=oK(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=UY(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=UY(l,e)}e=e.replace(u.numericRegex,e=>e===a?u.groupTemp:e===o?u.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function cK(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.size,r=void 0===n?5e3:n,i=t.multipleArguments,o=void 0!==i&&i,a=t.toKey,s=void 0===a?e=>e:a;let l,c,u=Object.create(null),d=Object.create(null),f=0,p=0;return l=o?function(){return c=s(...arguments),l.has(c)?l.get(c):l.set(c,e(...arguments))}:t=>(c=s(t),l.has(c)?l.get(c):l.set(c,e(t))),l.set=(e,t)=>(f>=r&&(delete u[d[p]],delete d[p],f--,p++),u[e]=t,d[f]=e,f++,t),l.get=e=>u[e],l.has=e=>e in u,l.clear=()=>{u=Object.create(null),d=Object.create(null),f=0,p=0},l.size=()=>f,l}function uK(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new lK(...t)}(i,e,t,n,r),a=cK(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const dK="D",fK="T",pK="TS",hK="IV",mK=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],gK=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],yK=["January","February","March","April","May","June","July","August","September","October","November","December"],bK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function vK(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function xK(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function wK(e,t){let n,r=function(e){const t=e,n=24*xK(t),r=60*xK(n),i=60*xK(r),o=1e3*xK(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class SK{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:mK,qDayNames:gK,qLongMonthNames:yK,qMonthNames:bK}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[fK]:r.qTimeFmt||"hh:mm:ss",[dK]:r.qDateFmt||"YYYY-MM-DD",[pK]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new SK(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=wK(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:vK("".concat(t.year).slice(-2),2),YYY:vK("".concat(t.year).slice(-3),3),def:e=>vK("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:vK("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:vK("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>vK("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>vK("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>vK("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>vK("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r});return s}}function kK(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new SK(...t)}function CK(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=kK(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=cK(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==hK?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=kK(i,e,t),r=cK(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function EK(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,c=t.sourceField;const u=s||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),d="dimension"===l?"first":"avg",f=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return CK(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),uK(n,r,i,o,t)}(n,o),p="dimension"===l?"first":(e,t)=>f(t),h={id:()=>r,key:()=>i,raw:()=>n,title:()=>n.qFallbackTitle||n.label,type:()=>l,origin:()=>c,items:()=>(e||(e=a(h)),e),min:()=>n.qMin,max:()=>n.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:d,reduceLabel:p,formatter:()=>f,tags:()=>n.qTags};return h}function MK(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:EK(cY({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=MK("qAttrDimInfo",t,n,a,cY({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=MK("qAttrExprInfo",t,n,a,cY({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=MK("qMeasureInfo",t,n,a,cY({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function RK(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.data,r=e.config,i=void 0===r?{}:r;const o={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},a=n;if(!a)throw new Error('Missing "data" input');if(!a.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const s=RK.util,l={cache:o,cube:a,localeInfo:i.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:i.virtualFields},c={key:()=>t,raw:()=>a,field:e=>function(e,t){let n=t.cache;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,l),fields:()=>o.fields.slice(),extract:e=>l.extractor(e,c,o,s),hierarchy:e=>l.hierarchy(e,c,o,s),_cache:()=>o};"K"===a.qMode||"T"===a.qMode||!a.qMode&&a.qNodesOnDim?(l.extractor=WY,l.hierarchy=VY,l.pages="K"===a.qMode?a.qStackedDataPages:a.qTreeDataPages):"S"===a.qMode?(l.extractor=pY,l.pages=a.qDataPages,l.hierarchy=VY):l.extractor=()=>[],l.fieldExtractor=e=>l.extractor({field:e},c,o,s);const u="S"===a.qMode?e=>e.qElemNumber:void 0,d="S"===a.qMode?e=>e.qNum:void 0;o.wrappedFields.push(...MK("qDimensionInfo",a,t,"",cY({},l,{value:u,type:"dimension"}))),o.wrappedFields.push(...MK("qMeasureInfo",a,t,"",cY({},l,{value:d,type:"measure"}))),o.fields=o.wrappedFields.map(e=>e.instance);const f=e=>{e.forEach(e=>{o.allFields.push(e.instance),f(e.measures),f(e.attrDims),f(e.attrExps)})};return f(o.wrappedFields),(i.virtualFields||[]).forEach(e=>{const n=c.field(e.from),r=EK(ZG({meta:n.raw(),id:"".concat(t,"/").concat(e.key),sourceField:n,fieldExtractor:e=>l.extractor({field:e},c,o,s),key:e.key,type:n.type(),localeInfo:l.localeInfo,value:n.value},e.override||{}));o.virtualFields.push(r)}),o.allFields.push(...o.virtualFields),c}const _K=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],AK=/\/qDimensionInfo(?:\/(\d+))?/,PK=/\/qMeasureInfo\/(\d+)/,IK=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,TK=/\/qAttrExprInfo\/(\d+)/,DK=/\/?qHyperCube/,OK=/\/?qTreeData/,NK=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),qK=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function LK(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach(e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;DK.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=NK):OK.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=qK);let s=!0;if(AK.test(e)&&(r=+AK.exec(e)[1]),PK.test(e)&&(i=+PK.exec(e)[1]),IK.test(e)){i=-1,r=0;const e=+IK.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(TK.test(e)){const e=i;if(t){i=0;const a=PY(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce((e,t)=>e+t.qAttrExprInfo.length,i),r=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+TK.exec(n)[1]}else r>-1?(r=-1,i=+TK.exec(n)[1]):i+=+TK.exec(n)[1]+1}return _K.forEach(e=>{let t=eY(e,2),r=t[0],i=t[1];n=n.replace(r,i)}),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach(e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach(e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||s>=o)&&o>-1?n.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})}):n.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}}),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function jK(e){RK.util=e.data("matrix").util,e.data("q",RK),e.formatter("q-number",uK),e.formatter("q-time",CK)}jK.qBrushHelper=LK,jK.selections=LK;var zK=Object.prototype.hasOwnProperty,FK=Object.prototype.toString,$K=Object.defineProperty,BK=Object.getOwnPropertyDescriptor,HK=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===FK.call(e)},VK=function(e){if(!e||"[object Object]"!==FK.call(e))return!1;var t,n=zK.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&zK.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||zK.call(e,t)},WK=function(e,t){$K&&"__proto__"===t.name?$K(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},UK=function(e,t){if("__proto__"===t){if(!zK.call(e,t))return;if(BK)return BK(e,t).value}return e[t]},GK=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=UK(s,n),s!==(i=UK(t,n))&&(u&&i&&(VK(i)||(o=HK(i)))?(o?(o=!1,a=r&&HK(r)?r:[]):a=r&&VK(r)?r:{},WK(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&WK(s,{name:n,newValue:i}));return s},YK="2.11.5";function KK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function XK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JK(Object(n),!0).forEach(function(t){XK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return KK(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KK(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eX(e){return!!e.changedTouches}function tX(e){return"number"==typeof e&&!isNaN(e)}function nX(e){return"number"!=typeof e||isNaN(e)}function rX(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function iX(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function oX(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function aX(e){const t=ZK(rX(e),4),n=t[0],r=t[1];return{x:n,y:r,width:t[2]-n,height:t[3]-r}}function sX(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function lX(e){const t=e||{},n=t.x,r=t.y,i=t.width,o=t.height,a=t.x1,s=t.x2,l=t.y1,c=t.y2,u=t.cx,d=t.cy,f=t.r,p=t.vertices;return tX(u)&&tX(d)&&tX(f)?"circle":tX(a)&&tX(s)&&tX(l)&&tX(c)?"line":tX(n)&&tX(r)&&tX(i)&&tX(o)?"rect":tX(n)&&tX(r)?"point":Array.isArray(p)?p.every(e=>Array.isArray(e))?"geopolygon":"polygon":null}function cX(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}function uX(e){return function(){return e}}const dX=Math.abs,fX=Math.atan2,pX=Math.cos,hX=Math.max,mX=Math.min,gX=Math.sin,yX=Math.sqrt,bX=1e-12,vX=Math.PI,xX=vX/2,wX=2*vX;function SX(e){return e>=1?xX:e<=-1?-xX:Math.asin(e)}const kX=Math.PI,CX=2*kX,EX=1e-6,MX=CX-EX;function RX(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class _X{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?RX:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return RX;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,o){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>EX)if(Math.abs(u*s-l*c)>EX&&i){let f=n-o,p=r-a,h=s*s+l*l,m=f*f+p*p,g=Math.sqrt(h),y=Math.sqrt(d),b=i*Math.tan((kX-Math.acos((h+d-m)/(2*g*y)))/2),v=b/y,x=b/g;Math.abs(v-1)>EX&&this._append`L${e+v*c},${t+v*u}`,this._append`A${i},${i},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>EX||Math.abs(this._y1-c)>EX)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%CX+CX),d>MX?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>EX&&this._append`A${n},${n},0,${+(d>=kX)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function AX(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new _X(t)}function PX(e){return e.innerRadius}function IX(e){return e.outerRadius}function TX(e){return e.startAngle}function DX(e){return e.endAngle}function OX(e){return e&&e.padAngle}function NX(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/yX(s*s+l*l),u=c*l,d=-c*s,f=e+u,p=t+d,h=n+u,m=r+d,g=(f+h)/2,y=(p+m)/2,b=h-f,v=m-p,x=b*b+v*v,w=i-o,S=f*m-h*p,k=(v<0?-1:1)*yX(hX(0,w*w*x-S*S)),C=(S*v-b*k)/x,E=(-S*b-v*k)/x,M=(S*v+b*k)/x,R=(-S*b+v*k)/x,_=C-g,A=E-y,P=M-g,I=R-y;return _*_+A*A>P*P+I*I&&(C=M,E=R),{cx:C,cy:E,x01:-u,y01:-d,x11:C*(i/w-1),y11:E*(i/w-1)}}function qX(){var e=PX,t=IX,n=uX(0),r=null,i=TX,o=DX,a=OX,s=null,l=AX(c);function c(){var c,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-xX,h=o.apply(this,arguments)-xX,m=dX(h-p),g=h>p;if(s||(s=c=l()),f<d&&(u=f,f=d,d=u),f>bX)if(m>wX-bX)s.moveTo(f*pX(p),f*gX(p)),s.arc(0,0,f,p,h,!g),d>bX&&(s.moveTo(d*pX(h),d*gX(h)),s.arc(0,0,d,h,p,g));else{var y,b,v=p,x=h,w=p,S=h,k=m,C=m,E=a.apply(this,arguments)/2,M=E>bX&&(r?+r.apply(this,arguments):yX(d*d+f*f)),R=mX(dX(f-d)/2,+n.apply(this,arguments)),_=R,A=R;if(M>bX){var P=SX(M/d*gX(E)),I=SX(M/f*gX(E));(k-=2*P)>bX?(w+=P*=g?1:-1,S-=P):(k=0,w=S=(p+h)/2),(C-=2*I)>bX?(v+=I*=g?1:-1,x-=I):(C=0,v=x=(p+h)/2)}var T=f*pX(v),D=f*gX(v),O=d*pX(S),N=d*gX(S);if(R>bX){var q,L=f*pX(x),j=f*gX(x),z=d*pX(w),F=d*gX(w);if(m<vX)if(q=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,f=d*l-u*c;if(!(f*f<bX))return[e+(f=(u*(t-o)-d*(e-i))/f)*l,t+f*c]}(T,D,z,F,L,j,O,N)){var $=T-q[0],B=D-q[1],H=L-q[0],V=j-q[1],W=1/gX(function(e){return e>1?0:e<-1?vX:Math.acos(e)}(($*H+B*V)/(yX($*$+B*B)*yX(H*H+V*V)))/2),U=yX(q[0]*q[0]+q[1]*q[1]);_=mX(R,(d-U)/(W-1)),A=mX(R,(f-U)/(W+1))}else _=A=0}C>bX?A>bX?(y=NX(z,F,T,D,f,A,g),b=NX(L,j,O,N,f,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<R?s.arc(y.cx,y.cy,A,fX(y.y01,y.x01),fX(b.y01,b.x01),!g):(s.arc(y.cx,y.cy,A,fX(y.y01,y.x01),fX(y.y11,y.x11),!g),s.arc(0,0,f,fX(y.cy+y.y11,y.cx+y.x11),fX(b.cy+b.y11,b.cx+b.x11),!g),s.arc(b.cx,b.cy,A,fX(b.y11,b.x11),fX(b.y01,b.x01),!g))):(s.moveTo(T,D),s.arc(0,0,f,v,x,!g)):s.moveTo(T,D),d>bX&&k>bX?_>bX?(y=NX(O,N,L,j,d,-_,g),b=NX(T,D,z,F,d,-_,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),_<R?s.arc(y.cx,y.cy,_,fX(y.y01,y.x01),fX(b.y01,b.x01),!g):(s.arc(y.cx,y.cy,_,fX(y.y01,y.x01),fX(y.y11,y.x11),!g),s.arc(0,0,d,fX(y.cy+y.y11,y.cx+y.x11),fX(b.cy+b.y11,b.cx+b.x11),g),s.arc(b.cx,b.cy,_,fX(b.y11,b.x11),fX(b.y01,b.x01),!g))):s.arc(0,0,d,S,w,g):s.lineTo(O,N)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-vX/2;return[pX(r)*n,gX(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:uX(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:uX(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:uX(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:uX(+e),c):r},c.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:uX(+e),c):i},c.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:uX(+e),c):o},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:uX(+e),c):a},c.context=function(e){return arguments.length?(s=null==e?null:e,c):s},c}function LX(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function jX(e){this._context=e}function zX(e){return new jX(e)}function FX(e){return e[0]}function $X(e){return e[1]}function BX(e,t,n){var r=null,i=uX(!0),o=null,a=zX,s=null,l=AX(c);function c(c){var u,d,f,p,h,m=(c=LX(c)).length,g=!1,y=new Array(m),b=new Array(m);for(null==o&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&i(p=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],b[f]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(p,u,c),b[u]=+t(p,u,c),s.point(r?+r(p,u,c):y[u],n?+n(p,u,c):b[u]))}if(h)return s=null,h+""||null}function u(){return function(e,t){var n=uX(!0),r=null,i=zX,o=null,a=AX(s);function s(s){var l,c,u,d=(s=LX(s)).length,f=!1;for(null==r&&(o=i(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(c,l,s),+t(c,l,s));if(u)return o=null,u+""||null}return e="function"==typeof e?e:void 0===e?FX:uX(e),t="function"==typeof t?t:void 0===t?$X:uX(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:uX(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:uX(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:uX(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),s):i},s.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),s):r},s}().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?FX:uX(+e),t="function"==typeof t?t:uX(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?$X:uX(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:uX(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:uX(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:uX(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:uX(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:uX(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:uX(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:uX(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),c):o},c}function HX(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function VX(e){return e}function WX(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function UX(e){this._context=e}function GX(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function YX(e,t){this._context=e,this._k=(1-t)/6}jX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},UX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:WX(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:WX(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},YX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:GX(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:GX(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var KX=function e(t){function n(e){return new YX(e,t)}return n.tension=function(t){return e(+t)},n}(0);function XX(e,t){this._context=e,this._alpha=t}XX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>bX){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>bX){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var JX=function e(t){function n(e){return t?new XX(e,t):new YX(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function QX(e){return e<0?-1:1}function ZX(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(QX(o)+QX(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function eJ(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function tJ(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function nJ(e){this._context=e}function rJ(e){this._context=new iJ(e)}function iJ(e){this._context=e}function oJ(e){this._context=e}function aJ(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function sJ(e,t){this._context=e,this._t=t}function lJ(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function cJ(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function uJ(e,t){return e[t]}function dJ(e){const t=[];return t.key=e,t}function fJ(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function pJ(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function hJ(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map(e=>i[e])},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function mJ(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function gJ(e){return(e=mJ(Math.abs(e)))?e[1]:NaN}nJ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tJ(this,this._t0,eJ(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,tJ(this,eJ(this,n=ZX(this,e,t)),n);break;default:tJ(this,this._t0,n=ZX(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(rJ.prototype=Object.create(nJ.prototype)).point=function(e,t){nJ.prototype.point.call(this,t,e)},iJ.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},oJ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=aJ(e),i=aJ(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},sJ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var yJ,bJ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vJ(e){if(!(t=bJ.exec(e)))throw new Error("invalid format: "+e);var t;return new xJ({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function xJ(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function wJ(e,t){var n=mJ(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}vJ.prototype=xJ.prototype,xJ.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var SJ={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wJ(100*e,t),r:wJ,s:function(e,t){var n=mJ(e,t);if(!n)return yJ=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(yJ=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+mJ(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function kJ(e){return e}var CJ,EJ,MJ,RJ=Array.prototype.map,_J=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function AJ(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?kJ:(t=RJ.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?kJ:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(RJ.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e,t){var n=(e=vJ(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,g=e.comma,y=e.precision,b=e.trim,v=e.type;"n"===v?(g=!0,v="g"):SJ[v]||(void 0===y&&(y=12),b=!0,v="g"),(h||"0"===n&&"="===d)&&(h=!0,n="0",d="=");var x=(t&&void 0!==t.prefix?t.prefix:"")+("$"===p?i:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),w=("$"===p?o:/[%p]/.test(v)?l:"")+(t&&void 0!==t.suffix?t.suffix:""),S=SJ[v],k=/[defgprs%]/.test(v);function C(e){var t,i,o,l=x,p=w;if("c"===v)p=S(e)+p,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:S(Math.abs(e),y),b&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==f&&(C=!1),l=(C?"("===f?f:c:"-"===f||"("===f?"":f)+l,p=("s"!==v||isNaN(e)||void 0===yJ?"":_J[8+yJ/3])+p+(C&&"("===f?")":""),k)for(t=-1,i=e.length;++t<i;)if(48>(o=e.charCodeAt(t))||o>57){p=(46===o?a+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}g&&!h&&(e=r(e,1/0));var E=l.length+e.length+p.length,M=E<m?new Array(m-E+1).join(n):"";switch(g&&h&&(e=r(M+e,M.length?m-p.length:1/0),M=""),d){case"<":e=l+e+p+M;break;case"=":e=l+M+e+p;break;case"^":e=M.slice(0,E=M.length>>1)+l+e+p+M.slice(E);break;default:e=M+l+e+p}return s(e)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(gJ(t)/3))),r=Math.pow(10,-n),i=d(((e=vJ(e)).type="f",e),{suffix:_J[8+n/3]});return function(e){return i(r*e)}}}}!function(e){CJ=AJ(e),EJ=CJ.format,MJ=CJ.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const PJ=new Date,IJ=new Date;function TJ(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>TJ(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(PJ.setTime(+t),IJ.setTime(+r),e(PJ),e(IJ),Math.floor(n(PJ,IJ))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const DJ=6e4,OJ=864e5,NJ=6048e5,qJ=TJ(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*DJ)/OJ,e=>e.getDate()-1);qJ.range;const LJ=TJ(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/OJ,e=>e.getUTCDate()-1);LJ.range;const jJ=TJ(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/OJ,e=>Math.floor(e/OJ));function zJ(e){return TJ(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*DJ)/NJ)}jJ.range;const FJ=zJ(0),$J=zJ(1),BJ=zJ(2),HJ=zJ(3),VJ=zJ(4),WJ=zJ(5),UJ=zJ(6);function GJ(e){return TJ(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/NJ)}FJ.range,$J.range,BJ.range,HJ.range,VJ.range,WJ.range,UJ.range;const YJ=GJ(0),KJ=GJ(1),XJ=GJ(2),JJ=GJ(3),QJ=GJ(4),ZJ=GJ(5),eQ=GJ(6);YJ.range,KJ.range,XJ.range,JJ.range,QJ.range,ZJ.range,eQ.range;const tQ=TJ(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());tQ.every=e=>isFinite(e=Math.floor(e))&&e>0?TJ(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,tQ.range;const nQ=TJ(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function rQ(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function iQ(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function oQ(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=rQ,n=(t,n)=>rQ(e(t),n),r=(t,n)=>e(t)-n):(t=e===rQ||e===iQ?e:aQ,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function aQ(){return 0}nQ.every=e=>isFinite(e=Math.floor(e))&&e>0?TJ(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,nQ.range;const sQ=oQ(rQ).right;oQ(function(e){return null===e?NaN:+e}).center;var lQ=sQ;class cQ extends Map{constructor(e,t=dQ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(uQ(this,e))}has(e){return super.has(uQ(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function uQ({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function dQ(e){return null!==e&&"object"==typeof e?e.valueOf():e}const fQ=Math.sqrt(50),pQ=Math.sqrt(10),hQ=Math.sqrt(2);function mQ(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=fQ?10:o>=pQ?5:o>=hQ?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?mQ(e,t,2*n):[s,l,c]}function gQ(e,t,n){return mQ(e=+e,t=+t,n=+n)[2]}function yQ(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function bQ(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function vQ(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function xQ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=RQ(i),u=_Q(i),d=RQ(o),f=_Q(o),p=RQ(a),h=_Q(a),m=RQ(s),g=_Q(s),y=RQ(l),b=_Q(l),v={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:KQ,e:KQ,f:eZ,g:dZ,G:pZ,H:XQ,I:JQ,j:QQ,L:ZQ,m:tZ,M:nZ,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:qZ,s:LZ,S:rZ,u:iZ,U:oZ,V:sZ,w:lZ,W:cZ,x:null,X:null,y:uZ,Y:fZ,Z:hZ,"%":NZ},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:mZ,e:mZ,f:xZ,g:IZ,G:DZ,H:gZ,I:yZ,j:bZ,L:vZ,m:wZ,M:SZ,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:qZ,s:LZ,S:kZ,u:CZ,U:EZ,V:RZ,w:_Z,W:AZ,x:null,X:null,y:PZ,Y:TZ,Z:OZ,"%":NZ},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:zQ,e:zQ,f:WQ,g:NQ,G:OQ,H:$Q,I:$Q,j:FQ,L:VQ,m:jQ,M:BQ,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:LQ,Q:GQ,s:YQ,S:HQ,u:PQ,U:IQ,V:TQ,w:AQ,W:DQ,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:NQ,Y:OQ,Z:qQ,"%":UQ};function S(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=wQ[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function k(e,t){return function(n){var r,i,o=vQ(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=bQ(vQ(o.y,0,1))).getUTCDay(),r=i>4||0===i?KJ.ceil(r):KJ(r),r=LJ.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=yQ(vQ(o.y,0,1))).getDay(),r=i>4||0===i?$J.ceil(r):$J(r),r=qJ.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?bQ(vQ(o.y,0,1)).getUTCDay():yQ(vQ(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,bQ(o)):yQ(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in wQ?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}var wQ={"-":"",_:" ",0:"0"},SQ=/^\s*\d+/,kQ=/^%/,CQ=/[\\^$*+?|[\]().{}]/g;function EQ(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function MQ(e){return e.replace(CQ,"\\$&")}function RQ(e){return new RegExp("^(?:"+e.map(MQ).join("|")+")","i")}function _Q(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function AQ(e,t,n){var r=SQ.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function PQ(e,t,n){var r=SQ.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function IQ(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function TQ(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function DQ(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function OQ(e,t,n){var r=SQ.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function NQ(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qQ(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function LQ(e,t,n){var r=SQ.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function jQ(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function zQ(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function FQ(e,t,n){var r=SQ.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function $Q(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function BQ(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function HQ(e,t,n){var r=SQ.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function VQ(e,t,n){var r=SQ.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function WQ(e,t,n){var r=SQ.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function UQ(e,t,n){var r=kQ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function GQ(e,t,n){var r=SQ.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function YQ(e,t,n){var r=SQ.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function KQ(e,t){return EQ(e.getDate(),t,2)}function XQ(e,t){return EQ(e.getHours(),t,2)}function JQ(e,t){return EQ(e.getHours()%12||12,t,2)}function QQ(e,t){return EQ(1+qJ.count(tQ(e),e),t,3)}function ZQ(e,t){return EQ(e.getMilliseconds(),t,3)}function eZ(e,t){return ZQ(e,t)+"000"}function tZ(e,t){return EQ(e.getMonth()+1,t,2)}function nZ(e,t){return EQ(e.getMinutes(),t,2)}function rZ(e,t){return EQ(e.getSeconds(),t,2)}function iZ(e){var t=e.getDay();return 0===t?7:t}function oZ(e,t){return EQ(FJ.count(tQ(e)-1,e),t,2)}function aZ(e){var t=e.getDay();return t>=4||0===t?VJ(e):VJ.ceil(e)}function sZ(e,t){return e=aZ(e),EQ(VJ.count(tQ(e),e)+(4===tQ(e).getDay()),t,2)}function lZ(e){return e.getDay()}function cZ(e,t){return EQ($J.count(tQ(e)-1,e),t,2)}function uZ(e,t){return EQ(e.getFullYear()%100,t,2)}function dZ(e,t){return EQ((e=aZ(e)).getFullYear()%100,t,2)}function fZ(e,t){return EQ(e.getFullYear()%1e4,t,4)}function pZ(e,t){var n=e.getDay();return EQ((e=n>=4||0===n?VJ(e):VJ.ceil(e)).getFullYear()%1e4,t,4)}function hZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+EQ(t/60|0,"0",2)+EQ(t%60,"0",2)}function mZ(e,t){return EQ(e.getUTCDate(),t,2)}function gZ(e,t){return EQ(e.getUTCHours(),t,2)}function yZ(e,t){return EQ(e.getUTCHours()%12||12,t,2)}function bZ(e,t){return EQ(1+LJ.count(nQ(e),e),t,3)}function vZ(e,t){return EQ(e.getUTCMilliseconds(),t,3)}function xZ(e,t){return vZ(e,t)+"000"}function wZ(e,t){return EQ(e.getUTCMonth()+1,t,2)}function SZ(e,t){return EQ(e.getUTCMinutes(),t,2)}function kZ(e,t){return EQ(e.getUTCSeconds(),t,2)}function CZ(e){var t=e.getUTCDay();return 0===t?7:t}function EZ(e,t){return EQ(YJ.count(nQ(e)-1,e),t,2)}function MZ(e){var t=e.getUTCDay();return t>=4||0===t?QJ(e):QJ.ceil(e)}function RZ(e,t){return e=MZ(e),EQ(QJ.count(nQ(e),e)+(4===nQ(e).getUTCDay()),t,2)}function _Z(e){return e.getUTCDay()}function AZ(e,t){return EQ(KJ.count(nQ(e)-1,e),t,2)}function PZ(e,t){return EQ(e.getUTCFullYear()%100,t,2)}function IZ(e,t){return EQ((e=MZ(e)).getUTCFullYear()%100,t,2)}function TZ(e,t){return EQ(e.getUTCFullYear()%1e4,t,4)}function DZ(e,t){var n=e.getUTCDay();return EQ((e=n>=4||0===n?QJ(e):QJ.ceil(e)).getUTCFullYear()%1e4,t,4)}function OZ(){return"+0000"}function NZ(){return"%"}function qZ(e){return+e}function LZ(e){return Math.floor(+e/1e3)}const jZ=hJ();jZ("d3-number",function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=AJ(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o}),jZ("d3-time",function(e){let t=xQ({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=xQ(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r});const zZ={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return jZ(t.type||"d3-number")(t.format||"")})(e)};function FZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.id,r=void 0===n?zZ.id:n,i=t.key,o=void 0===i?zZ.key:i,a=t.min,s=void 0===a?zZ.min:a,l=t.max,c=void 0===l?zZ.max:l,u=t.type,d=void 0===u?zZ.type:u,f=t.tags,p=void 0===f?zZ.tags:f,h=t.title,m=void 0===h?zZ.title:h,g=t.values,y=void 0===g?zZ.values:g,b=t.value,v=void 0===b?zZ.value:b,x=t.label,w=void 0===x?zZ.label:x,S=t.formatter,k=void 0===S?zZ.formatter:S;return{id:()=>r(e),key:()=>o(e),raw:()=>e,tags:()=>p(e),type:()=>d(e),min:()=>s(e),max:()=>c(e),title:()=>m(e),items:()=>y(e),formatter:()=>k(e),value:v,label:w}}const $Z=e=>e.filter(e=>"number"==typeof e&&!isNaN(e)),BZ=e=>e.reduce((e,t)=>e+t,0),HZ={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=$Z(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=$Z(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=$Z(e);return t.length?t.reduce((e,t)=>e+t,0):NaN},avg:e=>{const t=$Z(e),n=t.length;return n?BZ(t)/n:NaN}};function VZ(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach(a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map(n=>VZ(e,t,{main:n},r).main):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=HZ[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?HZ[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=HZ[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?HZ[l.field.reduceLabel]:l.field.reduceLabel))}),i}function WZ(e,t){const n=VZ(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{}).main;return{props:VZ(e,t,e.props||{},n),main:n}}function UZ(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function GZ(e,t){let n=t.main,r=t.propsArr,i=t.props,o=[];const a=n.field.formatter(),s={};return r.forEach(e=>{s[e]=i[e].field?i[e].field.formatter():e=>e}),o.push(...e.map(e=>{const t=UZ(e.items,n,a);return r.forEach(n=>{t[n]=UZ(e.items,i[n],s[n],n)}),t})),o}function YZ(e){let t=e.cfg,n=e.itemData,r=e.obj,i=e.target,o=e.tracker;const a="function"===e.trackType?t.trackBy(n):n[t.trackBy];let s=o[a];s||(s=o[a]={items:[],id:a},i.push(s)),s.items.push(r)}function KZ(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function XZ(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const JZ={diverging:function(e,t){const n=e.length;if(n<=0)return;const r=e[t[0]].length;for(let i=0;i<r;++i){let r=0,o=0;for(let a=0;a<n;++a){const n=e[t[a]][i],s=n[1]-n[0];s>=0?(n[0]=r,r+=s,n[1]=r):s<0?(n[1]=o,o+=s,n[0]=o):n[0]=r}}},none:lJ,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}lJ(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}lJ(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,lJ(e,t)}}},QZ={ascending:function(e){var t=e.map(pJ);return cJ(e).sort(function(e,n){return t[e]-t[n]})},insideout:function(e){var t,n,r=e.length,i=e.map(pJ),o=function(e){var t=e.map(fJ);return cJ(e).sort(function(e,n){return t[e]-t[n]})}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:cJ,reverse:function(e){return cJ(e).reverse()}};function ZZ(e,t,n,r){const i=r||e.items,o={},a=t.stackKey,s=t.value,l=t.startProp||"start",c=t.endProp||"end",u=t.offset||"none",d=t.order||"none",f=t.valueRef||"";let p=0,h={};for(let e=0;e<i.length;e++){let t=i[e],n=f?t[f]:null;if(n&&n.source){let e="".concat(n.source.key||"","/").concat(n.source.field);h[e]||(h[e]=n.source)}let r=a(t);o[r]=o[r]||{items:[]},o[r].items.push(t),p=Math.max(p,o[r].items.length)}const m=Array.apply(null,{length:p}).map(Number.call,Number),g=Object.keys(o).map(e=>o[e].items),y=function(){var e=uX([]),t=cJ,n=lJ,r=uJ;function i(i){var o,a,s=Array.from(e.apply(this,arguments),dJ),l=s.length,c=-1;for(const e of i)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(e,s[o].key,c,i)]).data=e;for(o=0,a=LX(t(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:uX(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:uX(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?cJ:"function"==typeof e?e:uX(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?lJ:e,i):n},i}().keys(m).value((e,t)=>e[t]?s(e[t]):0).order(QZ[d]).offset(JZ[u]);let b=y(g),v=[];for(let e=0;e<b.length;e++){let t=b[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[l]={value:n[0]},r[c]={value:n[1]},v.push(n[0],n[1]))}}let x=Object.keys(h).map(e=>{let t=n(h[e].key);return t?t.field(h[e].field):null}).filter(e=>!!e);const w=FZ({title:x.map(e=>e.title()).join(", "),min:XZ(v),max:KZ(v),type:"measure",formatter:x[0]?x[0].formatter:void 0});e.fields.push(w)}function e0(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map(e=>({value:e,label:String(e)}));else if(e){if("collection"in e)n=QK({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map(e=>({value:o(e),label:String(a(e))}));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach(e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))}),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map(t=>({value:o(t),label:String(a(t)),source:{field:e.field}})))}else e.fields&&e.fields.forEach(e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))});n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&(Array.isArray(e.stack.stackByKey)?e.stack.stackByKey.forEach(r=>{const i=n.items.filter(e=>{var t;return(null===(t=e.key)||void 0===t?void 0:t.value)&&e.key.value===r});ZZ(n,e.stack,t.dataset,i)}):ZZ(n,e.stack,t.dataset,n.items))}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function t0(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e0;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function n0(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const r0=Symbol("implicit");function i0(){var e=new cQ,t=[],n=[],r=r0;function i(i){let o=e.get(i);if(void 0===o){if(r!==r0)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new cQ;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return i0(t,n).unknown(r)},n0.apply(i,arguments),i}function o0(){var e,t,n=i0().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,f=d?a:o,p=d?o:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return f+e*t});return i(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return o0(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},n0.apply(d(),arguments)}function a0(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function s0(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function l0(){}var c0=.7,u0=1/c0,d0="\\s*([+-]?\\d+)\\s*",f0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",p0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h0=/^#([0-9a-f]{3,8})$/,m0=new RegExp(`^rgb\\(${d0},${d0},${d0}\\)$`),g0=new RegExp(`^rgb\\(${p0},${p0},${p0}\\)$`),y0=new RegExp(`^rgba\\(${d0},${d0},${d0},${f0}\\)$`),b0=new RegExp(`^rgba\\(${p0},${p0},${p0},${f0}\\)$`),v0=new RegExp(`^hsl\\(${f0},${p0},${p0}\\)$`),x0=new RegExp(`^hsla\\(${f0},${p0},${p0},${f0}\\)$`),w0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function S0(){return this.rgb().formatHex()}function k0(){return this.rgb().formatRgb()}function C0(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=h0.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?E0(t):3===n?new _0(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?M0(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?M0(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=m0.exec(e))?new _0(t[1],t[2],t[3],1):(t=g0.exec(e))?new _0(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=y0.exec(e))?M0(t[1],t[2],t[3],t[4]):(t=b0.exec(e))?M0(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=v0.exec(e))?O0(t[1],t[2]/100,t[3]/100,1):(t=x0.exec(e))?O0(t[1],t[2]/100,t[3]/100,t[4]):w0.hasOwnProperty(e)?E0(w0[e]):"transparent"===e?new _0(NaN,NaN,NaN,0):null}function E0(e){return new _0(e>>16&255,e>>8&255,255&e,1)}function M0(e,t,n,r){return r<=0&&(e=t=n=NaN),new _0(e,t,n,r)}function R0(e,t,n,r){return 1===arguments.length?function(e){return e instanceof l0||(e=C0(e)),e?new _0((e=e.rgb()).r,e.g,e.b,e.opacity):new _0}(e):new _0(e,t,n,null==r?1:r)}function _0(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function A0(){return`#${D0(this.r)}${D0(this.g)}${D0(this.b)}`}function P0(){const e=I0(this.opacity);return`${1===e?"rgb(":"rgba("}${T0(this.r)}, ${T0(this.g)}, ${T0(this.b)}${1===e?")":`, ${e})`}`}function I0(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function T0(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function D0(e){return((e=T0(e))<16?"0":"")+e.toString(16)}function O0(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new q0(e,t,n,r)}function N0(e){if(e instanceof q0)return new q0(e.h,e.s,e.l,e.opacity);if(e instanceof l0||(e=C0(e)),!e)return new q0;if(e instanceof q0)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new q0(a,s,l,e.opacity)}function q0(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function L0(e){return(e=(e||0)%360)<0?e+360:e}function j0(e){return Math.max(0,Math.min(1,e||0))}function z0(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}a0(l0,C0,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:S0,formatHex:S0,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return N0(this).formatHsl()},formatRgb:k0,toString:k0}),a0(_0,R0,s0(l0,{brighter(e){return e=null==e?u0:Math.pow(u0,e),new _0(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?c0:Math.pow(c0,e),new _0(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _0(T0(this.r),T0(this.g),T0(this.b),I0(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A0,formatHex:A0,formatHex8:function(){return`#${D0(this.r)}${D0(this.g)}${D0(this.b)}${D0(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:P0,toString:P0})),a0(q0,function(e,t,n,r){return 1===arguments.length?N0(e):new q0(e,t,n,null==r?1:r)},s0(l0,{brighter(e){return e=null==e?u0:Math.pow(u0,e),new q0(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?c0:Math.pow(c0,e),new q0(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new _0(z0(e>=240?e-240:e+120,i,r),z0(e,i,r),z0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new q0(L0(this.h),j0(this.s),j0(this.l),I0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=I0(this.opacity);return`${1===e?"hsl(":"hsla("}${L0(this.h)}, ${100*j0(this.s)}%, ${100*j0(this.l)}%${1===e?")":`, ${e})`}`}}));var F0=e=>()=>e;function $0(e){return 1===(e=+e)?B0:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):F0(isNaN(t)?n:t)}}function B0(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):F0(isNaN(e)?t:e)}var H0=function e(t){var n=$0(t);function r(e,t){var r=n((e=R0(e)).r,(t=R0(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=B0(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function V0(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function W0(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Q0(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function U0(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function G0(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Y0(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Q0(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var K0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,X0=new RegExp(K0.source,"g");function J0(e,t){var n,r,i,o=K0.lastIndex=X0.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=K0.exec(e))&&(r=X0.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:G0(n,r)})),o=X0.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Q0(e,t){var n,r=typeof t;return null==t||"boolean"===r?F0(t):("number"===r?G0:"string"===r?(n=C0(t))?(t=n,H0):J0:t instanceof C0?H0:t instanceof Date?U0:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?V0:Array.isArray(t)?W0:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Y0:G0)(e,t)}function Z0(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function e1(e){return+e}var t1=[0,1];function n1(e){return e}function r1(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function i1(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=r1(i,r),o=n(a,o)):(r=r1(r,i),o=n(o,a)),function(e){return o(r(e))}}function o1(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=r1(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=lQ(e,t,1,r)-1;return o[n](i[n](t))}}function a1(){var e,t,n,r,i,o,a=t1,s=t1,l=Q0,c=n1;function u(){var e=Math.min(a.length,s.length);return c!==n1&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?o1:i1,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),G0)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,e1),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=Z0,u()},d.clamp=function(e){return arguments.length?(c=!!e||n1,u()):c!==n1},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function s1(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?gQ(t,e,n):gQ(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=vJ(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(gJ(t)/3)))-gJ(Math.abs(e)))}(o,a))||(r.precision=i),MJ(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gJ(t)-gJ(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-gJ(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return EJ(r)}function l1(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?mQ(t,e,n):mQ(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return s1(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=gQ(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function c1(){var e=a1()(n1,n1);return e.copy=function(){return t=e,c1().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},n0.apply(e,arguments),l1(e)}function u1(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[lQ(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return u1().domain(t).range(n).unknown(e)},n0.apply(i,arguments)}function d1(e){return void 0===e?e=>e:t=>e(t)}function f1(e){return Math.max(0,Math.min(1,e))}function p1(e){return"object"==typeof e}function h1(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function m1(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...h1(t,o,a)),o-=a-o,a=e[i],r.push(...h1(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...h1(t,o,a))):r.push(...h1(t,o,a))}return r.filter(e=>e>=n.min()&&e<=n.max())}function g1(e){let t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,l=void 0===s?void 0:s;const c=nX(a)||nX(t)?2:Math.max(t/a,2),u=Math.min(1e3,Math.round(c));let d=n.ticks(u);d.length<=1&&(d=n.ticks(u+1));const f=i>0?m1(d,i,n):d;f.sort((e,t)=>e-t);const p=f.map(d1(l));return f.map((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:p[t],value:e,isMinor:-1===d.indexOf(e)}})}function y1(e){let t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,l=void 0===s?void 0:s;const c=nX(a)||nX(t)?2:Math.max(t/a,2),u=Math.min(1e3,Math.round(c)),d=u>10?10:u;n.nice(d);const f=n.ticks(u),p=i>0?m1(f,i,n):f;p.sort((e,t)=>e-t);const h=p.map(d1(l));return p.map((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:h[t],value:e,isMinor:-1===f.indexOf(e)}})}function b1(e){let t,n=e.settings,r=e.scale,i=e.distance,o=e.formatter,a=void 0===o?e=>e:o;const s=n.minorTicks&&!nX(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter(e=>"object"==typeof e?!nX(e.value):!nX(e));t=function(e){let t=e.values,n=e.scale,r=e.formatter,i=void 0===r?e=>e:r;return t.sort((e,t)=>(p1(e)?e.value:e)-(p1(t)?t.value:t)).filter((e,t,r)=>{const i=p1(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t}).map(e=>{const t=p1(e),r=t?e.value:e,o=n(r);return{position:o,value:r,label:t&&void 0!==e.label?e.label:i(r),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?f1(n(e.start)):o,end:t&&!isNaN(e.end)?f1(n(e.end)):o}})}({values:e,scale:r.copy(),formatter:a})}else if(nX(n.ticks.count)){t=(n.ticks.tight?y1:g1)({distance:i,minorCount:s,unitDivider:n.ticks.distance,scale:r,formatter:a}),n.ticks.forceBounds&&function(e,t,n){const r=e.map(e=>e.position),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,a)}else{t=function(e){let t=e.count,n=e.minorCount,r=e.scale,i=e.formatter;return r.ticks((t-1)*n+t).map((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!==0,value:e}})}({count:Math.min(1e3,n.ticks.count),minorCount:s,scale:r.copy(),formatter:a})}return t}function v1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach(i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]}),r}const x1={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},w1={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},S1={count:NaN};function k1(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function C1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=c1(),i={instance:null,invert:!1},o={data:t,resources:n},a=v1(e,x1,o);let s;function l(e){return nX(e)?NaN:r(e)}a.ticks=v1(e.ticks,w1,o),a.minorTicks=v1(e.minorTicks,S1,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=GK(!0,{},a,e.settings),e.scale=l,s=b1(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=C1(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return k1(i,l),i.instance(e)},l.normInvert=function(e){return k1(i,l),i.instance.invert(e)};const c=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map(e=>e.min()).filter(e=>!isNaN(e)),r=t.map(e=>e.max()).filter(e=>!isNaN(e));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter(e=>!isNaN(e));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]),u=c.mini,d=c.maxi;return l.domain([u,d]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const E1={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function M1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=v1(e,E1,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let t=e.scale;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}})}(t,n.trackBy)}}const c=o0();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=GK({datum:i[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const R1={depth:0};function _1(e,t,n){return e.ancestors().map(e=>t(GK({datum:e.data},n))).reverse().slice(1).toString()}const A1=e=>e.min(),P1=e=>e.max();function I1(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(A1).filter(tX);i=e.length?Math.min(...e):i}if(!r){const e=t.map(P1).filter(tX);o=e.length?Math.max(...e):o}}return[i,o]}const T1={domain:[],range:[],invert:!1,min:NaN,max:NaN};function D1(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=C1(e,t,n).clamp(!0).interpolate(H0),i=v1(e,T1,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;GK(!0,s,r);const l=ZK(I1(i,t?t.fields:[]),2),c=l[0],u=l[1],d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[],p=a?i.range:f;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),c,u)),s}const O1={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function N1(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const q1={domain:[],range:[]};const L1={domain:[],range:[],unknown:void 0},j1={domain:[],range:[],override:!1};const z1=hJ();function F1(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach(e=>{r.extract.push({field:e})}));const i=e0(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map(e=>"dimension"===e.type()?"band":"linear");return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}z1("linear",C1),z1("band",M1),z1("h-band",function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=v1(t,E1,i);o.ticks=v1(t.ticks,R1,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=M1(o);const s=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter(e=>{if(e.depth>0){const t=_1(e,i,n),d=e.leaves()||[e],f=i(GK({datum:e.data},n)),p=o(GK({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:f,label:p,leftEdge:_1(d[0],i,n),rightEdge:_1(d[Math.max(d.length-1,0)],i,n),node:e};h?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(p)),(r<=0&&!h||e.depth===r)&&c.push(m),l[t]=m}});const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),l=s.values,c=s.labels,u=s.items,d=s.ticks,f=function(e){const t=String(e),n=u[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};GK(!0,f,a),f.bandwidth=function(e){const t=u[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=f(t.leftEdge),r=f(t.rightEdge);return Math.abs(e-r)+n}return n},f.step=function(e){const t=u[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},f.data=()=>n,f.datum=e=>{const t=u[String(e)];return t?t.node.data:null},f.copy=()=>e(t,n,r),f.labels=()=>c,f.ticks=()=>d.map(e=>{const t=f(e.key),n=f.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}});const p=a.pxScale;return f.pxScale=function(e){return a=p(e),f},f.domain(l),f}),z1("sequential-color",D1),z1("threshold-color",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=u1(),i=v1(e,O1,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return nX(e)?NaN:r(e)}Object.keys(r).forEach(e=>s[e]=r[e]);const l=ZK(I1(i,t.fields),2),c=l[0],u=l[1],d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[];let p=a?i.range:f,h=[];return h=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=c1().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(p,c,u):[c+(u-c)/2],p.length>h.length+1?h=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(p,c,u):p.length<h.length+1&&(p=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=D1().domain([n,r]).range(t);return[n,...N1(e),r].map(e=>i(e))}(h,p,c,u)),s.data=()=>t,s.range(i.invert?p.slice().reverse():p),s.domain(h),s}),z1("categorical-color",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=i0(),i={data:t,resources:n},o=v1(e,q1,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=GK({datum:l[e]},i),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(u),r}(e,t,n),i=n.theme,o=v1(e,L1,{data:t,resources:n});let a;if(o.explicit=v1(e.explicit,j1,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map((t,r)=>[e.indexOf(t),t,n[r]]).sort((e,t)=>e[0]-t[0]);r.forEach(t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])})}a.length=e.length}return r.range(a),r});var $1={};function B1(){B1.init.call(this)}$1.isObject=function(e){return"object"==typeof e&&null!==e},$1.isNumber=function(e){return"number"==typeof e},$1.isUndefined=function(e){return void 0===e},$1.isFunction=function(e){return"function"==typeof e};var H1=B1;B1.EventEmitter=B1,B1.prototype._events=void 0,B1.prototype._maxListeners=void 0,B1.defaultMaxListeners=10,B1.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},B1.prototype.setMaxListeners=function(e){if(!$1.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},B1.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],$1.isUndefined(n))return!1;if($1.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if($1.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},B1.prototype.addListener=function(e,t){var n;if(!$1.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,$1.isFunction(t.listener)?t.listener:t),this._events[e]?$1.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,$1.isObject(this._events[e])&&!this._events[e].warned)&&((n=$1.isUndefined(this._maxListeners)?B1.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,$1.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),$1.isFunction(console.trace)&&console.trace()));return this},B1.prototype.on=B1.prototype.addListener,B1.prototype.once=function(e,t){if(!$1.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},B1.prototype.removeListener=function(e,t){var n,r,i,o;if(!$1.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||$1.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if($1.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},B1.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],$1.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},B1.prototype.listeners=function(e){return this._events&&this._events[e]?$1.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},B1.listenerCount=function(e,t){return e._events&&e._events[t]?$1.isFunction(e._events[t])?1:e._events[t].length:0};var V1={mixin:e=>(Object.keys(H1.prototype).forEach(t=>{e[t]=H1.prototype[t]}),H1.init(e),e)};function W1(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;var s=o.min;e=void 0===s?e:s;var l=o.max;t=void 0===l?t:l,void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const c=Math.max(e,Math.min(t-r,n));n!==c&&(n=c,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return V1.mixin(i),i}function U1(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||W1();return o.update({min:n,max:r,viewSize:i}),o}function G1(e,t){return e<=t}function Y1(e,t){return e<t}function K1(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function X1(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=n.includeMax,i=void 0===r||r,o=n.includeMin;e=i?G1:Y1,t=void 0===o||o?G1:Y1},i.add=e=>{let t=e.min,n=e.max;const i=K1(r,t),o=K1(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let t=e.min,n=e.max;const i=K1(r,t),o=K1(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let t=e.min,n=e.max;const i=K1(r,t,!0),o=K1(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function J1(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const Q1={key:void 0,includeMin:!0,includeMax:!0};function Z1(e){let t=e.items,n=e.collection,r=e.vc;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function e2(e){let t=e.items,n=e.collection;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function t2(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function n2(e){let t=e.key,n=e.collection,r=e.obj,i=e.fn,o=e.value;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function r2(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function i2(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?GK({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce((e,t)=>t(e),r):r}function o2(e){return e.replace(/(-[a-z])/g,e=>e.toUpperCase().replace("-",""))}function a2(e){return e.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase()))}function s2(e,t,n){let r=n.ranges,i=n.interceptors,o=n.rc,a=n.aliases,s=n.rangeConfig;const l=i2(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach(e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}}),c}function l2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vc,n=void 0===t?J1:t,r=e.rc,i=void 0===r?X1:r,o=!1,a={},s={},l={},c={sources:{},default:GK({},Q1)};const u={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},d=()=>{const e={values:{},ranges:{}};return Object.keys(s).forEach(t=>{e.values[t]=s[t].values()}),Object.keys(a).forEach(t=>{e.ranges[t]=a[t].ranges()}),e},f={ls:[],clear(){this.ls.forEach(e=>e.clear())},start(){this.ls.forEach(e=>e.start())},end(){this.ls.forEach(e=>e.end())},update(){const e=d();this.ls.forEach(t=>t._state(e))},updateValues(){const e=d();this.ls.forEach(t=>t._state({values:e.values}))},updateRanges(){const e=d();this.ls.forEach(t=>t._state({ranges:e.ranges}))}},p={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(c={sources:{},default:GK({},Q1)},e.ranges.forEach(e=>{const t={};Object.keys(Q1).filter(e=>"key"!==e).forEach(n=>{t[n]=void 0!==e[n]?e[n]:Q1[n]}),void 0!==e.key?c.sources[e.key]=t:c.default=t}),Object.keys(a).forEach(e=>a[e].configure(c.sources[e]||c.default)),p.emit("update",[],[]))},link:e=>{if(p===e)throw new Error("Can't link to self");f.ls.push(e),e._state(d())},_state:e=>{if(!e)return d();if(e.values){const t=[];Object.keys(e.values).forEach(n=>{s[n]&&e.values[n].join(";")===s[n].toString()||t.push({key:n,values:e.values[n]})}),Object.keys(s).forEach(n=>{e.values[n]||t.push({key:n,values:[]})}),t.length&&p.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach(n=>{a[n]&&e.ranges[n].join(";")===a[n].toString()||t.push({key:n,ranges:e.ranges[n]})}),Object.keys(a).forEach(n=>{e.ranges[n]||t.push({key:n,ranges:[]})}),t.length&&p.setRanges(t)}},start:function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];p.emit("start",...t),f.start()}},end:function(){if(o){o=!1,a={},s={};for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];p.emit("end",...t),f.end()}},isActive:()=>o,clear:()=>{const e=p.brushes().filter(e=>"value"===e.type&&e.brush.values().length).map(e=>({id:e.id,values:e.brush.values()})),t=Object.keys(a).length>0||e.length;a={},s={},t&&(p.emit("update",[],e),f.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(a).map(e=>({type:"range",id:e,brush:a[e]}))),e=e.concat(Object.keys(s).map(e=>({type:"value",id:e,brush:s[e]}))),e},addValue:(e,t)=>{p.addValues([{key:e,value:t}])},addValues:e=>{const t=i2(u.addValues,e,l),r=Z1({vc:n,collection:s,items:t});p.emit("add-values",t),r.length&&(o||(o=!0,p.emit("start")),p.emit("update",r,[]),f.updateValues())}};return p.setValues=e=>{const t=i2(u.setValues,e,l),r=function(e){let t=e.items,n=e.vCollection,r=e.vc;const i={},o=t2(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||n2({key:a,value:e,collection:n,obj:i,fn:r})},f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)a=f[e],o[a].forEach(d);return l=r2(c,i),s=r2(i,c),[s,l]}({items:t,vCollection:s,vc:n});p.emit("set-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,p.emit("start")),p.emit("update",r[0],r[1]),f.updateValues())},p.removeValue=(e,t)=>{p.removeValues([{key:e,value:t}])},p.removeValues=e=>{const t=i2(u.removeValues,e,l),n=e2({collection:s,items:t});p.emit("remove-values",t),n.length&&(p.emit("update",[],n),f.updateValues())},p.addAndRemoveValues=(e,t)=>{const r=i2(u.addValues,e,l),i=i2(u.removeValues,t,l),a=Z1({vc:n,collection:s,items:r}),c=e2({collection:s,items:i});p.emit("add-values",r),p.emit("remove-values",i),(a.length||c.length)&&(o||(o=!0,p.emit("start")),p.emit("update",a,c),f.updateValues())},p.toggleValue=(e,t)=>{p.toggleValues([{key:e,value:t}])},p.toggleValues=e=>{const t=i2(u.toggleValues,e,l),r=function(e){let t=e.items,n=e.values,r=e.vc;const i={},o={},a=[],s=[],l=t2(t);let c,u,d;const f=Object.keys(l);for(let e=0,t=f.length;e<t;e++){c=f[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):n2({key:c,value:u,collection:n,obj:i,fn:r})}const p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)c=p[e],a.push({id:c,values:i[c]});const h=Object.keys(o);for(let e=0,t=h.length;e<t;e++)c=h[e],s.push({id:c,values:o[c]});return[a,s]}({items:t,values:s,vc:n});p.emit("toggle-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,p.emit("start")),p.emit("update",r[0],r[1]),f.updateValues())},p.containsValue=(e,t)=>{let n=l[e]||e;return!!s[n]&&s[n].contains(t)},p.addRange=(e,t)=>{p.addRanges([{key:e,range:t}])},p.addRanges=e=>{s2(e,"add",{ranges:a,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),f.updateRanges())},p.removeRange=(e,t)=>{p.removeRanges([{key:e,range:t}])},p.removeRanges=e=>{s2(e,"remove",{ranges:a,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),f.updateRanges())},p.setRange=(e,t)=>{p.setRanges([{key:e,range:t}])},p.setRanges=e=>{s2(e,"set",{ranges:a,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),f.updateRanges())},p.toggleRange=(e,t)=>{p.toggleRanges([{key:e,range:t}])},p.toggleRanges=e=>{s2(e,"toggle",{ranges:a,rc:i,interceptors:u,aliases:l,rangeConfig:c})&&(o||(o=!0,p.emit("start")),p.emit("update",[],[]),f.updateRanges())},p.containsRangeValue=(e,t)=>{let n=l[e]||e;return!!a[n]&&a[n].containsValue(t)},p.containsRange=(e,t)=>{let n=l[e]||e;return!!a[n]&&a[n].containsRange(t)},p.containsMappedData=(e,t,n)=>{let r=[];const i=Object.keys(e);let o,c,u,d;for(let t=0,n=i.length;t<n;t++){if(o=i[t],"value"===o)c=e,r[t]={key:"",i:t,bool:!1};else{if("source"===o)continue;c=e[o],r[t]={key:o,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in l&&(u=l[u]),d=c.value,a[u]?r[t].bool=Array.isArray(d)?a[u].containsRange({min:d[0],max:d[1]}):a[u].containsValue(d):s[u]&&s[u].contains(d)&&(r[t].bool=!0))}return t?(r=r.filter(e=>-1!==t.indexOf(e.key)),"and"===n?!!r.length&&!r.some(e=>!1===e.bool):"xor"===n?!!r.length&&r.some(e=>e.bool)&&r.some(e=>!1===e.bool):r.some(e=>e.bool)):r.some(e=>e.bool)},p.intercept=(e,t)=>{const n=o2(e);u[n]&&u[n].push(t)},p.removeInterceptor=(e,t)=>{const n=o2(e);if(!u[n])return;const r=u[n].indexOf(t);-1!==r&&u[n].splice(r,1)},p.removeAllInterceptors=e=>{const t=[];if(e){const n=o2(e);u[n]&&u[n].length&&t.push({name:e,handlers:u[n]})}else Object.keys(u).forEach(e=>{u[e].length&&t.push({name:a2(e),handlers:u[e]})});t.forEach(e=>{e.handlers.slice().forEach(t=>p.removeInterceptor(e.name,t))})},p.addKeyAlias=(e,t)=>{l[e]=t},p.removeKeyAlias=e=>{delete l[e]},V1.mixin(p),p}function c2(e){return e*e*e}function u2(e){return--e*e*e+1}function d2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}hJ();const f2=["stroke","fill","color","backgroundColor","thumbColor"];function p2(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=h2(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function h2(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?G0:"string"===r?(i=C0(t))&&f2.includes(n)?(t=i,H0):J0:t instanceof C0?H0:t instanceof Date?U0:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?V0:Array.isArray(t)?p2:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?m2:G0)(e,t)}function m2(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=h2(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function g2(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const y2={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},b2=/^\$/;function v2(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function x2(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function w2(e,t){return e.pxScale?e.pxScale(t):e}const S2={normalizeSettings:function(e,t,n){const r=GK({},e),i=GK({},t);return Object.keys(r).forEach(e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(v2(o)){let n=t[e];"string"==typeof n&&b2.test(n)&&(n=y2[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))}),Object.keys(t).forEach(e=>{if(e in r)return;const n=t[e];"string"===typeof n&&b2.test(n)?i[e]=y2[n]:i[e]=n}),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,f=u&&o in s,p=d?s[c.ref]:f?s[o]:a;v2(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&p?(r[o]=c.scale(p.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&p?r[o]=p.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:x2};function k2(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((e,t)=>Array.isArray(t.children)?(e.push(...k2(t.children)),e):(e.push(t),e),[])}function C2(e,t){let n=t.context,r=t.data,i=t.style,o=t.filter,a=t.mode;const s=e.chart.brush(n),l=r,c=i.active||{},u=i.inactive||{},d=[];Object.keys(c).forEach(e=>{d.push(e)}),Object.keys(u).forEach(e=>{-1===d.indexOf(e)&&d.push(e)});const f=[];let p=!1;const h=()=>{let t=k2(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=()=>{const e=h(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach(t=>{e[r].__style[t]=e[r][t]}));const t=s.containsMappedData(n,i,a),o=f.indexOf(e[r]);let l=!1;t&&-1===o?(f.push(e[r]),l=!0):t||-1===o||(f.splice(o,1),l=!0),e[r].needToUpdate=l||p,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=GK({},e[i],e[i].__style),n=e[i].isActive;d.forEach(r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,f):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,f):u[r]:e[i].__style[r]}),r=!0}delete e[i].needToUpdate}return p=!1,r},g=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1}).suppressRender,n=h(),r=n.length;for(let e=0;e<r;e++)n[e].data&&(n[e].__style=n[e].__style||{},d.forEach(t=>{n[e].__style[t]=n[e][t],t in u&&(n[e][t]="function"==typeof u[t]?u[t].call(null,n[e]):u[t])}));p=!0,f.length=0,t||e.renderer.render(e.nodes)},y=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1}).suppressRender,n=h(),r=n.length;for(let e=0;e<r;e++)n[e].__style&&(Object.keys(n[e].__style).forEach(t=>{n[e][t]=n[e].__style[t]}),n[e].__style=void 0);f.length=0,t||e.renderer.render(e.nodes)},b=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{f.length=0,p=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",b)}}}function E2(e){let t=e.nodes,n=e.action,r=e.chart,i=e.trigger;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let t=e.dataPoints,n=e.action,r=e.chart,i=e.trigger;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach(e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}})}i.contexts.forEach(e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)})}({dataPoints:o,action:n,chart:r,trigger:i})}function M2(e){let t=e.collisions,n=e.t,r=e.config,i=e.action,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map(e=>e.node);return E2({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function R2(e,t,n){const r=n.element().getBoundingClientRect();let i=eX(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&eX(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!eX(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function _2(e,t,n){return e?"function"==typeof e?e(t):e:n}const A2={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function P2(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function I2(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function T2(e){return-e/180*Math.PI}function D2(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(T2(e))}function O2(e,t){return{x:e.x+t.x,y:e.y+t.y}}function N2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function q2(e,t){return{x:e.x*t,y:e.y*t}}function L2(e,t){return e.x-t.x}function j2(e,t){return e.y-t.y}function z2(e,t){return L2(e,t)**2+j2(e,t)**2}function F2(e,t){return Math.sqrt(z2(e,t))}function $2(e,t){return e.x*t.x+e.y*t.y}function B2(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=N2(e,n);return O2({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const H2={up:0,down:180,left:90,right:-90};function V2(e){let t=e.x,n=e.y,r=e.size;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const W2=hJ();W2.add("circle",function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}}),W2.add("diamond",function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:P2([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}}),W2.add("saltire",function(e){const t=T2(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=I2(e.x,e.y,o,i).map(e=>B2(e,t,s));return{type:"path",fill:"black",d:P2(l)}}),W2.add("square",function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}}),W2.add("triangle",function(e){const t=e.size,n={x:e.x,y:e.y},r=H2[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=T2(r);return s=s.map(e=>B2(e,l,n)),{type:"path",fill:"black",d:P2(s)}}),W2.add("line",function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:V2(e)}}),W2.add("star",function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=T2(i),c=T2(i+s/2),u=Math.sin(l),d=Math.cos(l),f=Math.sin(c),p=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+p*o,y:e.y+f*o})}return{type:"path",fill:"black",d:P2(n)}}),W2.add("n-polygon",function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=T2(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:P2(t)}}),W2.add("cross",function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:P2(I2(t,n,e.size,o))}}),W2.add("bar",function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=T2(90);o=o.map(n=>B2(n,e,t))}const a=aX(o);return a.type="rect",a.fill="black",a}),W2.add("rect",function(e){const t=e.x,n=e.y,r=e.size,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}}),W2.add("image",function(e){const t=e.x,n=e.y,r=e.imageSettings||{},i=r.width,o=r.height,a=r.imageSrc,s=r.position;return{type:"image",x:t,y:n,width:i,height:o,src:a,symbol:r.symbol,r:10,cx:0,cy:0,imageScalingFactor:r.imageScalingFactor,imagePosition:s}});const U2=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W2;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach(n=>{void 0!==A2[n]&&"transform"!==n&&(e[n]=t[n])})}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function G2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.dock,r=void 0===n?"center":n,i=e.displayOrder,o=void 0===i?0:i,a=e.prioOrder,s=void 0===a?0:a,l=e.preferredSize,c=void 0===l?0:l,u=e.minimumLayoutMode,d=e.show,f=void 0===d||d;r=r||"center";return{computePreferredSize(e){let n=e.inner,r=e.outer,i=e.children;return"function"==typeof c?c({inner:n,outer:r,children:i,dock:this.dock()},t):c},dock(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},displayOrder(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},prioOrder(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s},minimumLayoutMode(e){return void 0!==e?(u=e,this):"function"==typeof u?u(t):u},show(e){return void 0!==e?(f=e,this):"function"==typeof f?f(t):f}}}function Y2(e,t,n){const r=t.require,i=void 0===r?[]:r,o=t.mediator||{},a=n.settings,s=n.formatter,l=n.scale,c=n.data,u=n.renderer,d=n.chart,f=n.dockConfig,p=n.mediator,h=n.instance,m=n.rect,g=n.style,y=n.registries,b=n.resolver,v=n.update,x=n._DO_NOT_USE_getInfo,w=n.symbol,S=n.isVisible;e.emit=()=>{},S&&(e.isVisible=S),Object.defineProperty(e,"settings",{get:a}),Object.defineProperty(e,"data",{get:c}),Object.defineProperty(e,"formatter",{get:s}),Object.defineProperty(e,"scale",{get:l}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:g}),Object.defineProperty(e,"registries",{get:y}),m&&Object.defineProperty(e,"rect",{get:m}),x&&(e._DO_NOT_USE_getInfo=x),Object.keys(t).forEach(n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some(e=>e===r)||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])}),i.forEach(t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:u}):"chart"===t?Object.defineProperty(e,"chart",{get:d}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:f}):"instance"===t?Object.defineProperty(e,"instance",{get:h}):"update"===t&&v?Object.defineProperty(e,"update",{get:v}):"resolver"===t?Object.defineProperty(e,"resolver",{get:b}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:w})}),Object.keys(o).forEach(t=>{e.mediator.on(t,o[t].bind(e))})}function K2(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function X2(e,t,n){Object.keys(n.on||{}).forEach(r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)}),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function J2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.defaultSettings,r=void 0===n?{}:n,i=e._DO_NOT_USE_getInfo,o=void 0===i?()=>({}):i,a=t.chart,s=t.container,l=t.mediator,c=t.registries,u=t.theme,d=t.renderer,f=V1.mixin({});let p,h,m,g,y,b=t.settings||{},v=GK(!0,{},r,b),x=[],w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S2,n={};return{resolve:function(r){let i=r.data,o=r.settings,a=r.defaults,s=void 0===a?{}:a,l=r.scaled;const c=n.norm=t.normalizeSettings(o,s,e.chart),u={scale:e.chart.scale,formatter:e.chart.formatter};l&&Object.keys(l).forEach(e=>{c[e]&&t.updateScaleSize(c,e,l[e])});const d=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:u};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:u};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],d.push(o)}}return{settings:n.norm,items:d}}}}({chart:a}),S=!1;const k={nodes:[],chart:a,config:v.brush||{},renderer:null},C={tap:[],over:[]},E=[],M={},R=GK({},b);function _(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==b[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(M,...l):r&&(a=e[t])),o&&("function"==typeof b[t]?a=b[t].call(R,...l):r&&(a=b[t])),i||o||(a=n.call(M,...l)),a}}const A=_("preferredSize",()=>0,!0),P=_("resize",e=>e.inner),I=_("created"),T=_("beforeMount"),D=_("mounted"),O=_("beforeUnmount"),N=_("beforeUpdate"),q=_("updated"),L=_("beforeRender"),j=_("beforeDestroy"),z=_("destroyed"),F=e.render,$=()=>{v.brush&&(v.brush.consume||[]).forEach(e=>{e.context&&e.style&&E.push(C2(k,e))})},B=()=>{v.brush&&(v.brush.trigger||[]).forEach(e=>{"over"===e.on?C.over.push(e):C.tap.push(e)})};Object.defineProperty(k,"data",{get:()=>x});const H=v.renderer||e.renderer,V=H?d||c.renderer(H)():d||c.renderer()();"function"==typeof V.settings&&V.settings(v.rendererSettings),k.renderer=V;const W={resources:a.logger?{logger:a.logger()}:{}};let U=G2(K2(v,A,a.logger()),W);const G=e=>{e.key=v.key,e.element=V.element()},Y=()=>{};Y.dockConfig=()=>U,Y.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(b=e.settings,v=GK(!0,{},r,e.settings),U=G2(K2(v,A,a.logger()),W),k.config=v.brush||{}),v.scale&&(p=a.scale(v.scale)),v.data){const e=v.rendererSettings,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=e0(v.data,{dataset:a.dataset,collection:a.dataCollection},{logger:a.logger()},a.dataCollection);t?t.isFirst?(x=n,x.items&&(x.items=[...n.items])):x.items&&(x.items=[...x.items,...n.items||[]]):x=n}else x=p?p.data():[];"string"==typeof v.formatter||"object"==typeof v.formatter?h=a.formatter(v.formatter):p&&p.data().fields&&(h=p.data().fields[0].formatter()),y=u.style(v.style||{})},Y.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=P({inner:e,outer:t});g=n?V.size(n):V.size(e),R.rect=GK(!0,{computedPhysical:g.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),g=GK(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},g)},Y.getRect=()=>R.rect;const K=()=>{const e=V.renderArgs?V.renderArgs.slice(0):[],t=v.rendererSettings;let n=x;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return x.items&&r&&(n=QK(QK({},x),{},{items:x.items.slice(r.start,r.end)})),e.push({data:n}),e};let X,J,Q;function Z(e){const t=v.rendererSettings,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?k.nodes=[...e||[]]:k.nodes&&(k.nodes=[...k.nodes,...e||[]]):k.nodes=e}Y.beforeMount=T,Y.beforeRender=()=>{L({size:g})},Y.render=()=>{const e=F.call(M,...K());Z(e),V.render(e),X=e,J=R.rect.computed},Y.hide=()=>{Y.unmount(),V.size({x:0,y:0,width:0,height:0}),V.clear()},Y.beforeUpdate=()=>{N({settings:v,data:x})},Y.update=()=>{Q&&Q.stop();const e=v,t=e.rendererSettings,n=e.brush,r=e.animations;if("function"==typeof(null==t?void 0:t.transform)&&t.transform())return V.render(),void(X=null);const i=F.call(M,...K());Z(i),E.forEach(e=>e.cleanUp()),E.length=0,C.tap=[],C.over=[],n&&($(),B()),E.forEach(e=>{e.isActive()&&e.update()}),X&&r&&("function"==typeof r.enabled?r.enabled():r.enabled)?(r.compensateForLayoutChanges&&r.compensateForLayoutChanges({currentNodes:X,currentRect:R.rect.computed,previousRect:J}),Q=function(e,t,n,r){let i,o=e.old,a=e.current,s=t.renderer,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},f=[],p=null;const h=n.trackBy||g2,m={start(){let e={};if(o.forEach((t,n)=>{let r=h(t,n);e[r]=t}),a.forEach((t,n)=>{let r=h(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter(e=>!e.dummy),r=t.points.filter(e=>!e.dummy),i=r.map(e=>e.data.major.value),o=n.filter(e=>i.includes(e.data.major.value)).map(e=>e.data.major.value),a=n.filter(e=>o.includes(e.data.major.value)),s=r.filter(e=>o.includes(e.data.major.value));return{old:a,current:s}}(e[r],t);d.ips.push(m2(GK({},e[r],{points:n.old}),GK({},t,{points:n.current}))),l.push(GK({},e[r],{commonPoints:n.old}))}else d.ips.push(m2(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(m2(GK({},t,{r:.001,opacity:0}),t))}),Object.keys(e).forEach(t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(m2(e[t],GK({},e[t],{r:1e-4,opacity:0}))))}),f.push({name:"exiting",easing:c2,duration:200,tweens:u.ips,nodes:[...l]}),f.push({name:"updating",easing:d2,duration:400,tweens:d.ips,nodes:[]}),f.push({name:"entering",easing:u2,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,o=r.getValue("animations.updatingStageMeta"),a=o.isInit,s=o.shouldBeRemoved;!1===a?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",s&&0===i)}f.length&&(p=s.getScene(a),f[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=f[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,o=[],a=e.tweens.map(n=>n(e.easing(Math.min(1,t))));const l=n.adjustTweenedNodes;if(l&&l(a),o.push(...a),o.push(...e.nodes),s.render(o),t>=1){f.shift();const e=r.getValue("animations.updatingStageMeta"),t=e.isInit,n=e.shouldBeRemoved;f.length?"updating"===f[0].name&&n&&f.shift():(!0===t&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}i&&(i=window.requestAnimationFrame(m.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return p}};return m}({old:X,current:i},{renderer:V},r,a.storage),Q.start()):V.render(i),X=i,J=R.rect.computed,V.setKey&&"string"==typeof b.key&&V.setKey(b.key)},Y.updated=q,Y.destroy=()=>{Y.unmount(),j(m),V.destroy(),z(),m=null};const ee=e=>{k.nodes=e,E.forEach(e=>{e.isActive()&&e.update()}),V.render(e)};return Y2(M,e,{settings:()=>v,data:()=>x,scale:()=>p,formatter:()=>h,renderer:()=>V,chart:()=>a,dockConfig:()=>U,mediator:()=>l,instance:()=>R,rect:()=>R.rect,style:()=>y,update:()=>ee,registries:()=>c,resolver:()=>w,symbol:()=>U2(c.symbol)}),Y2(R,b,{settings:()=>v,data:()=>x,scale:()=>p,formatter:()=>h,renderer:()=>V,chart:()=>a,dockConfig:()=>U,mediator:()=>l,style:()=>y,_DO_NOT_USE_getInfo:o.bind(M),isVisible:()=>S}),Y.getBrushedShapes=function(e,t,n){const r=[];if(v.brush&&v.brush.consume){const i=a.brush(e),o=V.findShapes("*");v.brush.consume.filter(t=>t.context===e).forEach(e=>{for(let a=0;a<o.length;a++){const s=o[a];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(G(s),r.push(s),o.splice(a,1),a--)}})}return r},Y.findShapes=e=>{var t;const n=(null!==(t=Q)&&void 0!==t&&t.inProgress()?Q.targetScene:V).findShapes(e);for(let e=0,t=n.length;e<t;e++)G(n[e]);return n},Y.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=V.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map(e=>e.node);for(let e=0,t=r.length;e<t;e++)G(r[e]);return r},Y.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];E2({nodes:e,action:t.action||"toggle",trigger:t,chart:a,data:k.data})},Y.mount=()=>{m=V.element&&V.element()?m:V.appendTo(s),V.setKey&&"string"==typeof b.key&&V.setKey(b.key),v.brush&&($(),B()),X2(R,f,b),X2(M,f,e),S=!0},Y.mounted=()=>D(m),Y.unmount=()=>{[R,M].forEach(e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach(e=>{let n=e.event,r=e.listener;t.removeListener(n,r)}),e.eventListeners.length=0),e.emit=()=>{}}(e,f)}),C.tap=[],C.over=[],E.forEach(e=>{e.cleanUp()}),E.length=0,O(),S=!1},Y.onBrushTap=e=>{C.tap.forEach(t=>{(function(e){let t=e.e,n=e.t,r=e.config;return M2({collisions:R2(t,n,r.renderer),t:n,config:r,action:_2(n.action,t,"toggle")})})({e:e,t:t,config:k})&&"stop"===t.globalPropagation&&a.toggleBrushing(!0)})},Y.onBrushOver=e=>{C.over.forEach(t=>{(function(e){let t=e.e,n=e.t,r=e.config;return M2({collisions:R2(t,n,r.renderer),t:n,config:r,action:_2(n.action,t,"set")})})({e:e,t:t,config:k})&&"stop"===t.globalPropagation&&a.toggleBrushing(!0)})},Y.def=M,Y.ctx=R,Y.renderer=()=>V,Y.set({settings:b}),I(),Y}function Q2(e){const t=GK(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function Z2(e,t,n){const r=O2(function(e,t){const n=$2(e,t)/$2(t,t)||1;return{x:t.x*n,y:t.y*n}}(N2(n,e),N2(t,e)),e);return r}function e5(e,t,n){return F2(e,n)+F2(t,n)-F2(e,t)<1e-12}function t5(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function n5(e){return e.x1===e.x2&&e.y1===e.y2}function r5(e){return e.width<=0||e.height<=0}function i5(e){return e.r<=0}function o5(e){return e.edges.length<=2}function a5(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=p5(e,sX(t.edges[r])),!0===n)return!0;return!1}function s5(e,t){let n=!1;const r=t.numPolygons,i=t.polygons;for(let t=0;t<r;t++){if(n=S5(e,i[t]),!0===n)return!0}return!1}function l5(e,t){if(i5(e))return!1;return z2({x:e.cx,y:e.cy},t)<=e.r**2}function c5(e,t){if(r5(t)||i5(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function u5(e,t){if(i5(e)||n5(t))return!1;const n=ZK(iX(t),2),r=n[0],i=n[1];if(l5(e,r)||l5(e,i))return!0;const o={x:e.cx,y:e.cy},a=Z2(r,i,o);return z2(a,o)<=e.r**2&&e5(r,i,a)}function d5(e,t){if(o5(t)||i5(e))return!1;if(f5(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(u5(e,sX(t.edges[r])))return!0}return!1}function f5(e,t){if(o5(e)||!y5(e.boundingRect(),t))return!1;const n=t.x,r=t.y,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function p5(e,t){if(o5(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(v5(t,sX(e.edges[n])))return!0}const n=ZK(iX(t),2),r=n[0],i=n[1];return f5(e,r)||f5(e,i)}function h5(e,t){if(o5(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(b5(t,sX(e.edges[n])))return!0}const n=ZK(oX(t),4),r=n[0],i=n[1],o=n[2],a=n[3];return f5(e,r)||f5(e,i)||f5(e,o)||f5(e,a)}function m5(e,t){return!r5(e)&&!r5(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function g5(e,t){if(r5(e)||r5(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every(t=>y5(e,t))}function y5(e,t){return!r5(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function b5(e,t){if(n5(t)||r5(e))return!1;const n=ZK(iX(t),2),r=n[0],i=n[1];if(y5(e,r)||y5(e,i))return!0;const o=oX(e);let a=o.length;for(let e=0;e<a;e++){if(v5(sX([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function v5(e,t){const n=ZK(iX(e),2),r=n[0],i=n[1],o=ZK(iX(t),2),a=o[0],s=o[1],l=L2(i,r),c=j2(i,r),u=L2(s,a),d=j2(s,a),f=L2(r,a),p=j2(r,a);let h=d*l-u*c;const m=u*p-d*f,g=l*p-c*f;let y,b;if(0===l&&0===c)return!1;if(0===u&&0===d)return!1;if(0===h){if(0===m&&0===g){if(0===l){if(0===c)return r.x===i.x&&r.y===i.y;y=j2(a,r)/c,b=j2(s,r)/c}else y=(a.x-r.x)/l,b=(s.x-r.x)/l;return!(y<0&&b<0||y>1&&b>1)}return!1}const v=m/h;return h=g/h,v>=0&&v<=1&&h>=0&&h<=1}function x5(e,t){if(n5(e))return!1;const n=ZK(iX(e),2);return e5(n[0],n[1],t)}function w5(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!m5(n,r)&&(g5(n,r)?a5(e,t):a5(t,e))}function S5(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!m5(n,r)&&(g5(r,n)?function(e,t){let n=!1;const r=e.numPolygons,i=e.polygons;for(let e=0;e<r;e++)if(n=w5(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=E5(e,sX(t.edges[r])),!0===n)return!0;return!1}(e,t))}function k5(e,t){if(i5(e))return!1;if(C5(t,{x:e.cx,y:e.cy}))return!0;const n=t.numPolygons,r=t.polygons;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(u5(e,sX(n.edges[t])))return!0}}return!1}function C5(e,t){if(!y5(e.boundingRect(),t))return!1;const n=t.x,r=t.y,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function E5(e,t){const n=ZK(iX(t),2),r=n[0],i=n[1];if(C5(e,r)||C5(e,i))return!0;const o=e.numPolygons,a=e.polygons;for(let e=0;e<o;e++){const n=a[e];for(let e=0,r=n.edges.length;e<r;e++){if(v5(t,sX(n.edges[e])))return!0}}return!1}function M5(e,t){const n=ZK(oX(t),4),r=n[0],i=n[1],o=n[2],a=n[3];if(C5(e,r)||C5(e,i)||C5(e,o)||C5(e,a))return!0;const s=e.numPolygons,l=e.polygons;for(let e=0;e<s;e++){const n=l[e];for(let e=0,r=n.edges.length;e<r;e++){if(b5(t,sX(n.edges[e])))return!0}}return!1}const R5=/^\$/,_5="@extend";function A5(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function P5(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&A5(e),R5.test(r)?(n.push(e),P5(r,t,n)):r}let r=e;const i=GK(!0,{},t,e),o={};if(e[_5]){const o=e[_5];-1!==n.indexOf(o)&&A5(o);let a=n.slice();a.push(o),r=GK(!0,{},P5(i[o],t,a),e)}return Object.keys(r).forEach(e=>{let t=n.slice();if(e===_5||R5.test(e))return;o[e]=r[e];let a=o[e];R5.test(a)&&a in i?(-1!==n.indexOf(a)&&A5(a),t.push(a),a=i[a],"object"==typeof a||R5.test(a)&&a in i?o[e]=P5(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=P5(a,i,t))}),o}function I5(e,t){return P5(e,t,[])}function T5(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach(e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map(e=>e?e.length:0)}})},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>I5(e,n),setStyle:t=>{n=GK({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function D5(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function O5(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return GK(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function N5(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function q5(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function L5(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function j5(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function z5(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function F5(e,t,n,r,i){const o=GK({},t),a=GK({},n);L5(o,r),j5(a,r),z5(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(L5(t,r),j5(n,r),!0)}function $5(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function B5(e){return aX([].concat(...e.map(oX)))}function H5(e){let t=e.visible,n=e.layoutRect,r=e.reducedRect,i=e.containerRect,o=e.translation;const a=N5(r.x,r.y,r.width,r.height),s=N5(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort((e,t)=>e.config.displayOrder()-t.config.displayOrder());return t.sort((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n}).forEach(e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map(e=>l[e]).filter(e=>!!e);n.length>0&&(t=B5(n.map(e=>e.outerRect)),c=B5(n.map(e=>e.r)))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=$5(c),t.edgeBleed=e.edgeBleed,t.computed=$5(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0}),u}function V5(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function W5(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function U5(e){let t=O5(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const r=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),D5(r),D5(n),{logicalContainerRect:r,containerRect:n}}(e,t),i=r.logicalContainerRect,o=r.containerRect,a=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];W5(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map(e=>e.replace(/^\s*@/,"")):[];V5(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,i),s=ZK(a,2),l=s[0],c=s[1],u=function(e){let t=e.layoutRect,n=e.visible,r=e.hidden,i=e.settings;const o=N5(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort((e,t)=>e.config.prioOrder()-t.config.prioOrder());for(let e=0;e<s.length;++e){const n=s[e];q5(n,o,t),F5(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every(e=>t.some(t=>t.key===e));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter(e=>-1!==s.indexOf(e));return n.length=0,n.push(...l),z5(t,o,a),o}({layoutRect:i,visible:l,hidden:c,settings:t}),d=H5({visible:l,layoutRect:i,reducedRect:u,containerRect:o,translation:{x:e.x,y:e.y}});return c.forEach(e=>{e.comp.visible=!1;const t=N5();e.comp.resize(t,t)}),{visible:l.map(e=>e.comp),hidden:c.map(e=>e.comp),ordered:d.map(e=>e.comp)}},n.settings=function(e){t=O5(e)},n}const G5=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},Y5=e=>null==e?void 0:e.map(e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(QK(QK({},n),{},{children:Y5(e.children)}))}}),K5=(e,t)=>({visible:[],hidden:t,ordered:[]}),X5=e=>(t,n)=>{var r;const i=n.map((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(QK(QK({},t),{},{children:Y5(e.children)}))}}),o=e=>n[e.index],a=null!==(r=e(t,i))&&void 0!==r?r:{},s=a.visible,l=void 0===s?i:s,c=a.hidden,u=void 0===c?[]:c,d=a.ordered,f=void 0===d?l:d;return{visible:l.map(o),hidden:u.map(o),ordered:f.map(o)}},J5=e=>"function"==typeof e?X5(e):(e=>{const t=U5(e);return X5((e,n)=>t.layout(e,n))})(e);function Q5(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=lX(e),a=GK(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function Z5(e,t){const n=[];let r=0;t.forEach(e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)}),t.forEach((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach(t=>{e.insertBefore(t,r)})):(o&&o.forEach(t=>{e.appendChild(t,r)}),e.appendChild(r))})(e,t,n[r]))}function e3(e,t){let n=e.element,r=e.data,i=void 0===r?[]:r,o=e.settings,a=void 0===o?{}:o,s=e.on,l=void 0===s?{}:s;const c=t.registries,u=t.logger,d=T5(t.style,t.palettes),f=[],p=GK({},e),h=function(){const e={};return V1.mixin(e),e}();let m=[],g=null,y=null,b=null,v=[],x=()=>{},w=()=>{};const S={};let k=!1;const C=function(e){let t=e.createComponent;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map(e=>o(e)).filter(e=>!!e))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find(e=>r.hasKey&&r.key===e.key);i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let t=e.compList,n=e.data,r=e.excludeFromUpdate,i=e.formatters,a=e.scales;return e.settingsList.map(e=>{const s=G5(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)}).filter(e=>!!e)},c=e=>{let t=e.components,n=e.hidden,r=e.layoutFn,i=e.ordered,o=e.rect,a=e.visible;const s=r(o,t),l=s.visible,u=s.hidden,d=s.ordered;a.push(...l),n.push(...u),i.push(...d),l.forEach(e=>{if(e.children){var t,r;const o=J5(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}}),u.forEach(e=>{e.children&&c({components:e.children,hidden:n,layoutFn:K5,ordered:i,rect:null,visible:a})})};return n.destroy=()=>{r.forEach(e=>e.instance.destroy()),r=[],i=[]},n.findComponentByKey=e=>G5(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let t=e.layoutSettings,n=e.rect;const r=[],o=[],a=[],s=J5(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let t=e.components;i=t.map(e=>o(e)).filter(e=>!!e)},n.update=e=>{let t=e.components,n=e.data,r=e.excludeFromUpdate,o=e.formatters,a=e.scales;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!c.component.has(e.type))return u.warn("Unknown component: ".concat(e.type)),!1;return{instance:J2(c.component(e.type),{settings:e,chart:p,mediator:h,registries:c,theme:d,container:n}),settings:GK(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function E(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(p,...a):n.call(p,...a),i}}const M=()=>{let e;a.dockLayout?(u.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=a.dockLayout):e=a.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const t=e.getBoundingClientRect();return{x:0,y:0,width:t.width,height:t.height}}return{x:0,y:0,width:0,height:0}}(n);return C.layout({layoutSettings:e,rect:t})},R=E("created"),_=E("beforeMount"),A=E("mounted"),P=E("beforeUpdate"),I=E("updated"),T=E("beforeRender"),D=E("beforeDestroy"),O=E("destroyed"),N=function(e,t){let n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).partialData;const r=t.formatters,i=void 0===r?{}:r,o=t.scales,a=void 0===o?{}:o,s=t.scroll,l=void 0===s?{}:s;x=function(e,t){let n=t.types,r=t.logger;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}}),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:u,types:c.data}),n||Object.keys(S).forEach(e=>S[e].clear()),t.palettes&&d.setPalettes(t.palettes),t.style&&d.setStyle(t.style),w=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e0;const i={};return(e||[]).forEach(e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)}),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=GK(r,{fields:e}))}return r}}(t.collections,{dataset:x},{logger:u});const f={theme:d,logger:u};g=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:F1;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(a,{dataset:x,collection:w},QK(QK({},f),{},{scale:c.scale})),y=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t0;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:x,collection:w},QK(QK({},f),{},{formatter:c.formatter})),b=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=U1(e[r],t?t[r]:null));return n}(l,b)};function q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter(e=>!!e.key).map(e=>e.key);v.forEach(e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()}),v=e.map(e=>{const r=e.key&&t[e.key]?t[e.key]:c.interaction(e.type)(p,h,n);return r.set(e),r})}const L=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return m.forEach(e=>{const t=e.instance.getRect();y5(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)}),a},j=()=>{if(f.length||!n)return;Object.keys(l).forEach(e=>{const t=l[e].bind(p);n.addEventListener(e,t),f.push({key:e,listener:t})});const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=L(e)},r=t=>{const n=e.comps||L(t);if(!n.every(e=>e.instance.def.disableTriggers)&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=eX(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),k){k=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=L(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),k){k=!1;break}}}}),i.forEach(e=>{n.addEventListener(e.key,e.listener),f.push(e)})},z=()=>{f.forEach(e=>{let t=e.key,r=e.listener;return n.removeEventListener(t,r)}),f.length=0},F=()=>{n.innerHTML="",(()=>{const e=a.components,t=void 0===e?[]:e;T(),N(i,a),C.set({components:t});const r=M(),o=r.visible,s=r.hidden,l=r.ordered;m=o,s.forEach(e=>{e.instance.hide(),e.visible=!1}),o.forEach(e=>e.instance.beforeMount()),o.forEach(e=>e.instance.mount()),o.forEach(e=>e.instance.beforeRender()),o.forEach(e=>e.instance.render()),o.forEach(e=>e.instance.mounted()),o.forEach(e=>{e.visible=!0}),Z5(n,l)})(),j(),q(a.interactions)};return p.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.excludeFromUpdate,n=void 0===t?[]:t;e.data&&(i=e.data),e.settings&&(a=e.settings,q(e.settings.interactions)),P(),N(i,a);const r=a,o=r.formatters,s=r.scales,l=r.components,c=void 0===l?[]:l;C.update({components:c,data:i,excludeFromUpdate:n,formatters:o,scales:s}),C.forEach(e=>{e.updateWith&&e.instance.set(e.updateWith)}),C.forEach(e=>{e.updateWith&&e.instance.beforeUpdate()}),M()},p.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.partialData,r=e.excludeFromUpdate,o=void 0===r?[]:r;let s;e.data&&(i=e.data),e.settings&&(a=e.settings,q(e.settings.interactions)),P(),N(i,a,{partialData:t});const l=a,c=l.formatters,u=l.scales,d=l.components,f=void 0===d?[]:d;C.update({components:f,data:i,excludeFromUpdate:o,formatters:c,scales:u}),C.forEach(e=>{e.updateWith&&e.instance.set(e.updateWith)}),C.forEach(e=>{e.updateWith&&e.instance.beforeUpdate()});const p=[],h=[];let g;if(t)C.forEach(e=>{(e.updateWith||e.applyTransform)&&e.visible&&p.push(e)}),g=p;else{const e=M(),t=e.visible,n=e.hidden,r=e.ordered;m=t,g=t,s=r,t.forEach(e=>{e.updateWith&&e.visible?p.push(e):h.push(e)}),n.forEach(e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1})}h.forEach(e=>e.instance.beforeMount()),h.forEach(e=>e.instance.mount()),g.forEach(e=>e.instance.beforeRender()),g.forEach(e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()}),t||Z5(n,s),h.forEach(e=>e.instance.mounted()),p.forEach(e=>e.instance.updated()),m.forEach(e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1}),I()},p.destroy=()=>{D(),C.destroy(),z(),q(),delete p.update,delete p.destroy,O()},p.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return m.filter(e=>null==r||e.key===r).forEach(r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]}),i},p.findShapes=e=>{let t=[];return m.forEach(n=>{const r=n.instance.findShapes(e);t=[...t,...r]}),t},p.componentsFromPoint=e=>L(e).map(e=>e.instance.ctx),p.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=m;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map(e=>e.key);o=m.filter(t=>-1!==e.indexOf(t.key)).map(n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]}))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=Q5(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},p.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;m.filter(e=>r===e.key).forEach(r=>{let i=e.filter(e=>e.key===r.key);r.instance.brushFromShapes(i,t.components[n])})}},p.scroll=function(){return function(e,t){return t[e]||(t[e]=W1()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",b)},p.dataset=e=>x(e),p.dataCollection=e=>w(e),p.scales=function(){return g.all()},p.formatters=function(){return y.all()},p.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return S[e]||(S[e]=l2()),S[e]},p.scale=function(e){return g.get(e)},p.formatter=function(e){return y.get(e)},p.toggleBrushing=function(e){k=void 0!==e?e:!k},p.component=e=>{const t=C.findComponentByKey(e);return null==t?void 0:t.instance.ctx},p.logger=()=>u,p.theme=()=>d,p.storage=Q2({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(p,"interactions",{get:()=>({instances:v,on(){j(),v.forEach(e=>e.on())},off(){z(),v.forEach(e=>e.off())}})}),R(),n&&(_(),F(),A(n),p.element=n),p}const t3=e=>{let t=hJ(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var n3=hJ();function r3(e,t,n){let r=n.key;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const i3=e=>e.filter(e=>"number"==typeof e&&!isNaN(e));const o3=e=>{let t=e.key,n=e.data,r=e.cache,i=e.config;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let t=e.data,n=e.config;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map(e=>e.split(a))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,n=e.source,r=e.data,i=e.cache,o=e.config,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map((e,t)=>t):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map(e=>({key:e,title:e})),Array.isArray(r[0])?c=u.map(()=>[]):(c={},u.forEach(e=>{c[e.key]=[]}));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=i3(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(FZ(GK({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:r,source:t,config:i})};function a3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.data,r=e.config;const i={fields:[]},o={key:()=>t,raw:()=>n,field:e=>function(e,t){let n=t.cache;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:i}),fields:()=>i.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach(e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const o=WZ(e,t),a=o.props,s=o.main,l=Object.keys(a),c=!!e.trackBy,u=typeof e.trackBy,d={},f=[],p=n.items(),h=[];for(let t=0;t<p.length;t++){const n=p[t];if(s.filter&&!s.filter(n))continue;const r=r3(s,n,{key:i});l.forEach(e=>{const o=a[e];let s=o.field?o.field.items()[t]:n;r[e]=r3(o,s,{key:i})}),c&&YZ({cfg:e,itemData:n,obj:r,target:f,tracker:d,trackType:u}),h.push(r)}r=c?[...r,...GZ(f,{main:s,propsArr:l,props:a})]:[...r,...h]}}),r}(e,o),hierarchy:()=>null};return o3({key:t,data:n,config:r,cache:i}),o}a3.util={normalizeConfig:WZ,collect:GZ,track:YZ};const s3=hJ();s3.default("matrix"),s3("matrix",a3),s3("default",a3);const l3=hJ();function c3(e,t,n){return Math.max(e,Math.min(t,n))}function u3(e){let t=e.item,n=e.value,r=e.boxCenter,i=e.rendWidth,o=e.rendHeight,a="x",s="y",l=i,c=o,u=n<.5?90:-90;return e.flipXY&&(a="y",s="x",l=o,c=i,u=n<.5?180:0),(0,e.symbol)(GK({},t.oob,{[a]:r*l,[s]:Math.max(t.oob.size/2,Math.min(n*c,c-t.oob.size/2)),startAngle:u}))}function d3(e){let t=e.item,n=e.boxWidth,r=e.boxPadding,i=e.rendWidth,o=e.rendHeight,a="x",s="y",l="width",c="height",u=i,d=o;e.flipXY&&(a="y",s="x",l="height",c="width",u=o,d=i);const f=function(e){let t=e.start,n=e.end,r=e.minPx,i=void 0===r?.1:r,o=e.maxPx,a=void 0===o?1:o;const s=Math.max(t,n),l=Math.min(t,n),c=c3(-.1,1.2,s),u=c3(-.1,1.2,l),d=c*a-u*a,f=Math.max(i,d),p=(f-d)/2;return{actualDiff:f,startModifier:p,actualLow:u*a-p}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:d}),p=f.actualDiff,h=f.actualLow;return GK({},t.box,{type:"rect",[a]:(r+t.major)*u,[s]:h,[c]:p,[l]:n*u,data:t.data||{},collider:{type:null}})}function f3(e){let t=e.item,n=e.from,r=e.to,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x1",l="y1",c="x2",u="y2",d=o,f=a;return e.flipXY&&(s="y1",l="x1",c="y2",u="x2",d=a,f=o),GK({},t.line,{type:"line",[u]:Math.floor(n*f),[s]:i*d,[l]:Math.floor(r*f),[c]:i*d,data:t.data||{},collider:{type:null}})}function p3(e){let t=e.item,n=e.key,r=e.position,i=e.width,o=e.boxCenter,a=e.rendWidth,s=e.rendHeight,l="x1",c="y1",u="x2",d="y2",f=a,p=s;e.flipXY&&(l="y1",c="x1",u="y2",d="x2",f=s,p=a);const h=i/2;return GK({type:"line"},t[n],{[c]:Math.floor(r*p),[l]:(o-h)*f,[d]:Math.floor(r*p),[u]:(o+h)*f,r:h*f,cx:o*f,cy:r*p,width:i*f,data:t.data||{},collider:{type:null}})}function h3(e,t,n){const r=t.box,i=r.width,o=r.maxWidthPx,a=r.minWidthPx,s=e>=0?1:-1;let l=Math.min(s*e*i,isNaN(o)?n:o/n);return l=isNaN(a)?l:Math.max(a/n,l),l*s}l3("native",function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach(e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})})}function c(){a.forEach(e=>{let t=e.key,r=e.listener;n.removeEventListener(t,r)}),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}});const m3={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},g3=Object.keys(m3),y3={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let t=e.data;const n=this.rect,r=n.width,i=n.height,o="horizontal"===this.settings.settings.orientation,a=this.style,s=this.resolver,l=this.symbol,c=g3.filter(e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show),u={};c.forEach(e=>u[e]=m3[e]);const d=function(e){let t=e.keys,n=e.data,r=e.defaultSettings,i=e.style,o=e.settings,a=e.width,s=e.height,l=e.resolver;const c=GK(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let f;f="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:GK(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:GK(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const p=o.minor||{},h={};["start","end","min","max","med"].forEach(e=>{(p[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:p.scale,ref:e})});let m,g={major:f,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:GK(!0,{},h,p)})};for(let e=0,r=t.length;e<r;e++)o[m]&&!1===o[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:o[m],scaled:u}));return g}({keys:c,data:t,defaultSettings:u,style:a,settings:this.settings.settings,width:r,height:i,resolver:s});d.settings,d.items;const f=function(e){let t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e.symbol;const s=[],l=i.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,f=i.major.settings,p=["start","end","min","max","med"].filter(e=>void 0!==i.minor.settings[e]),h=p.length,m=o.filter(e=>"oob"!==e);let g,y,b,v,x,w,S,k,C;const E=o?o.length:0,M=m?m.length:0;function R(){S?g.push(u3({item:b,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):k&&g.push(u3({item:b,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a}))}const _={box:function(){b.box&&tX(b.start)&&tX(b.end)&&g.push(d3({item:b,boxWidth:v,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){tX(b.min)&&tX(b.start)&&g.push(f3({item:b,from:b.min,to:b.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),tX(b.max)&&tX(b.end)&&g.push(f3({item:b,from:b.max,to:b.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){b.median&&tX(b.med)&&g.push(p3({item:b,key:"median",position:b.med,width:v,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(b.whisker){const e=v*b.whisker.width;tX(b.min)&&g.push(p3({item:b,key:"whisker",position:b.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),tX(b.max)&&g.push(p3({item:b,key:"whisker",position:b.max,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))}}};function A(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=b[p[r]],tX(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,k=n>1&&n!==Number.MAX_VALUE,C=S||k}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let r=null,a=null;void 0!==f.binStart?(r=t.binStart,a=t.binEnd,y=f.binStart.scale):(y=f.major.scale,r=y?t.major:0);let c=0;y?y.bandwidth?(c=y.bandwidth(),r-=c/2):c=a-r:c=1,b=GK({},{major:r,majorEnd:a},i.minor.items[e]);for(let t=0;t<E;t++)b[o[t]]=i[o[t]].items[e];if(v=h3(c,b,d),x=(c-v)/2,w=x+b.major+v/2,A(),C)b.oob&&R();else for(let e=0;e<M;e++)b[m[e]]&&!1===b[m[e]].show||_[m[e]]();const u={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(u)}return s}({width:r,height:i,flipXY:o,resolved:d,keys:c,symbol:l});return f}};const b3={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},v3=/px$/,x3={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},w3={imageSrc:void 0,imageScalingFactor:void 0,position:"center-center",symbol:"rectangle",width:void 0,height:void 0},S3={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function k3(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function C3(e,t,n,r){let i=t.width,o=t.height;return e.filter(e=>!1!==e.show&&!isNaN(e.x+e.y)).map(e=>{let t=e,a=v3.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);nX(a)&&(t=b3,a=n.min+t.size*(n.max-n.min));const s=function(e){let t=x3.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),l=ZK(s,2),c=l[0],u=QK(QK({},l[1]),{},{type:c,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity,imageSettings:t.imageSettings});t===e.errorShape&&(u.width=t.width);const d=r(u);return d.data=e.data,d})}const E3={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let t=e.data;const n=this.resolver.resolve({data:t,defaults:GK({},x3,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),r=this.rect,i=r.width,o=r.height,a=GK({},S3,this.settings.settings.sizeLimits),s=n.items;s.length>0&&"image"===s[0].shape&&t.items.forEach((e,t)=>{s[t].imageSettings=GK({},w3,this.settings.settings.imageSettings)});const l=function(e,t,n,r,i){const o=k3(e?e.scale:void 0,n),a=k3(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,i,o,a);return C3(s,this.rect,l,this.settings.shapeFn||this.symbol)}};const M3={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function R3(e,t,n,r){let i=t.x,o=t.y,a=t.width,s=t.height;const l=qX(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,f=d/100;return e.map((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=f*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const p=l.centroid(e),h=i.offset?function(e,t,n,r){let i=ZK(e,2),o=i[0],a=i[1];const s=Math.sqrt(o*o+a*a);o/=s,a/=s;const l=n-r;return{x:o*t*l,y:a*t*l}}(p,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(h.x,", ").concat(h.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+h.x,y:c.y+h.y}}},i})}function _3(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const A3={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let t=e.data;const n=[],r=[],i=this.settings.settings,o=this.resolver.resolve({data:t,defaults:GK({},M3,this.style.slice),settings:i.slice}).items;let a=0;for(let e=0,t=o.length;e<t;e++){const t=_3(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=VX,t=HX,n=null,r=uX(0),i=uX(wX),o=uX(0);function a(a){var s,l,c,u,d,f=(a=LX(a)).length,p=0,h=new Array(f),m=new Array(f),g=+r.apply(this,arguments),y=Math.min(wX,Math.max(-wX,i.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/f,o.apply(this,arguments)),v=b*(y<0?-1:1);for(s=0;s<f;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(p+=d);for(null!=t?h.sort(function(e,n){return t(m[e],m[n])}):null!=n&&h.sort(function(e,t){return n(a[e],a[t])}),s=0,c=p?(y-f*v)/p:0;s<f;++s,g=u)l=h[s],u=g+((d=m[l])>0?d*c:0)+v,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:b};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:uX(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:uX(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:uX(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:uX(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return R3(s(n),GK({},this.rect,{x:0,y:0}),r,a)}};const P3=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach(e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)})}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach(t=>{const n=e[t];n.items=[],n.append.forEach(e=>{n.items.push({key:e,type:"append"})}),n.round.forEach(e=>{n.items.push({key:e,type:"round"})})}),t.multiple=e=>e.forEach(e=>t(e)),t}();class I3{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[I3.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=I3.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&P3(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function T3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new I3(...t)}function D3(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const O3={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=T3(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,x2(this,"x",this.rect.width),x2(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=GK({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=GK({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=D3(this.x,this.rect.width),this.lines.y=D3(this.y,this.rect.height),this.lines.y=this.lines.y.map(e=>GK(e,{flipXY:!0}));let e=e=>{let t=e.dir,n=e.isMinor,r=this.lines[t].filter(e=>!!e.isMinor===n),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach(e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})})};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function N3(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function q3(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function L3(e,t,n){return e<t||e>n}function j3(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function z3(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function F3(e){var t,n;let r=e.chart,i=e.blueprint,o=e.renderer,a=e.p,s=e.settings,l=e.items,c=e.slopeLine,u=!0,d=!1,f=!1,p=!1,h=!1,m=GK(!0,{},s.style.line,a.line||{}),g=GK(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=c?i.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):i.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=GK(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},c="";t=j3(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=o.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=o.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,b=z3(a.flipXY?e.vAlign:e.align),v=z3(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*i.width,e.maxWidthPx),w=g.height+2*y,S=a.flipXY?w:x,k=a.flipXY?x:w;if(f=i.processItem({fn:t=>{let n=t.width,r=t.height,o=a.position*n-(a.flipXY?w:x)*(1-b);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(v*r-k*v),0),width:a.flipXY?S:Math.min(S,i.width-o),height:k,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),f.x<-1||f.x+f.width>i.width+1||f.y<-1||f.y+f.height>i.height+1)f=void 0;else{p={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+y,y:f.y+f.height/2+g.height/3,maxWidth:f.width-2*y-n.width,anchor:"start"},c&&(h={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+3+(f.width-(n.width+2*y)),y:p.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?m5(f,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&b5(f,t)&&(u=!1)}}}if(d&&l.push(d),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var y,b,v;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(b=c.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(v=c.label)||void 0===v?void 0:v.showValue)){var x;const t=j3(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(x=c.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var w,S,k;const e=o.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.min()*t+n>=i.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r((i.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?g.padding:3*g.padding,f=void 0!==a||c.slope>0?3*g.padding:g.padding,p=function(e,t,n,r,i,o){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*o.padding:2*o.padding,e.isRtl,n*i.width+a;if(1===n)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding);if(n>.8)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding)}else if(e.slope>0)return t.x2-(r.width+2*o.padding);return e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(c,d,a,e,i,g),h=Math.min(d.y1,d.y2);null!==(w=c.label)&&void 0!==w&&w.stroke&&(t={type:"rect",x:c.isRtl?Math.max(p,u)-2:Math.max(p,u)+2,y:Math.abs(Math.max(h,f)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(S=null===(k=c.label)||void 0===k?void 0:k.stroke)&&void 0!==S?S:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(p,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,f)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,i){for(let o=0,a=e.length;o<a;o++){const a=e[o];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+i)return!0}return!1})(l,y,e,u,f)||(t&&l.push(t),l.push(y))}}u&&f&&p&&(l.push(f,p),h&&l.push(h))}function $3(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function B3(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function H3(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function V3(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const W3={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=T3(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(B3).map(e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=H3(t,e.value);return GK(e,{scale:t,position:n})}return GK(e,{position:e.value})}),this.lines.y=this.lines.y.filter(B3).map(e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=H3(t,e.value);return GK(e,{scale:t,position:n,flipXY:!0})}return GK(e,{position:e.value,flipXY:!0})}),this.lines.x=this.lines.x.filter(e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push($3(e)),!1)),this.lines.y=this.lines.y.filter(e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push($3(e)),!1)));let n=[];return[...this.lines.x,...this.lines.y].forEach(r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max(),s=n.min(),l=n.max();i=QK(QK({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=o*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,f=(l-r.value)/r.slope;let p=[];L3(c,s,l)||(p[0]={x:H3(e,o),y:H3(n,c)}),L3(d,o,a)||(p[1]={x:H3(e,d),y:1}),L3(u,s,l)||(p[2]={x:H3(e,a),y:H3(n,u)}),L3(f,o,a)||(p[3]={x:H3(e,f),y:0});const h=p.filter(e=>!!e).length;if(h>2&&function(e){V3(e[0],e[1])&&(e[1]=void 0),V3(e[1],e[2])&&(e[2]=void 0),V3(e[2],e[3])&&(e[3]=void 0),V3(e[3],e[0])&&(e[3]=void 0)}(p),p=p.filter(e=>!!e),p.length<2)return void t["y".concat(c>l?0:1)].push($3(r));i.x1=p[0].x,i.y1=p[0].y,i.x2=p[1].x,i.y2=p[1].y}else i=void 0;F3({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}}),e.style.oob.show&&function(e){let t=e.blueprint,n=e.oob,r=e.settings,i=e.items;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let r=t.width,i=t.height,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:N3(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,f=u.cy||u.y;const p=s.map(e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")")),h=p.reduce((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t),"");let m={type:"text",text:s.length||"",title:h,x:d-.4*a.width,y:f+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:q3(d,f,a.width,c),x:d,y:f,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function U3(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){GK(e,t.style)}(t,e),t}function G3(e){return"string"==typeof e||"number"==typeof e?e:"-"}function Y3(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map(e=>B2(e,r,{x:t.x,y:t.y})),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},f=r>=0?[u,d]:[d,u];c.push(...f),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function K3(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function X3(e,t){var n,r;const i={type:"text",text:G3(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+K3(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+K3(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach(n=>{e[n]=t.style[n]})}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),Y3(e,i,t),i}function J3(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){GK(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function Q3(e){return!e.isMinor&&e.position>=0&&e.position<=1}function Z3(e){let t=e.rect,n=e.state,r=e.majorTicks,i=e.measure;return e.horizontal?function(e){let t=e.majorTicks,n=e.measureText,r=e.rect;const i="layered"===e.state.labels.activeMode?2:1,o=r.width,a=t.map(e=>e.label).map(e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":"")).map(n).map(e=>e.width);for(let e=0;e<t.length;++e){const n=t[e];if(i*o*Math.abs(n.start-n.end)<a[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let t=e.majorTicks,n=e.measureText;const r=e.rect.height,i=n("M").height;return!(t.length<2)&&r*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:i,rect:t})}function e4(e){let t=e.value,n=e.maxValue,r=e.minValue,i=e.range,o=e.modifier;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function t4(e){let t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=e.state,l=0;const c={left:0,top:0,right:0,bottom:0},u=a.labels,d=u.maxLengthPx,f=u.minLengthPx;if(a.labels.show){const e=a.align,u="top"===e||"bottom"===e,p=u?n.inner.width:n.inner.height,h=o.ticks({settings:a,distance:p,formatter:r}).filter(Q3),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=e4({value:t.width,maxValue:d,minValue:f}),t};if(t&&u&&"auto"===a.labels.mode&&(!function(e){let t=e.majorTicks,n=e.measure,r=e.rect,i=e.state,o=e.settings;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,f=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(f=s*u*Math.abs(r.start-r.end),o+c>f)return!0}else{const e=t.reduce((e,t)=>Math.min(Math.abs(t.start-t.end),e),1/0);if(f=s*u*e,d=n("M").width*l*a,d+c>f)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&Z3({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:u})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>e4({value:t.width,maxValue:d,minValue:f})*Math.sin(e)+t.height*Math.cos(e)}else g=u?e=>e.height:e=>e4({value:e.width,maxValue:d,minValue:f});if(u&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=h.map(e=>e.label);else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const b=y.map(m),v=b.map(g),x=Math.max(...v,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=h[r]?h[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...b.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let t=e.majorTicks,n=e.measureText,r=e.rect,i=e.bleedSize,o=e.angle;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:h,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const n4=(e,t,n)=>e.width*Math.abs(t.position-n.position);function r4(e){let t=e.layered,n=e.major,r=e.innerRect,i=e.outerRect,o=e.tick,a=e.index;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?n4(r,o,l)/2-2:1/0,d=c?n4(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let t=e.innerRect,n=e.outerRect,r=e.tick,i=e.prevWidth;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let t=e.innerRect,n=e.outerRect,r=e.tick,i=e.nextWidth;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function i4(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,i=r+e.style.strokeWidth,o={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:i}},ticks:[]};return function(e,t){GK(e,t.style)}(o,e),o}function o4(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function a4(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o;let c=a-e.position*l;c-=Math.PI/2;const u=o4(r.cx,r.cy,i+s,c),d=o4(r.cx,r.cy,i,c),f={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=QK({},t.style);GK(e,n)}(f,t),f}function s4(e){return"string"==typeof e||"number"==typeof e?e:"-"}function l4(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function c4(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:o+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const f=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,i+s+6,u);let p;p="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:s4(e.label),align:d,x:f.x,y:f.y,maxHeight:t.maxHeight,maxWidth:l4(t,d,f),anchor:p,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach(n=>{e[n]=t.style[n]})}(h,t),function(e,t){e.boundingRect=t.textBounds(e)}(h,t),function(e,t,n){let r,i;const o=parseFloat(n.fontSize)||0;r=t.y-o/2,i=e.innerRect.height-(t.y+o/2),(r<0||i<0)&&(n.text="")}(t,f,h),h}function u4(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function d4(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function f4(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=u4(e)+e.labels.margin,t}function p4(e,t){return e.map(e=>J3(e,t))}function h4(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function m4(e){let t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.scale,o=e.tilted,a=e.layered,s=e.tick;const l=t.height,c=h4(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-f4(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-f4(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=e4({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function g4(e){let t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.outerRect,o=e.tilted,a=e.layered,s=e.tick,l=e.index,c=e.major;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-f4(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-f4(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=r4({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=e4({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function y4(e){let t;function n(){return t=g4,n}function r(){return t=m4,r}function i(e){let n=e.settings,r=e.scale,i=e.innerRect,o=e.outerRect,a=e.measureText,s=e.ticks,l=e.state,c=e.textBounds;const u=[],d=function(e){return e.filter(e=>!e.isMinor)}(s),f=function(e){return e.filter(e=>e.isMinor)}(s),p={innerRect:i,align:n.align,outerRect:o},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(p.startAngle=n.arc.startAngle,p.endAngle=n.arc.endAngle,p.radius=n.arc.radius),n.line.show&&(p.style=n.line,p.padding=n.paddingStart,n.arc?u.push(i4(p)):u.push(U3(p))),n.ticks.show&&(p.style=n.ticks,p.tickSize=n.ticks.tickSize,p.padding=u4(n),n.arc?(p.padding=d4(n),g=function(e,t){return e.map(e=>a4(e,t))}(d,p)):g=p4(d,p)),n.labels.show){const e=f4(n);p.style=n.labels,p.padding=e,p.tilted=h,p.layered=m,p.angle=n.labels.tiltAngle,p.paddingEnd=n.paddingEnd,p.textBounds=c;const s=(e,s)=>{p.textRect=function(e){let t=e.style;return(0,e.measureText)({text:e.tick.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:p.style});const l=t({textMetrics:p.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});p.maxWidth=l.width,p.maxHeight=l.height,p.stepSize=function(e){let t=e.innerRect,n=e.scale,r=e.settings,i=e.tick;return("top"===r.align||"bottom"===r.align?t.width:t.height)*h4(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(p.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=d4(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map((e,r)=>{n(e,r);const i=c4(e,t);return i.data=e.data,i})}(d,p,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map((e,r)=>{n(e,r);const i=X3(e,t);return i.data=e.data,i})}(d,p,s):function(e,t,n,r){const i=t.padding,o=f4(n);return e.map((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=X3(e,t);return l.data=e.data,l})}(d,p,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>m5(cX(1,e[t].boundingRect),cX(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(l,g,p),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&f.length>0&&(p.style=n.minorTicks,p.tickSize=n.minorTicks.tickSize,p.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...p4(f,p))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const b4={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},v4={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0,centerEndLabels:!1},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const x4={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let t=e.state,n=e.style,r=e.settings;const i=GK(!0,{},t.isDiscrete?b4:v4,n),o=GK(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const s=o.paddingStart,l=o.paddingEnd;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=y4(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const t=this.formatter,n=this.state,r=this.scale,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=w2(r,i);const o=function(e){let t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=0;const l=t4({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:e.state}),c=l.size,u=l.edgeBleed;if(s+=c,l.isToLarge)return{size:s};if(a.ticks.show&&(s+=a.ticks.margin,s+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>s&&(s=e)}if(a.line.show){const e=a.line.strokeWidth/2;s+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return s+=a.paddingStart,s+=a.paddingEnd,{size:s,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).settings;this.setState(e)},resize(e){const t=e.inner,n=e.outer,r=GK({},t,function(e){let t=e.align,n=e.inner;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return GK(this.state.innerRect,r),GK(this.state.outerRect,i),n},beforeRender(){const e=this.scale,t=this.formatter,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=w2(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter(e=>e.position>=0&&e.position<=1)},render(){const e=this.state,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),P3.multiple(t),t}};const w4={render:()=>[]};function S4(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map(e=>e.title());r=e.join(t)}return r}function k4(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const C4={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=S4(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const e=this.title,t=this.definitionSettings,n=this.rect,r=[];return r.push(function(e){let t=e.title,n=e.definitionSettings,r=e.dock,i=e.rect,o=e.measureText,a=e.style;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:k4(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};GK(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(GK(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=S4(t,n,this.scale)}};function E4(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function M4(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const R4={require:["chart","renderer"],on:{panStart(e){const t=M4(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=E4(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=M4(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=M4(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=M4(e,this.renderer);E4(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function _4(e){let t=e.h,n=e.isVertical,r=e.value,i=e.pos,o=e.align,a=e.borderHit,s=e.state,l=e.idx;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,f="100%",p="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(f="".concat(s.targetRect.x+s.targetRect.width,"px"),p="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,f="".concat(s.rect.width-d,"px"),p="".concat(s.rect.height-d,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:i,"px"),top:"".concat(n?i:d,"px"),height:n?"".concat(a,"px"):p,width:n?f:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:GK({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function A4(e){let t=e.h,n=e.isVertical,r=e.label,i=e.otherValue,o=e.rangeIdx,a=e.idx,s=e.pos,l=e.align,c=e.state,u=e.value;const d="end"!==l,f="outside"===c.settings.bubbles.placement;let p,h="none";n?(p=d?"left":"right",f&&(h=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(p=d?"top":"bottom",f&&(h=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const b=m?t("input",{type:"text",value:u,style:QK(QK({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[p]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[b])}function P4(e){let t=e.h,n=e.isVertical,r=e.top,i=e.height,o=e.color,a=e.on,s=e.opacity;return t("div",GK({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function I4(e){let t=e.borderHit,n=e.els,r=e.isVertical,i=e.state,o=e.vStart,a=e.vEnd,s=e.idx,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,f=Math.abs(u-d),p=Math.min(u,d)+l,h=p+f;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),f={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(f.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[P4(f)]))}const m=u<d?o:a,g=u<d?a:o,y=ZK(c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],2),b=y[0],v=y[1],x=m+1e-5>=b&&m-1e-5<=v,w=g-1e-5<=v&&g+1e-5>=b;x&&n.push(_4({h:i.h,isVertical:r,borderHit:t,value:m,pos:p,align:"start",state:i,idx:s})),w&&n.push(_4({h:i.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:i,idx:s}));const S=i.settings.bubbles;if(S&&S.show){S.fontSize,S.fontFamily,S.fill;const e=[o,a];x&&n.push(A4({h:i.h,isVertical:r,align:S.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,e)),pos:p,state:i})),w&&n.push(A4({h:i.h,isVertical:r,align:S.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(i.format(g,e)),pos:h,state:i}))}}function T4(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function D4(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach((r,i)=>{e.active&&i===e.active.idx||I4({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})}),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=T4(e);r=e.active.start+t,i=e.active.end+t}I4({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function O4(e){return{min:e.scale.min(),max:e.scale.max()}}function N4(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function q4(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function L4(e){e.renderer.render(D4(e))}function j4(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map(e=>e.id()),i=t.brushes().filter(e=>"range"===e.type&&-1!==r.indexOf(e.id))[0];return i?i.brush.ranges():[]}function z4(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function F4(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function $4(e){const t=e.reduce((e,t)=>(e.push(...oX(t.bounds)),e),[]);return aX(t)}const B4={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=j4(this.state,this.state.brushInstance),this.state.active=null,L4(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=w2(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map(t=>e.chart.component(t)).filter(e=>!!e&&!!e.rect),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=$4(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=w2(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=$4(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)}),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map(e=>({min:e.min,max:e.max}));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=QK({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach(t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)})}(this.state,e,t,n),this.emit("bubbleEnd"),L4(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,L4(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=C1(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>F4(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(z4(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=l2(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach(e=>{if(!F4(r,[e.min,e.max]))return;const o=n.indexOf(z4(e.min,t)),a=n.indexOf(z4(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))}),i}(e,i);return this.state.ranges=j4(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[D4(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=GK({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(p/t.size),c.start=t.scale.normInvert(f/t.size);let h=t.ranges;const m=O4(t);let g,y,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),m.min=b>0?h[b-1].max:m.min,m.max=b+1<h.length?h[b+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=c.start&&c.start<=h[g].max){b=g,m.min=g?h[g-1].max:m.min,m.max=g+1<h.length?h[g+1].min:m.max;break}if(c.start<h[g].min){m.max=h[g].min,m.min=g?h[g-1].max:m.min;break}}-1===b&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==b)if(y={idx:b,start:h[b].min,end:h[b].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(f-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(f-n)<=o&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!y5(t.targetRect,{x:u,y:d})||Object.keys(c).forEach(e=>t[e]=c[e])}({e:e,state:this.state,renderer:this.renderer,ranges:j4,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=O4(e);q4(e,e.current,n)}(this.state,j4),L4(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map(e=>({min:e.min,max:e.max}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=T4(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach(n=>{if(e.fauxBrushInstance){let r=j4(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter(e=>-1===i.indexOf(e)),s=i.filter(e=>-1===o.indexOf(e)),l=a.map(e=>({key:n.id(),value:e})),c=s.map(e=>({key:n.id(),value:e}));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)})}(this.state),L4(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;L4(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function H4(e){e.renderer.render(D4(e))}function V4(e){return e.rc.ranges()}function W4(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const U4={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map(e=>this.chart.component(e)).filter(e=>!!e&&!!e.rect),a=o[0]?o.slice(1).reduce((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)}),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=X1(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i}),l=e.settings.brush.components.reduce((e,t)=>e.key===s.key?e:t);return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=p,m=f;c.start=f,c.current=p;let g=t.ranges;const y=N4(t);let b,v,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(b=0;b<g.length;b++){if(g[b].min<=m&&m<=g[b].max){x=b,y.min=b?g[b-1].max:y.min,y.max=b+1<g.length?g[b+1].min:y.max;break}if(m<g[b].min){y.max=g[b].min,y.min=b?g[b-1].max:y.min;break}}-1===x&&g.length&&b>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(v={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=v.start,t=v.end;Math.abs(f-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(f-t)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!y5(t.targetRect,{x:u,y:d})||Object.keys(c).forEach(e=>t[e]=c[e])}({e:e,state:this.state,renderer:this.renderer,ranges:V4,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=N4(e);q4(e,e.current,n)}(this.state,V4),H4(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map(e=>({min:e.min,max:e.max}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=T4(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach(t=>{n=[...n,...W4(e,t)]}),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),H4(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function G4(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map(e=>e.id()),i=t.brushes().filter(e=>"range"===e.type&&-1!==r.indexOf(e.id))[0];return i?i.brush.ranges():[]}(e).map(i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}})}function Y4(e,t,n,r){function i(){!function(e){e.renderer.render(G4(e))}(e)}function o(){!function(e){e.renderer.render(G4(e))}(e)}function a(){!function(e){e.renderer.render(G4(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function K4(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const X4={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=w2(this.chart.scale(e.scale),r);return K4(this.state),Y4(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,G4(this.state)},beforeDestroy(){K4(this.state)}};function J4(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function Q4(e,t,n){return z2(e,t.points[0])<n.settings.snapIndicator.threshold**2}function Z4(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function e6(e){let t=e.state,n=e.start,r=void 0===n?null:n,i=e.end,o=void 0===i?null:i;null!==r&&(t.snapIndicator.x1=r.x,t.snapIndicator.y1=r.y),null!==o&&(t.snapIndicator.x2=o.x,t.snapIndicator.y2=o.y)}function t6(e,t){e.snapIndicator.visible=t}const n6={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map(e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"}));const n=J4(this.state.rendererBounds,e);Z4(this.state,n),e6({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=J4(this.state.rendererBounds,e);Q4(t,this.state,this.settings)?t6(this.state,!0):t6(this.state,!1),Z4(this.state,t),e6({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter(e=>e.visible);t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;t6(this.state,!1);Q4(J4(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map(e=>({x:e.x+n,y:e.y+r})),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach(e=>{e.contexts.forEach(e=>{t.brush(e).end()})}),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function r6(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function i6(e){let t=e.orientation,n=e.targetNodes,r=e.labels,i=e.container,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r6;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const d=r[t],f=d.textBounds,p=d.node;if(f[s]<i[s]||f[s]+f[l]>i[s]+i[l])return!1;for(let e=o(f,a,s,l,c);e<a.length;e++)if(m5(f,a[e].textBounds))return!1;const h=o(f,n,s,l,u),m=f[s]+f[l];for(let e=h;e<n.length;e++){const t=n[e].node;if(m<t.localBounds[s])break;if(m5(f,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}function o6(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function a6(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function s6(e){return QK(QK({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function l6(e,t,n){return n?e.width>=t.height:e.width>=t.width}function c6(e,t,n){return n?e.height>=t.width:e.height>=t.height}function u6(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||l6(t,n,!0),a=c6(t,n,!r)):(o=l6(t,n),a=i||c6(t,n,!1)),o&&a}function d6(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function f6(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return l6(e,t,n.rotate)&&c6(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=d6(e.x,e.width,i.height,n.align)+o,r.y=d6(e.y,e.height,i.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(i.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=d6(e.x,e.width,i.width,n.align),r.y=d6(e.y,e.height,i.height,n.justify)+o),r}function p6(e){let t=e.bar,n=e.view,r=e.direction,i=e.position,o=e.padding,a=void 0===o?4:o,s=e.measured;const l={};if(GK(l,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(l.y=0,l.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(l.y=o,l.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(l.x=0,l.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(l.x=o,l.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(l,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=n.top,i=void 0===r?4:r,o=n.bottom,a=void 0===o?4:o,s=n.left,l=void 0===s?4:s,c=n.right,u=void 0===c?4:c,d="function"==typeof l?l(t):l,f="function"==typeof u?u(t):u,p="function"==typeof i?i(t):i,h="function"==typeof a?a(t):a;e.x+=d,e.width-=d+f,e.y+=p,e.height-=p+h}(l,s,a),l}function h6(e){let t,n,r,i,o,a=e.direction,s=e.fitsHorizontally,l=e.measured,c=e.node,u=e.orientation,d=e.placementSettings,f=e.rect,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p6;const h=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=p({bar:c.localBounds,view:f,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(i),t=!o||i[m]>t[m]?i:t,u6(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=h.indexOf(n)),r=d[o],{bounds:n,placement:r}}function m6(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o=i.top,a=void 0===o?4:o,s=i.bottom,l=void 0===s?4:s,c=i.left,u=void 0===c?4:c,d=i.right,f=void 0===d?4:d,p="function"==typeof u?u(t):u,h="function"==typeof f?f(t):f,m="function"==typeof a?a(t):a,g="function"==typeof l?l(t):l,y=e.x+e.dx,b=e.y+e.dy,v=n?Math.min(t.width,r.height):Math.min(t.height,r.width),x=n?Math.min(t.height,r.height):Math.min(t.width,r.width),w=.5*t.height,S=1e-9;return{x:(n?y-w:y)-p-S,y:(n?b:b-w)-m-S,width:x+(p+h)-S,height:v+(m+g)-S}}function g6(e){let t=e.chart,n=e.targetNodes,r=e.rect,i=e.fitsHorizontally,o=e.collectiveOrientation,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h6,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f6,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i6;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,f,p,h,m,g,y,b,v,x,w,S,k,C;for(let e=0,l=n.length;e<l;e++){g=null,f=n[e],p=f.node,k=o6(p,t),v=f.direction,C="left"===v||"right"===v?"h":"v";for(let t=0;t<f.texts.length;t++){if(h=f.texts[t],!a6(h))continue;x=f.labelSettings[t],b=f.measurements[t],S=x.placements;const n=a({direction:v,fitsHorizontally:i,lblStngs:x,measured:b,node:p,orientation:C,placements:S,placementSettings:f.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){var E;m=w.justify;const t="function"==typeof x.linkData?x.linkData(k,e):void 0,n="function"==typeof w.overflow?w.overflow(k,e):w.overflow;"up"===v&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===v&&(m=1-m);const r=!("h"===o||i);if(d=s(g,h,{justify:"h"===C?w.align:m,align:"h"===C?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:b,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=m6(d,b,r,g,w.padding);y="function"==typeof w.fill?w.fill(QK(QK({},k),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(QK(QK({},k),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=m6(d,b,r,g,w.background.padding))),c.push(d),u.labels.push({node:p,textBounds:n})}}}}const M=c.filter(l(u));return[...M.filter(e=>void 0!==e.backgroundBounds).map(s6),...M]}function y6(e){const t=2*Math.PI;return(e%t+t)%t}function b6(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function v6(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function x6(e,t,n){let r=t.x,i=t.y;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function w6(e){let t,n,r=e.radius,i=e.size,o=e.angle,a=i.width,s=i.height,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=x6(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=x6(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=x6(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=x6(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function S6(e){let t=e.slice,n=e.measured,r=e.padding,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=y6((i+o)/2);let d=s-r,f={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(f.angle=u-Math.PI/2,f.anchor="end"):(f.angle=u+Math.PI/2,f.anchor="start"),f}function k6(e){let t=e.context,n=e.node,r=e.bounds;let i=n.desc.slice;const o=y6((i.start+i.end)/2);switch(Math.floor(o/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function C6(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function E6(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function M6(e){let t,n,r=e.slice,i=e.direction,o=e.position,a=e.padding,s=e.measured,l=e.view,c=e.context,u=e.store,d=r.start,f=r.end,p=r.innerRadius,h=r.offset;switch(o){case"into":t="rotate"===i?S6({slice:r,measured:s,padding:a}):function(e){let t=e.slice,n=e.padding,r=e.measured,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius;const l=y6((i+o)/2);let c=w6({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",b5(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||b5(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||c5({cx:0,cy:0,r:a},c)?null:(b6(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:f,innerRadius:0,outerRadius:p},t="rotate"===i?S6({slice:n,measured:s,padding:a}):function(e){let t=e.slice,n=e.padding,r=e.measured,i=e.store;const o=t.start,a=t.end,s=t.outerRadius,l=y6((o+a)/2);let c=w6({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",b6(c,n),i.insideLabelBounds.some(e=>m5(e,c))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let t=e.slice,n=e.measured,r=e.padding,i=e.view,o=t.start,a=t.end,s=t.outerRadius,l=t.offset,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=y6((o+a)/2);let f=Math.sin(d)*c,p=-Math.cos(d)*c,h=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=p<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<h&&(h=t)}if(Math.sin(m)>.001){let e=f<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<h&&(h=t)}if(h<=0||h<n.minReqWidth)return null;let g={x:f,y:p,width:h,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let t=e.slice,n=e.measured,r=e.padding,i=e.view,o=e.context,a=t.start,s=t.end,l=t.outerRadius,c=t.offset;const u=y6((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,f=Math.sin(u)*d,p=-Math.cos(u)*d,h=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(f+c.x));e<h&&(h=e)}else{let e=Math.abs(i.x-(f+c.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:f,y:p,width:h,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=h.x,t.y+=h.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const r=n.start,i=n.end,o=n.offset,a=n.outerRadius,s=y6((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function R6(e){let t=e.context,n=e.direction,r=e.measured,i=e.node,o=e.placementSettings,a=e.rect,s=e.store,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M6;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function _6(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const A6=/\n+|\r+|\r\n/,P6=/\s/,I6=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function T6(e){return"string"==typeof e?-1!==e.search(A6):-1!==String(e).search(A6)}function D6(e){return-1!==e.search(P6)}function O6(e){return-1!==e.search(I6)}function N6(e,t,n){return Math.max(t,Math.min(n,e))}function q6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.string,n=e.separator,r=void 0===n?"":n,i=e.reverse,o=void 0!==i&&i,a=e.measureText,s=void 0===a?e=>({width:e.length,height:1}):a,l=e.mandatoryBreakIdentifiers,c=void 0===l?[T6]:l,u=e.noBreakAllowedIdentifiers,d=void 0===u?[]:u,f=e.suppressIdentifier,p=void 0===f?[D6,T6,e=>""===e]:f,h=e.hyphenationIdentifiers,m=void 0===h?[O6]:h;const g=String(t).split(r);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(g);const y=g.length,b=o?e=>e>=0:e=>e<y;let v=o?y:-1;function x(e){const t=N6(e,0,y-1),n=g[t],r=s(n),i=function(e,t,n,r,i){return r.some(r=>r(e,t,n))?1:i.some(r=>r(e,t,n))?0:2}(n,t,g,c,d);return{index:t,value:n,breakOpportunity:i,suppress:p.some(e=>e(n,t,g)),hyphenation:m.some(e=>e(n,t,g)),width:r.width,height:r.height,done:!1}}return{next:function(e){return isNaN(e)?o?v--:v++:v=N6(e,0,y-1),b(v)?x(v):{done:!0}},peek:x,length:y}}const L6="…",j6=/^\s*\d+(\.\d+)?px\s*$/i;function z6(e){return"string"===typeof e&&j6.test(e)}function F6(e){const t=e["font-size"]||e.fontSize;return z6(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function $6(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=F6(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function B6(e,t){return{lines:[],line:"",width:0,maxLines:$6(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function H6(e){e.lines.push(e.line),e.line="",e.width=0}function V6(e,t){e.line+=t.value,e.width+=t.width}function W6(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function U6(e,t,n){const r=q6({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?W6(e,t,r):t,H6(e),V6(e,t)):V6(e,t)}}function G6(e,t){const n=q6({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=B6(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){H6(r),i=!1;break}1===e.breakOpportunity?H6(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?W6(r,e,n):e,H6(r),V6(r,e)):V6(r,e)}return{lines:r.lines,reduced:i}}function Y6(e,t){const n=q6({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=B6(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){H6(r),i=!1;break}1===e.breakOpportunity?H6(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?H6(r):e.width>r.maxWidth?U6(r,e,t):(H6(r),V6(r,e)):V6(r,e)}return{lines:r.lines,reduced:i}}function K6(e){return{"break-all":G6,"break-word":Y6}[e.wordBreak]}function X6(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=K6(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||T6(n.text)){const o=(F6(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach((a,s)=>{const l=GK({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=L6:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)}),i}(a,n,o,i.height)}}}}function J6(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,i="string"==typeof e.text?e.text:"".concat(e.text),o=e.maxWidth;if(void 0===o)return i;let a=t({text:i,fontSize:r,fontFamily:n}).width;if(a<=o)return i;let s=0,l=i.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:i.substr(0,e)+L6,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+L6}function Q6(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const Z6={},e8={},t8={fontSize:void 0,fontFamily:void 0};let n8;function r8(e,t){return!e&&!t||e===t}function i8(e){let t=e.text,n=e.fontWeight,r=e.fontSize,i=e.fontFamily;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof e8[o]&&(n8=n8||document.createElement("canvas").getContext("2d"),function(e){let t=e.fontWeight,n=e.fontSize,r=e.fontFamily;r8(t8.fontWeight,t)&&r8(t8.fontSize,n)&&r8(t8.fontFamily,r)||(n8.font=[t,n,r].filter(e=>!!e).join(" "),t8.fontWeight=t,t8.fontSize=n,t8.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),e8[o]=n8.measureText(t).width),e8[o]}function o8(e){return"number"!=typeof Z6[e]&&(Z6[e]=function(e){if(z6(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),Z6[e]}function a8(e){let t=e.text,n=e.fontWeight,r=e.fontSize;return{width:i8({text:t,fontWeight:n,fontSize:r,fontFamily:e.fontFamily}),height:o8(r)}}function s8(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a8;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+Q6(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function l8(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a8;const n=K6(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||T6(e.text))){const o=n(e,e=>t({text:e,fontFamily:i,fontSize:r})),a=GK({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?L6:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=s8(a,t);return c.height=F6(e)*o.lines.length,c}return s8(e,t)}function c8(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function u8(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function d8(e){return{type:"circle",bounds:{cx:e.cx,cy:e.cy,r:e.r}}}function f8(e){return e.desc&&e.desc.slice?function(e){let t=e.start,n=e.end,r=e.innerRadius,i=e.outerRadius,o=e.offset;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return d8({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?d8(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var p8={bar:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g6;const l=GK({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map(e=>GK({},l,t,e)),u=t.labels.map(e=>e.placements.map(n=>GK({},l,t,e,n))),d=function(e){let t=e.nodes,n=e.rect,r=e.chart,i=e.labelSettings,o=e.placementSettings,a=e.settings,s=e.renderer;const l={},c=[];let u,d,f,p,h,m,g,y=!0,b=!1;for(let e=0;e<t.length;e++){if(d=t[e],p=d.localBounds,!m5(p,n))continue;let v=o6(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],f="function"==typeof m.label?m.label(v,e):void 0,a6(f)&&(g="function"==typeof a.direction?a.direction(v,e):a.direction||"up",b=b||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=f,h=s.measureText(l),u.measurements.push(h),u.texts.push(f),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&h.width<=p.width-8);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:b}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:u}),f=d.fitsHorizontally,p=d.hasHorizontalDirection,h=d.targetNodes,m=function(e){let t=e.orientation,n=void 0===t?"auto":t,r=e.defaultOrientation,i=void 0===r?"h":r;switch(n.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return i}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),g="h"===m?"y":"x",y="h"===m?"height":"width";return h.sort((e,t)=>e.node.localBounds[g]+e.node.localBounds[y]-(t.node.localBounds[g]+t.node.localBounds[y])),s({chart:n,targetNodes:h,stngs:t,rect:i,fitsHorizontally:f,collectiveOrientation:m})},slice:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R6,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E6;const c=GK({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map(e=>GK({},c,t,e)),d=t.labels.map(e=>e.placements.map(n=>GK({},c,t,e,n))),f=[],p={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o].desc.slice,s=y6((a.start+a.end)/2);switch(Math.floor(s/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>y6((e.desc.slice.start+e.desc.slice.end)/2)-y6((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const h={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=C6(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=_6(c,r,o),b=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:p}),v=b.bounds,x=b.placement;if(v&&x){if("outside"===x.position&&"rotate"!==m){k6({context:h,node:t,bounds:v});if(!t5(v6(v),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(v,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),f.push(o),v.line&&(v.line.stroke=n,f.push(v.line)))}}}return f},rows:function(e){let t=e.settings,n=e.chart,r=e.nodes,i=e.renderer,o=e.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u8;const s=GK({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=GK({},s,t),c=t.labels.map(e=>GK({},l,e)),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=c8(t,n),s=f8(t),f=s.type,p=s.bounds;if(!p)continue;let h,m=0,g=[],y=[],b="circle"===f?2*p.r*.9:p.height;for(m+=l.padding,h=0;h<c.length;h++){let t=c[h],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=i.measureText(u);if(m+=r.height+t.padding,m>b)break;y.push(n),g.push(r)}const v=h,x=Math.max(0,b-m);let w;for(w="circle"===f?p.cy-.9*p.r:p.y,w+=l.justify*x+l.padding,h=0;h<v;h++){let t,n=c[h];if("circle"===f){let e=Math.max(Math.abs(w-p.cy),Math.abs(w+g[h].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:w,width:2*n-2*l.padding,height:g[h].height}}else t={x:p.x+l.padding,y:w,width:p.width-2*l.padding,height:g[h].height};w+=g[h].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const s="function"==typeof n.linkData?n.linkData(o,e):void 0;let u=a(t,y[h],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:g[h]});if(u){if(u.text&&u.text!==L6){const e=J6(u,i.measureText);if(L6===e)continue;u.ellipsed=e}void 0!==s&&(u.data=s),d.push(u)}}}return d}};const h8={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach(e=>{e.strategy&&p8[e.strategy.type]&&e.component&&t.push(...function(e,t){let n=e.chart,r=e.source,i=e.rect,o=e.renderer,a=e.style;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter(e=>e.key===r.component);return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},p8[e.strategy.type]))}),t}};const m8={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function g8(e){let t=e.x,n=void 0===t?0:t,r=e.y,i=e.item,o=e.globalMetrics,a=e.createSymbol,s=e.direction,l=void 0===s?"ltr":s,c=i.label.displayObject,u=i.label.bounds,d=i.symbol.meta;const f="rtl"===l;let p={x:f?n+o.maxLabelBounds.width:n+o.maxSymbolSize+o.spacing,y:r,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},h=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:f?n+o.maxLabelBounds.width+o.spacing:n,y:r,width:o.maxSymbolSize,height:p.height},d.size,{align:void 0===d.align?.5:d.align,justify:void 0===d.justify?.5:d.justify});const m=a(GK({},d,h));return delete m.collider,c.anchor=f?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(p,c,{textMetrics:u,fontSize:parseInt(c.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:i.label.displayObject.data,children:[m,c],collider:{type:"rect",x:n,y:r,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:p}}function y8(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function b8(e,t){let n,r,i,o,a=t.onScroll,s=void 0===a?()=>{}:a,l=null,c=0;const u={itemize:t=>{n=function(e,t){let n,r,i=e.resolved,o=e.dock,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,d=0,f=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=GK({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),f=Math.max(r.label.bounds.height,f)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,f),width:u+8+d},maxLabelBounds:{width:d,height:f}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),l=isNaN(n.layout.scrollOffset)?l:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,c=u.getContentOverflow(i);const a=u.extent();l=Math.max(0,Math.min(l,c)),o=GK({},i);const s="horizontal"===u.orientation()?"x":"y";return o[s]-=l,o["x"===s?"width":"height"]=a,function(e,t,n){let r=e.viewRect,i=n.itemized,o=n.create,a=void 0===o?g8:o,s=n.parallels,l=n.createSymbol;const c=i.layout.direction,u=i.globalMetrics,d=i.items,f="horizontal"===i.layout.orientation;let p=0;const h=[],m=u.maxItemBounds.height,g=u.maxItemBounds.width,y=i.layout.margin.vertical+m,b=i.layout.margin.horizontal+g;let v=t.x,x=t.y,w=r.x-t.x;for(let e=0;e<d.length;e++){let n=a({y:x,x:"rtl"===c?r.x+w+r.width-g-(v-t.x):v,item:d[e],globalMetrics:u,direction:c,createSymbol:l});if((f&&v>=r.x-g||!f&&x>=r.y-m)&&h.push(n.item),p++,p>=s?(p=0,f?(v+=b,x=t.y):(x+=y,v=t.x)):f?x+=y:v+=b,!f&&x>r.y+r.height)break;if(f&&v>r.x+r.width)break}return h}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return y8(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,y8(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===u.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===u.orientation()?o.x<i.x:o.y<i.y,next:()=>{u.scroll(-u.getNextSize())},prev:()=>{u.scroll(u.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(c,l-e));t!==l&&(l=t,s())},offset:()=>l,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>y8(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return u}function v8(e){return Object.keys(e).filter(t=>e[t]).join(" ")}const x8={up:"▲",right:"▶",down:"▼",left:"◀"};function w8(e,t){let n=t.size,r=t.isActive,i=t.direction,o=t.nav,a={},s="";const l=t.attrs;o&&o.button&&("function"==typeof o.button.class?a=o.button.class({direction:i}):o.button.class&&(a=o.button.class),"function"==typeof o.button.content&&(s=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(l.tabindex=o.button.tabIndex));const c={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(a).length||(c.border="0",c.background="none"),(!r||o&&o.disabled)&&(l.disabled="disabled"),e("button",GK({class:v8(a),style:c},l),[s||e("span",{style:{pointerEvents:"none"}},[x8[i]])])}function S8(e){let t;const n={itemize:e=>{t=function(e){let t=e.dock;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:e.navigation}}(e)},render:r=>function(e,t,n,r){let i=t.rect,o=t.itemRenderer;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const f=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[w8(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),w8(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(f)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function k8(e){let t;const n={itemize:n=>{t=function(e,t){let n=e.resolved;if(!1===n.title.item.show)return null;const r=GK({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let r=e.rect;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(GK({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function C8(e,t,n,r){let i,o,a,s=r.itemRenderer,l=r.navigationRenderer,c=r.titleRenderer,u=r.isPreliminary,d=void 0!==u&&u,f=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){i={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-i.width-(i.width?t.spacing:0),n=p.height;s.parallelize(e,d?void 0:n);const r=s.extent()>e?l.extent():0,u=s.spread(),h=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:p.y+Math.max(0,(h-u)/2),width:p.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},i.y=o.y;"rtl"===s.direction()&&(a.x=p.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),f=Math.max(i.height,h,s.spread())}else{const e=p.height-i.height-(i.height?t.spacing:0),n=p.width;s.parallelize(e,d?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},o={x:p.x,y:i.y+i.height+(i.height?t.spacing:0),width:p.width,height:p.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},f=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=GK({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:GK({},e,i),content:GK({},e,o),navigation:GK({},e,a),orientation:n,preferredSize:f}}function E8(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map((t,n)=>{const i=e.scale.datum?GK({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i})}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:GK(!0,{},m8.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:m8.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:GK(!0,{},m8.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=GK(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:GK(!0,{},m8.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:GK(!0,{},{show:m8.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function M8(e){const t=e.rect,n=e.settings,r=e.state,i=e.itemRenderer,o=e.navigationRenderer,a=e.titleRenderer,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=C8(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:GK({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},u}const R8={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=M8(this);this.update(e)},this.itemRenderer=b8(this,{onScroll:this.onScroll}),this.navigationRenderer=S8(this),this.titleRenderer=k8(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),E8(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=C8(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){E8(this)},render(){return M8(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function _8(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function A8(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function P8(e){return A8(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function I8(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function T8(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}});return o}(e,i),a=A8((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),c=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),u={isVertical:t,nodes:[],title:{anchor:P8(e.settings),textMetrics:l,textBounds:c,requiredWidth:()=>{if(!n.show)return 0;let e=c.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=c.height;return t&&(e+=n.padding),Math.min(e,u.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map(e=>e.textMetrics.width)),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...u.ticks.values.map(e=>e.textMetrics.height))+e.stgns.tick.padding:0,height:Math.max(...o.map(e=>e.textMetrics.height))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return u}const D8={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=I8(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce((e,t)=>e+t.textMetrics.height,0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map(e=>e.textMetrics.height))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=T8(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=T8(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=I8(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return _8(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map(e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))}));return r.sort((e,t)=>e.offset-t.offset)}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return _8(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map(a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}});return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const O8={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function N8(e,t){let n=t.generatorType,r=t.item,i=t.data,o=t.major,a=t.minor,s=t.layerObj,l=t.stngs,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function q8(e){const t=function(e){let t=e.data,n=e.stngs,r=e.rect,i=e.resolver,o=e.style,a=e.domain;const s=r.width,l=r.height,c=i.resolve({data:t,defaults:O8.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let f=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:f++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const p=Object.keys(d).map(e=>(d[e].consumableData=QK({points:d[e].dataItems},d[e].dataItems[0]),d[e])),h={items:p.map(e=>e.consumableData)},m=n.layers||{};return{coordinates:c,metaLayers:p,layers:i.resolve({data:h,defaults:{curve:O8.layers.curve,show:O8.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:h,defaults:GK({},O8.layers.line,o.line),settings:m.line}),areas:i.resolve({data:h,defaults:GK({},O8.layers.area,o.area),settings:m.area})}}(e),n=t.metaLayers,r=t.coordinates,i=t.layers,o=t.lines,a=t.areas,s=[];return n.forEach((t,n)=>{const l=i.items[n];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,f;for(let n=0;n<t.items.length;n++){if(d=t.items[n],f=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=r.settings.minor.scale?r.settings.minor.scale(f.minor0?f.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const p=c.sort((e,t)=>e-t)[Math.floor((c.length-1)/2)];s.push({layerObj:l,lineObj:o.items[n],areaObj:a.items[n],median:p,points:u,consumableData:t.consumableData})}),s}const L8={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let t=e.data;const n=this.rect,r=n.width,i=n.height;this.stngs=this.settings.settings||{};const o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,a=q8({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=a.map(e=>({id:e.layerObj.id,data:e.layerObj.data})).sort(this.stngs.layers.sort).map(e=>e.id);a.sort((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id))}else a.sort((e,t)=>e.median-t.median);return function(e,t){let n=t.width,r=t.height,i=t.missingMinor0,o=t.stngs;const a=[],s=o.layers||{};return e.forEach(e=>{const t=e.lineObj,l=e.layerObj,c=e.areaObj,u=e.points;let d={size:r,p:"y"},f={size:n,p:"x"};if("vertical"===o.orientation){const e=GK(!0,{},f);f=GK(!0,{},d),d=GK(!0,{},e)}s.area&&!1!==c.show&&a.push(N8(u,{data:e.consumableData,item:c,generatorType:"area",major:f,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(N8(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:f,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(N8(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:f,minor:d,layerObj:l,stngs:o},"none")))}),a}(a,{width:r,height:i,missingMinor0:o,stngs:this.stngs})}};function j8(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function z8(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function F8(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const $8={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=j8(this,e,!1);y5({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map(e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})),this.state.start=j8(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=j8(this,e),function(e){if(e.state.active){const t=z8(e,e.state.start),n=z8(e,e.state.end),r=e.chart.shapesAt(F8(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([GK({type:"rect"},F8(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach(e=>{Array.isArray(e.contexts)&&e.contexts.forEach(e=>{t.brush(e).end()})}),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function B8(e,t,n){let r=n.renderer,i=n.style,o=n.props,a=n.h;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:v8(GK({"pic-tooltip":!0},s.tooltip)),style:GK({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:v8(GK({"pic-tooltip-content":!0},s.content))},l),a("div",{class:v8(GK({"pic-tooltip-arrow":!0},s.arrow)),style:GK({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function H8(e){let t=e.defaultDuration,n=e.defaultDelay,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach(t=>t(e))},e.on=(e,n)=>{Array.isArray(e)?e.forEach(e=>t[e].push(n)):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach(e=>{t[e].length=0})},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout(()=>{e(),o=!0,r=null,a.set("active")},c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function V8(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function W8(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function U8(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function G8(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function Y8(e){let t=e.area,n=e.vx,r=e.vy,i=e.width,o=e.height,a=e.offset;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,f=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,f+=l+u>t.height?-(l+u-t.height):0,{x:d,y:f}}function K8(e){let t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.dockOrder,a=e.x,s=e.y;const l=n.targetBounds,c=V8(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:U8(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},f=W8(r,i,t.offset),p=[],h="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=Y8({area:d,vx:h,vy:m,width:r,height:i,offset:f[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=U8(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,p.push(y)}return p.sort((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x)),p[0]}function X8(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return GK({scaleRatio:i.scaleRatio},i.computedInner)}const J8={bounds:function(e){let t=e.resources,n=e.nodes,r=e.pointer,i=e.width,o=e.height,a=e.options;const s=r.targetBounds,l=t.getNodeBoundsRelativeToTarget(n[0]),c=l.x,u=l.y,d=l.width,f=l.height,p={left:{x:c,y:u+f/2},right:{x:c+d,y:u+f/2},top:{x:c+d/2,y:u},bottom:{x:c+d/2,y:u+f},inside:{x:c+d/2,y:u+f/2}},h=V8(a.offset),m=h[a.dock];if(m)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:m},computedArrowStyle:U8(a.offset)[a.dock],dock:a.dock};const g={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},y=W8(i,o,a.offset),b=["top","left","right","bottom","inside"];for(let e=0;e<b.length;e+=1){const t=b[e];if(G8(g,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,i,o,y[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:h[t]},computedArrowStyle:U8(a.offset)[t],dock:t}}const v=function(e){let t=e.options,n=e.docks,r=e.dockOffsets,i=e.targetBounds,o=e.area,a=e.width;const s="top",l="target"===t.area?n[s].x:i.left+n[s].x,c=("target"===t.area?n[s].y:(i.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let f=n.top.x;return u<0&&u+d>o.width||(u<0?f-=u:u+d>o.width&&(f-=u+d-o.width)),f}({options:a,docks:p,dockOffsets:y,targetBounds:s,area:g,width:i});return{computedTooltipStyle:{left:"".concat(v,"px"),top:"".concat(p.top.y,"px"),transform:h.top},computedArrowStyle:U8(a.offset+v-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let t=e.options,n=e.pointer,r=e.width,i=e.height;return K8({x:n.x,y:n.y,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.nodes,a=e.resources;const s=o[0],l=n.dx,c=n.dy,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,f=c+u.y+u.height/2,p=s.desc.slice,h=p.start,m=p.end,g=p.outerRadius,y=(h+m)/2-Math.PI/2,b=2*Math.PI,v=(y%b+b)%b;let x=["top","left","right","bottom"];return"auto"===t.dock&&(x=v<=Math.PI/4||v>=7*Math.PI/4?["right","top","bottom","left"]:v<=3*Math.PI/4?["bottom","left","right","top"]:v<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),K8({x:d+g*u.scaleRatio.x*Math.cos(v),y:f+g*u.scaleRatio.y*Math.sin(v),pointer:n,width:r,height:i,options:t,dockOrder:x})}};function Q8(e,t){let n=e.width,r=e.height,i=t.chart,o=t.state,a=t.props;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>X8(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=X8(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=GK(c,a.placement(s))),"object"===l&&J8[a.placement.type]?c=GK(c,a.placement):"string"===l&&J8[a.placement]&&(c=GK(c,{type:a.placement})),s.options=c;const u=J8[c.type](s);let d=s.resources.getComponentBoundsFromNode(s.nodes[0]),f=d.x,p=d.y,h=d.width,m=d.height;return f+=s.pointer.dx,h+=f,p+=s.pointer.dy,m+=p,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,f,parseFloat(u.computedTooltipStyle.left)),h),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(u.computedTooltipStyle.top)),m),"px"),u}let Z8;function e7(){Z8=null}const t7={duration:8e3,delay:500,filter:e=>e.filter(e=>e.data&&void 0!==e.data.value),extract:e=>e.node.data.value,content:e=>{let t=e.h;return e.data.map(e=>t("div",{},e))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data)),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const n7={require:["chart","renderer"],defaultSettings:{settings:t7,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.nodes,i=n.duration,o=n.delay;!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let n=t.chart,r=t.state,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,f=i-a.left,p=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:f,cy:p,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(r)?this.props.filter(r):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke(()=>this.invokeRenderer(this.state.activeNodes),i,o)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=H8({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",()=>{!function(e){Z8&&Z8!==e&&Z8()}(t),Z8=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}),this.dispatcher.on(["cancelled","fulfilled"],()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,GK({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,GK({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),Z8===t&&(Z8=null),this.state.tooltipElm=void 0}),this.dispatcher.on("active",()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})},created(){this.init(this.settings)},beforeUpdate(e){let t=e.settings;this.dispatcher&&(this.dispatcher.destroy(),e7()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),e7()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const e=this.state.targetElement.getBoundingClientRect(),t=e.width,n=e.height;this.renderer.destroy(),this.renderer.size({width:t,height:n}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let n=t.chart,r=t.scale,i=t.props,o=t.h;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach(e=>{if("function"==typeof i.extract){const t=GK({node:e},a);s.push(i.extract(t))}}),s}(e,this),n=Q8(B8(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=B8(t,n,this)}};const r7={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter(e=>e.key===this.props.target),t=e.filter(e=>e.collider).map(e=>e.collider);t.forEach(e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}}),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var i7={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},o7=/([astvzqmhlc])([^astvzqmhlc]*)/gi,a7=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function s7(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(o7,(e,n,r)=>{const i=function(e){const t=e.match(a7);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<i7[o])return"";for(t.push([a,...i.splice(0,i7[o])]);i.length>=i7[o]&&i.length&&i7[o];)t.push([a,...i.splice(0,i7[o])]);return""}),t}const l7=2*Math.PI;function c7(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function u7(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function d7(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=c7(e,t),s=c7(t,n),l=c7(n,r),c={x:u7(.5,e.x,t.x,n.x,r.x),y:u7(.5,e.y,t.y,n.y,r.y)},u=c7(a,s),d=c7(s,l);return d7(e,a,u,c,i,o-1),d7(c,d,l,r,i,o-1),i}function f7(e,t,n){const r=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return d7(e,r.cp1,r.cp2,n)}function p7(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],f=e[7],p=e[1],h=e[2];if("a"===e[0]&&(d+=t,f+=n),t===f&&n===f)return r;if(!p||!h)return r.push({x:d,y:f}),r;var m=function(e,t,n,r,i,o,a,s,l){let c,u,d,f,p,h;const m=T2(n%360),g=Math.cos(m),y=Math.sin(m),b=(s-o)/2,v=(l-a)/2,x=g*b+y*v,w=g*v-y*b;h=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const S=e*w,k=t*x,C=S**2+k**2,E=(e*t)**2-C;let M=Math.sqrt(Math.max(E/C,0));r===i&&(M=-M);const R=M*(S/t),_=M*(-k/e);f=g*R-y*_+(s+o)/2,p=y*R+g*_+(l+a)/2;const A=(x-R)/e,P=(w-_)/t,I=(-x-R)/e,T=(-w-_)/t;return c=Math.atan2(P,A),c+=c<0?l7:0,u=Math.atan2(T,I),u+=u<0?l7:0,d=u-c,!i&&c<u?d-=l7:i&&u<c&&(d+=l7),d%=l7,{startAngle:c,sweepAngle:d,cx:f,cy:p,rx:e,ry:t}}(p,h,a,i,o,d,f,t,n);s=m.cx,l=m.cy,p=m.rx,h=m.ry,c=m.sweepAngle,u=m.startAngle;const g=Math.abs(c*Math.sqrt((p**2+h**2)/2)),y=Math.ceil(g/10),b=c/y;for(let e=1;e<=y;e++){const t=(u+b*e)%l7,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*p+-i*n,y:l+i*h+n*i})}return r}function h7(e){const t=s7(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(...p7(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...p7(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...d7({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...d7({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...d7({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...d7({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...f7({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...f7({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...f7({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...f7({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const m7={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter(e=>e.key===this.props.target),t=[];e.forEach(e=>{h7(e.attrs.d).forEach(e=>{e.forEach(e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})})})}),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var g7=[function(e){e.component("box",y3),e.component("box-marker",y3)},function(e){e.component("point",E3),e.component("point-marker",E3)},function(e){e.component("pie",A3)},function(e){e.component("grid-line",O3)},function(e){e.component("ref-line",W3)},function(e){e.component("axis",x4)},function(e){e.component("container",w4)},function(e){e.component("text",C4)},function(e){e.component("scrollbar",R4)},function(e){e.component("brush-range",B4),e.component("brush-area-dir",U4)},function(e){e.component("range",X4)},function(e){e.component("brush-lasso",n6)},function(e){e.component("labels",h8)},function(e){e.component("legend-cat",R8)},function(e){e.component("legend-seq",D8)},function(e){e.component("line",L8)},function(e){e.component("brush-area",$8)},function(e){e.component("tooltip",n7)},function(e){e.component("debug-collider",r7)},function(e){e.component("debug-path-to-points",m7)}];let y7=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map(e=>e.toJSON())}}};class b7{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.minWidth,u=void 0===c?0:c,d=e.minHeight,f=void 0===d?0:d;this.set({x:n,y:i,width:a,height:l,minWidth:u,minHeight:f})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.minWidth,u=void 0===c?0:c,d=e.minHeight,f=void 0===d?0:d;this.type="rect",a>=0?(this.x=n,this.width=Math.max(a,u)):(this.x=n+Math.min(a,-u),this.width=-Math.min(a,-u)),l>=0?(this.y=i,this.height=Math.max(l,f)):(this.y=i+Math.min(l,-f),this.height=-Math.min(l,-f))}containsPoint(e){return y5(this,e)}intersectsLine(e){return b5(this,sX(e))}intersectsRect(e){return m5(this,aX(e))}intersectsCircle(e){return c5(e,this)}intersectsPolygon(e){return h5(e,this)}intersectsGeoPolygon(e){return M5(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class v7{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.minRadius,l=void 0===s?0:s;this.set({cx:n,cy:i,r:a,minRadius:l})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.minRadius,l=void 0===s?0:s;this.type="circle",this.cx=n,this.cy=i,this.r=Math.max(a,l),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return l5(this,e)}intersectsLine(e){return u5(this,sX(e))}intersectsRect(e){return c5(this,aX(e))}intersectsCircle(e){return n=e,!i5(t=this)&&!i5(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return d5(this,e)}intersectsGeoPolygon(e){return k5(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class x7{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.tolerance,u=void 0===c?0:c;this.set({x1:n,y1:i,x2:a,y2:l,tolerance:u})}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.tolerance,u=void 0===c?0:c;this.type="line",this.x1=n,this.y1=i,this.x2=a,this.y2=l,this.tolerance=Math.max(0,Math.round(u)),this.vectors=this.points(),this.zeroSize=n===a&&i===l}containsPoint(e){if(this.tolerance>0){return u5({cx:e.x,cy:e.y,r:this.tolerance},this)}return x5(this,e)}intersectsLine(e){return v5(this,sX(e))}intersectsRect(e){return b5(aX(e),this)}intersectsCircle(e){return u5(e,this)}intersectsPolygon(e){return p5(e,this)}intersectsGeoPolygon(e){return E5(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class w7{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;this.set({vertices:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;if(this.type="polygon",this.vertices=t.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return f5(this,e)}intersectsCircle(e){return d5(e,this)}intersectsLine(e){return p5(this,sX(e))}intersectsRect(e){return h5(this,aX(e))}intersectsPolygon(e){return w5(this,e)}intersectsGeoPolygon(e){return S5(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function S7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new w7(...t)}function k7(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function C7(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class E7{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[[]]:e;this.set({vertices:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).vertices,t=void 0===e?[]:e;this.type="geopolygon",this.vertices=t.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)C7(this.vertices[e]),this.vertices[e].length>2&&k7(this.vertices[e]),this.polygons[e]=S7({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return C5(this,e)}intersectsCircle(e){return k5(e,this)}intersectsLine(e){return E5(this,sX(e))}intersectsRect(e){return M5(this,aX(e))}intersectsPolygon(e){return S5(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!m5(n,r)&&(g5(r,n)?s5(t,e):s5(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function M7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new E7(...t)}function R7(e,t){return e.x!==t.x||e.y!==t.y}class _7{constructor(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).points,t=void 0===e?[]:e;this.set({points:t})}set(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).points,t=void 0===e?[]:e;if(this.type="polyline",this.segments=[],this._points=t.slice(),this._points.length>1)for(let e=0,t=this._points.length-1;e<t;e++)R7(this._points[e],this._points[e+1])&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y})}containsPoint(e){return this.segments.some(t=>x5(t,e))}intersectsCircle(e){return this.segments.some(t=>u5(e,t))}intersectsLine(e){const t=sX(e);return this.segments.some(e=>v5(e,t))}intersectsRect(e){const t=aX(e);return this.segments.some(e=>b5(t,e))}intersectsPolygon(e){return this.segments.some(t=>p5(e,t))}intersectsGeoPolygon(e){return this.segments.some(t=>E5(e,t))}points(){return this._points}}const A7=hJ();function P7(e,t){return A7.get(e)(t)}A7.add("rect",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new b7(...t)}),A7.add("circle",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new v7(...t)}),A7.add("line",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new x7(...t)}),A7.add("polygon",S7),A7.add("geopolygon",M7),A7.add("polyline",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _7(...t)});class I7{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach(e=>{const t=P7(e.type,e);t&&this.geometries.push(t)})}containsPoint(e){return this.geometries.some(t=>t.containsPoint(e))}intersectsLine(e){return this.geometries.some(t=>t.intersectsLine(e))}intersectsRect(e){return this.geometries.some(t=>t.intersectsRect(e))}intersectsCircle(e){return this.geometries.some(t=>t.intersectsCircle(e))}intersectsPolygon(e){return this.geometries.some(t=>t.intersectsPolygon(e))}intersectsGeoPolygon(e){return this.geometries.some(t=>t.intersectsGeoPolygon(e))}}class T7{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new T7).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof T7&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map(e=>e.join("\t")).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const D7=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function O7(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function N7(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function q7(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function L7(e,t){t.args.length>=6&&e.transform(...t.args)}function j7(e,t){const n=function(e){let t,n=[];for(;null!==(t=D7.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter(e=>e.trim().length>0).map(e=>Number(e))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?O7(t,r):"scale"===r.cmd?N7(t,r):"matrix"===r.cmd?L7(t,r):"translate"===r.cmd&&q7(t,r)}const z7={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},F7={type:(e,t)=>t.filter(t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()}),attr:(e,t,n,r)=>r.filter(r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}}),universal:e=>e,tag:(e,t)=>t.filter(t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))})};function $7(e,t){if(!t||!t.length||!e||"function"!=typeof F7[e.type])return[];switch(e.type){case"type":case"tag":return F7[e.type](e.value,t);case"attr":return F7[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return F7[e.type](t);default:return[]}}var B7={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach(e=>{e=e.trim(),n=[];const a=t=>{i=e.match(z7[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(z7).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););}),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach(e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=$7(e,n),s=!0}),s&&t.push(n);const l=t[0].filter(e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0});r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function H7(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every(e=>Array.isArray(e))?i.map(e=>n.transformPoints(e)):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=aX(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=sX(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:P2(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=P2(i[t],!0);o={type:"path",d:e}}return o}class V7{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const n=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n.x,y:n.y,width:n.width,height:n.height}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map(e=>H7(e,t,n))}:H7(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map(e=>new V7(e)),this._parent=()=>e.parent?new V7(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const t=e.getBoundingClientRect(),n=t.left,r=void 0===n?0:n,a=t.top;i-=r,o-=void 0===a?0:a}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function W7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new V7(...t)}class U7{constructor(e){this._node=W7(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function G7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new U7(...t)}function Y7(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=G7(n);const e=n.parent;e&&"stage"!==e.type&&Y7(e,t.parent)}}function K7(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const i={x:t.cx,y:t.cy};var r=e.inverseModelViewMatrix.transformPoint(i);n.cx=r.x,n.cy=r.y,n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every(e=>Array.isArray(e))?M7(n):S7(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=G7(i);return Y7(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=G7(e);return Y7(e,t),t}return null}(e,t,r)}function X7(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=K7(i,t,r);a&&n.push(a),!i.children||a||i.collider||X7(i.children,t,n,r)}}function J7(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==K7(r,t,n))return!0;if(r.children&&!r.collider)return J7(r.children,t,n)}return!1}function Q7(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(lX(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=oX(e).map(e=>q2(e,t)),["intersectsRect",n];case"line":return n=iX(e).map(e=>q2(e,t)),["intersectsLine",n];case"point":return n=q2(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map(e=>q2(e,t)),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map(e=>e.map(e=>q2(e,t))),["intersectsGeoPolygon",n];default:return[]}}function Z7(e,t){const n=ZK(Q7(t,e.dpi),2),r=n[0],i=n[1],o=[];return r&&(X7([e],r,o,i),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function e9(e,t){const n=ZK(Q7(t,e.dpi),2);return J7([e],n[0],n[1])}class t9 extends y7{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const t=e.data,n=e.desc,r=e.tag,i=e.strokeReference,o=e.fillReference;var a,s;a=this.attrs,s=e,Object.keys(A2).forEach(e=>{const t=s[e];void 0!==t&&(a[A2[e]]=t)}),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=GK(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return B7.find(e,this).map(e=>W7(e))}getItemsFrom(e){return Z7(this,e)}containsPoint(e){return e9(this,e)}intersectsLine(e){return e9(this,e)}intersectsRect(e){return e9(this,e)}intersectsCircle(e){return e9(this,e)}intersectsPolygon(e){return e9(this,e)}intersectsGeoPolygon(e){return e9(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new T7;void 0!==this.attrs.transform&&j7(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new T7;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new I7(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=P7("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=P7(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class n9 extends y7{addChild(e){if(!(e&&e instanceof y7))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const r9=n9.prototype;class i9 extends t9{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=e.collider,n=GK({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},r=ZK(e.bounds(t),3),i=r[0],o=r[2],a=i.x,s=i.y,l=o.x,c=o.y,u=isNaN(n.width)?l:Math.max(l,n.width+n.x),d=isNaN(n.height)?c:Math.max(c,n.height+n.y);n.x=isNaN(n.x)?a:Math.min(a,n.x),n.y=isNaN(n.y)?s:Math.min(s,n.y),n.width=u-n.x,n.height=d-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=GK({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=r9.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=GK({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=r9.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=GK({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(r9.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=GK(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(r9.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=GK(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function o9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new i9(...t)}class a9 extends i9{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const s9=n9.prototype,l9=["x1","x2","y1","y2","id","offset","style"];class c9 extends t9{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=l9.length;r!==i;r++)n=l9[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return s9.addChild.call(this,e)}addChildren(e){return s9.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return s9.removeChild.call(this,e),this}removeChildren(e){return s9.removeChildren.call(this,e),this}}function u9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new c9(...t)}const d9=n9.prototype,f9=["patternUnits","x","y","width","height","id"];class p9 extends t9{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.type;super(void 0===t?"container":t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=f9.length;r!==i;r++)n=f9[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return d9.addChild.call(this,e)}addChildren(e){return d9.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return d9.removeChild.call(this,e),this}removeChildren(e){return d9.removeChildren.call(this,e),this}}class h9 extends t9{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.rx,u=void 0===c?0:c,d=e.ry,f=void 0===d?0:d,p=e.collider,h=GK({type:"rect",x:n,y:i,width:a,height:l},p);super.set(e),a>=0?(this.attrs.x=n,this.attrs.width=a):(this.attrs.x=n+a,this.attrs.width=-a),l>=0?(this.attrs.y=i,this.attrs.height=l):(this.attrs.y=i+l,this.attrs.height=-l),u>0&&(this.attrs.rx=u),f>0&&(this.attrs.ry=f),this.collider=h,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=oX(this.attrs),n=ZK(rX(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t),4),r=n[0],i=n[1],o=n[2],a=n[3];return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class m9 extends t9{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.collider,l=GK({type:"circle",cx:n,cy:i,r:a},s);super.set(e),this.attrs.cx=n,this.attrs.cy=i,this.attrs.r=a,this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.attrs,n=t.cx,r=t.cy,i=t.r,o=t.r,a=n-i,s=r-o;let l=2*i,c=2*o,u=[{x:a,y:s},{x:a+l,y:s},{x:a+l,y:s+c},{x:a,y:s+c}];if(e&&this.modelViewMatrix){u=this.modelViewMatrix.transformPoints(u);const t=ZK(rX(u),4),n=t[0],r=t[1];l=t[2]-n,c=t[3]-r,this.__bounds[e]=[{x:n,y:r},{x:n+l,y:r},{x:n+l,y:r+c},{x:n,y:r+c}]}else this.__bounds[e]=u;return this.__bounds[e]}}class g9 extends t9{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,l=void 0===s?0:s,c=e.collider;super.set(e),this.attrs.x1=n,this.attrs.y1=i,this.attrs.x2=a,this.attrs.y2=l;const u={type:"line",x1:n,y1:i,x2:a,y2:l};this.collider=GK(u,c),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=iX(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const n=ZK(rX(t),4),r=n[0],i=n[1],o=n[2],a=n[3],s=r!==o||i!==a;return this.__boundingRect[e]={x:r,y:i,width:s?Math.max(1,o-r):0,height:s?Math.max(1,a-i):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const y9=Math.PI/2;function b9(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function v9(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const x9={step:function(e){return new sJ(e,.5)},stepAfter:function(e){return new sJ(e,1)},stepBefore:function(e){return new sJ(e,0)},linear:zX,basis:function(e){return new UX(e)},cardinal:KX.tension(0),catmullRom:JX,monotonex:function(e){return new nJ(e)},monotoney:function(e){return new rJ(e)},natural:function(e){return new oJ(e)}};function w9(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class S9 extends t9{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=qX();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const t=e.major,n=e.minor,r=e.layerObj,i=e.points,o=e.stngs,a=e.generatorType,s=BX(),l=o.coordinates?o.coordinates.defined:null;s[t.p](e=>e.major*t.size)["".concat(n.p,"1")](e=>e.minor*n.size)["".concat(n.p,"0")](e=>e.minor0*n.size).curve(x9["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined(e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined):s.defined(e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=h7(this.attrs.d),this.segments.length>1&&this.segments.every(e=>w9(e)))return void(this.collider=GK({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach(t=>{if(t.length<=1);else if(w9(t))this.collider=GK({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=b9(s,a),u=b9(s,l),d=(c+u)/2,f=d+Math.PI,p=Math.max(d,f),h=Math.min(d,f),m=c>u;if(1===n){const e=b9(a,s);r.push(v9(a,e-y9,t)),i.unshift(v9(a,e+y9,t))}const g=m?p:h,y=m?h:p;if(r.push(v9(s,g,t)),i.unshift(v9(s,y,t)),n===o-1){const e=b9(l,s);r.push(v9(l,e+y9,t)),i.unshift(v9(l,e-y9,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=GK({type:"polyline",points:t},e.collider)})}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:h7(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=ZK(rX(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points),4),n=t[0],r=t[1],i=t[2],o=t[3];return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function k9(e){let t=e.data,n=e._boundingRect,r=e._textBoundsFn;return null!=t&&(n||r)}class C9 extends t9{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.dx,a=void 0===o?0:o,s=e.dy,l=void 0===s?0:s,c=e.textBoundsFn,u=e.text,d=e.title,f=e.collider,p=e.boundingRect,h=e.ellipsed;super.set(e),this.attrs.x=n,this.attrs.y=i,this.attrs.dx=a,this.attrs.dy=l,this.attrs.text=u,void 0!==d&&(this.attrs.title=String(d)),"object"==typeof p?this._textBoundsFn=()=>p:"function"==typeof c&&(this._textBoundsFn=c),"string"==typeof h&&(this.ellipsed=h),this.collider=GK({type:k9(this)?"bounds":null},f),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=oX(e),r=ZK(rX(t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n),4),i=r[0],o=r[1],a=r[2],s=r[3];return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}let E9=class extends t9{constructor(){super("image"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s,c=e.rx,u=void 0===c?0:c,d=e.ry,f=void 0===d?0:d,p=e.src,h=e.collider,m=e.cx,g=void 0===m?0:m,y=e.cy,b=void 0===y?0:y,v=e.r,x=void 0===v?0:v,w=e.opacity,S=e.imageScalingFactor,k=e.imagePosition,C=e.symbol;let E;E="circle"===e.symbol?GK({type:"circle",cx:g,cy:b,r:x},h):GK({type:"bounds",x:n,y:i,width:a,height:l},h),super.set(e),a>=0?(this.attrs.x=n,this.attrs.width=a):(this.attrs.x=n+a,this.attrs.width=-a),l>=0?(this.attrs.y=i,this.attrs.height=l):(this.attrs.y=i+l,this.attrs.height=-l),u>0&&(this.attrs.rx=u),f>0&&(this.attrs.ry=f),p&&(this.attrs.src=p),this.attrs.r=x,this.attrs.cx=g,this.attrs.cy=b,this.attrs.opacity=void 0!==w?w:1,this.attrs.imageScalingFactor=void 0!==S?S:1,this.attrs.imagePosition=k||"center-center",this.attrs.symbol=C||"rectangle",this.collider=E,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},e.collider||(this.attrs.updateCollider=this.updateCollider.bind(this))}updateCollider(e){let t;t="circle"===e.symbol?GK(this.collider,{type:"circle",cx:e.cx,cy:e.cy,r:e.r}):GK(this.collider,{type:"bounds",x:e.x,y:e.y,width:e.width,height:e.height}),this.collider=t}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=oX(this.attrs),n=ZK(rX(e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t),4),r=n[0],i=n[1],o=n[2],a=n[3];return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];if("circle"===this._node.symbol){const t=this.boundingRect(e),n=Math.min(t.width,t.height)/2,r=t.x-n,i=t.y-n;let o=2*n,a=2*n,s=[{x:r,y:i},{x:r+o,y:i},{x:r+o,y:i+a},{x:r,y:i+a}];if(e&&this.modelViewMatrix){s=this.modelViewMatrix.transformPoints(s);const t=ZK(rX(s),4),n=t[0],r=t[1];o=t[2]-n,a=t[3]-r,this.__bounds[e]=[{x:n,y:r},{x:n+o,y:r},{x:n+o,y:r+a},{x:n,y:r+a}]}else this.__bounds[e]=s;return this.__bounds[e]}const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}};const M9=hJ();function R9(e,t){return M9.get(e)(t)}M9.add("rect",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new h9(...t)}),M9.add("circle",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new m9(...t)}),M9.add("text",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new C9(...t)}),M9.add("line",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new g9(...t)}),M9.add("path",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new S9(...t)}),M9.add("stage",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new a9(...t)}),M9.add("container",o9),M9.add("defs",o9),M9.add("linearGradient",u9),M9.add("radialGradient",u9),M9.add("conicGradient",u9),M9.add("stop",u9),M9.add("pattern",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new p9(...t)}),M9.add("image",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new E9(...t)});const _9=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return GK(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function A9(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function P9(e,t,n){e.node=n[t],e.index=t}function I9(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(P9(o,a,e),A9(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=_9.save(o.node);const s=R9(o.node.type,o.node);s&&(o.node.transform&&(n.save(),j7(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&I9(o.node.children,s,n,r),o.node.transform&&n.restore()),_9.restore()}}function T9(e){let t=e.items,n=e.stage,r=e.dpi,i=e.on,o=void 0===i?{}:i;return n||(n=R9("stage",r)),I9(t,n,new T7,o),n}function D9(e,t,n){const r=n.orientation,i=n.degree,o=n.stops,a=void 0===o?[]:o;let s=null;if("radial"===r){const n=t.boundingRect();s=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,i=n.y||0;s=e.createConicGradient(t,r,i)}else{const r=D2(i);["x1","x2","y1","y2"].forEach(e=>{e in n&&(r[e]=n[e])});const o=t.boundingRect();s=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=a.length;e<t;e++){let t=a[e];s.addColorStop(t.offset,t.color)}return s}function O9(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach(e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)}),n.fill(),n.restore(),n.createPattern(t,"repeat")}function N9(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=e.y,r=e.width,i=e.height,o=e.scaleRatio,a=e.margin,s=e.edgeBleed;const l={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return l.x=isNaN(t)?l.x:t,l.y=isNaN(n)?l.y:n,l.width=isNaN(r)?l.width:r,l.height=isNaN(i)?l.height:i,void 0!==o&&(l.scaleRatio.x=isNaN(o.x)?l.scaleRatio.x:o.x,l.scaleRatio.y=isNaN(o.y)?l.scaleRatio.y:o.y),void 0!==a&&(l.margin.left=isNaN(a.left)?0:a.left,l.margin.top=isNaN(a.top)?0:a.top),"object"==typeof s&&["left","right","top","bottom"].forEach(e=>{!isNaN(s[e])&&s[e]>0&&(l.edgeBleed[e]=s[e],l.edgeBleed.bool=!0)}),l.computedPhysical={x:Math.round(l.margin.left+(l.x-l.edgeBleed.left)*l.scaleRatio.x),y:Math.round(l.margin.top+(l.y-l.edgeBleed.top)*l.scaleRatio.y),width:Math.round((l.width+l.edgeBleed.left+l.edgeBleed.right)*l.scaleRatio.x),height:Math.round((l.height+l.edgeBleed.top+l.edgeBleed.bottom)*l.scaleRatio.y)},l}function q9(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:a8,textBounds:l8,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function L9(e){return t=>{let n=t.node;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const j9=200,z9=200;class F9{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,n=e.rect,r=e.dpiRatio,i=e.canvasBufferSize;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*j9,height:n.computedPhysical.height+2*z9},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const $9=hJ();function B9(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function H9(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function V9(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function W9(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function U9(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=D9(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=D9(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),W9(t,o,n,a),o.modelViewMatrix&&V9(o.modelViewMatrix.elements,t),$9.has(o.type)&&$9.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&U9(o.children,t,n,r),t.restore()}}function G9(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T9;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=N9();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",B9]];let l;const c=q9();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach(t=>{void 0!==e[t]&&(r[t]=e[t])}),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new F9(e)),n.appendChild(e),e),c.getScene=r=>{const i=H9(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[X6(c.measureText),L9(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||O9(e,t,n),r[i]):O9(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=H9(u),f=t&&r.transform();if(f)return e.width=e.width,function(e){let t=e.el,n=e.dpiRatio,r=e.transform;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:f}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const p=c.getScene(n),h=!i||!p.equals(i);l.clear();const m=o||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),U9(p.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&p.children.unshift(...i.children),i=p,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=N9(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function Y9(e,t){$9.add(e,t)}function K9(e,t){return Math.max(0,Math.min(e,t))}const X9=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),J9=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Q9=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Z9(e){return X9.test(e)}function eee(e){return J9.test(e)||Q9.test(e)}function tee(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],Z9(n))return"ltr";if(eee(n))return"rtl"}return"ltr"}const nee={start:"end",end:"start",center:"center",middle:"middle"};function ree(e,t){return"rtl"===t?nee[e]:e}function iee(e,t){if(iee.cache[e])return void t(iee.cache[e]);const n=new Image;n.src=e,n.onload=()=>{iee.cache[e]=n,t(n)},n.onerror=e=>{console.error("Image load error",e)}}function oee(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=oee([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=oee(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function aee(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function see(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function lee(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(aee(i.diff.added,i.object,t),see(i.diff.removed,r),lee(i.diff.items,t,n,r)))}function cee(e,t,n,r,i,o){const a=oee(e,t);return aee(a.added,n,r),see(a.removed,o),lee(a.items,r,i,o),a.items}iee.cache={},Y9("rect",function(e,t){let n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=K9(r/2,o>0?o:a),a=K9(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()}),Y9("circle",function(e,t){let n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()}),Y9("line",function(e,t){let n=t.g,r=t.doStroke;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()}),Y9("path",function(e,t){let n=t.g,r=t.doStroke,i=t.doFill;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)}),Y9("text",function(e,t){let n=t.g,r=t.ellipsed,i=t.doStroke;const o=r||J6(e,a8);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter(e=>!!e).join(" ");const a=tee(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=ree("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=Q6(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)}),Y9("image",function(e,t){let n=t.g;const r=n.canvas,i=n.getTransform(),o=window.devicePixelRatio||1,a=r.clientWidth*o,s=r.clientHeight*o;r.width===a&&r.height===s||(r.width=a,r.height=s),iee(e.src,t=>{if(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.width,r.height),n.setTransform(i),n.globalAlpha=e.opacity,e.width||e.height||(e.width=t.naturalWidth*e.imageScalingFactor,e.height=t.naturalHeight*e.imageScalingFactor),function(e){const t=e.imagePosition||"center-center";let n=e.width,r=e.height;if("circle"===e.symbol){const t=Math.min(e.width,e.height)/2;n=2*t,r=2*t}switch(t){case"top-center":e.y-=r/2;break;case"center-left":e.x-=n/2;break;case"center-right":e.x+=n/2;break;case"top-left":e.x-=n/2,e.y-=r/2;break;case"top-right":e.x+=n/2,e.y-=r/2;break;case"bottom-left":e.x-=n/2,e.y+=r/2;break;case"bottom-right":e.x+=n/2,e.y+=r/2;break;case"bottom-center":e.y+=r/2}}(e),"circle"===e.symbol){const r=e.x,i=e.y;e.r=Math.min(e.width,e.height)/2;const o=r-e.width/2,a=i-e.height/2;n.save(),n.beginPath(),n.arc(r,i,e.r,0,2*Math.PI),n.clip(),n.drawImage(t,o,a,e.width,e.height),n.restore()}else e.x-=e.width/2,e.y-=e.height/2,n.drawImage(t,e.x,e.y,e.width,e.height);n.globalAlpha=1,e.updateCollider&&e.updateCollider(e)})});const uee="http://www.w3.org/2000/svg",dee=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(uee,"container"===e?"g":e);return t.appendChild(n),n},fee=e=>{e.parentNode&&e.parentNode.removeChild(e)};function pee(e){let t=e.element,n=e.attrs;return function(){const e=n.width,r=n.height,i=n.imagePosition,o=n.imageScalingFactor,a=n.symbol;let s=n.x,l=void 0===s?0:s,c=n.y,u=void 0===c?0:c,d=e>0?e:this.naturalWidth,f=r>0?r:this.naturalHeight;switch(o&&(d*=o,f*=o),i){case"top-center":u-=f/2;break;case"center-left":l-=d/2;break;case"center-right":l+=d/2;break;case"top-left":l-=d/2,u-=f/2;break;case"top-right":l+=d/2,u-=f/2;break;case"bottom-left":l-=d/2,u+=f/2;break;case"bottom-right":l+=d/2,u+=f/2;break;case"bottom-center":u+=f/2}if(t.setAttribute("width",d),t.setAttribute("height",f),t.setAttribute("x",l-d/2),t.setAttribute("y",u-f/2),t.setAttribute("preserveAspectRatio","none"),"circle"===a){const e=t.ownerSVGElement;if(!e)return;const n="clip-".concat(Math.random().toString(36).substr(2,9));if(!e.querySelector("#".concat(n))){const t=e.querySelector("defs")||e.insertBefore(document.createElementNS(uee,"defs"),e.firstChild),r=document.createElementNS(uee,"clipPath");r.setAttribute("id",n);const i=document.createElementNS(uee,"circle");i.setAttribute("cx",l),i.setAttribute("cy",u),i.setAttribute("r",Math.min(d,f)/2),r.appendChild(i),t.appendChild(r)}t.setAttribute("clip-path","url(#".concat(n,")"))}}}const hee=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":case"image":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||J6(t.attrs,a8);const n=tee(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",ree(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(uee,"title");n.textContent=t.attrs.title,e.appendChild(n)}else if("image"===t.type&&"src"===n){e.setAttributeNS("http://www.w3.org/1999/xlink","href",t.attrs.src);let n=new Image;n.src=t.attrs.src,n.onload=pee({element:e,attrs:t.attrs})}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?Q6(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class mee{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function gee(){return new mee(cee,dee,hee,fee)}function yee(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function bee(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uee,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T9;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:gee)();let r,i,o,a=!1,s=N9();const l={transform:void 0,disableScreenReader:!1},c=q9(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yee,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach(a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach(e=>{t.children.push(e)}),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")})},clear(){n={}}};return i}(u.children),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yee,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let t=i[o],r=t.orientation,a=t.degree,c=t.stops,u=void 0===c?[]:c,d={};void 0===a&&(a=90),"radial"===r?d.type="radialGradient":(d=D2(a),["x1","x2","y1","y2"].forEach(e=>{e in i[o]&&(d[e]=i[o][e])}),d.type="linearGradient"),d.id=l,d.children=u.map(e=>{let t=e.offset,n=e.color,r=e.opacity;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}}),e.push(d),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach(t=>{void 0!==e[t]&&(l[t]=e[t])}),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},f.onCreate,d.onCreate,X6(c.measureText),L9(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const e=t.horizontalScaling,n=t.horizontalSkewing,r=t.verticalSkewing,o=t.verticalScaling,a=t.horizontalMoving,s=t.verticalMoving;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),f.clear(),d.clear(),u.children.length=0;const p=c.getScene(e),h=!o||!p.equals(o),m=a||h;return m&&(c.clear(),n.render(p.children,i)),a=!1,o=p,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=N9(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var vee,xee,wee,See,kee,Cee,Eee,Mee={},Ree=[],_ee=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Aee(e,t){for(var n in t)e[n]=t[n];return e}function Pee(e){var t=e.parentNode;t&&t.removeChild(e)}function Iee(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?vee.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Tee(e,a,r,i,null)}function Tee(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++wee:i};return null==i&&null!=xee.vnode&&xee.vnode(o),o}function Dee(e){return e.children}function Oee(e,t){this.props=e,this.context=t}function Nee(e,t){if(null==t)return e.__?Nee(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Nee(e):null}function qee(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return qee(e)}}function Lee(e){(!e.__d&&(e.__d=!0)&&See.push(e)&&!jee.__r++||kee!==xee.debounceRendering)&&((kee=xee.debounceRendering)||Cee)(jee)}function jee(){var e,t,n,r,i,o,a,s;for(See.sort(Eee);e=See.shift();)e.__d&&(t=See.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Aee({},o)).__v=o.__v+1,Gee(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?Nee(o):a,o.__h),Yee(r,o),o.__e!=a&&qee(o)),See.length>t&&See.sort(Eee));jee.__r=0}function zee(e,t,n,r,i,o,a,s,l,c){var u,d,f,p,h,m,g,y=r&&r.__k||Ree,b=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(p=n.__k[u]=null==(p=t[u])||"boolean"==typeof p||"function"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?Tee(null,p,null,null,p):Array.isArray(p)?Tee(Dee,{children:p},null,null,null):p.__b>0?Tee(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=y[u])||f&&p.key==f.key&&p.type===f.type)y[u]=void 0;else for(d=0;d<b;d++){if((f=y[d])&&p.key==f.key&&p.type===f.type){y[d]=void 0;break}f=null}Gee(e,p,f=f||Mee,i,o,a,s,l,c),h=p.__e,(d=p.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||h,p)),null!=h?(null==m&&(m=h),"function"==typeof p.type&&p.__k===f.__k?p.__d=l=Fee(p,l,e):l=$ee(e,p,f,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=Nee(f))}for(n.__e=m,u=b;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=Bee(r).nextSibling),Jee(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Xee(g[u],g[++u],g[++u])}function Fee(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Fee(r,t,n):$ee(n,r,r,i,r.__e,t));return t}function $ee(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function Bee(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Bee(n)))return r;return null}function Hee(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||_ee.test(t)?n:n+"px"}function Vee(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Hee(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Hee(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Uee:Wee,o):e.removeEventListener(t,o?Uee:Wee,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Wee(e){return this.l[e.type+!1](xee.event?xee.event(e):e)}function Uee(e){return this.l[e.type+!0](xee.event?xee.event(e):e)}function Gee(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,h,m,g,y,b,v,x,w,S,k,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=xee.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,b):(t.__c=u=new Oee(g,b),u.constructor=C,u.render=Qee),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Aee({},u.__s)),Aee(u.__s,C.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,b),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,b)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),v=0;v<u._sb.length;v++)u.__h.push(u._sb[v]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,b),null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(f,p,h)})}if(u.context=b,u.props=g,u.__P=e,x=xee.__r,w=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=Aee(Aee({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(h=u.getSnapshotBeforeUpdate(f,p)),k=null!=c&&c.type===Dee&&null==c.key?c.props.children:c,zee(e,Array.isArray(k)?k:[k],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Kee(n.__e,t,n,r,i,o,a,l);(c=xee.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),xee.__e(e,t,n)}}function Yee(e,t){xee.__c&&xee.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){xee.__e(e,t.__v)}})}function Kee(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,f=t.props,p=t.type,h=0;if("svg"===p&&(i=!0),null!=o)for(;h<o.length;h++)if((l=o[h])&&"setAttribute"in l==!!p&&(p?l.localName===p:3===l.nodeType)){e=l,o[h]=null;break}if(null==e){if(null===p)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),o=null,s=!1}if(null===p)d===f||s&&e.data===f||(e.data=f);else{if(o=o&&vee.call(e.childNodes),c=(d=n.props||Mee).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||Vee(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||Vee(e,o,t[o],n[o],r)}(e,f,d,i,s),u)t.__k=[];else if(h=t.props.children,zee(e,Array.isArray(h)?h:[h],t,n,r,i&&"foreignObject"!==p,o,a,o?o[0]:n.__k&&Nee(n,0),s),null!=o)for(h=o.length;h--;)null!=o[h]&&Pee(o[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==e.value||"progress"===p&&!h||"option"===p&&h!==d.value)&&Vee(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&Vee(e,"checked",h,d.checked,!1))}return e}function Xee(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){xee.__e(e,n)}}function Jee(e,t,n){var r,i;if(xee.unmount&&xee.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Xee(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){xee.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Jee(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Pee(e.__e),e.__=e.__e=e.__d=void 0}function Qee(e,t,n){return this.constructor(e,n)}function Zee(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createElement,t=void 0===e?document.createElement.bind(document):e;let n,r,i=N9();const o={transform:void 0,disableScreenReader:!1},a=q9();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach(t=>{void 0!==e[t]&&(o[t]=e[t])}),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const e=t.horizontalScaling,r=t.horizontalSkewing,i=t.verticalSkewing,o=t.verticalScaling,a=t.horizontalMoving,s=t.verticalMoving;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return o.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?Iee("div",null,e):e,r=function(e,t,n){var r,i,o;xee.__&&xee.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Gee(t,e=(!r&&n||t).__k=Iee(Dee,null,[e]),i||Mee,Mee,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?vee.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),Yee(o,e)}(a,n,r),!0},a.renderArgs=[Iee],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=N9(e)),i),a}vee=Ree.slice,xee={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},wee=0,Oee.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Aee({},this.state),"function"==typeof e&&(e=e(Aee({},n),this.props)),e&&Aee(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Lee(this))},Oee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Lee(this))},Oee.prototype.render=Dee,See=[],Cee="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Eee=function(e,t){return e.__v.__b-t.__v.__b},jee.__r=0;var ete=[function(e){e.renderer("svg",bee)},function(e){e.renderer("canvas",G9)},function(e){e.renderer("dom",Zee)}];const tte={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const nte=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.level,n=void 0===t?tte.OFF:t,r=e.pipe,i=void 0===r?console:r,o=n;const a={[tte.OFF]:()=>{},[tte.ERROR]:function(){return i.error(...arguments)},[tte.WARN]:function(){return i.warn(...arguments)},[tte.INFO]:function(){return i.info(...arguments)},[tte.DEBUG]:function(){return i.log(...arguments)}},s=function(e){if(e&&!(o<e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(a[e]||a[tte.DEBUG])(...n)}};return{log:s,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(tte.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(tte.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(tte.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(tte.DEBUG,...t)},level:e=>("number"==typeof e&&(o=e),o),LOG_LEVEL:tte}}(t.logger),i={component:hJ(n.component,"component",r),data:hJ(n.data,"data",r),formatter:hJ(n.formatter,"formatter",r),interaction:hJ(n.interaction,"interaction",r),renderer:t3(n.renderer),scale:hJ(n.scale,"scale",r),symbol:hJ(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:GK({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>e3(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach(e=>{o[e]=i[e]}),o.version=YK,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:n3,data:s3,formatter:jZ,interaction:l3,renderer:t3(),scale:z1,symbol:W2});g7.forEach(nte.use),ete.forEach(nte.use),[].forEach(nte.use);const rte=e=>({key:"bars",type:"box",data:{extract:{field:UG,props:{start:0,end:{field:GG}}}},settings:{major:{scale:YG},minor:{scale:KG},box:{maxWidthPx:8,fill:{fn:e}}}}),ite=e=>({key:"p",type:"point",data:{extract:{field:UG,props:{y:{field:GG}}}},settings:{x:{scale:YG},y:{scale:KG},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),ote=({qNum:e})=>void 0===e?0:Math.sign(e),ate=(e,t)=>{const{primary:n,nil:r,others:i}=e.getDataColorSpecials(),o=lm(e,t?.negative,n),a=lm(e,t?.positive,n);return{key:"pos-neg",type:"box",data:{extract:{field:UG,props:{start:0,end:{field:GG,value:ote}}}},settings:{major:{scale:YG},minor:{scale:KG},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?r:-3===e.datum.value?i:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?o:a}}}}},ste=(e,{type:t,showDots:n,colors:r,colorMin:i,colorMax:o})=>{const a=((e,t,n,r)=>{const{primary:i,nil:o,others:a}=e.getDataColorSpecials(),s=lm(e,t?.main,i),l=lm(e,t?.max,s),c=lm(e,t?.min,s),u=lm(e,t?.first,s),d=lm(e,t?.last,s);return e=>{const t=KG in e.datum?KG:"end";return-2===e.datum.value?o:-3===e.datum.value?a:e.datum[t].value>=r?l:e.datum[t].value<=n?c:e.data.items.at(0)===e.datum?u:e.data.items.at(-1)===e.datum?d:s}})(e,r,i,o);switch(t){case"bars":return[rte(a)];case"dots":return[ite(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:UG,props:{v:{field:GG}}}},settings:{coordinates:{major:{scale:YG},minor:{scale:KG,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(lm(e,r?.main,e.getDataColorSpecials().primary));return n?[t,ite(a)]:[t]}case"posNeg":return[ate(e,r)];default:return[]}},lte=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"}),cte=(e,t,n,r)=>({y:{data:{field:GG},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:n},x:{data:{extract:{field:UG}},paddingInner:.3,paddingOuter:0,invert:"rtl"===r,align:"rtl"===r?1:0,maxPxStep:12}}),ute=nte();ute.use(jK),ute.renderer.prio(["canvas"]);const dte={resolve:()=>{},promise:{}},fte=({chart:e,element:t,requestId:n,theme:r,isSnapshot:i,direction:o,miniChartData:a,downloadService:s})=>{const{resolveChartPromise:l,addChartPromiseToQueue:c}=(e=>{const t=an.useRef(e.isDownloadedAsPDForImage?We():dte);return{addChartPromiseToQueue:an.useCallback(()=>{e.waitForPromise(t.current.promise)},[e]),resolveChartPromise:t.current.resolve}})(s),u=an.useCallback(()=>{if(null===t.current||null!==e.current)return;c();n.current=VG(()=>{t.current&&(e.current=(({element:e,theme:t,isSnapshot:n,miniChartData:r,onChartRendered:i,direction:o})=>{const{type:a,qMatrix:s,minY:l,maxY:c}=r;return ute.chart({element:e,data:{type:"q",key:"qHyperCube",data:lte(s)},settings:{scales:cte(a,l,c,o),components:ste(t,r),strategy:n?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{i()}})})({element:t.current,theme:r,isSnapshot:i,miniChartData:a,direction:o,onChartRendered:l}))},{timeout:2e3})},[t,e,c,n,r,i,a,o,l]);return{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:an.useCallback(()=>{null!==n.current&&WG(n.current),n.current=null,l()},[n,l])}},pte=e=>{const t=an.useRef(null),n=an.useRef(!1);return an.useCallback(r=>{const i=r.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(WG(e.current),e.current=null)})(t),n.current?0!==i?null!==e.current&&(t.current=VG(()=>{e.current?.update()},{timeout:2e3})):n.current=!1:n.current=!0},[e])},hte=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:n,isSnapshot:r,miniChartData:i,downloadService:o,direction:a})=>{const s=an.useRef(null),l=an.useRef(null),c=an.useRef(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:d}=fte({element:s,chart:l,requestId:c,theme:n,isSnapshot:r,direction:a,miniChartData:i,downloadService:o});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:n,renderChartWithRequestIdleCallback:r,chart:i})=>{const o=an.useCallback(e=>{e.isIntersecting?r():n()},[r,n]);an.useEffect(()=>{if(!e.current||!t)return()=>{};const r=e.current;return t.addTask(r,o),()=>{t.removeTask(r),n(),i.current?.destroy(),i.current=null}},[i,e,t,n,o])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:u,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:n,intersectionObserverTaskScheduler:r})=>{an.useEffect(()=>r?()=>{}:(e(),()=>{t(),n.current?.destroy(),n.current=null}),[r,t,e,n])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:d,renderChartWithRequestIdleCallback:u,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:n})=>{const r=pte(t);an.useEffect(()=>{const t=e.current;return t?(n.addTask(t,r),()=>{n.removeTask(t)}):()=>{}},[e,r,n])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},mte=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s})=>{const l=hte({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:n,theme:r,isSnapshot:i,miniChartData:o,downloadService:a,direction:s});return vt.jsx("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},gte=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}`},yte=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},bte=({representation:e,textStyle:t,maxImageHeight:n,wrapInContainer:r})=>{const i=zg(my),{url:o,text:a,imageSize:s,resolvedImagePosition:l}=e,c="fitHeight"===s,u=vt.jsx("img",{src:o,alt:a,style:{...t,width:c?"auto":"100%",height:"100%",maxHeight:n,objectFit:yte(s),objectPosition:gte(l),overflow:"hidden"}});return r?vt.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:c?n:"100%",overflow:"hidden",display:"flex",justifyContent:c?N$(i,e):void 0},children:u}):u},vte=(e,t)=>vt.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:vt.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})}),xte=an.forwardRef(vte),wte=(e,t)=>vt.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:vt.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"})}),Ste=an.forwardRef(wte),kte=(e,t)=>vt.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:[vt.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"}),vt.jsx("use",{fillRule:"evenodd"})]}),Cte=an.forwardRef(kte),Ete=(e,t)=>vt.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:vt.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"})}),Mte=an.forwardRef(Ete),Rte=(e,t)=>vt.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:vt.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"})}),_te=an.forwardRef(Rte),Ate=(e,t)=>vt.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:vt.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"})}),Pte=an.forwardRef(Ate),Ite=(e,t)=>vt.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:vt.jsx("path",{d:"M2 7.5h12v1H2z"})}),Tte=an.forwardRef(Ite),Dte=(e,t)=>vt.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:vt.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"})}),Ote=an.forwardRef(Dte),Nte=(e,t)=>vt.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:vt.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"})}),qte=an.forwardRef(Nte),Lte=(e,t)=>vt.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:vt.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"})}),jte=an.forwardRef(Lte),zte=(e,t)=>vt.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:vt.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"})}),Fte=an.forwardRef(zte),$te=(e,t)=>vt.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:vt.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})}),Bte=(e,t)=>vt.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:vt.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"})}),Hte=(e,t)=>vt.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:vt.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"})}),Vte=(e,t)=>vt.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:vt.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"})}),Wte={m:an.forwardRef($te),"ï":jte,R:tG,S:ZU,T:an.forwardRef(Bte),U:an.forwardRef(Hte),P:qte,Q:Pte,"è":an.forwardRef(Vte),"¢":Mte,"©":Cte,"23F4":_te,2013:Fte,"&":Ote,add:xte,"minus-2":Tte,dot:Ste},Ute=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&Wte[t];return i&&vt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:vt.jsx(i,{style:{height:e}})})},Gte=({representation:e,cellValue:t,paginationCellAlign:n})=>{const r=zg(FH),i=zg(my),o=zg(Iy),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=R$(e,t,i,o),d=(e=>parseInt(e||P$,10))(r.measure.values.fontSize),{color:f,iconKey:p,position:h}=u||{};return l?vt.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:n??"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:c?f:void 0},children:["left"===h&&Ute({size:d,iconKey:p,color:f}),vt.jsx(NU,{isNumeric:!0,children:a}),"right"===h&&Ute({size:d,iconKey:p,color:f})]}):Ute({size:d,iconKey:p,color:f})},Yte=(e,t,n)=>e.contentStaticLineCount?t*(n??e.grid.contentLineClamp):t,Kte=({forwardRef:e,cell:t,style:n,virtualizedCell:r,lineClamp:i,intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const l=zg(FH),c=zg(HH),u=zg(Hg),d=zg(Yg),f=zg(Iy),p=zg(my),h=zg(sy),m=zg(iy);if(t.representation.type===Az.Image&&!t.representation.url?.trim())return null;if(t.representation.type===Az.Image)return vt.jsx(bte,{representation:t.representation,textStyle:n,maxImageHeight:Yte(l,c,i),wrapInContainer:!r});let g=t.representation.text;t.representation.type!==Az.Link||m||t.isNull||(g=vt.jsx(HG,{href:t.representation.url,text:t.representation.text,interactions:h,color:n.cellForegroundColor}));const y=(e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN)(t.qIsNull?t.representation.text:t.qNum);return t.representation.type!==Az.Indicator||Number.isNaN(y)?t.representation.type===Az.MiniChart&&t.representation.miniChart&&!t.isNull?vt.jsx(mte,{height:Yte(l,c,i),intersectionObserverTaskScheduler:o,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:f,isSnapshot:!!d.snapshotData,direction:p,downloadService:u}):vt.jsx(NU,{forwardRef:e,isDual:t.isDual,isNumeric:t.isNumeric,lineClamp:i,isPagination:!r,children:g}):vt.jsx(Gte,{representation:t.representation,cellValue:y,paginationCellAlign:r?void 0:s})},Xte=()=>vt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"0.75em",height:"0.75em",children:vt.jsx("path",{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"})}),Jte=ic("div")({"& path":{stroke:"none !important"}}),Qte=({children:e,cellSelectionState:t,hideTickIcon:n})=>t!==f$.Selected||n?e:vt.jsxs(DU,{children:[e,vt.jsx(Jte,{children:vt.jsx(Xte,{})})]}),Zte=e=>{const t=function(){const e=xq(),t=nq(()=>null==e?void 0:e.dragOperation.source,[e]),n=nq(()=>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},ene=(e,t,n,r)=>({handleMouseDown:r=>{e?.(r);const i=r.target;if(t.isSelectable&&"A"!==i.tagName){const e=()=>{n({type:p$.SelectMultiEnd})};n({type:p$.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&n({type:p$.SelectMultiAdd,payload:{cell:t,evt:e,announce:r}})},handleMouseUp:e=>{0===e.button&&n({type:p$.SelectMouseUp,payload:{cell:t,evt:e,announce:r}})}}),tne=e=>{const t=zg(PH),n=zg(CH),r=zg(EG),i=zg(_y),o=zg(my),a=Fg(wG),s=Fg(iU),l=zg(wy),c=zg(uy),u=zg(oy),d=d=>{IG({evt:d,rootElement:i,selectionsAPI:u,cell:e,selectionDispatch:s,isSelectionsEnabled:c,setFocusedCellCoord:a,announce:r,keyboard:l,paginationNeeded:t,totalsPosition:n,direction:o})},f=e=>{((e,t)=>{e.key===Lm.Shift&&t({type:p$.SelectMultiEnd})})(e,s)},p=()=>{((e,t,n,r,i)=>{const{pageRowIdx:o,pageColIdx:a}=e,s=i.atTop?o+2:o+1;wU([s,a],t,n,r)})(e,i,a,l,n)};if(!c)return{onKeyDown:d,onKeyUp:f,onMouseDown:p};const{handleMouseDown:h,handleMouseOver:m,handleMouseUp:g}=ene(p,e,s,r);return{onKeyDown:d,onKeyUp:f,onMouseDown:h,onMouseUp:g,onMouseOver:m}},nne=e=>{an.useEffect(()=>()=>{oU.remove(e)},[e])},rne=(e,t,n,r)=>{if(!n.isNull)return e;const i=r?t.dimensionNull:t.measureNull,o={...e,...i};if(!t.grid.zebraStripes.show)return o;const a=r?t.grid.zebraStripes.overrideDimNullValueColor:t.grid.zebraStripes.overrideMeasNullValueColor,s=r?t.grid.zebraStripes.overrideDimNullValueBackground:t.grid.zebraStripes.overrideMeasNullValueBackground;return a&&(o.color=e.color),s&&(o.background=e.background),o},ine=(e,t,n)=>{const{color:r,background:i}=e.grid.zebraStripes[n];return{...t,...r?{color:r}:void 0,...i?{background:i}:void 0}},one=(e,t,n)=>{if(t.grid.zebraStripes.show){const r=(n.rowIdx+1)%2==0;return ine(t,e,r?"even":"odd")}return e},ane=(e,t)=>{const n=zg(FH),r=zg(oU(e)),i=zg(Ug),o=e.isTotalRow&&i("TLV-2303-SUB-TOTALS");nne(e);let a=t.isDim?n.dimension.values:n.measure.values;a=one(a,n,e),a=o?n.subTotalRow:a,a=rne(a,n,e,t.isDim);const s=e.isNull||o&&t.isDim?a:lB(a,e.qAttrExps,t.qAttrExprInfoIDs),l=o?s:function(e,t,n){return t===f$.Selected?{...e,...n}:t===f$.Disabled?{...e,background:`${_$}, ${e.background}`}:e}(s,r,n.selectedColors);return{cellStyle:{...l,borderColor:n.grid.border},representationStyle:s,cellSelectionState:r}},sne=ic(Sh,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})(({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}})),lne=ic(Hh,{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}}})),cne=ic(Rh,{shouldForwardProp:e=>"cellStyle"!==e})(({cellStyle:e,theme:t})=>({...D$,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",boxSizing:"border-box",width:"100%",height:"100%"})),une=ic(Rh,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})(({totalsStyle:e,atTop:t,headRowHeight:n,theme:r})=>({...D$,...e,fontWeight:I$,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})),dne=({cell:e,column:t,columnIndex:n,intersectionObserverTaskScheduler:r,resizeObserverTaskScheduler:i})=>{const o=zg(my),a=zg(sy),{onKeyDown:s,onKeyUp:l,onMouseDown:c,onMouseUp:u,onMouseOver:d}=tne(e),{cellStyle:f,representationStyle:p,cellSelectionState:h}=ane(e,t),m=Zte(t.id);return vt.jsx(cne,{cellStyle:{...f,opacity:m},scope:0===n?"row":void 0,component:0===n?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${h} ${qm}`,title:a.passive?e.representation.text:void 0,onKeyDown:s,onKeyUp:l,onMouseDown:c,onMouseUp:u,onMouseOver:d,children:vt.jsx(Qte,{cellSelectionState:h,hideTickIcon:!!e.isTotalRow,children:vt.jsx(Kte,{cell:e,style:p,intersectionObserverTaskScheduler:r,resizeObserverTaskScheduler:i,paginationCellAlign:z$(o,e.align)})})})},fne=Rg(0),pne=({column:e,totalsPosition:t,onKeyDown:n,onMouseDown:r})=>{const i=zg(FH),o=zg(cy),a=zg(fne),s=Zte(e.id);return vt.jsx(une,{totalsStyle:{...i.totalRow,...lU(i,t,!1),opacity:s},headRowHeight:a,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${qm}`,tabIndex:-1,title:o?e.totalInfo:void 0,onKeyDown:n,onMouseDown:r,children:vt.jsx(NU,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},hne=()=>{const e=zg(CH),t=zg(EH),n=zg(RH),r=zg(_y),i=zg(ly),o=zg(my),a=Fg(wG),s=zg(iy),l=zg(wy);return vt.jsx(Hh,{className:"sn-table-row sn-table-totals-row",children:t.map((t,c)=>{const u=[e.atTop?1:n.length+1,c];return vt.jsx(pne,{column:t,totalsPosition:e,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:n,isInteractionEnabled:r}=e;if(!t&&r)switch(n.key){case Lm.C:RG(n);break;case Lm.Space:n.preventDefault();break;default:_G(e)}else dm(n)})({evt:e,rootElement:r,cellCoord:u,setFocusedCellCoord:a,isSelectionMode:s,isInteractionEnabled:i,direction:o})},onMouseDown:()=>{wU(u,r,a,l)}},t.id)})})};var mne=an.memo(hne);const gne=({updateShouldRefocus:e,tableWrapperRef:t})=>{const n=zg(RH),r=zg(CH),i=zg(EH),o=zg(FH),a=zg(VH),s=zg(WH),l=zg(Yg),c=!!iB(l)?.content?.hoverEffect;FG({updateShouldRefocus:e,tableWrapperRef:t});const u=(e=>{const t=an.useCallback(t=>new IntersectionObserver(e=>{e.forEach(e=>{const n=t.get(e.target);n?.(e)})},{root:e.current}),[e]);return LG(t)})(t),d=zG();return vt.jsxs(sne,{lastRowBottomBorder:o.grid.lastRowBottomBorder,children:[r.atTop?vt.jsx(mne,{}):void 0,n.map((e,t)=>{const n=e.at(0)?.isTotalRow??!1;return vt.jsx(lne,{hoverColors:o.grid.hoverColors,hover:c,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:n?s:a,children:i.map((t,n)=>{const{id:r}=t,i=e[n];return vt.jsx(dne,{columnIndex:n,cell:i,column:t,intersectionObserverTaskScheduler:u,resizeObserverTaskScheduler:d},r)})},`row-${t}`)}),r.atBottom?vt.jsx(mne,{}):void 0]})};var yne=an.memo(gne);const bne=(e,t)=>!!e?.skipHeader||!!t.hideHeader,vne=Rg(e=>{const t=e(Yg),n=e(Sy);if(n)return(e,{isDim:r,colIdx:i})=>{const o=r?i:i-t.qHyperCube.qDimensionInfo.length,a=`/qHyperCubeDef/${r?"qDimensions":"qMeasures"}/${o}/qDef/columnWidth`,s=t.qHyperCube[r?"qDimensionInfo":"qMeasureInfo"].at(o)?.columnWidth,l=s?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...s,...e})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(e)};n.applyPatches([l],!0)}}),xne=({column:e,isLastColumn:t,onColumnResize:n,setIsAdjustingWidth:r})=>{const{pageColIdx:i,label:o}=e,a=zg(vne),s=zg(my),l=zg(ly),c=zg(Ty),[u,d]=$g(XH);if(!l)return null;return vt.jsx(oV,{columnWidth:u.at(i)??0,isLastColumn:t,keyValue:`adjuster-${i}`,updateWidthCallback:e=>{n?.();const t=[...u];t[i]=e,d(t)},confirmWidthCallback:t=>{a?.(t,e)},handleBlur:e=>{(e=>{gU(e);const t=e.closest(".sn-table-cell");bU(t)})(e.currentTarget)},setIsAdjustingWidth:r,accessibilityRelatedArgs:{translator:c,columnLabel:o},direction:s})},wne=e=>e.target?.getAttribute("class")?.includes(jm),Sne=({isInteractionEnabled:e,column:t})=>{const[n,r]=an.useState(!1),i=zg(cU),o=zg(K$);return{open:n,setOpen:r,handleOpenMenu:t=>{!e||wne(t)||o||r(!0)},toggleSortOrder:n=>{e&&!wne(n)&&!o&&(e=>null!==e.target.closest(".sn-table-cell"))(n)&&(n.stopPropagation(),i?.(t,"A"===t.sortDirection?"D":"A"))}}};var kne=class extends EI{constructor(e,t){super(e,t),this.boundingRectangle=AR(null),this.destroy=zR(()=>{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 i=()=>{this.boundingRectangle.value=zI(n)},o=()=>{r||(r=setTimeout(()=>{i(),r=void 0},25))},a=new ResizeObserver(i);return a.observe(n),document.addEventListener("scroll",o,{passive:!0,capture:!0}),()=>{document.removeEventListener("scroll",o,{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:i,current:o}=t,{height:a,width:s}=o.boundingRectangle,l=i.center.x-s/2,c=i.center.y-a/2,u=function(e,t,n){const r=aL({},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 oA(l,c,s,a),n,r);return u}};kne.configure=HA(kne);const Cne=({invert:e})=>({dragOperation:t,droppable:n})=>{if(!n.shape)return null;const{shape:r}=t;if(!r)return null;const i=function(e){return e.sortable?.index}(n);if(void 0===i)return null;const o=function(e){return e.source.index}(t);if(void 0===o)return null;if(o===i)return null;const a=o<i!==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/iA.distance(n.shape.center,s),type:ZP.Collision,priority:QP.Normal}:null},Ene=[kne.configure({element:e=>{const t=e.activatorEvent?.target;return t instanceof HTMLElement?t.closest(".sn-table-head-row"):null}})],Mne=(e,t)=>{const n=zg(my),r=zg(Ug),i=!zg(fy)||!r("TLV-1531_DRAG_AND_DROP_COLUMNS");return vj({id:e.id,disabled:i,index:t,type:"item",accept:"item",group:"column",modifiers:Ene,data:e,plugins:e=>[...e,YO.configure({feedback:"clone"})],collisionDetector:Cne({invert:"rtl"===n})})},Rne=({column:e,columnIndex:t,columnsLength:n})=>{const r=zg(FH),i=zg(_y),o=zg(my),a=zg(sy),s=zg(EH),l=zg(CH),c=zg(XH)[t],u=Fg(wG),d=zg(SG(t)),f=zg(fy),p=zg(wy),{open:h,setOpen:m,handleOpenMenu:g,toggleSortOrder:y}=Sne({isInteractionEnabled:f,column:e}),b=Fg(K$),{ref:v,isDragging:x}=Mne(e,t),w=Zte(e.id),S=zg(ny),k=S?qU:sG,C=e.isActivelySorted?h$[e.sortDirection]:void 0,E=h?Nm:void 0,M=h?"true":void 0,R=t===n-1,_=[0,e.pageColIdx],A={width:c,zIndex:s.length-t},P=d&&0===t&&!p.enabled&&f?0:-1;return vt.jsxs(EU,{"data-dragging":x,ref:v,headerStyle:{...r.header,...lU(r,l,!0),opacity:w},background:S&&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:A,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${qm}`,tabIndex:P,title:a.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:n,handleOpenMenu:r}=e;if(t)switch(n.key){case Lm.C:RG(n);break;case Lm.Enter:case Lm.Space:r?.(n);break;default:_G(e)}else dm(n)})({evt:e,rootElement:i,cellCoord:_,setFocusedCellCoord:u,isInteractionEnabled:f,handleOpenMenu:g,direction:o})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:n,setFocusedCellCoord:r,keyboard:i,isInteractionEnabled:o})=>{e.preventDefault(),o&&wU(n,t,r,i)})({evt:e,rootElement:i,cellCoord:_,setFocusedCellCoord:u,keyboard:p,isInteractionEnabled:f})},onClick:S?g:y,"aria-sort":C,"aria-controls":E,"aria-expanded":M,"aria-haspopup":"true",children:[vt.jsx(k,{column:e,isInteractionEnabled:f,open:h,setOpen:m,isPagination:!0,columnWidth:c}),vt.jsx(xne,{column:e,isLastColumn:R,setIsAdjustingWidth:b})]},e.id)},_ne=()=>{const e=zg(EH),t=zg(FH),n=zg(Yg),r=zg(yy),i=Fg(fne),o=zg(XH),a=an.useRef(null),s=bne(r,n);return an.useEffect(()=>{a.current&&i(a.current.getBoundingClientRect().height)},[t.header.fontSize,o,i,s]),vt.jsx(Lh,{style:{visibility:s?"collapse":void 0},children:vt.jsx(AU,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map((t,n)=>vt.jsx(Rne,{column:t,columnIndex:n,columnsLength:e.length},t.id))})})};var Ane=an.memo(_ne);const Pne=()=>{const e=zg(EG),[t,n]=$g(mH),{page:r,rowsPerPage:i}=t,o=zg(gy),{totalColumnCount:a,totalRowCount:s,totalPages:l,paginationNeeded:c,rows:u,columns:d}=zg(kH),f=zg(FH),p=zg(QB),h=zg(Yg),m=zg(Iy),g=zg(Ry),y=zg(_y),b=zg(yy),v=zg(my),x=zg(sy),w=zg(Ty),S=zg(aU),k=Fg(iU),C=zg(iy),E=zg(wy),M=an.useRef(!1),R=an.useRef(null),_=an.useRef(null),A=`${w.get("SNTable.Accessibility.RowsAndColumns",[String(u.length),String(d.length)])} ${w.get("SNTable.Accessibility.NavigationInstructions")}`,P=py(h,b),I=P?p.scrollLeft??0:0,T=P?p.rowPartialHeight??0:0,D=an.useCallback(()=>{M.current=y.getElementsByTagName("table")[0].contains(document.activeElement)},[y]),O=an.useCallback(r=>{n({...t,page:r}),e({keys:[["SNTable.Pagination.PageStatusReport",(r+1).toString(),l.toString()]],politeness:"assertive"})},[t,n,l,e]),N=an.useCallback(r=>{n({...t,page:0,rowsPerPage:r}),e({keys:[["SNTable.Pagination.RowsPerPageChange",r.toString()]],politeness:"assertive"})},[e,t,n]);return(e=>{const t=zg(my),n=zg(QB);an.useEffect(()=>{const r=e.current;if(!r)return;const i=e=>{((e,t,n)=>{if(0===e.deltaX)return;e.stopPropagation();const r=n.scrollWidth-n.offsetWidth,{scrollLeft:i}=n;let o=i+e.deltaX;t&&(o=r+o),r>0&&(o<0||o>r+1)&&e.preventDefault()})(e,"rtl"===t,r)},o=e=>{n.scrollLeft=e.currentTarget?.scrollLeft||0};return r.addEventListener("wheel",i),r.addEventListener("scroll",o),()=>{r.removeEventListener("wheel",i),r.removeEventListener("scroll",o)}},[e,t,n])})(R),xG(_,M),(()=>{const e=zg(_y),t=zg(wy),n=zg(wG);_m(()=>{const r=hU(e,n);t.active?bU(r):(r?.blur(),yU(e))},[t.active,e])})(),MG(M,r),an.useEffect(()=>{const e=R.current;e&&(e.scrollLeft=I,e.scrollTop=T)},[t,s,I,T]),vG(()=>{k({type:p$.UpdatePageRows,payload:{pageRows:u}})},[u]),kG(),TG(R),vt.jsxs(bG,{children:[vt.jsxs(IU,{ref:_,dir:v,onKeyDown:e=>{PG({evt:e,totalRowCount:s,page:r,rowsPerPage:i,handleChangePage:O,updateShouldRefocus:D,keyboard:E,isSelectionMode:C})},"data-testid":"sn-table",children:[vt.jsx(qG,{}),vt.jsxs(OG,{ref:R,className:"sn-table-container",fullHeight:!!o||!x.active||!c,interactions:x,tabIndex:-1,role:"application","data-testid":"table-container",children:[vt.jsxs(NG,{stickyHeader:!0,"aria-label":A,borderRight:S?`1px solid ${f.grid.border}`:void 0,children:[vt.jsx(Ane,{}),vt.jsx(yne,{updateShouldRefocus:D,tableWrapperRef:_})]}),vt.jsx(sU,{})]}),vt.jsx(WW,{footerContainer:o,pageInfo:t,paginationNeeded:c,theme:m,totalRowCount:s,totalColumnCount:a,totalPages:l,keyboard:E,translator:w,interactions:x,rect:g,layout:h,handleChangePage:O,handleChangeRowsPerPage:N,isSelectionMode:C,direction:v})]}),vt.jsx(dG,{isPagination:!0})]})};var Ine=an.memo(Pne);const Tne=Rg(0),Dne=Rg(e=>{const t=e(Kg);return Math.min(cB,t)}),One=Rg(e=>{const t=e(Kg);return t===cB?0:Math.floor(t/cB)}),Nne=Rg(e=>{const t=e(Tne),n=e(One);return Math.min(t,n)}),qne=Rg(e=>({page:e(Nne),rowsPerPage:e(Dne),rowsPerPageOptions:[]}),(e,t,n)=>{const r=e(One);t(Tne,Math.max(0,Math.min(n,r)))}),Lne=Rg(null),jne=Rg(null),zne=Rg(e=>{const t=e(qne),n=e(Kg);return Math.min(t.rowsPerPage,n-t.page*t.rowsPerPage)}),Fne=Rg(null),$ne=Rg(null),Bne=Rg(e=>e(CH).atTop?2:1),Hne=Rg(e=>e(CH).atTop?1:e(Bne)+e(zne)),Vne=Rg(e=>pU(Boolean(e(iy)),e(CH))),Wne=Rg(e=>({firstBodyRowIdx:e(Bne),totalsRowIdx:e(Hne),allowedRows:e(Vne)})),Une=Rg(e=>({rootElement:e(_y),totalsPosition:e(CH),rowCount:e(zne),colCount:e(MH),columnWidths:e(XH)})),Gne=Rg(e=>({scrollToCell:e(Fne),scrollableContainerElement:e($ne)})),Yne=Rg(e=>({keyboard:e(wy),isInSelectionMode:e(iy),selectionsAPI:e(oy),isSelectionsEnabled:e(uy)})),Kne=Rg(e=>({direction:e(my),isInteractionEnabled:e(fy),paginationNeeded:e(PH),announce:e(EG),shouldRefocusRef:e(Lne)})),Xne=10,Jne=e=>e.atTop?2:1,Qne=e=>{e.querySelectorAll(".sn-table-cell[tabindex='0']").forEach(e=>{e.setAttribute("tabIndex","-1")})},Zne=e=>{e&&(e.focus(),(e=>{e?.setAttribute("tabIndex","0")})(e))},ere=(e,[t,n],r,i)=>{const o=Jne(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-o;return a>=0&&a<i?e.querySelector(`.sn-table-body .sn-table-cell[rowindex="${a}"][columnindex="${n}"]`):e.querySelector(`.sn-table-totals-row [data-col="${n}"]`)},tre=(e,t,n,r,i,o,a,s,l)=>{if(!e)return l(!1),()=>{};const[c,u]=n,d=c-Jne(r),f=d>=0&&d<i;let p=a,h=!1,m=null;const g=()=>h||s&&!s(),y=()=>{g()||(f&&e(d,u),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})(ere(t,n,r,i),o);if(!e)return p>0?(p-=1,void y()):void l(!1);l(!0)}))};return y(),()=>{h=!0,null!==m&&cancelAnimationFrame(m)}},nre=(e,t,n,r,i,o)=>e<o?[t,e+1]:t<r?[t+1,i]:[t,e],rre=(e,t,n,r,i,o)=>e>i?[t,e-1]:t>n?[t-1,o]:[t,e],ire=(e,[t,n],r,i,o,a={top:0,bottom:0},s)=>{const l=a.top>0,c=a.top,u=r-1-a.bottom,d=i-1;switch(e.key){case Lm.Down:case Lm.Up:t=((e,t,n,r)=>e===Lm.Down&&t<r?t+1:e===Lm.Up&&t>n?t-1:t)(e.key,t,c,u);break;case Lm.Right:l||([t,n]=((e,t,n,r,i,o,a)=>"rtl"===a?rre(e,t,n,0,i,o):nre(e,t,0,r,i,o))(n,t,c,u,0,d,o));break;case Lm.Left:l||([t,n]=((e,t,n,r,i,o,a)=>"rtl"===a?nre(e,t,0,r,i,o):rre(e,t,n,0,i,o))(n,t,c,u,0,d,o));break;case Lm.Home:l?t=Math.max(c,t-Xne):(YW(e)&&(t=c),n=0);break;case Lm.End:l?t=Math.min(u,t+Xne):(YW(e)&&(t=u),n=d);break;case Lm.PageDown:t=Math.min(u,t+Xne);break;case Lm.PageUp:if(l)t=Math.max(c,t-Xne);else{const e=s?Jne(s):1,n=t-e;t=n>0&&n<=Xne?e:Math.max(c,t-Xne)}}return[t,n]},ore=[Lm.Home,Lm.End,Lm.PageUp,Lm.PageDown],are=()=>{const e=an.useRef(!1),t=an.useRef(0),n=an.useRef(0),r=an.useRef(null),i=an.useRef(null),o=an.useRef(null),a=an.useRef(0),s=Fg(wG),l=Fg(iU),c=zg(Ug)("VNA-700-KEYBOARD_NAV_VIRTUALIZED_STRAIGHT_TABLE"),{rootElement:u,totalsPosition:d,rowCount:f,colCount:p,columnWidths:h}=zg(Une),{firstBodyRowIdx:m,allowedRows:g,totalsRowIdx:y}=zg(Wne),{scrollToCell:b,scrollableContainerElement:v}=zg(Gne),{keyboard:x,isInSelectionMode:w,selectionsAPI:S,isSelectionsEnabled:k}=zg(Yne),{direction:C,announce:E,isInteractionEnabled:M,paginationNeeded:R,shouldRefocusRef:_}=zg(Kne),A=an.useMemo(()=>(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]);an.useEffect(()=>()=>{t.current+=1,n.current+=1,a.current+=1,r.current?.(),r.current=null,i.current?.(),i.current=null,o.current?.(),o.current=null},[]);const P=an.useCallback((e,t,n,r)=>{const i=t=>{if(r&&!r())return void n?.(!1);const o=ere(u,e,d,f);if(o)return document.activeElement!==o&&Zne(o),document.activeElement===o?void n?.(!0):t>0?void requestAnimationFrame(()=>{i(t-1)}):void n?.(!1);t>0?requestAnimationFrame(()=>{i(t-1)}):n?.(!1)};requestAnimationFrame(()=>{i(t)})},[u,d,f]),I=an.useCallback((e,t)=>{const r=a.current+1;a.current=r;let o=0;const s=Date.now()+5e3,l=()=>{if(a.current!==r)return;if(n.current!==t)return;if(u instanceof HTMLElement&&!u.isConnected)return;if(Date.now()>s||o>=5)return;const c=document.activeElement;c&&c!==document.body&&c!==document.documentElement||(o+=1,_&&(_.current=!0),i.current?.(),i.current=tre(b,u,e,d,f,v,10,()=>a.current===r&&n.current===t,()=>{P(e,300,()=>{_&&(_.current=!1)},()=>a.current===r&&n.current===t)})),requestAnimationFrame(()=>{requestAnimationFrame(l)})};requestAnimationFrame(()=>{requestAnimationFrame(l)})},[P,u,f,b,v,_,d]),T=an.useCallback(()=>(_&&(_.current=!0),t.current+=1,t.current),[_]),D=an.useCallback(()=>{t.current+=1,o.current?.(),o.current=null},[]),O=an.useCallback((e,n)=>{const r=i=>{t.current===e&&(o.current?.(),o.current=tre(b,u,n,d,f,v,10,()=>t.current===e,()=>{if(t.current!==e)return;const o=ere(u,n,d,f);o&&document.activeElement!==o&&Zne(o),i>0?requestAnimationFrame(()=>{r(i-1)}):t.current===e&&_&&(_.current=!1)}))};requestAnimationFrame(()=>{requestAnimationFrame(()=>{r(300)})})},[u,d,f,b,_,v]),N=an.useCallback((e,t)=>{if(!QW(e))return;dm(e),D(),n.current+=1;const i=n.current;a.current+=1,r.current?.(),r.current=null;const o=((e,t)=>Jne(t)+e+(t.atBottom?1:0))(f,d),l=ire(e,t,o,p,C,g,d);Qne(u),s(l);const[,c]=l,[,h]=t;return c!==h&&((e,t,n)=>{if(!e)return;const r=t[n]??0,i=t[n+1]??r,{scrollLeft:o,clientWidth:a}=e;r<o?e.scrollLeft=r:i>o+a&&(e.scrollLeft=i-a)})(v,A,c),_&&(_.current=!0),r.current=tre(b,u,l,d,f,v,10,()=>n.current===i,()=>{P(l,300,t=>{_&&(_.current=!1),t&&(e=>ore.includes(e))(e.key)&&I(l,i)},()=>n.current===i)}),l},[u,d,f,p,C,b,s,g,v,_,P,D,A,I]),q=an.useCallback(e=>{e.key===Lm.Esc?x.enabled&&!w&&(dm(e),x.blur?.(!0)):XW(e.key)&&dm(e)},[x,w]),L=an.useCallback((e,t,n)=>{switch(e.key){case Lm.C:dm(e),M&&(e.ctrlKey||e.metaKey)&&Um(e.currentTarget);break;case Lm.Enter:case Lm.Space:if(!M)return void dm(e);n?.(e);break;default:N(e,[0,t])}},[N,M]),j=an.useCallback((t,r,i,o)=>{const a=[r+m,i];switch(t.key){case Lm.Space:if(dm(t),o.isSelectable&&k){e.current=!0;const n=T();l({type:p$.Select,payload:{cell:o,evt:t,announce:E}}),O(n,a)}break;case Lm.Enter:if(dm(t),e.current=!1,w){T(),s(g$),S?.confirm(),v&&(v.scrollTop=0,v.scrollLeft=0);const e=t=>{b?.(0,0),t>0&&requestAnimationFrame(()=>{e(t-1)})};e(10),n.current+=1;const t=n.current;P(g$,300,()=>{_&&(_.current=!1)},()=>n.current===t)}break;case Lm.Esc:if(e.current=!1,w){dm(t);const e=T();S?.cancel(),O(e,a)}break;case Lm.C:dm(t),M&&(t.ctrlKey||t.metaKey)&&Um(t.currentTarget);break;case Lm.Tab:{const e=t.shiftKey||!R;x.enabled&&w&&e&&(dm(t),um(t.currentTarget,x,t.shiftKey));break}default:{const n=t.key===Lm.Left||t.key===Lm.Right,r=w||Boolean(S?.isModal())||e.current;if(n&&r){dm(t);break}const i=N(t,a);!!i&&i[0]!==a[0]&&t.shiftKey&&k&&o.isSelectable&&l({type:p$.SelectMultiAdd,payload:{cell:o,evt:t,announce:E}});break}}},[m,N,k,l,E,w,S,x,R,M,T,O,s,b,v,P,_]),z=an.useCallback(t=>{t.key===Lm.Space&&(e.current=!1),t.key===Lm.Shift&&l({type:p$.SelectMultiEnd})},[l]),F=an.useCallback((e,t)=>{if(w)dm(e);else{if(e.key!==Lm.Space)return e.key===Lm.C?(dm(e),void(M&&(e.ctrlKey||e.metaKey)&&Um(e.currentTarget))):void N(e,[y,t]);e.preventDefault()}},[w,N,y,M]),$=an.useCallback(e=>{D(),n.current+=1;const t=n.current;Qne(u),s(e),x.enabled&&x.focus?.(),P(e,2,n=>{n&&I(e,t)},()=>n.current===t)},[u,s,x,P,D,I]);return{handleWrapperKeyDown:q,handleHeadKeyDown:L,handleBodyKeyDown:j,handleBodyKeyUp:z,handleTotalsKeyDown:F,focusHeadCellOnClick:an.useCallback(e=>{c&&$([0,e])},[$,c]),focusBodyCellOnClick:an.useCallback((e,t)=>{c&&$([e+m,t])},[$,m,c]),focusTotalsCellOnClick:an.useCallback(e=>{c&&$([y,e])},[$,y,c])}};var sre=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function lre(e,t){return e===t||!(!sre(e)||!sre(t))}function cre(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!lre(e[n],t[n]))return!1;return!0}function ure(e,t){var n;void 0===t&&(t=cre);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}var dre="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function fre(e){cancelAnimationFrame(e.id)}function pre(e,t){var n=dre();var r={id:requestAnimationFrame(function i(){dre()-n>=t?e.call(null):r.id=requestAnimationFrame(i)})};return r}var hre=-1;function mre(e){if(void 0===e&&(e=!1),-1===hre||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),hre=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return hre}var gre=null;function yre(e){if(void 0===e&&(e=!1),null===gre||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"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?gre="positive-descending":(t.scrollLeft=1,gre=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),gre}return gre}var bre=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function vre(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,o=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,f=e.getRowStartIndexForOffset,p=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,jc(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:jc(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=ure(function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=ure(function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,f=r._getItemStyleCache(m&&s,m&&l,m&&c),p=e+":"+t;if(f.hasOwnProperty(p))i=f[p];else{var h=n(r.props,t,r._instanceProps),g="rtl"===l;f[p]=i={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:o(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=ure(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,c=o;if("rtl"===t)switch(yre()){case"negative":c=-o;break;case"positive-descending":c=l-i-o}c=Math.max(0,Math.min(c,l-i));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&fre(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=pre(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}mc(t,e),t.getDerivedStateFromProps=function(e,t){return xre(e,t),g(e),null};var y=t.prototype;return y.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)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,u=o.columnCount,d=o.height,f=o.rowCount,p=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,y=mre();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==i&&(i=Math.max(0,Math.min(i,f-1)));var b=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>p?y:0,x=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?c(this.props,i,n,g,this._instanceProps,v):g})},y.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()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(yre()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&fre(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,i=e.direction,o=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,f=e.itemKey,p=void 0===f?bre:f,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,y=e.style,b=e.useIsScrolling,v=e.width,x=this.state.isScrolling,w=this._getHorizontalRangeToRender(),S=w[0],k=w[1],C=this._getVerticalRangeToRender(),E=C[0],M=C[1],R=[];if(r>0&&g)for(var _=E;_<=M;_++)for(var A=S;A<=k;A++)R.push(an.createElement(t,{columnIndex:A,data:d,isScrolling:b?x:void 0,key:p({columnIndex:A,data:d,rowIndex:_}),rowIndex:_,style:this._getItemStyle(_,A)}));var P=a(this.props,this._instanceProps),I=s(this.props,this._instanceProps);return an.createElement(h||m||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:rn({position:"relative",height:o,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},an.createElement(c||u||"div",{children:R,ref:l,style:{height:P,pointerEvents:x?"none":void 0,width:I}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],c=o[3],u=this._getVerticalRangeToRender(),d=u[0],f=u[1],p=u[2],h=u[3];this._callOnItemsRendered(a,s,d,f,l,c,p,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,b,g,x,v)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,o=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,f=n||o||a||1;if(0===t||0===s)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),h=i(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,f),g=u&&"forward"!==c?1:Math.max(1,f);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,h+g)),p,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),h=p(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,h+g)),d,h]},t}(an.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var xre=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},wre=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},Sre=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},kre=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=o(c);i[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},Cre=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?Ere(e,t,n,o,0,r):Mre(e,t,n,Math.max(0,o),r)},Ere=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=kre(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},Mre=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&kre(e,t,r,n).offset<i;)r+=a,a*=2;return Ere(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},Rre=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=kre(e,t,n,o),c="column"===e?Sre(t,o):wre(t,o),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return i>=d&&i<=u?i:d>u||i<d?d:u}},_re=vre({getColumnOffset:function(e,t,n){return kre("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return Cre("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=kre("column",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=kre("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:wre,getEstimatedTotalWidth:Sre,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return Rre("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return Rre("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return kre("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return Cre("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=kre("row",e,t,r),s=n+o,l=a.offset+a.size,c=t;c<i-1&&l<s;)c++,l+=kre("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),Are=function(e,t){return e};function Pre(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,jc(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:jc(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=ure(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=ure(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),f=i(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===l,h="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:p?0:d,height:p?"100%":f,width:p?f:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=ure(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(yre()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-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,i=t.scrollHeight,o=t.scrollTop;r.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-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&&fre(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=pre(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}mc(t,e),t.getDerivedStateFromProps=function(e,t){return Ire(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=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"===i?l.scrollWidth>l.clientWidth?mre():0:l.scrollHeight>l.clientHeight?mre():0}this.scrollTo(o(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 i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(yre()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&fre(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,o=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,f=void 0===d?Are:d,p=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,y=e.useIsScrolling,b=e.width,v=this.state.isScrolling,x="horizontal"===i||"horizontal"===p,w=x?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),k=S[0],C=S[1],E=[];if(c>0)for(var M=k;M<=C;M++)E.push(an.createElement(t,{data:u,key:f(M,u),index:M,isScrolling:y?v:void 0,style:this._getItemStyle(M)}));var R=r(this.props,this._instanceProps);return an.createElement(h||m||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:rn({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},g)},an.createElement(s||l||"div",{children:E,ref:a,style:{height:x?"100%":R,pointerEvents:v?"none":void 0,width:x?R:"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],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),f=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+f)),c,u]},t}(an.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Ire=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Tre=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var c=r(l);i[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return i[t]},Dre=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=Tre(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},Ore=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&Tre(e,n,t).offset<r;)n+=o,o*=2;return Dre(e,t,Math.min(n,i-1),Math.floor(n/2),r)},Nre=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},qre=Pre({getItemOffset:function(e,t,n){return Tre(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:Nre,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=Tre(e,t,i),f=Nre(e,i),p=Math.max(0,Math.min(f-u,d.offset)),h=Math.max(0,d.offset-u+d.size+o);switch("smart"===n&&(n=r>=h-u&&r<=p+u?"auto":"center"),n){case"start":return p;case"end":return h;case"center":return Math.round(h+(p-h)/2);default:return r>=h&&r<=p?r:r<h?h:p}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?Dre(e,t,i,0,n):Ore(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===i||"horizontal"===s?l:o,u=Tre(e,t,r),d=n+c,f=u.offset+u.size,p=t;p<a-1&&f<d;)p++,f+=Tre(e,p,r).size;return p},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 Lre(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 jre=["style"],zre=["style"];function Fre(e,t){var n=e.style,r=on(e,jre),i=t.style,o=on(t,zre);return!Lre(n,i)&&!Lre(r,o)}const $re=Rg(0),Bre=Rg(0),Hre=Rg(0),Vre=Rg(e=>e($re)+e(Bre)),Wre=Rg(e=>{const t=e(Ry),n=e(PH),r=t.height-(n?41:0);return{width:t.width,height:r}}),Ure=Rg(e=>{const t=e(Wre),n=e(X$),r=e(J$);return{width:t.width-r,height:t.height-n}}),Gre=Rg(e=>{const t=e(Ure),n=e(Vre),r=e(Hre);return Math.min(t.height-n,r)}),Yre=Rg(-1),Kre=qE(e=>Rg(t=>t(Yre)===e)),Xre=({style:e})=>vt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var Jre=sn.memo(Xre,Fre);const Qre=Rg(e=>{const t=e(Ure),n=e(VH),r=e(Vre),i=e(Hre)+r,o=e(zne)*n+r;return i<2*t.height?i:o}),Zre=Rg(e=>e(Qre)<=e(Wre).height),eie=()=>{},tie=e=>{e.preventDefault()};const nie=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{rowsInPage:i,columns:o,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:c,onKeyDown:u,onKeyUp:d,onCellClick:f}=r,p=zg(Kre(t)),h=Fg(Yre),m=zg(FH),g=zg(my),y=zg(cy),b=zg(fy),v=zg(aU),x=zg(Ug),w=zg(Zre),S=i[t]?.[e],{handleMouseDown:k,handleMouseOver:C,handleMouseUp:E,cellSelectionState:M}=function(e){const t="object"==typeof e,n=zg(uy),r=Fg(iU),i=zg(oU(e));if(nne(e),t&&n){const{handleMouseDown:t,handleMouseOver:n,handleMouseUp:o}=ene(tie,e,r,eie);return{handleMouseDown:t,handleMouseOver:n,handleMouseUp:o,cellSelectionState:i}}return{cellSelectionState:i}}(S),R=((e,t,n,r)=>{const i=an.useRef(null),o=n&&(!n.isNumeric||n.isDual),a=n?.isTotalRow??!1,s=an.useCallback(n=>{const i=n.contentBoxSize.at(0)?.blockSize;i&&o&&r(i,e,t,a)},[a,t,r,e,o]);return UU({ref:i,callback:s}),i})(t,e,S,s),_=o[e]?.isDim?m.dimension.values:m.measure.values,A=Zte(o[e].id);if("object"==typeof S){const r=((e,t,n,r,i,o,a)=>{const s=e.isTotalRow&&a("TLV-2303-SUB-TOTALS");let l=one(i,o,e);l=s?o.subTotalRow:l,l=rne(l,o,e,t.isDim);const c=e.isNull||s&&t.isDim?l:lB(l,e.qAttrExps,t.qAttrExprInfoIDs);return r!==f$.Selected||s?r!==f$.Disabled||s?n?{...c,...o.grid.hoverColors}:c:{...c,color:n?o.grid.hoverColors?.color:c.color,background:`${_$}, ${n?o.grid.hoverColors?.background:c.background}`}:{...c,...o.selectedColors}})(S,o[e],a&&p,M,_,m,x),i={rowindex:t,columnindex:e},s=n=>{b&&f?.(t,e),k?.(n)},P=u?n=>{u(n,t,e,S)}:void 0;return vt.jsx("div",{className:`sn-table-cell ${M} ${qm}`,tabIndex:-1,style:{...n,...r,display:"flex",alignItems:"start",borderColor:m.grid.border,borderTop:"0px",borderBottomWidth:!w&&S.isLastRow?"0px":"1px",borderRightWidth:F$(g,S.isLastColumn,v),borderLeftWidth:$$(g,S.isLastColumn,v),justifyContent:q$(S,g),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:S.align,opacity:A},onMouseDown:s,onMouseUp:E,onMouseOver:C,onMouseEnter:a?()=>{h(t)}:void 0,onMouseLeave:a?()=>{h(-1)}:void 0,onKeyDown:P,onKeyUp:d,title:y?S.representation.text:void 0,...i,children:vt.jsx(Qte,{cellSelectionState:M,hideTickIcon:!!S.isTotalRow,children:vt.jsx(Kte,{forwardRef:m.contentStaticLineCount||1===l?void 0:R,cell:S,style:r,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:c})})})}return vt.jsx(Jre,{style:{...n,..._,borderColor:m.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:A}})};var rie=an.memo(nie,Fre);const iie=Rg(async e=>{const t=e(Yg),n=e(Sy),r=e(qne).page,{qDataPages:i}=t.qHyperCube;if(0!==r||0===i.length){const e=r*Math.min(cB,t.qHyperCube.qSize.qcy);if(n&&"getHyperCubeData"in n)return n.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:e,qWidth:50,qHeight:100}])}return[...i]}),oie=_E(iie),aie=Rg(e=>{const t=e(zne),n=e(Ure),r=e(VH);return Math.min(t,Math.ceil(n.height/r))}),sie=Rg(e=>{const t=e(XH),n=e(Ure);return t.reduce((e,t)=>e.width<n.width?{width:e.width+t,count:e.count+1}:e,{count:0,width:0}).count}),lie=e=>{const t=an.useRef(e);return t.current=e,t},cie=({qLeft:e,qTop:t,qWidth:n,qHeight:r})=>`${e}-${t}-${n}-${r}`,uie=e=>-1===e.qElemNumber||!!e.qIsTotalCell,die=(e,t,n,r,i)=>{const o=e[n];if(!o)return!0;for(let e=t;e<t+r;e++){const t=o[e];if(t?.rowIdx!==i)return!0}return!1},fie=(e,t,n,r)=>{const i=e.slice(n,r);return 0===i.length||i.some(e=>!e[t])},pie=(e,t,n,r,i,o,a,s)=>{e.forEach(e=>{e.qMatrix.forEach((l,c)=>{const u=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:f}=((e,t,n,r,i,o,a,s,l,c)=>{const{qSize:u}=a.qHyperCube,d=r.qTop+n,f=i+n,p=e[f]??[],h=t.some(uie);return t.forEach((e,t)=>{const n=t+r.qLeft;if(p.at(n))return;const{colIdx:i,isDim:m,isLocked:g,bodyTextAlign:y,selectionColIdx:b,qAttrExprInfoIndex:v,representation:x,conditionalColoring:w,qMiniChart:S}=o[n],k=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),C=!m&&e.qIsNull,E=m&&dH(e,m),M=C||E?uH(m,e,a,k):e.qText,R=C?v$(M):b$(e),_=b$(e)&&!v$(e.qText??"");p[n]={id:vz(),...e,align:sH(R,y,c),rowIdx:d,colIdx:i,isSelectable:m&&!g&&!h,isTotalRow:h,pageRowIdx:f,pageColIdx:n,selectionColIdx:b,isLastRow:d===u.qcy-1,isLastColumn:n===u.qcx-1,isNumeric:R,isDual:_,isNull:(!C||!R)&&dH(e,m),representation:JB({cell:e,representationProperties:x,attrExprInfoIndex:v,env:s,conditionalColoring:w,miniChartOnMeasure:S,getText:()=>M,direction:c,enabledFeatures:{[Az.Image]:!0,[Az.Indicator]:!0,[Az.MiniChart]:!0}})},l(p[n],d,n)}),{row:p,pageRowIdx:f}})(n,l,c,e.qArea,u,r,i,o,a,s);n[f]=d})})},hie=({gridState:e,setEstimatedCellHeight:t})=>{const n=zg(Yg),r=zg(Iy),i=zg(Sy),o=zg(Wg),a=zg(my),s=zg(qne),l=zg(oie),c=zg(EH),u=zg(zne),d=zg(aie),f=zg(sie),p=an.useRef([]),h=an.useCallback((e,r)=>{const i=Array.isArray(r)?r.slice(0,u):(e=>Array(e).fill(void 0))(u);return pie(e,s,i,c,n,o,t,a),p.current=i,i},[u,s,c,n,o,t,a]),[m,g]=an.useState(()=>h(l??[]));_m(()=>{g(h(l??[]))},[l,a,u]);const y=((e,t)=>{const n=an.useRef(new Set),r=an.useRef(new Set),i=an.useRef(new Set),o=lie(e),a=lie(t),s=an.useMemo(()=>({enqueue:e=>{const t=cie(e);i.current.has(t)||(n.current.add(e),i.current.add(t),1===n.current.size&&setTimeout(async()=>{const e=Array.from(n.current.values());if(0!==e.length){n.current.clear(),r.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 o.current(t);r.current.has(e)&&a.current(n)}catch(t){e.forEach(e=>{i.current.delete(cie(e))}),console.error("Failed to fetch pages",t)}finally{r.current.delete(e)}}},75))},clear:()=>{n.current.clear(),r.current.clear(),i.current.clear()}}),[o,a]);return s})(e=>i&&"getHyperCubeData"in i?i.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([]),e=>{g(t=>h(e,t))}),b=an.useCallback((e,t,n,r)=>{for(let i=e;i<e+n;i++)if(fie(p.current,i,t,r)){const e={qLeft:i,qTop:t,qHeight:r,qWidth:1};y.enqueue(e)}},[y]),v=an.useCallback((e,t,n,r)=>{for(let i=t;i<t+r;i++){const t=Math.max(0,i-s.page*s.rowsPerPage);if(die(p.current,e,t,n,i)){const t={qLeft:e,qTop:i,qHeight:1,qWidth:n};y.enqueue(t)}}},[y,s]);return an.useEffect(()=>{if(void 0===l)return;const{qcx:t,qcy:r}=n.qHyperCube.qSize,i=e.current.overscanRowStartIndex,o=e.current.overscanColumnStartIndex,a=i+s.page*s.rowsPerPage,c=t-o,u=s.rowsPerPage-i,p=Math.min(100,c,t,f+5),h=Math.min(100,u,r,d+25);return v(o,a,p,h),()=>{y.clear()}},[l,n,d,f,s,y,v,e,r]),{rowsInPage:m,loadRows:v,loadColumns:b}},mie=e=>{let t=0;return e.forEach(e=>{e>t&&(t=e)}),t},gie=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,yie=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>{const i=zg(FH),o=zg(XH),{estimateLineCount:a}=Sm(i.dimension.values),s=Q$(i.dimension.values.fontSize),l=e||t||1===n;return an.useCallback((e,t,i)=>{if(l||e.representation.type===Az.Image||e.isNumeric&&!e.isDual)return;const c=(e=>Math.max(0,e-24-1))(o[i]),u=e.representation.text?a({text:e.representation.text,maxWidth:c,isNumeric:!1}):1,d=Math.min(n,Math.max(1,u));r(d*s,t,i,e.isTotalRow??!1)},[l,o,a,n,s,r])},bie=({isStaticNbrOfLines:e,minRowHeight:t,state:n,staticRowHeight:r=0})=>{const i=zg(QB);an.useLayoutEffect(()=>{const o=e?r:((e,t)=>{const n=0===t?0:e/t;return Math.ceil(n)})(n.sumHeight,n.rowHeights.size);i.estimatedRowHeight=Math.max(o,t)},[e,t,n,r,i])},vie=({isSnapshot:e,gridRef:t})=>{const n=zg(FH),r=zg(zne),[i,o]=an.useState(()=>({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})),a=zg(HH),s=zg(VH),l=zg(WH),c=!!n.contentStaticLineCount,u=Math.max(8e6/r,s,l)-9,d=u+9,f=Math.max(1,Math.min(n.grid.contentLineClamp,Math.round(u/a))),p=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:n})=>n?t*e+8+1:void 0)({lineClamp:f,lineHeight:a,isStaticNbrOfLines:c});(({gridRef:e,setState:t})=>{const n=zg(Yg),r=zg(qne),i=zg(XH),o=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,o,a]),_m(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})},[i])})({gridRef:t,setState:o});const h=(({setState:e,maxCellHeight:t,gridRef:n})=>{const r=zg(VH),i=zg(WH);return an.useCallback((o,a,s,l=!1)=>{an.startTransition(()=>{e(e=>{const c=l?i:r,u=Math.max(c,o+9),d=Math.min(t,u),f=e.cellHeightsInGrid.get(a)??e.cellHeightsInGrid.set(a,new Map).get(a);if(!gie(f.get(s),d))return e;const p={...e},h=e.rowHeights.get(a);f.set(s,d);const m=void 0===h||d>=h?d:mie(f);return p.rowHeights.set(a,m),p.sumHeight=e.sumHeight-(h??0)+m,n.current?.resetAfterIndices({columnIndex:s,rowIndex:a,shouldForceUpdate:!1}),p})})},[e,t,r,i,n])})({maxCellHeight:d,setState:o,gridRef:t}),m=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:n,setCellHeight:r})=>an.useCallback((i,o,a,s)=>{e||t||1===n||r(i,o,a,s)},[e,t,n,r]))({isSnapshot:e,isStaticNbrOfLines:c,lineClamp:f,setCellHeight:h}),g=yie({isSnapshot:e,isStaticNbrOfLines:c,lineClamp:f,setCellHeight:h}),y=an.useCallback(e=>c?p??s:i.rowHeights.get(e)??s,[c,s,i.rowHeights,p]);return bie({isStaticNbrOfLines:c,minRowHeight:s,state:i,staticRowHeight:p}),{setMeasuredCellHeight:m,setEstimatedCellHeight:g,getRowHeight:y,lineClamp:f}},xie=(e,t)=>{an.useLayoutEffect(()=>()=>{t(0)},[e,t]);const n=an.useCallback(e=>{const n=e.contentBoxSize.at(0)?.blockSize;void 0!==n&&t(n)},[t]);UU({ref:e,callback:n})};let wie=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const Sie=({loadRows:e,loadColumns:t,gridState:n})=>{const r=zg(QB),i=zg(Yg),o=zg(qne),a=zg(zne);return an.useCallback(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:c,overscanRowStopIndex:u,visibleColumnStartIndex:d,visibleColumnStopIndex:f,visibleRowStartIndex:p,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},n,r)=>{let i,o;return i=r>t?wie.Down:r<t?wie.Up:wie.None,o=n>e?wie.Right:n<e?wie.Left:wie.None,{verticalScrollDirection:i,horizontalScrollDirection:o}})(n.current,s,c);if(n.current.overscanColumnStartIndex=s,n.current.overscanColumnStopIndex=l,n.current.overscanRowStartIndex=c,n.current.overscanRowStopIndex=u,c>a)return;const y=s,b=c+o.page*o.rowsPerPage,v=l-s+1,x=u-c+1;if(r.visibleLeft=d,r.visibleWidth=f-d+1,r.visibleTop=p+o.page*o.rowsPerPage,r.visibleHeight=h-p+1,r.page=o.page,r.rowsPerPage=o.rowsPerPage,m===wie.Down){const t=x+25;e(y,b,v,c+t>a?a-c:t)}else if(m===wie.Up){const t=x+25,n=o.page*o.rowsPerPage,r=Math.max(n,b-25);e(y,r,v,t)}if(g===wie.Right){const e=i.qHyperCube.qSize.qcx-y,n=v+5,r=Math.min(e,n);t(y,b,r,x)}else if(g===wie.Left){const e=Math.max(0,y-5),n=Math.min(i.qHyperCube.qSize.qcx,v+5);t(e,b,n,x)}},[n,a,o.page,o.rowsPerPage,r,e,i.qHyperCube.qSize.qcx,t])};const kie=({columnIndex:e,data:t,rowIndex:n})=>{const r=t.rowsInPage[n]?.[e];return r?.id??`${n}-${e}`},Cie=(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)},Eie={overflow:"hidden",willChange:"auto"},Mie=an.forwardRef((e,t)=>{const{handleBodyKeyDown:n,handleBodyKeyUp:r,focusBodyCellOnClick:i}=are(),o=zg(EH),a=zg(Ure),s=Fg(Hre),l=zg(Gre),c=zg(QB),u=zg(Yg),d=zg(my),f=zg(XH),p=zg(zne),h=zg($ne),m=Fg(Fne),g=an.useRef(null),y=an.useRef(null),b=an.useRef(null),v=an.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),x=an.useRef(0),w=!!iB(u)?.content?.hoverEffect,{setMeasuredCellHeight:S,setEstimatedCellHeight:k,getRowHeight:C,lineClamp:E}=vie({isSnapshot:!!u.snapshotData,gridRef:g}),{rowsInPage:M,loadRows:R,loadColumns:_}=hie({gridState:v,setEstimatedCellHeight:k}),A=Sie({loadRows:R,loadColumns:_,gridState:v}),P=zG(),I=an.useMemo(()=>({rowsInPage:M,columns:o,isHoverEnabled:w,lineClamp:E,setMeasuredCellHeight:S,resizeObserverTaskScheduler:P,onKeyDown:n,onKeyUp:r,onCellClick:i}),[M,o,w,E,S,P,n,r,i]);return an.useLayoutEffect(()=>{1===x.current&&g.current?.scrollToItem({rowIndex:p-1,align:"start"})}),function(e){const t=Fg(iU),{shouldRefocusRef:n}=zg(Kne),r=zg(_y),i=zg(jne);an.useEffect(()=>{t({type:p$.UpdatePageRows,payload:{pageRows:e}})},[t,e]);const o=an.useCallback(()=>{n&&(n.current=r.contains(document.activeElement))},[n,r]);FG({updateShouldRefocus:o,tableWrapperRef:{current:i}})}(M),an.useImperativeHandle(t,()=>({interpolatedScrollTo:(e,t)=>{const n=(b.current?.clientHeight??l)-l,r=Math.round(n*e);x.current=e,1===x.current?(g.current?.scrollToItem({rowIndex:p-1,align:"start"}),g.current?.scrollTo({scrollLeft:t})):g.current?.scrollTo({scrollTop:r,scrollLeft:t})}}),[b,l,p]),an.useEffect(()=>(m(()=>(e,t)=>{g.current?.scrollToItem({rowIndex:e,columnIndex:t,align:"auto"}),Cie(h,y.current)}),()=>{m(null)}),[h,m]),xie(b,s),vt.jsx(_re,{"data-key":"body",ref:g,outerRef:y,innerRef:b,style:Eie,columnCount:o.length,columnWidth:e=>f[e],height:l,rowCount:p,rowHeight:C,estimatedRowHeight:c.estimatedRowHeight,width:a.width,itemData:I,onItemsRendered:A,itemKey:kie,className:"sn-table-body",direction:d,children:rie})});var Rie=an.memo(Mie);const _ie=({children:e})=>{const t=zg(ZH),n=zg(Qre);return vt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:t,height:n},children:e})},Aie=(e,t)=>{const n=an.useRef(null),r=zg(XH);an.useLayoutEffect(()=>{n.current&&t(n.current.getBoundingClientRect().height+9,e)},[t,n,e,r.length]);const i=an.useCallback(n=>{const r=n.contentBoxSize.at(0)?.blockSize;r&&t(r+9,e)},[e,t]);return UU({ref:n,callback:i}),n},Pie=ic("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({interactions:e,hoverBackground:t,background:n,applicableStyle:r,color:i})=>({...r,background:n,color:i,"&&:hover:not(:has(button:hover))":{background:e.active?t:void 0}})),Iie=({index:e,style:t,data:n})=>{const{columns:r,columResizeHandler:i,setMeasuredCellHeight:o,onKeyDown:a,onCellClick:s}=n,l=zg(FH),c=zg(my),u=zg(sy),d=zg(aU),f=Fg(K$),p=zg(CH),h=zg(fy),m=zg(XH)[e],g=zg(wy),y=zg(SG(e)),b=r[e],{open:v,setOpen:x,handleOpenMenu:w,toggleSortOrder:S}=Sne({isInteractionEnabled:h,column:b}),k=zg(ny),C=Aie(e,o),E=r.length-1===e,M=k?qU:sG,{ref:R,isDragging:_}=Mne(b,e),A=Zte(b.id),P=y&&!g.enabled&&h?0:-1,I=a?t=>{a(t,e,w)}:void 0;return vt.jsxs(Pie,{"data-dragging":_,ref:R,className:`sn-table-cell ${qm}`,title:u.passive?b.label:void 0,onClick:k?w:S,applicableStyle:{...l.header,...lU(l,p,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:F$(c,E,d),borderLeftWidth:$$(c,E,d),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:b.headTextAlign,boxSizing:"border-box",zIndex:r.length-e,flexDirection:"right"===b.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:A},interactions:u,hoverBackground:b.headerColor?.headerMenuHoverBackground??l.headerMenuHoverBackground,background:k&&v?b.headerColor?.headerMenuActiveBackground??l.headerMenuActiveBackground:b.headerColor?.background??l.header.background,color:b.headerColor?.color??l.header.color,tabIndex:P,onKeyDown:I,onMouseDown:t=>{t.preventDefault(),h&&s?.(e)},"data-col":e,children:[vt.jsx(M,{forwardRef:C,column:b,isInteractionEnabled:h,open:v,setOpen:x,columnWidth:m}),vt.jsx(xne,{column:b,isLastColumn:E,onColumnResize:i,setIsAdjustingWidth:f})]})},Tie=e=>{const[t,n]=an.useState(new Map);_m(()=>{n(new Map)},[e.length]);const r=an.useCallback((e,t)=>{n(n=>gie(n.get(t),e)?new Map(n).set(t,e):n)},[]);return{rowHeight:an.useMemo(()=>mie(t),[t]),setMeasuredCellHeight:r}},Die=(e,t)=>{an.useImperativeHandle(e,()=>({scrollTo:e=>t.current?.scrollTo(e)}),[t])},Oie=e=>{const t=zg(Iy),n=zg(Yg),r=zg(qne),i=zg(XH);_m(()=>{e.current?.resetAfterIndex(0,!1)},[n,r,e,i,t])},Nie={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},qie=an.forwardRef((e,t)=>{const{columResizeHandler:n}=e,r=zg(EH),i=zg(Ure),o=Fg($re),a=sn.useRef(null),s=an.useRef(null),l=zg($H),c=zg(Yg),u=zg(yy),d=zg(my),f=zg(XH),{rowHeight:p,setMeasuredCellHeight:h}=Tie(r),m=bne(u,c),{handleHeadKeyDown:g,focusHeadCellOnClick:y}=are();return Die(t,a),Oie(a),xie(s,o),vt.jsx(qre,{className:"sn-table-head-row",ref:a,outerRef:s,layout:"horizontal",style:{...Nie,...m?{display:"none"}:void 0},itemCount:r.length,itemSize:e=>f[e],height:Math.max(p+8,l),width:i.width,itemKey:e=>r[e].id,itemData:{columns:r,columResizeHandler:n,setMeasuredCellHeight:h,onKeyDown:g,onCellClick:y},direction:d,children:Iie})});var Lie=an.memo(qie);const jie=an.forwardRef((e,t)=>{const{children:n,onScroll:r}=e,i=zg(my),o=zg(dy),{width:a,height:s}=zg(Wre),l=Fg($ne),c=an.useCallback(e=>{l(e),"function"==typeof t?t(e):t&&(t.current=e)},[t,l]);return vt.jsx("div",{"data-testid":"scrollable-container",ref:c,style:{overflow:o?"auto":"hidden",width:a,height:s},onScroll:r,dir:i,tabIndex:-1,children:n})}),zie=({children:e})=>{const t=zg(my),n=zg(Ure);return vt.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})},Fie=({index:e,style:t,data:n})=>{const{columns:r,totals:i,setMeasuredCellHeight:o,onKeyDown:a,onCellClick:s}=n,l=zg(FH),c=zg(Yg),u=zg(my),d=zg(cy),f=zg(fy),p=zg(aU),h=zg(Zre),m=Aie(e,o),g=r[e].totalInfo,{totalsTextAlign:y,isTotalNumeric:b}=r[e],v=c.qHyperCube.qSize.qcx-1===e,x=Zte(r[e].id),w=a?t=>{a(t,e)}:void 0;return vt.jsx("div",{className:`sn-table-cell ${qm}`,tabIndex:-1,title:d?g:void 0,"data-col":e,onKeyDown:w,onMouseDown:t=>{t.preventDefault(),f&&s?.(e)},style:{...t,...l.totalRow,...lU(l,i,!1),background:l.totalRow.background,display:"flex",alignItems:i.atTop?"end":"start",borderStyle:"solid",borderRightWidth:F$(u,v,p),borderLeftWidth:$$(u,v,p),borderTopWidth:i.atBottom?"1px":"0px",borderBottomWidth:h&&i.atBottom||i.atTop?"1px":"0px",padding:"4px 12px",justifyContent:y,textAlign:y,boxSizing:"border-box",cursor:"default",opacity:x},children:vt.jsx(NU,{forwardRef:b?void 0:m,isNumeric:b,children:g})})},$ie=an.forwardRef((e,t)=>{const{totals:n}=e,r=zg(EH),i=zg(Ure),o=Fg(Bre),a=an.useRef(null),s=an.useRef(null),l=zg(BH),c=zg(my),u=zg(Yg),d=zg(XH),{rowHeight:f,setMeasuredCellHeight:p}=Tie(r),{handleTotalsKeyDown:h,focusTotalsCellOnClick:m}=are();return Die(t,a),Oie(a),xie(s,o),vt.jsx(qre,{className:"sn-table-totals-row",ref:a,outerRef:s,layout:"horizontal",style:Nie,itemCount:u.qHyperCube.qSize.qcx,itemSize:e=>d[e],height:Math.max(f,l),width:i.width,itemData:{columns:r,totals:n,setMeasuredCellHeight:p,onKeyDown:h,onCellClick:m},direction:c,children:Fie})});var Bie=an.memo($ie);const Hie=(e,t,n)=>{const r=zg(my),i=zg(QB);return an.useCallback(o=>{const{scrollHeight:a,clientHeight:s,scrollTop:l}=o.currentTarget,c=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:i}=e,o=n-r;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(o.currentTarget,r),u=Math.max(0,Math.min(1,l/(a-s)));i.scrollTopRatio=u,i.scrollLeft=c,n.current?.interpolatedScrollTo(Number.isNaN(u)?0:u,c),e.current?.scrollTo(c),t.current?.scrollTo(c)},[i,n,e,t,r])},Vie=()=>{const e=zg(CH),t=an.useRef(null),n=an.useRef(null),r=an.useRef(null),i=an.useRef(null),o=Hie(n,r,i),a=an.useCallback(()=>{t.current&&(t.current.scrollTop=0)},[t]);kG(),(e=>{const t=zg(MH),n=zg(qne),r=zg(Iy),i=zg(zne);an.useEffect(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollLeft=0,e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[t,e]),an.useEffect(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[n,i,r,e])})(t),TG(t);const s=vt.jsx(Bie,{ref:r,totals:e},"totals");return vt.jsxs(bG,{children:[vt.jsx(jie,{ref:t,onScroll:o,children:vt.jsxs(_ie,{children:[vt.jsxs(zie,{children:[vt.jsx(Lie,{ref:n,columResizeHandler:a}),e.atTop?s:null,vt.jsx(Rie,{ref:i}),e.atBottom?s:null]}),vt.jsx(sU,{})]})}),vt.jsx(dG,{isPagination:!1})]})};var Wie=an.memo(Vie);const Uie=()=>{const e=zg(Yg),t=zg(Ry),n=zg(sy),{paginationNeeded:r,totalRowCount:i,totalColumnCount:o,totalPages:a}=zg(kH),s=zg(Iy),l=zg(Ty),c=zg(wy),[u,d]=$g(qne),f=an.useRef(null),p=an.useRef(!1),h=Fg(Lne),m=Fg(jne);an.useEffect(()=>{h(p)},[h]);const g=sn.useCallback(e=>{f.current=e,m(e)},[m]),{handleWrapperKeyDown:y}=are();return(()=>{const e=zg(_y),{keyboard:t}=zg(Yne),n=zg(wG),r=zg(CH),i=zg(zne),{scrollToCell:o}=zg(Gne),{shouldRefocusRef:a}=zg(Kne),s=an.useRef({focusedCellCoord:n,totalsPosition:r,rowCount:i,scrollToCell:o,rootElement:e}),l=an.useRef(null),c=an.useRef(null);an.useLayoutEffect(()=>{s.current={focusedCellCoord:n,totalsPosition:r,rowCount:i,scrollToCell:o,rootElement:e}},[n,r,i,o,e]),an.useEffect(()=>{let e=!1;const{focusedCellCoord:n,totalsPosition:r,rowCount:i,scrollToCell:o,rootElement:u}=s.current;if("function"==typeof u.querySelector){if(t.active){const[t,a]=n,d=r.atTop?2:1;if(t>=d&&t<d+i){null!==c.current&&(cancelAnimationFrame(c.current),c.current=null),o?.(t-d,a);const n=t=>{if(e)return;const r=ere(s.current.rootElement,s.current.focusedCellCoord,s.current.totalsPosition,s.current.rowCount);r&&document.activeElement!==r&&Zne(r),r&&document.activeElement===r||t>0&&(l.current=requestAnimationFrame(()=>{n(t-1)}))};l.current=requestAnimationFrame(()=>{e||n(5)})}else{const e=ere(u,n,r,i);Zne(e)}}else null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),c.current=requestAnimationFrame(()=>{if(e)return;const t=s.current;if(a?.current)return;if(t.rootElement.contains(document.activeElement))return;const n=ere(t.rootElement,t.focusedCellCoord,t.totalsPosition,t.rowCount);n?.blur(),Qne(t.rootElement)});return()=>{e=!0,null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),null!==c.current&&(cancelAnimationFrame(c.current),c.current=null)}}},[t.active,e,a])})(),xG(f,p),vt.jsxs(IU,{ref:g,"data-testid":"sn-table",onKeyDown:y,children:[vt.jsx(qG,{}),vt.jsx(Wie,{}),vt.jsx(WW,{paginationNeeded:r,handleChangePage:e=>{d(e)},pageInfo:u,totalRowCount:i,totalColumnCount:o,totalPages:a,keyboard:c,translator:l,theme:s,interactions:n,rect:t,layout:e})]})};var Gie=an.memo(Uie);const Yie=t=>{const n=t.get(Sy),r=t.get(vy),i=t.get(Gg),o=t.get(my);e.useEffect(()=>{i&&n&&(r?function(e){const t=e.get(my),n=e.get(Py),r=tV(t);n.render(vt.jsx(Wi,{stylisPlugins:"rtl"===t?[l$]:void 0,children:vt.jsx(ac,{theme:r,children:vt.jsx(Dg,{store:e,children:vt.jsx(eV,{children:vt.jsx(Ine,{})})})})}))}(t):function(e){const t=e.get(my),n=e.get(Py),r=tV(t);n.render(vt.jsx(sn.StrictMode,{children:vt.jsx(ac,{theme:r,children:vt.jsx(Dg,{store:e,children:vt.jsx(eV,{children:vt.jsx(Gie,{})})})})}))}(t))},[i,r,t,n,o])};function Kie(e,t){const n=e.getElementsByClassName("sn-table-container")[0];if(!n)return{};const r=n.getBoundingClientRect(),i=e.getElementsByClassName("sn-table-head-row")[0],o=i?.getBoundingClientRect()??{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=a?.getBoundingClientRect()??{height:0},l=e.getElementsByClassName("sn-table-data-row"),c={top:r.y+o.height+(t.atTop?s.height:0),bottom:r.y+r.height-(t.atBottom?s.height:0)},u=((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,c),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,c),f=((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,c,u);return{visibleRowStartIndex:u,visibleRowEndIndex:d,rowPartialHeight:f}}const Xie=(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]}},Jie=(e,t,n)=>{if(!e)return!1;const r=e.y+e.height/2;return r>=t&&r<=n};const Qie=(e,t,n,r,i)=>{if(e<0)return 0;const o=n.qHyperCube.qSize.qcy,a=r.rowsPerPage||fH.rowsPerPage,s=i?.isMultiPage?0:3;return Math.min(o,a,e-t+1+s)},Zie=(e,t,n,r,i)=>{if(r&&!r.isMultiPage)return r;const o=rH(e,r);if(i){const{visibleRowStartIndex:i=-1,visibleRowEndIndex:a=-1,rowPartialHeight:s}=Kie(n,o);return{rowPartialHeight:s,scrollLeft:t.scrollLeft,visibleTop:t.qTop+i,visibleHeight:Qie(a,i,e,t,r),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:o}}const{visibleRowStartIndex:a=-1,visibleRowEndIndex:s=-1}=function(e,t){const n=e.querySelector(".sn-table-body"),r=n?.getBoundingClientRect(),i=n?.querySelectorAll(".sn-table-body .sn-table-cell");if(!i||!r)return{};const{scrollTopRatio:o=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:c=0}=t,u=l*c,d=a-u,f=d+s-1,p=Xie(d,i),h=p?.getBoundingClientRect();if(!p||!h)return{};const m=r.y;if(1-o<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+u,visibleRowEndIndex:f+u};const g=r.y+r.height,y=(Jie(h,m,g)?d:d+1)+u;let b=f+u;const v=Xie(f,i),x=v?.getBoundingClientRect();return v&&x&&(Jie(x,m,g)||(b=f-1+u)),{visibleRowStartIndex:y,visibleRowEndIndex:b}}(n,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:a,visibleHeight:Qie(s,a,e,t,r),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:o}},eoe={version:JSON.stringify("6.38.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:[]};var toe=e=>({properties:{initial:eoe},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:e=>Zy({...e}),exportProperties:Gy,exploration:cz(e)});const noe=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),roe=e=>e.getStyle("object","straightTableV2","backgroundColor");return function(t){return{qae:toe(t),ext:wF(t),component(){const n=e.useStaleLayout(),r=e.useMemo(()=>Pg(),[!1!==n.usePagination]);r.set(Wg,t);const i=e.useElement();r.set(_y,i),r.set(Yg,n),r.set(Bg,e.useApp()),r.set(Sy,e.useModel()),r.set(sy,e.useInteractionState()),r.set(Ty,e.useTranslator()),r.set(oy,e.useSelections()),r.set(hy,e.useOptions()),r.set(wy,e.useKeyboard()),r.set(Ry,e.useRect()),r.set(Vg,e.useEmbed());const o=ym(n,i,noe,roe);r.set(Iy,o),r.set(Gg,Rm(o,n,t)),r.set(Hg,Ye()),(t=>{const n=t.get(Py);e.useEffect(()=>()=>{n.unmount()},[n])})(r),e.onContextMenu?.((e,t)=>{const n=t.target,r=n?.closest(`.${qm}`);r?.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{Um(r)}})}),(({store:t})=>{const n=t.get(Yg),r=t.get(Sy),i=t.get(_y),o=t.get(My),a=t.get(yy),s=t.get(vy);e.onTakeSnapshot(async e=>{const l=e;if(!l.snapshotData||!r||l.snapshotData.content)return l;if("getHyperCubeData"in r){const e=t.get(QB),{rowPartialHeight:c,scrollLeft:u,scrollTopRatio:d,visibleLeft:f,visibleWidth:p,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:y}=Zie(n,e,i,a,s);l.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:h,qWidth:n.qHyperCube.qSize.qcx,qHeight:m}]),l.snapshotData.content={rowPartialHeight:c,scrollLeft:u,scrollTopRatio:d,visibleLeft:f,visibleWidth:p,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:y,size:{width:o.width,height:o.height},estimatedRowHeight:e.estimatedRowHeight}}return l}),e.useImperativeHandle(()=>({getViewState:()=>Zie(n,t.get(QB),i,a,s)}),[n,t,i,s])})({store:r}),Yie(r)}}}});