@nebula.js/sn-pie-chart 1.24.5 → 1.24.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specifications/plugins.json +1 -1
- package/api-specifications/properties.json +1 -1
- package/core/esm/index.js +3 -3
- package/dist/sn-pie-chart.js +3 -3
- package/dist/sn-pie-chart.systemjs.js +5 -5
- package/package.json +1 -1
- package/sn-pie-chart-ext/dist/sn-pie-chart.js +3 -3
- package/sn-pie-chart-ext/sn-pie-chart.qext +1 -1
package/dist/sn-pie-chart.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-pie-chart v1.24.
|
|
2
|
+
* @nebula.js/sn-pie-chart v1.24.6
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
14
14
|
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,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).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,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<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 rg(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const ig={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"},og=/%\)?$/,ag=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,sg=/^\(oct\)/i,lg=/^\(dec\)/i,cg=/^\(hex\)/i,ug=/^\(bin\)/i,dg=/^\(rom\)/i,fg=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,pg=/#|0/g;function hg(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 mg(e,t,n){let r;return ag.test(t)?e=hg(e,Number(/\d{2}/.exec(t)[0]),t,n):sg.test(t)?e=hg(e,8,t,n):lg.test(t)?e=hg(e,10,t,n):cg.test(t)?e=hg(e,16,t,n):ug.test(t)?e=hg(e,2,t,n):dg.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(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)):t+r+e.toExponential(0)),e}function gg(e,t,n){const r=rg(e);return n?r:new RegExp(r||"",t)}function yg(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=rg(m)),h&&(h=rg(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(gg(c,"g"),t)),u=n,n=".",u&&(a=a.replace(gg(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(pg)),e.prefix=s||"",e.postfix=l||"",e.pattern=p,e.maxPrecision=y?y.length:2,e.percentage=og.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(gg(t,null,!0),"|").concat(gg(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class vg{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 ig;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 vg(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],fg.test(e[0])&&(r.positive.isFunctional=!0),e[1]?fg.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?fg.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||yg(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&yg(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&yg(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=mg(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.toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=ng(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).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=ng(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 bg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=(e=>e)}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function xg(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 vg(...t)}(i,e,t,n,r),a=bg(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 wg="D",kg="T",Cg="TS",Sg="IV",Eg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Mg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Tg=["January","February","March","April","May","June","July","August","September","October","November","December"],Dg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _g(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function Ng(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function qg(e,t){let n,r=function(e){const t=e,n=24*Ng(t),r=60*Ng(n),i=60*Ng(r),o=1e3*Ng(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 Rg{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Eg,qDayNames:Mg,qLongMonthNames:Tg,qMonthNames:Dg}),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={[kg]:r.qTimeFmt||"hh:mm:ss",[wg]:r.qDateFmt||"YYYY-MM-DD",[Cg]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new Rg(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=qg(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:_g("".concat(t.year).slice(-2),2),YYY:_g("".concat(t.year).slice(-3),3),def:e=>_g("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:_g("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:_g("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>_g("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>_g("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>_g("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>_g("".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");return 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}))}}function Pg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Rg(...t)}function Ag(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Ig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Pg(n,e,t),i=bg(r.format.bind(r),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function o(e){return t!==Sg?Ag(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=Pg(n,e,t),i=bg(r.format.bind(r),{toKey:e=>"object"==typeof e?e.getTime():e}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function Og(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Ig(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"),xg(n,r,i,o,t)}function Lg(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u=e=>(null==e?void 0:e.qText)||"",d="dimension"===s?"first":"avg",f=Og(t,i),p="dimension"===s?"first":(e,t)=>f(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:u,reduce:d,reduceLabel:p,formatter:()=>f,tags:()=>t.qTags};return h}function zg(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Lg(ym({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=zg("qAttrDimInfo",t,n,a,ym({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=zg("qAttrExprInfo",t,n,a,ym({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=zg("qMeasureInfo",t,n,a,ym({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function Fg(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=Fg.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>Hm(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=tg,a.hierarchy=eg,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=wm,a.pages=i.qDataPages,a.hierarchy=eg):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...zg("qDimensionInfo",i,e,"",ym({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...zg("qMeasureInfo",i,e,"",ym({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),i=Lg(sm({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),s}const jg=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Hg=/\/qDimensionInfo(?:\/(\d+))?/,Bg=/\/qMeasureInfo\/(\d+)/,Vg=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Wg=/\/qAttrExprInfo\/(\d+)/,$g=/\/?qHyperCube/,Ug=/\/?qTreeData/,Yg=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Xg=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function Kg(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;$g.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Yg):Ug.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Xg);let s=!0;if(Hg.test(e)&&(r=+Hg.exec(e)[1]),Bg.test(e)&&(i=+Bg.exec(e)[1]),Vg.test(e)){i=-1,r=0;const e=+Vg.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(Wg.test(e)){const e=i;if(t){i=0;const a=zm(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+=+Wg.exec(n)[1]}else r>-1?(r=-1,i=+Wg.exec(n)[1]):i+=+Wg.exec(n)[1]+1}return jg.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function Gg(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=Kg(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 Zg(e){Fg.util=e.data("matrix").util,e.data("q",Fg),e.formatter("q-number",xg),e.formatter("q-time",Ig)}Zg.qBrushHelper=Gg,Zg.selections=Gg;const Jg={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Qg(e){return Jg[e]||e}function ey(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=Qg(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=Qg(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}function ty(){return(ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}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};const dy="center",fy="bottom";var py={NoDataExist:{label:"NoDataExist",alignment:dy,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:dy,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:dy,default:!1},LimitedData:{label:"LimitedData",alignment:fy,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:fy,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:fy,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:fy,default:!1}};const hy=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],my={};hy.forEach((([e,{width:t,height:n}])=>{my[e]={width:t,height:n}}));const gy={getLayoutModes:()=>my,getLayoutMode(e,t){let n;for(n=0;n<hy.length;++n)if(e>=hy[n][1].width&&t>=hy[n][1].height)return hy[n][0];return"SPARK"}};function yy(e,t){return{layoutModes:gy.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const vy=(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o};function by(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const xy=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),wy=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),ky=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Cy={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>xy.test(e),isRtlChar:e=>wy.test(e)||ky.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Cy.isLtrChar(r))return"ltr";if(Cy.isRtlChar(r))return"rtl"}return"ltr"}},Sy={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?Sy.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=Cy.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=Cy.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Cy.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=Cy.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Cy.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Sy.getColorSymbol(e,t)]:[Sy.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Cy.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Cy.detectTextDirection(e.value);let l;return l=i?r?[e.value,Sy.getColorSymbol(t,n)]:[Sy.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Ey(e){const t=parseInt(e,10);if(!isNaN(t))return t}const My=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function Ty(e,t){const n=e.styleService.label.value.getStyle();return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){const r=n.themeService.getStyles(),i=n.styleService.label.value.getStyle(),o=i.fill===r.label.value.color;return{position:e.position,justify:e.justify,fill:o&&!e.onBackground?My(t):i.fill,overflow:e.overflow,padding:e.padding}}(n,t,e))),fontSize:Ey(n.fontSize),fontFamily:n.fontFamily,label:e.label}}function Dy(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _y(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ny(){}var qy=.7,Ry=1/qy,Py="\\s*([+-]?\\d+)\\s*",Ay="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Iy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Oy=/^#([0-9a-f]{3,8})$/,Ly=new RegExp(`^rgb\\(${Py},${Py},${Py}\\)$`),zy=new RegExp(`^rgb\\(${Iy},${Iy},${Iy}\\)$`),Fy=new RegExp(`^rgba\\(${Py},${Py},${Py},${Ay}\\)$`),jy=new RegExp(`^rgba\\(${Iy},${Iy},${Iy},${Ay}\\)$`),Hy=new RegExp(`^hsl\\(${Ay},${Iy},${Iy}\\)$`),By=new RegExp(`^hsla\\(${Ay},${Iy},${Iy},${Ay}\\)$`),Vy={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 Wy(){return this.rgb().formatHex()}function $y(){return this.rgb().formatRgb()}function Uy(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Oy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Yy(t):3===n?new Gy(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Xy(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Xy(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=Ly.exec(e))?new Gy(t[1],t[2],t[3],1):(t=zy.exec(e))?new Gy(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Fy.exec(e))?Xy(t[1],t[2],t[3],t[4]):(t=jy.exec(e))?Xy(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Hy.exec(e))?nv(t[1],t[2]/100,t[3]/100,1):(t=By.exec(e))?nv(t[1],t[2]/100,t[3]/100,t[4]):Vy.hasOwnProperty(e)?Yy(Vy[e]):"transparent"===e?new Gy(NaN,NaN,NaN,0):null}function Yy(e){return new Gy(e>>16&255,e>>8&255,255&e,1)}function Xy(e,t,n,r){return r<=0&&(e=t=n=NaN),new Gy(e,t,n,r)}function Ky(e){return e instanceof Ny||(e=Uy(e)),e?new Gy((e=e.rgb()).r,e.g,e.b,e.opacity):new Gy}function Gy(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Zy(){return`#${tv(this.r)}${tv(this.g)}${tv(this.b)}`}function Jy(){const e=Qy(this.opacity);return`${1===e?"rgb(":"rgba("}${ev(this.r)}, ${ev(this.g)}, ${ev(this.b)}${1===e?")":`, ${e})`}`}function Qy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ev(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tv(e){return((e=ev(e))<16?"0":"")+e.toString(16)}function nv(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new iv(e,t,n,r)}function rv(e){if(e instanceof iv)return new iv(e.h,e.s,e.l,e.opacity);if(e instanceof Ny||(e=Uy(e)),!e)return new iv;if(e instanceof iv)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 iv(a,s,l,e.opacity)}function iv(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ov(e){return(e=(e||0)%360)<0?e+360:e}function av(e){return Math.max(0,Math.min(1,e||0))}function sv(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Dy(Ny,Uy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Wy,formatHex:Wy,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return rv(this).formatHsl()},formatRgb:$y,toString:$y}),Dy(Gy,(function(e,t,n,r){return 1===arguments.length?Ky(e):new Gy(e,t,n,null==r?1:r)}),_y(Ny,{brighter(e){return e=null==e?Ry:Math.pow(Ry,e),new Gy(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?qy:Math.pow(qy,e),new Gy(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gy(ev(this.r),ev(this.g),ev(this.b),Qy(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:Zy,formatHex:Zy,formatHex8:function(){return`#${tv(this.r)}${tv(this.g)}${tv(this.b)}${tv(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Jy,toString:Jy})),Dy(iv,(function(e,t,n,r){return 1===arguments.length?rv(e):new iv(e,t,n,null==r?1:r)}),_y(Ny,{brighter(e){return e=null==e?Ry:Math.pow(Ry,e),new iv(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?qy:Math.pow(qy,e),new iv(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 Gy(sv(e>=240?e-240:e+120,i,r),sv(e,i,r),sv(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new iv(ov(this.h),av(this.s),av(this.l),Qy(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=Qy(this.opacity);return`${1===e?"hsl(":"hsla("}${ov(this.h)}, ${100*av(this.s)}%, ${100*av(this.l)}%${1===e?")":`, ${e})`}`}}));const lv=Math.PI/180,cv=180/Math.PI,uv=.96422,dv=.82521,fv=4/29,pv=6/29,hv=3*pv*pv;function mv(e){if(e instanceof gv)return new gv(e.l,e.a,e.b,e.opacity);if(e instanceof Cv)return Sv(e);e instanceof Gy||(e=Ky(e));var t,n,r=xv(e.r),i=xv(e.g),o=xv(e.b),a=yv((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=yv((.4360747*r+.3850649*i+.1430804*o)/uv),n=yv((.0139322*r+.0971045*i+.7141733*o)/dv)),new gv(116*a-16,500*(t-a),200*(a-n),e.opacity)}function gv(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function yv(e){return e>.008856451679035631?Math.pow(e,1/3):e/hv+fv}function vv(e){return e>pv?e*e*e:hv*(e-fv)}function bv(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function xv(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function wv(e){if(e instanceof Cv)return new Cv(e.h,e.c,e.l,e.opacity);if(e instanceof gv||(e=mv(e)),0===e.a&&0===e.b)return new Cv(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*cv;return new Cv(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function kv(e,t,n,r){return 1===arguments.length?wv(e):new Cv(e,t,n,null==r?1:r)}function Cv(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Sv(e){if(isNaN(e.h))return new gv(e.l,0,0,e.opacity);var t=e.h*lv;return new gv(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Dy(gv,(function(e,t,n,r){return 1===arguments.length?mv(e):new gv(e,t,n,null==r?1:r)}),_y(Ny,{brighter(e){return new gv(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new gv(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Gy(bv(3.1338561*(t=uv*vv(t))-1.6168667*(e=1*vv(e))-.4906146*(n=dv*vv(n))),bv(-.9787684*t+1.9161415*e+.033454*n),bv(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Dy(Cv,kv,_y(Ny,{brighter(e){return new Cv(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Cv(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Sv(this).rgb()}}));var Ev=-.14861,Mv=1.78277,Tv=-.29227,Dv=-.90649,_v=1.97294,Nv=_v*Dv,qv=_v*Mv,Rv=Mv*Tv-Dv*Ev;function Pv(e){if(e instanceof Av)return new Av(e.h,e.s,e.l,e.opacity);e instanceof Gy||(e=Ky(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Rv*r+Nv*t-qv*n)/-5.9615122912,o=r-i,a=(_v*(n-i)-Tv*o)/Dv,s=Math.sqrt(a*a+o*o)/(_v*i*(1-i)),l=s?Math.atan2(a,o)*cv-120:NaN;return new Av(l<0?l+360:l,s,i,e.opacity)}function Av(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Iv(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}Dy(Av,(function(e,t,n,r){return 1===arguments.length?Pv(e):new Av(e,t,n,null==r?1:r)}),_y(Ny,{brighter(e){return e=null==e?Ry:Math.pow(Ry,e),new Av(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?qy:Math.pow(qy,e),new Av(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*lv,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Gy(255*(t+n*(Ev*r+Mv*i)),255*(t+n*(Tv*r+Dv*i)),255*(t+n*(_v*r)),this.opacity)}})),function(e){1===e.length&&(e=function(e){return function(t,n){return Iv(e(t),n)}}(e))}(Iv);var Ov="$";function Lv(){}function zv(e,t){var n=new Lv;if(e instanceof Lv)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Fv(){}Lv.prototype=zv.prototype={constructor:Lv,has:function(e){return Ov+e in this},get:function(e){return this[Ov+e]},set:function(e,t){return this[Ov+e]=t,this},remove:function(e){var t=Ov+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ov&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ov&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ov&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ov&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ov&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ov)return!1;return!0},each:function(e){for(var t in this)t[0]===Ov&&e(this[t],t.slice(1),this)}};var jv=zv.prototype;function Hv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Bv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Vv(){}Fv.prototype={constructor:Fv,has:jv.has,add:function(e){return this[Ov+(e+="")]=e,this},remove:jv.remove,clear:jv.clear,values:jv.keys,size:jv.size,empty:jv.empty,each:jv.each};var Wv=.7,$v=1/Wv,Uv="\\s*([+-]?\\d+)\\s*",Yv="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xv="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kv=/^#([0-9a-f]{3})$/,Gv=/^#([0-9a-f]{6})$/,Zv=new RegExp("^rgb\\("+[Uv,Uv,Uv]+"\\)$"),Jv=new RegExp("^rgb\\("+[Xv,Xv,Xv]+"\\)$"),Qv=new RegExp("^rgba\\("+[Uv,Uv,Uv,Yv]+"\\)$"),eb=new RegExp("^rgba\\("+[Xv,Xv,Xv,Yv]+"\\)$"),tb=new RegExp("^hsl\\("+[Yv,Xv,Xv]+"\\)$"),nb=new RegExp("^hsla\\("+[Yv,Xv,Xv,Yv]+"\\)$"),rb={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 ib(e){var t;return e=(e+"").trim().toLowerCase(),(t=Kv.exec(e))?new cb((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=Gv.exec(e))?ob(parseInt(t[1],16)):(t=Zv.exec(e))?new cb(t[1],t[2],t[3],1):(t=Jv.exec(e))?new cb(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Qv.exec(e))?ab(t[1],t[2],t[3],t[4]):(t=eb.exec(e))?ab(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=tb.exec(e))?db(t[1],t[2]/100,t[3]/100,1):(t=nb.exec(e))?db(t[1],t[2]/100,t[3]/100,t[4]):rb.hasOwnProperty(e)?ob(rb[e]):"transparent"===e?new cb(NaN,NaN,NaN,0):null}function ob(e){return new cb(e>>16&255,e>>8&255,255&e,1)}function ab(e,t,n,r){return r<=0&&(e=t=n=NaN),new cb(e,t,n,r)}function sb(e){return e instanceof Vv||(e=ib(e)),e?new cb((e=e.rgb()).r,e.g,e.b,e.opacity):new cb}function lb(e,t,n,r){return 1===arguments.length?sb(e):new cb(e,t,n,null==r?1:r)}function cb(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ub(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function db(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pb(e,t,n,r)}function fb(e){if(e instanceof pb)return new pb(e.h,e.s,e.l,e.opacity);if(e instanceof Vv||(e=ib(e)),!e)return new pb;if(e instanceof pb)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 pb(a,s,l,e.opacity)}function pb(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function hb(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Hv(Vv,ib,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Hv(cb,lb,Bv(Vv,{brighter:function(e){return e=null==e?$v:Math.pow($v,e),new cb(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Wv:Math.pow(Wv,e),new cb(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+ub(this.r)+ub(this.g)+ub(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Hv(pb,(function(e,t,n,r){return 1===arguments.length?fb(e):new pb(e,t,n,null==r?1:r)}),Bv(Vv,{brighter:function(e){return e=null==e?$v:Math.pow($v,e),new pb(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Wv:Math.pow(Wv,e),new pb(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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 cb(hb(e>=240?e-240:e+120,i,r),hb(e,i,r),hb(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var mb=Math.PI/180,gb=180/Math.PI,yb=.96422,vb=.82521,bb=4/29,xb=6/29,wb=3*xb*xb;function kb(e){if(e instanceof Cb)return new Cb(e.l,e.a,e.b,e.opacity);if(e instanceof _b){if(isNaN(e.h))return new Cb(e.l,0,0,e.opacity);var t=e.h*mb;return new Cb(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof cb||(e=sb(e));var n,r,i=Tb(e.r),o=Tb(e.g),a=Tb(e.b),s=Sb((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?n=r=s:(n=Sb((.4360747*i+.3850649*o+.1430804*a)/yb),r=Sb((.0139322*i+.0971045*o+.7141733*a)/vb)),new Cb(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Cb(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Sb(e){return e>.008856451679035631?Math.pow(e,1/3):e/wb+bb}function Eb(e){return e>xb?e*e*e:wb*(e-bb)}function Mb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Tb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Db(e){if(e instanceof _b)return new _b(e.h,e.c,e.l,e.opacity);if(e instanceof Cb||(e=kb(e)),0===e.a&&0===e.b)return new _b(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*gb;return new _b(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function _b(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Hv(Cb,(function(e,t,n,r){return 1===arguments.length?kb(e):new Cb(e,t,n,null==r?1:r)}),Bv(Vv,{brighter:function(e){return new Cb(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Cb(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new cb(Mb(3.1338561*(t=yb*Eb(t))-1.6168667*(e=1*Eb(e))-.4906146*(n=vb*Eb(n))),Mb(-.9787684*t+1.9161415*e+.033454*n),Mb(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Hv(_b,(function(e,t,n,r){return 1===arguments.length?Db(e):new _b(e,t,n,null==r?1:r)}),Bv(Vv,{brighter:function(e){return new _b(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new _b(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return kb(this).rgb()}}));var Nb=-.14861,qb=1.78277,Rb=-.29227,Pb=-.90649,Ab=1.97294,Ib=Ab*Pb,Ob=Ab*qb,Lb=qb*Rb-Pb*Nb;function zb(e){if(e instanceof jb)return new jb(e.h,e.s,e.l,e.opacity);e instanceof cb||(e=sb(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Lb*r+Ib*t-Ob*n)/(Lb+Ib-Ob),o=r-i,a=(Ab*(n-i)-Rb*o)/Pb,s=Math.sqrt(a*a+o*o)/(Ab*i*(1-i)),l=s?Math.atan2(a,o)*gb-120:NaN;return new jb(l<0?l+360:l,s,i,e.opacity)}function Fb(e,t,n,r){return 1===arguments.length?zb(e):new jb(e,t,n,null==r?1:r)}function jb(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Hb(e){return function(){return e}}function Bb(e,t){return function(n){return e+n*t}}function Vb(e){return 1==(e=+e)?Wb: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):Hb(isNaN(t)?n:t)}}function Wb(e,t){var n=t-e;return n?Bb(e,n):Hb(isNaN(e)?t:e)}function $b(e){return function t(n){function r(t,r){var i=e((t=Fb(t)).h,(r=Fb(r)).h),o=Wb(t.s,r.s),a=Wb(t.l,r.l),s=Wb(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function Ub(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}Hv(jb,Fb,Bv(Vv,{brighter:function(e){return e=null==e?$v:Math.pow($v,e),new jb(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Wv:Math.pow(Wv,e),new jb(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*mb,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new cb(255*(t+n*(Nb*r+qb*i)),255*(t+n*(Rb*r+Pb*i)),255*(t+n*(Ab*r)),this.opacity)}})),function e(t){var n=Vb(t);function r(e,t){var r=n((e=lb(e)).r,(t=lb(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Wb(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),$b((function(e,t){var n=t-e;return n?Bb(e,n>180||n<-180?n-360*Math.round(n/360):n):Hb(isNaN(e)?t:e)})),$b(Wb);var Yb,Xb=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kb(e){return new Gb(e)}function Gb(e){if(!(t=Xb.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Zb(e,t){var n=Ub(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")}Kb.prototype=Gb.prototype,Gb.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Jb={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Zb(100*e,t)},r:Zb,s:function(e,t){var n=Ub(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Yb=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")+Ub(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Qb(e){return e}var ex,tx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nx(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,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)}):Qb,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Qb,s=e.percent||"%";function l(e){var t=(e=Kb(e)).fill,n=e.align,l=e.sign,c=e.symbol,u=e.zero,d=e.width,f=e.comma,p=e.precision,h=e.trim,m=e.type;"n"===m?(f=!0,m="g"):Jb[m]||(null==p&&(p=12),h=!0,m="g"),(u||"0"===t&&"="===n)&&(u=!0,t="0",n="=");var g="$"===c?i[0]:"#"===c&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",y="$"===c?i[1]:/[%p]/.test(m)?s:"",v=Jb[m],b=/[defgprs%]/.test(m);function x(e){var i,s,c,x=g,w=y;if("c"===m)w=v(e)+w,e="";else{var k=(e=+e)<0;if(e=v(Math.abs(e),p),h&&(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(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0==+e&&(k=!1),x=(k?"("===l?l:"-":"-"===l||"("===l?"":l)+x,w=("s"===m?tx[8+Yb/3]:"")+w+(k&&"("===l?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(c=e.charCodeAt(i))||c>57){w=(46===c?o+e.slice(i+1):e.slice(i))+w,e=e.slice(0,i);break}}f&&!u&&(e=r(e,1/0));var C=x.length+e.length+w.length,S=C<d?new Array(d-C+1).join(t):"";switch(f&&u&&(e=r(S+e,S.length?d-w.length:1/0),S=""),n){case"<":e=x+e+w+S;break;case"=":e=x+S+e+w;break;case"^":e=S.slice(0,C=S.length>>1)+x+e+w+S.slice(C);break;default:e=S+x+e+w}return a(e)}return p=null==p?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=Kb(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=Ub(Math.abs(e)))?e[1]:NaN}(t)/3))),i=Math.pow(10,-r),o=tx[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){(ex=nx(e)).format,ex.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var rx=new Date,ix=new Date;function ox(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return ox((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(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=function(t,r){return rx.setTime(+t),ix.setTime(+r),e(rx),e(ix),Math.floor(n(rx,ix))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var ax=ox((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));ax.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ox((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):ax:null},ax.range;var sx=1e3,lx=6e4,cx=36e5,ux=864e5,dx=6048e5;ox((function(e){e.setTime(Math.floor(e/sx)*sx)}),(function(e,t){e.setTime(+e+t*sx)}),(function(e,t){return(t-e)/sx}),(function(e){return e.getUTCSeconds()})).range,ox((function(e){e.setTime(Math.floor(e/lx)*lx)}),(function(e,t){e.setTime(+e+t*lx)}),(function(e,t){return(t-e)/lx}),(function(e){return e.getMinutes()})).range,ox((function(e){var t=e.getTimezoneOffset()*lx%cx;t<0&&(t+=cx),e.setTime(Math.floor((+e-t)/cx)*cx+t)}),(function(e,t){e.setTime(+e+t*cx)}),(function(e,t){return(t-e)/cx}),(function(e){return e.getHours()})).range;var fx=ox((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lx)/ux}),(function(e){return e.getDate()-1}));function px(e){return ox((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lx)/dx}))}fx.range;var hx=px(0),mx=px(1),gx=px(2),yx=px(3),vx=px(4),bx=px(5),xx=px(6);hx.range,mx.range,gx.range,yx.range,vx.range,bx.range,xx.range,ox((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})).range;var wx=ox((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));wx.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ox((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},wx.range,ox((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*lx)}),(function(e,t){return(t-e)/lx}),(function(e){return e.getUTCMinutes()})).range,ox((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*cx)}),(function(e,t){return(t-e)/cx}),(function(e){return e.getUTCHours()})).range;var kx=ox((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/ux}),(function(e){return e.getUTCDate()-1}));function Cx(e){return ox((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/dx}))}kx.range;var Sx=Cx(0),Ex=Cx(1),Mx=Cx(2),Tx=Cx(3),Dx=Cx(4),_x=Cx(5),Nx=Cx(6);Sx.range,Ex.range,Mx.range,Tx.range,Dx.range,_x.range,Nx.range,ox((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})).range;var qx=ox((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Rx(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 Px(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 Ax(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}qx.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ox((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},qx.range;var Ix,Ox,Lx,zx={"-":"",_:" ",0:"0"},Fx=/^\s*\d+/,jx=/^%/,Hx=/[\\^$*+?|[\]().{}]/g;function Bx(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 Vx(e){return e.replace(Hx,"\\$&")}function Wx(e){return new RegExp("^(?:"+e.map(Vx).join("|")+")","i")}function $x(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ux(e,t,n){var r=Fx.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Yx(e,t,n){var r=Fx.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Xx(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Kx(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Gx(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Zx(e,t,n){var r=Fx.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Jx(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Qx(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 ew(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function tw(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function nw(e,t,n){var r=Fx.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function rw(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function iw(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ow(e,t,n){var r=Fx.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function aw(e,t,n){var r=Fx.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function sw(e,t,n){var r=Fx.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function lw(e,t,n){var r=jx.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function cw(e,t,n){var r=Fx.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function uw(e,t,n){var r=Fx.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function dw(e,t){return Bx(e.getDate(),t,2)}function fw(e,t){return Bx(e.getHours(),t,2)}function pw(e,t){return Bx(e.getHours()%12||12,t,2)}function hw(e,t){return Bx(1+fx.count(wx(e),e),t,3)}function mw(e,t){return Bx(e.getMilliseconds(),t,3)}function gw(e,t){return mw(e,t)+"000"}function yw(e,t){return Bx(e.getMonth()+1,t,2)}function vw(e,t){return Bx(e.getMinutes(),t,2)}function bw(e,t){return Bx(e.getSeconds(),t,2)}function xw(e){var t=e.getDay();return 0===t?7:t}function ww(e,t){return Bx(hx.count(wx(e),e),t,2)}function kw(e,t){var n=e.getDay();return e=n>=4||0===n?vx(e):vx.ceil(e),Bx(vx.count(wx(e),e)+(4===wx(e).getDay()),t,2)}function Cw(e){return e.getDay()}function Sw(e,t){return Bx(mx.count(wx(e),e),t,2)}function Ew(e,t){return Bx(e.getFullYear()%100,t,2)}function Mw(e,t){return Bx(e.getFullYear()%1e4,t,4)}function Tw(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Bx(t/60|0,"0",2)+Bx(t%60,"0",2)}function Dw(e,t){return Bx(e.getUTCDate(),t,2)}function _w(e,t){return Bx(e.getUTCHours(),t,2)}function Nw(e,t){return Bx(e.getUTCHours()%12||12,t,2)}function qw(e,t){return Bx(1+kx.count(qx(e),e),t,3)}function Rw(e,t){return Bx(e.getUTCMilliseconds(),t,3)}function Pw(e,t){return Rw(e,t)+"000"}function Aw(e,t){return Bx(e.getUTCMonth()+1,t,2)}function Iw(e,t){return Bx(e.getUTCMinutes(),t,2)}function Ow(e,t){return Bx(e.getUTCSeconds(),t,2)}function Lw(e){var t=e.getUTCDay();return 0===t?7:t}function zw(e,t){return Bx(Sx.count(qx(e),e),t,2)}function Fw(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Dx(e):Dx.ceil(e),Bx(Dx.count(qx(e),e)+(4===qx(e).getUTCDay()),t,2)}function jw(e){return e.getUTCDay()}function Hw(e,t){return Bx(Ex.count(qx(e),e),t,2)}function Bw(e,t){return Bx(e.getUTCFullYear()%100,t,2)}function Vw(e,t){return Bx(e.getUTCFullYear()%1e4,t,4)}function Ww(){return"+0000"}function $w(){return"%"}function Uw(e){return+e}function Yw(e){return Math.floor(+e/1e3)}!function(e){(Ix=function(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=Wx(i),u=$x(i),d=Wx(o),f=$x(o),p=Wx(a),h=$x(a),m=Wx(s),g=$x(s),y=Wx(l),v=$x(l),b={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:dw,e:dw,f:gw,H:fw,I:pw,j:hw,L:mw,m:yw,M:vw,p:function(e){return i[+(e.getHours()>=12)]},Q:Uw,s:Yw,S:bw,u:xw,U:ww,V:kw,w:Cw,W:Sw,x:null,X:null,y:Ew,Y:Mw,Z:Tw,"%":$w},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:Dw,e:Dw,f:Pw,H:_w,I:Nw,j:qw,L:Rw,m:Aw,M:Iw,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:Uw,s:Yw,S:Ow,u:Lw,U:zw,V:Fw,w:jw,W:Hw,x:null,X:null,y:Bw,Y:Vw,Z:Ww,"%":$w},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h[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[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[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[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:tw,e:tw,f:sw,H:rw,I:rw,j:nw,L:aw,m:ew,M:iw,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},Q:cw,s:uw,S:ow,u:Yx,U:Xx,V:Kx,w:Ux,W:Gx,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:Jx,Y:Zx,Z:Qx,"%":lw};function k(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=zx[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 C(e,t){return function(n){var r,i,o=Ax(1900);if(S(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Px(Ax(o.y))).getUTCDay(),r=i>4||0===i?Ex.ceil(r):Ex(r),r=kx.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(Ax(o.y))).getDay(),r=i>4||0===i?mx.ceil(r):mx(r),r=fx.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?Px(Ax(o.y)).getUTCDay():t(Ax(o.y)).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,Px(o)):t(o)}}function S(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 zx?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(t,b),x.x=k(n,x),x.X=k(r,x),x.c=k(t,x),{format:function(e){var t=k(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",Rx);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e,Px);return t.toString=function(){return e},t}}}(e)).format,Ix.parse,Ox=Ix.utcFormat,Lx=Ix.utcParse}({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"]});var Xw="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||Ox(Xw),+new Date("2000-01-01T00:00:00.000Z")||Lx(Xw);const Kw=uy.bind(null,!0),Gw={},{isArray:Zw}=Array;function Jw(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Qw(e){return void 0===e}function ek(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function tk(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=Qw(e[r||t])?o:e[t],e=e[r||t]})),e}function nk(e,t){let n=!0;if(Jw(e)&&Jw(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{nk(e[r],t[r])||(n=!1)})),n);if(Zw(e)&&Zw(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!nk(e[n],t[n]))return!1;return!0}return e===t}Gw.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Kw({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;nk(o,a)||ek(t,i)||(Qw(a)?r.push({op:"add",path:s,value:o}):Jw(o)&&Jw(a)?r=r.concat(Gw.generate(a,o,s)):Zw(o)&&Zw(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&Qw(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(nk(t,i))return r;if(!Qw(t[0])&&Qw(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(Gw.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{Qw(t[i])&&!ek(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},Gw.apply=function(e,t){t.forEach((t=>{let n=tk(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(Zw(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Zw(i)&&Zw(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(Jw(i)&&Jw(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!ek(a,e)&&delete a[e]})),Kw(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=tk(e,t.from);Zw(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(Zw(n)?n.splice(+r,1):delete n[r]);var a}))},Gw.clone=function(e){return Kw({},e)},Gw.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Gw.updateObject=function(e,t){Object.keys(e).length?Gw.apply(e,Gw.generate(e,t)):Kw(e,t)};const rk=[[2,4,6],[2,4],[3]],ik=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function ok(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function ak(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)ok(e[r],t,n)}function sk(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 lk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sk(Object(n),!0).forEach((function(t){pk(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ck(){ck=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Object.create(o.prototype),s=new E(i||[]);return r(a,"_invoke",{value:w(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function f(){}function p(){}function h(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(M([])));y&&y!==t&&n.call(y,o)&&(m=y);var v=h.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function M(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=h,r(v,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new x(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(v),l(v,s,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=M,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:M(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function uk(e){return(uk="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})(e)}function dk(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function fk(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){dk(o,r,i,a,s,"next",e)}function s(e){dk(o,r,i,a,s,"throw",e)}a(void 0)}))}}function pk(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hk(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mk(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)||yk(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 gk(e){return function(e){if(Array.isArray(e))return vk(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||yk(e)||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.")}()}function yk(e,t){if(e){if("string"==typeof e)return vk(e,t);var n=Object.prototype.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)?vk(e,t):void 0}}function vk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(){let e,t;for(ak(rk,1,10),e=0;e<ik.length;e++)if(ik[e])for(t=0;t<ik[e].length;t++)Array.isArray(ik[e][t])&&ak(ik[e][t])}();var bk=Object.prototype.hasOwnProperty,xk=Object.prototype.toString,wk=Object.defineProperty,kk=Object.getOwnPropertyDescriptor,Ck=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===xk.call(e)},Sk=function(e){if(!e||"[object Object]"!==xk.call(e))return!1;var t,n=bk.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&bk.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||bk.call(e,t)},Ek=function(e,t){wk&&"__proto__"===t.name?wk(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Mk=function(e,t){if("__proto__"===t){if(!bk.call(e,t))return;if(kk)return kk(e,t).value}return e[t]},Tk=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=Mk(s,n),s!==(i=Mk(t,n))&&(u&&i&&(Sk(i)||(o=Ck(i)))?(o?(o=!1,a=r&&Ck(r)?r:[]):a=r&&Sk(r)?r:{},Ek(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&Ek(s,{name:n,newValue:i}));return s};function Dk(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function _k(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function Nk(e,t,n,r,i){var o,a,s=i.byRow,l=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return l(r,r.raw().qCardinal);if(r){var c=t.pic.extract({field:r.key(),trackBy:r.value}).length;return s(r,c)}return{}}function qk(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Rk(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function Pk(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ak(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ik(){}var Ok=1/.7,Lk="\\s*([+-]?\\d+)\\s*",zk="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fk="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jk=/^#([0-9a-f]{3,8})$/,Hk=new RegExp("^rgb\\("+[Lk,Lk,Lk]+"\\)$"),Bk=new RegExp("^rgb\\("+[Fk,Fk,Fk]+"\\)$"),Vk=new RegExp("^rgba\\("+[Lk,Lk,Lk,zk]+"\\)$"),Wk=new RegExp("^rgba\\("+[Fk,Fk,Fk,zk]+"\\)$"),$k=new RegExp("^hsl\\("+[zk,Fk,Fk]+"\\)$"),Uk=new RegExp("^hsla\\("+[zk,Fk,Fk,zk]+"\\)$"),Yk={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 Xk(){return this.rgb().formatHex()}function Kk(){return this.rgb().formatRgb()}function Gk(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=jk.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Zk(t):3===n?new tC(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Jk(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Jk(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=Hk.exec(e))?new tC(t[1],t[2],t[3],1):(t=Bk.exec(e))?new tC(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Vk.exec(e))?Jk(t[1],t[2],t[3],t[4]):(t=Wk.exec(e))?Jk(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=$k.exec(e))?oC(t[1],t[2]/100,t[3]/100,1):(t=Uk.exec(e))?oC(t[1],t[2]/100,t[3]/100,t[4]):Yk.hasOwnProperty(e)?Zk(Yk[e]):"transparent"===e?new tC(NaN,NaN,NaN,0):null}function Zk(e){return new tC(e>>16&255,e>>8&255,255&e,1)}function Jk(e,t,n,r){return r<=0&&(e=t=n=NaN),new tC(e,t,n,r)}function Qk(e){return e instanceof Ik||(e=Gk(e)),e?new tC((e=e.rgb()).r,e.g,e.b,e.opacity):new tC}function eC(e,t,n,r){return 1===arguments.length?Qk(e):new tC(e,t,n,null==r?1:r)}function tC(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function nC(){return"#"+iC(this.r)+iC(this.g)+iC(this.b)}function rC(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function iC(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function oC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new sC(e,t,n,r)}function aC(e){if(e instanceof sC)return new sC(e.h,e.s,e.l,e.opacity);if(e instanceof Ik||(e=Gk(e)),!e)return new sC;if(e instanceof sC)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 sC(a,s,l,e.opacity)}function sC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function lC(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function cC(e){return function(){return e}}function uC(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):cC(isNaN(e)?t:e)}Pk(Ik,Gk,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Xk,formatHex:Xk,formatHsl:function(){return aC(this).formatHsl()},formatRgb:Kk,toString:Kk}),Pk(tC,eC,Ak(Ik,{brighter:function(e){return e=null==e?Ok:Math.pow(Ok,e),new tC(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new tC(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:nC,formatHex:nC,formatRgb:rC,toString:rC})),Pk(sC,(function(e,t,n,r){return 1===arguments.length?aC(e):new sC(e,t,n,null==r?1:r)}),Ak(Ik,{brighter:function(e){return e=null==e?Ok:Math.pow(Ok,e),new sC(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new sC(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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 tC(lC(e>=240?e-240:e+120,i,r),lC(e,i,r),lC(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var dC=function e(t){var n=function(e){return 1==(e=+e)?uC: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):cC(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=eC(e)).r,(t=eC(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=uC(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),fC=/^class(-pyramid)?/,pC=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,l=t.limits,c={},u="percent"===t.limitType?l.map((function(e){return i+(o-i)*e})):l,d=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(gk(u))),o=Math.max.apply(Math,[o].concat(gk(u))),c.min=i,c.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))c.type="categorical",Object.assign(c,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),o.push(i[l]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var c=0;c<r.length;c++)if(r[c]>n){o.push(i[c]),o.push(i[c]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:d,limits:"percent"===t.limitType?u:l}));else if(t.breakTypes){var f=t.breakTypes;c.type="continuous",c.domain=[i],c.range=[d[0]];for(var p=0;p<u.length;p+=1)if(f[p]){var h=d[p],m=d[p+1],g=dC(h,m)(.5);c.range.push(g),c.domain.push(u[p]),p<u.length-1&&f[p+1]&&(c.range.push(d[p+1]),c.domain.push((u[p]+u[p+1])/2))}else c.range.push(d[p]),c.range.push(d[p+1]),c.domain.push(u[p]),c.domain.push(u[p]+Math.min(1e-6,(o-i)/1e6));c.range.push(d[d.length-1]),c.domain.push(o)}else c.domain=u,c.range=d;return c};function hC(e,t,n,r,i){var o,a,s,l=0,c=[],u=(e-t)/(r+1);if(0===u)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/u):n[o]<t?0:Math.floor(a/u),Number.isNaN(s)||(c[s]?c[s]+=1:c[s]=1);for(o=0;o<c.length;o+=1)c[o]&&(l+=1);return l<=r||l>=i?Math.max(l,r):hC(e,t,n,r+1,i)}var mC=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,l=r.f,c={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},u=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(u=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,gk(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(c.min=n.input.measureMin,c.max=n.input.measureMax,c.max<c.min)return{invalid:!0}}else if(l&&!d)c.min=l.min(),c.max=l.max();else if(l){if(!u.length)return{invalid:!0};c.min=Math.min.apply(Math,gk(u)),c.max=Math.max.apply(Math,gk(u))}if(n.input.measureScheme&&(c.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];c.type=f&&fC.test(f.type)?"categorical":"continuous","categorical"===c.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,gk(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===c.type){for(var p=d?hC(c.max,c.min,u,1,o):o,h=(c.max-c.min)/p,m=[],g=0;g<p+1;g+=1)m.push(c.min+h*g);c.domain=m,c.range=function(e){for(var t=e.resources.theme.palette("quant",p),n=Math.max(1,Math.floor(t.length/p)),r=[],i=0;i<p;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return c};function gC(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function yC(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function vC(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var l=n.indexOf(o);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:i}}function bC(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?gC:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),c=mC(0,{theme:r,hc:i},n,{f:l});if(c.invalid)return c;"expression"===s.type&&(s.activeMeasureIndex<0||void 0===s.activeMeasureIndex)&&(c.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(c.label=n.input.altLabel)),!c.label&&l&&(c.label=l.title());var u=s.activeMeasureIndex>=0?l:null;if(!u&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(u=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(u){var d=u.raw().coloring;d&&d.gradient&&Tk(c,pC(e,d.gradient,c,u))}else c.auxiliary=s;return c}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?qk:i,a=r.getCByField,s=void 0===a?Rk:a,l=r.getPersistence,c=void 0===l?Nk:l,u=o(t,n),d=s(n,u),f=d?d.raw():{},p=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!p.qHasOtherValues)return{invalid:!0};var h={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===u.type||u.activeDimensionIndex<0)&&(h.label=u.label,"color.altLabel"===f.labelExpRef&&(h.label=n.input.altLabel)),!h.label&&d&&(h.label=d.title()),n.input.dimensionScheme&&(h.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===u.type&&(h.auxiliary=u),Tk(h,c(t,n,u,d,{byRow:_k,byElemNo:Dk})),h}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=mC(0,{hc:i,theme:o},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],c=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?c.push(r.primary):c.push(i)}}));var u=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(u={categorical:d.key}),{mode:"measure",type:"categorical",palettes:u,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:c}:void 0}}if("dimension"===s){var f=[],p=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?p.push(r.primary):p.push(i)}})),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:p}:void 0}}var h=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(h=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(h=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:h}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),lk(lk({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return lk(lk({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(yC(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=vC(e.measureOverrides,e.explicit),yC(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=vC(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}function xC(e){var t=lk({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Tk(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=Tk(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=Tk(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=e.auxiliary||{},o=i.key;if("measure"===e.fieldType)return r.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?r.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return pC(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var c=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=c}return l?function(e,t,n,r){var i=r.external,o=r.field,a=lk({},e);Tk(a,Dk(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Tk(a,Dk(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Tk(a,Dk(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var l=i.items[s],c=(l.text||l).label;r[c]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(r[c])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,l,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=lk(lk({},e),r.getDataColorSpecials())),n.settings=Tk(e,bC(this,n,t,e))}return n.settings}};return i}var wC=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},kC=function(e){throw e.isHandled=!0,e},CC=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},SC=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},EC=function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(kC):Promise.reject()};function MC(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function TC(e){return function(t){return"object"===uk(t.datum[e])?t.datum[e].value:void 0}}function DC(e){return"object"===uk(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function _C(e){return-3===e.datum.value}var NC={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},qC={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"};function RC(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:NC.COLOR,fontSize:NC.FONT_SIZE,fontFamily:NC.FONT_FAMILY},label:{color:qC.COLOR,fontSize:qC.FONT_SIZE,fontFamily:qC.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,s=o.label,l=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=l(null==a?void 0:a.color,"legend.title","color",NC.COLOR),i.title.fontSize=l(null==a?void 0:a.fontSize,"legend.title","fontSize",NC.FONT_SIZE),i.title.fontFamily=l(null==a?void 0:a.fontFamily,"legend.title","fontFamily",NC.FONT_FAMILY),i.label.color=l(null==s?void 0:s.color,"legend.label","color",qC.COLOR),i.label.fontSize=l(null==s?void 0:s.fontSize,"legend.label","fontSize",qC.FONT_SIZE),i.label.fontFamily=l(null==s?void 0:s.fontFamily,"legend.label","fontFamily",qC.FONT_FAMILY),i}var PC=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},AC=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function IC(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,s=t.coloring,l=t.theme,c=t.hc,u=RC({theme:l,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:PC(a,i,o)},show:"function"==typeof a.show?function(){return AC(a,c,s)}:AC(a,c,s),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:s.label||"",fill:u.title.color,fontSize:u.title.fontSize,fontFamily:u.title.fontFamily}}}}function OC(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=IC(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,s=e.styleOverrides,l=e.viewState,c=e.rtl,u=e.settings,d=e.style,f=t.scaleKey,p=t.theme,h=t.scales,m=RC({theme:p,key:a,styleOverrides:s}),g=r.layout.dock,y="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},v={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return Tk(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in h?b:f,settings:{layout:{scrollOffset:function(){return l?l.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:c?"rtl":"ltr",horizontal:20},item:{show:i,label:lk({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},y)},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:v[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:u,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,s=e.settings,l=e.style,c=t.scaleKey,u=t.theme,d="".concat(c,"Range"),f=IC(e,t);if(!f.show)return!1;var p=RC({theme:u,key:i,styleOverrides:o}),h=f.layout.dock,m="right"===h||"left"===h,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),Tk(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:c,major:d,length:1,tick:{fill:p.label.color,fontSize:p.label.fontSize,fontFamily:p.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:s,style:l})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===n||!t||!(null!=a&&null!==(i=a.interact)&&void 0!==i&&i.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},pk(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),pk(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),pk(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:i,components:r}}function LC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function zC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function FC(){}var jC=1/.7,HC="\\s*([+-]?\\d+)\\s*",BC="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",VC="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",WC=/^#([0-9a-f]{3,8})$/,$C=new RegExp(`^rgb\\(${HC},${HC},${HC}\\)$`),UC=new RegExp(`^rgb\\(${VC},${VC},${VC}\\)$`),YC=new RegExp(`^rgba\\(${HC},${HC},${HC},${BC}\\)$`),XC=new RegExp(`^rgba\\(${VC},${VC},${VC},${BC}\\)$`),KC=new RegExp(`^hsl\\(${BC},${VC},${VC}\\)$`),GC=new RegExp(`^hsla\\(${BC},${VC},${VC},${BC}\\)$`),ZC={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 JC(){return this.rgb().formatHex()}function QC(){return this.rgb().formatRgb()}function eS(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=WC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?tS(t):3===n?new iS(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?nS(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?nS(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=$C.exec(e))?new iS(t[1],t[2],t[3],1):(t=UC.exec(e))?new iS(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=YC.exec(e))?nS(t[1],t[2],t[3],t[4]):(t=XC.exec(e))?nS(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=KC.exec(e))?uS(t[1],t[2]/100,t[3]/100,1):(t=GC.exec(e))?uS(t[1],t[2]/100,t[3]/100,t[4]):ZC.hasOwnProperty(e)?tS(ZC[e]):"transparent"===e?new iS(NaN,NaN,NaN,0):null}function tS(e){return new iS(e>>16&255,e>>8&255,255&e,1)}function nS(e,t,n,r){return r<=0&&(e=t=n=NaN),new iS(e,t,n,r)}function rS(e){return e instanceof FC||(e=eS(e)),e?new iS((e=e.rgb()).r,e.g,e.b,e.opacity):new iS}function iS(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function oS(){return`#${cS(this.r)}${cS(this.g)}${cS(this.b)}`}function aS(){const e=sS(this.opacity);return`${1===e?"rgb(":"rgba("}${lS(this.r)}, ${lS(this.g)}, ${lS(this.b)}${1===e?")":`, ${e})`}`}function sS(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lS(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cS(e){return((e=lS(e))<16?"0":"")+e.toString(16)}function uS(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fS(e,t,n,r)}function dS(e){if(e instanceof fS)return new fS(e.h,e.s,e.l,e.opacity);if(e instanceof FC||(e=eS(e)),!e)return new fS;if(e instanceof fS)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 fS(a,s,l,e.opacity)}function fS(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function pS(e){return(e=(e||0)%360)<0?e+360:e}function hS(e){return Math.max(0,Math.min(1,e||0))}function mS(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}LC(FC,eS,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:JC,formatHex:JC,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return dS(this).formatHsl()},formatRgb:QC,toString:QC}),LC(iS,(function(e,t,n,r){return 1===arguments.length?rS(e):new iS(e,t,n,null==r?1:r)}),zC(FC,{brighter(e){return e=null==e?jC:Math.pow(jC,e),new iS(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new iS(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new iS(lS(this.r),lS(this.g),lS(this.b),sS(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:oS,formatHex:oS,formatHex8:function(){return`#${cS(this.r)}${cS(this.g)}${cS(this.b)}${cS(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:aS,toString:aS})),LC(fS,(function(e,t,n,r){return 1===arguments.length?dS(e):new fS(e,t,n,null==r?1:r)}),zC(FC,{brighter(e){return e=null==e?jC:Math.pow(jC,e),new fS(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new fS(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 iS(mS(e>=240?e-240:e+120,i,r),mS(e,i,r),mS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new fS(pS(this.h),hS(this.s),hS(this.l),sS(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=sS(this.opacity);return`${1===e?"hsl(":"hsla("}${pS(this.h)}, ${100*hS(this.s)}%, ${100*hS(this.l)}%${1===e?")":`, ${e})`}`}}));const gS=Math.PI/180,yS=180/Math.PI,vS=4/29,bS=6/29,xS=3*bS*bS;function wS(e){if(e instanceof kS)return new kS(e.l,e.a,e.b,e.opacity);if(e instanceof DS)return _S(e);e instanceof iS||(e=rS(e));var t,n,r=MS(e.r),i=MS(e.g),o=MS(e.b),a=CS((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=CS((.4360747*r+.3850649*i+.1430804*o)/.96422),n=CS((.0139322*r+.0971045*i+.7141733*o)/.82521)),new kS(116*a-16,500*(t-a),200*(a-n),e.opacity)}function kS(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function CS(e){return e>.008856451679035631?Math.pow(e,1/3):e/xS+vS}function SS(e){return e>bS?e*e*e:xS*(e-vS)}function ES(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function MS(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function TS(e){if(e instanceof DS)return new DS(e.h,e.c,e.l,e.opacity);if(e instanceof kS||(e=wS(e)),0===e.a&&0===e.b)return new DS(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*yS;return new DS(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function DS(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function _S(e){if(isNaN(e.h))return new kS(e.l,0,0,e.opacity);var t=e.h*gS;return new kS(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}LC(kS,(function(e,t,n,r){return 1===arguments.length?wS(e):new kS(e,t,n,null==r?1:r)}),zC(FC,{brighter(e){return new kS(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new kS(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new iS(ES(3.1338561*(t=.96422*SS(t))-1.6168667*(e=1*SS(e))-.4906146*(n=.82521*SS(n))),ES(-.9787684*t+1.9161415*e+.033454*n),ES(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),LC(DS,(function(e,t,n,r){return 1===arguments.length?TS(e):new DS(e,t,n,null==r?1:r)}),zC(FC,{brighter(e){return new DS(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new DS(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return _S(this).rgb()}}));var NS=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function qS(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=xC(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return CC(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return SC(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,i=t.app;return EC(e,{layout:n,model:r,app:i})}));return n.getSnapshotData=wC,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=lk({},i),r={},!n.key)throw new Error("Missing key");t.set(lk(lk({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=lk(lk({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var c=l.colors[0]?l.colors:[[]].concat(gk(l.colors.slice(1)));c=Array.isArray(c[0])?c.map((function(e){return e.slice().reverse()})):c.slice().reverse(),i.push({key:"quant",colors:c})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},l=i;if(n){var c={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(gk((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(gk((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var u,d=MC({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var f=0,p={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return p[t]=f++,e[0]}}),u={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return p[e.qElemNumber]}}}}}}var h={data:d,range:n.range,domain:n.domain,explicit:c,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=h,u&&(s["".concat(l,"Legend")]=lk(lk({},h),{},{data:u})),t&&t.qHasOtherValues&&u&&((u||h.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};s[l]=Tk({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Tk({},m,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=TC(r),o=TC("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,c=e.others,u=e.primary,d=e.type;return a?function(e){return _C(e)||o(e)?c:l}:n[t]?function(e){return _C(e)?c:DC(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?l:o(e)?c:e.resources.scale(t)(i(e))||c}:"constant"===s?function(e){return _C(e)||o(e)?c:DC(e)?l:u}:"color"===d?function(e){return _C(e)||o(e)?c:DC(e)?l:i(e)||c}:null},s=a(t,r);if(t.measureOverrides){var l=TC("".concat(r,"MeasureIdx")),c=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return c[t]?c[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=a,u=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?NS(e.qNum):e.qText&&eS(e.qText)?e.qText:u})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=l);var d=pk({},c,n);return r.qDimensionInfo.length>1&&(d["".concat(c,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(c,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,c=void 0===l?"object.legend":l,u=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,p=e.style,h=void 0===p?{}:p,m=arguments.length>1?arguments[1]:void 0;return OC({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:c,styleOverrides:u,settings:f,style:h},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return o}var RS=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function PS(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(RS),o=r.some(RS),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function AS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=lk(lk(lk({},e),t),{},{colorProps:lk(lk({},e.colorProps),t.colorProps||{})});return n}var IS=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function OS(e){var t,n=e.qHyperCube.qDimensionInfo.some(IS),r=e.qHyperCube.qMeasureInfo.some(IS),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var LS=function(){};function zS(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}function FS(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}function jS(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function HS(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){return e.apply(r,o)};clearTimeout(t),t=setTimeout(s,n)}}function BS(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function VS(e){return(VS="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})(e)}function WS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function US(e,t,n){return t&&$S(e.prototype,t),n&&$S(e,n),e}function YS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XS(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 KS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XS(Object(n),!0).forEach((function(t){YS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function GS(e,t){return(GS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ZS(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function JS(e,t,n){return(JS=ZS()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&GS(i,n.prototype),i}).apply(null,arguments)}function QS(e){return function(e){if(Array.isArray(e))return tE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||eE(e)||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.")}()}function eE(e,t){if(e){if("string"==typeof e)return tE(e,t);var n=Object.prototype.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)?tE(e,t):void 0}}function tE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var nE=Object.prototype.hasOwnProperty,rE=Object.prototype.toString,iE=Object.defineProperty,oE=Object.getOwnPropertyDescriptor,aE=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===rE.call(e)},sE=function(e){if(!e||"[object Object]"!==rE.call(e))return!1;var t,n=nE.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&nE.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||nE.call(e,t)},lE=function(e,t){iE&&"__proto__"===t.name?iE(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},cE=function(e,t){if("__proto__"===t){if(!nE.call(e,t))return;if(oE)return oE(e,t).value}return e[t]},uE=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=cE(s,n),s!==(i=cE(t,n))&&(u&&i&&(sE(i)||(o=aE(i)))?(o?(o=!1,a=r&&aE(r)?r:[]):a=r&&sE(r)?r:{},lE(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&lE(s,{name:n,newValue:i}));return s};function dE(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=l;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function fE(e,t,n){var r=n.key,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 pE(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,c=e.target,u=e.targetProp,d=r;if(i.field&&i.field!==n){var f=dE(i.field,o,{cache:t});if(-1===f)return;d=uE({qRow:a},f(s))}c[u]=fE(i,d,{key:l})}function hE(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),l=t.key(),c="object"===VS(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=!!i[a].trackBy,m=VS(i[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=dE(c,s.qDataPages[b],{cache:n});if(-1!==x)for(var w=0;w<s.qDataPages[b].qMatrix.length;w++){var k=s.qDataPages[b].qArea.qTop+w,C=uE({qRow:k},x(s.qDataPages[b].qMatrix[w])),S=fE(f,C,{key:l});if(!f.filter||f.filter(C)){for(var E=0;E<p.length;E++){var M=d[p[E]],T=M.fields||[M];M.fields&&(S[p[E]]=[]);for(var D=0;D<T.length;D++)pE({cache:n,f:c,mainCell:C,p:T[D],prop:p[E],props:d,page:s.qDataPages[b],rowIdx:k,row:s.qDataPages[b].qMatrix[w],sourceKey:l,target:M.fields?S[p[E]]:S,targetProp:M.fields?D:p[E]});if(M.fields){var _=S[p[E]].map((function(e){return e.value})),N=S[p[E]].map((function(e){return e.label}));S[p[E]]={value:"function"==typeof M.value?M.value(_):void 0!==M.value?M.value:_,label:"function"==typeof M.label?M.label(N):void 0!==M.label?String(M.label):String(S[p[E]].value)}}}h&&r.track({cfg:i[a],itemData:C,obj:S,target:y,tracker:g,trackType:m}),v.push(S)}}}h?o.push.apply(o,QS(r.collect(y,{main:f,propsArr:p,props:d}))):o.push.apply(o,v)}return o}function mE(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 gE(e,t){var n,r,i,o,a,s=new xE(e),l=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=yE);n=c.pop();)if(l&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)c.push(r=n.children[o]=new xE(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(bE)}function yE(e){return e.children}function vE(e){e.data=e.data.data}function bE(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function xE(e){this.data=e,this.depth=this.height=0,this.parent=null}function wE(e){if("function"!=typeof e)throw new Error;return e}xE.prototype=gE.prototype={constructor:xE,count:function(){return this.eachAfter(mE)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},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;for(e=n.pop(),t=r.pop();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(){var e=[];return this.each((function(t){e.push(t)})),e},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 gE(this).eachBefore(vE)}};var kE={depth:-1},CE={};function SE(e){return e.id}function EE(e){return e.parentId}function ME(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var s=0;s<i.length;s++){var l=ME(n,i[s]);Array.isArray(l)?a.push.apply(a,QS(l)):a.push(l)}return a}if(!r[o]&&Array.isArray(i)){var c=new Array(i.length);n=r.slice(o+1).join("/");for(var u=0;u<i.length;u++)c[u]=ME(n,i[u]);return c}r[o]in i&&(i=i[r[o]])}return i}function TE(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,QS(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,QS(TE(e[o].children,t-1,n)));return r}function DE(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),i=QS(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(i,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return TE(e.children,o-1,n)}}return!1}function _E(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var NE=/^qDimensionInfo(?:\/(\d+))?/,qE=/^\/?qMeasureInfo\/(\d+)/,RE=/\/qAttrExprInfo\/(\d+)/,PE=/\/qAttrDimInfo\/(\d+)/;function AE(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function IE(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=r,d=n.qEffectiveInterColumnSortOrder,f=AE(n);return NE.test(u)&&(i=!0,o=+NE.exec(u)[1],u=r.replace(NE,"")),qE.test(u)&&("K"===n.qMode?l=+qE.exec(u)[1]:d&&-1!==d.indexOf(-1)?(l=+qE.exec(u)[1],c=0):c=+qE.exec(u)[1],u=u.replace(qE,"")),u&&(PE.exec(u)?s=+PE.exec(u)[1]:RE.exec(u)&&(a=+RE.exec(u)[1])),{fieldDepth:(i?"S"===n.qMode?f[o]:d?d.indexOf(o):o:d&&-1!==d.indexOf(-1)?d.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:c,attrDimIdx:s,attrIdx:a}}function OE(e,t){var n,r,i=DE(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(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 LE(e,t,n){var r=n.key,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 zE(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],c=l.fields||[l],u=void 0,d=void 0;l.fields&&(u=[],d=[]);for(var f=function(e){var n=c[e],f=void 0,p=void 0,h=void 0,m=void 0,g=void 0,y=void 0;if("primitive"===n.type?(h=n.value,y=String(n.value)):("function"==typeof n.value&&(f=function(e){return n.value(e,r)}),"function"==typeof n.label&&(p=function(e){return n.label(e,r)}),n.accessor?(m=n.accessor(r),Array.isArray(m)?(g=m.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),f&&(h=g.map(f),f=null),p&&(y=g.map(p),p=null),h=n.reduce?n.reduce(h):h,y=n.reduceLabel?n.reduceLabel(y,h):String(h)):y=h=n.attrAccessor?n.attrAccessor(n.valueAccessor(m)):n.valueAccessor(m)):(h=i,y=i)),l.fields){var v=f?f(h):h;u.push(v),d.push(p&&null!=y?p(y):null!=y?y:String(v))}else{var b=f?f(h):h;o[t[s]]={value:b,label:p?p(y):null!=y?y:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},p=0;p<c.length;p++)f(p);u&&(o[t[s]]={value:"function"==typeof l.value?l.value(u,r):u,label:"function"==typeof l.label?l.label(d,r):d})}}var FE=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=ME(r,e);return o&&o[0]?(t.tree=gE(o[0],n.children||function(e){return e[i]}),t.tree):null};function jE(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],c="__root",u=!1,d=0;d<i.length;d++){var f=l[i[d]],p="".concat(c,"__").concat(f.qText);a[p]||(a[p]=KS({__id:p,__parent:c,qValues:[]},f),u=!0),c=p}if(u)for(var h=0;h<o.length;h++){var m=l[o[h]];a[c].qValues.push(m)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=SE,t=EE;function n(n){var r,i,o,a,s,l,c,u=n.length,d=new Array(u),f={};for(i=0;i<u;++i)r=n[i],s=d[i]=new xE(r),null!=(l=e(r,i,n))&&(l+="")&&(f[c="$"+(s.id=l)]=c in f?CE:s);for(i=0;i<u;++i)if(s=d[i],null!=(l=t(n[i],i,n))&&(l+="")){if(!(a=f["$"+l]))throw new Error("missing: "+l);if(a===CE)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=kE,o.eachBefore((function(e){e.depth=e.parent.depth+1,--u})).eachBefore(bE),o.parent=null,u>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=wE(t),n):e},n.parentId=function(e){return arguments.length?(t=wE(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var HE=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],c=l.fields?l.fields:[l],u=0;u<c.length;u++){var d=c[u];if(d.field!==a){var f=OE(o,IE(d.field,{cube:r,cache:i}));d.accessor=f.nodeFn,d.valueAccessor=f.valueFn,d.attrAccessor=f.attrFn}}};function BE(){var 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,i=t.raw(),o=t.key(),a="S"===i.qMode?jE(t):FE(i,n,e);if(!a)return null;for(var s=a.height,l=[],c=0;c<=s;c++){var u=null;if(c>0)if("S"===i.qMode){var d=AE(i),f=d[c-1];u=n.fields[f]}else{var p=i.qEffectiveInterColumnSortOrder[c-1];c>i.qEffectiveInterColumnSortOrder.length&&(p=i.qDimensionInfo.length),u=n.fields[p]}var h=r.normalizeConfig(KS(KS({},e),{},{field:u?u.key():void 0}),t),m=h.props,g=h.main,y=Object.keys(m);l[c]={propsArr:y,props:m,main:g};var v=u?IE(u,{cube:i,cache:n}):{fieldDepth:0};HE({propsArr:y,props:m,cube:i,cache:n,itemDepthObject:v,f:u})}for(var b=a.copy(),x=b.descendants(),w=a.descendants(),k=0;k<w.length;k++){var C=l[w[k].depth].propsArr,S=l[w[k].depth].props,E=l[w[k].depth].main,M=x[k],T=M.data,D=LE(E,T,{key:o});zE({propsArr:C,props:S,item:M,itemData:T,ret:D,sourceKey:o,isTree:!0}),w[k].data=D}return a}function VE(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),l=t.key();if(!FE(s,n,e))continue;var c="object"===VS(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=IE(c,{cube:s,cache:n}),m=OE({fieldDepth:0},h),g=m.nodeFn,y=m.attrFn,v=m.valueFn;HE({propsArr:p,props:d,cube:s,cache:n,itemDepthObject:h,f:c});for(var b=!!i[a].trackBy,x=VS(i[a].trackBy),w={},k=[],C=g(n.tree),S=[],E=0;E<C.length;E++){var M=C[E],T=y?y(v(M)):v(M);if(!f.filter||f.filter(T)){var D=LE(f,T,{key:l});zE({propsArr:p,props:d,item:M,itemData:T,ret:D,sourceKey:l}),b&&r.track({cfg:i[a],itemData:T,obj:D,target:k,tracker:w,trackType:x}),S.push(D)}}b?o.push.apply(o,QS(r.collect(k,{main:f,propsArr:p,props:d}))):o.push.apply(o,S)}return o}var WE,$E=(function(e){
|
|
15
15
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
16
|
-
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,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).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,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<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}}(WE={exports:{}}),WE.exports);function UE(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var YE={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"},XE=/%$/,KE=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,GE=/^\(oct\)/i,ZE=/^\(dec\)/i,JE=/^\(hex\)/i,QE=/^\(bin\)/i,eM=/^\(rom\)/i,tM=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,nM=/#|0/g;function rM(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 iM(e,t,n){var r=UE(e);return n?r:new RegExp(r||"",t)}function oM(e,t,n){var r,i,o,a,s,l,c,u,d,f,p,h=e.pattern;h.indexOf("A")>=0&&(h=h.replace("A",""),e.abbreviate=!0),f=t,(p=n)&&(p=UE(p)),f&&(f=UE(f)),d=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(p,"[#0]+)?")),a=(o=(o=h.match(d))?o[0]:"")?h.substr(0,h.indexOf(o)):h,s=o?h.substring(h.indexOf(o)+o.length):"",o||(o=h?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(o=o.replace(iM(l,"g"),t)),c=n,n=".",c&&(o=o.replace(iM(c,"g"),n)),u=(u=o.match(/#/g))?u.length:0;var m,g=h.split(c);g[1]&&(m=g[1].match(nM)),e.prefix=a||"",e.postfix=s||"",e.pattern=h,e.maxPrecision=m?m.length:2,e.percentage=XE.test(h),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(iM(t,null,!0),"|").concat(iM(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=c,e.t=t,e.d=n,e.temp=u}var aM=function(){function e(t,n,r,i,o){WS(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return YE;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return US(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(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],tM.test(e[0])&&(r.positive.isFunctional=!0),e[1]?tM.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?tM.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||oM(r.positive,t,n),r.negative&&!r.negative.isFunctional&&oM(r.negative,t,n),r.zero&&!r.zero.isFunctional&&oM(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var 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).pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=function(e,t,n){var r;return KE.test(t)?e=rM(e,Number(/\d{2}/.exec(t)[0]),t,n):GE.test(t)?e=rM(e,8,t,n):ZE.test(t)?e=rM(e,10,t,n):JE.test(t)?e=rM(e,16,t,n):QE.test(t)?e=rM(e,2,t,n):eM.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){for(var 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();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}(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){var h,m,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(h=g[s-1]),h&&n>0&&h>0?m=h:(n<0&&h<0||!h)&&(y<0&&y-n<=u.maxPrecision?m=y:h<=n&&!(y>0&&-n<=u.maxPrecision)&&(m=h)),m&&(d=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=u.temp,c=(l=u.numericPattern).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{var v=Number(e.toFixed(Math.min(20,c?c.length:0)).split(".")[0]),b=l.split(o)[0];if(e=$E(b+=o,v)||"0",c){var x=Math.max(0,Math.min(14,c.length)),w=c.replace(/#+$/,"").length,k=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=k.length;s<w;s++)k+="0";k&&(e+=o+k)}else 0===v&&(i=0)}else if(r>=Math.pow(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=$E(l,e)}e=e.replace(u.numericRegex,(function(e){return e===a?u.groupTemp:e===o?u.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function sM(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,c=void 0===l?function(e){return e}:l,u=Object.create(null),d=Object.create(null),f=0,p=0;return(t=s?function(){return n=c.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=c(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return f>=o&&(delete u[d[p]],delete d[p],f--,p++),u[e]=t,d[f]=e,f++,t},t.get=function(e){return u[e]},t.has=function(e){return e in u},t.clear=function(){u=Object.create(null),d=Object.create(null),f=0,p=0},t.size=function(){return f},t}function lM(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JS(aM,t)}(i,e,t,n,r),a=sM(o.formatValue.bind(o),{toKey:function(e){return 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}var cM=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],uM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],dM=["January","February","March","April","May","June","July","August","September","October","November","December"],fM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pM(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function hM(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var mM=function(){function e(t,n,r){WS(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:cM,qDayNames:uM,qLongMonthNames:dM,qMonthNames:fM}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(YS(i={},"T",o.qTimeFmt||"hh:mm:ss"),YS(i,"D",o.qDateFmt||"YYYY-MM-DD"),YS(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return US(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*hM(t),r=60*hM(n),i=60*hM(r),o=1e3*hM(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)<0&&(c=6);var 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}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:pM("".concat(t.year).slice(-2),2),YYY:pM("".concat(t.year).slice(-3),3),def:function(e){return pM("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:pM("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:pM("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return pM("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return pM("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return pM("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return pM("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),c=[];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&c.push(u);var d=new RegExp(c.join("|"),"g");return t.replace(d,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in l[n])if(i===e||i.toLowerCase()===e){void 0===(r=l[n][i])&&(r=l[n][i.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function gM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JS(mM,t)}function yM(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function vM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=gM(n,e,t),i=sM(r.format.bind(r),{toKey:function(e){return"object"===VS(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?yM(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=gM(n,e,t),i=sM(r.format.bind(r),{toKey:function(e){return"object"===VS(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function bM(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return vM(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var 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,"##A"),o="U"),lM(n,r,i,o,t)}function xM(){var 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,u=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),d=function(e){return e.qText||""},f="dimension"===l?"first":"avg",p=bM(n,o),h="dimension"===l?"first":function(e,t){return p(t)},m={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return c},items:function(){return e||(e=a(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:u,label:d,reduce:f,reduceLabel:h,formatter:function(){return p},tags:function(){return n.qTags}};return m}function wM(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:xM(uE({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=wM("qAttrDimInfo",t,n,a,uE({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=wM("qAttrExprInfo",t,n,a,uE({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=wM("qMeasureInfo",t,n,a,uE({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function kM(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=o;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var u=kM.util,d={cache:l,cube:c,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},f={key:function(){return i},raw:function(){return c},field:function(e){return _E(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,f,l,u)},hierarchy:function(e){return d.hierarchy(e,f,l,u)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(d.extractor=VE,d.hierarchy=BE,d.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(d.extractor=hE,d.pages=c.qDataPages,d.hierarchy=BE):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},f,l,u)};var p="S"===c.qMode?function(e){return e.qElemNumber}:void 0,h="S"===c.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,QS(wM("qDimensionInfo",c,i,"",uE({},d,{value:p,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,QS(wM("qMeasureInfo",c,i,"",uE({},d,{value:h,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var m=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return m(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=f.field(e.from),n=xM(KS({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return d.extractor({field:e},f,l,u)},key:e.key,type:t.type(),localeInfo:d.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,QS(l.virtualFields)),f}var CM=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],SM=/\/qDimensionInfo(?:\/(\d+))?/,EM=/\/qMeasureInfo\/(\d+)/,MM=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,TM=/\/qAttrExprInfo\/(\d+)/,DM=/\/?qHyperCube/,_M=/\/?qTreeData/,NM=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},qM=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function RM(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};DM.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=NM):_M.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=qM);var s=!0;if(SM.test(e)&&(r=+SM.exec(e)[1]),EM.test(e)&&(i=+EM.exec(e)[1]),MM.test(e)){i=-1,r=0;var l=+MM.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(TM.test(e)){var c=i;if(t){i=0;var u=ME(o,t);i+=(u.qMeasureInfo||[]).length,r>-1?(i=u.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=u.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=u.qMeasureInfo.slice(0,c).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+TM.exec(n)[1]}else r>-1?(r=-1,i=+TM.exec(n)[1]):i+=+TM.exec(n)[1]+1}return CM.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||eE(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.")}()}(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}}function PM(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},l=e.isActive(),c=!1;return e.brushes().forEach((function(e){var t=RM(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(c=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.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){var l=e.brush.ranges();l.length&&(c=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var u=e.brush.ranges();u.length&&(c=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),u.forEach((function(e){return s.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(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var d=r.qHyperCube,f=d.qNoOfLeftDims,p=d.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===f||p>=f)&&f>-1?h.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:p-f})})):h.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),c=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),c=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));c=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!c&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function AM(e){kM.util=e.data("matrix").util,e.data("q",kM),e.formatter("q-number",lM),e.formatter("q-time",vM)}function IM(e){var t=zS(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function OM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===uk(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function LM(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}AM.qBrushHelper=PM,AM.selections=PM;var zM="Shift";function FM(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=IM({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,gk(o))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var jM=function e(t,n){return n[t]?e(t+1,n):t},HM=function(e,t){var n=t.reduce((function(e,t){return e[t]=!0,e}),{});return e.reduce((function(e,t,r){var i=jM(r,n);return n[i]=!0,e[r]=i,e}),{})};function BM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,s=i.qMeasureInfo,l=void 0===s?[]:s;return{dimensions:HM(a,r.dimensions||[]),measures:HM(l,r.measures||[])}}function VM(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach((function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)})),t}var WM=[],$M=0,UM=function(e){var t=WM.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},YM=function(){document.addEventListener("keyup",UM)},XM=function(){document.removeEventListener("keyup",UM)},KM=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},GM=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function ZM(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function JM(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,c=void 0===l?"rangeClear":l,u=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(u||!d)return!1;var f=t.component(o);return!!f&&(f.emit(c),"string"==typeof s&&t.brush(s).clear(),f)}function QM(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return JM({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function eT(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return JM({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}function tT(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,c=void 0!==l&&l,u=e.brushName,d=JM({selectionInfo:t,chart:n,document:r,eventName:c?void 0:s,componentName:o,brushName:void 0!==u&&u});if(d){var f=d.settings.settings,p=f.scale,h=f.brush,m=n.scale(p).data().fields.map((function(e){return e.id()})),g=n.brush(h),y=g.brushes().filter((function(e){return"range"===e.type&&m.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function nT(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;JM({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function rT(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function iT(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,c=e.cleared,u=void 0!==c&&c,d=e.brushName;JM({selectionInfo:t,chart:n,document:r,eventName:u?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}var oT=["chart","document","selections","selectionInfo"],aT=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=hk(e,oT);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function sT(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function lT(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var c=(a||{}).lasso,u=void 0!==c&&c,d=i.reset,f=void 0===d?sT:d,p=i.clear,h=!1!==p&&function(e){var t=e.clear,n=void 0===t?aT:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(lk({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return QM(lk(lk({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return eT(lk(lk({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tT(lk(lk({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return nT(lk(lk({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rT(lk(lk({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return iT(lk(lk({},t),e))}},t))}}({clear:p,selections:s,selectionInfo:r,chart:n}),m=function(e){var t=e.chart,n=e.lasso,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:h,reset:f,lasso:u}),g={};Object.entries(m).forEach((function(e){var t=mk(e,2),n=t[0],r=t[1];g[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},c=function(e){return Object.assign(r,e||{})},u=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(lk(lk({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:c})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(lk(lk({defaultFunc:u({event:e,components:t}),setSelectionInfo:c,clear:i},l),{},{event:e,components:t}))}:function(e){u({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:h,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=mk(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=mk(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var cT=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function uT(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,c=void 0===l?void 0:l,u=o.selectionActions,d=(u=void 0===u?{}:u).clear,f=u.reset,p=o.selectionEvents,h=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,m=o.brushEvents,g=void 0===m?{}:m,y=o.brushName,v=void 0===y?"selection":y,b=o.brushMaxListeners,x=void 0===b?20:b,w=o.brushRanges,k=void 0!==w&&w,C=o.interceptors,S=void 0===C?{}:C,E=o.selectionsFn,M=void 0===E?i.selections:E,T=t.brush(v);if("number"==typeof x&&T.setMaxListeners(x),k){var D=!0===k?cT:k;T.configure({ranges:D})}var _={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},N=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var c=++$M,u=null,d={dimensions:[],measures:[]},f=[],p={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var h=FM({brush:r,getConfig:function(){return{layout:u,allowSimultaneous:f}}}),m=h.rangeInterceptor,g=h.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",(function(){return n.begin(l)}));var y={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};KM(n,y);var v=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(p=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){var e=a(r,p,u),t=BM({layout:u,filtered:d});e.forEach((function(e){var r=VM({selection:e,fieldMap:t});ZM(r,o.select.brushSelectionIncludeMax,v),n.select(r)}))}))):r.on("update",(function(){var e=a(r,p,u),t=BM({layout:u,filtered:d});e.forEach((function(e){n.select(VM({selection:e,fieldMap:t}))}))})),0===WM.length&&YM(),WM.push({key:c,selections:n}),{layout:function(e){u=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){u=null;var e=WM.indexOf(WM.filter((function(e){return e.key===c}))[0]);-1!==e&&WM.splice(e,1),WM.length||XM(),GM(n,y)}}}({brush:T,majorScale:c,actions:n,selections:r,picassoQ:i,selectionsFn:M});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=mk(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:T,interceptors:S});var q=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=mk(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]}));return function(){a.forEach((function(e){var n=mk(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),c=lT({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),u=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==zM||(t.lasso.action(!0),n=!0)},i=function(e){e.key===zM&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),c(),u()}}({chart:t,brush:T,actions:n,selections:r,selectionInfo:_.selectionInfo,selectionActions:{clear:d,reset:f},selectionEvents:h,brushEvents:g});if(s){var R=!0===s?gk(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;N.allowSimultaneous(R)}return{unbindEvents:q,state:_,picassoSelections:N,brush:T}}var dT=["colorField","useLegendCube"];function fT(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=uT({chart:t,actions:i,selections:n,picassoQ:AM,config:a}),l=s.unbindEvents,c=s.state,u=s.picassoSelections,d=s.brush,f=a.custom,p=void 0===f?{}:f,h=a.legendAlias,m=void 0===h?void 0:h,g=a.setBrushAliases,y=void 0===g?LM:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return c.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:OM(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.singleSelectIndex;return c.singleSelectDimensions[e]},getCanSelect:function(){return c.canSelect},getSelectionInfo:function(){return c.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,c=void 0===l?[]:l;return s.lockedDimensions=c.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=c.map((function(e,t){return IM({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===c.length||c.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=c[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:u,layout:e});Object.assign(c,t)},setFilteredFields:function(e){u.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=hk(e,dT),o=lk({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);y(lk(lk({},o),{},{defaultFunc:function(){return LM(o)}}))},destroy:function(){l(),u.release()},custom:lk({},p)}}var pT="'Source Sans Pro', 'Arial', 'sans-serif'",hT="#333333",mT="#595959",gT="#737373",yT="#cccccc",vT="#e6e6e6";function bT(e){var t={};return[].concat(gk(e),gk([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",mT],["object","axis.label.name","fontFamily",pT],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",yT],["object","axis.line.minor","color",vT],["object","axis.title","color"],["object","axis.title","fontFamily",pT],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",vT],["object","grid.line.major","color",yT],["object","grid.line.minor","color",vT],["object","label.value","color",mT],["object","label.value","fontFamily",pT],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",mT],[!1,"label.value","lightColor",vT],["object","outOfRange","color","#999"],["object","legend.title","color",hT],["object","legend.title","fontFamily",pT],["object","legend.title","fontSize","15px"],["object","legend.label","color",mT],["object","legend.label","fontFamily",pT],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",hT],["object","referenceLine.label.name","fontFamily",pT],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",vT],["object","referenceLine.outOfBounds","fontFamily",pT],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",gT,function(e){return"transparent"===e?gT:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var xT=function(e){return e};function wT(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},s=r.reduce((function(e,t){var n=mk(t,2),r=n[0],i=n[1];return e[r]=i,e}),{});return o.forEach((function(e){var r=mk(e,5),i=r[0],o=r[1],l=r[2],c=r[3],u=r[4],d=void 0===u?function(e){return e}:u,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var s=t.getStyle(n,r,i);return void 0===s?a:s}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:l,defaultValue:c}),p=(s["".concat(o,".").concat(l)]||xT)(d(f));FS(a,[o,l].filter(Boolean).join("."),p)})),i.forEach((function(e){var t=mk(e,2),n=t[0],r=t[1];FS(a,n,r)})),a}var kT={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},CT="chart-modules-tooltip",ST="#".concat(CT);function ET(){if(!document.querySelector(ST)){var e=document.createElement("div");e.id=CT,e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function MT(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){ET()},beforeUpdate:function(){ET()},destroyed:function(){var e;null!=(e=document.querySelector(ST))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(ST)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var TT="position",DT={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},_T=function(e){return e.data.value},NT=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};var qT=Number.MAX_VALUE;function RT(e){var t=e.nodes.reduce((function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e}),{xMin:qT,xMax:-qT,yMin:qT,yMax:-qT}),n=t.xMin,r=t.xMax,i=t.yMin;return{x:n,y:i,width:r-n,height:t.yMax-i}}function PT(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.nodes;if(!o.length)return[];var a=mk(o,1)[0].key,s=n.main.collectibles;if(!s.length)return[];var l=n.main.triggers.find((function(e){return-1!==e.keys.indexOf(a)}))||{},c=l.collect,u=l.placement;if(!c||!c.from||!u)return[];var d={triggerer:a,position:i.get(TT)},f=(function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.collectConfig,o=e.collectibles,a=e.meta,s=i.from,l={chart:t,expando:n,nodes:r,collectConfig:i,collectibles:o,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=mk(e.nodes,1)[0];return["container"===t.type&&t.children[0]||t]}(l);case"position":return function(e){var t=e.collectibles,n=e.meta;return e.chart.shapesAt(n.position.absolute,{components:t.map((function(e){return{key:e.key}}))})}(l);case"dimension":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=mk(e.nodes,1)[0],o=n.filter,a="function"==typeof o?o:function(){return!0},s=n.by,l=void 0===s?_T:s;return r.reduce((function(e,n){var r=n.major,o=void 0===r?NT:r,a=DT[n.type]||n.type;return e.push.apply(e,gk(t.findShapes(a).filter((function(e){return e.key===n.key&&e.data&&o({data:e.data})===l({data:i.data})})))),e}),[]).filter(a)}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=e.meta,o=mk(e.nodes,1)[0].localBounds,a=n.distance,s=n.filter,l="function"==typeof s?s:function(){return!0},c=r.map((function(e){return e.key}));return t.shapesAt({cx:i.position.absolute.x,cy:i.position.absolute.y,r:a||Math.max(o.width,o.height)},{components:c.map((function(e){return{key:e}}))}).filter(l)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:i})}(l);default:return[]}}({chart:t,expando:r,nodes:o,collectConfig:c,collectibles:s,meta:d})||[]).map((function(e){return e.children.length?e.children[0]:e}));return f.length?function(e){var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=mk(o,1)[0],c=Array.isArray(i)?i:[i],u={bounds:l.bounds,key:l.key},d=RT({nodes:a}),f=0;f<c.length;f++){var p=c[f];if("function"==typeof p){var h=p({chart:t,expando:r,hovered:o,collected:gk(a),meta:s,collectedBounds:d,combineBounds:RT});if(h)return h}if("trigger"===p)return u;if("collectible"===p){var m=n.main.placements.collectible;return{bounds:"function"==typeof m?m({collected:gk(a)}):d,key:a[0].key}}}return u}({chart:t,config:n,expando:r,placementConfig:i,hovered:o,collected:a,meta:s}),c=l.bounds,u=l.key,d=mk(a,1)[0].desc;return[{bounds:c,nodes:a,data:a.map((function(e){return e.data})),key:u,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:u,hovered:o,collected:f,meta:d}):[]}var AT=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),IT=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),OT=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),LT=function(e){return AT.test(e)},zT=function(e){return IT.test(e)||OT.test(e)};function FT(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(LT(r))return"ltr";if(zT(r))return"rtl"}return"ltr"}function jT(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],visibility:lk(lk({},{count:!1}),t)}}function HT(e){var t=e.config,n=e.h,r=e.context;return{section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,i=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,i=(r=void 0===r?{}:r).bold,o=void 0!==i&&i,a=r.italic,s=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":o?"bold":"normal","font-style":void 0!==a&&a?"italic":"normal","text-align":t.rtl?"right":"left",direction:FT(n)},colspan:2}],visibility:lk(lk({},{count:!0}),s)}}({config:t,value:n,style:r,visibility:i})},measure:function(e){var r=e.label,i=e.value,o=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,i,o=e.h,a=e.label,s=e.value,l=e.color,c=e.style,u=e.survive,d=e.visibility,f=e.config.rtl,p=o("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:f?[":",a]:[a,":"],style:{"text-align":f?"right":"left","font-weight":null!=c&&null!==(t=c.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=c&&null!==(n=c.label)&&void 0!==n&&n.italic?"italic":"normal",direction:FT(a)}},{content:l?f?[s,p]:[p,s]:s,style:{"text-align":f?"left":"right","vertical-align":"middle","font-weight":null!=c&&null!==(r=c.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=c&&null!==(i=c.value)&&void 0!==i&&i.italic?"italic":"normal",direction:FT(s)}}],survive:lk(lk({},{color:!1,duplicate:!1}),u),visibility:lk(lk({},{count:!0}),d)}}({config:t,h:n,label:r,value:i,color:o,style:a,survive:s,visibility:l})},divider:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visibility;return jT({visibility:t})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:lk(lk({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:lk(lk({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var i=e.nodes,o=e.property,a=e.filter,s=void 0===a||a,l=e.visibility,c=e.fillColor;return function(e){var t=e.config,n=e.h,r=e.context,i=e.nodes,o=e.property,a=e.filter,s=e.visibility,l=e.fillColor,c=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:lk(lk({},{count:!0}),s)},d=t.getColorSettings();if("color"===d.type||!d.fieldType)return u;var f=mk(i,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,i=e.node,o=i.data[r];if(o){if(-3===i.data.value)return i.data.label;var a=n.resources.dataset(o.source.key).field(o.source.field).formatter(),s=o.value,l=o.label,c=t.getColorSettings();if(a&&"measure"===c.fieldType)return Number.isNaN(+s)?"-":a(o.value);var u=l||s;return void 0===u||Number.isNaN(u)||"NaN"===u?"-":u}}({config:t,context:r,property:o,node:f}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,i=e.config.getColorSettings();if(i.label)return i.label;var o=r.data[n];if(o&&"color"!==i.type){var a=t.resources.dataset,s=o.source,l=s.key,c=s.field;return a(l).field(c).title()}}({config:t,context:r,property:o,node:f});var p=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":null!=l?l:function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:f}),margin:"0 8px"}});return u.content.push({content:c?[":",u.label]:[u.label,":"],style:{"text-align":c?"right":"left",direction:FT(u.label)}},{content:c?[u.value,p]:[p,u.value],style:{"text-align":c?"left":"right","vertical-align":"middle",direction:FT(u.value)}}),u}({config:t,h:n,context:r,nodes:i,property:o,filter:s,visibility:l,fillColor:c})}}}function BT(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.h,a=e.data,s=e.style,l=mk(a,1)[0],c=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.h,o=e.context,a=e.groups,s=o.node.meta,l=o.resources,c=l.dataset,u=l.formatter,d=HT({config:n,h:i,context:o}),f=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:c}),p=a.map((function(e){var t=d.section({content:gk((n.main.section({expando:r,h:i,nodes:e,dataset:c,formatter:u,meta:s,create:d,util:f})||[]).filter((function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length}))).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find((function(e){return"color"===e.type&&e.filter})),i=r?n.filter((function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value})):n;return t.main.showDuplicateMeasures?i:i.reduce((function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var i="".concat(t.label,"-").concat(t.value);return e.memory[i]||(e.memory[i]=!0,e.filtered.push(t)),e}),{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t}));return n.main.sections({chart:t,expando:r,h:i,nodes:o.node.nodes,dataset:c,formatter:u,meta:s,create:d,util:f,sections:p}),p.filter(Boolean)}({chart:t,config:r,expando:i,h:o,context:l,groups:function(e){var t=e.config,n=e.nodes.reduce((function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]={sorting:Object.keys(e).length,items:[]}),e[r].items.push(n),e}),{});return Object.keys(n).map((function(e){return n[e]})).sort((function(e,t){return e.sorting-t.sorting})).map((function(e){return e.items}))}({config:r,nodes:l.node.nodes})}),u=function(e){var t=e.translator,n=e.config,r=e.context,i=e.templates,o=n.main.layout,a=o.rows,s=o.grouping,l=o.single,c=function(e){var t=e.limit,n=e.grouping,r=e.single,i={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var o=e.visibility,a=e.index;if(r&&0!==a)return n?(i.index.started!==a&&i.index.group!==a&&(i.overflow++,i.index.group=a),!1):(i.overflow++,!1);if(i.count>=t){if(!n)return i.overflow++,!1;if(i.index.started!==a)return i.index.group!==a&&(i.overflow++,i.index.group=a),!1}return o.count&&i.count++,n&&(i.index.started=a),!0},overflow:function(){return i.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:i}):l}),u=i.reduce((function(e,t,n){var r=t.type,o=t.content;"section"===r&&(void 0===o?[]:o).forEach((function(t){c.process({visibility:t.visibility,index:n})&&e.push(t.content)}));var a=n===i.length-1;return"divider"!==r||a||c.process({visibility:t.visibility,index:n})&&e.push(t.content),e}),[]).filter((function(e){return e.length})),d=c.overflow();return d&&u.push(function(e){var t=e.translator,n=e.config,r=e.count,i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=FT(i);return[{content:i,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:o},colspan:2}]}({translator:t,config:n,count:d})),u}({translator:n,config:r,h:o,context:l,templates:c});return u.length?function(e){var t=e.h,n=e.style;return e.rows.map((function(e){return t("tr",{},e.map((function(e){var r={style:lk(lk({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})))}))}({h:o,style:s,rows:u}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:o})}function VT(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.internal;if(!r.main.key)return!1;var a=jS(),s=MT({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,c=l.afterShow,u=l.afterHide,d=function(){var e=a.get("collected");return{expando:i,nodes:e.nodes,meta:e.meta}};return Tk(!0,s,{settings:{filter:function(e){return PT({chart:t,config:r,expando:i,internal:o,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var o=e.h,a=e.data,s=e.style;return BT({chart:t,translator:n,config:r,expando:i,h:o,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return c(d())},afterHide:function(){return u(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function WT(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=MT({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Tk(!0,r,{settings:{filter:function(e){return e.filter((function(e){return e.data&&e.key===n.component}))},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:lk(lk({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function $T(e){var t=e.config.main.triggers.reduce((function(e,t){return t.keys.forEach((function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)})),e}),{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter((function(e){return t.key[e.key]})).reduce((function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e}),{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}var UT=function(){return!0};function YT(e){var t=e.config.main.triggers.reduce((function(e,t){var n=t.filter;return t.keys.forEach((function(t){e[t]="function"==typeof n?n:UT})),e}),{});return function(e){var n=t[e.key];return!n||n(e)}}function XT(e){var t=e.chart,n=e.event,r=e.component,i={absolute:{x:0,y:0},relative:{x:0,y:0}},o=t.element.getBoundingClientRect(),a=o.left,s=o.top;i.absolute.x=(void 0===n.clientX?Math.floor(n.srcEvent.clientX):n.clientX)-a,i.absolute.y=(void 0===n.clientY?Math.floor(n.srcEvent.clientY):n.clientY)-s;var l=t.component(r);if(l){var c=l.rect.computedInner;i.relative.x=i.absolute.x-c.x,i.relative.y=i.absolute.y-c.y}return i}function KT(e){var t=e.chart,n=e.filter,r=e.hits,i=e.position,o=[];if(r.position.length&&o.push.apply(o,gk(t.shapesAt(i.absolute,{components:r.position.map((function(e){return{key:e}}))}).filter(n))),!o.length&&r.distances.length){var a=[];r.distances.forEach((function(e){a.push.apply(a,gk(t.shapesAt({cx:i.absolute.x,cy:i.absolute.y,r:e},{components:r.distanceKeys[e].map((function(e){return{key:e}}))}).filter(n)))})),a.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find((function(e){return"path"===e.type}));if(r)return r;var i=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce((function(e,t){var n=i(t);return n<e.distance&&(e.distance=n,e.node=t),e}),{node:t[0],distance:i(t[0])}).node}({nodes:a,origin:i.relative}))}return o}function GT(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=n.delay.tap,s=$T({config:n}),l=YT({config:n}),c=n.main.triggers.reduce((function(e,t){return e.push.apply(e,gk(t.keys)),e}),[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return-1!==c.indexOf(e.key)})).length>0}},recognizeWith:"tap",events:pk({},"tooltipTap",(function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var c=t.component(n.main.key);if(c&&c.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),d=s({components:u});if(d.any){var f=mk(d.components,1)[0],p=XT({chart:t,event:e,component:f});i.set(TT,p);var h=KT({chart:t,filter:l,hits:d,position:p});if(h.length){var m=h[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return o.collectNodes({nodes:h})},meta:{triggerer:m,position:p}}).then((function(){c.emit("show",e,{nodes:h,delay:a})})).catch((function(){}))}else c.emit("hide")}else c.emit("hide")}}}))}}function ZT(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=$T({config:n}),s=YT({config:n}),l=function(e){var t=e.config,n=e.expando,r=e.internal,i=e.facade,o=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,c=e.nodes,u=function(e){var t=e.nodes;return JSON.stringify(t.map((function(e){var t;return{key:e.key,bounds:e.bounds,value:null===(t=e.data)||void 0===t?void 0:t.value}})))}({nodes:c});if(!s.ongoing[u]){s.ongoing[u]=!0,s.latest=u;var d=c[0].key;o({expando:n,event:t,collectNodes:function(){return i.collectNodes({nodes:c})},meta:{triggerer:d,position:r.get(TT)}}).then((function(){u===s.latest&&l.emit("show",t,{nodes:c,delay:a})})).catch((function(){l.emit("show")})).finally((function(){delete s.ongoing[u],u===s.latest&&(s.latest=void 0)}))}}}({config:n,expando:r,internal:i,facade:o}),c=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){c.forEach((function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")}))};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),o=t.component(n.main.key);if(o&&o.show){var c=a({components:r});if(c.any){var u=mk(c.components,1)[0],d=XT({chart:t,event:e,component:u});i.set(TT,d);var f=KT({chart:t,filter:s,hits:c,position:d});if(!f.length)return void o.emit("hide");l({event:e,tooltip:o,nodes:f})}else o.emit("hide")}var p=n.legend;if(p.keys.tooltip&&p.keys.component){var h=t.component(p.keys.tooltip);h&&h.show&&(r.some((function(e){return e.key===p.keys.component}))?h.emit("show",e):h.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function JT(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Tk(!0,{},{rtl:!1,enable:kT.FALSE,getColorSettings:kT.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:kT.FALSE,getGroupByValue:kT.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:kT.ARRAY,sections:kT.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:kT.NOOP,afterHide:kT.NOOP},interaction:{mouseleave:kT.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),i=jS(),o=jS(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[VT({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),WT({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:i,internal:o})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal;return{collectNodes:function(e){var o=e.nodes,a=mk(PT({chart:t,config:n,expando:r,internal:i,nodes:o}),1)[0];return(a=void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:i});return{gestures:[GT({chart:t,config:n,expando:r,internal:i,facade:o})],native:ZT({chart:t,config:n,expando:r,internal:i,facade:o})}}({chart:t,config:r,expando:i,internal:o})),a.interactions},expando:i}}var QT=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],eD=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1}};function tD(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=[],o=t.getStyle("","","fontFamilies");return Array.isArray(o)&&o.length?i.push.apply(i,gk(new Set([r].concat(gk(o.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):i.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(gk(i.map((function(e){return eD(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],gk(QT.map((function(e){return eD(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}var nD=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],rD=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function iD(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,gk(new Set([n].concat(gk(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(gk(r.map((function(e){return rD(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],gk(nD.map((function(e){return rD(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function oD(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:tD({theme:t,translator:n,id:r,path:i}),fontSize:iD({theme:t,translator:n,id:r,path:i})}}var aD={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function sD(e){const{qHyperCube:t,...n}=e,{qDataPages:r,qStackedDataPages:i,qTreeDataPages:o,...a}=t,s=uy(!0,{},{...n,qHyperCube:{...a,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:l}=aD;return l.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==zS(s,e)&&FS(s,e,null);else{const e=t[0],n=t[1].split("].")[1];zS(s,e,[]).forEach((e=>{void 0!==zS(e,n)&&FS(e,n,null)}))}})),s}var lD={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?i.data.group.value+" ":""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:""+e.data.major.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return""+e.value;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=sD(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=sD(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}},cD={exports:{}},uD=Object.getOwnPropertySymbols,dD=Object.prototype.hasOwnProperty,fD=Object.prototype.propertyIsEnumerable;function pD(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var hD=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=pD(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))dD.call(n,a)&&(i[a]=n[a]);if(uD){r=uD(n);for(var s=0;s<r.length;s++)fD.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},mD=hD,gD="function"==typeof Symbol&&Symbol.for,yD=gD?Symbol.for("react.element"):60103,vD=gD?Symbol.for("react.portal"):60106,bD=gD?Symbol.for("react.fragment"):60107,xD=gD?Symbol.for("react.strict_mode"):60108,wD=gD?Symbol.for("react.profiler"):60114,kD=gD?Symbol.for("react.provider"):60109,CD=gD?Symbol.for("react.context"):60110,SD=gD?Symbol.for("react.concurrent_mode"):60111,ED=gD?Symbol.for("react.forward_ref"):60112,MD=gD?Symbol.for("react.suspense"):60113,TD=gD?Symbol.for("react.memo"):60115,DD=gD?Symbol.for("react.lazy"):60116,_D="function"==typeof Symbol&&Symbol.iterator;
|
|
16
|
+
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,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).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,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<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}}(WE={exports:{}}),WE.exports);function UE(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var YE={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"},XE=/%$/,KE=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,GE=/^\(oct\)/i,ZE=/^\(dec\)/i,JE=/^\(hex\)/i,QE=/^\(bin\)/i,eM=/^\(rom\)/i,tM=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,nM=/#|0/g;function rM(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 iM(e,t,n){var r=UE(e);return n?r:new RegExp(r||"",t)}function oM(e,t,n){var r,i,o,a,s,l,c,u,d,f,p,h=e.pattern;h.indexOf("A")>=0&&(h=h.replace("A",""),e.abbreviate=!0),f=t,(p=n)&&(p=UE(p)),f&&(f=UE(f)),d=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(p,"[#0]+)?")),a=(o=(o=h.match(d))?o[0]:"")?h.substr(0,h.indexOf(o)):h,s=o?h.substring(h.indexOf(o)+o.length):"",o||(o=h?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(o=o.replace(iM(l,"g"),t)),c=n,n=".",c&&(o=o.replace(iM(c,"g"),n)),u=(u=o.match(/#/g))?u.length:0;var m,g=h.split(c);g[1]&&(m=g[1].match(nM)),e.prefix=a||"",e.postfix=s||"",e.pattern=h,e.maxPrecision=m?m.length:2,e.percentage=XE.test(h),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(iM(t,null,!0),"|").concat(iM(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=c,e.t=t,e.d=n,e.temp=u}var aM=function(){function e(t,n,r,i,o){WS(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return YE;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return US(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(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],tM.test(e[0])&&(r.positive.isFunctional=!0),e[1]?tM.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?tM.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||oM(r.positive,t,n),r.negative&&!r.negative.isFunctional&&oM(r.negative,t,n),r.zero&&!r.zero.isFunctional&&oM(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var 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).pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=function(e,t,n){var r;return KE.test(t)?e=rM(e,Number(/\d{2}/.exec(t)[0]),t,n):GE.test(t)?e=rM(e,8,t,n):ZE.test(t)?e=rM(e,10,t,n):JE.test(t)?e=rM(e,16,t,n):QE.test(t)?e=rM(e,2,t,n):eM.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){for(var 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();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}(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){var h,m,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(h=g[s-1]),h&&n>0&&h>0?m=h:(n<0&&h<0||!h)&&(y<0&&y-n<=u.maxPrecision?m=y:h<=n&&!(y>0&&-n<=u.maxPrecision)&&(m=h)),m&&(d=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=u.temp,c=(l=u.numericPattern).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{var v=Number(e.toFixed(Math.min(20,c?c.length:0)).split(".")[0]),b=l.split(o)[0];if(e=$E(b+=o,v)||"0",c){var x=Math.max(0,Math.min(14,c.length)),w=c.replace(/#+$/,"").length,k=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=k.length;s<w;s++)k+="0";k&&(e+=o+k)}else 0===v&&(i=0)}else if(r>=Math.pow(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=$E(l,e)}e=e.replace(u.numericRegex,(function(e){return e===a?u.groupTemp:e===o?u.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function sM(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,c=void 0===l?function(e){return e}:l,u=Object.create(null),d=Object.create(null),f=0,p=0;return(t=s?function(){return n=c.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=c(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return f>=o&&(delete u[d[p]],delete d[p],f--,p++),u[e]=t,d[f]=e,f++,t},t.get=function(e){return u[e]},t.has=function(e){return e in u},t.clear=function(){u=Object.create(null),d=Object.create(null),f=0,p=0},t.size=function(){return f},t}function lM(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JS(aM,t)}(i,e,t,n,r),a=sM(o.formatValue.bind(o),{toKey:function(e){return 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}var cM=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],uM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],dM=["January","February","March","April","May","June","July","August","September","October","November","December"],fM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pM(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function hM(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var mM=function(){function e(t,n,r){WS(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:cM,qDayNames:uM,qLongMonthNames:dM,qMonthNames:fM}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(YS(i={},"T",o.qTimeFmt||"hh:mm:ss"),YS(i,"D",o.qDateFmt||"YYYY-MM-DD"),YS(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return US(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*hM(t),r=60*hM(n),i=60*hM(r),o=1e3*hM(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)<0&&(c=6);var 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}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:pM("".concat(t.year).slice(-2),2),YYY:pM("".concat(t.year).slice(-3),3),def:function(e){return pM("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:pM("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:pM("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return pM("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return pM("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return pM("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return pM("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),c=[];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&c.push(u);var d=new RegExp(c.join("|"),"g");return t.replace(d,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in l[n])if(i===e||i.toLowerCase()===e){void 0===(r=l[n][i])&&(r=l[n][i.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function gM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JS(mM,t)}function yM(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function vM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=gM(n,e,t),i=sM(r.format.bind(r),{toKey:function(e){return"object"===VS(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?yM(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=gM(n,e,t),i=sM(r.format.bind(r),{toKey:function(e){return"object"===VS(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function bM(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return vM(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var 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,"##A"),o="U"),lM(n,r,i,o,t)}function xM(){var 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,u=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),d=function(e){return e.qText||""},f="dimension"===l?"first":"avg",p=bM(n,o),h="dimension"===l?"first":function(e,t){return p(t)},m={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return c},items:function(){return e||(e=a(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:u,label:d,reduce:f,reduceLabel:h,formatter:function(){return p},tags:function(){return n.qTags}};return m}function wM(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:xM(uE({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=wM("qAttrDimInfo",t,n,a,uE({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=wM("qAttrExprInfo",t,n,a,uE({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=wM("qMeasureInfo",t,n,a,uE({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function kM(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=o;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var u=kM.util,d={cache:l,cube:c,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},f={key:function(){return i},raw:function(){return c},field:function(e){return _E(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,f,l,u)},hierarchy:function(e){return d.hierarchy(e,f,l,u)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(d.extractor=VE,d.hierarchy=BE,d.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(d.extractor=hE,d.pages=c.qDataPages,d.hierarchy=BE):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},f,l,u)};var p="S"===c.qMode?function(e){return e.qElemNumber}:void 0,h="S"===c.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,QS(wM("qDimensionInfo",c,i,"",uE({},d,{value:p,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,QS(wM("qMeasureInfo",c,i,"",uE({},d,{value:h,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var m=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return m(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=f.field(e.from),n=xM(KS({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return d.extractor({field:e},f,l,u)},key:e.key,type:t.type(),localeInfo:d.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,QS(l.virtualFields)),f}var CM=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],SM=/\/qDimensionInfo(?:\/(\d+))?/,EM=/\/qMeasureInfo\/(\d+)/,MM=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,TM=/\/qAttrExprInfo\/(\d+)/,DM=/\/?qHyperCube/,_M=/\/?qTreeData/,NM=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},qM=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function RM(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};DM.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=NM):_M.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=qM);var s=!0;if(SM.test(e)&&(r=+SM.exec(e)[1]),EM.test(e)&&(i=+EM.exec(e)[1]),MM.test(e)){i=-1,r=0;var l=+MM.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(TM.test(e)){var c=i;if(t){i=0;var u=ME(o,t);i+=(u.qMeasureInfo||[]).length,r>-1?(i=u.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=u.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=u.qMeasureInfo.slice(0,c).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+TM.exec(n)[1]}else r>-1?(r=-1,i=+TM.exec(n)[1]):i+=+TM.exec(n)[1]+1}return CM.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||eE(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.")}()}(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}}function PM(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},l=e.isActive(),c=!1;return e.brushes().forEach((function(e){var t=RM(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(c=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.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){var l=e.brush.ranges();l.length&&(c=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var u=e.brush.ranges();u.length&&(c=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),u.forEach((function(e){return s.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(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var d=r.qHyperCube,f=d.qNoOfLeftDims,p=d.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===f||p>=f)&&f>-1?h.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:p-f})})):h.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),c=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),c=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));c=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!c&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function AM(e){kM.util=e.data("matrix").util,e.data("q",kM),e.formatter("q-number",lM),e.formatter("q-time",vM)}function IM(e){var t=zS(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function OM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===uk(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function LM(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}AM.qBrushHelper=PM,AM.selections=PM;var zM="Shift";function FM(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=IM({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,gk(o))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var jM=function e(t,n){return n[t]?e(t+1,n):t},HM=function(e,t){var n=t.reduce((function(e,t){return e[t]=!0,e}),{});return e.reduce((function(e,t,r){var i=jM(r,n);return n[i]=!0,e[r]=i,e}),{})};function BM(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,s=i.qMeasureInfo,l=void 0===s?[]:s;return{dimensions:HM(a,r.dimensions||[]),measures:HM(l,r.measures||[])}}function VM(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach((function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)})),t}var WM=[],$M=0,UM=function(e){var t=WM.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},YM=function(){document.addEventListener("keyup",UM)},XM=function(){document.removeEventListener("keyup",UM)},KM=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},GM=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function ZM(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function JM(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,c=void 0===l?"rangeClear":l,u=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(u||!d)return!1;var f=t.component(o);return!!f&&(f.emit(c),"string"==typeof s&&t.brush(s).clear(),f)}function QM(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return JM({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function eT(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return JM({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}function tT(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,c=void 0!==l&&l,u=e.brushName,d=JM({selectionInfo:t,chart:n,document:r,eventName:c?void 0:s,componentName:o,brushName:void 0!==u&&u});if(d){var f=d.settings.settings,p=f.scale,h=f.brush,m=n.scale(p).data().fields.map((function(e){return e.id()})),g=n.brush(h),y=g.brushes().filter((function(e){return"range"===e.type&&m.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function nT(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;JM({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function rT(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function iT(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,c=e.cleared,u=void 0!==c&&c,d=e.brushName;JM({selectionInfo:t,chart:n,document:r,eventName:u?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}var oT=["chart","document","selections","selectionInfo"],aT=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=hk(e,oT);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function sT(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function lT(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var c=(a||{}).lasso,u=void 0!==c&&c,d=i.reset,f=void 0===d?sT:d,p=i.clear,h=!1!==p&&function(e){var t=e.clear,n=void 0===t?aT:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(lk({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return QM(lk(lk({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return eT(lk(lk({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tT(lk(lk({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return nT(lk(lk({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rT(lk(lk({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return iT(lk(lk({},t),e))}},t))}}({clear:p,selections:s,selectionInfo:r,chart:n}),m=function(e){var t=e.chart,n=e.lasso,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:h,reset:f,lasso:u}),g={};Object.entries(m).forEach((function(e){var t=mk(e,2),n=t[0],r=t[1];g[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},c=function(e){return Object.assign(r,e||{})},u=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(lk(lk({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:c})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(lk(lk({defaultFunc:u({event:e,components:t}),setSelectionInfo:c,clear:i},l),{},{event:e,components:t}))}:function(e){u({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:h,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=mk(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=mk(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var cT=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function uT(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,c=void 0===l?void 0:l,u=o.selectionActions,d=(u=void 0===u?{}:u).clear,f=u.reset,p=o.selectionEvents,h=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,m=o.brushEvents,g=void 0===m?{}:m,y=o.brushName,v=void 0===y?"selection":y,b=o.brushMaxListeners,x=void 0===b?20:b,w=o.brushRanges,k=void 0!==w&&w,C=o.interceptors,S=void 0===C?{}:C,E=o.selectionsFn,M=void 0===E?i.selections:E,T=t.brush(v);if("number"==typeof x&&T.setMaxListeners(x),k){var D=!0===k?cT:k;T.configure({ranges:D})}var _={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},N=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var c=++$M,u=null,d={dimensions:[],measures:[]},f=[],p={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var h=FM({brush:r,getConfig:function(){return{layout:u,allowSimultaneous:f}}}),m=h.rangeInterceptor,g=h.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",(function(){return n.begin(l)}));var y={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};KM(n,y);var v=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(p=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){var e=a(r,p,u),t=BM({layout:u,filtered:d});e.forEach((function(e){var r=VM({selection:e,fieldMap:t});ZM(r,o.select.brushSelectionIncludeMax,v),n.select(r)}))}))):r.on("update",(function(){var e=a(r,p,u),t=BM({layout:u,filtered:d});e.forEach((function(e){n.select(VM({selection:e,fieldMap:t}))}))})),0===WM.length&&YM(),WM.push({key:c,selections:n}),{layout:function(e){u=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){u=null;var e=WM.indexOf(WM.filter((function(e){return e.key===c}))[0]);-1!==e&&WM.splice(e,1),WM.length||XM(),GM(n,y)}}}({brush:T,majorScale:c,actions:n,selections:r,picassoQ:i,selectionsFn:M});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=mk(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:T,interceptors:S});var q=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=mk(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]}));return function(){a.forEach((function(e){var n=mk(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),c=lT({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),u=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==zM||(t.lasso.action(!0),n=!0)},i=function(e){e.key===zM&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),c(),u()}}({chart:t,brush:T,actions:n,selections:r,selectionInfo:_.selectionInfo,selectionActions:{clear:d,reset:f},selectionEvents:h,brushEvents:g});if(s){var R=!0===s?gk(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;N.allowSimultaneous(R)}return{unbindEvents:q,state:_,picassoSelections:N,brush:T}}var dT=["colorField","useLegendCube"];function fT(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=uT({chart:t,actions:i,selections:n,picassoQ:AM,config:a}),l=s.unbindEvents,c=s.state,u=s.picassoSelections,d=s.brush,f=a.custom,p=void 0===f?{}:f,h=a.legendAlias,m=void 0===h?void 0:h,g=a.setBrushAliases,y=void 0===g?LM:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return c.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:OM(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.singleSelectIndex;return c.singleSelectDimensions[e]},getCanSelect:function(){return c.canSelect},getSelectionInfo:function(){return c.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,c=void 0===l?[]:l;return s.lockedDimensions=c.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=c.map((function(e,t){return IM({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===c.length||c.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=c[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:u,layout:e});Object.assign(c,t)},setFilteredFields:function(e){u.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=hk(e,dT),o=lk({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);y(lk(lk({},o),{},{defaultFunc:function(){return LM(o)}}))},destroy:function(){l(),u.release()},custom:lk({},p)}}var pT="'Source Sans Pro', 'Arial', 'sans-serif'",hT="#333333",mT="#595959",gT="#737373",yT="#cccccc",vT="#e6e6e6";function bT(e){var t={};return[].concat(gk(e),gk([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",mT],["object","axis.label.name","fontFamily",pT],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",yT],["object","axis.line.minor","color",vT],["object","axis.title","color"],["object","axis.title","fontFamily",pT],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",vT],["object","grid.line.major","color",yT],["object","grid.line.minor","color",vT],["object","label.value","color",mT],["object","label.value","fontFamily",pT],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",mT],[!1,"label.value","lightColor",vT],["object","outOfRange","color","#999"],["object","legend.title","color",hT],["object","legend.title","fontFamily",pT],["object","legend.title","fontSize","15px"],["object","legend.label","color",mT],["object","legend.label","fontFamily",pT],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",hT],["object","referenceLine.label.name","fontFamily",pT],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",vT],["object","referenceLine.outOfBounds","fontFamily",pT],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",gT,function(e){return"transparent"===e?gT:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var xT=function(e){return e};function wT(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},s=r.reduce((function(e,t){var n=mk(t,2),r=n[0],i=n[1];return e[r]=i,e}),{});return o.forEach((function(e){var r=mk(e,5),i=r[0],o=r[1],l=r[2],c=r[3],u=r[4],d=void 0===u?function(e){return e}:u,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var s=t.getStyle(n,r,i);return void 0===s?a:s}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:l,defaultValue:c}),p=(s["".concat(o,".").concat(l)]||xT)(d(f));FS(a,[o,l].filter(Boolean).join("."),p)})),i.forEach((function(e){var t=mk(e,2),n=t[0],r=t[1];FS(a,n,r)})),a}var kT={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},CT="chart-modules-tooltip",ST="#".concat(CT);function ET(){if(!document.querySelector(ST)){var e=document.createElement("div");e.id=CT,e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function MT(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){ET()},beforeUpdate:function(){ET()},destroyed:function(){var e;null!=(e=document.querySelector(ST))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(ST)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var TT="position",DT={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},_T=function(e){return e.data.value},NT=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};var qT=Number.MAX_VALUE;function RT(e){var t=e.nodes.reduce((function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e}),{xMin:qT,xMax:-qT,yMin:qT,yMax:-qT}),n=t.xMin,r=t.xMax,i=t.yMin;return{x:n,y:i,width:r-n,height:t.yMax-i}}function PT(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.nodes;if(!o.length)return[];var a=mk(o,1)[0].key,s=n.main.collectibles;if(!s.length)return[];var l=n.main.triggers.find((function(e){return-1!==e.keys.indexOf(a)}))||{},c=l.collect,u=l.placement;if(!c||!c.from||!u)return[];var d={triggerer:a,position:i.get(TT)},f=(function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.collectConfig,o=e.collectibles,a=e.meta,s=i.from,l={chart:t,expando:n,nodes:r,collectConfig:i,collectibles:o,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=mk(e.nodes,1)[0];return["container"===t.type&&t.children[0]||t]}(l);case"position":return function(e){var t=e.collectibles,n=e.meta;return e.chart.shapesAt(n.position.absolute,{components:t.map((function(e){return{key:e.key}}))})}(l);case"dimension":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=mk(e.nodes,1)[0],o=n.filter,a="function"==typeof o?o:function(){return!0},s=n.by,l=void 0===s?_T:s;return r.reduce((function(e,n){var r=n.major,o=void 0===r?NT:r,a=DT[n.type]||n.type;return e.push.apply(e,gk(t.findShapes(a).filter((function(e){return e.key===n.key&&e.data&&o({data:e.data})===l({data:i.data})})))),e}),[]).filter(a)}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=e.meta,o=mk(e.nodes,1)[0].localBounds,a=n.distance,s=n.filter,l="function"==typeof s?s:function(){return!0},c=r.map((function(e){return e.key}));return t.shapesAt({cx:i.position.absolute.x,cy:i.position.absolute.y,r:a||Math.max(o.width,o.height)},{components:c.map((function(e){return{key:e}}))}).filter(l)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:i})}(l);default:return[]}}({chart:t,expando:r,nodes:o,collectConfig:c,collectibles:s,meta:d})||[]).map((function(e){return e.children.length?e.children[0]:e}));return f.length?function(e){var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=mk(o,1)[0],c=Array.isArray(i)?i:[i],u={bounds:l.bounds,key:l.key},d=RT({nodes:a}),f=0;f<c.length;f++){var p=c[f];if("function"==typeof p){var h=p({chart:t,expando:r,hovered:o,collected:gk(a),meta:s,collectedBounds:d,combineBounds:RT});if(h)return h}if("trigger"===p)return u;if("collectible"===p){var m=n.main.placements.collectible;return{bounds:"function"==typeof m?m({collected:gk(a)}):d,key:a[0].key}}}return u}({chart:t,config:n,expando:r,placementConfig:i,hovered:o,collected:a,meta:s}),c=l.bounds,u=l.key,d=mk(a,1)[0].desc;return[{bounds:c,nodes:a,data:a.map((function(e){return e.data})),key:u,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:u,hovered:o,collected:f,meta:d}):[]}var AT=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),IT=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),OT=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),LT=function(e){return AT.test(e)},zT=function(e){return IT.test(e)||OT.test(e)};function FT(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(LT(r))return"ltr";if(zT(r))return"rtl"}return"ltr"}function jT(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],visibility:lk(lk({},{count:!1}),t)}}function HT(e){var t=e.config,n=e.h,r=e.context;return{section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,i=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,i=(r=void 0===r?{}:r).bold,o=void 0!==i&&i,a=r.italic,s=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":o?"bold":"normal","font-style":void 0!==a&&a?"italic":"normal","text-align":t.rtl?"right":"left",direction:FT(n)},colspan:2}],visibility:lk(lk({},{count:!0}),s)}}({config:t,value:n,style:r,visibility:i})},measure:function(e){var r=e.label,i=e.value,o=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,i,o=e.h,a=e.label,s=e.value,l=e.color,c=e.style,u=e.survive,d=e.visibility,f=e.config.rtl,p=o("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:f?[":",a]:[a,":"],style:{"text-align":f?"right":"left","font-weight":null!=c&&null!==(t=c.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=c&&null!==(n=c.label)&&void 0!==n&&n.italic?"italic":"normal",direction:FT(a)}},{content:l?f?[s,p]:[p,s]:s,style:{"text-align":f?"left":"right","vertical-align":"middle","font-weight":null!=c&&null!==(r=c.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=c&&null!==(i=c.value)&&void 0!==i&&i.italic?"italic":"normal",direction:FT(s)}}],survive:lk(lk({},{color:!1,duplicate:!1}),u),visibility:lk(lk({},{count:!0}),d)}}({config:t,h:n,label:r,value:i,color:o,style:a,survive:s,visibility:l})},divider:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visibility;return jT({visibility:t})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:lk(lk({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:lk(lk({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var i=e.nodes,o=e.property,a=e.filter,s=void 0===a||a,l=e.visibility,c=e.fillColor;return function(e){var t=e.config,n=e.h,r=e.context,i=e.nodes,o=e.property,a=e.filter,s=e.visibility,l=e.fillColor,c=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:lk(lk({},{count:!0}),s)},d=t.getColorSettings();if("color"===d.type||!d.fieldType)return u;var f=mk(i,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,i=e.node,o=i.data[r];if(o){if(-3===i.data.value)return i.data.label;var a=n.resources.dataset(o.source.key).field(o.source.field).formatter(),s=o.value,l=o.label,c=t.getColorSettings();if(a&&"measure"===c.fieldType)return Number.isNaN(+s)?"-":a(o.value);var u=l||s;return void 0===u||Number.isNaN(u)||"NaN"===u?"-":u}}({config:t,context:r,property:o,node:f}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,i=e.config.getColorSettings();if(i.label)return i.label;var o=r.data[n];if(o&&"color"!==i.type){var a=t.resources.dataset,s=o.source,l=s.key,c=s.field;return a(l).field(c).title()}}({config:t,context:r,property:o,node:f});var p=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":null!=l?l:function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:f}),margin:"0 8px"}});return u.content.push({content:c?[":",u.label]:[u.label,":"],style:{"text-align":c?"right":"left",direction:FT(u.label)}},{content:c?[u.value,p]:[p,u.value],style:{"text-align":c?"left":"right","vertical-align":"middle",direction:FT(u.value)}}),u}({config:t,h:n,context:r,nodes:i,property:o,filter:s,visibility:l,fillColor:c})}}}function BT(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.h,a=e.data,s=e.style,l=mk(a,1)[0],c=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.h,o=e.context,a=e.groups,s=o.node.meta,l=o.resources,c=l.dataset,u=l.formatter,d=HT({config:n,h:i,context:o}),f=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:c}),p=a.map((function(e){var t=d.section({content:gk((n.main.section({expando:r,h:i,nodes:e,dataset:c,formatter:u,meta:s,create:d,util:f})||[]).filter((function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length}))).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find((function(e){return"color"===e.type&&e.filter})),i=r?n.filter((function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value})):n;return t.main.showDuplicateMeasures?i:i.reduce((function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var i="".concat(t.label,"-").concat(t.value);return e.memory[i]||(e.memory[i]=!0,e.filtered.push(t)),e}),{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t}));return n.main.sections({chart:t,expando:r,h:i,nodes:o.node.nodes,dataset:c,formatter:u,meta:s,create:d,util:f,sections:p}),p.filter(Boolean)}({chart:t,config:r,expando:i,h:o,context:l,groups:function(e){var t=e.config,n=e.nodes.reduce((function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]={sorting:Object.keys(e).length,items:[]}),e[r].items.push(n),e}),{});return Object.keys(n).map((function(e){return n[e]})).sort((function(e,t){return e.sorting-t.sorting})).map((function(e){return e.items}))}({config:r,nodes:l.node.nodes})}),u=function(e){var t=e.translator,n=e.config,r=e.context,i=e.templates,o=n.main.layout,a=o.rows,s=o.grouping,l=o.single,c=function(e){var t=e.limit,n=e.grouping,r=e.single,i={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var o=e.visibility,a=e.index;if(r&&0!==a)return n?(i.index.started!==a&&i.index.group!==a&&(i.overflow++,i.index.group=a),!1):(i.overflow++,!1);if(i.count>=t){if(!n)return i.overflow++,!1;if(i.index.started!==a)return i.index.group!==a&&(i.overflow++,i.index.group=a),!1}return o.count&&i.count++,n&&(i.index.started=a),!0},overflow:function(){return i.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:i}):l}),u=i.reduce((function(e,t,n){var r=t.type,o=t.content;"section"===r&&(void 0===o?[]:o).forEach((function(t){c.process({visibility:t.visibility,index:n})&&e.push(t.content)}));var a=n===i.length-1;return"divider"!==r||a||c.process({visibility:t.visibility,index:n})&&e.push(t.content),e}),[]).filter((function(e){return e.length})),d=c.overflow();return d&&u.push(function(e){var t=e.translator,n=e.config,r=e.count,i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=FT(i);return[{content:i,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:o},colspan:2}]}({translator:t,config:n,count:d})),u}({translator:n,config:r,h:o,context:l,templates:c});return u.length?function(e){var t=e.h,n=e.style;return e.rows.map((function(e){return t("tr",{},e.map((function(e){var r={style:lk(lk({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})))}))}({h:o,style:s,rows:u}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:o})}function VT(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.internal;if(!r.main.key)return!1;var a=jS(),s=MT({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,c=l.afterShow,u=l.afterHide,d=function(){var e=a.get("collected");return{expando:i,nodes:e.nodes,meta:e.meta}};return Tk(!0,s,{settings:{filter:function(e){return PT({chart:t,config:r,expando:i,internal:o,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var o=e.h,a=e.data,s=e.style;return BT({chart:t,translator:n,config:r,expando:i,h:o,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return c(d())},afterHide:function(){return u(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function WT(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=MT({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Tk(!0,r,{settings:{filter:function(e){return e.filter((function(e){return e.data&&e.key===n.component}))},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:lk(lk({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function $T(e){var t=e.config.main.triggers.reduce((function(e,t){return t.keys.forEach((function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)})),e}),{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter((function(e){return t.key[e.key]})).reduce((function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e}),{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}var UT=function(){return!0};function YT(e){var t=e.config.main.triggers.reduce((function(e,t){var n=t.filter;return t.keys.forEach((function(t){e[t]="function"==typeof n?n:UT})),e}),{});return function(e){var n=t[e.key];return!n||n(e)}}function XT(e){var t=e.chart,n=e.event,r=e.component,i={absolute:{x:0,y:0},relative:{x:0,y:0}},o=t.element.getBoundingClientRect(),a=o.left,s=o.top;i.absolute.x=(void 0===n.clientX?Math.floor(n.srcEvent.clientX):n.clientX)-a,i.absolute.y=(void 0===n.clientY?Math.floor(n.srcEvent.clientY):n.clientY)-s;var l=t.component(r);if(l){var c=l.rect.computedInner;i.relative.x=i.absolute.x-c.x,i.relative.y=i.absolute.y-c.y}return i}function KT(e){var t=e.chart,n=e.filter,r=e.hits,i=e.position,o=[];if(r.position.length&&o.push.apply(o,gk(t.shapesAt(i.absolute,{components:r.position.map((function(e){return{key:e}}))}).filter(n))),!o.length&&r.distances.length){var a=[];r.distances.forEach((function(e){a.push.apply(a,gk(t.shapesAt({cx:i.absolute.x,cy:i.absolute.y,r:e},{components:r.distanceKeys[e].map((function(e){return{key:e}}))}).filter(n)))})),a.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find((function(e){return"path"===e.type}));if(r)return r;var i=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce((function(e,t){var n=i(t);return n<e.distance&&(e.distance=n,e.node=t),e}),{node:t[0],distance:i(t[0])}).node}({nodes:a,origin:i.relative}))}return o}function GT(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=n.delay.tap,s=$T({config:n}),l=YT({config:n}),c=n.main.triggers.reduce((function(e,t){return e.push.apply(e,gk(t.keys)),e}),[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return-1!==c.indexOf(e.key)})).length>0}},recognizeWith:"tap",events:pk({},"tooltipTap",(function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var c=t.component(n.main.key);if(c&&c.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),d=s({components:u});if(d.any){var f=mk(d.components,1)[0],p=XT({chart:t,event:e,component:f});i.set(TT,p);var h=KT({chart:t,filter:l,hits:d,position:p});if(h.length){var m=h[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return o.collectNodes({nodes:h})},meta:{triggerer:m,position:p}}).then((function(){c.emit("show",e,{nodes:h,delay:a})})).catch((function(){}))}else c.emit("hide")}else c.emit("hide")}}}))}}function ZT(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=$T({config:n}),s=YT({config:n}),l=function(e){var t=e.config,n=e.expando,r=e.internal,i=e.facade,o=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,c=e.nodes,u=function(e){var t=e.nodes;return JSON.stringify(t.map((function(e){var t;return{key:e.key,bounds:e.bounds,value:null===(t=e.data)||void 0===t?void 0:t.value}})))}({nodes:c});if(!s.ongoing[u]){s.ongoing[u]=!0,s.latest=u;var d=c[0].key;o({expando:n,event:t,collectNodes:function(){return i.collectNodes({nodes:c})},meta:{triggerer:d,position:r.get(TT)}}).then((function(){u===s.latest&&l.emit("show",t,{nodes:c,delay:a})})).catch((function(){l.emit("show")})).finally((function(){delete s.ongoing[u],u===s.latest&&(s.latest=void 0)}))}}}({config:n,expando:r,internal:i,facade:o}),c=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){c.forEach((function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")}))};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),o=t.component(n.main.key);if(o&&o.show){var c=a({components:r});if(c.any){var u=mk(c.components,1)[0],d=XT({chart:t,event:e,component:u});i.set(TT,d);var f=KT({chart:t,filter:s,hits:c,position:d});if(!f.length)return void o.emit("hide");l({event:e,tooltip:o,nodes:f})}else o.emit("hide")}var p=n.legend;if(p.keys.tooltip&&p.keys.component){var h=t.component(p.keys.tooltip);h&&h.show&&(r.some((function(e){return e.key===p.keys.component}))?h.emit("show",e):h.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function JT(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Tk(!0,{},{rtl:!1,enable:kT.FALSE,getColorSettings:kT.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:kT.FALSE,getGroupByValue:kT.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:kT.ARRAY,sections:kT.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:kT.NOOP,afterHide:kT.NOOP},interaction:{mouseleave:kT.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),i=jS(),o=jS(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[VT({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),WT({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:i,internal:o})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal;return{collectNodes:function(e){var o=e.nodes,a=mk(PT({chart:t,config:n,expando:r,internal:i,nodes:o}),1)[0];return(a=void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:i});return{gestures:[GT({chart:t,config:n,expando:r,internal:i,facade:o})],native:ZT({chart:t,config:n,expando:r,internal:i,facade:o})}}({chart:t,config:r,expando:i,internal:o})),a.interactions},expando:i}}var QT=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],eD=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1}};function tD(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=[],o=t.getStyle("","","fontFamilies");return Array.isArray(o)&&o.length?i.push.apply(i,gk(new Set([r].concat(gk(o.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):i.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(gk(i.map((function(e){return eD(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],gk(QT.map((function(e){return eD(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}var nD=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],rD=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function iD(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,gk(new Set([n].concat(gk(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(gk(r.map((function(e){return rD(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],gk(nD.map((function(e){return rD(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function oD(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:tD({theme:t,translator:n,id:r,path:i}),fontSize:iD({theme:t,translator:n,id:r,path:i})}}var aD={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function sD(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=uy(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:c}=aD;return c.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==zS(l,e)&&FS(l,e,null);else{const e=t[0],n=t[1].split("].")[1];zS(l,e,[]).forEach((e=>{void 0!==zS(e,n)&&FS(e,n,null)}))}})),l}var lD={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?i.data.group.value+" ":""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:""+e.data.major.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return""+e.value;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=sD(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=sD(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}},cD={exports:{}},uD=Object.getOwnPropertySymbols,dD=Object.prototype.hasOwnProperty,fD=Object.prototype.propertyIsEnumerable;function pD(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var hD=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=pD(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))dD.call(n,a)&&(i[a]=n[a]);if(uD){r=uD(n);for(var s=0;s<r.length;s++)fD.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i},mD=hD,gD="function"==typeof Symbol&&Symbol.for,yD=gD?Symbol.for("react.element"):60103,vD=gD?Symbol.for("react.portal"):60106,bD=gD?Symbol.for("react.fragment"):60107,xD=gD?Symbol.for("react.strict_mode"):60108,wD=gD?Symbol.for("react.profiler"):60114,kD=gD?Symbol.for("react.provider"):60109,CD=gD?Symbol.for("react.context"):60110,SD=gD?Symbol.for("react.concurrent_mode"):60111,ED=gD?Symbol.for("react.forward_ref"):60112,MD=gD?Symbol.for("react.suspense"):60113,TD=gD?Symbol.for("react.memo"):60115,DD=gD?Symbol.for("react.lazy"):60116,_D="function"==typeof Symbol&&Symbol.iterator;
|
|
17
17
|
/** @license React v16.8.4
|
|
18
18
|
* react.production.min.js
|
|
19
19
|
*
|
|
@@ -79,4 +79,4 @@ var uA=cD.exports,dA=hD,fA=lA.exports;function pA(e,t,n,r,i,o,a,s){if(!e){if(e=v
|
|
|
79
79
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
80
80
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
81
81
|
* SOFTWARE.
|
|
82
|
-
*/var XY=UY&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),YY))}};function KY(e){return e&&"[object Function]"==={}.toString.call(e)}function GY(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function ZY(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function JY(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=GY(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:JY(ZY(e))}function QY(e){return e&&e.referenceNode?e.referenceNode:e}var eX=UY&&!(!window.MSInputMethodContext||!document.documentMode),tX=UY&&/MSIE 10/.test(navigator.userAgent);function nX(e){return 11===e?eX:10===e?tX:eX||tX}function rX(e){if(!e)return document.documentElement;for(var t=nX(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===GY(n,"position")?rX(n):n:e?e.ownerDocument.documentElement:document.documentElement}function iX(e){return null!==e.parentNode?iX(e.parentNode):e}function oX(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&rX(a.firstElementChild)!==a?rX(l):l;var c=iX(e);return c.host?oX(c.host,t):oX(e,iX(t).host)}function aX(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function sX(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=aX(t,"top"),i=aX(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function lX(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function cX(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],nX(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function uX(e){var t=e.body,n=e.documentElement,r=nX(10)&&getComputedStyle(n);return{height:cX("Height",t,n,r),width:cX("Width",t,n,r)}}var dX=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},fX=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),pX=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},hX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function mX(e){return hX({},e,{right:e.left+e.width,bottom:e.top+e.height})}function gX(e){var t={};try{if(nX(10)){t=e.getBoundingClientRect();var n=aX(e,"top"),r=aX(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?uX(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=GY(e);l-=lX(u,"x"),c-=lX(u,"y"),i.width-=l,i.height-=c}return mX(i)}function yX(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=nX(10),i="HTML"===t.nodeName,o=gX(e),a=gX(t),s=JY(e),l=GY(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=mX({top:o.top-a.top-c,left:o.left-a.left-u,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!r&&i){var f=parseFloat(l.marginTop,10),p=parseFloat(l.marginLeft,10);d.top-=c-f,d.bottom-=c-f,d.left-=u-p,d.right-=u-p,d.marginTop=f,d.marginLeft=p}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=sX(d,t)),d}function vX(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=yX(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:aX(n),s=t?0:aX(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return mX(l)}function bX(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===GY(e,"position"))return!0;var n=ZY(e);return!!n&&bX(n)}function xX(e){if(!e||!e.parentElement||nX())return document.documentElement;for(var t=e.parentElement;t&&"none"===GY(t,"transform");)t=t.parentElement;return t||document.documentElement}function wX(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?xX(e):oX(e,QY(t));if("viewport"===r)o=vX(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=JY(ZY(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=yX(s,a,i);if("HTML"!==s.nodeName||bX(a))o=l;else{var c=uX(e.ownerDocument),u=c.height,d=c.width;o.top+=l.top-l.marginTop,o.bottom=u+l.top,o.left+=l.left-l.marginLeft,o.right=d+l.left}}var f="number"==typeof(n=n||0);return o.left+=f?n:n.left||0,o.top+=f?n:n.top||0,o.right-=f?n:n.right||0,o.bottom-=f?n:n.bottom||0,o}function kX(e){return e.width*e.height}function CX(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=wX(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return hX({key:e},s[e],{area:kX(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function SX(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?xX(t):oX(t,QY(n));return yX(n,i,r)}function EX(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function MX(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function TX(e,t,n){n=n.split("-")[0];var r=EX(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[MX(s)],i}function DX(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function _X(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=DX(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&KY(n)&&(t.offsets.popper=mX(t.offsets.popper),t.offsets.reference=mX(t.offsets.reference),t=n(t,e))})),t}function NX(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=SX(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=CX(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=TX(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=_X(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function qX(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function RX(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function PX(){return this.state.isDestroyed=!0,qX(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[RX("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function AX(e){var t=e.ownerDocument;return t?t.defaultView:window}function IX(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||IX(JY(o.parentNode),t,n,r),r.push(o)}function OX(e,t,n,r){n.updateBound=r,AX(e).addEventListener("resize",n.updateBound,{passive:!0});var i=JY(e);return IX(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function LX(){this.state.eventsEnabled||(this.state=OX(this.reference,this.options,this.state,this.scheduleUpdate))}function zX(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,AX(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function FX(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function jX(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&FX(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var HX=UY&&/Firefox/i.test(navigator.userAgent);function BX(e,t,n){var r=DX(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var VX=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],WX=VX.slice(3);function $X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=WX.indexOf(e),r=WX.slice(n+1).concat(WX.slice(0,n));return t?r.reverse():r}var UX="flip",YX="clockwise",XX="counterclockwise";function KX(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(DX(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return mX(s)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){FX(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var GX={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:pX({},l,o[l]),end:pX({},l,o[l]+o[c]-a[c])};e.offsets.popper=hX({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=FX(+n)?[+n,0]:KX(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||rX(e.instance.popper);e.instance.reference===n&&(n=rX(n));var r=RX("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=wX(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),pX({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),pX({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=hX({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!BX(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),f=l?"left":"top",p=l?"bottom":"right",h=EX(r)[c];s[p]-h<a[d]&&(e.offsets.popper[d]-=a[d]-(s[p]-h)),s[d]+h>a[p]&&(e.offsets.popper[d]+=s[d]+h-a[p]),e.offsets.popper=mX(e.offsets.popper);var m=s[d]+s[c]/2-h/2,g=GY(e.instance.popper),y=parseFloat(g["margin"+u],10),v=parseFloat(g["border"+u+"Width"],10),b=m-e.offsets.popper[d]-y-v;return b=Math.max(Math.min(a[c]-h,b),0),e.arrowElement=r,e.offsets.arrow=(pX(n={},d,Math.round(b)),pX(n,f,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(qX(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=wX(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=MX(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case UX:a=[r,i];break;case YX:a=$X(r);break;case XX:a=$X(r,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],i=MX(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="left"===r&&d(c.right)>d(u.left)||"right"===r&&d(c.left)<d(u.right)||"top"===r&&d(c.bottom)>d(u.top)||"bottom"===r&&d(c.top)<d(u.bottom),p=d(c.left)<d(n.left),h=d(c.right)>d(n.right),m=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),y="left"===r&&p||"right"===r&&h||"top"===r&&m||"bottom"===r&&g,v=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(v&&"start"===o&&p||v&&"end"===o&&h||!v&&"start"===o&&m||!v&&"end"===o&&g),x=!!t.flipVariationsByContent&&(v&&"start"===o&&h||v&&"end"===o&&p||!v&&"start"===o&&g||!v&&"end"===o&&m),w=b||x;(f||y||w)&&(e.flipped=!0,(f||y)&&(r=a[l+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=hX({},e.offsets.popper,TX(e.instance.popper,e.offsets.reference,e.placement)),e=_X(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=MX(t),e.offsets.popper=mX(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!BX(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=DX(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=DX(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=rX(e.instance.popper),l=gX(s),c={position:i.position},u=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},l=o(i.width),c=o(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),f=t?u||d||l%2==c%2?o:a:s,p=t?o:s;return{left:f(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:p(r.top),bottom:p(r.bottom),right:f(r.right)}}(e,window.devicePixelRatio<2||!HX),d="bottom"===n?"top":"bottom",f="right"===r?"left":"right",p=RX("transform"),h=void 0,m=void 0;if(m="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,h="right"===f?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&p)c[p]="translate3d("+h+"px, "+m+"px, 0)",c[d]=0,c[f]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,y="right"===f?-1:1;c[d]=m*g,c[f]=h*y,c.willChange=d+", "+f}var v={"x-placement":e.placement};return e.attributes=hX({},v,e.attributes),e.styles=hX({},c,e.styles),e.arrowStyles=hX({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return jX(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&jX(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=SX(i,t,e,n.positionFixed),a=CX(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),jX(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ZX=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};dX(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=XY(this.update.bind(this)),this.options=hX({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(hX({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){r.options.modifiers[t]=hX({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return hX({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&KY(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return fX(e,[{key:"update",value:function(){return NX.call(this)}},{key:"destroy",value:function(){return PX.call(this)}},{key:"enableEventListeners",value:function(){return LX.call(this)}},{key:"disableEventListeners",value:function(){return zX.call(this)}}]),e}();function JX(e){return"function"==typeof e?e():e}ZX.Utils=("undefined"!=typeof window?window:global).PopperUtils,ZX.placements=VX,ZX.Defaults=GX;var QX="undefined"!=typeof window?o_.useLayoutEffect:o_.useEffect,eK={},tK=o_.forwardRef((function(e,t){var n=e.anchorEl,r=e.children,i=e.container,o=e.disablePortal,a=void 0!==o&&o,s=e.keepMounted,l=void 0!==s&&s,c=e.modifiers,u=e.open,d=e.placement,f=void 0===d?"bottom":d,p=e.popperOptions,h=void 0===p?eK:p,m=e.popperRef,g=e.transition,y=void 0!==g&&g,v=q_(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=o_.useRef(null),x=EV(b,t),w=o_.useRef(null),k=EV(w,m),C=o_.useRef(k);QX((function(){C.current=k}),[k]),o_.useImperativeHandle(m,(function(){return w.current}),[]);var S=o_.useState(!0),E=S[0],M=S[1],T=function(e){if("rtl"!==("undefined"!=typeof window&&document.body.getAttribute("dir")||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(f),D=o_.useState(T),_=D[0],N=D[1],q=o_.useCallback((function(){if(b.current&&n&&u){w.current&&(w.current.destroy(),C.current(null));var e=function(e){N(e.placement)};JX(n);var t=new ZX(JX(n),b.current,__({placement:T},h,{modifiers:__({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},h.modifiers),onCreate:D$(e,h.onCreate),onUpdate:D$(e,h.onUpdate)}));C.current(t)}}),[n,a,c,u,T,h]),R=o_.useCallback((function(e){SV(x,e),q()}),[x,q]),P=function(){w.current&&(w.current.destroy(),C.current(null))};if(o_.useEffect((function(){q()}),[q]),o_.useEffect((function(){return function(){P()}}),[]),o_.useEffect((function(){u||y||P()}),[u,y]),!l&&!u&&(!y||E))return null;var A={placement:_};return y&&(A.TransitionProps={in:u,onEnter:function(){M(!1)},onExited:function(){M(!0),P()}}),o_.createElement(T$,{disablePortal:a,container:i},o_.createElement("div",__({ref:R,role:"tooltip"},v,{style:__({position:"fixed",top:0,left:0},v.style)}),"function"==typeof r?r(A):r))})),nK=jW(o_.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),rK=jW(o_.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),iK=o_.createElement(nK,null);var oK=eA((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes;return o_.createElement("div",{className:IP(n.root,t&&n.checked)},iK,o_.createElement(rK,{className:n.layer}))})),aK=o_.createContext(),sK=o_.createElement(oK,{checked:!0}),lK=o_.createElement(oK,null),cK=o_.forwardRef((function(e,t){var n=e.checked,r=e.classes,i=e.color,o=void 0===i?"secondary":i,a=e.name,s=e.onChange,l=q_(e,["checked","classes","color","name","onChange"]),c=o_.useContext(aK),u=n,d=D$(s,c&&c.onChange),f=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===f&&(f=c.name)),o_.createElement(s$,__({color:o,type:"radio",icon:lK,checkedIcon:sK,classes:{root:IP(r.root,r["color".concat(tA(o))]),checked:r.checked,disabled:r.disabled},name:f,checked:u,onChange:d,ref:t},l))}));function uK(e,t){return"object"===P_(t)&&null!==t?e===t:String(e)===String(t)}eA((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:E_(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:E_(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(cK),o_.forwardRef((function(e,t){var n=e.actions,r=e.children,i=e.name,o=e.value,a=e.onChange,s=q_(e,["actions","children","name","value","onChange"]),l=o_.useRef(null),c=o_.useRef(null!=o).current,u=o_.useState((function(){return c?null:e.defaultValue})),d=u[0],f=u[1];o_.useImperativeHandle(n,(function(){return{focus:function(){var e=l.current.querySelector("input:not(:disabled):checked");e||(e=l.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var p={name:i,onChange:function(e){c||f(e.target.value),a&&a(e,e.target.value)},value:c?o:d},h=EV(t,l);return o_.createElement(DU,__({role:"radiogroup",ref:h},s),o_.createElement(aK.Provider,{value:p},r))})),o_.Component;var dK=o_.forwardRef((function(e,t){var n=e.autoFocus,r=e.autoWidth,i=e.children,o=e.classes,a=e.className,s=e.defaultValue,l=e.disabled,c=e.displayEmpty,u=e.labelId,d=e.IconComponent,f=e.inputRef,p=e.MenuProps,h=void 0===p?{}:p,m=e.multiple,g=e.name,y=e.onBlur,v=e.onChange,b=e.onClose,x=e.onFocus,w=e.onOpen,k=e.open,C=e.readOnly,S=e.renderValue;e.required;var E=e.SelectDisplayProps,M=void 0===E?{}:E,T=e.tabIndex;e.type;var D=e.value,_=e.variant,N=void 0===_?"standard":_,q=q_(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","labelId","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),R=o_.useRef(null!=D).current,P=o_.useState(s),A=P[0],I=P[1],O=R?D:A,L=o_.useRef(null),z=o_.useState(null),F=z[0],j=z[1],H=o_.useRef(null!=k).current,B=o_.useState(),V=B[0],W=B[1],$=o_.useState(!1),U=$[0],Y=$[1],X=EV(t,f);o_.useImperativeHandle(X,(function(){return{focus:function(){F.focus()},node:L.current,value:O}}),[F,O]),o_.useEffect((function(){n&&F&&F.focus()}),[n,F]);var K,G,Z=function(e,t){e?w&&w(t):(F.focus(),b&&b(t)),H||(W(r?null:F.clientWidth),Y(e))},J=function(e){return function(t){var n;if(m||Z(!1,t),m){n=Array.isArray(O)?mR(O):[];var r=O.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;R||I(n),v&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),v(t,e))}},Q=null!==F&&(H?k:U);delete q["aria-invalid"];var ee=[],te=!1;(yU({value:O})||c)&&(S?K=S(O):te=!0);var ne=o_.Children.map(i,(function(e){if(!o_.isValidElement(e))return null;var t;if(m){if(!Array.isArray(O))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=O.some((function(t){return uK(t,e.props.value)})))&&te&&ee.push(e.props.children)}else(t=uK(O,e.props.value))&&te&&(G=e.props.children);return o_.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:J(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));te&&(K=m?ee.join(", "):G);var re,ie=V;!r&&H&&F&&(ie=F.clientWidth),re=void 0!==T?T:l?null:0;var oe=M.id||(g?"mui-component-select-".concat(g):void 0);return o_.createElement(o_.Fragment,null,o_.createElement("div",__({className:IP(o.root,o.select,o.selectMenu,o[N],a,l&&o.disabled),ref:j,tabIndex:re,role:"button","aria-expanded":Q?"true":void 0,"aria-labelledby":"".concat(u||""," ").concat(oe||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!C){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Z(!0,e))}},onClick:l||C?null:function(e){Z(!0,e)},onBlur:function(e){!Q&&y&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:O,name:g}}),y(e))},onFocus:x},M,{id:oe}),function(e){return null==e||"string"==typeof e&&!e.trim()}(K)?o_.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):K),o_.createElement("input",__({value:Array.isArray(O)?O.join(","):O,name:g,ref:L,type:"hidden",autoFocus:n},q)),o_.createElement(d,{className:IP(o.icon,o["icon".concat(tA(N))],Q&&o.iconOpen)}),o_.createElement(PY,__({id:"menu-".concat(g||""),anchorEl:F,open:Q,onClose:function(e){Z(!1,e)}},h,{MenuListProps:__({"aria-labelledby":u,role:"listbox",disableListWrap:!0},h.MenuListProps),PaperProps:__({},h.PaperProps,{style:__({minWidth:ie},null!=h.PaperProps?h.PaperProps.style:null)})}),ne))})),fK=FY,pK=o_.createElement(JU,null),hK=o_.createElement(kU,null),mK=o_.forwardRef((function e(t,n){var r=t.autoWidth,i=void 0!==r&&r,o=t.children,a=t.classes,s=t.displayEmpty,l=void 0!==s&&s,c=t.IconComponent,u=void 0===c?zY:c,d=t.id,f=t.input,p=t.inputProps,h=t.labelId,m=t.MenuProps,g=t.multiple,y=void 0!==g&&g,v=t.native,b=void 0!==v&&v,x=t.onClose,w=t.onOpen,k=t.open,C=t.renderValue,S=t.SelectDisplayProps,E=t.variant,M=void 0===E?"standard":E,T=t.labelWidth,D=void 0===T?0:T,_=q_(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),N=b?LY:dK,q=dU({props:t,muiFormControl:r$(),states:["variant"]}).variant||M,R=f||{standard:pK,outlined:o_.createElement($Y,{labelWidth:D}),filled:hK}[q];return o_.cloneElement(R,__({inputComponent:N,select:!0,inputProps:__({children:o,IconComponent:u,variant:q,type:void 0,multiple:y},b?{}:{autoWidth:i,displayEmpty:l,labelId:h,MenuProps:m,onClose:x,onOpen:w,open:k,renderValue:C,SelectDisplayProps:__({id:d},S)},{},p,{classes:p?fP({baseClasses:a,newClasses:p.classes,Component:e}):a},f?f.props.inputProps:{}),ref:n},_))}));mK.muiName="Select";var gK=eA(fK,{name:"MuiSelect"})(mK);var yK=eA((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:__({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,left:"calc(-50% + -4px)",transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,r=e.className,i=e.open,o=e.value,a=e.valueLabelDisplay;return"off"===a?t:o_.cloneElement(t,{className:IP(t.props.className,(i||"on"===a)&&n.open,n.thumb)},o_.createElement("span",{className:IP(n.offset,r)},o_.createElement("span",{className:n.circle},o_.createElement("span",{className:n.label},o))))}));function vK(e,t){return e-t}function bK(e,t,n){return e<t?t:e>n?n:e}function xK(e,t){return e.reduce((function(e,n,r){var i=Math.abs(t-n);return null===e||i<e.distance||i===e.distance?{distance:i,index:r}:e}),null).index}function wK(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function kK(e,t,n){return 100*(e-t)/(n-t)}function CK(e,t){var n=Math.round(e/t)*t;return Number(n.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}(t)))}function SK(e){var t=e.values,n=e.source,r=e.newValue,i=e.index;if(t[i]===r)return n;var o=mR(t);return o[i]=r,o}function EK(e){var t=e.sliderRef,n=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[data-index="'.concat(n,'"]')).focus(),r&&r(n)}var MK={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},TK=[],DK=function(e){return e},_K=o_.forwardRef((function(e,t){var n=e["aria-label"],r=e["aria-labelledby"],i=e["aria-valuetext"],o=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.component,u=void 0===c?"span":c,d=e.defaultValue,f=e.disabled,p=void 0!==f&&f,h=e.getAriaLabel,m=e.getAriaValueText,g=e.marks,y=void 0===g?TK:g,v=e.max,b=void 0===v?100:v,x=e.min,w=void 0===x?0:x,k=e.name,C=e.onChange,S=e.onChangeCommitted,E=e.onMouseDown,M=e.orientation,T=void 0===M?"horizontal":M,D=e.step,_=void 0===D?1:D,N=e.ThumbComponent,q=void 0===N?"span":N,R=e.track,P=void 0===R?"normal":R,A=e.value,I=e.ValueLabelComponent,O=void 0===I?yK:I,L=e.valueLabelDisplay,z=void 0===L?"off":L,F=e.valueLabelFormat,j=void 0===F?DK:F,H=q_(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),B=QP(),V=o_.useRef(null!=A).current,W=o_.useRef(),$=o_.useState(-1),U=$[0],Y=$[1],X=o_.useState(-1),K=X[0],G=X[1],Z=o_.useState(d),J=Z[0],Q=Z[1],ee=V?A:J,te=Array.isArray(ee),ne=o_.useRef(),re=te?mR(ee).sort(vK):[ee];re=re.map((function(e){return bK(e,w,b)}));var ie=!0===y&&null!==_?mR(Array(Math.floor((b-w)/_)+1)).map((function(e,t){return{value:w+_*t}})):y;ne.current={source:ee};var oe=UV(),ae=oe.isFocusVisible,se=oe.onBlurVisible,le=oe.ref,ce=o_.useState(-1),ue=ce[0],de=ce[1],fe=o_.useRef(),pe=EV(le,fe),he=EV(t,pe),me=AV((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));ae(e)&&de(t),G(t)})),ge=AV((function(){-1!==ue&&(de(-1),se()),G(-1)})),ye=AV((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));G(t)})),ve=AV((function(){G(-1)})),be=AV((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=re[n],i=(b-w)/10,o=ie.map((function(e){return e.value})),a=o.indexOf(r);switch(e.key){case"Home":t=w;break;case"End":t=b;break;case"PageUp":_&&(t=r+i);break;case"PageDown":_&&(t=r-i);break;case"ArrowRight":case"ArrowUp":t=_?r+_:o[a+1]||o[o.length-1];break;case"ArrowLeft":case"ArrowDown":t=_?r-_:o[a-1]||o[0];break;default:return}if(e.preventDefault(),_&&(t=CK(t,_)),t=bK(t,w,b),te){var s=t;t=SK({values:re,source:ee,newValue:t,index:n}).sort(vK),EK({sliderRef:fe,activeIndex:t.indexOf(s)})}V||Q(t),de(n),C&&C(e,t),S&&S(e,t)})),xe=o_.useRef(),we=T;"rtl"===B.direction&&"vertical"!==T&&(we+="-reverse");var ke=o_.useCallback((function(e){var t,n,r=e.finger,i=e.move,o=void 0!==i&&i,a=e.values,s=e.source,l=fe.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,f=l.left;if(t=0===we.indexOf("vertical")?(d-r.y)/u:(r.x-f)/c,-1!==we.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,w,b),_)n=CK(n,_);else{var p=ie.map((function(e){return e.value}));n=p[xK(p,n)]}n=bK(n,w,b);var h=0;if(te){var m=n;h=(n=SK({values:a,source:s,newValue:n,index:h=o?xe.current:xK(a,n)}).sort(vK)).indexOf(m),xe.current=h}return{newValue:n,activeIndex:h}}),[b,w,we,te,_,ie]),Ce=AV((function(e){var t=wK(e,W);if(t){var n=ke({finger:t,move:!0,values:re,source:ee}),r=n.newValue,i=n.activeIndex;EK({sliderRef:fe,activeIndex:i,setActive:Y}),V||Q(r),C&&C(e,r)}})),Se=AV((function(e){var t=wK(e,W);if(t){var n=ke({finger:t,values:re,source:ee}).newValue;Y(-1),"touchend"===e.type&&G(-1),S&&S(e,n),W.current=void 0,document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",Se),document.body.removeEventListener("mouseenter",Ee),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",Se)}})),Ee=AV((function(e){0===e.buttons&&Se(e)})),Me=AV((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(W.current=t.identifier);var n=wK(e,W),r=ke({finger:n,values:re,source:ee}),i=r.newValue,o=r.activeIndex;EK({sliderRef:fe,activeIndex:o,setActive:Y}),V||Q(i),C&&C(e,i),document.body.addEventListener("touchmove",Ce),document.body.addEventListener("touchend",Se)}));o_.useEffect((function(){var e=fe.current;return e.addEventListener("touchstart",Me),function(){e.removeEventListener("touchstart",Me),document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",Se),document.body.removeEventListener("mouseenter",Ee),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",Se)}}),[Ee,Se,Ce,Me]);var Te=AV((function(e){E&&E(e),e.preventDefault();var t=wK(e,W),n=ke({finger:t,values:re,source:ee}),r=n.newValue,i=n.activeIndex;EK({sliderRef:fe,activeIndex:i,setActive:Y}),V||Q(r),C&&C(e,r),document.body.addEventListener("mousemove",Ce),document.body.addEventListener("mouseenter",Ee),document.body.addEventListener("mouseup",Se)})),De=kK(te?re[0]:w,w,b),_e=kK(re[re.length-1],w,b)-De,Ne=__({},MK[we].offset(De),{},MK[we].leap(_e));return o_.createElement(u,__({ref:he,className:IP(o.root,o["color".concat(tA(l))],a,p&&o.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&o.marked,!1===P&&o.trackFalse,{vertical:o.vertical}[T],{inverted:o.trackInverted}[P]),onMouseDown:Te},H),o_.createElement("span",{className:o.rail}),o_.createElement("span",{className:o.track,style:Ne}),o_.createElement("input",{value:re.join(","),name:k,type:"hidden"}),ie.map((function(e){var t,n=kK(e.value,w,b),r=MK[we].offset(n);if(!1===P)t=-1!==re.indexOf(e.value);else{var i=te?e.value>=re[0]&&e.value<=re[re.length-1]:e.value<=re[0];t=i&&"normal"===P||!i&&"inverted"===P}return o_.createElement(o_.Fragment,{key:e.value},o_.createElement("span",{style:r,className:IP(o.mark,t&&o.markActive)}),o_.createElement("span",{"aria-hidden":!0,style:r,className:IP(o.markLabel,t&&o.markLabelActive)},e.label))})),re.map((function(e,t){var a=kK(e,w,b),s=MK[we].offset(a);return o_.createElement(O,{key:t,valueLabelFormat:j,valueLabelDisplay:z,className:o.valueLabel,value:"function"==typeof j?j(e,t):j,index:t,open:K===t||U===t||"on"===z,disabled:p},o_.createElement(q,{className:IP(o.thumb,o["thumbColor".concat(tA(l))],U===t&&o.active,p&&o.disabled,ue===t&&o.focusVisible),tabIndex:p?null:0,role:"slider",style:s,"data-index":t,"aria-label":h?h(t):n,"aria-labelledby":r,"aria-orientation":T,"aria-valuemax":b,"aria-valuemin":w,"aria-valuenow":e,"aria-valuetext":m?m(e,t):i,onKeyDown:be,onFocus:me,onBlur:ge,onMouseOver:ye,onMouseLeave:ve}))})))}));eA((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"11px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 11px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?T_(e.palette.primary.main,.62):M_(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',left:-18,top:-18,right:-18,bottom:-18},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(E_(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(E_(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(E_(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(E_(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:__({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:22,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:22,transform:"translateY(50%)"}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(_K);var NK=o_.forwardRef((function(e,t){var n=e.action,r=e.classes,i=e.className,o=e.message,a=e.role,s=void 0===a?"alert":a,l=q_(e,["action","classes","className","message","role"]);return o_.createElement(rA,__({component:LW,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:IP(r.root,i),ref:t},l),o_.createElement("div",{className:r.message},o),n?o_.createElement("div",{className:r.action},n):null)})),qK=eA((function(e){var t="light"===e.palette.type?.8:.98,n=S_(e.palette.background.default,t);return{root:D_({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(NK),RK=o_.forwardRef((function(e,t){var n=e.action,r=e.anchorOrigin,i=(r=void 0===r?{vertical:"bottom",horizontal:"center"}:r).vertical,o=r.horizontal,a=e.autoHideDuration,s=e.children,l=e.classes,c=e.className,u=e.ClickAwayListenerProps,d=e.ContentProps,f=e.disableWindowBlurListener,p=void 0!==f&&f,h=e.message,m=e.onClose,g=e.onEnter,y=e.onEntered,v=e.onEntering,b=e.onExit,x=e.onExited,w=e.onExiting,k=e.onMouseEnter,C=e.onMouseLeave,S=e.open,E=e.resumeHideDuration,M=e.TransitionComponent,T=void 0===M?VU:M,D=e.transitionDuration,_=void 0===D?{enter:xN.enteringScreen,exit:xN.leavingScreen}:D,N=e.TransitionProps,q=q_(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),R=o_.useRef(),P=o_.useState(!0),A=P[0],I=P[1],O=o_.useCallback((function(e){var t=null!=e?e:a;m&&null!=t&&(clearTimeout(R.current),R.current=setTimeout((function(){m&&null!=(null!=e?e:a)&&m(null,"timeout")}),t))}),[a,m]);o_.useEffect((function(){return S&&O(),function(){clearTimeout(R.current)}}),[S,O]);var L=function(){clearTimeout(R.current)},z=o_.useCallback((function(){if(null!=a){if(null!=E)return void O(E);O(.5*a)}}),[a,E,O]);return o_.useEffect((function(){if(!p&&S)return window.addEventListener("focus",z),window.addEventListener("blur",L),function(){window.removeEventListener("focus",z),window.removeEventListener("blur",L)}}),[p,z,S]),!S&&A?null:o_.createElement(k$,__({onClickAway:function(e){m&&m(e,"clickaway")}},u),o_.createElement("div",__({className:IP(l.root,l["anchorOrigin".concat(tA(i)).concat(tA(o))],c),onMouseEnter:function(e){k&&k(e),L()},onMouseLeave:function(e){C&&C(e),z()},ref:t},q),o_.createElement(T,__({appear:!0,in:S,onEnter:D$((function(){I(!1)}),g),onEntered:y,onEntering:v,onExit:b,onExited:D$((function(){I(!0)}),x),onExiting:w,timeout:_,direction:"top"===i?"down":"up"},N),s||o_.createElement(qK,__({message:h,action:n},d)))))}));eA((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},i={justifyContent:"flex-start"},o={top:24},a={bottom:24},s={right:24},l={left:24},c={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:__({},t,D_({},e.breakpoints.up("sm"),__({},o,{},c))),anchorOriginBottomCenter:__({},n,D_({},e.breakpoints.up("sm"),__({},a,{},c))),anchorOriginTopRight:__({},t,{},r,D_({},e.breakpoints.up("sm"),__({left:"auto"},o,{},s))),anchorOriginBottomRight:__({},n,{},r,D_({},e.breakpoints.up("sm"),__({left:"auto"},a,{},s))),anchorOriginTopLeft:__({},t,{},i,D_({},e.breakpoints.up("sm"),__({right:"auto"},o,{},l))),anchorOriginBottomLeft:__({},n,{},i,D_({},e.breakpoints.up("sm"),__({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(RK);var PK=o_.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=e.children,a=e.classes,s=e.className,l=e.completed,c=void 0!==l&&l,u=e.connector,d=e.disabled,f=void 0!==d&&d,p=e.index,h=e.last,m=e.orientation,g=q_(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return o_.createElement("div",__({className:IP(a.root,a[m],s,i&&a.alternativeLabel,c&&a.completed),ref:t},g),u&&i&&0!==p&&o_.cloneElement(u,{orientation:m,alternativeLabel:i,index:p,active:r,completed:c,disabled:f}),o_.Children.map(o,(function(e){return o_.isValidElement(e)?o_.cloneElement(e,__({active:r,alternativeLabel:i,completed:c,disabled:f,last:h,icon:p+1,orientation:m},e.props)):null})))}));eA({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(PK);var AK=jW(o_.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),IK=jW(o_.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),OK=o_.createElement("circle",{cx:"12",cy:"12",r:"12"}),LK=o_.forwardRef((function(e,t){var n=e.completed,r=void 0!==n&&n,i=e.icon,o=e.active,a=void 0!==o&&o,s=e.error,l=void 0!==s&&s,c=e.classes;return"number"==typeof i||"string"==typeof i?l?o_.createElement(IK,{className:IP(c.root,c.error),ref:t}):r?o_.createElement(AK,{className:IP(c.root,c.completed),ref:t}):o_.createElement(FW,{className:IP(c.root,a&&c.active),ref:t},OK,o_.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},i)):i})),zK=eA((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$active":{color:e.palette.primary.main},"&$completed":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(LK),FK=o_.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.disabled,f=void 0!==d&&d,p=e.error,h=void 0!==p&&p,m=e.icon;e.last;var g=e.optional,y=e.orientation,v=void 0===y?"horizontal":y,b=e.StepIconComponent,x=e.StepIconProps,w=q_(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),k=b;return m&&!k&&(k=zK),o_.createElement("span",__({className:IP(s.root,s[v],l,f&&s.disabled,o&&s.alternativeLabel,h&&s.error),ref:t},w),m||k?o_.createElement("span",{className:IP(s.iconContainer,o&&s.alternativeLabel)},o_.createElement(k,__({completed:u,active:r,error:h,icon:m},x))):null,o_.createElement("span",{className:s.labelContainer},o_.createElement(LW,{variant:"body2",component:"span",className:IP(s.label,o&&s.alternativeLabel,u&&s.completed,r&&s.active,h&&s.error),display:"block"},a),g))}));FK.muiName="StepLabel";var jK=eA((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(FK),HK=o_.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=e.children,o=e.classes,a=e.className,s=e.completed,l=e.disabled,c=e.icon;e.last;var u=e.optional,d=e.orientation,f=q_(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),p={active:n,alternativeLabel:r,completed:s,disabled:l,icon:c,optional:u,orientation:d},h=CU(i,["StepLabel"])?o_.cloneElement(i,p):o_.createElement(jK,p,i);return o_.createElement(QV,__({disabled:l,TouchRippleProps:{className:o.touchRipple},className:IP(o.root,o[d],a),ref:t},f),h)}));eA({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(HK);var BK=o_.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=void 0!==r&&r,o=e.classes,a=e.className,s=e.completed,l=e.disabled;e.index;var c=e.orientation,u=void 0===c?"horizontal":c,d=q_(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return o_.createElement("div",__({className:IP(o.root,o[u],a,i&&o.alternativeLabel,n&&o.active,s&&o.completed,l&&o.disabled),ref:t},d),o_.createElement("span",{className:IP(o.line,"vertical"===u?o.lineVertical:o.lineHorizontal)}))})),VK=eA((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(BK),WK=o_.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var r=e.children,i=e.classes,o=e.className;e.completed;var a=e.last;e.optional,e.orientation;var s=e.TransitionComponent,l=void 0===s?S$:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,f=q_(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),p=u;return"auto"!==u||l.muiSupportAuto||(p=void 0),o_.createElement("div",__({className:IP(i.root,o,a&&i.last),ref:t},f),o_.createElement(l,__({in:n,className:i.transition,timeout:p,unmountOnExit:!0},d),r))}));eA((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(WK);var $K=o_.createElement(VK,null),UK=o_.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.connector,u=void 0===c?$K:c,d=e.nonLinear,f=void 0!==d&&d,p=e.orientation,h=void 0===p?"horizontal":p,m=q_(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=o_.isValidElement(u)?o_.cloneElement(u,{orientation:h}):null,y=o_.Children.toArray(a),v=y.map((function(e,t){var n={alternativeLabel:o,connector:u,last:t+1===y.length,orientation:h},i={index:t,active:!1,completed:!1,disabled:!1};return r===t?i.active=!0:!f&&r>t?i.completed=!0:!f&&r<t&&(i.disabled=!0),[!o&&g&&0!==t&&o_.cloneElement(g,__({key:t},i)),o_.cloneElement(e,__({},n,{},i,{},e.props))]}));return o_.createElement(rA,__({square:!0,elevation:0,className:IP(s.root,s[h],l,o&&s.alternativeLabel),ref:t},m),v)}));eA({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(UK);var YK=o_.forwardRef((function(e,t){var n=e.anchor,r=e.classes,i=e.className,o=e.width,a=q_(e,["anchor","classes","className","width"]);return o_.createElement("div",__({className:IP(r.root,r["anchor".concat(tA(n))],i),ref:t,style:D_({},eU(n)?"width":"height",o)},a))})),XK=eA((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(YK),KK=null;function GK(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function ZK(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function JK(e,t){return e?t.clientWidth:t.clientHeight}function QK(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var eG="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),tG={enter:xN.enteringScreen,exit:xN.leavingScreen},nG="undefined"!=typeof window?o_.useLayoutEffect:o_.useEffect;o_.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,i=e.disableBackdropTransition,o=void 0!==i&&i,a=e.disableDiscovery,s=void 0!==a&&a,l=e.disableSwipeToOpen,c=void 0===l?eG:l,u=e.hideBackdrop,d=e.hysteresis,f=void 0===d?.52:d,p=e.minFlingVelocity,h=void 0===p?450:p,m=e.ModalProps,g=(m=void 0===m?{}:m).BackdropProps,y=q_(m,["BackdropProps"]),v=e.onClose,b=e.onOpen,x=e.open,w=e.PaperProps,k=void 0===w?{}:w,C=e.SwipeAreaProps,S=e.swipeAreaWidth,E=void 0===S?20:S,M=e.transitionDuration,T=void 0===M?tG:M,D=e.variant,_=void 0===D?"temporary":D,N=q_(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),q=QP(),R=o_.useState(!1),P=R[0],A=R[1],I=o_.useRef({isSwiping:null}),O=o_.useRef(),L=o_.useRef(),z=o_.useRef(),F=o_.useRef(!1),j=o_.useRef();nG((function(){j.current=null}),[x]);var H=o_.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,i=void 0===n?null:n,a=t.changeTransition,s=void 0===a||a,l=tU(q,r),c=-1!==["right","bottom"].indexOf(l)?1:-1,d=eU(r),f=d?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),p=z.current.style;p.webkitTransform=f,p.transform=f;var h="";if(i&&(h=q.transitions.create("all",CV({timeout:T},{mode:i}))),s&&(p.webkitTransition=h,p.transition=h),!o&&!u){var m=L.current.style;m.opacity=1-e/JK(d,z.current),s&&(m.webkitTransition=h,m.transition=h)}}),[r,o,u,q,T]),B=AV((function(e){if(F.current)if(KK=null,F.current=!1,A(!1),I.current.isSwiping){I.current.isSwiping=null;var t,n=tU(q,r),i=eU(r);t=i?GK(n,e.changedTouches):ZK(n,e.changedTouches);var o=i?I.current.startX:I.current.startY,a=JK(i,z.current),s=QK(t,o,x,a),l=s/a;Math.abs(I.current.velocity)>h&&(j.current=1e3*Math.abs((a-s)/I.current.velocity)),x?I.current.velocity>h||l>f?v():H(0,{mode:"exit"}):I.current.velocity<-h||1-l>f?b():H(JK(i,z.current),{mode:"enter"})}else I.current.isSwiping=null})),V=AV((function(e){if(z.current&&F.current&&(null==KK||KK===I.current)){var t=tU(q,r),n=eU(r),i=GK(t,e.touches),o=ZK(t,e.touches);if(x&&z.current.contains(e.target)&&null==KK){var a=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,i=e.anchor,o={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==i&&"left"!==i||(t=!t);var l="left"===i||"right"===i?"x":"y",c=e[o[l]],u=c>0,d=c+e[s[l]]<e[a[l]];return t&&d||!t&&u?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var r=window.getComputedStyle(e);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,z.current),start:n?I.current.startX:I.current.startY,current:n?i:o,anchor:r});if(a)return void(KK=a);KK=I.current}if(null==I.current.isSwiping){var l=Math.abs(i-I.current.startX),c=Math.abs(o-I.current.startY);l>c&&e.cancelable&&e.preventDefault();var u=n?l>c&&l>3:c>l&&c>3;if(!0===u||(n?c>3:l>3)){if(I.current.isSwiping=u,!u)return void B(e);I.current.startX=i,I.current.startY=o,s||x||(n?I.current.startX-=E:I.current.startY-=E)}}if(I.current.isSwiping){var d=JK(n,z.current),f=n?I.current.startX:I.current.startY;x&&!I.current.paperHit&&(f=Math.min(f,d));var p=QK(n?i:o,f,x,d);if(x)if(I.current.paperHit)0===p&&(I.current.startX=i,I.current.startY=o);else{if(!(n?i<d:o<d))return;I.current.paperHit=!0,I.current.startX=i,I.current.startY=o}null===I.current.lastTranslate&&(I.current.lastTranslate=p,I.current.lastTime=performance.now()+1);var h=(p-I.current.lastTranslate)/(performance.now()-I.current.lastTime)*1e3;I.current.velocity=.4*I.current.velocity+.6*h,I.current.lastTranslate=p,I.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),H(p)}}})),W=AV((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!x||L.current.contains(e.target)||z.current.contains(e.target))){var t=tU(q,r),n=eU(r),i=GK(t,e.touches),o=ZK(t,e.touches);if(!x){if(c||e.target!==O.current)return;if(n){if(i>E)return}else if(o>E)return}e.muiHandled=!0,KK=null,I.current.startX=i,I.current.startY=o,A(!0),!x&&z.current&&H(JK(n,z.current)+(s?20:-E),{changeTransition:!1}),I.current.velocity=0,I.current.lastTime=null,I.current.lastTranslate=null,I.current.paperHit=!1,F.current=!0}}));o_.useEffect((function(){if("temporary"===_)return document.body.addEventListener("touchstart",W),document.body.addEventListener("touchmove",V,{passive:!1}),document.body.addEventListener("touchend",B),function(){document.body.removeEventListener("touchstart",W),document.body.removeEventListener("touchmove",V,{passive:!1}),document.body.removeEventListener("touchend",B)}}),[_,W,V,B]),o_.useEffect((function(){return function(){KK===I.current&&(KK=null)}}),[]),o_.useEffect((function(){x||A(!1)}),[x]);var $=o_.useCallback((function(e){L.current=GB.findDOMNode(e)}),[]),U=o_.useCallback((function(e){z.current=GB.findDOMNode(e)}),[]);return o_.createElement(o_.Fragment,null,o_.createElement(iU,__({open:!("temporary"!==_||!P)||x,variant:_,ModalProps:__({BackdropProps:__({},g,{ref:$})},y),PaperProps:__({},k,{style:__({pointerEvents:"temporary"!==_||x?"":"none"},k.style),ref:U}),anchor:r,transitionDuration:j.current||T,onClose:v,ref:t},N)),!c&&"temporary"===_&&o_.createElement(OV,null,o_.createElement(XK,__({anchor:r,ref:O,width:E},C))))}));var rG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=void 0===i?"secondary":i,a=e.edge,s=void 0!==a&&a,l=e.size,c=void 0===l?"medium":l,u=q_(e,["classes","className","color","edge","size"]),d=o_.createElement("span",{className:n.thumb});return o_.createElement("span",{className:IP(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(tA(c))]}[c])},o_.createElement(s$,__({type:"checkbox",icon:d,checkedIcon:d,classes:{root:IP(n.switchBase,n["color".concat(tA(o))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),o_.createElement("span",{className:n.track}))}));eA((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(50%)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:E_(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:E_(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(rG);var iG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.disabled,o=void 0!==i&&i,a=e.disableFocusRipple,s=void 0!==a&&a,l=e.fullWidth,c=e.icon,u=e.indicator,d=e.label,f=e.onChange,p=e.onClick,h=e.selected,m=e.textColor,g=void 0===m?"inherit":m,y=e.value,v=e.wrapped,b=void 0!==v&&v,x=q_(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return o_.createElement(QV,__({focusRipple:!s,className:IP(n.root,n["textColor".concat(tA(g))],r,o&&n.disabled,h&&n.selected,d&&c&&n.labelIcon,l&&n.fullWidth,b&&n.wrapped),ref:t,role:"tab","aria-selected":h,disabled:o,onClick:function(e){f&&f(e,y),p&&p(e)}},x),o_.createElement("span",{className:n.wrapper},c,d),u)}));eA((function(e){var t;return{root:__({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},D_(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),D_(t,"overflow","hidden"),D_(t,"whiteSpace","normal"),D_(t,"textAlign","center"),D_(t,e.breakpoints.up("sm"),{fontSize:e.typography.pxToRem(13),minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(iG);var oG=o_.createContext(),aG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"table":i,a=e.padding,s=void 0===a?"default":a,l=e.size,c=void 0===l?"medium":l,u=e.stickyHeader,d=void 0!==u&&u,f=q_(e,["classes","className","component","padding","size","stickyHeader"]),p=o_.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return o_.createElement(oG.Provider,{value:p},o_.createElement(o,__({ref:t,className:IP(n.root,r,d&&n.stickyHeader)},f)))}));eA((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":__({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(aG);var sG=o_.createContext(),lG={variant:"body"},cG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tbody":i,a=q_(e,["classes","className","component"]);return o_.createElement(sG.Provider,{value:lG},o_.createElement(o,__({className:IP(n.root,r),ref:t},a)))}));eA({root:{display:"table-row-group"}},{name:"MuiTableBody"})(cG);var uG=o_.forwardRef((function(e,t){var n,r=e.align,i=void 0===r?"inherit":r,o=e.classes,a=e.className,s=e.component,l=e.padding,c=e.scope,u=e.size,d=e.sortDirection,f=e.variant,p=q_(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),h=o_.useContext(oG),m=o_.useContext(sG);n=s||(m&&"head"===m.variant?"th":"td");var g=c;!g&&m&&"head"===m.variant&&(g="col");var y=l||(h&&h.padding?h.padding:"default"),v=u||(h&&h.size?h.size:"medium"),b=f||m&&m.variant,x=null;return d&&(x="asc"===d?"ascending":"descending"),o_.createElement(n,__({ref:t,className:IP(o.root,o[b],a,"inherit"!==i&&o["align".concat(tA(i))],"default"!==y&&o["padding".concat(tA(y))],"medium"!==v&&o["size".concat(tA(v))],{head:h&&h.stickyHeader&&o.stickyHeader}[b]),"aria-sort":x,scope:g},p))})),dG=eA((function(e){return{root:__({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?T_(E_(e.palette.divider,1),.88):M_(E_(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(uG),fG={variant:"footer"},pG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tfoot":i,a=q_(e,["classes","className","component"]);return o_.createElement(sG.Provider,{value:fG},o_.createElement(o,__({className:IP(n.root,r),ref:t},a)))}));eA({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(pG);var hG={variant:"head"},mG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"thead":i,a=q_(e,["classes","className","component"]);return o_.createElement(sG.Provider,{value:hG},o_.createElement(o,__({className:IP(n.root,r),ref:t},a)))}));eA({root:{display:"table-header-group"}},{name:"MuiTableHead"})(mG);var gG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.disableGutters,s=void 0!==a&&a,l=e.variant,c=void 0===l?"regular":l,u=q_(e,["classes","className","component","disableGutters","variant"]);return o_.createElement(o,__({className:IP(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),yG=eA((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:D_({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(gG),vG=jW(o_.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),bG=jW(o_.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),xG=o_.createElement(bG,null),wG=o_.createElement(vG,null),kG=o_.createElement(vG,null),CG=o_.createElement(bG,null),SG=o_.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.nextIconButtonProps,o=e.onChangePage,a=e.page,s=e.rowsPerPage,l=q_(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=QP();return o_.createElement("div",__({ref:t},l),o_.createElement(o$,__({onClick:function(e){o(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?xG:wG),o_.createElement(o$,__({onClick:function(e){o(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},i),"rtl"===c.direction?kG:CG))})),EG=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},MG=[10,25,50,100],TG=o_.forwardRef((function(e,t){var n,r=e.ActionsComponent,i=void 0===r?SG:r,o=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?dG:c,d=e.count,f=e.labelDisplayedRows,p=void 0===f?EG:f,h=e.labelRowsPerPage,m=void 0===h?"Rows per page:":h,g=e.nextIconButtonProps,y=e.onChangePage,v=e.onChangeRowsPerPage,b=e.page,x=e.rowsPerPage,w=e.rowsPerPageOptions,k=void 0===w?MG:w,C=e.SelectProps,S=void 0===C?{}:C,E=q_(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==dG&&"td"!==u||(n=l||1e3);var M=S.native?"option":IY;return o_.createElement(u,__({className:IP(a.root,s),colSpan:n,ref:t},E),o_.createElement(yG,{className:a.toolbar},o_.createElement("div",{className:a.spacer}),k.length>1&&o_.createElement(LW,{color:"inherit",variant:"body2",className:a.caption},m),k.length>1&&o_.createElement(gK,__({classes:{select:a.select,icon:a.selectIcon},input:o_.createElement(xU,{className:IP(a.input,a.selectRoot)}),value:x,onChange:v},S),k.map((function(e){return o_.createElement(M,{className:a.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),o_.createElement(LW,{color:"inherit",variant:"body2",className:a.caption},p({from:0===d?0:b*x+1,to:Math.min(d,(b+1)*x),count:d,page:b})),o_.createElement(i,{className:a.actions,backIconButtonProps:o,count:d,nextIconButtonProps:g,onChangePage:y,page:b,rowsPerPage:x})))}));eA((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{top:1},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(TG);var DG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tr":i,a=e.hover,s=void 0!==a&&a,l=e.selected,c=void 0!==l&&l,u=q_(e,["classes","className","component","hover","selected"]),d=o_.useContext(sG);return o_.createElement(o,__({ref:t,className:IP(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));eA((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(DG);var _G=jW(o_.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),NG=o_.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.children,o=e.classes,a=e.className,s=e.direction,l=void 0===s?"desc":s,c=e.hideSortIcon,u=void 0!==c&&c,d=e.IconComponent,f=void 0===d?_G:d,p=q_(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return o_.createElement(QV,__({className:IP(o.root,a,r&&o.active),component:"span",disableRipple:!0,ref:t},p),i,u&&!r?null:o_.createElement(f,{className:IP(o.icon,o["iconDirection".concat(tA(l))])}))}));eA((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:1}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(NG);var qG,RG=!("undefined"==typeof window||!window.document||!window.document.createElement);function PG(){if(qG)return qG;if(!RG||!window.document.body)return"indeterminate";var e=window.document.createElement("div");return e.appendChild(document.createTextNode("ABCD")),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),qG="reverse",e.scrollLeft>0?qG="default":(e.scrollLeft=1,0===e.scrollLeft&&(qG="negative")),document.body.removeChild(e),qG}function AG(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=PG();if("indeterminate"===r)return Number.NaN;switch(r){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n}return n}function IG(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var OG={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function LG(e){var t=e.onChange,n=q_(e,["onChange"]),r=o_.useRef(),i=o_.useRef(null),o=function(){r.current=i.current.offsetHeight-i.current.clientHeight};return o_.useEffect((function(){var e=K$((function(){var e=r.current;o(),e!==r.current&&t(r.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),o_.useEffect((function(){o(),t(r.current)}),[t]),o_.createElement("div",__({style:OG,ref:i},n))}var zG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=e.orientation,a=q_(e,["classes","className","color","orientation"]);return o_.createElement("span",__({className:IP(n.root,n["color".concat(tA(i))],r,{vertical:n.vertical}[o]),ref:t},a))})),FG=eA((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(zG),jG=o_.createElement(vG,{fontSize:"small"}),HG=o_.createElement(bG,{fontSize:"small"}),BG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.direction,o=e.orientation,a=e.visible,s=q_(e,["classes","className","direction","orientation","visible"]),l=IP(n.root,r,{vertical:n.vertical}[o]);return a?o_.createElement(QV,__({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===i?jG:HG):o_.createElement("div",{className:l})})),VG=eA({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(BG),WG=o_.forwardRef((function(e,t){var n=e.action,r=e.centered,i=void 0!==r&&r,o=e.children,a=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.indicatorColor,d=void 0===u?"secondary":u,f=e.onChange,p=e.orientation,h=void 0===p?"horizontal":p,m=e.ScrollButtonComponent,g=void 0===m?VG:m,y=e.scrollButtons,v=void 0===y?"auto":y,b=e.TabIndicatorProps,x=void 0===b?{}:b,w=e.textColor,k=void 0===w?"inherit":w,C=e.value,S=e.variant,E=void 0===S?"standard":S,M=q_(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),T=QP(),D="scrollable"===E,_="rtl"===T.direction,N="vertical"===h,q=N?"scrollTop":"scrollLeft",R=N?"top":"left",P=N?"bottom":"right",A=N?"clientHeight":"clientWidth",I=N?"height":"width",O=o_.useState(!1),L=O[0],z=O[1],F=o_.useState({}),j=F[0],H=F[1],B=o_.useState({start:!1,end:!1}),V=B[0],W=B[1],$=o_.useState({overflow:"hidden",marginBottom:null}),U=$[0],Y=$[1],X=new Map,K=o_.useRef(null),G=o_.useRef(null),Z=function(){var e,t,n=K.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:AG(n,T.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==C){var i=G.current.children;if(i.length>0){var o=i[X.get(C)];t=o?o.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},J=AV((function(){var e,t=Z(),n=t.tabsMeta,r=t.tabMeta,i=0;if(r&&n)if(N)i=r.top-n.top+n.scrollTop;else{var o=_?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;i=r.left-n.left+o}var a=(D_(e={},R,i),D_(e,I,r?r[I]:0),e);if(isNaN(j[R])||isNaN(j[I]))H(a);else{var s=Math.abs(j[R]-a[R]),l=Math.abs(j[I]-a[I]);(s>=1||l>=1)&&H(a)}})),Q=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=r.ease,a=void 0===o?IG:o,s=r.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,f=function(){d=!0},p=function r(o){if(d)i(new Error("Animation cancelled"));else{null===c&&(c=o);var s=Math.min(1,(o-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){i(null)})):requestAnimationFrame(r)}};u===n?i(new Error("Element already at target position")):requestAnimationFrame(p)}(q,K.current,e)},ee=function(e){var t=K.current[q];N?t+=e:(t+=e*(_?-1:1),t*=_&&"reverse"===PG()?-1:1),Q(t)},te=function(){ee(-K.current[A])},ne=function(){ee(K.current[A])},re=o_.useCallback((function(e){Y({overflow:null,marginBottom:-e})}),[]),ie=AV((function(){var e=Z(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[R]<t[R]){var r=t[q]+(n[R]-t[R]);Q(r)}else if(n[P]>t[P]){var i=t[q]+(n[P]-t[P]);Q(i)}})),oe=AV((function(){if(D&&"off"!==v){var e,t,n=K.current,r=n.scrollTop,i=n.scrollHeight,o=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(N)e=r>1,t=r<i-o-1;else{var l=AG(K.current,T.direction);e=_?l<a-s-1:l>1,t=_?l>1:l<a-s-1}e===V.start&&t===V.end||W({start:e,end:t})}}));o_.useEffect((function(){var e=K$((function(){J(),oe()})),t=N$(K.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[J,oe]);var ae=o_.useCallback(K$((function(){oe()})));o_.useEffect((function(){return function(){ae.clear()}}),[ae]),o_.useEffect((function(){z(!0)}),[]),o_.useEffect((function(){J(),oe()})),o_.useEffect((function(){ie()}),[ie,j]),o_.useImperativeHandle(n,(function(){return{updateIndicator:J,updateScrollButtons:oe}}),[J,oe]);var se=o_.createElement(FG,__({className:a.indicator,orientation:h,color:d},x,{style:__({},j,{},x.style)})),le=0,ce=o_.Children.map(o,(function(e){if(!o_.isValidElement(e))return null;var t=void 0===e.props.value?le:e.props.value;X.set(t,le);var n=t===C;return le+=1,o_.cloneElement(e,{fullWidth:"fullWidth"===E,indicator:n&&!L&&se,selected:n,onChange:f,textColor:k,value:t})})),ue=function(){var e={};e.scrollbarSizeListener=D?o_.createElement(LG,{className:a.scrollable,onChange:re}):null;var t=V.start||V.end,n=D&&("auto"===v&&t||"desktop"===v||"on"===v);return e.scrollButtonStart=n?o_.createElement(g,{orientation:h,direction:_?"right":"left",onClick:te,visible:V.start,className:IP(a.scrollButtons,"on"!==v&&a.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?o_.createElement(g,{orientation:h,direction:_?"left":"right",onClick:ne,visible:V.end,className:IP(a.scrollButtons,"on"!==v&&a.scrollButtonsDesktop)}):null,e}();return o_.createElement(c,__({className:IP(a.root,s,N&&a.vertical),ref:t},M),ue.scrollButtonStart,ue.scrollbarSizeListener,o_.createElement("div",{className:IP(a.scroller,D?a.scrollable:a.fixed),style:U,ref:K,onScroll:ae},o_.createElement("div",{className:IP(a.flexContainer,N&&a.flexContainerVertical,i&&!D&&a.centered),ref:G,role:"tablist"},ce),L&&se),ue.scrollButtonEnd)}));eA((function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:D_({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(WG);var $G={standard:JU,filled:kU,outlined:$Y},UG=o_.forwardRef((function(e,t){var n=e.autoComplete,r=e.autoFocus,i=e.children,o=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.defaultValue,u=e.error,d=e.FormHelperTextProps,f=e.fullWidth,p=e.helperText,h=e.hiddenLabel,m=e.id,g=e.InputLabelProps,y=e.inputProps,v=e.InputProps,b=e.inputRef,x=e.label,w=e.multiline,k=e.name,C=e.onBlur,S=e.onChange,E=e.onFocus,M=e.placeholder,T=e.required,D=void 0!==T&&T,_=e.rows,N=e.rowsMax,q=e.select,R=void 0!==q&&q,P=e.SelectProps,A=e.type,I=e.value,O=e.variant,L=void 0===O?"standard":O,z=q_(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),F=o_.useState(0),j=F[0],H=F[1],B=o_.useRef(null);o_.useEffect((function(){if("outlined"===L){var e=GB.findDOMNode(B.current);H(null!=e?e.offsetWidth:0)}}),[L,D,x]);var V={};"outlined"===L&&(g&&void 0!==g.shrink&&(V.notched=g.shrink),V.labelWidth=j),R&&(P&&P.native||(V.id=void 0),V["aria-describedby"]=void 0);var W=p&&m?"".concat(m,"-helper-text"):void 0,$=x&&m?"".concat(m,"-label"):void 0,U=$G[L],Y=o_.createElement(U,__({"aria-describedby":W,autoComplete:n,autoFocus:r,defaultValue:c,fullWidth:f,multiline:w,name:k,rows:_,rowsMax:N,type:A,value:I,id:m,inputRef:b,onBlur:C,onChange:S,onFocus:E,placeholder:M,inputProps:y},V,v));return o_.createElement(EU,__({className:IP(o.root,a),error:u,fullWidth:f,hiddenLabel:h,ref:t,required:D,color:l,variant:L},z),x&&o_.createElement(tY,__({htmlFor:m,ref:B,id:$},g),x),R?o_.createElement(gK,__({"aria-describedby":W,id:m,labelId:$,value:I,input:Y},P),i):Y,p&&o_.createElement(NU,__({id:W},d),p))}));function YG(e){return Math.round(1e5*e)/1e5}eA({root:{}},{name:"MuiTextField"})(UG);var XG=o_.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.disableFocusListener,o=void 0!==i&&i,a=e.disableHoverListener,s=void 0!==a&&a,l=e.disableTouchListener,c=void 0!==l&&l,u=e.enterDelay,d=void 0===u?0:u,f=e.enterTouchDelay,p=void 0===f?700:f,h=e.id,m=e.interactive,g=void 0!==m&&m,y=e.leaveDelay,v=void 0===y?0:y,b=e.leaveTouchDelay,x=void 0===b?1500:b,w=e.onClose,k=e.onOpen,C=e.open,S=e.placement,E=void 0===S?"bottom":S,M=e.PopperProps,T=e.title,D=e.TransitionComponent,_=void 0===D?VU:D,N=e.TransitionProps,q=q_(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),R=QP(),P=o_.useState(!1),A=P[0],I=P[1],O=o_.useState(0)[1],L=o_.useState(),z=L[0],F=L[1],j=o_.useRef(!1),H=o_.useRef(null!=C).current,B=o_.useRef(),V=o_.useRef(),W=o_.useRef(),$=o_.useRef(),U=o_.useRef();o_.useEffect((function(){B.current||(B.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),C&&O((function(e){return!e}))}),[C]),o_.useEffect((function(){return function(){clearTimeout(V.current),clearTimeout(W.current),clearTimeout($.current),clearTimeout(U.current)}}),[]);var Y=function(e){H||A||I(!0),k&&k(e)},X=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),j.current&&"touchstart"!==e.type||(z&&z.removeAttribute("title"),clearTimeout(W.current),clearTimeout($.current),d?(e.persist(),W.current=setTimeout((function(){Y(e)}),d)):Y(e))},K=UV(),G=K.isFocusVisible,Z=K.onBlurVisible,J=K.ref,Q=o_.useState(!1),ee=Q[0],te=Q[1],ne=function(e){H||I(!1),w&&w(e),clearTimeout(V.current),V.current=setTimeout((function(){j.current=!1}),R.transitions.duration.shortest)},re=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ee&&(te(!1),Z())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout(W.current),clearTimeout($.current),e.persist(),$.current=setTimeout((function(){ne(e)}),v)},ie=EV(F,t),oe=EV(J,ie),ae=o_.useCallback((function(e){SV(oe,GB.findDOMNode(e))}),[oe]),se=EV(n.ref,ae),le=H?C:A;""===T&&(le=!1);var ce=!le&&!s,ue=__({"aria-describedby":le?h||B.current:null,title:ce&&"string"==typeof T?T:null},q,{},n.props,{className:IP(q.className,n.props.className)});c||(ue.onTouchStart=function(e){j.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout($.current),clearTimeout(V.current),clearTimeout(U.current),e.persist(),U.current=setTimeout((function(){X(e)}),p)},ue.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout(U.current),clearTimeout($.current),e.persist(),$.current=setTimeout((function(){ne(e)}),x)}),s||(ue.onMouseOver=X,ue.onMouseLeave=re),o||(ue.onFocus=function(e){z||F(e.currentTarget),G(e)&&(te(!0),X(e));var t=n.props;t.onFocus&&t.onFocus(e)},ue.onBlur=re);var de=g?{onMouseOver:ue.onMouseOver,onMouseLeave:ue.onMouseLeave,onFocus:ue.onFocus,onBlur:ue.onBlur}:{};return o_.createElement(o_.Fragment,null,o_.cloneElement(n,__({ref:se},ue)),o_.createElement(tK,__({className:IP(r.popper,g&&r.popperInteractive),placement:E,anchorEl:z,open:!!z&&le,id:ue["aria-describedby"],transition:!0},de,M),(function(e){var t=e.placement,n=e.TransitionProps;return o_.createElement(_,__({timeout:R.transitions.duration.shorter},n,N),o_.createElement("div",{className:IP(r.tooltip,r["tooltipPlacement".concat(tA(t.split("-")[0]))],j.current&&r.touch)},T))})))}));eA((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:E_(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(YG(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(YG(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:D_({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:D_({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:D_({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:D_({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(XG);var KG={entering:{transform:"none"},entered:{transform:"none"}},GG={enter:xN.enteringScreen,exit:xN.leavingScreen};function ZG(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function JG({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:ZG(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return o_.createElement("i",{style:i},o_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o_.createElement("path",{d:e})))}o_.forwardRef((function(e,t){var n=e.children,r=e.in,i=e.onEnter,o=e.onExit,a=e.style,s=e.timeout,l=void 0===s?GG:s,c=q_(e,["children","in","onEnter","onExit","style","timeout"]),u=QP(),d=EV(n.ref,t);return o_.createElement(iV,__({appear:!0,in:r,onEnter:function(e,t){kV(e);var n=CV({style:a,timeout:l},{mode:"enter"});e.style.webkitTransition=u.transitions.create("transform",n),e.style.transition=u.transitions.create("transform",n),i&&i(e,t)},onExit:function(e){var t=CV({style:a,timeout:l},{mode:"exit"});e.style.webkitTransition=u.transitions.create("transform",t),e.style.transition=u.transitions.create("transform",t),o&&o(e)},timeout:l},c),(function(e,t){return o_.cloneElement(n,__({style:__({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},KG[e],{},a,{},n.props.style),ref:d},t))}))}));const QG={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},eZ={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},tZ="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",nZ={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},rZ={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function iZ(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.",e.layout);let r=Gw.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function oZ(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),c=uy(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,i&&i({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),iZ(e,a,c)}))}const aZ=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))};function sZ({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>aZ(o,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){oZ(r,e,t,"qDimensions",a)}}}function lZ(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function cZ({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives:()=>aZ(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){oZ(i,e,t,"qMeasures",o,a)}}}function uZ(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const dZ={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},fZ=({children:e,...t})=>o_.createElement(UW,ty({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function pZ(e){function t({title:e,selected:t,onClick:n}){const r=Cy.detectTextDirection(e);return o_.createElement(uY,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},o_.createElement(pY,{style:{minWidth:32}},o_.createElement(JG,{d:t?tZ:""})),o_.createElement(gY,{primaryTypographyProps:{dir:r}},e))}function n({alignTo:e,changeTo:n,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:c}){const u=a.map((e=>o_.createElement(t,{key:e.id,title:e.title,onClick:()=>n(e.id)})));return o_.createElement(CY,ty({anchorEl:e,open:l,onClose:s},dZ[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o_.createElement(sY,{dense:!0,dir:i,"aria-label":c,component:"nav"},o_.createElement(t,{title:r,selected:!0,onClick:s}),u))}t.propTypes={title:a_.exports.string.isRequired,selected:a_.exports.bool,onClick:a_.exports.func.isRequired},t.defaultProps={selected:!1},n.propTypes={alignTo:a_.exports.any,changeTo:a_.exports.func.isRequired,current:a_.exports.string.isRequired,dir:a_.exports.string.isRequired,dock:a_.exports.string.isRequired,list:a_.exports.array,onClose:a_.exports.func.isRequired,show:a_.exports.bool.isRequired,instruction:a_.exports.string.isRequired},n.defaultProps={list:[],alignTo:null};class r extends o_.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasValidAlternatives:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o_.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentDidUpdate(e,t){const{popover:n,supportConditional:r}=this.props;n&&r&&n.getAlternatives().then((e=>{t.hasValidAlternatives!==(0!==e.length)&&this.setState({hasValidAlternatives:0!==e.length})}))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.id,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:t,translator:r,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l,supportConditional:c}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,f=i||this.state.inSelection,p=e.breadcrumbs.map(((t,n)=>o_.createElement(fZ,{style:{display:"flex",alignItems:"center",color:f&&"rgba(89, 89, 89, 0.8)",pointerEvents:f?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>f?void 0:e.drillUp(d-n),title:t},o_.createElement("span",{style:u},t),o_.createElement(JG,ty({},rZ,{size:"small",style:{margin:"0 8px"}}))))),h=c?this.state.hasValidAlternatives:l,m=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||i||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(y.background="rgba(0,0,0,0.08)");a&&(y.padding=a),s&&(y.minWidth=s);const v=Cy.detectTextDirection(e.text),b=o_.createElement(fZ,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:y,onClick:g?void 0:m,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:g?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&o_.createElement(JG,ty({},eZ,{size:"small",title:r.get("Tooltip.selections.locked")})),o_.createElement("span",{style:u,dir:v},e.text),t&&h&&o_.createElement(JG,ty({},nZ,{size:"small",style:{margin:"0 8px"}})));return o_.createElement(o_.Fragment,null,e.drilldown&&o_.createElement(JG,ty({},QG,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),p,o_.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:h?"auto":"none",height:"100%"}},b),t&&h&&o_.createElement(n,{dock:t.dock,dir:t.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:r.get("Accessibility.Popover.Instructions")}))}}function i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&vy(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:a_.exports.bool.isRequired,padding:a_.exports.string,minWidth:a_.exports.string,titleData:a_.exports.shape({breadcrumbs:a_.exports.arrayOf(a_.exports.string).isRequired,drilldown:a_.exports.bool.isRequired,index:a_.exports.number.isRequired,locked:a_.exports.bool.isRequired,text:a_.exports.string.isRequired,popoverText:a_.exports.string.isRequired,drillUp:a_.exports.func,id:a_.exports.string.isRequired}).isRequired,popover:a_.exports.shape({dir:a_.exports.string.isRequired,dock:a_.exports.string.isRequired,changeTo:a_.exports.func.isRequired,getAlternatives:a_.exports.func.isRequired}),translator:a_.exports.shape({get:a_.exports.func.isRequired}).isRequired,selections:a_.exports.shape({isActive:a_.exports.func,addListener:a_.exports.func,removeListener:a_.exports.func}),style:a_.exports.shape({fontSize:a_.exports.string,color:a_.exports.string,fontFamily:a_.exports.string}).isRequired,isDimension:a_.exports.bool.isRequired,hasAlternative:a_.exports.bool.isRequired,supportConditional:a_.exports.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:t}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||o(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:a,hyperCubeDef:s,isDimension:l,minWidth:c,model:u,onChangeToAlternative:d,padding:f,rtl:p,selections:h,skipAttributeExpressions:m,translator:g,supportConditional:y=!1},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!p?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),w=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,k=w&&w[l?"qDimensions":"qMeasures"]||[],C=n||a[l?"qDimensionInfo":"qMeasureInfo"],S=l?sZ:cZ,E=l?lZ:uZ,M=u&&u.colorSupport&&u.modifiers&&S({altList:k,app:e,dir:p?"rtl":"ltr",dock:i(v),model:u,onChange:d,skipAttributeExpressions:m,translator:g}),T=(D=this.settings.settings).isDimension&&vy(D,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings);var D;const _=C.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,o=E(e,i,u),a=n===C.length-1;return o_.createElement(o_.Fragment,{key:e.cId},o_.createElement(r,{popover:M,titleData:o,model:u,translator:g,selections:h,disabled:t(),style:this.style,isDimension:l,padding:f,minWidth:c,hasAlternative:T,supportConditional:y}),!a&&o_.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return o_.createElement("div",{style:x,dir:b},_)}}}const hZ=SN({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const mZ=TN({productionPrefix:"q1fe9",disableGlobal:!0,seed:""});function gZ(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",GB.render(function(e,t){return o_.createElement(kP,{generateClassName:t},o_.createElement(GP,{theme:hZ},e))}(e,mZ),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&GB.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(GB.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function yZ(){return function(e){e.renderer("react",gZ()),e.component("data-title",pZ(e.renderer("svg")())),e.component("disclaimer",function(){class e extends o_.Component{render(){const{label:e,spanStyle:t}=this.props;return o_.createElement(o_.Fragment,null,o_.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:a_.exports.string.isRequired,spanStyle:a_.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=n.height+"px",r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=n.height+"px",r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=n.width+"px",r.height=n.height+"px",r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(i,r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o_.createElement("div",{style:a,dir:o},o_.createElement(o_.Fragment,null,o_.createElement(e,{label:s,spanStyle:l})))}}}())}}function vZ(e){return kv(e).l<70}function bZ(e,t){const n=kv(e).l/100,r=kv(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function xZ(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var wZ={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const i=[];let o=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=o.attrs.fill,a=t.attrs.fill;if(bZ(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,o.desc.slice.innerRadius),s=Math.min(s,o.desc.slice.outerRadius),s>r){const t=xZ({r:s,a:e},n),o=xZ({r:r,a:e},n);i.push({type:"line",x1:t.x,y1:t.y,x2:o.x,y2:o.y,strokeWidth:1,opacity:.4,stroke:vZ(a)?"#ccc":"#333"})}}o=t}return i}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function kZ(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function CZ(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},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}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),i=Math.sin(t),o=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:kZ(s)}}var SZ={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,c=(i={r:t.offset,a:l},{x:(o=s).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),u=CZ({size:t.size,fill:t.fill,angle:l+Math.PI,...c});u.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(u)}}var i,o;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function EZ(){const e=om();return e.use(Zg),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",ey(e))};e.interaction("hammer",ey(Hammer))}(o)),e.use(yZ()),e.component("pie-dividers",wZ),e.component("negative-indicators",SZ),e}var MZ={};function TZ(){TZ.init.call(this)}MZ.isObject=function(e){return"object"==typeof e&&null!==e},MZ.isNumber=function(e){return"number"==typeof e},MZ.isUndefined=function(e){return void 0===e},MZ.isFunction=function(e){return"function"==typeof e};var DZ=TZ;TZ.EventEmitter=TZ,TZ.prototype._events=void 0,TZ.prototype._maxListeners=void 0,TZ.defaultMaxListeners=10,TZ.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},TZ.prototype.setMaxListeners=function(e){if(!MZ.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},TZ.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],MZ.isUndefined(n))return!1;if(MZ.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(MZ.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},TZ.prototype.addListener=function(e,t){var n;if(!MZ.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,MZ.isFunction(t.listener)?t.listener:t),this._events[e]?MZ.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,MZ.isObject(this._events[e])&&!this._events[e].warned)&&((n=MZ.isUndefined(this._maxListeners)?TZ.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,MZ.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),MZ.isFunction(console.trace)&&console.trace()));return this},TZ.prototype.on=TZ.prototype.addListener,TZ.prototype.once=function(e,t){if(!MZ.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},TZ.prototype.removeListener=function(e,t){var n,r,i,o;if(!MZ.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||MZ.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(MZ.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},TZ.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],MZ.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},TZ.prototype.listeners=function(e){return this._events&&this._events[e]?MZ.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},TZ.listenerCount=function(e,t){return e._events&&e._events[t]?MZ.isFunction(e._events[t])?1:e._events[t].length:0};function _Z(){const e={};var t;return t=e,Object.keys(DZ.prototype).forEach((e=>{t[e]=DZ.prototype[e]})),DZ.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function NZ({picasso:t}){var n;const r=e.useOptions(),i=e.useElement(),o=e.useSelections(),[a,s]=e.useState(),l=_Z(),c=e.useLayout(),u=e.useTranslator(),d=!(null===(n=c.qSelectionInfo)||void 0===n||!n.qInSelections),[f,p]=e.useState(!1);return l.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:i}){var o,a,s;return{active:n,label:i.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[0])||void 0===s||!s.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:c,isInSelections:d,isLassoActionActive:f,setIsLassoActionActive:p,translator:u}),e.useAction((()=>(a&&(a.interactions.lasso.active=()=>f),{...l.lasso})),[a,f,d,u.language()]),e.useEffect((()=>{i.style.overflow="hidden";const e=t({renderer:{prio:[r.renderer||"canvas"]}}),n=e.chart({element:i,data:[],settings:{}}),a=fT({chart:n,actions:l,selections:o,config:{selectionActions:!1}});a.setLayout(c),a.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const u=function(e){var t=lk({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({legendScrollOffset:0,rotation:0});u.intercept("rotation",(e=>(u.get("rotation")+e)%(2*Math.PI))),u.onChanged("rotation",(()=>{n.update({partialData:!0})}));const d=jS();return l.on("selections-start",(()=>{n.brush("selection").start()})),s({picasso:e,chart:n,selectionService:a,viewState:u,viewCache:d,interactions:l}),()=>{a.destroy(),n.destroy(),l.removeAllListeners(),delete l.select,u.intercept("rotation",void 0),u.onChanged("rotation",void 0)}}),[]),a}const qZ={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function RZ(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const PZ={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function AZ(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r,i,o;let a,s,l,c,u,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(r=n.session)&&void 0!==r&&r.sessionConfig||null!==(i=e.session)&&void 0!==i&&null!==(o=i.config)&&void 0!==o&&o.url)){var f;if(a=e.session.options||(null===(f=e.enigmaModel)||void 0===f?void 0:f.session.sessionConfig),!a){var p;a=null===(p=e.session)||void 0===p?void 0:p.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",c=a.port?":"+a.port:"",u=a.prefix?a.prefix:"/","/"!==u[u.length-1]&&(u+="/"),s+l+c+u}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await PZ.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function IZ(e,t,n,r){var i,o,a,s,l,c;const{app:u,flags:d}=t,f=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!f)return[];const[p]=f,h=p.size||"small",m=p.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===p.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===m&&null!==(l=p.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return AZ(p,h,u);if("url"===m)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&RZ(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:i,imageError:s}=await PZ.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await PZ.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(u,d,p,h,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===m&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(RZ(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:o,imageError:a}=await PZ.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(u,n[g],h,v)}return[]}const OZ={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(IZ(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},LZ={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await OZ.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>OZ.checkIfPromisesExist({customTooltipModel:e})};const zZ=(e,t)=>{var n,r,i;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:qZ.CHART.CHART_PARENT_TYPE,qId:qZ.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},FZ=e=>{var t,n,r;const i=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:qZ.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const jZ={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=qZ.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:qZ.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a,s,l;const c=i,u=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=c&&c.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&u&&!(t.qHyperCubeDef.qDimensions.length<=0)){await jZ.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=qZ.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=qZ.CHART.STATE,a=zZ(t,o),s=await e.createSessionObject(a),l=FZ(t);if(s.id!==qZ.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,f,p,h;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(f=n[0].data)||void 0===f?void 0:f.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var m,g;const e=null!==(m=n[0].data.selectionOuterDimension)&&void 0!==m?m:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(qZ.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await i.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(p=c.miniChartToken.model)||void 0===p?void 0:p.id,type:null===(h=c.miniChartToken.model)||void 0===h?void 0:h.genericType})}}catch(t){await jZ.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(jZ.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(qZ.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=qZ.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function HZ(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function BZ(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=qZ.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function VZ(e){const t=BZ();return e.filter((e=>t[e.id]))}const WZ={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const c=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=WZ.getAttrExprData(a);o.length||n.length?LZ.handlePromises({customTooltipModel:i,nodes:WZ.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&jZ.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>LZ.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[qZ.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[qZ.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[qZ.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(VZ(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[qZ.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[qZ.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=HZ(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===VZ(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=HZ(e)||[];[...i,t].forEach((e=>{const t=VZ(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=BZ(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:Cy.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Cy.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function $Z(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],c=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return c?(s.forEach(((e,t)=>{const i=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case qZ.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case qZ.CUSTOM.TITLE:case qZ.CUSTOM.DESCRIPTION:case qZ.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const UZ={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>$Z(t,e,r,n)}}};const YZ={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[qZ.CUSTOM.TITLE]:!0,[qZ.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=WZ.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===qZ.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===qZ.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Sy.getMeasure(e,t))),e,o)}};function XZ({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(YZ.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function KZ(e){const t=qZ.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function GZ(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var ZZ={attrExpr:{migrateProperties(e){var t,n,r,i;const o=uy(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=GZ(o);return s=function(e,t){return t.concat(e.map((e=>KZ(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches(e){var t,n,r,i;const o=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=KZ(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(GZ(e),o,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,i,o,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],c=(null===(i=t.tooltip)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.qHyperCube)||{},u=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((t=>{if(u){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:JZ}=qZ;function QZ({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){var u,d,f;const p=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:WZ,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),h="rtl"===c.direction,m=!(!t.tooltip||t.tooltip.auto),g=m&&zS(t,"tooltip.hideBasic",!1),y=!!(m&&null!==(u=t.tooltip)&&void 0!==u&&null!==(d=u.chart)&&void 0!==d&&null!==(f=d.object)&&void 0!==f&&f.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>m,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=XZ({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===JZ.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===JZ.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>WZ.checkIfPromisesExist({customTooltipModel:p}),createImageRow:({value:e,h:t})=>WZ.getImageRow(e,{h:t,rtl:h}),addImages:({nodes:r})=>{const i=WZ.getDataNodes(o,r),{attrExps:a}=WZ.getAttrExprData(t);return LZ.handlePromises({customTooltipModel:p,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>y,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>jZ.createContainer({layout:t,ctx:{h:e,rtl:h}}),createLimitationRow:()=>WZ.getFooterRow(a.get("properties.tooltip.notselectedmessage"),h),show:({nodes:e,properties:t})=>jZ.show({app:n,properties:t,selectedNodes:e,customTooltipModel:p,rtl:h}),hasAlternateState:()=>{var e;return!(null===(e=p.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>jZ.hide({app:n,customTooltipModel:p}),destroy:()=>jZ.destroyVisualization({customTooltipModel:p})}}}function eJ(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function tJ({flags:t,picasso:n,instance:r}){const i=e.useModel(),o=e.useApp(),a=e.useTranslator(),s=e.useElement(),[l,c]=e.useState(),u=e.useStaleLayout(),d=e.usePlugins(),f=e.useConstraints(),p=e.useOptions(),h=e.useTheme(),{qLocaleInfo:m}=e.useAppLayout(),g=e.useEmbed();return e.useEffect((()=>{if(!r)return;s.style.overflow="hidden";const e=function(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,c=e.layoutService,u=void 0===c?void 0:c,d=e.createConfig,f=void 0===d?LS:d,p=e.config,h=void 0===p?{}:p,m=e.custom,g=void 0===m?{}:m,y=h.localeInfo,v=h.key,b=h.theme,x=void 0===b?void 0:b,w=h.auto,k=void 0===w?void 0:w,C=h.definitionPath,S=null==u||null===(t=u.getLayout)||void 0===t?void 0:t.call(u),E={theme:x,key:v,localeInfo:y,layout:S,hc:null==u||null===(n=u.getHyperCube)||void 0===n?void 0:n.call(u),legendProps:null==u||null===(r=u.getLayoutValue)||void 0===r?void 0:r.call(u,"legend"),colorProps:lk(lk({},null==u||null===(i=u.getLayoutValue)||void 0===i?void 0:i.call(u,"color")),{},{useBaseColors:S?PS(S):void 0})},M=qS({picasso:o,model:a,app:s,translator:l,auto:k});!1!==k&&M.auto((function(e){return k?k({layout:e,defaultAuto:OS}):OS(e)}));var T=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(C)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return T},custom:lk({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:PS}),n=AS(E,t);return M.config(n),M.getAuxiliarySettings(C).then((function(){T=!0}))}}}({picasso:r.picasso,model:i,app:o,translator:a,config:{auto:!1,key:"fill"}}),l=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return fk(ck().mark((function e(){var r,a,s,l;return ck().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=fk(ck().mark((function e(n){var r;return ck().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(lk({},i));case 4:if("object"===uk(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(lk({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,gk(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=mk(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Tk(!0,{},n.brush);Tk(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===uk(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=BS({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=BS({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:r.picasso,plugins:d,pluginArgs:eJ(u)}),y=QZ({flags:t,layout:u,app:o,model:i,picasso:n,chart:r.chart,translator:a,localeInfo:m,embed:g,options:p}),v=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:bT(a),styles:void 0};return d.styles=wT({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=wT({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:h,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),b=function({chart:e,translator:t,layout:n,constraints:r,options:i,themeService:o,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,c="rtl"===i.direction,{fontFamily:u}=o.getStyles();return JT({chart:e,translator:t,config:{rtl:c,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:u},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:i,create:o,util:a})=>{const[c]=n,{title:u,description:d,measures:f}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},p=[];u&&p.push(o.text({value:u,style:{bold:!0}})),d&&p.push(o.text({value:d}));const h=s.hideBasic();if(h&&!f.length&&(u||d)||p.push(o.text({value:c.data.label,style:{bold:!0}})),!h){p.push(o.color({nodes:n,property:"fill"}));const{num:e}=c.data;if(p.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=c.data;p.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}p.push(o.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:i("share")(c.desc.share)}))}f&&p.push(...f.map((e=>o.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),p.push(o.raw({value:s.chart.createLimitationRow()}))):p.push(o.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:m}=c.data;return s.isEnabled()&&m&&p.push(...m.map((t=>o.raw({value:s.createImageRow({value:t,h:e})})))),p},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}({app:o,chart:r.chart,translator:a,layout:u,constraints:f,options:p,themeService:v,colorService:e,custom:y}),x=function({layout:e,themeService:t,flags:n}){const r=t.getStyles(),i=t=>{var r;return n.isEnabled("CLIENT_IM_3050")?null===(r=e.components)||void 0===r?void 0:r.find((e=>e.key===t)):void 0};return{axis:{title:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,p,h;return{fontFamily:null!==(e=null===(t=i("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(o=n.title)||void 0===o?void 0:o.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(a=null===(s=i("axis"))||void 0===s||null===(l=s.axis)||void 0===l||null===(c=l.title)||void 0===c?void 0:c.fontSize)&&void 0!==a?a:r.axis.title.fontSize,color:null!==(u=null===(d=i("axis"))||void 0===d||null===(f=d.axis)||void 0===f||null===(p=f.title)||void 0===p||null===(h=p.color)||void 0===h?void 0:h.color)&&void 0!==u?u:r.axis.title.color}}}},label:{name:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,p,h;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(n=t.label)||void 0===n||null===(o=n.name)||void 0===o||null===(a=o.color)||void 0===a?void 0:a.color)&&void 0!==e?e:r.label.name.color,fontSize:null!==(s=null===(l=i("label"))||void 0===l||null===(c=l.label)||void 0===c||null===(u=c.name)||void 0===u?void 0:u.fontSize)&&void 0!==s?s:r.label.name.fontSize,fontFamily:null!==(d=null===(f=i("label"))||void 0===f||null===(p=f.label)||void 0===p||null===(h=p.name)||void 0===h?void 0:h.fontFamily)&&void 0!==d?d:r.label.name.fontFamily}}},value:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,p,h;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(n=t.label)||void 0===n||null===(o=n.value)||void 0===o||null===(a=o.color)||void 0===a?void 0:a.color)&&void 0!==e?e:r.label.value.color,fontSize:null!==(s=null===(l=i("label"))||void 0===l||null===(c=l.label)||void 0===c||null===(u=c.value)||void 0===u?void 0:u.fontSize)&&void 0!==s?s:r.label.value.fontSize,fontFamily:null!==(d=null===(f=i("label"))||void 0===f||null===(p=f.label)||void 0===p||null===(h=p.value)||void 0===h?void 0:h.fontFamily)&&void 0!==d?d:r.label.value.fontFamily}}}}}}({layout:u,themeService:v,flags:t});c({colorService:e,pluginService:l,themeService:v,tooltipService:b,styleService:x})}),[i,o,r,u,a.language(),f,p.direction,h.name()]),l}function nJ({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:i}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:e+"Range",direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const rJ=.8,iJ=.55,oJ={CORNER_RADIUS:0,INNER_RADIUS:iJ,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},aJ=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,i;let o=rJ,a=0;const s=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:iJ;e.donut.showAsDonut&&(o=rJ-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*o+a}}:rJ,sJ=({layout:e},t,n)=>{var r,i;if(!e.donut.showAsDonut)return 0;const o=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:iJ;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=rJ-o,n=o;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:o},lJ=({layout:e},t)=>{var n,r,i,o,a,s;const l=t.colorService.getDatumProps(),c=l[Object.keys(l)[0]],u=c&&c.field?c.field:void 0,d="qDimensionInfo/0"===u,f=u?t.ds.field(u).raw():null,p=f&&(f.label||f.title||f.qFallbackTitle)||"",h=t.encodings.slice.outerRadius,{formatter:m}=t.chart,g=vy(e,"qHyperCube.qDimensionInfo",[]).length;function y(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>m(n)(e.qNum):e=>e.qText}}const v=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...l,num:y(t.encodings.slice.arc,"arc"),fillTooltip:u?{field:u,label:p,value:e=>d?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==g?UZ.getNode(e,{dimensionCount:g}):void 0,radius:h?y(h,"outerRadius"):void 0}}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:()=>t.viewState.get("rotation"),endAngle:()=>t.viewState.get("rotation")+2*Math.PI,slice:{arc:{ref:"num"},innerRadius:sJ({layout:e},t,v),fill:t.colorService.getColor(),strokeWidth:null!=v&&null!==(n=v.style)&&void 0!==n&&n.strokeWidth?oJ.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:oJ.STROKE.WIDTH.NONE,stroke:null!==(r=null==v||null===(i=v.style)||void 0===i||null===(o=i.strokeColor)||void 0===o?void 0:o.color)&&void 0!==r?r:oJ.STROKE.COLOR,outerRadius:aJ({layout:e},t,v),cornerRadius:null!==(a=null==v||null===(s=v.style)||void 0===s?void 0:s.cornerRadius)&&void 0!==a?a:0}},animations:{enabled:t.animations.enabled,isMainComponent:!0}}};function cJ({layout:e},t){var n,r;const i=(e.components||[]).filter((e=>"slices"===e.key))[0],o=null!==(n=null==i||null===(r=i.style)||void 0===r?void 0:r.innerRadius)&&void 0!==n?n:iJ,a=t.encodings.slice.outerRadius,s=t.themeService.getStyles();return!(!e.donut.showAsDonut||!a)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:s.label.name.color,outerRadius:{scale:"radius",fn:e=>{const t=rJ-o,n=o;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled}}}function uJ(e){return{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:e.animations.enabled,trackBy:()=>Math.random()}}}function dJ({layout:e},t){if(e.donut.showAsDonut||!t.encodings.slice.outerRadius)return!1;return{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:t.themeService.getStyles().label.name.color},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:t.animations.enabled}}}function fJ(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function pJ(e){return e.node.data.num.label}function hJ(e){return e.node.data.radius.label}function mJ(e,t,n){if(e.dataPoint.auto)return n?pJ:fJ;if("share"===e.dataPoint.labelMode)return fJ;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?hJ:pJ}return null}function gJ({data:e}){return e?e.label:""}function yJ(e){const t=parseInt(e,10);if(!isNaN(t))return t}function vJ(e){var t,n;const r=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return(null!==(t=null==r||null===(n=r.style)||void 0===n?void 0:n.innerRadius)&&void 0!==t?t:iJ)>.3}function bJ({node:e,data:t}){return uy({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function xJ(e,t,n){const r=t.styleService.label.name.getStyle(),i=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",padding:t.encodings.slice.outerRadius?4:2,fill:r.fill}],fontSize:yJ(r.fontSize),fontFamily:r.fontFamily,label:gJ,linkData:({node:e,data:t})=>uy({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(mJ(e,t,!1)){const r=function(e,t,n){return{label:mJ(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&vJ(e)?"inside":"into",onBackground:e.donut.showAsDonut&&vJ(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),o=Ty(uy(t,r),n.theme);o.linkData=bJ,i.push(o)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:i}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}function wJ({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=mJ(e,t,!0),i=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme),o=t.themeService.getStyles(),a=t.styleService.label.name.getStyle(),s=t.styleService.label.value.getStyle(),l=a.fill===o.label.name.color,c=s.fill===o.label.value.color;return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fontSize:yJ(a.fontSize),fontFamily:a.fontFamily,fill:l&&!e.donut.showAsDonut?i:a.fill,label:gJ,linkData:({data:e})=>e},{fontSize:yJ(s.fontSize),fontFamily:s.fontFamily,fill:c&&!e.donut.showAsDonut?i:s.fill,label:r,linkData:({data:e})=>e}]}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}(e,n,t):xJ(e,n,t))}const kJ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=(this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type))||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(n))&&!e.isLocked([this.chart.component("slices")]);return r||this.chart.component("legendRangeBrush").emit("rangeClear"),r}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function CJ(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}function SJ(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:i}=CJ(e,t),o=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*rJ;return(o-r)**2+(a-i)**2<=s**2}const EJ=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let i=CJ(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(i={cx:i.x,cy:i.y,r:5});const o=this.chart.shapesAt(i,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});o.length&&(this.chart.brushFromShapes(o,{components:[{key:o[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),MJ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),TJ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function DJ(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&SJ(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const _J=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&SJ(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),NJ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),qJ=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[_J(e,{}),EJ(e,t,{}),...n]:[kJ(e,{}),TJ(e,{}),_J(e,{}),MJ(e,{}),NJ(e,{}),EJ(e,t,{}),...n]});function RJ(e,t,n){const r=e.getIsSingleSelect(0),{constraints:i}=n;if(i.active&&i.passive)return[];const o=t.tooltipService.getInteractions();return[qJ(t,r,o.gestures),DJ(t),o.native]}function PJ({settings:e},t){const n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function AJ({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties,i=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:i.fontFamily,fontSize:i.fontSize,color:i.color}}}function IJ({layout:e},t,n){const r=function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const i=vy(e,"qHyperCube.qSize.qcy");if(vy(e,"qHyperCube.qDataPages.0.qArea.qHeight")<i)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const o=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":o.length!==r.length&&"NegativeOrZeroValues"}(e,t),{fontFamily:i}=t.themeService.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:py[e].alignment},settings:{label:i.get("Object.Disclaimer."+e),rtl:o},style:r}}(r,t,n,{fontFamily:i})}function OJ({layout:e,context:t,selectionService:n},r={}){const i=function({layout:e}={},t={}){const n={};return uy(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&uy(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),o={scales:i};let a=[];const s=IJ({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,c=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",rtl:t.rtl},{navigationDisabled:l});return i.fillRange&&c.components[0]&&("right"===c.components[0].layout.dock||"left"===c.components[0].layout.dock||t.rtl)&&(i.fillRange.invert=!0),a=[lJ({layout:e,settings:o},r),cJ({layout:e},r),uJ(r),dJ({layout:e},r),AJ({layout:e},r,t),...c.components,nJ({settings:o,scaleKey:"fill",legend:c.components[0]||{},onEdited:r.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},wJ({layout:{components:e.components,dataPoint:uy({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:RJ(n,r,t),scales:i,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:PJ({settings:o},r),strategy:yy(0,r)}}function LJ({instance:t,services:n,picasso:r,flags:i}){const o=e.useOptions(),a=e.useModel(),s=e.useApp(),l=e.useTranslator(),c=e.useTheme(),u=e.useStaleLayout(),d=e.useSelections(),f=e.useConstraints(),{qLocaleInfo:p}=e.useAppLayout(),[h]=e.usePromise((()=>{if(!n)return Promise.resolve();ZZ.attrExpr.updateProperties(a,u);return Promise.all([n.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:c,legendProps:u.legend,layout:u,localeInfo:p,hc:u.qHyperCube,colorProps:{...u.color,useBaseColors:e(u)}})}),a&&!u.snapshotData?a.getEffectiveProperties():Promise.resolve({}),n.pluginService.initialize()])}),[n]);e.useEffect((()=>{null!=t&&t.selectionService&&t.selectionService.setLayout(u)}),[u]),e.useEffect((()=>{if(!t||!h)return;const{chart:e,viewState:m,interactions:g,viewCache:y}=t,{colorService:v,pluginService:b,themeService:x,tooltipService:w,styleService:k}=n,C=o.viewState||{};u.snapshotData||(m.preventSet("legendScrollOffset",C.legendScrollOffset||0),m.preventSet("rotation",C.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(u,m),w.expando.set("properties",h[1]);const S=r.data("q")({key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:p}}),E=[{type:"q",key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:p}},...v.getData()],M={slice:{arc:"qMeasureInfo/0"}};u.qHyperCube.qMeasureInfo.length>1&&(M.slice.outerRadius="qMeasureInfo/1");const T=function(e,t){if(t.slice.outerRadius)return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length;return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(r.data("q")({data:u.qHyperCube,config:{localeInfo:p}}),M),D=d?()=>{const t=e.brush("selection");Zg.selections(t,{},u).forEach((e=>{d.select(e)}))}:()=>{},_=u.snapshotData&&!o.freeResize?{width:(u.snapshotData.content.size||u.snapshotData.object.size).w,height:(u.snapshotData.content.size||u.snapshotData.object.size).h}:void 0,N=e=>t.selectionService.getIsSelectionLocked(e),q=()=>OJ({layout:u,context:{rtl:"rtl"===o.direction,theme:c,translator:l,constraints:f,model:a},selectionService:t.selectionService},{picasso:r,ds:S,model:a,app:s,chart:e,onSelect:D,isLocked:N,interactions:g,constraints:f,translator:l,viewState:m,dataRowCount:T,encodings:M,colorService:v,pluginService:b,themeService:x,styleService:k,tooltipService:w,debouncer:HS,properties:h[1],logicalSize:_,flags:i,animations:{enabled:()=>function({viewState:e,options:t,viewCache:n,layout:r,chart:i}){return!1!==t.chartAnimations&&n.get("chartWidth")===i.element.clientWidth&&n.get("chartHeight")===i.element.clientHeight&&n.get("hasZeroLine")===!!i.component("zeroLine")&&0===e.get("rotation")&&!lD.propertiesHaveChanged({viewCache:n,layout:r})}({viewState:m,options:o,layout:u,viewCache:y,chart:e})}});t.generateSettings=q;const R=q();e.update({data:E,settings:R}),y.set("chartWidth",e.element.clientWidth),y.set("chartHeight",e.element.clientHeight),y.set("hasZeroLine",R.components.filter((e=>"zeroLine"===e.key)).length>0),lD.cacheProperties({viewCache:y,layout:u}),o.effect&&u.effectProperties?o.effect.update(u,e,{encodings:M}):u.effectPath||e.brush("highlight").end()}),[t,h,o.direction,o.effectProperties,f,c.name(),l.language()])}function zJ({instance:t,services:n}){const r=e.useElement(),i=e.useStaleLayout();e.onTakeSnapshot((e=>{if(!(i.snapshotData&&i.snapshotData.content&&i.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(e,r),t&&n))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:by(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:e,chart:t.chart,colorService:n.colorService,viewState:t.viewState})})),e.useImperativeHandle((()=>({getViewState:()=>({rotation:t.viewState.get("rotation"),legendScrollOffset:by(t.chart,"legend-cat")})})),[t])}var FJ={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,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=u(d,n),d!==(i=u(t,n))&&(h&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(h,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,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=u(d,n),d!==(i=u(t,n))&&(h&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(h,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o=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},a=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},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(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 d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function p(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function v(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=y(u(r[0],i),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),p=h(0),m=h(1),g=y(d,p),v=y(f,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var w={isFullRange:d,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(p(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),f=h(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,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===x({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=h(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:p,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:u,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=x({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function k(e){return(k="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})(e)}var C=i.a.bind(null,!0),S={},E=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===k(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 _(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(M(e)&&M(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(E(e)&&E(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}S.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?C({},{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}):M(o)&&M(a)?r=r.concat(S.generate(a,o,s)):E(o)&&E(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(S.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},S.apply=function(e,t){t.forEach((function(t){var n,r=_(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(E(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(E(o)&&E(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(M(o)&&M(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!D(n,e)&&delete n[e]})),C(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var c=_(e,t.from);E(r)?r.splice(+i,0,c.splice(+a,1)[0]):(r[i]=c[a],delete c[a])}else"remove"===t.op&&(E(r)?r.splice(+i,1):delete r[i])}))},S.clone=function(e){return C({},e)},S.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},S.updateObject=function(e,t){Object.keys(e).length?S.apply(e,S.generate(e,t)):C(e,t)};var q=S,R=function(e,t,n){if(!e)return Promise.resolve();var r=q.generate(t,n);return i()(!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()},P="accumulation";function A(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===P)return n[r]}function I(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===P)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var O={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},L={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.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,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),f=w.getAboveComp(n,l,u,d),p=w.getRangeComp("RangeSum",f);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(p,h,m);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return p},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,O)},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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(I(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(I(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(I(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(I(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=A(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=A(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(I(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(P))return!1;var o=A(t,e);return o&&!o.disabled}}}},z="movingAverage";function F(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function j(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},B={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.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,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:i,layout:o}));var u=a(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),p=w.getNumStepComp(r,c),h=w.getAboveComp(r,c,f,p);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.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(w.needDimension({modifier:r,properties:i,layout:o})){var v=w.getDimComp(u,1),b=w.getDimComp(u,0),x=w.getAggrComp(y,v,b);y=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(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(j(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(j(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(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=F(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=F(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=F(t,e);return o&&!o.disabled}}}},V="difference";function W(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===V)return n[r]}function $(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===V)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var U={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var p=w.getDimComp(c,1),h=w.getDimComp(c,0),m=w.getAggrComp(f,p,h);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(U).forEach((function(t){void 0===e[t]&&(e[t]=U[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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(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($(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($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=W(t,e);return o&&!o.disabled}}}},X={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},K={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},G="normalization";function Z(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===G)return n[r]}function J(e,t){var n=function(e,t){var n=a(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}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:K.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:K.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:K.DISREGARD_ALL_DIMENSIONS,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,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,o)}function te(e,t,n){var r=[{value:X.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:X.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:X.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:K.DISREGARD_ALL_DIMENSIONS,selectionScope:X.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function ie(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=re(t),l=ie(t,n,r),c=""===s&&""===l?"":s||l,u=oe(i,o),d=ae(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(J(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:X.DISREGARD_SELECTION,options:function(n){return te(n,t,e)}},field:{refFn:function(t){return"".concat(J(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 Z(t,e).selectionScope===X.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(J(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===X.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(J(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(J(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(Z(t,e).dimensionalScope||0)===K.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.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=Z(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(o(e,"qDef.base.qDef",a(e,"qDef.qDef")),o(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),o(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),o(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(o(e,"qDef.qDef",a(e,"qDef.base.qDef")),o(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),o(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),o(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&o(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ue=ce;function de(e){return(de="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})(e)}var fe={accumulation:L,movingAverage:B,difference:Y,normalization:se},pe=(t.default={modifiers:fe,apply:he,applyModifiers:me,cleanUpMeasure:ge,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:ye,getActiveModifier:ve,initBase:ue.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return fe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return fe[e]&&fe[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=we(e);De({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Pe({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:be},{});function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,o=void 0!==r&&r,s=e.masterItem;pe[t.id]=pe[t.id]||{isFirstTime:!0};var l=pe[t.id].isFirstTime;if(pe[t.id].isFirstTime=!1,n&&"object"===de(n))return me({model:t,properties:n});var c=t?t.layout:void 0,u=a(c,"qSelectionInfo.qInSelections");if(o||u)return Promise.resolve(!1);var d=a(c,"qHyperCube.qMeasureInfo"),f=pe[t.id].lastReloadTime;if(pe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:d,layout:c})){var p=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(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 Te({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:d,layout:c,model:t,lastReloadTime:f});return p||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 De({modifiers:we(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:d,layout:c,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);Ce(n);var r=Ae(n);return _e({model:t}).then((function(i){return Ne({libraryIds:r,model:t}).then((function(r){return p&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Te({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===de(e)&&!e.disabled){if(n++,"object"!==de(fe[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=fe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ee(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),me({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===de(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ae(n);return Ie({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Re({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function me(e){var t=e.model,n=e.oldProperties,r=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?i()(!0,{},r):r),Ce(r);var f=Ae(r);return Ie({model:t,libraryIds:f,masterItem:c}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=o?void 0:Ae(n);return _e({model:r,dimensionAndFieldList:s}).then((function(e){return Ne({libraryIds:l,model:r,libraryItemsProps:o}).then((function(r){t.forEach((function(t){De({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;ue.isValid(t)||ue.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(fe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");fe[e.type].initModifier(e);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=fe[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:o}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof fe[n.type].updateModifier&&fe[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=fe[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:o});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||a,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||be(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&be(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}),Se(t)):ge(t)}))}))}))}({measures:o,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Re({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=we(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!fe[e.type]}))}(e)?ue.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Se(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return De({modifiers:we(e),properties:n,layout:r})}))}function ve(e){var t=we(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(fe[r.type]&&!r.disabled)return r}}function be(e){var t=ve(e);return!t||fe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function we(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ke(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ce(e){xe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&ke(t)!==e.qDef.qDef?delete e.qDef.base:!ue.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Se(e){var t=we(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!fe[t.type]&&ke(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ee(e){return e.base||e.qDef&&e.qDef.base}function Me(e){var t=Ee(e);return e.qLibraryId||t&&t.qLibraryId}function Te(e){var t=e.measure,n=e.properties,r=e.layout;return!Me(t)&&De({modifiers:we(t),properties:n,layout:r})}function De(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!fe[e.type])&&(void 0===i[e.type]&&(i[e.type]=fe[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function _e(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 Ne(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}))}function qe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Re(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),qe)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),qe)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),qe)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),qe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):R(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Pe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&fe[e.type]&&fe[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ae(e){var t=xe(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=we(t);if(De({modifiers:r,properties:e})){var o=Me(t);o&&n.push(o),i=i||Pe({modifiers:r,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Ie(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&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={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}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}),Object.keys(r).forEach((function(e){i[e]||o[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(u(e,"getMeasure"))})),Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return he({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),pe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function i(e){return(i="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})(e)}n.r(t);var o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.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)?s(e,t):void 0}}(e)||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.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.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)?c(e,t):void 0}}(e)||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.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u},f=n(1),p=n.n(f),h={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){p.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function m(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var w=Math.pow(2,53)-1;function k(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.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)?C(e,t):void 0}}(e)||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.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.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)?E(e,t):void 0}}(e)||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.")}()}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M={importCommonProperties:function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=v(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=b(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=x(a.max,i.dimensions.length,w),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,w),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=y()(!0,{},n,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=k(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=S(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&p.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function T(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var D={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h.addDimensions({exportFormat:i,qHyperCubeDef:l}),h.addMeasures({exportFormat:i,qHyperCubeDef:l}),h.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,h.copyProperties({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),h.updateLayoutExclude({exportFormat:i,properties:a}),r||h.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(m(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(m(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(m(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,p=e.isHCModifierSupported,h=void 0===p||p,m={qChildren:[]},g=M.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=M.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,w=b.minDimensions,k=b.maxMeasures,C=b.minMeasures,S=l.defaultDimension,E=void 0===S?M.getDefaultDimension():S,D=l.defaultMeasure,_=void 0===D?M.getDefaultMeasure():D;v.qDimensions.length=0,v.qMeasures.length=0,M.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:C})&&M.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:C,newHyperCubeDef:v}),M.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:E}),M.addMeasures({exportFormat:t,maxMeasures:k,minMeasures:C,newHyperCubeDef:v,defaultMeasure:_}),M.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),M.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),M.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),M.copyPropertyIfExist("qMaxStackedCells",y,v),M.copyPropertyIfExist("qNoOfLeftDims",y,v),M.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M.copyPropertyOrSetDefault("qMode",y,v,"S"),M.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),M.copyPropertyOrSetDefault("qSortbyYValue",y,v),M.copyPropertyOrSetDefault("qIndentMode",y,v),M.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),M.importCommonProperties(g,t,r),m.qProperty=g;var N=o.getValue(u||{},"support.modifiers");return M.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:N}),f&&T(m.qProperty,"storedFilters"),"S"===v.qMode&&h&&T(m.qProperty,"dynamicScript"),m}},_={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function N(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function q(e,t){return e.length!==t}var R={create:function(e,t){if(!e||!_[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(N(a,t,r,i),q(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},P={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},A={colorModeOptions:{primary:function(){return!0},dimension:function(e){return P.getNumDimensions(e)>0&&P.getNumMeasures(e)<=1},multiColor:function(e){return P.getNumMeasures(e)>1},measure:function(e){return P.getNumDimensions(e)>0},expression:function(e){return P.getNumMeasures(e)>=1}}},I={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return P.getNumMeasures(e)>=1}}},O={scatterplot:I,"sn-scatter-plot":I,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return P.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return P.getNumDimensions(e)>1},multiColor:function(e){return P.getNumMeasures(e)>1},measure:function(e){return P.getNumDimensions(e)<=1},expression:function(e){return P.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return P.getNumDimensions(e)>=1},multiColor:function(e){return P.getNumMeasures(e)>1},measure:function(e){return P.getNumDimensions(e)>=1},expression:function(e){return P.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return P.getNumDimensions(e)>=1}}}};function L(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function z(e,t){var n=R.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){L(e,"qAttributeDimensions",n),L(e,"qAttributeExpressions",n)})),t.forEach((function(e){L(e,"qAttributeDimensions",n),L(e,"qAttributeExpressions",n)}))}function F(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function j(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;z(r,i);var l=r[r.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var p=R.create(R.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:p,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:p,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(p.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(p)):l.qAttributeExpressions.push(p)}}}function H(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(i=function(e,t){return t?e.qLibraryId:p.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return p.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var B={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function V(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=P.getItemLabel(t);switch(F(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||P.wrapFieldName(t.name),key:P.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&B.useMasterNumberFormat(o.formatting)}r||(o.auto=!1,o.mode=a)}function W(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=R.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return V(e,H("dimension",!!a,a||r)),!!a}function $(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&F(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=H("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,V(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&W(e,t))return;j({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}function U(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&F(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=H("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,V(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=R.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return V(e,H("measure",!!s,s||r[0])),!!s}(e,t))return;j({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(O[t]||A).colorModeOptions||A.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},updateColorBy:function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"color.auto"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?z(i,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:i})?$(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:r,colorMode:n,dimensions:i,measures:a,properties:e})?U(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),z(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},addColorByExpression:function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n}},X={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=D.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=R.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return R.moveByIdFromGroup(a,[],"qAttributeDimensions",c),R.moveByIdFromGroup(a,[],"qAttributeExpressions",c),R.moveByIdFromGroup(s,[],"qAttributeExpressions",u),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=D.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),p=o.getValue(d,"qHyperCubeDef.qDimensions",[]),h=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=Y.getCanColorBy(d,f),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:m,colorMode:h,dimensions:p});return g[h]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:d})&&Y.addColorByExpression(d):Y.switchToAutoColor(d),y&&Y.updateColorBy(d,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(d)&&Y.changeProperty(d,"color.persistent",!0),Y.deleteTotalMode(p),u}},K=["bar","marker","line"],G={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?T(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):T(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),K.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=X.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(m(s,"measureAxis.min","supportedAutoMinMax"),m(s,"measureAxis.max","supportedAutoMinMax")):(m(s,"measureAxis.min","unsupportedAutoMinMax"),m(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=X.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return G.handleAutoMinMax({initialProperties:n,properties:d}),G.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:d,measureType:a}),G.setInterColumnSortOrder(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function J(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Q(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var c=J(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=J(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},quarantineAlternative:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:D,colorChart:X,axisChart:Z,quarantineProperty:m,unquarantineProperty:T,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}])}(FJ);var jJ=r(FJ.exports);const HJ={setValue(e,t,n){if(!t)return;const r=t.split(".");let i=e;const o=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==i[r[a]]&&(i[r[a]]=Number.isNaN(+r[a+1])?{}:[]),i=i[r[a]];void 0!==n?i[o]=n:delete i[o]},getValue(e,t,n){const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(null==o[r[i]])return n;o=o[r[i]]}return o}},BJ={getDimensions:e=>HJ.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>HJ.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>HJ.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>HJ.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=HJ.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=HJ.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const VJ={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>BJ.getNumMeasures(e)>=1},showLegend:e=>{const t=HJ.getValue(e,"color.auto"),n=HJ.getValue(e,"color.expressionIsColor"),r=HJ.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!HJ.getValue(e,"color.auto")&&"byDimension"===HJ.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===HJ.getValue(e,"color.useDimColVal")&&HJ.setValue(e,"color.useDimColVal",!1),!HJ.getValue(e,"color.auto")&&"byDimension"===HJ.getValue(e,"color.mode")&&"libraryItem"===HJ.getValue(e,"color.byDimDef.type"))},WJ=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:i}=VJ;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!HJ.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:i,showTitle:{show(e){const t=HJ.getValue(e,"color.auto");return HJ.getValue(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===HJ.getValue(e,"color.mode")&&!0===HJ.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>HJ.getValue(e,"legend.show")&&i(e)}}};function $J(e){return new WJ(e)}const UJ={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"piechart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.PieChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"items",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{translation:"LayerStyleEditor.style.strokeWidth",ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{component:"items",translation:"LayerStyleEditor.style.cornerRadius",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",translation:"LayerStyleEditor.style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"items",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",translation:"LayerStyleEditor.style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},YJ=(e,t,n)=>{const r=e+".fontFamily",i=e+".fontSize";return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:e+".color",defaultValue:()=>({color:n.getStyle("object.pieChart",e,"color")})}}}}},XJ={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slices:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,n)=>n.layout.donut.showAsDonut}}}}},KJ=(e,t,n,r)=>{const i=function(e){var t=e.theme,n=e.translator,r=e.config,i=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:void 0===r?{}:r}),o=i.id,a=i.paths,s={};a.forEach((function(e){for(var r=e.split("."),i=s,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=oD({theme:t,translator:n,id:o,path:e}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var l=function(e){for(var t=e.split("."),n=s,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return s.getDefaultValue=function(e){return l(e).getDefaultValue()},s.getOptions=function(e){return l(e).getOptions()},s}({theme:r,translator:n,config:{id:"pieChart",paths:["axis.title","label.name","label.value"]}});return{component:"styling-panel",chartTitle:"Object.PieChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:e,items:{strokeSection:{translation:"properties.Outline",component:"panel-section",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{translation:"LayerStyleEditor.style.cornerRadius",component:"panel-section",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"panel-section",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}},axisTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionlabels",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:YJ("axis.title",i,r)}}}:void 0,labelNameSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionValueLabel",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:YJ("label.name",i,r)}}}:void 0,labelValueSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.value.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:YJ("label.value",i,r)}}}:void 0}}},GJ=$J("hard");const ZJ=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(FS(e,"color.mode","byDimension"),FS(e,"color.byDimDef.activeDimensionIndex",0),FS(e,"color.persistent",!1))},JJ=e=>{var t;const n=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(null===(t=e.color)||void 0===t?void 0:t.mode){case"byMultiple":n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"});break;case"byMeasure":n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":n.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return n},QJ=e=>{var t;const{flags:n,translator:r}=e||{},i=null==e||null===(t=e.sense)||void 0===t?void 0:t.theme,o=null==n?void 0:n.isEnabled("SENSECLIENT_IM_2429_PIECHART_BG"),a={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?r.get("Simple.Color.Auto",r.get("properties.colorMode.byDimension")):r.get("Common.Custom")},change:ZJ},colorMode:{options:JJ}}}}},s={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||FS(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,i){i.dimensionTitle=!e}}}}}}};return{uses:"settings",items:{simpleStyling:null!=n&&n.isEnabled("PIECHART_SIMPLE_STYLING")?UJ:void 0,simpleLabels:s,general:{items:{showDisclaimer:null!=n&&n.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:null!=n&&n.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_PIECHART")?KJ(o,n,r,i):XJ,showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:GJ.color.colorMode.options},persistentColors:{show:GJ.color.persistentColors.show}}},simpleColors:a,legend:{show:GJ.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:GJ.legend.showTitle.show},dock:{show:GJ.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},eQ={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},tQ={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},nQ={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function rQ(e){return{type:"items",component:"accordion",items:{data:eQ,sorting:tQ,addons:nQ,settings:QJ(e)}}}const iQ=$J("explore"),oQ=rQ();var aQ={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:oQ.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:oQ.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:iQ.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&iQ.color.useDimColVal.show(e))}}}}}}};const sQ="slices";function lQ(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function cQ(e){return e.data.num.label}function uQ(e){return e.data.radius.label}function dQ(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?cQ:lQ;if("share"===e.dataPoint.labelMode)return lQ;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?uQ:cQ;return cQ}(n,r)(e,t)}function fQ(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=n.substr(0,t-3)+"..."),n}(e.data.label,20):"",t}class pQ{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const i=e.find(".effectLayer");i.length>0&&i.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),i=n.map((n=>{const{start:i,end:o,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,c=n.element.getBoundingClientRect(),u=(i+o)/2,d=c.left-r.left+l.x*(s.x+a*Math.sin(u)),f=c.top-r.top+l.y*(s.y-a*Math.cos(u)),p=Math.cos(u)>0?"top":"bottom",h=Math.sin(u)>0?"right":"left";return{title:fQ(n),label:dQ(n,this.chart.formatter,e,t),orientation:`${p}${h}`,position:{x:d,y:f}}}));this.Flag.show(this.effectLayer,i)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=uy(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=uy(e.options,{effect:null}),n?t.getProperties().then((e=>uy(e,{effectPath:null,effectProperties:null,dataPoint:uy(!0,{},e.originalModelSettings.dataPoint),legend:uy(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class hQ extends pQ{init(e,t,n,r){return e.options=uy(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(sQ).data.items,n=e.effectProperties.min,r=e.effectProperties.max,i=[];let o=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const i=e.num.value;n&&i<o[0]&&(o=[i,t]),r&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class mQ extends pQ{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component(sQ).data.items.map((e=>e.value)).indexOf(n.data.value);-1!==r&&(this.selectedIndex=r,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(sQ).data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>e.key===sQ)).map(((n,r)=>{const i=dQ(n,this.chart.formatter,e,t);return{text:`${fQ(n)} (${i})`,value:r}}))}init(e,t,n,r){return e.options=uy(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}const gQ="/effects/highlight-value",yQ="/effects/maxmin";var vQ={isCompatible:({effectPath:e})=>e===yQ||e===gQ,create:e=>e.effectPath===yQ?new hQ(e):e.effectPath===gQ?new mQ(e):null};function bQ(e){const t={},{components:n,tooltip:r}=e,i=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((e=>{t["chart_style_"+e]=i.style[e]})),r){var o,a;t.chart_tooltip_custom=!r.auto;const e=null===(o=r.chart)||void 0===o||null===(a=o.object)||void 0===a?void 0:a.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function xQ(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function wQ(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function kQ({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){wQ(e),xQ(t),WZ.addCallbackCustomTooltip(t)},move(e,t){wQ(e),xQ(t),WZ.moveCallbackCustomTooltip(t,e)},remove(e,t){WZ.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){wQ(e),xQ(r),WZ.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){xQ(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const CQ=e=>e.qMax<=0,SQ=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(CQ));function EQ(e){return{definition:rQ(e),softDefinition:aQ,support:{snapshot:SQ,export:SQ,exportData:!0,sharing:SQ,viewData:!0,effects:!0},effects:vQ,extendMetrics:bQ,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=jJ.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:kQ(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>jJ.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function MQ(e){return{properties:{version:"1.24.5",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:oJ.STROKE.COLOR},cornerRadius:oJ.CORNER_RADIUS,innerRadius:oJ.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!0,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[kQ(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const i=jJ.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:kQ(e),hypercubePath:r});return i.qProperty.dataPoint&&!1===i.qProperty.dataPoint.show&&delete i.qProperty.dataPoint.show,i},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>jJ.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}return n=>{const{flags:r}=n;!function(e){if(e&&e.get&&e.add){const n="Object.Disclaimer.LimitedData";if(e.get(n)!==n)return;Object.keys(t).forEach((n=>{e.add(t[n])}))}}(n.translator);const i=EZ();return{qae:MQ(n),ext:EQ(n),component(){const t=NZ({picasso:i}),n=tJ({flags:r,picasso:i,instance:t});LJ({instance:t,services:n,picasso:i,flags:r}),function({instance:t}){const n=e.useStaleLayout(),r=e.useOptions(),i=e.useRect();e.useEffect((()=>{if(!t||!t.generateSettings)return;const{viewCache:e,chart:i,generateSettings:o}=t;i.update({settings:o()}),e.set("chartWidth",i.element.clientWidth),e.set("chartHeight",i.element.clientHeight),r.effect&&r.effect.update(n,i)}),[i.width,i.height])}({instance:t}),zJ({instance:t,services:n})}}}}));
|
|
82
|
+
*/var XY=UY&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),YY))}};function KY(e){return e&&"[object Function]"==={}.toString.call(e)}function GY(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function ZY(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function JY(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=GY(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:JY(ZY(e))}function QY(e){return e&&e.referenceNode?e.referenceNode:e}var eX=UY&&!(!window.MSInputMethodContext||!document.documentMode),tX=UY&&/MSIE 10/.test(navigator.userAgent);function nX(e){return 11===e?eX:10===e?tX:eX||tX}function rX(e){if(!e)return document.documentElement;for(var t=nX(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===GY(n,"position")?rX(n):n:e?e.ownerDocument.documentElement:document.documentElement}function iX(e){return null!==e.parentNode?iX(e.parentNode):e}function oX(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&rX(a.firstElementChild)!==a?rX(l):l;var c=iX(e);return c.host?oX(c.host,t):oX(e,iX(t).host)}function aX(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function sX(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=aX(t,"top"),i=aX(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function lX(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function cX(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],nX(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function uX(e){var t=e.body,n=e.documentElement,r=nX(10)&&getComputedStyle(n);return{height:cX("Height",t,n,r),width:cX("Width",t,n,r)}}var dX=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},fX=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),pX=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},hX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function mX(e){return hX({},e,{right:e.left+e.width,bottom:e.top+e.height})}function gX(e){var t={};try{if(nX(10)){t=e.getBoundingClientRect();var n=aX(e,"top"),r=aX(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?uX(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=GY(e);l-=lX(u,"x"),c-=lX(u,"y"),i.width-=l,i.height-=c}return mX(i)}function yX(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=nX(10),i="HTML"===t.nodeName,o=gX(e),a=gX(t),s=JY(e),l=GY(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=mX({top:o.top-a.top-c,left:o.left-a.left-u,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!r&&i){var f=parseFloat(l.marginTop,10),p=parseFloat(l.marginLeft,10);d.top-=c-f,d.bottom-=c-f,d.left-=u-p,d.right-=u-p,d.marginTop=f,d.marginLeft=p}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=sX(d,t)),d}function vX(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=yX(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:aX(n),s=t?0:aX(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return mX(l)}function bX(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===GY(e,"position"))return!0;var n=ZY(e);return!!n&&bX(n)}function xX(e){if(!e||!e.parentElement||nX())return document.documentElement;for(var t=e.parentElement;t&&"none"===GY(t,"transform");)t=t.parentElement;return t||document.documentElement}function wX(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?xX(e):oX(e,QY(t));if("viewport"===r)o=vX(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=JY(ZY(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=yX(s,a,i);if("HTML"!==s.nodeName||bX(a))o=l;else{var c=uX(e.ownerDocument),u=c.height,d=c.width;o.top+=l.top-l.marginTop,o.bottom=u+l.top,o.left+=l.left-l.marginLeft,o.right=d+l.left}}var f="number"==typeof(n=n||0);return o.left+=f?n:n.left||0,o.top+=f?n:n.top||0,o.right-=f?n:n.right||0,o.bottom-=f?n:n.bottom||0,o}function kX(e){return e.width*e.height}function CX(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=wX(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return hX({key:e},s[e],{area:kX(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function SX(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?xX(t):oX(t,QY(n));return yX(n,i,r)}function EX(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function MX(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function TX(e,t,n){n=n.split("-")[0];var r=EX(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[c]:t[MX(s)],i}function DX(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function _X(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=DX(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&KY(n)&&(t.offsets.popper=mX(t.offsets.popper),t.offsets.reference=mX(t.offsets.reference),t=n(t,e))})),t}function NX(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=SX(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=CX(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=TX(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=_X(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function qX(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function RX(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function PX(){return this.state.isDestroyed=!0,qX(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[RX("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function AX(e){var t=e.ownerDocument;return t?t.defaultView:window}function IX(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||IX(JY(o.parentNode),t,n,r),r.push(o)}function OX(e,t,n,r){n.updateBound=r,AX(e).addEventListener("resize",n.updateBound,{passive:!0});var i=JY(e);return IX(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function LX(){this.state.eventsEnabled||(this.state=OX(this.reference,this.options,this.state,this.scheduleUpdate))}function zX(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,AX(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function FX(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function jX(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&FX(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var HX=UY&&/Firefox/i.test(navigator.userAgent);function BX(e,t,n){var r=DX(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var VX=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],WX=VX.slice(3);function $X(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=WX.indexOf(e),r=WX.slice(n+1).concat(WX.slice(0,n));return t?r.reverse():r}var UX="flip",YX="clockwise",XX="counterclockwise";function KX(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(DX(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return mX(s)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){FX(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var GX={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:pX({},l,o[l]),end:pX({},l,o[l]+o[c]-a[c])};e.offsets.popper=hX({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],l=void 0;return l=FX(+n)?[+n,0]:KX(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||rX(e.instance.popper);e.instance.reference===n&&(n=rX(n));var r=RX("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=wX(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),pX({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),pX({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=hX({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[c]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!BX(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),f=l?"left":"top",p=l?"bottom":"right",h=EX(r)[c];s[p]-h<a[d]&&(e.offsets.popper[d]-=a[d]-(s[p]-h)),s[d]+h>a[p]&&(e.offsets.popper[d]+=s[d]+h-a[p]),e.offsets.popper=mX(e.offsets.popper);var m=s[d]+s[c]/2-h/2,g=GY(e.instance.popper),y=parseFloat(g["margin"+u],10),v=parseFloat(g["border"+u+"Width"],10),b=m-e.offsets.popper[d]-y-v;return b=Math.max(Math.min(a[c]-h,b),0),e.arrowElement=r,e.offsets.arrow=(pX(n={},d,Math.round(b)),pX(n,f,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(qX(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=wX(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=MX(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case UX:a=[r,i];break;case YX:a=$X(r);break;case XX:a=$X(r,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],i=MX(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,f="left"===r&&d(c.right)>d(u.left)||"right"===r&&d(c.left)<d(u.right)||"top"===r&&d(c.bottom)>d(u.top)||"bottom"===r&&d(c.top)<d(u.bottom),p=d(c.left)<d(n.left),h=d(c.right)>d(n.right),m=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),y="left"===r&&p||"right"===r&&h||"top"===r&&m||"bottom"===r&&g,v=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(v&&"start"===o&&p||v&&"end"===o&&h||!v&&"start"===o&&m||!v&&"end"===o&&g),x=!!t.flipVariationsByContent&&(v&&"start"===o&&h||v&&"end"===o&&p||!v&&"start"===o&&g||!v&&"end"===o&&m),w=b||x;(f||y||w)&&(e.flipped=!0,(f||y)&&(r=a[l+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=hX({},e.offsets.popper,TX(e.instance.popper,e.offsets.reference,e.placement)),e=_X(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=MX(t),e.offsets.popper=mX(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!BX(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=DX(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=DX(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=rX(e.instance.popper),l=gX(s),c={position:i.position},u=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},l=o(i.width),c=o(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),f=t?u||d||l%2==c%2?o:a:s,p=t?o:s;return{left:f(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:p(r.top),bottom:p(r.bottom),right:f(r.right)}}(e,window.devicePixelRatio<2||!HX),d="bottom"===n?"top":"bottom",f="right"===r?"left":"right",p=RX("transform"),h=void 0,m=void 0;if(m="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,h="right"===f?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&p)c[p]="translate3d("+h+"px, "+m+"px, 0)",c[d]=0,c[f]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,y="right"===f?-1:1;c[d]=m*g,c[f]=h*y,c.willChange=d+", "+f}var v={"x-placement":e.placement};return e.attributes=hX({},v,e.attributes),e.styles=hX({},c,e.styles),e.arrowStyles=hX({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return jX(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&jX(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=SX(i,t,e,n.positionFixed),a=CX(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),jX(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ZX=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};dX(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=XY(this.update.bind(this)),this.options=hX({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(hX({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){r.options.modifiers[t]=hX({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return hX({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&KY(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return fX(e,[{key:"update",value:function(){return NX.call(this)}},{key:"destroy",value:function(){return PX.call(this)}},{key:"enableEventListeners",value:function(){return LX.call(this)}},{key:"disableEventListeners",value:function(){return zX.call(this)}}]),e}();function JX(e){return"function"==typeof e?e():e}ZX.Utils=("undefined"!=typeof window?window:global).PopperUtils,ZX.placements=VX,ZX.Defaults=GX;var QX="undefined"!=typeof window?o_.useLayoutEffect:o_.useEffect,eK={},tK=o_.forwardRef((function(e,t){var n=e.anchorEl,r=e.children,i=e.container,o=e.disablePortal,a=void 0!==o&&o,s=e.keepMounted,l=void 0!==s&&s,c=e.modifiers,u=e.open,d=e.placement,f=void 0===d?"bottom":d,p=e.popperOptions,h=void 0===p?eK:p,m=e.popperRef,g=e.transition,y=void 0!==g&&g,v=q_(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=o_.useRef(null),x=EV(b,t),w=o_.useRef(null),k=EV(w,m),C=o_.useRef(k);QX((function(){C.current=k}),[k]),o_.useImperativeHandle(m,(function(){return w.current}),[]);var S=o_.useState(!0),E=S[0],M=S[1],T=function(e){if("rtl"!==("undefined"!=typeof window&&document.body.getAttribute("dir")||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(f),D=o_.useState(T),_=D[0],N=D[1],q=o_.useCallback((function(){if(b.current&&n&&u){w.current&&(w.current.destroy(),C.current(null));var e=function(e){N(e.placement)};JX(n);var t=new ZX(JX(n),b.current,__({placement:T},h,{modifiers:__({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},h.modifiers),onCreate:D$(e,h.onCreate),onUpdate:D$(e,h.onUpdate)}));C.current(t)}}),[n,a,c,u,T,h]),R=o_.useCallback((function(e){SV(x,e),q()}),[x,q]),P=function(){w.current&&(w.current.destroy(),C.current(null))};if(o_.useEffect((function(){q()}),[q]),o_.useEffect((function(){return function(){P()}}),[]),o_.useEffect((function(){u||y||P()}),[u,y]),!l&&!u&&(!y||E))return null;var A={placement:_};return y&&(A.TransitionProps={in:u,onEnter:function(){M(!1)},onExited:function(){M(!0),P()}}),o_.createElement(T$,{disablePortal:a,container:i},o_.createElement("div",__({ref:R,role:"tooltip"},v,{style:__({position:"fixed",top:0,left:0},v.style)}),"function"==typeof r?r(A):r))})),nK=jW(o_.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),rK=jW(o_.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),iK=o_.createElement(nK,null);var oK=eA((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes;return o_.createElement("div",{className:IP(n.root,t&&n.checked)},iK,o_.createElement(rK,{className:n.layer}))})),aK=o_.createContext(),sK=o_.createElement(oK,{checked:!0}),lK=o_.createElement(oK,null),cK=o_.forwardRef((function(e,t){var n=e.checked,r=e.classes,i=e.color,o=void 0===i?"secondary":i,a=e.name,s=e.onChange,l=q_(e,["checked","classes","color","name","onChange"]),c=o_.useContext(aK),u=n,d=D$(s,c&&c.onChange),f=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===f&&(f=c.name)),o_.createElement(s$,__({color:o,type:"radio",icon:lK,checkedIcon:sK,classes:{root:IP(r.root,r["color".concat(tA(o))]),checked:r.checked,disabled:r.disabled},name:f,checked:u,onChange:d,ref:t},l))}));function uK(e,t){return"object"===P_(t)&&null!==t?e===t:String(e)===String(t)}eA((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:E_(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:E_(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})(cK),o_.forwardRef((function(e,t){var n=e.actions,r=e.children,i=e.name,o=e.value,a=e.onChange,s=q_(e,["actions","children","name","value","onChange"]),l=o_.useRef(null),c=o_.useRef(null!=o).current,u=o_.useState((function(){return c?null:e.defaultValue})),d=u[0],f=u[1];o_.useImperativeHandle(n,(function(){return{focus:function(){var e=l.current.querySelector("input:not(:disabled):checked");e||(e=l.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var p={name:i,onChange:function(e){c||f(e.target.value),a&&a(e,e.target.value)},value:c?o:d},h=EV(t,l);return o_.createElement(DU,__({role:"radiogroup",ref:h},s),o_.createElement(aK.Provider,{value:p},r))})),o_.Component;var dK=o_.forwardRef((function(e,t){var n=e.autoFocus,r=e.autoWidth,i=e.children,o=e.classes,a=e.className,s=e.defaultValue,l=e.disabled,c=e.displayEmpty,u=e.labelId,d=e.IconComponent,f=e.inputRef,p=e.MenuProps,h=void 0===p?{}:p,m=e.multiple,g=e.name,y=e.onBlur,v=e.onChange,b=e.onClose,x=e.onFocus,w=e.onOpen,k=e.open,C=e.readOnly,S=e.renderValue;e.required;var E=e.SelectDisplayProps,M=void 0===E?{}:E,T=e.tabIndex;e.type;var D=e.value,_=e.variant,N=void 0===_?"standard":_,q=q_(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","labelId","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),R=o_.useRef(null!=D).current,P=o_.useState(s),A=P[0],I=P[1],O=R?D:A,L=o_.useRef(null),z=o_.useState(null),F=z[0],j=z[1],H=o_.useRef(null!=k).current,B=o_.useState(),V=B[0],W=B[1],$=o_.useState(!1),U=$[0],Y=$[1],X=EV(t,f);o_.useImperativeHandle(X,(function(){return{focus:function(){F.focus()},node:L.current,value:O}}),[F,O]),o_.useEffect((function(){n&&F&&F.focus()}),[n,F]);var K,G,Z=function(e,t){e?w&&w(t):(F.focus(),b&&b(t)),H||(W(r?null:F.clientWidth),Y(e))},J=function(e){return function(t){var n;if(m||Z(!1,t),m){n=Array.isArray(O)?mR(O):[];var r=O.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;R||I(n),v&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),v(t,e))}},Q=null!==F&&(H?k:U);delete q["aria-invalid"];var ee=[],te=!1;(yU({value:O})||c)&&(S?K=S(O):te=!0);var ne=o_.Children.map(i,(function(e){if(!o_.isValidElement(e))return null;var t;if(m){if(!Array.isArray(O))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=O.some((function(t){return uK(t,e.props.value)})))&&te&&ee.push(e.props.children)}else(t=uK(O,e.props.value))&&te&&(G=e.props.children);return o_.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:J(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));te&&(K=m?ee.join(", "):G);var re,ie=V;!r&&H&&F&&(ie=F.clientWidth),re=void 0!==T?T:l?null:0;var oe=M.id||(g?"mui-component-select-".concat(g):void 0);return o_.createElement(o_.Fragment,null,o_.createElement("div",__({className:IP(o.root,o.select,o.selectMenu,o[N],a,l&&o.disabled),ref:j,tabIndex:re,role:"button","aria-expanded":Q?"true":void 0,"aria-labelledby":"".concat(u||""," ").concat(oe||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!C){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Z(!0,e))}},onClick:l||C?null:function(e){Z(!0,e)},onBlur:function(e){!Q&&y&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:O,name:g}}),y(e))},onFocus:x},M,{id:oe}),function(e){return null==e||"string"==typeof e&&!e.trim()}(K)?o_.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):K),o_.createElement("input",__({value:Array.isArray(O)?O.join(","):O,name:g,ref:L,type:"hidden",autoFocus:n},q)),o_.createElement(d,{className:IP(o.icon,o["icon".concat(tA(N))],Q&&o.iconOpen)}),o_.createElement(PY,__({id:"menu-".concat(g||""),anchorEl:F,open:Q,onClose:function(e){Z(!1,e)}},h,{MenuListProps:__({"aria-labelledby":u,role:"listbox",disableListWrap:!0},h.MenuListProps),PaperProps:__({},h.PaperProps,{style:__({minWidth:ie},null!=h.PaperProps?h.PaperProps.style:null)})}),ne))})),fK=FY,pK=o_.createElement(JU,null),hK=o_.createElement(kU,null),mK=o_.forwardRef((function e(t,n){var r=t.autoWidth,i=void 0!==r&&r,o=t.children,a=t.classes,s=t.displayEmpty,l=void 0!==s&&s,c=t.IconComponent,u=void 0===c?zY:c,d=t.id,f=t.input,p=t.inputProps,h=t.labelId,m=t.MenuProps,g=t.multiple,y=void 0!==g&&g,v=t.native,b=void 0!==v&&v,x=t.onClose,w=t.onOpen,k=t.open,C=t.renderValue,S=t.SelectDisplayProps,E=t.variant,M=void 0===E?"standard":E,T=t.labelWidth,D=void 0===T?0:T,_=q_(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),N=b?LY:dK,q=dU({props:t,muiFormControl:r$(),states:["variant"]}).variant||M,R=f||{standard:pK,outlined:o_.createElement($Y,{labelWidth:D}),filled:hK}[q];return o_.cloneElement(R,__({inputComponent:N,select:!0,inputProps:__({children:o,IconComponent:u,variant:q,type:void 0,multiple:y},b?{}:{autoWidth:i,displayEmpty:l,labelId:h,MenuProps:m,onClose:x,onOpen:w,open:k,renderValue:C,SelectDisplayProps:__({id:d},S)},{},p,{classes:p?fP({baseClasses:a,newClasses:p.classes,Component:e}):a},f?f.props.inputProps:{}),ref:n},_))}));mK.muiName="Select";var gK=eA(fK,{name:"MuiSelect"})(mK);var yK=eA((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:__({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,left:"calc(-50% + -4px)",transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,r=e.className,i=e.open,o=e.value,a=e.valueLabelDisplay;return"off"===a?t:o_.cloneElement(t,{className:IP(t.props.className,(i||"on"===a)&&n.open,n.thumb)},o_.createElement("span",{className:IP(n.offset,r)},o_.createElement("span",{className:n.circle},o_.createElement("span",{className:n.label},o))))}));function vK(e,t){return e-t}function bK(e,t,n){return e<t?t:e>n?n:e}function xK(e,t){return e.reduce((function(e,n,r){var i=Math.abs(t-n);return null===e||i<e.distance||i===e.distance?{distance:i,index:r}:e}),null).index}function wK(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function kK(e,t,n){return 100*(e-t)/(n-t)}function CK(e,t){var n=Math.round(e/t)*t;return Number(n.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}(t)))}function SK(e){var t=e.values,n=e.source,r=e.newValue,i=e.index;if(t[i]===r)return n;var o=mR(t);return o[i]=r,o}function EK(e){var t=e.sliderRef,n=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[data-index="'.concat(n,'"]')).focus(),r&&r(n)}var MK={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},TK=[],DK=function(e){return e},_K=o_.forwardRef((function(e,t){var n=e["aria-label"],r=e["aria-labelledby"],i=e["aria-valuetext"],o=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.component,u=void 0===c?"span":c,d=e.defaultValue,f=e.disabled,p=void 0!==f&&f,h=e.getAriaLabel,m=e.getAriaValueText,g=e.marks,y=void 0===g?TK:g,v=e.max,b=void 0===v?100:v,x=e.min,w=void 0===x?0:x,k=e.name,C=e.onChange,S=e.onChangeCommitted,E=e.onMouseDown,M=e.orientation,T=void 0===M?"horizontal":M,D=e.step,_=void 0===D?1:D,N=e.ThumbComponent,q=void 0===N?"span":N,R=e.track,P=void 0===R?"normal":R,A=e.value,I=e.ValueLabelComponent,O=void 0===I?yK:I,L=e.valueLabelDisplay,z=void 0===L?"off":L,F=e.valueLabelFormat,j=void 0===F?DK:F,H=q_(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),B=QP(),V=o_.useRef(null!=A).current,W=o_.useRef(),$=o_.useState(-1),U=$[0],Y=$[1],X=o_.useState(-1),K=X[0],G=X[1],Z=o_.useState(d),J=Z[0],Q=Z[1],ee=V?A:J,te=Array.isArray(ee),ne=o_.useRef(),re=te?mR(ee).sort(vK):[ee];re=re.map((function(e){return bK(e,w,b)}));var ie=!0===y&&null!==_?mR(Array(Math.floor((b-w)/_)+1)).map((function(e,t){return{value:w+_*t}})):y;ne.current={source:ee};var oe=UV(),ae=oe.isFocusVisible,se=oe.onBlurVisible,le=oe.ref,ce=o_.useState(-1),ue=ce[0],de=ce[1],fe=o_.useRef(),pe=EV(le,fe),he=EV(t,pe),me=AV((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));ae(e)&&de(t),G(t)})),ge=AV((function(){-1!==ue&&(de(-1),se()),G(-1)})),ye=AV((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));G(t)})),ve=AV((function(){G(-1)})),be=AV((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=re[n],i=(b-w)/10,o=ie.map((function(e){return e.value})),a=o.indexOf(r);switch(e.key){case"Home":t=w;break;case"End":t=b;break;case"PageUp":_&&(t=r+i);break;case"PageDown":_&&(t=r-i);break;case"ArrowRight":case"ArrowUp":t=_?r+_:o[a+1]||o[o.length-1];break;case"ArrowLeft":case"ArrowDown":t=_?r-_:o[a-1]||o[0];break;default:return}if(e.preventDefault(),_&&(t=CK(t,_)),t=bK(t,w,b),te){var s=t;t=SK({values:re,source:ee,newValue:t,index:n}).sort(vK),EK({sliderRef:fe,activeIndex:t.indexOf(s)})}V||Q(t),de(n),C&&C(e,t),S&&S(e,t)})),xe=o_.useRef(),we=T;"rtl"===B.direction&&"vertical"!==T&&(we+="-reverse");var ke=o_.useCallback((function(e){var t,n,r=e.finger,i=e.move,o=void 0!==i&&i,a=e.values,s=e.source,l=fe.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,f=l.left;if(t=0===we.indexOf("vertical")?(d-r.y)/u:(r.x-f)/c,-1!==we.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,w,b),_)n=CK(n,_);else{var p=ie.map((function(e){return e.value}));n=p[xK(p,n)]}n=bK(n,w,b);var h=0;if(te){var m=n;h=(n=SK({values:a,source:s,newValue:n,index:h=o?xe.current:xK(a,n)}).sort(vK)).indexOf(m),xe.current=h}return{newValue:n,activeIndex:h}}),[b,w,we,te,_,ie]),Ce=AV((function(e){var t=wK(e,W);if(t){var n=ke({finger:t,move:!0,values:re,source:ee}),r=n.newValue,i=n.activeIndex;EK({sliderRef:fe,activeIndex:i,setActive:Y}),V||Q(r),C&&C(e,r)}})),Se=AV((function(e){var t=wK(e,W);if(t){var n=ke({finger:t,values:re,source:ee}).newValue;Y(-1),"touchend"===e.type&&G(-1),S&&S(e,n),W.current=void 0,document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",Se),document.body.removeEventListener("mouseenter",Ee),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",Se)}})),Ee=AV((function(e){0===e.buttons&&Se(e)})),Me=AV((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(W.current=t.identifier);var n=wK(e,W),r=ke({finger:n,values:re,source:ee}),i=r.newValue,o=r.activeIndex;EK({sliderRef:fe,activeIndex:o,setActive:Y}),V||Q(i),C&&C(e,i),document.body.addEventListener("touchmove",Ce),document.body.addEventListener("touchend",Se)}));o_.useEffect((function(){var e=fe.current;return e.addEventListener("touchstart",Me),function(){e.removeEventListener("touchstart",Me),document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",Se),document.body.removeEventListener("mouseenter",Ee),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",Se)}}),[Ee,Se,Ce,Me]);var Te=AV((function(e){E&&E(e),e.preventDefault();var t=wK(e,W),n=ke({finger:t,values:re,source:ee}),r=n.newValue,i=n.activeIndex;EK({sliderRef:fe,activeIndex:i,setActive:Y}),V||Q(r),C&&C(e,r),document.body.addEventListener("mousemove",Ce),document.body.addEventListener("mouseenter",Ee),document.body.addEventListener("mouseup",Se)})),De=kK(te?re[0]:w,w,b),_e=kK(re[re.length-1],w,b)-De,Ne=__({},MK[we].offset(De),{},MK[we].leap(_e));return o_.createElement(u,__({ref:he,className:IP(o.root,o["color".concat(tA(l))],a,p&&o.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&o.marked,!1===P&&o.trackFalse,{vertical:o.vertical}[T],{inverted:o.trackInverted}[P]),onMouseDown:Te},H),o_.createElement("span",{className:o.rail}),o_.createElement("span",{className:o.track,style:Ne}),o_.createElement("input",{value:re.join(","),name:k,type:"hidden"}),ie.map((function(e){var t,n=kK(e.value,w,b),r=MK[we].offset(n);if(!1===P)t=-1!==re.indexOf(e.value);else{var i=te?e.value>=re[0]&&e.value<=re[re.length-1]:e.value<=re[0];t=i&&"normal"===P||!i&&"inverted"===P}return o_.createElement(o_.Fragment,{key:e.value},o_.createElement("span",{style:r,className:IP(o.mark,t&&o.markActive)}),o_.createElement("span",{"aria-hidden":!0,style:r,className:IP(o.markLabel,t&&o.markLabelActive)},e.label))})),re.map((function(e,t){var a=kK(e,w,b),s=MK[we].offset(a);return o_.createElement(O,{key:t,valueLabelFormat:j,valueLabelDisplay:z,className:o.valueLabel,value:"function"==typeof j?j(e,t):j,index:t,open:K===t||U===t||"on"===z,disabled:p},o_.createElement(q,{className:IP(o.thumb,o["thumbColor".concat(tA(l))],U===t&&o.active,p&&o.disabled,ue===t&&o.focusVisible),tabIndex:p?null:0,role:"slider",style:s,"data-index":t,"aria-label":h?h(t):n,"aria-labelledby":r,"aria-orientation":T,"aria-valuemax":b,"aria-valuemin":w,"aria-valuenow":e,"aria-valuetext":m?m(e,t):i,onKeyDown:be,onFocus:me,onBlur:ge,onMouseOver:ye,onMouseLeave:ve}))})))}));eA((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"11px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 11px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?T_(e.palette.primary.main,.62):M_(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',left:-18,top:-18,right:-18,bottom:-18},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(E_(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(E_(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(E_(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(E_(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:__({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:22,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:22,transform:"translateY(50%)"}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(_K);var NK=o_.forwardRef((function(e,t){var n=e.action,r=e.classes,i=e.className,o=e.message,a=e.role,s=void 0===a?"alert":a,l=q_(e,["action","classes","className","message","role"]);return o_.createElement(rA,__({component:LW,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:IP(r.root,i),ref:t},l),o_.createElement("div",{className:r.message},o),n?o_.createElement("div",{className:r.action},n):null)})),qK=eA((function(e){var t="light"===e.palette.type?.8:.98,n=S_(e.palette.background.default,t);return{root:D_({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(NK),RK=o_.forwardRef((function(e,t){var n=e.action,r=e.anchorOrigin,i=(r=void 0===r?{vertical:"bottom",horizontal:"center"}:r).vertical,o=r.horizontal,a=e.autoHideDuration,s=e.children,l=e.classes,c=e.className,u=e.ClickAwayListenerProps,d=e.ContentProps,f=e.disableWindowBlurListener,p=void 0!==f&&f,h=e.message,m=e.onClose,g=e.onEnter,y=e.onEntered,v=e.onEntering,b=e.onExit,x=e.onExited,w=e.onExiting,k=e.onMouseEnter,C=e.onMouseLeave,S=e.open,E=e.resumeHideDuration,M=e.TransitionComponent,T=void 0===M?VU:M,D=e.transitionDuration,_=void 0===D?{enter:xN.enteringScreen,exit:xN.leavingScreen}:D,N=e.TransitionProps,q=q_(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),R=o_.useRef(),P=o_.useState(!0),A=P[0],I=P[1],O=o_.useCallback((function(e){var t=null!=e?e:a;m&&null!=t&&(clearTimeout(R.current),R.current=setTimeout((function(){m&&null!=(null!=e?e:a)&&m(null,"timeout")}),t))}),[a,m]);o_.useEffect((function(){return S&&O(),function(){clearTimeout(R.current)}}),[S,O]);var L=function(){clearTimeout(R.current)},z=o_.useCallback((function(){if(null!=a){if(null!=E)return void O(E);O(.5*a)}}),[a,E,O]);return o_.useEffect((function(){if(!p&&S)return window.addEventListener("focus",z),window.addEventListener("blur",L),function(){window.removeEventListener("focus",z),window.removeEventListener("blur",L)}}),[p,z,S]),!S&&A?null:o_.createElement(k$,__({onClickAway:function(e){m&&m(e,"clickaway")}},u),o_.createElement("div",__({className:IP(l.root,l["anchorOrigin".concat(tA(i)).concat(tA(o))],c),onMouseEnter:function(e){k&&k(e),L()},onMouseLeave:function(e){C&&C(e),z()},ref:t},q),o_.createElement(T,__({appear:!0,in:S,onEnter:D$((function(){I(!1)}),g),onEntered:y,onEntering:v,onExit:b,onExited:D$((function(){I(!0)}),x),onExiting:w,timeout:_,direction:"top"===i?"down":"up"},N),s||o_.createElement(qK,__({message:h,action:n},d)))))}));eA((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},i={justifyContent:"flex-start"},o={top:24},a={bottom:24},s={right:24},l={left:24},c={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:__({},t,D_({},e.breakpoints.up("sm"),__({},o,{},c))),anchorOriginBottomCenter:__({},n,D_({},e.breakpoints.up("sm"),__({},a,{},c))),anchorOriginTopRight:__({},t,{},r,D_({},e.breakpoints.up("sm"),__({left:"auto"},o,{},s))),anchorOriginBottomRight:__({},n,{},r,D_({},e.breakpoints.up("sm"),__({left:"auto"},a,{},s))),anchorOriginTopLeft:__({},t,{},i,D_({},e.breakpoints.up("sm"),__({right:"auto"},o,{},l))),anchorOriginBottomLeft:__({},n,{},i,D_({},e.breakpoints.up("sm"),__({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(RK);var PK=o_.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=e.children,a=e.classes,s=e.className,l=e.completed,c=void 0!==l&&l,u=e.connector,d=e.disabled,f=void 0!==d&&d,p=e.index,h=e.last,m=e.orientation,g=q_(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return o_.createElement("div",__({className:IP(a.root,a[m],s,i&&a.alternativeLabel,c&&a.completed),ref:t},g),u&&i&&0!==p&&o_.cloneElement(u,{orientation:m,alternativeLabel:i,index:p,active:r,completed:c,disabled:f}),o_.Children.map(o,(function(e){return o_.isValidElement(e)?o_.cloneElement(e,__({active:r,alternativeLabel:i,completed:c,disabled:f,last:h,icon:p+1,orientation:m},e.props)):null})))}));eA({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(PK);var AK=jW(o_.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),IK=jW(o_.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),OK=o_.createElement("circle",{cx:"12",cy:"12",r:"12"}),LK=o_.forwardRef((function(e,t){var n=e.completed,r=void 0!==n&&n,i=e.icon,o=e.active,a=void 0!==o&&o,s=e.error,l=void 0!==s&&s,c=e.classes;return"number"==typeof i||"string"==typeof i?l?o_.createElement(IK,{className:IP(c.root,c.error),ref:t}):r?o_.createElement(AK,{className:IP(c.root,c.completed),ref:t}):o_.createElement(FW,{className:IP(c.root,a&&c.active),ref:t},OK,o_.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},i)):i})),zK=eA((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$active":{color:e.palette.primary.main},"&$completed":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(LK),FK=o_.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.disabled,f=void 0!==d&&d,p=e.error,h=void 0!==p&&p,m=e.icon;e.last;var g=e.optional,y=e.orientation,v=void 0===y?"horizontal":y,b=e.StepIconComponent,x=e.StepIconProps,w=q_(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),k=b;return m&&!k&&(k=zK),o_.createElement("span",__({className:IP(s.root,s[v],l,f&&s.disabled,o&&s.alternativeLabel,h&&s.error),ref:t},w),m||k?o_.createElement("span",{className:IP(s.iconContainer,o&&s.alternativeLabel)},o_.createElement(k,__({completed:u,active:r,error:h,icon:m},x))):null,o_.createElement("span",{className:s.labelContainer},o_.createElement(LW,{variant:"body2",component:"span",className:IP(s.label,o&&s.alternativeLabel,u&&s.completed,r&&s.active,h&&s.error),display:"block"},a),g))}));FK.muiName="StepLabel";var jK=eA((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(FK),HK=o_.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=e.children,o=e.classes,a=e.className,s=e.completed,l=e.disabled,c=e.icon;e.last;var u=e.optional,d=e.orientation,f=q_(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),p={active:n,alternativeLabel:r,completed:s,disabled:l,icon:c,optional:u,orientation:d},h=CU(i,["StepLabel"])?o_.cloneElement(i,p):o_.createElement(jK,p,i);return o_.createElement(QV,__({disabled:l,TouchRippleProps:{className:o.touchRipple},className:IP(o.root,o[d],a),ref:t},f),h)}));eA({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(HK);var BK=o_.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,i=void 0!==r&&r,o=e.classes,a=e.className,s=e.completed,l=e.disabled;e.index;var c=e.orientation,u=void 0===c?"horizontal":c,d=q_(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return o_.createElement("div",__({className:IP(o.root,o[u],a,i&&o.alternativeLabel,n&&o.active,s&&o.completed,l&&o.disabled),ref:t},d),o_.createElement("span",{className:IP(o.line,"vertical"===u?o.lineVertical:o.lineHorizontal)}))})),VK=eA((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(BK),WK=o_.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var r=e.children,i=e.classes,o=e.className;e.completed;var a=e.last;e.optional,e.orientation;var s=e.TransitionComponent,l=void 0===s?S$:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,f=q_(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),p=u;return"auto"!==u||l.muiSupportAuto||(p=void 0),o_.createElement("div",__({className:IP(i.root,o,a&&i.last),ref:t},f),o_.createElement(l,__({in:n,className:i.transition,timeout:p,unmountOnExit:!0},d),r))}));eA((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(WK);var $K=o_.createElement(VK,null),UK=o_.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,i=e.alternativeLabel,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.connector,u=void 0===c?$K:c,d=e.nonLinear,f=void 0!==d&&d,p=e.orientation,h=void 0===p?"horizontal":p,m=q_(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=o_.isValidElement(u)?o_.cloneElement(u,{orientation:h}):null,y=o_.Children.toArray(a),v=y.map((function(e,t){var n={alternativeLabel:o,connector:u,last:t+1===y.length,orientation:h},i={index:t,active:!1,completed:!1,disabled:!1};return r===t?i.active=!0:!f&&r>t?i.completed=!0:!f&&r<t&&(i.disabled=!0),[!o&&g&&0!==t&&o_.cloneElement(g,__({key:t},i)),o_.cloneElement(e,__({},n,{},i,{},e.props))]}));return o_.createElement(rA,__({square:!0,elevation:0,className:IP(s.root,s[h],l,o&&s.alternativeLabel),ref:t},m),v)}));eA({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(UK);var YK=o_.forwardRef((function(e,t){var n=e.anchor,r=e.classes,i=e.className,o=e.width,a=q_(e,["anchor","classes","className","width"]);return o_.createElement("div",__({className:IP(r.root,r["anchor".concat(tA(n))],i),ref:t,style:D_({},eU(n)?"width":"height",o)},a))})),XK=eA((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(YK),KK=null;function GK(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function ZK(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function JK(e,t){return e?t.clientWidth:t.clientHeight}function QK(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var eG="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),tG={enter:xN.enteringScreen,exit:xN.leavingScreen},nG="undefined"!=typeof window?o_.useLayoutEffect:o_.useEffect;o_.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,i=e.disableBackdropTransition,o=void 0!==i&&i,a=e.disableDiscovery,s=void 0!==a&&a,l=e.disableSwipeToOpen,c=void 0===l?eG:l,u=e.hideBackdrop,d=e.hysteresis,f=void 0===d?.52:d,p=e.minFlingVelocity,h=void 0===p?450:p,m=e.ModalProps,g=(m=void 0===m?{}:m).BackdropProps,y=q_(m,["BackdropProps"]),v=e.onClose,b=e.onOpen,x=e.open,w=e.PaperProps,k=void 0===w?{}:w,C=e.SwipeAreaProps,S=e.swipeAreaWidth,E=void 0===S?20:S,M=e.transitionDuration,T=void 0===M?tG:M,D=e.variant,_=void 0===D?"temporary":D,N=q_(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),q=QP(),R=o_.useState(!1),P=R[0],A=R[1],I=o_.useRef({isSwiping:null}),O=o_.useRef(),L=o_.useRef(),z=o_.useRef(),F=o_.useRef(!1),j=o_.useRef();nG((function(){j.current=null}),[x]);var H=o_.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,i=void 0===n?null:n,a=t.changeTransition,s=void 0===a||a,l=tU(q,r),c=-1!==["right","bottom"].indexOf(l)?1:-1,d=eU(r),f=d?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),p=z.current.style;p.webkitTransform=f,p.transform=f;var h="";if(i&&(h=q.transitions.create("all",CV({timeout:T},{mode:i}))),s&&(p.webkitTransition=h,p.transition=h),!o&&!u){var m=L.current.style;m.opacity=1-e/JK(d,z.current),s&&(m.webkitTransition=h,m.transition=h)}}),[r,o,u,q,T]),B=AV((function(e){if(F.current)if(KK=null,F.current=!1,A(!1),I.current.isSwiping){I.current.isSwiping=null;var t,n=tU(q,r),i=eU(r);t=i?GK(n,e.changedTouches):ZK(n,e.changedTouches);var o=i?I.current.startX:I.current.startY,a=JK(i,z.current),s=QK(t,o,x,a),l=s/a;Math.abs(I.current.velocity)>h&&(j.current=1e3*Math.abs((a-s)/I.current.velocity)),x?I.current.velocity>h||l>f?v():H(0,{mode:"exit"}):I.current.velocity<-h||1-l>f?b():H(JK(i,z.current),{mode:"enter"})}else I.current.isSwiping=null})),V=AV((function(e){if(z.current&&F.current&&(null==KK||KK===I.current)){var t=tU(q,r),n=eU(r),i=GK(t,e.touches),o=ZK(t,e.touches);if(x&&z.current.contains(e.target)&&null==KK){var a=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,i=e.anchor,o={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==i&&"left"!==i||(t=!t);var l="left"===i||"right"===i?"x":"y",c=e[o[l]],u=c>0,d=c+e[s[l]]<e[a[l]];return t&&d||!t&&u?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var r=window.getComputedStyle(e);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,z.current),start:n?I.current.startX:I.current.startY,current:n?i:o,anchor:r});if(a)return void(KK=a);KK=I.current}if(null==I.current.isSwiping){var l=Math.abs(i-I.current.startX),c=Math.abs(o-I.current.startY);l>c&&e.cancelable&&e.preventDefault();var u=n?l>c&&l>3:c>l&&c>3;if(!0===u||(n?c>3:l>3)){if(I.current.isSwiping=u,!u)return void B(e);I.current.startX=i,I.current.startY=o,s||x||(n?I.current.startX-=E:I.current.startY-=E)}}if(I.current.isSwiping){var d=JK(n,z.current),f=n?I.current.startX:I.current.startY;x&&!I.current.paperHit&&(f=Math.min(f,d));var p=QK(n?i:o,f,x,d);if(x)if(I.current.paperHit)0===p&&(I.current.startX=i,I.current.startY=o);else{if(!(n?i<d:o<d))return;I.current.paperHit=!0,I.current.startX=i,I.current.startY=o}null===I.current.lastTranslate&&(I.current.lastTranslate=p,I.current.lastTime=performance.now()+1);var h=(p-I.current.lastTranslate)/(performance.now()-I.current.lastTime)*1e3;I.current.velocity=.4*I.current.velocity+.6*h,I.current.lastTranslate=p,I.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),H(p)}}})),W=AV((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!x||L.current.contains(e.target)||z.current.contains(e.target))){var t=tU(q,r),n=eU(r),i=GK(t,e.touches),o=ZK(t,e.touches);if(!x){if(c||e.target!==O.current)return;if(n){if(i>E)return}else if(o>E)return}e.muiHandled=!0,KK=null,I.current.startX=i,I.current.startY=o,A(!0),!x&&z.current&&H(JK(n,z.current)+(s?20:-E),{changeTransition:!1}),I.current.velocity=0,I.current.lastTime=null,I.current.lastTranslate=null,I.current.paperHit=!1,F.current=!0}}));o_.useEffect((function(){if("temporary"===_)return document.body.addEventListener("touchstart",W),document.body.addEventListener("touchmove",V,{passive:!1}),document.body.addEventListener("touchend",B),function(){document.body.removeEventListener("touchstart",W),document.body.removeEventListener("touchmove",V,{passive:!1}),document.body.removeEventListener("touchend",B)}}),[_,W,V,B]),o_.useEffect((function(){return function(){KK===I.current&&(KK=null)}}),[]),o_.useEffect((function(){x||A(!1)}),[x]);var $=o_.useCallback((function(e){L.current=GB.findDOMNode(e)}),[]),U=o_.useCallback((function(e){z.current=GB.findDOMNode(e)}),[]);return o_.createElement(o_.Fragment,null,o_.createElement(iU,__({open:!("temporary"!==_||!P)||x,variant:_,ModalProps:__({BackdropProps:__({},g,{ref:$})},y),PaperProps:__({},k,{style:__({pointerEvents:"temporary"!==_||x?"":"none"},k.style),ref:U}),anchor:r,transitionDuration:j.current||T,onClose:v,ref:t},N)),!c&&"temporary"===_&&o_.createElement(OV,null,o_.createElement(XK,__({anchor:r,ref:O,width:E},C))))}));var rG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=void 0===i?"secondary":i,a=e.edge,s=void 0!==a&&a,l=e.size,c=void 0===l?"medium":l,u=q_(e,["classes","className","color","edge","size"]),d=o_.createElement("span",{className:n.thumb});return o_.createElement("span",{className:IP(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(tA(c))]}[c])},o_.createElement(s$,__({type:"checkbox",icon:d,checkedIcon:d,classes:{root:IP(n.switchBase,n["color".concat(tA(o))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),o_.createElement("span",{className:n.track}))}));eA((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(50%)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:E_(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:E_(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(rG);var iG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.disabled,o=void 0!==i&&i,a=e.disableFocusRipple,s=void 0!==a&&a,l=e.fullWidth,c=e.icon,u=e.indicator,d=e.label,f=e.onChange,p=e.onClick,h=e.selected,m=e.textColor,g=void 0===m?"inherit":m,y=e.value,v=e.wrapped,b=void 0!==v&&v,x=q_(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return o_.createElement(QV,__({focusRipple:!s,className:IP(n.root,n["textColor".concat(tA(g))],r,o&&n.disabled,h&&n.selected,d&&c&&n.labelIcon,l&&n.fullWidth,b&&n.wrapped),ref:t,role:"tab","aria-selected":h,disabled:o,onClick:function(e){f&&f(e,y),p&&p(e)}},x),o_.createElement("span",{className:n.wrapper},c,d),u)}));eA((function(e){var t;return{root:__({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},D_(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),D_(t,"overflow","hidden"),D_(t,"whiteSpace","normal"),D_(t,"textAlign","center"),D_(t,e.breakpoints.up("sm"),{fontSize:e.typography.pxToRem(13),minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(iG);var oG=o_.createContext(),aG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"table":i,a=e.padding,s=void 0===a?"default":a,l=e.size,c=void 0===l?"medium":l,u=e.stickyHeader,d=void 0!==u&&u,f=q_(e,["classes","className","component","padding","size","stickyHeader"]),p=o_.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return o_.createElement(oG.Provider,{value:p},o_.createElement(o,__({ref:t,className:IP(n.root,r,d&&n.stickyHeader)},f)))}));eA((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":__({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(aG);var sG=o_.createContext(),lG={variant:"body"},cG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tbody":i,a=q_(e,["classes","className","component"]);return o_.createElement(sG.Provider,{value:lG},o_.createElement(o,__({className:IP(n.root,r),ref:t},a)))}));eA({root:{display:"table-row-group"}},{name:"MuiTableBody"})(cG);var uG=o_.forwardRef((function(e,t){var n,r=e.align,i=void 0===r?"inherit":r,o=e.classes,a=e.className,s=e.component,l=e.padding,c=e.scope,u=e.size,d=e.sortDirection,f=e.variant,p=q_(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),h=o_.useContext(oG),m=o_.useContext(sG);n=s||(m&&"head"===m.variant?"th":"td");var g=c;!g&&m&&"head"===m.variant&&(g="col");var y=l||(h&&h.padding?h.padding:"default"),v=u||(h&&h.size?h.size:"medium"),b=f||m&&m.variant,x=null;return d&&(x="asc"===d?"ascending":"descending"),o_.createElement(n,__({ref:t,className:IP(o.root,o[b],a,"inherit"!==i&&o["align".concat(tA(i))],"default"!==y&&o["padding".concat(tA(y))],"medium"!==v&&o["size".concat(tA(v))],{head:h&&h.stickyHeader&&o.stickyHeader}[b]),"aria-sort":x,scope:g},p))})),dG=eA((function(e){return{root:__({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?T_(E_(e.palette.divider,1),.88):M_(E_(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(uG),fG={variant:"footer"},pG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tfoot":i,a=q_(e,["classes","className","component"]);return o_.createElement(sG.Provider,{value:fG},o_.createElement(o,__({className:IP(n.root,r),ref:t},a)))}));eA({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(pG);var hG={variant:"head"},mG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"thead":i,a=q_(e,["classes","className","component"]);return o_.createElement(sG.Provider,{value:hG},o_.createElement(o,__({className:IP(n.root,r),ref:t},a)))}));eA({root:{display:"table-header-group"}},{name:"MuiTableHead"})(mG);var gG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.disableGutters,s=void 0!==a&&a,l=e.variant,c=void 0===l?"regular":l,u=q_(e,["classes","className","component","disableGutters","variant"]);return o_.createElement(o,__({className:IP(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),yG=eA((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:D_({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(gG),vG=jW(o_.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),bG=jW(o_.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),xG=o_.createElement(bG,null),wG=o_.createElement(vG,null),kG=o_.createElement(vG,null),CG=o_.createElement(bG,null),SG=o_.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.nextIconButtonProps,o=e.onChangePage,a=e.page,s=e.rowsPerPage,l=q_(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=QP();return o_.createElement("div",__({ref:t},l),o_.createElement(o$,__({onClick:function(e){o(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?xG:wG),o_.createElement(o$,__({onClick:function(e){o(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},i),"rtl"===c.direction?kG:CG))})),EG=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},MG=[10,25,50,100],TG=o_.forwardRef((function(e,t){var n,r=e.ActionsComponent,i=void 0===r?SG:r,o=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?dG:c,d=e.count,f=e.labelDisplayedRows,p=void 0===f?EG:f,h=e.labelRowsPerPage,m=void 0===h?"Rows per page:":h,g=e.nextIconButtonProps,y=e.onChangePage,v=e.onChangeRowsPerPage,b=e.page,x=e.rowsPerPage,w=e.rowsPerPageOptions,k=void 0===w?MG:w,C=e.SelectProps,S=void 0===C?{}:C,E=q_(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==dG&&"td"!==u||(n=l||1e3);var M=S.native?"option":IY;return o_.createElement(u,__({className:IP(a.root,s),colSpan:n,ref:t},E),o_.createElement(yG,{className:a.toolbar},o_.createElement("div",{className:a.spacer}),k.length>1&&o_.createElement(LW,{color:"inherit",variant:"body2",className:a.caption},m),k.length>1&&o_.createElement(gK,__({classes:{select:a.select,icon:a.selectIcon},input:o_.createElement(xU,{className:IP(a.input,a.selectRoot)}),value:x,onChange:v},S),k.map((function(e){return o_.createElement(M,{className:a.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),o_.createElement(LW,{color:"inherit",variant:"body2",className:a.caption},p({from:0===d?0:b*x+1,to:Math.min(d,(b+1)*x),count:d,page:b})),o_.createElement(i,{className:a.actions,backIconButtonProps:o,count:d,nextIconButtonProps:g,onChangePage:y,page:b,rowsPerPage:x})))}));eA((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{top:1},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(TG);var DG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"tr":i,a=e.hover,s=void 0!==a&&a,l=e.selected,c=void 0!==l&&l,u=q_(e,["classes","className","component","hover","selected"]),d=o_.useContext(sG);return o_.createElement(o,__({ref:t,className:IP(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));eA((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(DG);var _G=jW(o_.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),NG=o_.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,i=e.children,o=e.classes,a=e.className,s=e.direction,l=void 0===s?"desc":s,c=e.hideSortIcon,u=void 0!==c&&c,d=e.IconComponent,f=void 0===d?_G:d,p=q_(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return o_.createElement(QV,__({className:IP(o.root,a,r&&o.active),component:"span",disableRipple:!0,ref:t},p),i,u&&!r?null:o_.createElement(f,{className:IP(o.icon,o["iconDirection".concat(tA(l))])}))}));eA((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:1}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(NG);var qG,RG=!("undefined"==typeof window||!window.document||!window.document.createElement);function PG(){if(qG)return qG;if(!RG||!window.document.body)return"indeterminate";var e=window.document.createElement("div");return e.appendChild(document.createTextNode("ABCD")),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),qG="reverse",e.scrollLeft>0?qG="default":(e.scrollLeft=1,0===e.scrollLeft&&(qG="negative")),document.body.removeChild(e),qG}function AG(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=PG();if("indeterminate"===r)return Number.NaN;switch(r){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n}return n}function IG(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var OG={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function LG(e){var t=e.onChange,n=q_(e,["onChange"]),r=o_.useRef(),i=o_.useRef(null),o=function(){r.current=i.current.offsetHeight-i.current.clientHeight};return o_.useEffect((function(){var e=K$((function(){var e=r.current;o(),e!==r.current&&t(r.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),o_.useEffect((function(){o(),t(r.current)}),[t]),o_.createElement("div",__({style:OG,ref:i},n))}var zG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.color,o=e.orientation,a=q_(e,["classes","className","color","orientation"]);return o_.createElement("span",__({className:IP(n.root,n["color".concat(tA(i))],r,{vertical:n.vertical}[o]),ref:t},a))})),FG=eA((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(zG),jG=o_.createElement(vG,{fontSize:"small"}),HG=o_.createElement(bG,{fontSize:"small"}),BG=o_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.direction,o=e.orientation,a=e.visible,s=q_(e,["classes","className","direction","orientation","visible"]),l=IP(n.root,r,{vertical:n.vertical}[o]);return a?o_.createElement(QV,__({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===i?jG:HG):o_.createElement("div",{className:l})})),VG=eA({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(BG),WG=o_.forwardRef((function(e,t){var n=e.action,r=e.centered,i=void 0!==r&&r,o=e.children,a=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.indicatorColor,d=void 0===u?"secondary":u,f=e.onChange,p=e.orientation,h=void 0===p?"horizontal":p,m=e.ScrollButtonComponent,g=void 0===m?VG:m,y=e.scrollButtons,v=void 0===y?"auto":y,b=e.TabIndicatorProps,x=void 0===b?{}:b,w=e.textColor,k=void 0===w?"inherit":w,C=e.value,S=e.variant,E=void 0===S?"standard":S,M=q_(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),T=QP(),D="scrollable"===E,_="rtl"===T.direction,N="vertical"===h,q=N?"scrollTop":"scrollLeft",R=N?"top":"left",P=N?"bottom":"right",A=N?"clientHeight":"clientWidth",I=N?"height":"width",O=o_.useState(!1),L=O[0],z=O[1],F=o_.useState({}),j=F[0],H=F[1],B=o_.useState({start:!1,end:!1}),V=B[0],W=B[1],$=o_.useState({overflow:"hidden",marginBottom:null}),U=$[0],Y=$[1],X=new Map,K=o_.useRef(null),G=o_.useRef(null),Z=function(){var e,t,n=K.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:AG(n,T.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==C){var i=G.current.children;if(i.length>0){var o=i[X.get(C)];t=o?o.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},J=AV((function(){var e,t=Z(),n=t.tabsMeta,r=t.tabMeta,i=0;if(r&&n)if(N)i=r.top-n.top+n.scrollTop;else{var o=_?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;i=r.left-n.left+o}var a=(D_(e={},R,i),D_(e,I,r?r[I]:0),e);if(isNaN(j[R])||isNaN(j[I]))H(a);else{var s=Math.abs(j[R]-a[R]),l=Math.abs(j[I]-a[I]);(s>=1||l>=1)&&H(a)}})),Q=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=r.ease,a=void 0===o?IG:o,s=r.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,f=function(){d=!0},p=function r(o){if(d)i(new Error("Animation cancelled"));else{null===c&&(c=o);var s=Math.min(1,(o-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){i(null)})):requestAnimationFrame(r)}};u===n?i(new Error("Element already at target position")):requestAnimationFrame(p)}(q,K.current,e)},ee=function(e){var t=K.current[q];N?t+=e:(t+=e*(_?-1:1),t*=_&&"reverse"===PG()?-1:1),Q(t)},te=function(){ee(-K.current[A])},ne=function(){ee(K.current[A])},re=o_.useCallback((function(e){Y({overflow:null,marginBottom:-e})}),[]),ie=AV((function(){var e=Z(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[R]<t[R]){var r=t[q]+(n[R]-t[R]);Q(r)}else if(n[P]>t[P]){var i=t[q]+(n[P]-t[P]);Q(i)}})),oe=AV((function(){if(D&&"off"!==v){var e,t,n=K.current,r=n.scrollTop,i=n.scrollHeight,o=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(N)e=r>1,t=r<i-o-1;else{var l=AG(K.current,T.direction);e=_?l<a-s-1:l>1,t=_?l>1:l<a-s-1}e===V.start&&t===V.end||W({start:e,end:t})}}));o_.useEffect((function(){var e=K$((function(){J(),oe()})),t=N$(K.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[J,oe]);var ae=o_.useCallback(K$((function(){oe()})));o_.useEffect((function(){return function(){ae.clear()}}),[ae]),o_.useEffect((function(){z(!0)}),[]),o_.useEffect((function(){J(),oe()})),o_.useEffect((function(){ie()}),[ie,j]),o_.useImperativeHandle(n,(function(){return{updateIndicator:J,updateScrollButtons:oe}}),[J,oe]);var se=o_.createElement(FG,__({className:a.indicator,orientation:h,color:d},x,{style:__({},j,{},x.style)})),le=0,ce=o_.Children.map(o,(function(e){if(!o_.isValidElement(e))return null;var t=void 0===e.props.value?le:e.props.value;X.set(t,le);var n=t===C;return le+=1,o_.cloneElement(e,{fullWidth:"fullWidth"===E,indicator:n&&!L&&se,selected:n,onChange:f,textColor:k,value:t})})),ue=function(){var e={};e.scrollbarSizeListener=D?o_.createElement(LG,{className:a.scrollable,onChange:re}):null;var t=V.start||V.end,n=D&&("auto"===v&&t||"desktop"===v||"on"===v);return e.scrollButtonStart=n?o_.createElement(g,{orientation:h,direction:_?"right":"left",onClick:te,visible:V.start,className:IP(a.scrollButtons,"on"!==v&&a.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?o_.createElement(g,{orientation:h,direction:_?"left":"right",onClick:ne,visible:V.end,className:IP(a.scrollButtons,"on"!==v&&a.scrollButtonsDesktop)}):null,e}();return o_.createElement(c,__({className:IP(a.root,s,N&&a.vertical),ref:t},M),ue.scrollButtonStart,ue.scrollbarSizeListener,o_.createElement("div",{className:IP(a.scroller,D?a.scrollable:a.fixed),style:U,ref:K,onScroll:ae},o_.createElement("div",{className:IP(a.flexContainer,N&&a.flexContainerVertical,i&&!D&&a.centered),ref:G,role:"tablist"},ce),L&&se),ue.scrollButtonEnd)}));eA((function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:D_({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(WG);var $G={standard:JU,filled:kU,outlined:$Y},UG=o_.forwardRef((function(e,t){var n=e.autoComplete,r=e.autoFocus,i=e.children,o=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.defaultValue,u=e.error,d=e.FormHelperTextProps,f=e.fullWidth,p=e.helperText,h=e.hiddenLabel,m=e.id,g=e.InputLabelProps,y=e.inputProps,v=e.InputProps,b=e.inputRef,x=e.label,w=e.multiline,k=e.name,C=e.onBlur,S=e.onChange,E=e.onFocus,M=e.placeholder,T=e.required,D=void 0!==T&&T,_=e.rows,N=e.rowsMax,q=e.select,R=void 0!==q&&q,P=e.SelectProps,A=e.type,I=e.value,O=e.variant,L=void 0===O?"standard":O,z=q_(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),F=o_.useState(0),j=F[0],H=F[1],B=o_.useRef(null);o_.useEffect((function(){if("outlined"===L){var e=GB.findDOMNode(B.current);H(null!=e?e.offsetWidth:0)}}),[L,D,x]);var V={};"outlined"===L&&(g&&void 0!==g.shrink&&(V.notched=g.shrink),V.labelWidth=j),R&&(P&&P.native||(V.id=void 0),V["aria-describedby"]=void 0);var W=p&&m?"".concat(m,"-helper-text"):void 0,$=x&&m?"".concat(m,"-label"):void 0,U=$G[L],Y=o_.createElement(U,__({"aria-describedby":W,autoComplete:n,autoFocus:r,defaultValue:c,fullWidth:f,multiline:w,name:k,rows:_,rowsMax:N,type:A,value:I,id:m,inputRef:b,onBlur:C,onChange:S,onFocus:E,placeholder:M,inputProps:y},V,v));return o_.createElement(EU,__({className:IP(o.root,a),error:u,fullWidth:f,hiddenLabel:h,ref:t,required:D,color:l,variant:L},z),x&&o_.createElement(tY,__({htmlFor:m,ref:B,id:$},g),x),R?o_.createElement(gK,__({"aria-describedby":W,id:m,labelId:$,value:I,input:Y},P),i):Y,p&&o_.createElement(NU,__({id:W},d),p))}));function YG(e){return Math.round(1e5*e)/1e5}eA({root:{}},{name:"MuiTextField"})(UG);var XG=o_.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.disableFocusListener,o=void 0!==i&&i,a=e.disableHoverListener,s=void 0!==a&&a,l=e.disableTouchListener,c=void 0!==l&&l,u=e.enterDelay,d=void 0===u?0:u,f=e.enterTouchDelay,p=void 0===f?700:f,h=e.id,m=e.interactive,g=void 0!==m&&m,y=e.leaveDelay,v=void 0===y?0:y,b=e.leaveTouchDelay,x=void 0===b?1500:b,w=e.onClose,k=e.onOpen,C=e.open,S=e.placement,E=void 0===S?"bottom":S,M=e.PopperProps,T=e.title,D=e.TransitionComponent,_=void 0===D?VU:D,N=e.TransitionProps,q=q_(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),R=QP(),P=o_.useState(!1),A=P[0],I=P[1],O=o_.useState(0)[1],L=o_.useState(),z=L[0],F=L[1],j=o_.useRef(!1),H=o_.useRef(null!=C).current,B=o_.useRef(),V=o_.useRef(),W=o_.useRef(),$=o_.useRef(),U=o_.useRef();o_.useEffect((function(){B.current||(B.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),C&&O((function(e){return!e}))}),[C]),o_.useEffect((function(){return function(){clearTimeout(V.current),clearTimeout(W.current),clearTimeout($.current),clearTimeout(U.current)}}),[]);var Y=function(e){H||A||I(!0),k&&k(e)},X=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),j.current&&"touchstart"!==e.type||(z&&z.removeAttribute("title"),clearTimeout(W.current),clearTimeout($.current),d?(e.persist(),W.current=setTimeout((function(){Y(e)}),d)):Y(e))},K=UV(),G=K.isFocusVisible,Z=K.onBlurVisible,J=K.ref,Q=o_.useState(!1),ee=Q[0],te=Q[1],ne=function(e){H||I(!1),w&&w(e),clearTimeout(V.current),V.current=setTimeout((function(){j.current=!1}),R.transitions.duration.shortest)},re=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ee&&(te(!1),Z())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout(W.current),clearTimeout($.current),e.persist(),$.current=setTimeout((function(){ne(e)}),v)},ie=EV(F,t),oe=EV(J,ie),ae=o_.useCallback((function(e){SV(oe,GB.findDOMNode(e))}),[oe]),se=EV(n.ref,ae),le=H?C:A;""===T&&(le=!1);var ce=!le&&!s,ue=__({"aria-describedby":le?h||B.current:null,title:ce&&"string"==typeof T?T:null},q,{},n.props,{className:IP(q.className,n.props.className)});c||(ue.onTouchStart=function(e){j.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout($.current),clearTimeout(V.current),clearTimeout(U.current),e.persist(),U.current=setTimeout((function(){X(e)}),p)},ue.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout(U.current),clearTimeout($.current),e.persist(),$.current=setTimeout((function(){ne(e)}),x)}),s||(ue.onMouseOver=X,ue.onMouseLeave=re),o||(ue.onFocus=function(e){z||F(e.currentTarget),G(e)&&(te(!0),X(e));var t=n.props;t.onFocus&&t.onFocus(e)},ue.onBlur=re);var de=g?{onMouseOver:ue.onMouseOver,onMouseLeave:ue.onMouseLeave,onFocus:ue.onFocus,onBlur:ue.onBlur}:{};return o_.createElement(o_.Fragment,null,o_.cloneElement(n,__({ref:se},ue)),o_.createElement(tK,__({className:IP(r.popper,g&&r.popperInteractive),placement:E,anchorEl:z,open:!!z&&le,id:ue["aria-describedby"],transition:!0},de,M),(function(e){var t=e.placement,n=e.TransitionProps;return o_.createElement(_,__({timeout:R.transitions.duration.shorter},n,N),o_.createElement("div",{className:IP(r.tooltip,r["tooltipPlacement".concat(tA(t.split("-")[0]))],j.current&&r.touch)},T))})))}));eA((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:E_(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(YG(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(YG(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:D_({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:D_({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:D_({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:D_({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(XG);var KG={entering:{transform:"none"},entered:{transform:"none"}},GG={enter:xN.enteringScreen,exit:xN.leavingScreen};function ZG(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function JG({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:ZG(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return o_.createElement("i",{style:i},o_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o_.createElement("path",{d:e})))}o_.forwardRef((function(e,t){var n=e.children,r=e.in,i=e.onEnter,o=e.onExit,a=e.style,s=e.timeout,l=void 0===s?GG:s,c=q_(e,["children","in","onEnter","onExit","style","timeout"]),u=QP(),d=EV(n.ref,t);return o_.createElement(iV,__({appear:!0,in:r,onEnter:function(e,t){kV(e);var n=CV({style:a,timeout:l},{mode:"enter"});e.style.webkitTransition=u.transitions.create("transform",n),e.style.transition=u.transitions.create("transform",n),i&&i(e,t)},onExit:function(e){var t=CV({style:a,timeout:l},{mode:"exit"});e.style.webkitTransition=u.transitions.create("transform",t),e.style.transition=u.transitions.create("transform",t),o&&o(e)},timeout:l},c),(function(e,t){return o_.cloneElement(n,__({style:__({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},KG[e],{},a,{},n.props.style),ref:d},t))}))}));const QG={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},eZ={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},tZ="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",nZ={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},rZ={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function iZ(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.",e.layout);let r=Gw.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function oZ(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),c=uy(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,i&&i({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),iZ(e,a,c)}))}const aZ=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))};function sZ({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>aZ(o,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){oZ(r,e,t,"qDimensions",a)}}}function lZ(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function cZ({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives:()=>aZ(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){oZ(i,e,t,"qMeasures",o,a)}}}function uZ(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const dZ={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},fZ=({children:e,...t})=>o_.createElement(UW,ty({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function pZ(e){function t({title:e,selected:t,onClick:n}){const r=Cy.detectTextDirection(e);return o_.createElement(uY,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},o_.createElement(pY,{style:{minWidth:32}},o_.createElement(JG,{d:t?tZ:""})),o_.createElement(gY,{primaryTypographyProps:{dir:r}},e))}function n({alignTo:e,changeTo:n,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:c}){const u=a.map((e=>o_.createElement(t,{key:e.id,title:e.title,onClick:()=>n(e.id)})));return o_.createElement(CY,ty({anchorEl:e,open:l,onClose:s},dZ[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o_.createElement(sY,{dense:!0,dir:i,"aria-label":c,component:"nav"},o_.createElement(t,{title:r,selected:!0,onClick:s}),u))}t.propTypes={title:a_.exports.string.isRequired,selected:a_.exports.bool,onClick:a_.exports.func.isRequired},t.defaultProps={selected:!1},n.propTypes={alignTo:a_.exports.any,changeTo:a_.exports.func.isRequired,current:a_.exports.string.isRequired,dir:a_.exports.string.isRequired,dock:a_.exports.string.isRequired,list:a_.exports.array,onClose:a_.exports.func.isRequired,show:a_.exports.bool.isRequired,instruction:a_.exports.string.isRequired},n.defaultProps={list:[],alignTo:null};class r extends o_.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasValidAlternatives:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o_.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&n&&e.getAlternatives().then((e=>{this.setState({hasValidAlternatives:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r}=this.props;n&&r&&n.getAlternatives().then((e=>{t.hasValidAlternatives!==(0!==e.length)&&this.setState({hasValidAlternatives:0!==e.length})}))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.id,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:t,translator:r,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l,supportConditional:c}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,f=i||this.state.inSelection,p=e.breadcrumbs.map(((t,n)=>o_.createElement(fZ,{style:{display:"flex",alignItems:"center",color:f&&"rgba(89, 89, 89, 0.8)",pointerEvents:f?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>f?void 0:e.drillUp(d-n),title:t},o_.createElement("span",{style:u},t),o_.createElement(JG,ty({},rZ,{size:"small",style:{margin:"0 8px"}}))))),h=c?this.state.hasValidAlternatives:l,m=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||i||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(y.background="rgba(0,0,0,0.08)");a&&(y.padding=a),s&&(y.minWidth=s);const v=Cy.detectTextDirection(e.text),b=o_.createElement(fZ,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:y,onClick:g?void 0:m,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:g?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&o_.createElement(JG,ty({},eZ,{size:"small",title:r.get("Tooltip.selections.locked")})),o_.createElement("span",{style:u,dir:v},e.text),t&&h&&o_.createElement(JG,ty({},nZ,{size:"small",style:{margin:"0 8px"}})));return o_.createElement(o_.Fragment,null,e.drilldown&&o_.createElement(JG,ty({},QG,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),p,o_.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:h?"auto":"none",height:"100%"}},b),t&&h&&o_.createElement(n,{dock:t.dock,dir:t.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:r.get("Accessibility.Popover.Instructions")}))}}function i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&vy(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:a_.exports.bool.isRequired,padding:a_.exports.string,minWidth:a_.exports.string,titleData:a_.exports.shape({breadcrumbs:a_.exports.arrayOf(a_.exports.string).isRequired,drilldown:a_.exports.bool.isRequired,index:a_.exports.number.isRequired,locked:a_.exports.bool.isRequired,text:a_.exports.string.isRequired,popoverText:a_.exports.string.isRequired,drillUp:a_.exports.func,id:a_.exports.string.isRequired}).isRequired,popover:a_.exports.shape({dir:a_.exports.string.isRequired,dock:a_.exports.string.isRequired,changeTo:a_.exports.func.isRequired,getAlternatives:a_.exports.func.isRequired}),translator:a_.exports.shape({get:a_.exports.func.isRequired}).isRequired,selections:a_.exports.shape({isActive:a_.exports.func,addListener:a_.exports.func,removeListener:a_.exports.func}),style:a_.exports.shape({fontSize:a_.exports.string,color:a_.exports.string,fontFamily:a_.exports.string}).isRequired,isDimension:a_.exports.bool.isRequired,hasAlternative:a_.exports.bool.isRequired,supportConditional:a_.exports.bool.isRequired},r.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:t}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||o(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:a,hyperCubeDef:s,isDimension:l,minWidth:c,model:u,onChangeToAlternative:d,padding:f,rtl:p,selections:h,skipAttributeExpressions:m,translator:g,supportConditional:y=!1},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!p?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),w=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,k=w&&w[l?"qDimensions":"qMeasures"]||[],C=n||a[l?"qDimensionInfo":"qMeasureInfo"],S=l?sZ:cZ,E=l?lZ:uZ,M=u&&u.colorSupport&&u.modifiers&&S({altList:k,app:e,dir:p?"rtl":"ltr",dock:i(v),model:u,onChange:d,skipAttributeExpressions:m,translator:g}),T=(D=this.settings.settings).isDimension&&vy(D,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings);var D;const _=C.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,o=E(e,i,u),a=n===C.length-1;return o_.createElement(o_.Fragment,{key:e.cId},o_.createElement(r,{popover:M,titleData:o,model:u,translator:g,selections:h,disabled:t(),style:this.style,isDimension:l,padding:f,minWidth:c,hasAlternative:T,supportConditional:y}),!a&&o_.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return o_.createElement("div",{style:x,dir:b},_)}}}const hZ=SN({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const mZ=TN({productionPrefix:"qf0d5",disableGlobal:!0,seed:""});function gZ(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",GB.render(function(e,t){return o_.createElement(kP,{generateClassName:t},o_.createElement(GP,{theme:hZ},e))}(e,mZ),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&GB.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(GB.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function yZ(){return function(e){e.renderer("react",gZ()),e.component("data-title",pZ(e.renderer("svg")())),e.component("disclaimer",function(){class e extends o_.Component{render(){const{label:e,spanStyle:t}=this.props;return o_.createElement(o_.Fragment,null,o_.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:a_.exports.string.isRequired,spanStyle:a_.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=n.height+"px",r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=n.height+"px",r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=n.width+"px",r.height=n.height+"px",r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(i,r,this.rect),s="center"===r?t:"* "+t,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o_.createElement("div",{style:a,dir:o},o_.createElement(o_.Fragment,null,o_.createElement(e,{label:s,spanStyle:l})))}}}())}}function vZ(e){return kv(e).l<70}function bZ(e,t){const n=kv(e).l/100,r=kv(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function xZ(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var wZ={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const i=[];let o=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=o.attrs.fill,a=t.attrs.fill;if(bZ(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,o.desc.slice.innerRadius),s=Math.min(s,o.desc.slice.outerRadius),s>r){const t=xZ({r:s,a:e},n),o=xZ({r:r,a:e},n);i.push({type:"line",x1:t.x,y1:t.y,x2:o.x,y2:o.y,strokeWidth:1,opacity:.4,stroke:vZ(a)?"#ccc":"#333"})}}o=t}return i}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function kZ(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function CZ(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},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}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),i=Math.sin(t),o=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:kZ(s)}}var SZ={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,c=(i={r:t.offset,a:l},{x:(o=s).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),u=CZ({size:t.size,fill:t.fill,angle:l+Math.PI,...c});u.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(u)}}var i,o;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function EZ(){const e=om();return e.use(Zg),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",ey(e))};e.interaction("hammer",ey(Hammer))}(o)),e.use(yZ()),e.component("pie-dividers",wZ),e.component("negative-indicators",SZ),e}var MZ={};function TZ(){TZ.init.call(this)}MZ.isObject=function(e){return"object"==typeof e&&null!==e},MZ.isNumber=function(e){return"number"==typeof e},MZ.isUndefined=function(e){return void 0===e},MZ.isFunction=function(e){return"function"==typeof e};var DZ=TZ;TZ.EventEmitter=TZ,TZ.prototype._events=void 0,TZ.prototype._maxListeners=void 0,TZ.defaultMaxListeners=10,TZ.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},TZ.prototype.setMaxListeners=function(e){if(!MZ.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},TZ.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],MZ.isUndefined(n))return!1;if(MZ.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(MZ.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},TZ.prototype.addListener=function(e,t){var n;if(!MZ.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,MZ.isFunction(t.listener)?t.listener:t),this._events[e]?MZ.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,MZ.isObject(this._events[e])&&!this._events[e].warned)&&((n=MZ.isUndefined(this._maxListeners)?TZ.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,MZ.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),MZ.isFunction(console.trace)&&console.trace()));return this},TZ.prototype.on=TZ.prototype.addListener,TZ.prototype.once=function(e,t){if(!MZ.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},TZ.prototype.removeListener=function(e,t){var n,r,i,o;if(!MZ.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||MZ.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(MZ.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},TZ.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],MZ.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},TZ.prototype.listeners=function(e){return this._events&&this._events[e]?MZ.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},TZ.listenerCount=function(e,t){return e._events&&e._events[t]?MZ.isFunction(e._events[t])?1:e._events[t].length:0};function _Z(){const e={};var t;return t=e,Object.keys(DZ.prototype).forEach((e=>{t[e]=DZ.prototype[e]})),DZ.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function NZ({picasso:t}){var n;const r=e.useOptions(),i=e.useElement(),o=e.useSelections(),[a,s]=e.useState(),l=_Z(),c=e.useLayout(),u=e.useTranslator(),d=!(null===(n=c.qSelectionInfo)||void 0===n||!n.qInSelections),[f,p]=e.useState(!1);return l.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:i}){var o,a,s;return{active:n,label:i.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[0])||void 0===s||!s.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:c,isInSelections:d,isLassoActionActive:f,setIsLassoActionActive:p,translator:u}),e.useAction((()=>(a&&(a.interactions.lasso.active=()=>f),{...l.lasso})),[a,f,d,u.language()]),e.useEffect((()=>{i.style.overflow="hidden";const e=t({renderer:{prio:[r.renderer||"canvas"]}}),n=e.chart({element:i,data:[],settings:{}}),a=fT({chart:n,actions:l,selections:o,config:{selectionActions:!1}});a.setLayout(c),a.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const u=function(e){var t=lk({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({legendScrollOffset:0,rotation:0});u.intercept("rotation",(e=>(u.get("rotation")+e)%(2*Math.PI))),u.onChanged("rotation",(()=>{n.update({partialData:!0})}));const d=jS();return l.on("selections-start",(()=>{n.brush("selection").start()})),s({picasso:e,chart:n,selectionService:a,viewState:u,viewCache:d,interactions:l}),()=>{a.destroy(),n.destroy(),l.removeAllListeners(),delete l.select,u.intercept("rotation",void 0),u.onChanged("rotation",void 0)}}),[]),a}const qZ={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function RZ(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const PZ={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function AZ(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r,i,o;let a,s,l,c,u,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(r=n.session)&&void 0!==r&&r.sessionConfig||null!==(i=e.session)&&void 0!==i&&null!==(o=i.config)&&void 0!==o&&o.url)){var f;if(a=e.session.options||(null===(f=e.enigmaModel)||void 0===f?void 0:f.session.sessionConfig),!a){var p;a=null===(p=e.session)||void 0===p?void 0:p.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",c=a.port?":"+a.port:"",u=a.prefix?a.prefix:"/","/"!==u[u.length-1]&&(u+="/"),s+l+c+u}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await PZ.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function IZ(e,t,n,r){var i,o,a,s,l,c;const{app:u,flags:d}=t,f=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!f)return[];const[p]=f,h=p.size||"small",m=p.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===p.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===m&&null!==(l=p.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return AZ(p,h,u);if("url"===m)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&RZ(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:i,imageError:s}=await PZ.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await PZ.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(u,d,p,h,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===m&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(RZ(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:o,imageError:a}=await PZ.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(u,n[g],h,v)}return[]}const OZ={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(IZ(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},LZ={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await OZ.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>OZ.checkIfPromisesExist({customTooltipModel:e})};const zZ=(e,t)=>{var n,r,i;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:qZ.CHART.CHART_PARENT_TYPE,qId:qZ.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},FZ=e=>{var t,n,r;const i=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:qZ.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const jZ={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=qZ.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:qZ.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a,s,l;const c=i,u=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=c&&c.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&u&&!(t.qHyperCubeDef.qDimensions.length<=0)){await jZ.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=qZ.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=qZ.CHART.STATE,a=zZ(t,o),s=await e.createSessionObject(a),l=FZ(t);if(s.id!==qZ.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,f,p,h;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(f=n[0].data)||void 0===f?void 0:f.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var m,g;const e=null!==(m=n[0].data.selectionOuterDimension)&&void 0!==m?m:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(qZ.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await i.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(p=c.miniChartToken.model)||void 0===p?void 0:p.id,type:null===(h=c.miniChartToken.model)||void 0===h?void 0:h.genericType})}}catch(t){await jZ.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(jZ.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(qZ.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=qZ.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function HZ(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function BZ(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=qZ.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function VZ(e){const t=BZ();return e.filter((e=>t[e.id]))}const WZ={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const c=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=WZ.getAttrExprData(a);o.length||n.length?LZ.handlePromises({customTooltipModel:i,nodes:WZ.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&jZ.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>LZ.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[qZ.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[qZ.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[qZ.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(VZ(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[qZ.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[qZ.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=HZ(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===VZ(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=HZ(e)||[];[...i,t].forEach((e=>{const t=VZ(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=BZ(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:Cy.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Cy.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function $Z(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],c=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return c?(s.forEach(((e,t)=>{const i=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case qZ.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case qZ.CUSTOM.TITLE:case qZ.CUSTOM.DESCRIPTION:case qZ.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const UZ={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>$Z(t,e,r,n)}}};const YZ={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[qZ.CUSTOM.TITLE]:!0,[qZ.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=WZ.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===qZ.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===qZ.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Sy.getMeasure(e,t))),e,o)}};function XZ({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(YZ.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function KZ(e){const t=qZ.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function GZ(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var ZZ={attrExpr:{migrateProperties(e){var t,n,r,i;const o=uy(!0,{},e),a=(null===(t=o.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=GZ(o);return s=function(e,t){return t.concat(e.map((e=>KZ(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,o),null===(i=o.tooltip)||void 0===i||delete i.data,o},getPatches(e){var t,n,r,i;const o=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qDimensions.length)-1;return function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=KZ(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(GZ(e),o,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,i,o,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],c=(null===(i=t.tooltip)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.qHyperCube)||{},u=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(c,l)&&e.getEffectiveProperties().then((t=>{if(u){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:JZ}=qZ;function QZ({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){var u,d,f;const p=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:WZ,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),h="rtl"===c.direction,m=!(!t.tooltip||t.tooltip.auto),g=m&&zS(t,"tooltip.hideBasic",!1),y=!!(m&&null!==(u=t.tooltip)&&void 0!==u&&null!==(d=u.chart)&&void 0!==d&&null!==(f=d.object)&&void 0!==f&&f.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>m,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=XZ({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===JZ.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===JZ.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>WZ.checkIfPromisesExist({customTooltipModel:p}),createImageRow:({value:e,h:t})=>WZ.getImageRow(e,{h:t,rtl:h}),addImages:({nodes:r})=>{const i=WZ.getDataNodes(o,r),{attrExps:a}=WZ.getAttrExprData(t);return LZ.handlePromises({customTooltipModel:p,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>y,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>jZ.createContainer({layout:t,ctx:{h:e,rtl:h}}),createLimitationRow:()=>WZ.getFooterRow(a.get("properties.tooltip.notselectedmessage"),h),show:({nodes:e,properties:t})=>jZ.show({app:n,properties:t,selectedNodes:e,customTooltipModel:p,rtl:h}),hasAlternateState:()=>{var e;return!(null===(e=p.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>jZ.hide({app:n,customTooltipModel:p}),destroy:()=>jZ.destroyVisualization({customTooltipModel:p})}}}function eJ(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function tJ({flags:t,picasso:n,instance:r}){const i=e.useModel(),o=e.useApp(),a=e.useTranslator(),s=e.useElement(),[l,c]=e.useState(),u=e.useStaleLayout(),d=e.usePlugins(),f=e.useConstraints(),p=e.useOptions(),h=e.useTheme(),{qLocaleInfo:m}=e.useAppLayout(),g=e.useEmbed();return e.useEffect((()=>{if(!r)return;s.style.overflow="hidden";const e=function(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,c=e.layoutService,u=void 0===c?void 0:c,d=e.createConfig,f=void 0===d?LS:d,p=e.config,h=void 0===p?{}:p,m=e.custom,g=void 0===m?{}:m,y=h.localeInfo,v=h.key,b=h.theme,x=void 0===b?void 0:b,w=h.auto,k=void 0===w?void 0:w,C=h.definitionPath,S=null==u||null===(t=u.getLayout)||void 0===t?void 0:t.call(u),E={theme:x,key:v,localeInfo:y,layout:S,hc:null==u||null===(n=u.getHyperCube)||void 0===n?void 0:n.call(u),legendProps:null==u||null===(r=u.getLayoutValue)||void 0===r?void 0:r.call(u,"legend"),colorProps:lk(lk({},null==u||null===(i=u.getLayoutValue)||void 0===i?void 0:i.call(u,"color")),{},{useBaseColors:S?PS(S):void 0})},M=qS({picasso:o,model:a,app:s,translator:l,auto:k});!1!==k&&M.auto((function(e){return k?k({layout:e,defaultAuto:OS}):OS(e)}));var T=!1;return{getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(C)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return T},custom:lk({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:PS}),n=AS(E,t);return M.config(n),M.getAuxiliarySettings(C).then((function(){T=!0}))}}}({picasso:r.picasso,model:i,app:o,translator:a,config:{auto:!1,key:"fill"}}),l=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return fk(ck().mark((function e(){var r,a,s,l;return ck().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=fk(ck().mark((function e(n){var r;return ck().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(lk({},i));case 4:if("object"===uk(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(lk({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,gk(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=mk(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Tk(!0,{},n.brush);Tk(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===uk(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=BS({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=BS({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:r.picasso,plugins:d,pluginArgs:eJ(u)}),y=QZ({flags:t,layout:u,app:o,model:i,picasso:n,chart:r.chart,translator:a,localeInfo:m,embed:g,options:p}),v=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:bT(a),styles:void 0};return d.styles=wT({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=wT({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:h,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),b=function({chart:e,translator:t,layout:n,constraints:r,options:i,themeService:o,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,c="rtl"===i.direction,{fontFamily:u}=o.getStyles();return JT({chart:e,translator:t,config:{rtl:c,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:u},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:i,create:o,util:a})=>{const[c]=n,{title:u,description:d,measures:f}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},p=[];u&&p.push(o.text({value:u,style:{bold:!0}})),d&&p.push(o.text({value:d}));const h=s.hideBasic();if(h&&!f.length&&(u||d)||p.push(o.text({value:c.data.label,style:{bold:!0}})),!h){p.push(o.color({nodes:n,property:"fill"}));const{num:e}=c.data;if(p.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=c.data;p.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}p.push(o.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:i("share")(c.desc.share)}))}f&&p.push(...f.map((e=>o.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),p.push(o.raw({value:s.chart.createLimitationRow()}))):p.push(o.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:m}=c.data;return s.isEnabled()&&m&&p.push(...m.map((t=>o.raw({value:s.createImageRow({value:t,h:e})})))),p},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}({app:o,chart:r.chart,translator:a,layout:u,constraints:f,options:p,themeService:v,colorService:e,custom:y}),x=function({layout:e,themeService:t,flags:n}){const r=t.getStyles(),i=t=>{var r;return n.isEnabled("CLIENT_IM_3050")?null===(r=e.components)||void 0===r?void 0:r.find((e=>e.key===t)):void 0};return{axis:{title:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,p,h;return{fontFamily:null!==(e=null===(t=i("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(o=n.title)||void 0===o?void 0:o.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(a=null===(s=i("axis"))||void 0===s||null===(l=s.axis)||void 0===l||null===(c=l.title)||void 0===c?void 0:c.fontSize)&&void 0!==a?a:r.axis.title.fontSize,color:null!==(u=null===(d=i("axis"))||void 0===d||null===(f=d.axis)||void 0===f||null===(p=f.title)||void 0===p||null===(h=p.color)||void 0===h?void 0:h.color)&&void 0!==u?u:r.axis.title.color}}}},label:{name:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,p,h;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(n=t.label)||void 0===n||null===(o=n.name)||void 0===o||null===(a=o.color)||void 0===a?void 0:a.color)&&void 0!==e?e:r.label.name.color,fontSize:null!==(s=null===(l=i("label"))||void 0===l||null===(c=l.label)||void 0===c||null===(u=c.name)||void 0===u?void 0:u.fontSize)&&void 0!==s?s:r.label.name.fontSize,fontFamily:null!==(d=null===(f=i("label"))||void 0===f||null===(p=f.label)||void 0===p||null===(h=p.name)||void 0===h?void 0:h.fontFamily)&&void 0!==d?d:r.label.name.fontFamily}}},value:{getStyle:()=>{var e,t,n,o,a,s,l,c,u,d,f,p,h;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(n=t.label)||void 0===n||null===(o=n.value)||void 0===o||null===(a=o.color)||void 0===a?void 0:a.color)&&void 0!==e?e:r.label.value.color,fontSize:null!==(s=null===(l=i("label"))||void 0===l||null===(c=l.label)||void 0===c||null===(u=c.value)||void 0===u?void 0:u.fontSize)&&void 0!==s?s:r.label.value.fontSize,fontFamily:null!==(d=null===(f=i("label"))||void 0===f||null===(p=f.label)||void 0===p||null===(h=p.value)||void 0===h?void 0:h.fontFamily)&&void 0!==d?d:r.label.value.fontFamily}}}}}}({layout:u,themeService:v,flags:t});c({colorService:e,pluginService:l,themeService:v,tooltipService:b,styleService:x})}),[i,o,r,u,a.language(),f,p.direction,h.name()]),l}function nJ({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:i}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:e+"Range",direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const rJ=.8,iJ=.55,oJ={CORNER_RADIUS:0,INNER_RADIUS:iJ,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},aJ=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,i;let o=rJ,a=0;const s=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:iJ;e.donut.showAsDonut&&(o=rJ-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*o+a}}:rJ,sJ=({layout:e},t,n)=>{var r,i;if(!e.donut.showAsDonut)return 0;const o=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:iJ;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=rJ-o,n=o;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:o},lJ=({layout:e},t)=>{var n,r,i,o,a,s;const l=t.colorService.getDatumProps(),c=l[Object.keys(l)[0]],u=c&&c.field?c.field:void 0,d="qDimensionInfo/0"===u,f=u?t.ds.field(u).raw():null,p=f&&(f.label||f.title||f.qFallbackTitle)||"",h=t.encodings.slice.outerRadius,{formatter:m}=t.chart,g=vy(e,"qHyperCube.qDimensionInfo",[]).length;function y(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>m(n)(e.qNum):e=>e.qText}}const v=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...l,num:y(t.encodings.slice.arc,"arc"),fillTooltip:u?{field:u,label:p,value:e=>d?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==g?UZ.getNode(e,{dimensionCount:g}):void 0,radius:h?y(h,"outerRadius"):void 0}}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:()=>t.viewState.get("rotation"),endAngle:()=>t.viewState.get("rotation")+2*Math.PI,slice:{arc:{ref:"num"},innerRadius:sJ({layout:e},t,v),fill:t.colorService.getColor(),strokeWidth:null!=v&&null!==(n=v.style)&&void 0!==n&&n.strokeWidth?oJ.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:oJ.STROKE.WIDTH.NONE,stroke:null!==(r=null==v||null===(i=v.style)||void 0===i||null===(o=i.strokeColor)||void 0===o?void 0:o.color)&&void 0!==r?r:oJ.STROKE.COLOR,outerRadius:aJ({layout:e},t,v),cornerRadius:null!==(a=null==v||null===(s=v.style)||void 0===s?void 0:s.cornerRadius)&&void 0!==a?a:0}},animations:{enabled:t.animations.enabled,isMainComponent:!0}}};function cJ({layout:e},t){var n,r;const i=(e.components||[]).filter((e=>"slices"===e.key))[0],o=null!==(n=null==i||null===(r=i.style)||void 0===r?void 0:r.innerRadius)&&void 0!==n?n:iJ,a=t.encodings.slice.outerRadius,s=t.themeService.getStyles();return!(!e.donut.showAsDonut||!a)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:s.label.name.color,outerRadius:{scale:"radius",fn:e=>{const t=rJ-o,n=o;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled}}}function uJ(e){return{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:e.animations.enabled,trackBy:()=>Math.random()}}}function dJ({layout:e},t){if(e.donut.showAsDonut||!t.encodings.slice.outerRadius)return!1;return{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:t.themeService.getStyles().label.name.color},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:t.animations.enabled}}}function fJ(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function pJ(e){return e.node.data.num.label}function hJ(e){return e.node.data.radius.label}function mJ(e,t,n){if(e.dataPoint.auto)return n?pJ:fJ;if("share"===e.dataPoint.labelMode)return fJ;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?hJ:pJ}return null}function gJ({data:e}){return e?e.label:""}function yJ(e){const t=parseInt(e,10);if(!isNaN(t))return t}function vJ(e){var t,n;const r=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return(null!==(t=null==r||null===(n=r.style)||void 0===n?void 0:n.innerRadius)&&void 0!==t?t:iJ)>.3}function bJ({node:e,data:t}){return uy({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function xJ(e,t,n){const r=t.styleService.label.name.getStyle(),i=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",padding:t.encodings.slice.outerRadius?4:2,fill:r.fill}],fontSize:yJ(r.fontSize),fontFamily:r.fontFamily,label:gJ,linkData:({node:e,data:t})=>uy({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(mJ(e,t,!1)){const r=function(e,t,n){return{label:mJ(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&vJ(e)?"inside":"into",onBackground:e.donut.showAsDonut&&vJ(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),o=Ty(uy(t,r),n.theme);o.linkData=bJ,i.push(o)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:i}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}function wJ({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=mJ(e,t,!0),i=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme),o=t.themeService.getStyles(),a=t.styleService.label.name.getStyle(),s=t.styleService.label.value.getStyle(),l=a.fill===o.label.name.color,c=s.fill===o.label.value.color;return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fontSize:yJ(a.fontSize),fontFamily:a.fontFamily,fill:l&&!e.donut.showAsDonut?i:a.fill,label:gJ,linkData:({data:e})=>e},{fontSize:yJ(s.fontSize),fontFamily:s.fontFamily,fill:c&&!e.donut.showAsDonut?i:s.fill,label:r,linkData:({data:e})=>e}]}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}(e,n,t):xJ(e,n,t))}const kJ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=(this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type))||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(n))&&!e.isLocked([this.chart.component("slices")]);return r||this.chart.component("legendRangeBrush").emit("rangeClear"),r}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function CJ(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}function SJ(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:i}=CJ(e,t),o=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*rJ;return(o-r)**2+(a-i)**2<=s**2}const EJ=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let i=CJ(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(i={cx:i.x,cy:i.y,r:5});const o=this.chart.shapesAt(i,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});o.length&&(this.chart.brushFromShapes(o,{components:[{key:o[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),MJ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),TJ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function DJ(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&SJ(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const _J=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&SJ(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),NJ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),qJ=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[_J(e,{}),EJ(e,t,{}),...n]:[kJ(e,{}),TJ(e,{}),_J(e,{}),MJ(e,{}),NJ(e,{}),EJ(e,t,{}),...n]});function RJ(e,t,n){const r=e.getIsSingleSelect(0),{constraints:i}=n;if(i.active&&i.passive)return[];const o=t.tooltipService.getInteractions();return[qJ(t,r,o.gestures),DJ(t),o.native]}function PJ({settings:e},t){const n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function AJ({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties,i=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:i.fontFamily,fontSize:i.fontSize,color:i.color}}}function IJ({layout:e},t,n){const r=function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const i=vy(e,"qHyperCube.qSize.qcy");if(vy(e,"qHyperCube.qDataPages.0.qArea.qHeight")<i)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const o=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":o.length!==r.length&&"NegativeOrZeroValues"}(e,t),{fontFamily:i}=t.themeService.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:py[e].alignment},settings:{label:i.get("Object.Disclaimer."+e),rtl:o},style:r}}(r,t,n,{fontFamily:i})}function OJ({layout:e,context:t,selectionService:n},r={}){const i=function({layout:e}={},t={}){const n={};return uy(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&uy(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),o={scales:i};let a=[];const s=IJ({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,c=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",rtl:t.rtl},{navigationDisabled:l});return i.fillRange&&c.components[0]&&("right"===c.components[0].layout.dock||"left"===c.components[0].layout.dock||t.rtl)&&(i.fillRange.invert=!0),a=[lJ({layout:e,settings:o},r),cJ({layout:e},r),uJ(r),dJ({layout:e},r),AJ({layout:e},r,t),...c.components,nJ({settings:o,scaleKey:"fill",legend:c.components[0]||{},onEdited:r.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},wJ({layout:{components:e.components,dataPoint:uy({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:RJ(n,r,t),scales:i,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:PJ({settings:o},r),strategy:yy(0,r)}}function LJ({instance:t,services:n,picasso:r,flags:i}){const o=e.useOptions(),a=e.useModel(),s=e.useApp(),l=e.useTranslator(),c=e.useTheme(),u=e.useStaleLayout(),d=e.useSelections(),f=e.useConstraints(),{qLocaleInfo:p}=e.useAppLayout(),[h]=e.usePromise((()=>{if(!n)return Promise.resolve();ZZ.attrExpr.updateProperties(a,u);return Promise.all([n.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:c,legendProps:u.legend,layout:u,localeInfo:p,hc:u.qHyperCube,colorProps:{...u.color,useBaseColors:e(u)}})}),a&&!u.snapshotData?a.getEffectiveProperties():Promise.resolve({}),n.pluginService.initialize()])}),[n]);e.useEffect((()=>{null!=t&&t.selectionService&&t.selectionService.setLayout(u)}),[u]),e.useEffect((()=>{if(!t||!h)return;const{chart:e,viewState:m,interactions:g,viewCache:y}=t,{colorService:v,pluginService:b,themeService:x,tooltipService:w,styleService:k}=n,C=o.viewState||{};u.snapshotData||(m.preventSet("legendScrollOffset",C.legendScrollOffset||0),m.preventSet("rotation",C.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(u,m),w.expando.set("properties",h[1]);const S=r.data("q")({key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:p}}),E=[{type:"q",key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:p}},...v.getData()],M={slice:{arc:"qMeasureInfo/0"}};u.qHyperCube.qMeasureInfo.length>1&&(M.slice.outerRadius="qMeasureInfo/1");const T=function(e,t){if(t.slice.outerRadius)return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length;return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(r.data("q")({data:u.qHyperCube,config:{localeInfo:p}}),M),D=d?()=>{const t=e.brush("selection");Zg.selections(t,{},u).forEach((e=>{d.select(e)}))}:()=>{},_=u.snapshotData&&!o.freeResize?{width:(u.snapshotData.content.size||u.snapshotData.object.size).w,height:(u.snapshotData.content.size||u.snapshotData.object.size).h}:void 0,N=e=>t.selectionService.getIsSelectionLocked(e),q=()=>OJ({layout:u,context:{rtl:"rtl"===o.direction,theme:c,translator:l,constraints:f,model:a},selectionService:t.selectionService},{picasso:r,ds:S,model:a,app:s,chart:e,onSelect:D,isLocked:N,interactions:g,constraints:f,translator:l,viewState:m,dataRowCount:T,encodings:M,colorService:v,pluginService:b,themeService:x,styleService:k,tooltipService:w,debouncer:HS,properties:h[1],logicalSize:_,flags:i,animations:{enabled:()=>function({viewState:e,options:t,viewCache:n,layout:r,chart:i}){return!1!==t.chartAnimations&&n.get("chartWidth")===i.element.clientWidth&&n.get("chartHeight")===i.element.clientHeight&&n.get("hasZeroLine")===!!i.component("zeroLine")&&0===e.get("rotation")&&!lD.propertiesHaveChanged({viewCache:n,layout:r})}({viewState:m,options:o,layout:u,viewCache:y,chart:e})}});t.generateSettings=q;const R=q();e.update({data:E,settings:R}),y.set("chartWidth",e.element.clientWidth),y.set("chartHeight",e.element.clientHeight),y.set("hasZeroLine",R.components.filter((e=>"zeroLine"===e.key)).length>0),lD.cacheProperties({viewCache:y,layout:u}),o.effect&&u.effectProperties?o.effect.update(u,e,{encodings:M}):u.effectPath||e.brush("highlight").end()}),[t,h,o.direction,o.effectProperties,f,c.name(),l.language()])}function zJ({instance:t,services:n}){const r=e.useElement(),i=e.useStaleLayout();e.onTakeSnapshot((e=>{if(!(i.snapshotData&&i.snapshotData.content&&i.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(e,r),t&&n))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:by(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:e,chart:t.chart,colorService:n.colorService,viewState:t.viewState})})),e.useImperativeHandle((()=>({getViewState:()=>({rotation:t.viewState.get("rotation"),legendScrollOffset:by(t.chart,"legend-cat")})})),[t])}var FJ={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,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=u(d,n),d!==(i=u(t,n))&&(h&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(h,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,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=u(d,n),d!==(i=u(t,n))&&(h&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},c(d,{name:n,newValue:e(h,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o=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},a=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},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(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 d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function p(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function v(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=y(u(r[0],i),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),p=h(0),m=h(1),g=y(d,p),v=y(f,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var w={isFullRange:d,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(p(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),f=h(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,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===x({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=h(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:p,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:u,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=x({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function k(e){return(k="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})(e)}var C=i.a.bind(null,!0),S={},E=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===k(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 _(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(M(e)&&M(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(E(e)&&E(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}S.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?C({},{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}):M(o)&&M(a)?r=r.concat(S.generate(a,o,s)):E(o)&&E(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(S.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},S.apply=function(e,t){t.forEach((function(t){var n,r=_(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(E(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(E(o)&&E(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(M(o)&&M(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!D(n,e)&&delete n[e]})),C(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var c=_(e,t.from);E(r)?r.splice(+i,0,c.splice(+a,1)[0]):(r[i]=c[a],delete c[a])}else"remove"===t.op&&(E(r)?r.splice(+i,1):delete r[i])}))},S.clone=function(e){return C({},e)},S.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},S.updateObject=function(e,t){Object.keys(e).length?S.apply(e,S.generate(e,t)):C(e,t)};var q=S,R=function(e,t,n){if(!e)return Promise.resolve();var r=q.generate(t,n);return i()(!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()},P="accumulation";function A(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===P)return n[r]}function I(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===P)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var O={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},L={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.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,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),f=w.getAboveComp(n,l,u,d),p=w.getRangeComp("RangeSum",f);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(p,h,m);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return p},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,O)},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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(I(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(I(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(I(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(I(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=A(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=A(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(I(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(P))return!1;var o=A(t,e);return o&&!o.disabled}}}},z="movingAverage";function F(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function j(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},B={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.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,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:i,layout:o}));var u=a(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),p=w.getNumStepComp(r,c),h=w.getAboveComp(r,c,f,p);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.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(w.needDimension({modifier:r,properties:i,layout:o})){var v=w.getDimComp(u,1),b=w.getDimComp(u,0),x=w.getAggrComp(y,v,b);y=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(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(j(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(j(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(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=F(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=F(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=F(t,e);return o&&!o.disabled}}}},V="difference";function W(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===V)return n[r]}function $(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===V)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var U={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var p=w.getDimComp(c,1),h=w.getDimComp(c,0),m=w.getAggrComp(f,p,h);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(U).forEach((function(t){void 0===e[t]&&(e[t]=U[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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(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($(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($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=W(t,e);return o&&!o.disabled}}}},X={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},K={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},G="normalization";function Z(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===G)return n[r]}function J(e,t){var n=function(e,t){var n=a(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}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:K.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:K.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:K.DISREGARD_ALL_DIMENSIONS,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,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,o)}function te(e,t,n){var r=[{value:X.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:X.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:X.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:K.DISREGARD_ALL_DIMENSIONS,selectionScope:X.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function ie(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var c=a(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=re(t),l=ie(t,n,r),c=""===s&&""===l?"":s||l,u=oe(i,o),d=ae(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(J(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:X.DISREGARD_SELECTION,options:function(n){return te(n,t,e)}},field:{refFn:function(t){return"".concat(J(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 Z(t,e).selectionScope===X.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(J(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===X.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(J(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(J(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(Z(t,e).dimensionalScope||0)===K.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.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=Z(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(o(e,"qDef.base.qDef",a(e,"qDef.qDef")),o(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),o(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),o(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(o(e,"qDef.qDef",a(e,"qDef.base.qDef")),o(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),o(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),o(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&o(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ue=ce;function de(e){return(de="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})(e)}var fe={accumulation:L,movingAverage:B,difference:Y,normalization:se},pe=(t.default={modifiers:fe,apply:he,applyModifiers:me,cleanUpMeasure:ge,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:ye,getActiveModifier:ve,initBase:ue.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return fe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return fe[e]&&fe[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=we(e);De({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Pe({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:be},{});function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,o=void 0!==r&&r,s=e.masterItem;pe[t.id]=pe[t.id]||{isFirstTime:!0};var l=pe[t.id].isFirstTime;if(pe[t.id].isFirstTime=!1,n&&"object"===de(n))return me({model:t,properties:n});var c=t?t.layout:void 0,u=a(c,"qSelectionInfo.qInSelections");if(o||u)return Promise.resolve(!1);var d=a(c,"qHyperCube.qMeasureInfo"),f=pe[t.id].lastReloadTime;if(pe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:d,layout:c})){var p=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(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 Te({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:d,layout:c,model:t,lastReloadTime:f});return p||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 De({modifiers:we(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:d,layout:c,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);Ce(n);var r=Ae(n);return _e({model:t}).then((function(i){return Ne({libraryIds:r,model:t}).then((function(r){return p&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Te({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===de(e)&&!e.disabled){if(n++,"object"!==de(fe[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=fe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ee(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),me({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===de(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ae(n);return Ie({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Re({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function me(e){var t=e.model,n=e.oldProperties,r=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?i()(!0,{},r):r),Ce(r);var f=Ae(r);return Ie({model:t,libraryIds:f,masterItem:c}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=o?void 0:Ae(n);return _e({model:r,dimensionAndFieldList:s}).then((function(e){return Ne({libraryIds:l,model:r,libraryItemsProps:o}).then((function(r){t.forEach((function(t){De({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;ue.isValid(t)||ue.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(fe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");fe[e.type].initModifier(e);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=fe[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:o}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList;"function"==typeof fe[n.type].updateModifier&&fe[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=fe[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:o});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||a,n.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||be(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&be(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}),Se(t)):ge(t)}))}))}))}({measures:o,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Re({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=we(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!fe[e.type]}))}(e)?ue.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Se(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return De({modifiers:we(e),properties:n,layout:r})}))}function ve(e){var t=we(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(fe[r.type]&&!r.disabled)return r}}function be(e){var t=ve(e);return!t||fe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function we(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ke(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ce(e){xe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&ke(t)!==e.qDef.qDef?delete e.qDef.base:!ue.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Se(e){var t=we(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!fe[t.type]&&ke(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ee(e){return e.base||e.qDef&&e.qDef.base}function Me(e){var t=Ee(e);return e.qLibraryId||t&&t.qLibraryId}function Te(e){var t=e.measure,n=e.properties,r=e.layout;return!Me(t)&&De({modifiers:we(t),properties:n,layout:r})}function De(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!fe[e.type])&&(void 0===i[e.type]&&(i[e.type]=fe[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function _e(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 Ne(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}))}function qe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Re(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),qe)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),qe)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),qe)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),qe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):R(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Pe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&fe[e.type]&&fe[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ae(e){var t=xe(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=we(t);if(De({modifiers:r,properties:e})){var o=Me(t);o&&n.push(o),i=i||Pe({modifiers:r,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Ie(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&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={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}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}),Object.keys(r).forEach((function(e){i[e]||o[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(u(e,"getMeasure"))})),Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return he({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),pe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function i(e){return(i="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})(e)}n.r(t);var o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.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)?s(e,t):void 0}}(e)||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.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.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)?c(e,t):void 0}}(e)||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.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u},f=n(1),p=n.n(f),h={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){p.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function m(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var w=Math.pow(2,53)-1;function k(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.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)?C(e,t):void 0}}(e)||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.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n=Object.prototype.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)?E(e,t):void 0}}(e)||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.")}()}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M={importCommonProperties:function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=v(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=b(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=x(a.max,i.dimensions.length,w),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,w),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=y()(!0,{},n,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=k(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var i=o.getValue(t,r||"").qHyperCubeDef,a=S(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&p.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function T(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var D={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h.addDimensions({exportFormat:i,qHyperCubeDef:l}),h.addMeasures({exportFormat:i,qHyperCubeDef:l}),h.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,h.copyProperties({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),h.updateLayoutExclude({exportFormat:i,properties:a}),r||h.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(m(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(m(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(m(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,p=e.isHCModifierSupported,h=void 0===p||p,m={qChildren:[]},g=M.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=M.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,w=b.minDimensions,k=b.maxMeasures,C=b.minMeasures,S=l.defaultDimension,E=void 0===S?M.getDefaultDimension():S,D=l.defaultMeasure,_=void 0===D?M.getDefaultMeasure():D;v.qDimensions.length=0,v.qMeasures.length=0,M.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:C})&&M.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:C,newHyperCubeDef:v}),M.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:E}),M.addMeasures({exportFormat:t,maxMeasures:k,minMeasures:C,newHyperCubeDef:v,defaultMeasure:_}),M.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),M.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),M.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),M.copyPropertyIfExist("qMaxStackedCells",y,v),M.copyPropertyIfExist("qNoOfLeftDims",y,v),M.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M.copyPropertyOrSetDefault("qMode",y,v,"S"),M.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),M.copyPropertyOrSetDefault("qSortbyYValue",y,v),M.copyPropertyOrSetDefault("qIndentMode",y,v),M.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),M.importCommonProperties(g,t,r),m.qProperty=g;var N=o.getValue(u||{},"support.modifiers");return M.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:N}),f&&T(m.qProperty,"storedFilters"),"S"===v.qMode&&h&&T(m.qProperty,"dynamicScript"),m}},_={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function N(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function q(e,t){return e.length!==t}var R={create:function(e,t){if(!e||!_[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(N(a,t,r,i),q(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},P={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},A={colorModeOptions:{primary:function(){return!0},dimension:function(e){return P.getNumDimensions(e)>0&&P.getNumMeasures(e)<=1},multiColor:function(e){return P.getNumMeasures(e)>1},measure:function(e){return P.getNumDimensions(e)>0},expression:function(e){return P.getNumMeasures(e)>=1}}},I={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return P.getNumMeasures(e)>=1}}},O={scatterplot:I,"sn-scatter-plot":I,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return P.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return P.getNumDimensions(e)>1},multiColor:function(e){return P.getNumMeasures(e)>1},measure:function(e){return P.getNumDimensions(e)<=1},expression:function(e){return P.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return P.getNumDimensions(e)>=1},multiColor:function(e){return P.getNumMeasures(e)>1},measure:function(e){return P.getNumDimensions(e)>=1},expression:function(e){return P.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return P.getNumDimensions(e)>=1}}}};function L(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function z(e,t){var n=R.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){L(e,"qAttributeDimensions",n),L(e,"qAttributeExpressions",n)})),t.forEach((function(e){L(e,"qAttributeDimensions",n),L(e,"qAttributeExpressions",n)}))}function F(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function j(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;z(r,i);var l=r[r.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var p=R.create(R.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:p,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:p,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(p.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(p)):l.qAttributeExpressions.push(p)}}}function H(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(i=function(e,t){return t?e.qLibraryId:p.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return p.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var B={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function V(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=P.getItemLabel(t);switch(F(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||P.wrapFieldName(t.name),key:P.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&B.useMasterNumberFormat(o.formatting)}r||(o.auto=!1,o.mode=a)}function W(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=R.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return V(e,H("dimension",!!a,a||r)),!!a}function $(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&F(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=H("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,V(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&W(e,t))return;j({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}function U(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&F(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=H("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,V(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=R.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return V(e,H("measure",!!s,s||r[0])),!!s}(e,t))return;j({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(O[t]||A).colorModeOptions||A.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},updateColorBy:function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"color.auto"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?z(i,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:i})?$(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:r,colorMode:n,dimensions:i,measures:a,properties:e})?U(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),z(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},addColorByExpression:function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n}},X={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=D.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=R.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return R.moveByIdFromGroup(a,[],"qAttributeDimensions",c),R.moveByIdFromGroup(a,[],"qAttributeExpressions",c),R.moveByIdFromGroup(s,[],"qAttributeExpressions",u),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=D.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),p=o.getValue(d,"qHyperCubeDef.qDimensions",[]),h=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=Y.getCanColorBy(d,f),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:m,colorMode:h,dimensions:p});return g[h]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:d})&&Y.addColorByExpression(d):Y.switchToAutoColor(d),y&&Y.updateColorBy(d,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(d)&&Y.changeProperty(d,"color.persistent",!0),Y.deleteTotalMode(p),u}},K=["bar","marker","line"],G={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?T(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):T(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),K.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=X.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(m(s,"measureAxis.min","supportedAutoMinMax"),m(s,"measureAxis.max","supportedAutoMinMax")):(m(s,"measureAxis.min","unsupportedAutoMinMax"),m(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=X.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return G.handleAutoMinMax({initialProperties:n,properties:d}),G.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:d,measureType:a}),G.setInterColumnSortOrder(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function J(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Q(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var c=J(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=J(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},quarantineAlternative:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:D,colorChart:X,axisChart:Z,quarantineProperty:m,unquarantineProperty:T,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}])}(FJ);var jJ=r(FJ.exports);const HJ={setValue(e,t,n){if(!t)return;const r=t.split(".");let i=e;const o=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==i[r[a]]&&(i[r[a]]=Number.isNaN(+r[a+1])?{}:[]),i=i[r[a]];void 0!==n?i[o]=n:delete i[o]},getValue(e,t,n){const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(null==o[r[i]])return n;o=o[r[i]]}return o}},BJ={getDimensions:e=>HJ.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>HJ.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>HJ.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>HJ.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=HJ.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=HJ.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const VJ={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>BJ.getNumMeasures(e)>=1},showLegend:e=>{const t=HJ.getValue(e,"color.auto"),n=HJ.getValue(e,"color.expressionIsColor"),r=HJ.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!HJ.getValue(e,"color.auto")&&"byDimension"===HJ.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===HJ.getValue(e,"color.useDimColVal")&&HJ.setValue(e,"color.useDimColVal",!1),!HJ.getValue(e,"color.auto")&&"byDimension"===HJ.getValue(e,"color.mode")&&"libraryItem"===HJ.getValue(e,"color.byDimDef.type"))},WJ=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:i}=VJ;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!HJ.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:i,showTitle:{show(e){const t=HJ.getValue(e,"color.auto");return HJ.getValue(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===HJ.getValue(e,"color.mode")&&!0===HJ.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>HJ.getValue(e,"legend.show")&&i(e)}}};function $J(e){return new WJ(e)}const UJ={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"piechart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.PieChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"items",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{translation:"LayerStyleEditor.style.strokeWidth",ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{component:"items",translation:"LayerStyleEditor.style.cornerRadius",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",translation:"LayerStyleEditor.style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"items",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",translation:"LayerStyleEditor.style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},YJ=(e,t,n)=>{const r=e+".fontFamily",i=e+".fontSize";return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:e+".color",defaultValue:()=>({color:n.getStyle("object.pieChart",e,"color")})}}}}},XJ={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slices:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,n)=>n.layout.donut.showAsDonut}}}}},KJ=(e,t,n,r)=>{const i=function(e){var t=e.theme,n=e.translator,r=e.config,i=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:void 0===r?{}:r}),o=i.id,a=i.paths,s={};a.forEach((function(e){for(var r=e.split("."),i=s,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=oD({theme:t,translator:n,id:o,path:e}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var l=function(e){for(var t=e.split("."),n=s,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return s.getDefaultValue=function(e){return l(e).getDefaultValue()},s.getOptions=function(e){return l(e).getOptions()},s}({theme:r,translator:n,config:{id:"pieChart",paths:["axis.title","label.name","label.value"]}});return{component:"styling-panel",chartTitle:"Object.PieChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:e,items:{strokeSection:{translation:"properties.Outline",component:"panel-section",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{translation:"LayerStyleEditor.style.cornerRadius",component:"panel-section",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"panel-section",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}},axisTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionlabels",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:YJ("axis.title",i,r)}}}:void 0,labelNameSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionValueLabel",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:YJ("label.name",i,r)}}}:void 0,labelValueSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.value.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:YJ("label.value",i,r)}}}:void 0}}},GJ=$J("hard");const ZJ=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(FS(e,"color.mode","byDimension"),FS(e,"color.byDimDef.activeDimensionIndex",0),FS(e,"color.persistent",!1))},JJ=e=>{var t;const n=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(null===(t=e.color)||void 0===t?void 0:t.mode){case"byMultiple":n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"});break;case"byMeasure":n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":n.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return n},QJ=e=>{var t;const{flags:n,translator:r}=e||{},i=null==e||null===(t=e.sense)||void 0===t?void 0:t.theme,o=null==n?void 0:n.isEnabled("SENSECLIENT_IM_2429_PIECHART_BG"),a={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?r.get("Simple.Color.Auto",r.get("properties.colorMode.byDimension")):r.get("Common.Custom")},change:ZJ},colorMode:{options:JJ}}}}},s={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||FS(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,i){i.dimensionTitle=!e}}}}}}};return{uses:"settings",items:{simpleStyling:null!=n&&n.isEnabled("PIECHART_SIMPLE_STYLING")?UJ:void 0,simpleLabels:s,general:{items:{showDisclaimer:null!=n&&n.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:null!=n&&n.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_PIECHART")?KJ(o,n,r,i):XJ,showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:GJ.color.colorMode.options},persistentColors:{show:GJ.color.persistentColors.show}}},simpleColors:a,legend:{show:GJ.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:GJ.legend.showTitle.show},dock:{show:GJ.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},eQ={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},tQ={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},nQ={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function rQ(e){return{type:"items",component:"accordion",items:{data:eQ,sorting:tQ,addons:nQ,settings:QJ(e)}}}const iQ=$J("explore"),oQ=rQ();var aQ={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:oQ.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:oQ.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:iQ.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&iQ.color.useDimColVal.show(e))}}}}}}};const sQ="slices";function lQ(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function cQ(e){return e.data.num.label}function uQ(e){return e.data.radius.label}function dQ(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?cQ:lQ;if("share"===e.dataPoint.labelMode)return lQ;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?uQ:cQ;return cQ}(n,r)(e,t)}function fQ(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=n.substr(0,t-3)+"..."),n}(e.data.label,20):"",t}class pQ{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const i=e.find(".effectLayer");i.length>0&&i.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),i=n.map((n=>{const{start:i,end:o,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,c=n.element.getBoundingClientRect(),u=(i+o)/2,d=c.left-r.left+l.x*(s.x+a*Math.sin(u)),f=c.top-r.top+l.y*(s.y-a*Math.cos(u)),p=Math.cos(u)>0?"top":"bottom",h=Math.sin(u)>0?"right":"left";return{title:fQ(n),label:dQ(n,this.chart.formatter,e,t),orientation:`${p}${h}`,position:{x:d,y:f}}}));this.Flag.show(this.effectLayer,i)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=uy(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=uy(e.options,{effect:null}),n?t.getProperties().then((e=>uy(e,{effectPath:null,effectProperties:null,dataPoint:uy(!0,{},e.originalModelSettings.dataPoint),legend:uy(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class hQ extends pQ{init(e,t,n,r){return e.options=uy(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(sQ).data.items,n=e.effectProperties.min,r=e.effectProperties.max,i=[];let o=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const i=e.num.value;n&&i<o[0]&&(o=[i,t]),r&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class mQ extends pQ{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component(sQ).data.items.map((e=>e.value)).indexOf(n.data.value);-1!==r&&(this.selectedIndex=r,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(sQ).data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>e.key===sQ)).map(((n,r)=>{const i=dQ(n,this.chart.formatter,e,t);return{text:`${fQ(n)} (${i})`,value:r}}))}init(e,t,n,r){return e.options=uy(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}const gQ="/effects/highlight-value",yQ="/effects/maxmin";var vQ={isCompatible:({effectPath:e})=>e===yQ||e===gQ,create:e=>e.effectPath===yQ?new hQ(e):e.effectPath===gQ?new mQ(e):null};function bQ(e){const t={},{components:n,tooltip:r}=e,i=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((e=>{t["chart_style_"+e]=i.style[e]})),r){var o,a;t.chart_tooltip_custom=!r.auto;const e=null===(o=r.chart)||void 0===o||null===(a=o.object)||void 0===a?void 0:a.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function xQ(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function wQ(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function kQ({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){wQ(e),xQ(t),WZ.addCallbackCustomTooltip(t)},move(e,t){wQ(e),xQ(t),WZ.moveCallbackCustomTooltip(t,e)},remove(e,t){WZ.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){wQ(e),xQ(r),WZ.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){xQ(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const CQ=e=>e.qMax<=0,SQ=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(CQ));function EQ(e){return{definition:rQ(e),softDefinition:aQ,support:{snapshot:SQ,export:SQ,exportData:!0,sharing:SQ,viewData:!0,effects:!0},effects:vQ,extendMetrics:bQ,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=jJ.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:kQ(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>jJ.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function MQ(e){return{properties:{version:"1.24.6",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:oJ.STROKE.COLOR},cornerRadius:oJ.CORNER_RADIUS,innerRadius:oJ.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!0,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[kQ(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const i=jJ.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:kQ(e),hypercubePath:r});return i.qProperty.dataPoint&&!1===i.qProperty.dataPoint.show&&delete i.qProperty.dataPoint.show,i},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>jJ.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}return n=>{const{flags:r}=n;!function(e){if(e&&e.get&&e.add){const n="Object.Disclaimer.LimitedData";if(e.get(n)!==n)return;Object.keys(t).forEach((n=>{e.add(t[n])}))}}(n.translator);const i=EZ();return{qae:MQ(n),ext:EQ(n),component(){const t=NZ({picasso:i}),n=tJ({flags:r,picasso:i,instance:t});LJ({instance:t,services:n,picasso:i,flags:r}),function({instance:t}){const n=e.useStaleLayout(),r=e.useOptions(),i=e.useRect();e.useEffect((()=>{if(!t||!t.generateSettings)return;const{viewCache:e,chart:i,generateSettings:o}=t;i.update({settings:o()}),e.set("chartWidth",i.element.clientWidth),e.set("chartHeight",i.element.clientHeight),r.effect&&r.effect.update(n,i)}),[i.width,i.height])}({instance:t}),zJ({instance:t,services:n})}}}}));
|