@nebula.js/sn-pie-chart 1.28.7 → 1.28.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-pie-chart v1.28.7
2
+ * @nebula.js/sn-pie-chart v1.28.9
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -11,4 +11,4 @@ System.register(["hammerjs","picasso.js","picasso-plugin-q","qlik-chart-modules"
11
11
  * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
12
12
  * @website https://github.com/cssinjs/jss
13
13
  * @license MIT
14
- */Ho();var Uo=Date.now(),Bo="fnValues"+Uo,Go="fnStyle"+ ++Uo,Ko="@global",Jo="@global ",Zo=function(){function e(e,t,n){for(var i in this.type="global",this.at=Ko,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new xo(jn({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var i=this.rules.add(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),i},t.replaceRule=function(e,t,n){var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),i},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),Xo=function(){function e(e,t,n){this.type="global",this.at=Ko,this.isProcessed=!1,this.key=e,this.options=n;var i=e.substr(8);this.rule=n.jss.createRule(i,t,jn({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Yo=/\s*,\s*/g;function Qo(e,t){for(var n=e.split(Yo),i="",o=0;o<n.length;o++)i+=t+" "+n[o].trim(),n[o+1]&&(i+=", ");return i}function er(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Ko)return new Zo(e,t,n);if("@"===e[0]&&e.substr(0,8)===Jo)return new Xo(e,t,n);var i=n.parent;return i&&("global"===i.type||i.options.parent&&"global"===i.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,i=e.style,o=i?i[Ko]:null;if(o){for(var r in o)t.addRule(r,o[r],jn({},n,{selector:Qo(r,e.selector)}));delete i[Ko]}}(e,t),function(e,t){var n=e.options,i=e.style;for(var o in i)if("@"===o[0]&&o.substr(0,7)===Ko){var r=Qo(o.substr(7),e.selector);t.addRule(r,i[o],jn({},n,{selector:r})),delete i[o]}}(e,t))}}}var tr=/\s*,\s*/g,nr=/&/g,ir=/\$([\w-]+)/g;function or(){function e(e,t){return function(n,i){var o=e.getRule(i)||t&&t.getRule(i);return o?o.selector:i}}function t(e,t){for(var n=t.split(tr),i=e.split(tr),o="",r=0;r<n.length;r++)for(var a=n[r],s=0;s<i.length;s++){var l=i[s];o&&(o+=", "),o+=-1!==l.indexOf("&")?l.replace(nr,a):a+" "+l}return o}function n(e,t,n){if(n)return jn({},n,{index:n.index+1});var i=e.options.nestingLevel;i=void 0===i?1:i+1;var o=jn({},e.options,{nestingLevel:i,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(i,o,r){if("style"!==o.type)return i;var a,s,l=o,c=l.options.parent;for(var u in i){var d=-1!==u.indexOf("&"),p="@"===u[0];if(d||p){if(a=n(l,c,a),d){var h=t(u,l.selector);s||(s=e(c,r)),h=h.replace(ir,s);var f=l.key+"-"+u;"replaceRule"in c?c.replaceRule(f,i[u],jn({},a,{selector:h})):c.addRule(f,i[u],jn({},a,{selector:h}))}else p&&c.addRule(u,{},a).addRule(l.key,i[u],{selector:l.selector});delete i[u]}}return i}}}var rr=/[A-Z]/g,ar=/^ms-/,sr={};function lr(e){return"-"+e.toLowerCase()}function cr(e){if(sr.hasOwnProperty(e))return sr[e];var t=e.replace(rr,lr);return sr[e]=ar.test(t)?"-"+t:t}function ur(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:cr(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(ur):t.fallbacks=ur(e.fallbacks)),t}var dr=Vo&&CSS?CSS.px:"px",pr=Vo&&CSS?CSS.ms:"ms",hr=Vo&&CSS?CSS.percent:"%";function fr(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},i={};for(var o in e)i[o]=e[o],i[o.replace(t,n)]=e[o];return i}var mr=fr({"animation-delay":pr,"animation-duration":pr,"background-position":dr,"background-position-x":dr,"background-position-y":dr,"background-size":dr,border:dr,"border-bottom":dr,"border-bottom-left-radius":dr,"border-bottom-right-radius":dr,"border-bottom-width":dr,"border-left":dr,"border-left-width":dr,"border-radius":dr,"border-right":dr,"border-right-width":dr,"border-top":dr,"border-top-left-radius":dr,"border-top-right-radius":dr,"border-top-width":dr,"border-width":dr,"border-block":dr,"border-block-end":dr,"border-block-end-width":dr,"border-block-start":dr,"border-block-start-width":dr,"border-block-width":dr,"border-inline":dr,"border-inline-end":dr,"border-inline-end-width":dr,"border-inline-start":dr,"border-inline-start-width":dr,"border-inline-width":dr,"border-start-start-radius":dr,"border-start-end-radius":dr,"border-end-start-radius":dr,"border-end-end-radius":dr,margin:dr,"margin-bottom":dr,"margin-left":dr,"margin-right":dr,"margin-top":dr,"margin-block":dr,"margin-block-end":dr,"margin-block-start":dr,"margin-inline":dr,"margin-inline-end":dr,"margin-inline-start":dr,padding:dr,"padding-bottom":dr,"padding-left":dr,"padding-right":dr,"padding-top":dr,"padding-block":dr,"padding-block-end":dr,"padding-block-start":dr,"padding-inline":dr,"padding-inline-end":dr,"padding-inline-start":dr,"mask-position-x":dr,"mask-position-y":dr,"mask-size":dr,height:dr,width:dr,"min-height":dr,"max-height":dr,"min-width":dr,"max-width":dr,bottom:dr,left:dr,top:dr,right:dr,inset:dr,"inset-block":dr,"inset-block-end":dr,"inset-block-start":dr,"inset-inline":dr,"inset-inline-end":dr,"inset-inline-start":dr,"box-shadow":dr,"text-shadow":dr,"column-gap":dr,"column-rule":dr,"column-rule-width":dr,"column-width":dr,"font-size":dr,"font-size-delta":dr,"letter-spacing":dr,"text-decoration-thickness":dr,"text-indent":dr,"text-stroke":dr,"text-stroke-width":dr,"word-spacing":dr,motion:dr,"motion-offset":dr,outline:dr,"outline-offset":dr,"outline-width":dr,perspective:dr,"perspective-origin-x":hr,"perspective-origin-y":hr,"transform-origin":hr,"transform-origin-x":hr,"transform-origin-y":hr,"transform-origin-z":hr,"transition-delay":pr,"transition-duration":pr,"vertical-align":dr,"flex-basis":dr,"shape-margin":dr,size:dr,gap:dr,grid:dr,"grid-gap":dr,"row-gap":dr,"grid-row-gap":dr,"grid-column-gap":dr,"grid-template-rows":dr,"grid-template-columns":dr,"grid-auto-rows":dr,"grid-auto-columns":dr,"box-shadow-x":dr,"box-shadow-y":dr,"box-shadow-blur":dr,"box-shadow-spread":dr,"font-line-height":dr,"text-shadow-x":dr,"text-shadow-y":dr,"text-shadow-blur":dr});function gr(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]=gr(e,t[i],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=gr(o,t[o],n);else for(var r in t)t[r]=gr(e+"-"+r,t[r],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||mr[e];return!a||0===t&&a===dr?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function vr(e){void 0===e&&(e={});var t=fr(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var i in e)e[i]=gr(i,e[i],t);return e},onChangeValue:function(e,n){return gr(n,e,t)}}}var yr="",br="",xr="",Sr="",Cr=qi&&"ontouchstart"in document.documentElement;if(qi){var wr={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Er=document.createElement("p").style;for(var kr in wr)if(kr+"Transform"in Er){yr=kr,br=wr[kr];break}"Webkit"===yr&&"msHyphens"in Er&&(yr="ms",br=wr.ms,Sr="edge"),"Webkit"===yr&&"-apple-trailing-word"in Er&&(xr="apple")}var Rr=yr,Tr=br,qr=xr,Dr=Sr,Pr=Cr;var Ir={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Rr?"-webkit-"+e:Tr+e)}},Mr={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Rr?Tr+"print-"+e:e)}},Nr=/[-\s]+(.)?/g;function Or(e,t){return t?t.toUpperCase():""}function Lr(e){return e.replace(Nr,Or)}function Ar(e){return Lr("-"+e)}var zr,jr={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Rr){var n="mask-image";if(Lr(n)in t)return e;if(Rr+Ar(n)in t)return Tr+e}return e}},Fr={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==qr||Pr?e:Tr+e)}},_r={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Tr+e)}},$r={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Tr+e)}},Hr={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Rr||"ms"===Rr&&"edge"!==Dr?Tr+e:e)}},Vr={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Rr||"ms"===Rr||"apple"===qr?Tr+e:e)}},Wr={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Rr?"WebkitColumn"+Ar(e)in t&&Tr+"column-"+e:"Moz"===Rr&&("page"+Ar(e)in t&&"page-"+e))}},Ur={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Rr)return e;var n=e.replace("-inline","");return Rr+Ar(n)in t&&Tr+n}},Br={supportedProperty:function(e,t){return Lr(e)in t&&e}},Gr={supportedProperty:function(e,t){var n=Ar(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Rr+n in t?Tr+e:"Webkit"!==Rr&&"Webkit"+n in t&&"-webkit-"+e}},Kr={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Rr?""+Tr+e:e)}},Jr={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Rr?Tr+"scroll-chaining":e)}},Zr={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Xr={supportedProperty:function(e,t){var n=Zr[e];return!!n&&(Rr+Ar(n)in t&&Tr+n)}},Yr={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Qr=Object.keys(Yr),ea=function(e){return Tr+e},ta={supportedProperty:function(e,t,n){var i=n.multiple;if(Qr.indexOf(e)>-1){var o=Yr[e];if(!Array.isArray(o))return Rr+Ar(o)in t&&Tr+o;if(!i)return!1;for(var r=0;r<o.length;r++)if(!(Rr+Ar(o[0])in t))return!1;return o.map(ea)}return!1}},na=[Ir,Mr,jr,Fr,_r,$r,Hr,Vr,Wr,Ur,Br,Gr,Kr,Jr,Xr,ta],ia=na.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),oa=na.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,fi(t.noPrefill)),e}),[]),ra={};if(qi){zr=document.createElement("p");var aa=window.getComputedStyle(document.documentElement,"");for(var sa in aa)isNaN(sa)||(ra[aa[sa]]=aa[sa]);oa.forEach((function(e){return delete ra[e]}))}function la(e,t){if(void 0===t&&(t={}),!zr)return e;if(null!=ra[e])return ra[e];"transition"!==e&&"transform"!==e||(t[e]=e in zr.style);for(var n=0;n<ia.length&&(ra[e]=ia[n](e,zr.style,t),!ra[e]);n++);try{zr.style[e]=""}catch(e){return!1}return ra[e]}var ca,ua={},da={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},pa=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function ha(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var i=t?la(t):", "+la(n);return i||(t||n)}function fa(e,t){var n=t;if(!ca||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var i=e+n;if(null!=ua[i])return ua[i];try{ca.style[e]=n}catch(e){return ua[i]=!1,!1}if(da[e])n=n.replace(pa,ha);else if(""===ca.style[e]&&("-ms-flex"===(n=Tr+n)&&(ca.style[e]="-ms-flexbox"),ca.style[e]=n,""===ca.style[e]))return ua[i]=!1,!1;return ca.style[e]="",ua[i]=n,ua[i]}function ma(){function e(t){for(var n in t){var i=t[n];if("fallbacks"===n&&Array.isArray(i))t[n]=i.map(e);else{var o=!1,r=la(n);r&&r!==n&&(o=!0);var a=!1,s=fa(r,zi(i));s&&s!==i&&(a=!0),(o||a)&&(o&&delete t[n],t[r||n]=s||i)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Rr?e:"@"+Tr+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return fa(t,zi(e))||e}}}function ga(){return{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var i=Li(e,{},n);return i[Go]=t,i},onProcessStyle:function(e,t){if(Bo in t||Go in t)return e;var n={};for(var i in e){var o=e[i];"function"==typeof o&&(delete e[i],n[i]=o)}return t[Bo]=n,e},onUpdate:function(e,t,n,i){var o=t,r=o[Go];r&&(o.style=r(e)||{});var a=o[Bo];if(a)for(var s in a)o.prop(s,a[s](e),i)}},er(),or(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=ur(e[t]);return e}return ur(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var i=cr(t);return t===i?e:(n.prop(i,e),null)}},vr(),"undefined"==typeof window?null:ma(),(e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var i={},o=Object.keys(t).sort(e),r=0;r<o.length;r++)i[o[r]]=t[o[r]];return i}})]};var e}function va(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var i=jn({},t);return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}qi&&(ca=document.createElement("p"));var ya=function(e,t,n,i){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,i)},ba=function(e,t,n){var i=e.get(t);return i?i.get(n):void 0},xa=function(e,t,n){e.get(t).delete(n)},Sa=v.createContext(null);function Ca(){return v.useContext(Sa)}var wa,Ea=Ho(ga()),ka={disableGeneration:!1,generateClassName:ki(),jss:Ea,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Ra=v.createContext(ka);function Ta(e){var t=e.children,n=e.injectFirst,i=void 0!==n&&n,o=e.disableGeneration,r=void 0!==o&&o,a=Xn(e,["children","injectFirst","disableGeneration"]),s=jn({},v.useContext(Ra),{disableGeneration:r},a);if(!s.jss.options.insertionPoint&&i&&"undefined"!=typeof window){if(!wa){var l=document.head;wa=document.createComment("mui-inject-first"),l.insertBefore(wa,l.firstChild)}s.jss=Ho({plugins:ga().plugins,insertionPoint:wa})}return v.createElement(Ra.Provider,{value:s},t)}var qa=-1e9;var Da={};function Pa(e,t){var n=e.state,i=e.theme,o=e.stylesOptions,r=e.stylesCreator,a=e.name;if(!o.disableGeneration){var s=ba(o.sheetsManager,r,i);s||(s={refs:0,staticSheet:null,dynamicStyles:null},ya(o.sheetsManager,r,i,s));var l=jn({},r.options,o,{theme:i,flip:"boolean"==typeof o.flip?o.flip:"rtl"===i.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var c=o.sheetsRegistry;if(0===s.refs){var u;o.sheetsCache&&(u=ba(o.sheetsCache,r,i));var d=r.create(i,a);u||((u=o.jss.createStyleSheet(d,jn({link:!1},l))).attach(),o.sheetsCache&&ya(o.sheetsCache,r,i,u)),c&&c.add(u),s.staticSheet=u,s.dynamicStyles=Wo(d)}if(s.dynamicStyles){var p=o.jss.createStyleSheet(s.dynamicStyles,jn({link:!0},l));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=va({baseClasses:s.staticSheet.classes,newClasses:p.classes}),c&&c.add(p)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Ia(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,o=t.Component,r=t.defaultTheme,a=void 0===r?Da:r,s=Xn(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,i){var o;try{o=t?e(n):e}catch(e){throw e}if(!i||!n.overrides||!n.overrides[i])return o;var r=n.overrides[i],a=jn({},o);return Object.keys(r).forEach((function(e){a[e]=$n(a[e],r[e])})),a},options:{}}}(e),c=n||i||"makeStyles";l.options={index:qa+=1,name:n,meta:c,classNamePrefix:c};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Ca()||a,i=jn({},v.useContext(Ra),s),r=v.useRef(),c=v.useRef();!function(e,t){var n,i=v.useRef([]),o=v.useMemo((function(){return{}}),t);i.current!==o&&(i.current=o,n=e()),v.useEffect((function(){return function(){n&&n()}}),[o])}((function(){var o={name:n,state:{},stylesCreator:l,stylesOptions:i,theme:t};return Pa(o,e),c.current=!1,r.current=o,function(){!function(e){var t=e.state,n=e.theme,i=e.stylesOptions,o=e.stylesCreator;if(!i.disableGeneration){var r=ba(i.sheetsManager,o,n);r.refs-=1;var a=i.sheetsRegistry;0===r.refs&&(xa(i.sheetsManager,o,n),i.jss.removeStyleSheet(r.staticSheet),a&&a.remove(r.staticSheet)),t.dynamicSheet&&(i.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(o)}}),[t,l]),v.useEffect((function(){c.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(r.current,e),c.current=!0}));var u=function(e,t,n){var i=e.state;if(e.stylesOptions.disableGeneration)return t||{};i.cacheClasses||(i.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return i.classes!==i.cacheClasses.lastJSS&&(i.cacheClasses.lastJSS=i.classes,o=!0),t!==i.cacheClasses.lastProp&&(i.cacheClasses.lastProp=t,o=!0),o&&(i.cacheClasses.value=va({baseClasses:i.cacheClasses.lastJSS,newClasses:t,Component:n})),i.cacheClasses.value}(r.current,e.classes,o);return u}}function Ma(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ma(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Na(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Ma(e))&&(i&&(i+=" "),i+=t);return i}var Oa={exports:{}},La={},Aa="function"==typeof Symbol&&Symbol.for,za=Aa?Symbol.for("react.element"):60103,ja=Aa?Symbol.for("react.portal"):60106,Fa=Aa?Symbol.for("react.fragment"):60107,_a=Aa?Symbol.for("react.strict_mode"):60108,$a=Aa?Symbol.for("react.profiler"):60114,Ha=Aa?Symbol.for("react.provider"):60109,Va=Aa?Symbol.for("react.context"):60110,Wa=Aa?Symbol.for("react.async_mode"):60111,Ua=Aa?Symbol.for("react.concurrent_mode"):60111,Ba=Aa?Symbol.for("react.forward_ref"):60112,Ga=Aa?Symbol.for("react.suspense"):60113,Ka=Aa?Symbol.for("react.suspense_list"):60120,Ja=Aa?Symbol.for("react.memo"):60115,Za=Aa?Symbol.for("react.lazy"):60116,Xa=Aa?Symbol.for("react.block"):60121,Ya=Aa?Symbol.for("react.fundamental"):60117,Qa=Aa?Symbol.for("react.responder"):60118,es=Aa?Symbol.for("react.scope"):60119;function ts(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case za:switch(e=e.type){case Wa:case Ua:case Fa:case $a:case _a:case Ga:return e;default:switch(e=e&&e.$$typeof){case Va:case Ba:case Za:case Ja:case Ha:return e;default:return t}}case ja:return t}}}function ns(e){return ts(e)===Ua}La.AsyncMode=Wa,La.ConcurrentMode=Ua,La.ContextConsumer=Va,La.ContextProvider=Ha,La.Element=za,La.ForwardRef=Ba,La.Fragment=Fa,La.Lazy=Za,La.Memo=Ja,La.Portal=ja,La.Profiler=$a,La.StrictMode=_a,La.Suspense=Ga,La.isAsyncMode=function(e){return ns(e)||ts(e)===Wa},La.isConcurrentMode=ns,La.isContextConsumer=function(e){return ts(e)===Va},La.isContextProvider=function(e){return ts(e)===Ha},La.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===za},La.isForwardRef=function(e){return ts(e)===Ba},La.isFragment=function(e){return ts(e)===Fa},La.isLazy=function(e){return ts(e)===Za},La.isMemo=function(e){return ts(e)===Ja},La.isPortal=function(e){return ts(e)===ja},La.isProfiler=function(e){return ts(e)===$a},La.isStrictMode=function(e){return ts(e)===_a},La.isSuspense=function(e){return ts(e)===Ga},La.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Fa||e===Ua||e===$a||e===_a||e===Ga||e===Ka||"object"==typeof e&&null!==e&&(e.$$typeof===Za||e.$$typeof===Ja||e.$$typeof===Ha||e.$$typeof===Va||e.$$typeof===Ba||e.$$typeof===Ya||e.$$typeof===Qa||e.$$typeof===es||e.$$typeof===Xa)},La.typeOf=ts,Oa.exports=La;var is=Oa.exports,os={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},rs={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},as={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ss={};function ls(e){return is.isMemo(e)?as:ss[e.$$typeof]||os}ss[is.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ss[is.Memo]=as;var cs=Object.defineProperty,us=Object.getOwnPropertyNames,ds=Object.getOwnPropertySymbols,ps=Object.getOwnPropertyDescriptor,hs=Object.getPrototypeOf,fs=Object.prototype;var ms=function e(t,n,i){if("string"!=typeof n){if(fs){var o=hs(n);o&&o!==fs&&e(t,o,i)}var r=us(n);ds&&(r=r.concat(ds(n)));for(var a=ls(t),s=ls(n),l=0;l<r.length;++l){var c=r[l];if(!(rs[c]||i&&i[c]||s&&s[c]||a&&a[c])){var u=ps(n,c);try{cs(t,c,u)}catch(e){}}}}return t},gs=Y(ms);function vs(e){return function(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.name,r=Xn(i,["name"]),a=o,s="function"==typeof t?function(e){return{root:function(n){return t(jn({theme:e},n))}}}:{root:t},l=Ia(s,jn({Component:e,name:o||e.displayName,classNamePrefix:a},r));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var c=v.forwardRef((function(t,i){var o,r,a,s=t.children,c=t.className,u=t.clone,d=t.component,p=Xn(t,["children","className","clone","component"]),h=Na(l(t).root,c),f=p;if(n&&(o=f,r=n,a={},Object.keys(o).forEach((function(e){-1===r.indexOf(e)&&(a[e]=o[e])})),f=a),u)return v.cloneElement(s,jn({className:Na(s.props.className,h)},f));if("function"==typeof s)return s(jn({className:h},f));var m=d||e;return v.createElement(m,jn({ref:i,className:h},f),s)}));return gs(c,e),c}}function ys(e){var t=e.children,n=e.theme,i=Ca(),o=v.useMemo((function(){var e=null===i?n:function(e,t){return"function"==typeof t?t(e):jn({},e,t)}(i,n);return null!=e&&(e[wi]=null!==i),e}),[n,i]);return v.createElement(Sa.Provider,{value:o},t)}var bs=Ci(),xs=function(e){var t=vs(e);return function(e,n){return t(e,jn({defaultTheme:bs},n))}};function Ss(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=t.defaultTheme,o=t.withTheme,r=void 0!==o&&o,a=t.name,s=Xn(t,["defaultTheme","withTheme","name"]),l=a,c=Ia(e,jn({defaultTheme:i,Component:n,name:a||n.displayName,classNamePrefix:l},s)),u=v.forwardRef((function(e,t){e.classes;var o,s=e.innerRef,l=Xn(e,["classes","innerRef"]),u=c(jn({},n.defaultProps,e)),d=l;return("string"==typeof a||r)&&(o=Ca()||i,a&&(d=Ri({theme:o,name:a,props:l})),r&&!d.theme&&(d.theme=o)),v.createElement(n,jn({ref:s||t,classes:u},d))}));return gs(u,n),u}}(e,jn({defaultTheme:bs},t))}function Cs(e){if("string"!=typeof e)throw new Error(Wn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ws(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];e.apply(this,i),t.apply(this,i)}}),(function(){}))}function Es(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Es(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function ks(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Es(e))&&(i&&(i+=" "),i+=t);return i}function Rs(e){return e&&e.ownerDocument||document}function Ts(e){return Rs(e).defaultView||window}function qs(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Ds="undefined"!=typeof window?y.useLayoutEffect:y.useEffect;function Ps(e){var t=y.useRef(e);return Ds((function(){t.current=e})),y.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Is(e,t){return y.useMemo((function(){return null==e&&null==t?null:function(n){qs(e,n),qs(t,n)}}),[e,t])}var Ms=!0,Ns=!1,Os=null,Ls={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function As(e){e.metaKey||e.altKey||e.ctrlKey||(Ms=!0)}function zs(){Ms=!1}function js(){"hidden"===this.visibilityState&&Ns&&(Ms=!0)}function Fs(e){var t,n,i,o=e.target;try{return o.matches(":focus-visible")}catch(e){}return Ms||(n=(t=o).type,!("INPUT"!==(i=t.tagName)||!Ls[n]||t.readOnly)||"TEXTAREA"===i&&!t.readOnly||!!t.isContentEditable)}function _s(){Ns=!0,window.clearTimeout(Os),Os=window.setTimeout((function(){Ns=!1}),100)}function $s(){return{isFocusVisible:Fs,onBlurVisible:_s,ref:y.useCallback((function(e){var t,n=C.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",As,!0),t.addEventListener("mousedown",zs,!0),t.addEventListener("pointerdown",zs,!0),t.addEventListener("touchstart",zs,!0),t.addEventListener("visibilitychange",js,!0))}),[])}}var Hs=!1,Vs=v.createContext(null),Ws="unmounted",Us="exited",Bs="entering",Gs="entered",Ks="exiting",Js=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var o,r=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?r?(o=Us,i.appearStatus=Bs):o=Gs:o=t.unmountOnExit||t.mountOnEnter?Ws:Us,i.state={status:o},i.nextCallback=null,i}Ii(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ws?{status:Us}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Bs&&n!==Gs&&(t=Bs):n!==Bs&&n!==Gs||(t=Ks)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Bs){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Us&&this.setState({status:Ws})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,o=this.props.nodeRef?[i]:[w.findDOMNode(this),i],r=o[0],a=o[1],s=this.getTimeouts(),l=i?s.appear:s.enter;!e&&!n||Hs?this.safeSetState({status:Gs},(function(){t.props.onEntered(r)})):(this.props.onEnter(r,a),this.safeSetState({status:Bs},(function(){t.props.onEntering(r,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Gs},(function(){t.props.onEntered(r,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:w.findDOMNode(this);t&&!Hs?(this.props.onExit(i),this.safeSetState({status:Ks},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Us},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:Us},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,t.nextCallback=null,e(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=o[0],a=o[1];this.props.addEndListener(r,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Ws)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var i=Zn(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return v.createElement(Vs.Provider,{value:null},"function"==typeof n?n(e,i):v.cloneElement(v.Children.only(n),i))},t}(v.Component);function Zs(){}function Xs(e,t){var n=Object.create(null);return e&&S.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&b(e)?t(e):e}(e)})),n}function Ys(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Qs(e,t,n){var i=Xs(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var i,o=Object.create(null),r=[];for(var a in e)a in t?r.length&&(o[a]=r,r=[]):r.push(a);var s={};for(var l in t){if(o[l])for(i=0;i<o[l].length;i++){var c=o[l][i];s[o[l][i]]=n(c)}s[l]=n(l)}for(i=0;i<r.length;i++)s[r[i]]=n(r[i]);return s}(t,i);return Object.keys(o).forEach((function(r){var a=o[r];if(b(a)){var s=r in t,l=r in i,c=t[r],u=b(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&b(c)&&(o[r]=x(a,{onExited:n.bind(null,a),in:c.props.in,exit:Ys(a,"exit",e),enter:Ys(a,"enter",e)})):o[r]=x(a,{in:!1}):o[r]=x(a,{onExited:n.bind(null,a),in:!0,exit:Ys(a,"exit",e),enter:Ys(a,"enter",e)})}})),o}Js.contextType=Vs,Js.propTypes={},Js.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zs,onEntering:Zs,onEntered:Zs,onExit:Zs,onExiting:Zs,onExited:Zs},Js.UNMOUNTED=Ws,Js.EXITED=Us,Js.ENTERING=Bs,Js.ENTERED=Gs,Js.EXITING=Ks;var el=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},tl=function(e){function t(t,n){var i,o=(i=e.call(this,t,n)||this).handleExited.bind(Mi(i));return i.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},i}Ii(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,i,o=t.children,r=t.handleExited;return{children:t.firstRender?(n=e,i=r,Xs(n.children,(function(e){return x(e,{onExited:i.bind(null,e),in:!0,appear:Ys(e,"appear",n),enter:Ys(e,"enter",n),exit:Ys(e,"exit",n)})}))):Qs(e,o,r),firstRender:!1}},n.handleExited=function(e,t){var n=Xs(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=jn({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,i=Zn(e,["component","childFactory"]),o=this.state.contextValue,r=el(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===t?v.createElement(Vs.Provider,{value:o},r):v.createElement(Vs.Provider,{value:o},v.createElement(t,i,r))},t}(v.Component);tl.propTypes={},tl.defaultProps={component:"div",childFactory:function(e){return e}};function nl(e,t){var n=e.timeout,i=e.style,o=void 0===i?{}:i;return{duration:o.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}var il=y.forwardRef((function(e,t){var n=e.classes,i=e.className,o=e.component,r=void 0===o?"div":o,a=e.square,s=void 0!==a&&a,l=e.elevation,c=void 0===l?1:l,u=e.variant,d=void 0===u?"elevation":u,p=Xn(e,["classes","className","component","square","elevation","variant"]);return y.createElement(r,jn({className:ks(n.root,i,"outlined"===d?n.outlined:n["elevation".concat(c)],!s&&n.rounded),ref:t},p))})),ol=Ss((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),jn({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(il),rl="undefined"==typeof window?y.useEffect:y.useLayoutEffect;function al(e){var t=e.classes,n=e.pulsate,i=void 0!==n&&n,o=e.rippleX,r=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,c=void 0===l?function(){}:l,u=e.timeout,d=y.useState(!1),p=d[0],h=d[1],f=ks(t.ripple,t.rippleVisible,i&&t.ripplePulsate),m={width:a,height:a,top:-a/2+r,left:-a/2+o},g=ks(t.child,p&&t.childLeaving,i&&t.childPulsate),v=Ps(c);return rl((function(){if(!s){h(!0);var e=setTimeout(v,u);return function(){clearTimeout(e)}}}),[v,s,u]),y.createElement("span",{className:f,style:m},y.createElement("span",{className:g}))}var sl=y.forwardRef((function(e,t){var n=e.center,i=void 0!==n&&n,o=e.classes,r=e.className,a=Xn(e,["center","classes","className"]),s=y.useState([]),l=s[0],c=s[1],u=y.useRef(0),d=y.useRef(null);y.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var p=y.useRef(!1),h=y.useRef(null),f=y.useRef(null),m=y.useRef(null);y.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var g=y.useCallback((function(e){var t=e.pulsate,n=e.rippleX,i=e.rippleY,r=e.rippleSize,a=e.cb;c((function(e){return[].concat(fi(e),[y.createElement(al,{key:u.current,classes:o,timeout:550,pulsate:t,rippleX:n,rippleY:i,rippleSize:r})])})),u.current+=1,d.current=a}),[o]),v=y.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=t.pulsate,r=void 0!==o&&o,a=t.center,s=void 0===a?i||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&p.current)p.current=!1;else{"touchstart"===e.type&&(p.current=!0);var u,d,v,y=c?null:m.current,b=y?y.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,S=x.clientX,C=x.clientY;u=Math.round(S-b.left),d=Math.round(C-b.top)}if(s)(v=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(v+=1);else{var w=2*Math.max(Math.abs((y?y.clientWidth:0)-u),u)+2,E=2*Math.max(Math.abs((y?y.clientHeight:0)-d),d)+2;v=Math.sqrt(Math.pow(w,2)+Math.pow(E,2))}e.touches?null===f.current&&(f.current=function(){g({pulsate:r,rippleX:u,rippleY:d,rippleSize:v,cb:n})},h.current=setTimeout((function(){f.current&&(f.current(),f.current=null)}),80)):g({pulsate:r,rippleX:u,rippleY:d,rippleSize:v,cb:n})}}),[i,g]),b=y.useCallback((function(){v({},{pulsate:!0})}),[v]),x=y.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&f.current)return e.persist(),f.current(),f.current=null,void(h.current=setTimeout((function(){x(e,t)})));f.current=null,c((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return y.useImperativeHandle(t,(function(){return{pulsate:b,start:v,stop:x}}),[b,v,x]),y.createElement("span",jn({className:ks(o.root,r),ref:m},a),y.createElement(tl,{component:null,exit:!0},l))})),ll=Ss((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(y.memo(sl)),cl=y.forwardRef((function(e,t){var n=e.action,i=e.buttonRef,o=e.centerRipple,r=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"button":c,d=e.disabled,p=void 0!==d&&d,h=e.disableRipple,f=void 0!==h&&h,m=e.disableTouchRipple,g=void 0!==m&&m,v=e.focusRipple,b=void 0!==v&&v,x=e.focusVisibleClassName,S=e.onBlur,w=e.onClick,E=e.onFocus,k=e.onFocusVisible,R=e.onKeyDown,T=e.onKeyUp,q=e.onMouseDown,D=e.onMouseLeave,P=e.onMouseUp,I=e.onTouchEnd,M=e.onTouchMove,N=e.onTouchStart,O=e.onDragLeave,L=e.tabIndex,A=void 0===L?0:L,z=e.TouchRippleProps,j=e.type,F=void 0===j?"button":j,_=Xn(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),$=y.useRef(null);var H=y.useRef(null),V=y.useState(!1),W=V[0],U=V[1];p&&W&&U(!1);var B=$s(),G=B.isFocusVisible,K=B.onBlurVisible,J=B.ref;function Z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return Ps((function(i){return t&&t(i),!n&&H.current&&H.current[e](i),!0}))}y.useImperativeHandle(n,(function(){return{focusVisible:function(){U(!0),$.current.focus()}}}),[]),y.useEffect((function(){W&&b&&!f&&H.current.pulsate()}),[f,b,W]);var X=Z("start",q),Y=Z("stop",O),Q=Z("stop",P),ee=Z("stop",(function(e){W&&e.preventDefault(),D&&D(e)})),te=Z("start",N),ne=Z("stop",I),ie=Z("stop",M),oe=Z("stop",(function(e){W&&(K(e),U(!1)),S&&S(e)}),!1),re=Ps((function(e){$.current||($.current=e.currentTarget),G(e)&&(U(!0),k&&k(e)),E&&E(e)})),ae=function(){var e=C.findDOMNode($.current);return u&&"button"!==u&&!("A"===e.tagName&&e.href)},se=y.useRef(!1),le=Ps((function(e){b&&!se.current&&W&&H.current&&" "===e.key&&(se.current=!0,e.persist(),H.current.stop(e,(function(){H.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!p&&(e.preventDefault(),w&&w(e))})),ce=Ps((function(e){b&&" "===e.key&&H.current&&W&&!e.defaultPrevented&&(se.current=!1,e.persist(),H.current.stop(e,(function(){H.current.pulsate(e)}))),T&&T(e),w&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&w(e)})),ue=u;"button"===ue&&_.href&&(ue="a");var de={};"button"===ue?(de.type=F,de.disabled=p):("a"===ue&&_.href||(de.role="button"),de["aria-disabled"]=p);var pe=Is(i,t),he=Is(J,$),fe=Is(pe,he),me=y.useState(!1),ge=me[0],ve=me[1];y.useEffect((function(){ve(!0)}),[]);var ye=ge&&!f&&!p;return y.createElement(ue,jn({className:ks(s.root,l,W&&[s.focusVisible,x],p&&s.disabled),onBlur:oe,onClick:w,onFocus:re,onKeyDown:le,onKeyUp:ce,onMouseDown:X,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Y,onTouchEnd:ne,onTouchMove:ie,onTouchStart:te,ref:fe,tabIndex:p?-1:A},de,_),a,ye?y.createElement(ll,jn({ref:H,center:r},z)):null)})),ul=Ss({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(cl),dl={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},pl=y.forwardRef((function(e,t){var n=e.align,i=void 0===n?"inherit":n,o=e.classes,r=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,c=e.display,u=void 0===c?"initial":c,d=e.gutterBottom,p=void 0!==d&&d,h=e.noWrap,f=void 0!==h&&h,m=e.paragraph,g=void 0!==m&&m,v=e.variant,b=void 0===v?"body1":v,x=e.variantMapping,S=void 0===x?dl:x,C=Xn(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),w=l||(g?"p":S[b]||dl[b])||"span";return y.createElement(w,jn({className:ks(o.root,r,"inherit"!==b&&o[b],"initial"!==s&&o["color".concat(Cs(s))],f&&o.noWrap,p&&o.gutterBottom,g&&o.paragraph,"inherit"!==i&&o["align".concat(Cs(i))],"initial"!==u&&o["display".concat(Cs(u))]),ref:t},C))})),hl=Ss((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(pl),fl=y.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.color,a=void 0===r?"default":r,s=e.component,l=void 0===s?"button":s,c=e.disabled,u=void 0!==c&&c,d=e.disableElevation,p=void 0!==d&&d,h=e.disableFocusRipple,f=void 0!==h&&h,m=e.endIcon,g=e.focusVisibleClassName,v=e.fullWidth,b=void 0!==v&&v,x=e.size,S=void 0===x?"medium":x,C=e.startIcon,w=e.type,E=void 0===w?"button":w,k=e.variant,R=void 0===k?"text":k,T=Xn(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),q=C&&y.createElement("span",{className:ks(i.startIcon,i["iconSize".concat(Cs(S))])},C),D=m&&y.createElement("span",{className:ks(i.endIcon,i["iconSize".concat(Cs(S))])},m);return y.createElement(ul,jn({className:ks(i.root,i[R],o,"inherit"===a?i.colorInherit:"default"!==a&&i["".concat(R).concat(Cs(a))],"medium"!==S&&[i["".concat(R,"Size").concat(Cs(S))],i["size".concat(Cs(S))]],p&&i.disableElevation,u&&i.disabled,b&&i.fullWidth),component:l,disabled:u,focusRipple:!f,focusVisibleClassName:ks(i.focusVisible,g),ref:t,type:E},T),y.createElement("span",{className:i.label},q,n,D))})),ml=Ss((function(e){return{root:jn({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Jn(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Jn(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Jn(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Jn(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Jn(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Jn(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Jn(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(fl);var gl="undefined"!=typeof window?y.useLayoutEffect:y.useEffect,vl=y.forwardRef((function(e,t){var n=e.children,i=e.container,o=e.disablePortal,r=void 0!==o&&o,a=e.onRendered,s=y.useState(null),l=s[0],c=s[1],u=Is(y.isValidElement(n)?n.ref:null,t);return gl((function(){r||c(function(e){return e="function"==typeof e?e():e,C.findDOMNode(e)}(i)||document.body)}),[i,r]),gl((function(){if(l&&!r)return qs(t,l),function(){qs(t,null)}}),[t,l,r]),gl((function(){a&&(l||r)&&a()}),[a,l,r]),r?y.isValidElement(n)?y.cloneElement(n,{ref:u}):n:l?C.createPortal(n,l):l}));function yl(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function bl(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function xl(e,t,n){var i=arguments.length>4?arguments[4]:void 0,o=[t,n].concat(fi(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),r=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===r.indexOf(e.tagName)&&yl(e,i)}))}function Sl(e,t){var n=-1;return e.some((function(e,i){return!!t(e)&&(n=i,!0)})),n}function Cl(e,t){var n,i=[],o=[],r=e.container;if(!t.disableScrollLock){if(function(e){var t=Rs(e);return t.body===e?Ts(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();i.push({value:r.style.paddingRight,key:"padding-right",el:r}),r.style["padding-right"]="".concat(bl(r)+a,"px"),n=Rs(r).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(bl(e)+a,"px")}))}var s=r.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:r;i.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),i.forEach((function(e){var t=e.value,n=e.el,i=e.key;t?n.style.setProperty(i,t):n.style.removeProperty(i)}))}}var wl=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Di(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&yl(e.modalRef,!1);var i=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);xl(t,e.mountNode,e.modalRef,i,!0);var o=Sl(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:i}),n)}},{key:"mount",value:function(e,t){var n=Sl(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),i=this.containers[n];i.restore||(i.restore=Cl(i,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Sl(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),i=this.containers[n];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(t,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&yl(e.modalRef,!0),xl(i.container,e.mountNode,e.modalRef,i.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=i.modals[i.modals.length-1];o.modalRef&&yl(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function El(e){var t=e.children,n=e.disableAutoFocus,i=void 0!==n&&n,o=e.disableEnforceFocus,r=void 0!==o&&o,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,c=e.isEnabled,u=e.open,d=y.useRef(),p=y.useRef(null),h=y.useRef(null),f=y.useRef(),m=y.useRef(null),g=y.useCallback((function(e){m.current=C.findDOMNode(e)}),[]),v=Is(t.ref,g),b=y.useRef();return y.useEffect((function(){b.current=u}),[u]),!b.current&&u&&"undefined"!=typeof window&&(f.current=l().activeElement),y.useEffect((function(){if(u){var e=Rs(m.current);i||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){null!==m.current&&(e.hasFocus()&&!r&&c()&&!d.current?m.current&&!m.current.contains(e.activeElement)&&m.current.focus():d.current=!1)},n=function(t){!r&&c()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():p.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(f.current&&f.current.focus&&f.current.focus(),f.current=null)}}}),[i,r,s,c,u]),y.createElement(y.Fragment,null,y.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelStart"}),y.cloneElement(t,{ref:v}),y.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var kl={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Rl=y.forwardRef((function(e,t){var n=e.invisible,i=void 0!==n&&n,o=e.open,r=Xn(e,["invisible","open"]);return o?y.createElement("div",jn({"aria-hidden":!0,ref:t},r,{style:jn({},kl.root,i?kl.invisible:{},r.style)})):null}));var Tl=new wl,ql=y.forwardRef((function(e,t){var n=Ca(),i=Ri({name:"MuiModal",props:jn({},e),theme:n}),o=i.BackdropComponent,r=void 0===o?Rl:o,a=i.BackdropProps,s=i.children,l=i.closeAfterTransition,c=void 0!==l&&l,u=i.container,d=i.disableAutoFocus,p=void 0!==d&&d,h=i.disableBackdropClick,f=void 0!==h&&h,m=i.disableEnforceFocus,g=void 0!==m&&m,v=i.disableEscapeKeyDown,b=void 0!==v&&v,x=i.disablePortal,S=void 0!==x&&x,w=i.disableRestoreFocus,E=void 0!==w&&w,k=i.disableScrollLock,R=void 0!==k&&k,T=i.hideBackdrop,q=void 0!==T&&T,D=i.keepMounted,P=void 0!==D&&D,I=i.manager,M=void 0===I?Tl:I,N=i.onBackdropClick,O=i.onClose,L=i.onEscapeKeyDown,A=i.onRendered,z=i.open,j=Xn(i,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),F=y.useState(!0),_=F[0],$=F[1],H=y.useRef({}),V=y.useRef(null),W=y.useRef(null),U=Is(W,t),B=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(i),G=function(){return Rs(V.current)},K=function(){return H.current.modalRef=W.current,H.current.mountNode=V.current,H.current},J=function(){M.mount(K(),{disableScrollLock:R}),W.current.scrollTop=0},Z=Ps((function(){var e=function(e){return e="function"==typeof e?e():e,C.findDOMNode(e)}(u)||G().body;M.add(K(),e),W.current&&J()})),X=y.useCallback((function(){return M.isTopModal(K())}),[M]),Y=Ps((function(e){V.current=e,e&&(A&&A(),z&&X()?J():yl(W.current,!0))})),Q=y.useCallback((function(){M.remove(K())}),[M]);if(y.useEffect((function(){return function(){Q()}}),[Q]),y.useEffect((function(){z?Z():B&&c||Q()}),[z,Q,B,c,Z]),!P&&!z&&(!B||_))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:Si}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),B&&(te.onEnter=ws((function(){$(!1)}),s.props.onEnter),te.onExited=ws((function(){$(!0),c&&Q()}),s.props.onExited)),y.createElement(vl,{ref:Y,container:u,disablePortal:S},y.createElement("div",jn({ref:U,onKeyDown:function(e){"Escape"===e.key&&X()&&(L&&L(e),b||(e.stopPropagation(),O&&O(e,"escapeKeyDown")))},role:"presentation"},j,{style:jn({},ee.root,!z&&_?ee.hidden:{},j.style)}),q?null:y.createElement(r,jn({open:z,onClick:function(e){e.target===e.currentTarget&&(N&&N(e),!f&&O&&O(e,"backdropClick"))}},a)),y.createElement(El,{disableEnforceFocus:g,disableAutoFocus:p,disableRestoreFocus:E,getDoc:G,isEnabled:X,open:z},y.cloneElement(s,te))))})),Dl=y.forwardRef((function(e,t){var n=e.absolute,i=void 0!==n&&n,o=e.classes,r=e.className,a=e.component,s=void 0===a?"hr":a,l=e.flexItem,c=void 0!==l&&l,u=e.light,d=void 0!==u&&u,p=e.orientation,h=void 0===p?"horizontal":p,f=e.role,m=void 0===f?"hr"!==s?"separator":void 0:f,g=e.variant,v=void 0===g?"fullWidth":g,b=Xn(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return y.createElement(s,jn({className:ks(o.root,r,"fullWidth"!==v&&o[v],i&&o.absolute,c&&o.flexItem,d&&o.light,"vertical"===h&&o.vertical),role:m,ref:t},b))})),Pl=Ss((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:Jn(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(Dl);function Il(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Ml={entering:{opacity:1,transform:Il(1)},entered:{opacity:1,transform:"none"}},Nl=y.forwardRef((function(e,t){var n=e.children,i=e.disableStrictModeCompat,o=void 0!==i&&i,r=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,c=e.onExit,u=e.onExited,d=e.onExiting,p=e.style,h=e.timeout,f=void 0===h?"auto":h,m=e.TransitionComponent,g=void 0===m?Js:m,v=Xn(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),b=y.useRef(),x=y.useRef(),S=Ca()||bs,C=S.unstable_strictMode&&!o,w=y.useRef(null),E=Is(n.ref,t),k=Is(C?w:void 0,E),R=function(e){return function(t,n){if(e){var i=mi(C?[w.current,t]:[t,n],2),o=i[0],r=i[1];void 0===r?e(o):e(o,r)}}},T=R(l),q=R((function(e,t){!function(e){e.scrollTop}(e);var n,i=nl({style:p,timeout:f},{mode:"enter"}),o=i.duration,r=i.delay;"auto"===f?(n=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=n):n=o,e.style.transition=[S.transitions.create("opacity",{duration:n,delay:r}),S.transitions.create("transform",{duration:.666*n,delay:r})].join(","),a&&a(e,t)})),D=R(s),P=R(d),I=R((function(e){var t,n=nl({style:p,timeout:f},{mode:"exit"}),i=n.duration,o=n.delay;"auto"===f?(t=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=t):t=i,e.style.transition=[S.transitions.create("opacity",{duration:t,delay:o}),S.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=Il(.75),c&&c(e)})),M=R(u);return y.useEffect((function(){return function(){clearTimeout(b.current)}}),[]),y.createElement(g,jn({appear:!0,in:r,nodeRef:C?w:void 0,onEnter:q,onEntered:D,onEntering:T,onExit:I,onExited:M,onExiting:P,addEndListener:function(e,t){var n=C?e:t;"auto"===f&&(b.current=setTimeout(n,x.current||0))},timeout:"auto"===f?null:f},v),(function(e,t){return y.cloneElement(n,jn({style:jn({opacity:0,transform:Il(.75),visibility:"exited"!==e||r?void 0:"hidden"},Ml[e],p,n.props.style),ref:k},t))}))}));Nl.muiSupportAuto=!0;var Ol=y.createContext({}),Ll=y.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.component,a=void 0===r?"ul":r,s=e.dense,l=void 0!==s&&s,c=e.disablePadding,u=void 0!==c&&c,d=e.subheader,p=Xn(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=y.useMemo((function(){return{dense:l}}),[l]);return y.createElement(Ol.Provider,{value:h},y.createElement(a,jn({className:ks(i.root,o,l&&i.dense,!u&&i.padding,d&&i.subheader),ref:t},p),d,n))})),Al=Ss({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Ll),zl="undefined"==typeof window?y.useEffect:y.useLayoutEffect,jl=y.forwardRef((function(e,t){var n=e.alignItems,i=void 0===n?"center":n,o=e.autoFocus,r=void 0!==o&&o,a=e.button,s=void 0!==a&&a,l=e.children,c=e.classes,u=e.className,d=e.component,p=e.ContainerComponent,h=void 0===p?"li":p,f=e.ContainerProps,m=(f=void 0===f?{}:f).className,g=Xn(f,["className"]),v=e.dense,b=void 0!==v&&v,x=e.disabled,S=void 0!==x&&x,w=e.disableGutters,E=void 0!==w&&w,k=e.divider,R=void 0!==k&&k,T=e.focusVisibleClassName,q=e.selected,D=void 0!==q&&q,P=Xn(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),I=y.useContext(Ol),M={dense:b||I.dense||!1,alignItems:i},N=y.useRef(null);zl((function(){r&&N.current&&N.current.focus()}),[r]);var O,L,A=y.Children.toArray(l),z=A.length&&(O=A[A.length-1],L=["ListItemSecondaryAction"],y.isValidElement(O)&&-1!==L.indexOf(O.type.muiName)),j=Is(y.useCallback((function(e){N.current=C.findDOMNode(e)}),[]),t),F=jn({className:ks(c.root,u,M.dense&&c.dense,!E&&c.gutters,R&&c.divider,S&&c.disabled,s&&c.button,"center"!==i&&c.alignItemsFlexStart,z&&c.secondaryAction,D&&c.selected),disabled:S},P),_=d||"li";return s&&(F.component=d||"div",F.focusVisibleClassName=ks(c.focusVisible,T),_=ul),z?(_=F.component||d?_:"div","li"===h&&("li"===_?_="div":"li"===F.component&&(F.component="div")),y.createElement(Ol.Provider,{value:M},y.createElement(h,jn({className:ks(c.container,m),ref:j},g),y.createElement(_,F,A),A.pop()))):y.createElement(Ol.Provider,{value:M},y.createElement(_,jn({ref:j},F),A))})),Fl=Ss((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(jl),_l=y.forwardRef((function(e,t){var n=e.classes,i=e.className,o=Xn(e,["classes","className"]),r=y.useContext(Ol);return y.createElement("div",jn({className:ks(n.root,i,"flex-start"===r.alignItems&&n.alignItemsFlexStart),ref:t},o))})),$l=Ss((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(_l),Hl=y.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.disableTypography,a=void 0!==r&&r,s=e.inset,l=void 0!==s&&s,c=e.primary,u=e.primaryTypographyProps,d=e.secondary,p=e.secondaryTypographyProps,h=Xn(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),f=y.useContext(Ol).dense,m=null!=c?c:n;null==m||m.type===hl||a||(m=y.createElement(hl,jn({variant:f?"body2":"body1",className:i.primary,component:"span",display:"block"},u),m));var g=d;return null==g||g.type===hl||a||(g=y.createElement(hl,jn({variant:"body2",className:i.secondary,color:"textSecondary",display:"block"},p),g)),y.createElement("div",jn({className:ks(i.root,o,f&&i.dense,l&&i.inset,m&&g&&i.multiline),ref:t},h),m,g)})),Vl=Ss({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(Hl);function Wl(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Ul(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Bl(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function Gl(e){return"function"==typeof e?e():e}var Kl=y.forwardRef((function(e,t){var n=e.action,i=e.anchorEl,o=e.anchorOrigin,r=void 0===o?{vertical:"top",horizontal:"left"}:o,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,c=e.children,u=e.classes,d=e.className,p=e.container,h=e.elevation,f=void 0===h?8:h,m=e.getContentAnchorEl,g=e.marginThreshold,v=void 0===g?16:g,b=e.onEnter,x=e.onEntered,S=e.onEntering,w=e.onExit,E=e.onExited,k=e.onExiting,R=e.open,T=e.PaperProps,q=void 0===T?{}:T,D=e.transformOrigin,P=void 0===D?{vertical:"top",horizontal:"left"}:D,I=e.TransitionComponent,M=void 0===I?Nl:I,N=e.transitionDuration,O=void 0===N?"auto":N,L=e.TransitionProps,A=void 0===L?{}:L,z=Xn(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),j=y.useRef(),F=y.useCallback((function(e){if("anchorPosition"===l)return a;var t=Gl(i),n=(t&&1===t.nodeType?t:Rs(j.current).body).getBoundingClientRect(),o=0===e?r.vertical:"center";return{top:n.top+Wl(n,o),left:n.left+Ul(n,r.horizontal)}}),[i,r.horizontal,r.vertical,a,l]),_=y.useCallback((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var i=function(e,t){for(var n=t,i=0;n&&n!==e;)i+=(n=n.parentElement).scrollTop;return i}(e,n);t=n.offsetTop+n.clientHeight/2-i||0}}return t}),[r.vertical,l,m]),$=y.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Wl(e,P.vertical)+t,horizontal:Ul(e,P.horizontal)}}),[P.horizontal,P.vertical]),H=y.useCallback((function(e){var t=_(e),n={width:e.offsetWidth,height:e.offsetHeight},o=$(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Bl(o)};var r=F(t),a=r.top-o.vertical,s=r.left-o.horizontal,c=a+n.height,u=s+n.width,d=Ts(Gl(i)),p=d.innerHeight-v,h=d.innerWidth-v;if(a<v){var f=a-v;a-=f,o.vertical+=f}else if(c>p){var m=c-p;a-=m,o.vertical+=m}if(s<v){var g=s-v;s-=g,o.horizontal+=g}else if(u>h){var y=u-h;s-=y,o.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Bl(o)}}),[i,l,F,_,$,v]),V=y.useCallback((function(){var e=j.current;if(e){var t=H(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[H]),W=y.useCallback((function(e){j.current=C.findDOMNode(e)}),[]);y.useEffect((function(){R&&V()})),y.useImperativeHandle(n,(function(){return R?{updatePosition:function(){V()}}:null}),[R,V]),y.useEffect((function(){if(R){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function i(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,o)}),n)}return i.clear=function(){clearTimeout(t)},i}((function(){V()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[R,V]);var U=O;"auto"!==O||M.muiSupportAuto||(U=void 0);var B=p||(i?Rs(Gl(i)).body:void 0);return y.createElement(ql,jn({container:B,open:R,ref:t,BackdropProps:{invisible:!0},className:ks(u.root,d)},z),y.createElement(M,jn({appear:!0,in:R,onEnter:b,onEntered:x,onExit:w,onExited:E,onExiting:k,timeout:U},A,{onEntering:ws((function(e,t){S&&S(e,t),V()}),A.onEntering)}),y.createElement(ol,jn({elevation:f,ref:W},q,{className:ks(u.paper,q.className)}),c)))})),Jl=Ss({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Kl);function Zl(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Xl({d:e,size:t,style:n={},viewBox:i="0 0 16 16"}){const o={fontSize:Zl(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return v.createElement("i",{style:o},v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:i,fill:"currentColor"},v.createElement("path",{d:e})))}const Yl="alternative-menu-item",Ql=e=>{const{nested:t,className:n,...i}=e,o=(({nested:e,dir:t})=>Ia((n=>({root:{textAlign:"ltr"===t?"start":"end","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"},...e&&"ltr"===t&&{paddingLeft:n.spacing(4)},...e&&"rtl"===t&&{paddingRight:n.spacing(4)}}}))))(e)();return v.createElement(Fl,hn({className:`${o.root} ${n}`},i))},ec=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${Yl}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function tc({title:e,selected:t,onClick:n,nested:i,icon:o,bold:r,dir:a}){const s=xe.detectTextDirection(e);return v.createElement(Ql,{nested:i,role:"menuitem",button:!0,onClick:n,className:Yl,onKeyDown:ec,dir:a,autoFocus:t},v.createElement(Vl,{primary:e,primaryTypographyProps:{dir:s,...r&&{style:{fontWeight:600}}}}),v.createElement($l,{style:{minWidth:16}},v.createElement(Xl,{d:t?Jt:""})),o&&v.createElement($l,{style:{minWidth:16}},v.createElement(Xl,{d:o.d})))}tc.propTypes={title:vn.string.isRequired,selected:vn.bool,onClick:vn.func.isRequired,nested:vn.bool,icon:vn.shape({d:vn.string.isRequired}),bold:vn.bool,dir:vn.string.isRequired},tc.defaultProps={selected:!1,nested:!1,icon:void 0,bold:!1},Ql.propTypes={nested:vn.bool,className:vn.string},Ql.defaultProps={nested:!1,className:Yl};const nc={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"}}};function ic({chartId:e,alignTo:t,currentId:n,dir:i,dock:o,list:r,onClose:a,show:s,instruction:l}){const c=r.map(((t,o)=>{var s;return v.createElement(v.Fragment,{key:t.id},v.createElement(tc,{icon:t.icon,title:t.title,bold:t.groupItem,selected:t.selected,onClick:()=>{t.onSelect&&t.onSelect(n),a(`${e}-${t.id}`)},dir:i}),(null===(s=t.children)||void 0===s?void 0:s.length)>0&&v.createElement(Al,{dense:!0,dir:i,component:"div",disablePadding:!0},t.children.map((e=>v.createElement(tc,{key:e.id,nested:!0,title:e.title,selected:e.selected,onClick:()=>{e.onSelect(),a(t.id)},dir:i})))),o<r.length-1&&v.createElement(Pl,{key:`divider-${t.id}`}))}));return v.createElement(Jl,hn({anchorEl:t,open:s,onClose:a},nc[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),v.createElement(Al,{dense:!0,disablePadding:!0,dir:i,"aria-label":l,component:"nav"},c))}ic.propTypes={chartId:vn.string.isRequired,alignTo:vn.any,currentId:vn.string.isRequired,dir:vn.string.isRequired,dock:vn.string.isRequired,list:vn.array,onClose:vn.func.isRequired,show:vn.bool.isRequired,instruction:vn.string.isRequired},ic.defaultProps={list:[],alignTo:null};const oc="title-button",rc="active-title-button",ac=xs((({children:e,...t})=>v.createElement(ml,hn({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),sc=xs(ml)((()=>({borderRadius:"4px",width:"24px",height:"24px",minWidth:"22px",padding:0})));class lc extends v.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasPopoverOptions:!1,disableCyclicButton:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.alignToRef=v.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n,showGroupDimOptions:i}=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||i)&&e.getPopoverOptions().then((e=>{this.setState({hasPopoverOptions:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:i,showGroupDimOptions:o}=this.props;n&&(i||o)&&n.getPopoverOptions().then((e=>{t.hasPopoverOptions!==(0!==e.length)&&this.setState({hasPopoverOptions: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))}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${oc}`);t&&(t.focus(),t.classList.add(rc))}this.props.popover.getPopoverOptions().then((e=>{this.setState({open:!0,list:e})}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${oc}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${rc}`);e&&(e.classList.remove(rc),setTimeout((()=>{e.focus()}),50))}}render(){const{chartId:e,titleData:t,popover:n,translator:i,disabled:o,isDimension:r,padding:a,minWidth:s,hasAlternative:l,supportConditional:c,showGroupDimOptions:u}=this.props,d={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},p=t.breadcrumbs.length,h=o||Boolean(!t.drillUp)||this.state.inSelection,f=t.breadcrumbs.map(((e,n)=>v.createElement(ac,{style:{display:"flex",alignItems:"center",color:h&&"rgba(89, 89, 89, 0.8)",pointerEvents:h?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>h?void 0:t.drillUp(p-n),title:e},v.createElement("span",{style:d},e),v.createElement(Xl,hn({},Xt,{size:"small",style:{margin:"0 8px"}}))))),m=c||u?this.state.hasPopoverOptions:l,g=n&&!this.state.open?this.openPopover:this.closePopover,y=!n||o||this.state.inSelection,b={display:"flex",alignItems:"center",width:"100%",color:y&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!r&&y&&"none",...a?{padding:a}:{paddingTop:0,paddingBottom:0},...s&&{minWidth:s}};this.state.open&&(b.background="rgba(0,0,0,0.08)");const x=()=>{this.setState({disableCyclicButton:!0})},S=xe.detectTextDirection(t.text),C=v.createElement(ac,{"aria-label":i.get(`Accessibility.${n&&m?"Alternative":"Normal"}.Instructions`,[t.text]),style:b,onClick:y?void 0:g,title:t.text,tabIndex:y?-1:0,onFocus:y?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:y?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${oc} ${t.id}`,"data-id":`${e}-${t.id}`},t.locked&&v.createElement(Xl,hn({},Kt,{size:"small",title:i.get("Tooltip.selections.locked")})),v.createElement("span",{style:d,dir:S},t.text),n&&m&&v.createElement(Xl,hn({},Zt,{size:"small",style:{margin:"0 8px"}})));return v.createElement(v.Fragment,null,t.icon&&t.icon.onClick&&v.createElement(sc,{variant:"outlined",disabled:this.state.disableCyclicButton||this.state.inSelection,onClick:o?void 0:()=>t.icon.onClick({onError:x})},v.createElement(Xl,hn({},t.icon.path,{size:"small",title:i.get(t.icon.tooltip)}))),t.icon&&!t.icon.onClick&&v.createElement(Xl,hn({},t.icon.path,{size:"small",title:i.get(t.icon.tooltip),style:{margin:"0 4px 0 0"}})),f,v.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:m?"auto":"none",height:"100%"}},C),n&&m&&v.createElement(ic,{chartId:e,dock:n.dock,dir:n.dir,currentId:t.id,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.list,onClose:this.closePopover,changeTo:this.changeTo,instruction:i.get("Accessibility.Popover.Instructions")}))}}function cc(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function uc(e){function t(e){return!e.isDimension&&me.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:n}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||t(this.settings.settings)?Math.max(28,n):Math.max(20,n)},render(){const{settings:{app:e,disabled:n,explicitItemInfos:i,hyperCube:o,hyperCubeDef:r,isDimension:a,minWidth:s,model:l,onChangeToAlternative:c,padding:u,rtl:d,selections:p,skipAttributeExpressions:h,translator:f,supportConditional:m=!1},layout:{dock:g}}=this.settings,y="top"!==g&&"bottom"!==g||!d?"ltr":"rtl",b=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}(g,this.rect),x=r&&r.qLayoutExclude&&r.qLayoutExclude.qHyperCubeDef,S=x&&x[a?"qDimensions":"qMeasures"]||[],C=i||o[a?"qDimensionInfo":"qMeasureInfo"],w=a?cn:dn,E=a?un:pn,k=Boolean(l&&l.colorSupport&&l.modifiers),R=k&&((T=this.settings.settings).isDimension&&me.getValue(T,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||t(this.settings.settings));var T;const q=C.map(((t,i)=>{var o;const r="number"==typeof t.explicitColumn?t.explicitColumn:i,y=E(t,r,l,e),b=i===C.length-1,x=Boolean(e)&&a&&"N"!==t.qGrouping,T=k||x?w({column:r,activeInfo:t,altList:S,app:e,dir:d?"rtl":"ltr",dock:cc(g),model:l,onChange:c,skipAttributeExpressions:h,translator:f,allowChangeOfAlternatives:k}):void 0;return v.createElement(v.Fragment,{key:t.cId},v.createElement(lc,{chartId:null!==(o=null==l?void 0:l.id)&&void 0!==o?o:"",showGroupDimOptions:x,popover:T,titleData:y,model:l,translator:f,selections:p,disabled:n(),style:this.style,isDimension:a,padding:u,minWidth:s,hasAlternative:R,supportConditional:m}),!b&&v.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return v.createElement("div",{style:b,dir:y},q)}}}lc.propTypes={chartId:vn.string.isRequired,disabled:vn.bool.isRequired,padding:vn.string,minWidth:vn.string,titleData:vn.shape({breadcrumbs:vn.arrayOf(vn.string).isRequired,icon:vn.shape({path:vn.shape({d:vn.string.isRequired}),tooltip:vn.string.isRequired,onClick:vn.func}),index:vn.number.isRequired,locked:vn.bool.isRequired,text:vn.string.isRequired,popoverText:vn.string.isRequired,drillUp:vn.func,id:vn.string.isRequired}).isRequired,popover:vn.shape({dir:vn.string.isRequired,dock:vn.string.isRequired,getPopoverOptions:vn.func.isRequired}),translator:vn.shape({get:vn.func.isRequired}).isRequired,selections:vn.shape({isActive:vn.func,addListener:vn.func,removeListener:vn.func}),style:vn.shape({fontSize:vn.string,color:vn.string,fontFamily:vn.string}).isRequired,isDimension:vn.bool.isRequired,hasAlternative:vn.bool.isRequired,supportConditional:vn.bool.isRequired,showGroupDimOptions:vn.bool.isRequired},lc.defaultProps={popover:null,selections:null,padding:"",minWidth:""};const dc=Ci({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 pc=ki({productionPrefix:"qadc0",disableGlobal:!0,seed:""});function hc(){function e({x:e,y:t,width:n,height:i,scaleRatio:o,margin:r}={}){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(i)?a.height:i,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==r&&(a.margin.left=Number.isNaN(r.left)?0:r.left,a.margin.top=Number.isNaN(r.top)?0:r.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let i,o=e();const r={element:()=>i,root:()=>i,appendTo:e=>(i||(i=n("div"),i.style.position="absolute",i.style["-webkit-font-smoothing"]="antialiased",i.style["-moz-osx-font-smoothing"]="antialiased",i.style.pointerEvents="none"),e.appendChild(i),i),render(e){if(!i)return!1;const t=o.scaleRatio.x,n=o.scaleRatio.y;return i.style.left=`${Math.round(o.margin.left+o.x*t)}px`,i.style.top=`${Math.round(o.margin.top+o.y*n)}px`,i.style.width=`${Math.round(o.width)}px`,i.style.height=`${Math.round(o.height)}px`,i.style.transform=`scale(${t}, ${n})`,i.style.transformOrigin="top left",w.render(function(e,t){return v.createElement(Ta,{generateClassName:t},v.createElement(ys,{theme:dc},e))}(e,pc),i),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(i&&w.unmountComponentAtNode(i),r),destroy(){i&&i.parentElement&&(w.unmountComponentAtNode(i),i.parentElement.removeChild(i)),i=null},size:t=>(t&&(o=e(t)),o)};return r}}function fc(e){return bt(e).l<70}function mc(e,t){const n=bt(e).l/100,i=bt(t).l/100;return n>i?(n+.05)/(i+.05):(i+.05)/(n+.05)}function gc(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var vc={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const i=e.findShapes(t.selector).filter((e=>e.key===t.component));if(i.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const o=[];let r=i[i.length-1];for(let e=0;e<i.length;e+=1){const t=i[e],n=r.attrs.fill,a=t.attrs.fill;if(mc(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:i,outerRadius:s}=t.desc.slice;if(i=Math.max(i,r.desc.slice.innerRadius),s=Math.min(s,r.desc.slice.outerRadius),s>i){const t=gc({r:s,a:e},n),r=gc({r:i,a:e},n);o.push({type:"line",x1:t.x,y1:t.y,x2:r.x,y2:r.y,strokeWidth:1,opacity:.4,stroke:fc(a)?"#ccc":"#333"})}}r=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function yc(e,t=!0){let n="";for(let t=0;t<e.length;t++){const i=e[t];n+=0===t?`M${i.x} ${i.y}`:`L${i.x} ${i.y}`,n+=" "}return t&&(n+="Z"),n}function bc(e){const{size:t,angle:n}=e,i={x:e.x,y:e.y},o=t/2,r=e.x-o,a=e.y-o;let s=[{x:r,y:a+t},{x:r+o,y:a},{x:r+t,y:a+t},{x:r,y:a+t}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const i=Math.cos(t),o=Math.sin(t),r=(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:i*r.x-o*r.y,y:o*r.x+i*r.y},n)}(e,n,i))),{type:"path",fill:e.fill,d:yc(s)}}var xc={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 i=[];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=(o={r:t.offset,a:l},{x:(r=s).x+o.r*Math.sin(o.a),y:r.y-o.r*Math.cos(o.a)}),u=bc({size:t.size,fill:t.fill,angle:l+Math.PI,...c});u.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},i.push(u)}}var o,r;return i}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Sc(){const e=n();return e.use(i),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",X(e))};e.interaction("hammer",X(Hammer))}(t)),e.use((function(e){e.renderer("react",hc()),e.component("data-title",uc(e.renderer("svg")()))})),e.renderer("react-qcm",E),e.component("axis-title",k),e.component("disclaimer",R),e.component("pie-dividers",vc),e.component("negative-indicators",xc),e}var Cc={};function wc(){wc.init.call(this)}Cc.isObject=function(e){return"object"==typeof e&&null!==e},Cc.isNumber=function(e){return"number"==typeof e},Cc.isUndefined=function(e){return void 0===e},Cc.isFunction=function(e){return"function"==typeof e};var Ec=wc;wc.EventEmitter=wc,wc.prototype._events=void 0,wc.prototype._maxListeners=void 0,wc.defaultMaxListeners=10,wc.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},wc.prototype.setMaxListeners=function(e){if(!Cc.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},wc.prototype.emit=function(e){var t,n,i,o,r,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],Cc.isUndefined(n))return!1;if(Cc.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(i=arguments.length,o=new Array(i-1),r=1;r<i;r++)o[r-1]=arguments[r];n.apply(this,o)}else if(Cc.isObject(n)){for(i=arguments.length,o=new Array(i-1),r=1;r<i;r++)o[r-1]=arguments[r];for(i=(a=n.slice()).length,r=0;r<i;r++)a[r].apply(this,o)}return!0},wc.prototype.addListener=function(e,t){var n;if(!Cc.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Cc.isFunction(t.listener)?t.listener:t),this._events[e]?Cc.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Cc.isObject(this._events[e])&&!this._events[e].warned)&&((n=Cc.isUndefined(this._maxListeners)?wc.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,Cc.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),Cc.isFunction(console.trace)&&console.trace()));return this},wc.prototype.on=wc.prototype.addListener,wc.prototype.once=function(e,t){if(!Cc.isFunction(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},wc.prototype.removeListener=function(e,t){var n,i,o,r;if(!Cc.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,i=-1,n===t||Cc.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Cc.isObject(n)){for(r=o;r-- >0;)if(n[r]===t||n[r].listener&&n[r].listener===t){i=r;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},wc.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],Cc.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},wc.prototype.listeners=function(e){return this._events&&this._events[e]?Cc.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},wc.listenerCount=function(e,t){return e._events&&e._events[t]?Cc.isFunction(e._events[t])?1:e._events[t].length:0};var kc=Y(Ec);function Rc(){const e={};var t;return t=e,Object.keys(kc.prototype).forEach((e=>{t[e]=kc.prototype[e]})),kc.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}const Tc={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 qc(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Dc={getImageSize(e,t){let n;function i(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,i()}const r={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=r[t]*(n>l?1:n/l),u=r[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},i()):(e={height:c,width:u},i()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Pc(e,t,n){let i=e.ref.qStaticContentUrl.qUrl;const o=function(e){var t,n,i;let o,r,a,s,l,c;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(n=n.session)&&void 0!==n&&n.sessionConfig||null!==(i=e.session)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.url)){var u;if(o=e.session.options||(null===(u=e.enigmaModel)||void 0===u?void 0:u.session.sessionConfig),!o){var d;o=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(o.url);o.host=t.hostname,o.port=t.port,o.isSecure="wss:"===t.protocol}return c=void 0!==o.secure?o.secure:o.isSecure,r=c?"https://":"http://",a=o.host||"localhost",s=o.port?`:${o.port}`:"",l=o.prefix?o.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),r+a+s+l}return""}(n);o&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(i,o),i=i.replace(/"/g,'\\"'),i=i.replace(/'/g,"\\'"),i=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(i,o));const{height:r,width:a,imageError:s}=await Dc.getImageSize(i,t);return{src:i,size:t,height:r,width:a,imageError:s}}async function Ic(e,t,n,i){var o,r,a;const{app:s,flags:l}=t,c=null===(o=e.layout)||void 0===o||null===(o=o.tooltip)||void 0===o?void 0:o.imageComponents;if(!c)return[];const[u]=c,d=u.size||"small",p=u.type||"media";let h=-1;for(let e=0;e<n.length;e++)if(n[e].cId===u.cId){h=e;break}const f=(null===(r=i.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];let m;if(-1!==h&&f[h]&&(m=f[h]),"media"===p&&null!==(a=u.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return Pc(u,d,s);if("url"===p)return async function(e,t,n,i,o){let r,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&qc(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:o,imageError:s}=await Dc.getImageSize(t,i);r={src:t,size:i,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Dc.getImageSize(a,i);r={src:a,size:i,height:e,width:t,imageError:n}}return r}(s,l,u,d,m);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===p&&m&&m.label){return async function(e,t,n,i){let o;const r=i.label,a=`qmem://${t.qFallbackTitle}/${r}`;if(qc(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:i,width:r,imageError:a}=await Dc.getImageSize(e,n);o={src:e,size:n,height:i,width:r,imageError:a}}}catch(e){}return o}(s,n[h],d,m)}return[]}const Mc={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){const o=t,r=[];for(let t=0;t<o.length;t++)r.push(Ic(e,i,n,o[t]));const a=await Promise.all(r);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t;const n=null===(t=e.layout)||void 0===t||null===(t=t.tooltip)||void 0===t?void 0:t.imageComponents;return!!n&&n.length>0}},Nc={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){let o=t;return o=await Mc.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}),o},checkIfPromisesExist:({customTooltipModel:e})=>Mc.checkIfPromisesExist({customTooltipModel:e})};const Oc=(e,t)=>{var n,i,o;const r=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:Tc.CHART.CHART_PARENT_TYPE,qId:Tc.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:r,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Lc=e=>{var t;const n=null===(t=e.tooltip)||void 0===t||null===(t=t.chart)||void 0===t||null===(t=t.object)||void 0===t?void 0:t.refId;return{qInfo:{qType:Tc.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const Ac={createContainer:({ctx:e,layout:t})=>{var n;if(!((null===(n=t.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,i;const o=null!==(n=null===(i=t.tooltip)||void 0===i||null===(i=i.chart)||void 0===i||null===(i=i.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",r=Tc.CHART.STYLE[o];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Tc.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:i,customTooltipModel:o,rtl:r})=>{var a;const s=o,l=null==t||null===(a=t.tooltip)||void 0===a||null===(a=a.chart)||void 0===a||null===(a=a.object)||void 0===a?void 0:a.refId;if(null!=s&&s.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&l&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Ac.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const i=n,o=Tc.CHART.STATE,r=t.qStateName;i.miniChartToken.alternateState||(i.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,r),i.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var i;const o=n;null!==(i=o.miniChartToken.sessionObj)&&void 0!==i&&i.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const r=Tc.CHART.STATE,a=Oc(t,r),s=await e.createSessionObject(a),l=Lc(t);if(s.id!==Tc.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var c,u,d,p;const e=n.length>0&&void 0!==(null===(c=n[0].data)||void 0===c?void 0:c.value)?[null===(u=n[0].data)||void 0===u?void 0:u.value]:[],a=void 0!==i?i:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===i&&n.length>0){var h,f;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(f=e.source)&&void 0!==f&&f.field){var m;const t=null==e||null===(m=e.source)||void 0===m?void 0:m.field.split("/"),n=t[t.length-1],i=void 0!==e.value?[e.value]:[];i.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),i,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(Tc.CHART.CONTAINER_ID),g={direction:r?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await o.embed.render({element:l,model:s.miniChartToken.model,options:g,id:null===(d=s.miniChartToken.model)||void 0===d?void 0:d.id,type:null===(p=s.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await Ac.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(Ac.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Tc.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,i=Tc.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(i)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(t=t.vis)||void 0===t?void 0:t.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function zc(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function jc(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:i}=Tc.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[i]=!0,o}function Fc(e){const t=jc();return e.filter((e=>t[e.id]))}const _c={getNodes(e,t){const n=function(e,t){let n=0,i=0;e.center?(n+=e.center.x,i+=e.center.y):(n+=e.clientX,i+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:i-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,i=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var r,a,s,l;const c=null!==(r=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==r?r:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],i.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const i=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return i&&i.value===c.value&&i.label===c.label}));t.length>0&&(i=i.concat(t[0]))}})),i},displayTooltip(e,t,{nodes:n,opts:i={},customTooltipModel:o,extractedNodes:r=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=_c.getAttrExprData(a);r.length||n.length?Nc.handlePromises({customTooltipModel:o,nodes:_c.getDataNodes(s,r.length>0?r:n),attrExps:l,opts:i}).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!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&Ac.hide({app:i.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Nc.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const i=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return i[o]||(i[o]=[]),i[o]},getAttrExprData(e){var t;let n=[],i="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var r;const t=o.length-1;n=(null===(r=e.qHyperCube)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r||null===(r=r[t])||void 0===r?void 0:r.qAttrExprInfo)||[],i=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:i}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[Tc.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let i=n.qLayoutExclude;i||(n.qLayoutExclude={quarantine:{}},i=n.qLayoutExclude),i.quarantine||(i.quarantine={}),i.quarantine[Tc.CUSTOM.QUARANTINE]=[],e.forEach((e=>{i.quarantine[Tc.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=i}(Fc(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(t=t.quarantine)||void 0===t?void 0:t[Tc.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[Tc.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=zc(e);if(!n)return;const i=void 0!==t?t:n.length-1;if(!n[i])return;const o=this.getAttrExps(e,n[i]);if(0===Fc(o).length){var r;const t=(null===(r=e.qLayoutExclude)||void 0===r||null===(r=r.quarantine)||void 0===r?void 0:r.customTooltip)||[],n=[...o,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[i].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[i].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let i=[];const o=zc(e)||[];[...o,t].forEach((e=>{const t=Fc(e.qAttributeExpressions||[]);t.length>0&&(i=t)}));const r=jc(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!r[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(i));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:xe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=xe.detectTextDirection(e.src),i=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){i.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;i.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,i),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function $c(e,t,n,i){var o;const r=(null===(o=t.qHyperCube)||void 0===o||null===(o=o[n])||void 0===o||null===(o=o[i])||void 0===o?void 0:o.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[i]?e.qSubNodes[i].qAttrExps:e.qAttrExps;return s?(r.forEach(((e,t)=>{const o=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,r=void 0===o?"NaN":function(e,t){let n;switch(e.id){case Tc.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Tc.CUSTOM.TITLE:case Tc.CUSTOM.DESCRIPTION:case Tc.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);a.push({source:{key:"qHyperCube",field:`${n}/${i}/qAttrExprInfo/${t}`},label:r,value:"value"})})),a):a}const Hc={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,i="qDimensionInfo";return{field:`${i}/${n}`,value:t=>$c(t,e,i,n)}}};const Vc={getCustomAttrExps(e,t,n){var i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},r=(null===(i=t.data)||void 0===i||null===(i=i.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(r))return o;return function(e,t,n,i){const o={[Tc.CUSTOM.TITLE]:!0,[Tc.CUSTOM.DESCRIPTION]:!0},{attrExps:r,fieldPath:a}=_c.getAttrExprData(e);return 0===t.length||0===r.length||""===a||r.forEach(((e,r)=>{const s=t[r];if(e.id===Tc.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${r}`).formatter()(s.value);i.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&i.customTooltipInfoAttrExpsArr.push({...e.id===Tc.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),i}(n,r.map((t=>Se.getMeasure(e,t))),e,o)}};function Wc({nodes:e,layout:t,dataset:n}){const i=function(e,t,n){const i=[];return e.forEach((e=>{i.push(Vc.getCustomAttrExps(n,e,t))})),i}(e,t,n);return i.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Uc(e){const t=Tc.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}}function Bc(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Gc={attrExpr:{migrateProperties(e){var t,n;const i=le(!0,{},e),o=(null===(t=i.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[];let r=Bc(i);return r=function(e,t){return t.concat(e.map((e=>Uc(e))))}(o,r),function(e,t){var n;const i=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;i[i.length-1].qAttributeExpressions=e}(r,i),null===(n=i.tooltip)||void 0===n||delete n.data,i},getPatches(e){var t,n;const i=(null===(t=e.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[],o=(null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions.length)-1,r=function(e,t,n){let i=e.length;const o=[];return t.forEach((e=>{const t=Uc(e),r=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${i}`,qOp:"add",qValue:r}),i++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Bc(e),i,o);return r},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var i,o,r;const a=(null===(i=t.qHyperCube)||void 0===i?void 0:i.qDimensionInfo)||[],s=(null===(o=t.tooltip)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.qHyperCube)||{},l=null===(r=t.qMeta)||void 0===r||null===(r=r.privileges)||void 0===r?void 0:r.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(s,a)&&e.getEffectiveProperties().then((t=>{if(l){const i=this.migrateProperties(t);e.setProperties(i).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const i=this.getPatches(t);e.applyPatches(i,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:Kc}=Tc;function Jc({flags:e,layout:t,app:n,model:i,picasso:r,chart:a,translator:s,localeInfo:l,embed:c,options:u}){const d={properties:void 0},p=function({layout:e,app:t,picasso:n,model:i,chart:o,translator:r,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:i,chart:o,translator:r,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:_c,miniChartToken:{},embed:s}}({layout:t,app:n,model:i,picasso:r,chart:a,translator:s,localeInfo:l,embed:c}),h="rtl"===u.direction,f=()=>{var e;const n=!(null===(e=d.properties)||void 0===e||null===(e=e.qHyperCubeDef)||void 0===e||!e.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv})));return!(!t.tooltip||t.tooltip.auto||n)};return{setProperties:e=>{d.properties=e},isEnabled:()=>f(),hideBasic:()=>f()&&o(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var i,o;const r=Wc({dataset:e,nodes:n,layout:t});return{title:null===(i=r.customTooltipInfoAttrExpsArr.find((e=>e.id===Kc.TITLE)))||void 0===i?void 0:i.title,description:null===(o=r.customTooltipInfoAttrExpsArr.find((e=>e.id===Kc.DESCRIPTION)))||void 0===o?void 0:o.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>_c.checkIfPromisesExist({customTooltipModel:p}),createImageRow:({value:e,h:t})=>_c.getImageRow(e,{h:t,rtl:h}),addImages:({nodes:i})=>{const o=_c.getDataNodes(a,i),{attrExps:r}=_c.getAttrExprData(t);return Nc.handlePromises({customTooltipModel:p,nodes:o,attrExps:r,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(f()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e.chart)&&void 0!==e&&null!==(e=e.object)&&void 0!==e&&e.refId&&c&&"function"==typeof(null==i?void 0:i.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>Ac.createContainer({layout:t,ctx:{h:e,rtl:h}}),createLimitationRow:()=>_c.getFooterRow(s.get("properties.tooltip.notselectedmessage"),h),show:({nodes:e,properties:t})=>Ac.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:()=>Ac.hide({app:n,customTooltipModel:p}),destroy:()=>Ac.destroyVisualization({customTooltipModel:p})}}}function Zc(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Xc({layout:e}){const t=({ds:e,encodings:t})=>{const n={field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}};return t.slice.outerRadius&&(n.props.radius={field:t.slice.outerRadius}),e.extract(n)},n=({rows:e,encodings:t})=>t.slice.outerRadius?e.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):e.filter((e=>"NaN"!==e.num.value)),i=({rows:t,encodings:n})=>n.slice.outerRadius&&!e.donut.showAsDonut?t.filter((e=>e.num.value>0&&e.radius.value>0)):t.filter((e=>e.num.value>0));return c({layout:e,config:{args:{},disclaimers:{NoDataExist:{condition:({ds:e,encodings:n})=>0===t({ds:e,encodings:n}).length},LimitedData:{condition:()=>{const t=me.getValue(e,"qHyperCube.qSize.qcy");return me.getValue(e,"qHyperCube.qDataPages.0.qArea.qHeight")<t}},OnlyNanData:{condition:({ds:e,encodings:i})=>{const o=t({ds:e,encodings:i});return 0===n({rows:o,encodings:i}).length}},OnlyNegativeOrZeroValues:{condition:({ds:e,encodings:o})=>{const r=t({ds:e,encodings:o}),a=n({rows:r,encodings:o});return 0===i({rows:a,encodings:o}).length}},NegativeOrZeroValues:{condition:({ds:e,encodings:o})=>{const r=t({ds:e,encodings:o}),a=n({rows:r,encodings:o}),s=a,l=i({rows:a,encodings:o});return s.length!==l.length}}}}})}function Yc({chart:e,translator:t,layout:n,constraints:i,options:o,themeService:r,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,c="rtl"===o.direction,{fontFamily:d}=r.getStyles();return u({chart:e,translator:t,config:{rtl:c,enable:()=>!i.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:d},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:i,formatter:o,create:r,util:a})=>{const[c]=n,{title:u,description:d,measures:p}=s.isEnabled()?s.getAttributes({dataset:i,nodes:n}):{},h=[];u&&h.push(r.text({value:u,style:{bold:!0}})),d&&h.push(r.text({value:d}));const f=s.hideBasic();if(f&&!p.length&&(u||d)||h.push(r.text({value:c.data.label,style:{bold:!0}})),!f){h.push(r.color({nodes:n,property:"fill"}));const{num:e}=c.data;if(h.push(r.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=c.data;h.push(r.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}h.push(r.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:o("share")(c.desc.share)}))}p&&h.push(...p.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),h.push(r.raw({value:s.chart.createLimitationRow()}))):h.push(r.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:m}=c.data;return s.isEnabled()&&m&&h.push(...m.map((t=>r.raw({value:s.createImageRow({value:t,h:e})})))),h},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"}}}})}const Qc=e=>"[object Object]"===Object.prototype.toString.call(e),eu=e=>Array.isArray(e);function tu(e,t){if(e===t)return!0;if(eu(e)){if(!eu(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!tu(e[n],t[n]))return!1;return!0}if(Qc(e)){if(!Qc(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i<n.length;i++){if(!Object.hasOwn(t,n[i]))return!1;if(!tu(e[n[i]],t[n[i]]))return!1}return!0}return e===t}function nu({enable:e=!0}={}){const t=L(),n=()=>Date.now().toString()+Math.random(),[i,o]=P(n()),r={properties:void 0};return O((()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const i=()=>{t.getEffectiveProperties().then((e=>{const t=le(!0,{},e);if(!r.properties)return void(r.properties=t);const i=function(e,t){var n,i,o,r;const a={properties:!1,exclude:!1};if(e===t)return a;const s=le(!0,{},e),l=le(!0,{},t);return a.exclude=!tu(null===(n=s.qHyperCubeDef)||void 0===n?void 0:n.qLayoutExclude,null===(i=l.qHyperCubeDef)||void 0===i?void 0:i.qLayoutExclude),null===(o=s.qHyperCubeDef)||void 0===o||delete o.qLayoutExclude,null===(r=l.qHyperCubeDef)||void 0===r||delete r.qLayoutExclude,a.properties=!tu(s,l),a}(r.properties,t);r.properties=t,i.exclude&&!i.properties&&o(n())}))};return t.on("changed",i),i(),()=>{t.removeListener("changed",i)}}),[e]),i}function iu({scaleKey:e,legend:t,onEdited:n}){const{layout:i}=t,{dock:o}=i||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:`${e}Range`,direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const ou=.8,ru=.55,au={CORNER_RADIUS:0,INNER_RADIUS:ru,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},su=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var i,o;let r=ou,a=0;const s=null!==(i=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==i?i:ru;e.donut.showAsDonut&&(r=ou-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*r+a}}:ou,lu=({layout:e},t,n)=>{var i,o;if(!e.donut.showAsDonut)return 0;const r=null!==(i=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==i?i:ru;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=ou-r,n=r;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:r},cu=({layout:e},t)=>{var n,i,o,r,a;const s=t.colorService.getDatumProps(),l=s[Object.keys(s)[0]],c=l&&l.field?l.field:void 0,u="qDimensionInfo/0"===c,d=c?t.ds.field(c).raw():null,p=d&&(d.label||d.title||d.qFallbackTitle)||"",h=t.encodings.slice.outerRadius,{formatter:f}=t.chart,m=me.getValue(e,"qHyperCube.qDimensionInfo",[]).length;function g(e,n){const i=t.ds.field(e).raw();return{field:e,label:!i.isCustomFormatted&&(i.qIsAutoFormat||"U"===i.qNumFormat.qType)?e=>f(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:{...s,num:g(t.encodings.slice.arc,"arc"),fillTooltip:c?{field:c,label:p,value:e=>u?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==m?Hc.getNode(e,{dimensionCount:m}):void 0,radius:h?g(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:lu({layout:e},t,v),fill:t.colorService.getColor(),strokeWidth:null!=v&&null!==(n=v.style)&&void 0!==n&&n.strokeWidth?au.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:au.STROKE.WIDTH.NONE,stroke:null!==(i=null==v||null===(o=v.style)||void 0===o||null===(o=o.strokeColor)||void 0===o?void 0:o.color)&&void 0!==i?i:au.STROKE.COLOR,outerRadius:su({layout:e},t,v),cornerRadius:null!==(r=null==v||null===(a=v.style)||void 0===a?void 0:a.cornerRadius)&&void 0!==r?r:0}},animations:{enabled:t.animations.enabled,isMainComponent:!0}}};function uu({layout:e},t){var n,i;const o=(e.components||[]).filter((e=>"slices"===e.key))[0],r=null!==(n=null==o||null===(i=o.style)||void 0===i?void 0:i.innerRadius)&&void 0!==n?n:ru,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=ou-r,n=r;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled}}}function du(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 pu({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 hu(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function fu(e){return e.node.data.num.label}function mu(e){return e.node.data.radius.label}function gu(e,t,n){if(e.dataPoint.auto)return n?fu:hu;if("share"===e.dataPoint.labelMode)return hu;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?mu:fu}return null}function vu({data:e}){return e?e.label:""}function yu(e){const t=parseInt(e,10);if(!isNaN(t))return t}function bu(e){var t,n;const i=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return(null!==(t=null==i||null===(n=i.style)||void 0===n?void 0:n.innerRadius)&&void 0!==t?t:ru)>.3}function xu({node:e,data:t}){return le({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function Su(e,t,n){const i=t.styleService.label.name.getStyle(),o=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",padding:t.encodings.slice.outerRadius?4:2,fill:i.fill}],fontSize:yu(i.fontSize),fontFamily:i.fontFamily,label:vu,linkData:({node:e,data:t})=>le({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(gu(e,t,!1)){const i=function(e,t,n){return{label:gu(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&bu(e)?"inside":"into",onBackground:e.donut.showAsDonut&&bu(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),r=Ee(le(t,i),n.theme);r.linkData=xu,o.push(r)}return{key:"pie-labels",type:"labels",renderer:Wt(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:o}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}function Cu({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const i=gu(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme),r=t.themeService.getStyles(),a=t.styleService.label.name.getStyle(),s=t.styleService.label.value.getStyle(),l=a.fill===r.label.name.color,c=s.fill===r.label.value.color;return{key:"pie-labels",type:"labels",renderer:Wt(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fontSize:yu(a.fontSize),fontFamily:a.fontFamily,fill:l&&!e.donut.showAsDonut?o:a.fill,label:vu,linkData:({data:e})=>e},{fontSize:yu(s.fontSize),fontFamily:s.fontFamily,fill:c&&!e.donut.showAsDonut?o:s.fill,label:i,linkData:({data:e})=>e}]}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}(e,n,t):Su(e,n,t))}const wu=(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 i=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type)),o=(i||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 o||this.chart.component("legendRangeBrush").emit("rangeClear"),o}},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 Eu(e,t){const n=t.element.getBoundingClientRect();let i,o;return e.center?(({x:i}=e.center),({y:o}=e.center)):(i=e.clientX,o=e.clientY),{x:i-n.left,y:o-n.top}}function ku(e,t){const n=t.component("slices");if(!n)return!1;const{x:i,y:o}=Eu(e,t),r=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*ou;return(r-i)**2+(a-o)**2<=s**2}const Ru=(e,t,{requireFailure:n,recognizeWith:i}={})=>({type:"Tap",requireFailure:n,recognizeWith:i,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:i}=n.srcEvent;if(i&&("INPUT"===i.nodeName||i.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))return void this.chart.component(i.getAttribute("data-component-key")).emit(i.getAttribute("data-action"));if(i&&i.children&&i.children[0]&&"legend-cat"===i.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let o=Eu(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(o={cx:o.x,cy:o.y,r:5});const r=this.chart.shapesAt(o,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});r.length&&(this.chart.brushFromShapes(r,{components:[{key:r[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),Tu=(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 i=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(i)&&i.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()}}}),qu=(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 i=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return i.some((e=>"slices"===e.key))&&!e.isLocked(i)}},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 Du(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&ku(t,this.chart)){const i=Math.sign(-t.deltaY);e.viewState.set("rotation",i*(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 Pu=(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()&&ku(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}}}),Iu=(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}}}),Mu=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[Pu(e,{}),Ru(e,t,{}),...n]:[wu(e,{}),qu(e,{}),Pu(e,{}),Tu(e,{}),Iu(e,{}),Ru(e,t,{}),...n]});function Nu(e,t,n){const i=e.getIsSingleSelect(0),{constraints:o}=n;if(o.active&&o.passive)return[];const r=t.tooltipService.getInteractions();return[Mu(t,i,r.gestures),Du(t),r.native]}function Ou({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 Lu({layout:e},t,n){var i;if(null!=t&&null!==(i=t.flags)&&void 0!==i&&i.isEnabled("IM_5788_DATA_TITLE_REFACTOR"))return!1;if(!e.dimensionTitle)return!1;const o=t.properties,r=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:o&&o.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections,isEnabled:t.flags.isEnabled},style:{fontFamily:r.fontFamily,fontSize:r.fontSize,color:r.color}}}function Au({layout:e},t,n){var i;if(null==t||null===(i=t.flags)||void 0===i||!i.isEnabled("IM_5788_DATA_TITLE_REFACTOR"))return!1;if(!e.dimensionTitle)return!1;const o=t.alternativeService.getAlternatives(),r=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"axis-title",renderer:"react-qcm",layout:{dock:"top",minimumLayoutMode:"SMALL"},data:{infos:e.qHyperCube.qDimensionInfo,alternatives:o.dimensions},resources:{app:t.app,cache:t.viewCache,model:t.model,selections:t.selections,translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>n.constraints.active,isRTL:n.rtl,isSnapshot:!!e.snapshotData,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize}}}}function zu({layout:e,context:t,selectionService:n},i={}){const o=function({layout:e}={},t={}){const n={};return le(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&le(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},i),r={scales:o};let a=[];const s=function(e,t){const n=e.disclaimerService.getDisclaimer();if(!n)return!1;const{rtl:i}=t,{translator:o}=e,{fontFamily:r}=e.themeService.getStyles();return{key:"disclaimer",type:"disclaimer",layout:{dock:n.alignment},settings:{isRTL:i,label:o.get(`Object.Disclaimer.${n.key}`)},style:{fontFamily:r}}}(i,t);if(i.disclaimerService.getHasSuppressingDisclaimer())return{components:[s]};const l=t.constraints.select||t.constraints.active,c=i.colorService.getLegend({eventName:"legend",key:"legend",viewState:i.viewState,chart:i.chart,styleReference:"object.pieChart",styleOverrides:{title:i.styleService.legend.title.getStyle(),label:i.styleService.legend.label.getStyle()},rtl:t.rtl},{navigationDisabled:l});return o.fillRange&&c.components[0]&&("right"===c.components[0].layout.dock||"left"===c.components[0].layout.dock||t.rtl)&&(o.fillRange.invert=!0),a=[cu({layout:e},i),uu({layout:e},i),du(i),pu({layout:e},i),Lu({layout:e},i,t),Au({layout:e},i,t),...c.components,iu({scaleKey:"fill",legend:c.components[0]||{},onEdited:i.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}}},Cu({layout:{components:e.components,dataPoint:le({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},i),...i.tooltipService.getComponents(),s],a=a.filter((e=>!1!==e)),{interactions:Nu(n,i,t),scales:o,components:i.pluginService.extendComponents(a),palettes:i.colorService.getPalettes(),formatters:Ou({settings:r},i),strategy:pe(0,i)}}function ju({instance:e,services:t,picasso:n,flags:o}){const r=T(),a=L(),s=A(),l=M(),c=_(),u=z(),d=D(),p=F(),{qLocaleInfo:h}=$(),f=nu({enable:u&&!u.snapshotData}),[g]=V((()=>{if(!t)return Promise.resolve();Gc.attrExpr.updateProperties(a,u);const e=({getUseBaseColors:e})=>({theme:c,legendProps:u.legend,layout:u,localeInfo:h,hc:u.qHyperCube,colorProps:{...u.color,useBaseColors:e(u)}});return Promise.resolve(a&&!u.snapshotData?a.getEffectiveProperties():{}).then((async n=>Promise.all([t.colorService.initialize({createConfig:e}),Promise.resolve(n),t.pluginService.initialize(),t.alternativeService.initialize({properties:n})])))}),[t,f]);O((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(u)}),[u]),O((()=>{if(!e||!g)return;const{chart:f,viewState:v,interactions:y,viewCache:b}=e,{alternativeService:x,colorService:S,disclaimerService:C,pluginService:w,themeService:E,tooltipService:k,styleService:R}=t,T=r.viewState||{};u.snapshotData||(v.preventSet("legendScrollOffset",T.legendScrollOffset||0),v.preventSet("rotation",T.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,v),k.expando.set("properties",g[1]);const q=n.data("q")({key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:h}}),D=[{type:"q",key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:h}},...S.getData()],P={slice:{arc:"qMeasureInfo/0"}};u.qHyperCube.qMeasureInfo.length>1&&(P.slice.outerRadius="qMeasureInfo/1"),C.initialize({args:{ds:q,encodings:P}});const I=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}(n.data("q")({data:u.qHyperCube,config:{localeInfo:h}}),P),M=d?()=>{const e=f.brush("selection");i.selections(e,{},u).forEach((e=>{d.select(e)}))}:()=>{},N=u.snapshotData&&!r.freeResize?{width:(u.snapshotData.content.size||u.snapshotData.object.size).w,height:(u.snapshotData.content.size||u.snapshotData.object.size).h}:void 0,O=t=>e.selectionService.getIsSelectionLocked(t),L=()=>zu({layout:u,context:{rtl:"rtl"===r.direction,theme:c,constraints:p,model:a},selectionService:e.selectionService},{picasso:n,ds:q,model:a,app:s,chart:f,onSelect:M,isLocked:O,interactions:y,constraints:p,translator:l,viewState:v,dataRowCount:I,encodings:P,alternativeService:x,colorService:S,disclaimerService:C,pluginService:w,themeService:E,styleService:R,tooltipService:k,debouncer:m,properties:g[1],selections:d,logicalSize:N,flags:o,viewCache:b,animations:{enabled:()=>function({viewState:e,options:t,viewCache:n,layout:i,chart:o}){return!1!==t.chartAnimations&&n.get("chartWidth")===o.element.clientWidth&&n.get("chartHeight")===o.element.clientHeight&&n.get("hasZeroLine")===!!o.component("zeroLine")&&0===e.get("rotation")&&!Vt.propertiesHaveChanged({viewCache:n,layout:i})}({viewState:v,options:r,layout:u,viewCache:b,chart:f})}});e.generateSettings=L;const A=L();f.update({data:D,settings:A}),b.set("chartWidth",f.element.clientWidth),b.set("chartHeight",f.element.clientHeight),b.set("hasZeroLine",A.components.filter((e=>"zeroLine"===e.key)).length>0),Vt.cacheProperties({viewCache:b,layout:u}),r.effect&&u.effectProperties?r.effect.update(u,f,{encodings:P}):u.effectPath||f.brush("highlight").end()}),[e,g,r.direction,r.effectProperties,p,c.name(),l.language()])}function Fu({instance:e,services:t}){const n=q(),i=z();U((o=>{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}}(o,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:i}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:ge(t,"legend-cat"),rotation:n.get("rotation")},i.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),B((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:ge(e.chart,"legend-cat")})})),[e])}const _u={setValue(e,t,n){if(!t)return;const i=t.split(".");let o=e;const r=i[i.length-1];let a;for(a=0;a<i.length-1;++a)null==o[i[a]]&&(o[i[a]]=Number.isNaN(+i[a+1])?{}:[]),o=o[i[a]];void 0!==n?o[r]=n:delete o[r]},getValue(e,t,n){const i=t.split(".");let o,r=e;if(void 0===r)return n;for(o=0;o<i.length;++o){if(null==r[i[o]])return n;r=r[i[o]]}return r}},$u={getDimensions:e=>_u.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>_u.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>_u.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>_u.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=_u.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=_u.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 Hu={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>$u.getNumMeasures(e)>=1},showLegend:e=>{const t=_u.getValue(e,"color.auto"),n=_u.getValue(e,"color.expressionIsColor"),i=_u.getValue(e,"color.mode");return!(!t&&"primary"===i||!t&&"byExpression"===i&&(n||void 0===n))},persistentColorsShow:e=>!_u.getValue(e,"color.auto")&&"byDimension"===_u.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===_u.getValue(e,"color.useDimColVal")&&_u.setValue(e,"color.useDimColVal",!1),!_u.getValue(e,"color.auto")&&"byDimension"===_u.getValue(e,"color.mode")&&"libraryItem"===_u.getValue(e,"color.byDimDef.type"))},Vu=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:i,showLegend:o}=Hu;this.color={colorMode:{options(n){const i=[];return"explore"===e&&i.push({value:"auto",translation:"Common.Auto"}),i.push({value:"primary",translation:"properties.colorMode.primary"}),i.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),i.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&i.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),i}},persistentColors:{show:e=>i(e)?n(e)&&!_u.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:i}},this.legend={show:o,showTitle:{show(e){const t=_u.getValue(e,"color.auto");return _u.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===_u.getValue(e,"color.mode")&&!0===_u.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>_u.getValue(e,"legend.show")&&o(e)}}};function Wu(e){return new Vu(e)}const Uu={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}}}}}}},Bu=(e,t,n)=>{const i=`${e}.fontFamily`,o=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:o,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.pieChart",e,"color")})}}}}},Gu=(e,t,n,i)=>{const o=g({theme:i,translator:n,flags:t,config:{id:"pieChart",paths:["axis.title","label.name","label.value","legend.title","legend.label"]}});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:Bu("axis.title",o,i)}}}: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:Bu("label.name",o,i)}}}: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:Bu("label.value",o,i)}}}:void 0,legendTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Bu("legend.title",o,i)}}}:void 0,legendLabelSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Bu("legend.label",o,i)}}}:void 0}}},Ku=Wu("hard");const Ju=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(r(e,"color.mode","byDimension"),r(e,"color.byDimDef.activeDimensionIndex",0),r(e,"color.persistent",!1))},Zu=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},Xu=e=>{var t;const{flags:n,translator:i}=e||{},o=null==e||null===(t=e.sense)||void 0===t?void 0:t.theme,a=null==n?void 0:n.isEnabled("SENSECLIENT_IM_2429_PIECHART_BG"),s={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?i.get("Simple.Color.Auto",i.get("properties.colorMode.byDimension")):i.get("Common.Custom")},change:Ju},colorMode:{options:Zu}}}}},l={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||r(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,i)=>!i.dimensionTitle,set(e,t,n,i,o){o.dimensionTitle=!e}}}}}}},c={uses:"settings",items:{simpleStyling:Uu,simpleLabels:l,general:{items:{showDisclaimer:{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:Gu(a,n,i,o),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:Ku.color.colorMode.options},persistentColors:{show:Ku.color.persistentColors.show}}},simpleColors:s,legend:{show:Ku.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Ku.legend.showTitle.show},dock:{show:Ku.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}};return c},Yu={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)}}}}}}},Qu={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:i}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=i.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},ed={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function td(e){return{type:"items",component:"accordion",items:{data:Yu,sorting:Qu,addons:ed,settings:Xu(e)}}}const nd=Wu("explore"),id=td();var od={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:id.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:id.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:nd.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&nd.color.useDimColVal.show(e))}}}}}}};const rd="slices";function ad(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function sd(e){return e.data.num.label}function ld(e){return e.data.radius.label}function cd(e,t,n,i){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?sd:ad;if("share"===e.dataPoint.labelMode)return ad;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?ld:sd;return sd}(n,i)(e,t)}function ud(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 dd{constructor({element:e,properties:t,effectHelper:n,Flag:i}){this.element=e,this.Flag=i,n.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.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"),i=this.effectLayer[0].getBoundingClientRect(),o=n.map((n=>{const{start:o,end:r,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,c=n.element.getBoundingClientRect(),u=(o+r)/2,d=c.left-i.left+l.x*(s.x+a*Math.sin(u)),p=c.top-i.top+l.y*(s.y-a*Math.cos(u)),h=Math.cos(u)>0?"top":"bottom",f=Math.sin(u)>0?"right":"left";return{title:ud(n),label:cd(n,this.chart.formatter,e,t),orientation:`${h}${f}`,position:{x:d,y:p}}}));this.Flag.show(this.effectLayer,o)}init(e,t,n,i){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=le(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=i,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=le(e.options,{effect:null}),n?t.getProperties().then((e=>le(e,{effectPath:null,effectProperties:null,dataPoint:le(!0,{},e.originalModelSettings.dataPoint),legend:le(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class pd extends dd{init(e,t,n,i){return e.options=le(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===i.max?Promise.resolve():super.init(e,t,n,i)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(rd).data.items,n=e.effectProperties.min,i=e.effectProperties.max,o=[];let r=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;n&&o<r[0]&&(r=[o,t]),i&&o>a[0]&&(a=[o,t])})),-1!==r[1]&&o.push(t[r[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class hd extends dd{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],i=this.chart.component(rd).data.items.map((e=>e.value)),o=i.indexOf(n.data.value);-1!==o&&(this.selectedIndex=o,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(rd).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===rd)).map(((n,i)=>{const o=cd(n,this.chart.formatter,e,t);return{text:`${ud(n)} (${o})`,value:i}}))}init(e,t,n,i){return e.options=le(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===i.selectedIndex?Promise.resolve():super.init(e,t,n,i)}}const fd="/effects/highlight-value",md="/effects/maxmin";var gd={isCompatible:({effectPath:e})=>e===md||e===fd,create:e=>e.effectPath===md?new pd(e):e.effectPath===fd?new hd(e):null};function vd(e){const t={},{components:n,tooltip:i}=e,o=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t[`chart_style_${e}`]=o.style[e]})),i){var r;t.chart_tooltip_custom=!i.auto;const e=null===(r=i.chart)||void 0===r||null===(r=r.object)||void 0===r?void 0:r.refId;!i.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function yd(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 bd(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function xd({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){bd(e),yd(t),_c.addCallbackCustomTooltip(t)},move(e,t){bd(e),yd(t),_c.moveCallbackCustomTooltip(t,e)},remove(e,t){_c.removeCallbackCustomTooltip(t,e)},replace(e,t,n,i){bd(e),yd(i),_c.replaceCallbackCustomTooltip(i,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){yd(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 Sd=e=>e.qMax<=0,Cd=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(Sd));function wd(e){return{definition:td(e),softDefinition:od,support:{snapshot:Cd,export:Cd,exportData:!0,sharing:Cd,viewData:!0,effects:!0},effects:gd,extendMetrics:vd,importProperties:(t,n,i,o)=>{const r={layout:{templateId:n.templateId}};i.mapProperties(r);const a={defaultDimension:i.getDefaultDimensionProperties(),defaultMeasure:i.getDefaultMeasureProperties()},s=G.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:xd(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>G.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function Ed(e){return{properties:{version:"1.28.7",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:au.STROKE.COLOR},cornerRadius:au.CORNER_RADIUS,innerRadius:au.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:[xd(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:i})=>{const o=G.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:xd(e),hypercubePath:i});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>G.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}e("default",(e=>{const{flags:t}=e;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(K).forEach((t=>{e.add(K[t])}))}}(e.translator);const n=Sc();return{qae:Ed(e),ext:wd(e),component(){const e=function({picasso:e}){var t;const n=T(),i=q(),o=D(),[r,c]=P(),u=Rc(),d=I(),p=M(),h=!(null===(t=d.qSelectionInfo)||void 0===t||!t.qInSelections),[f,m]=P(!1);return u.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:i,translator:o}){var r;return{active:n,label:o.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(r=e.qHyperCube)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r||null===(r=r[0])||void 0===r||!r.qIsOneAndOnlyOne),action(e){i("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:d,isInSelections:h,isLassoActionActive:f,setIsLassoActionActive:m,translator:p}),N((()=>(r&&(r.interactions.lasso.active=()=>f),{...u.lasso})),[r,f,h,p.language()]),O((()=>{i.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),r=t.chart({element:i,data:[],settings:{}}),p=a({chart:r,actions:u,selections:o,config:{selectionActions:!1}});p.setLayout(d),p.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const h=s({legendScrollOffset:0,rotation:0});h.intercept("rotation",(e=>(h.get("rotation")+e)%(2*Math.PI))),h.onChanged("rotation",(()=>{r.update({partialData:!0})}));const f=l();return u.on("selections-start",(()=>{r.brush("selection").start()})),c({picasso:t,chart:r,selectionService:p,viewState:h,viewCache:f,interactions:u}),()=>{p.destroy(),r.destroy(),u.removeAllListeners(),delete u.select,h.intercept("rotation",void 0),h.onChanged("rotation",void 0)}}),[]),r}({picasso:n}),i=function({flags:e,picasso:t,instance:n}){const i=L(),o=A(),r=M(),a=q(),[s,l]=P(),c=z(),u=j(),m=F(),g=T(),v=_(),{qLocaleInfo:y}=$(),b=H();return O((()=>{if(!n)return;a.style.overflow="hidden";const s=d({app:o,translator:r}),x=p({picasso:n.picasso,model:i,app:o,translator:r,config:{auto:!1,key:"fill"}}),S=h({picassoInstance:n.picasso,plugins:u,pluginArgs:Zc(c)}),C=Jc({flags:e,layout:c,app:o,model:i,picasso:t,chart:n.chart,translator:r,localeInfo:y,embed:b,options:g}),w=f({theme:v,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),E=Yc({chart:n.chart,translator:r,layout:c,constraints:m,options:g,themeService:w,colorService:x,custom:C}),k=function({layout:e,themeService:t,colorService:n,flags:i}){const o=t.getStyles(),r=t=>{var n;return i.isEnabled("CLIENT_IM_3050")?null===(n=e.components)||void 0===n?void 0:n.find((e=>e.key===t)):void 0};return{axis:{title:{getStyle:()=>{var e,t,i,a;const s=null===(e=r("axis"))||void 0===e||null===(e=e.axis)||void 0===e?void 0:e.title,l=n.getPaletteColor;return{fontFamily:null!==(t=null==s?void 0:s.fontFamily)&&void 0!==t?t:o.axis.title.fontFamily,fontSize:null!==(i=null==s?void 0:s.fontSize)&&void 0!==i?i:o.axis.title.fontSize,color:null!=s&&null!==(a=s.color)&&void 0!==a&&a.color?l(null==s?void 0:s.color):o.axis.title.color}}}},label:{name:{getStyle:()=>{var e,t,i,a;const s=null===(e=r("label"))||void 0===e||null===(e=e.label)||void 0===e?void 0:e.name,l=n.getPaletteColor;return{fill:null!=s&&null!==(t=s.color)&&void 0!==t&&t.color?l(null==s?void 0:s.color):o.label.name.color,fontSize:null!==(i=null==s?void 0:s.fontSize)&&void 0!==i?i:o.label.name.fontSize,fontFamily:null!==(a=null==s?void 0:s.fontFamily)&&void 0!==a?a:o.label.name.fontFamily}}},value:{getStyle:()=>{var e,t,i,a;const s=null===(e=r("label"))||void 0===e||null===(e=e.label)||void 0===e?void 0:e.value,l=n.getPaletteColor;return{fill:null!=s&&null!==(t=s.color)&&void 0!==t&&t.color?l(null==s?void 0:s.color):o.label.value.color,fontSize:null!==(i=null==s?void 0:s.fontSize)&&void 0!==i?i:o.label.value.fontSize,fontFamily:null!==(a=null==s?void 0:s.fontFamily)&&void 0!==a?a:o.label.value.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,i,a;const s=null===(e=r("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.title,l=n.getPaletteColor;return{fontFamily:null!==(t=null==s?void 0:s.fontFamily)&&void 0!==t?t:o.legend.title.fontFamily,fontSize:null!==(i=null==s?void 0:s.fontSize)&&void 0!==i?i:o.legend.title.fontSize,color:null!=s&&null!==(a=s.color)&&void 0!==a&&a.color?l(null==s?void 0:s.color):o.legend.title.color}}},label:{getStyle:()=>{var e,t,i,a;const s=null===(e=r("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.label,l=n.getPaletteColor;return{fontFamily:null!==(t=null==s?void 0:s.fontFamily)&&void 0!==t?t:o.legend.label.fontFamily,fontSize:null!==(i=null==s?void 0:s.fontSize)&&void 0!==i?i:o.legend.label.fontSize,color:null!=s&&null!==(a=s.color)&&void 0!==a&&a.color?l(null==s?void 0:s.color):o.legend.label.color}}}}}}({layout:c,themeService:w,colorService:x,flags:e}),R=Xc({layout:c});l({alternativeService:s,colorService:x,disclaimerService:R,pluginService:S,themeService:w,tooltipService:E,styleService:k})}),[i,o,n,c,r.language(),m,g.direction,v.name()]),s}({flags:t,picasso:n,instance:e});ju({instance:e,services:i,picasso:n,flags:t}),function({instance:e}){const t=z(),n=T(),i=W();O((()=>{if(!e||!e.generateSettings)return;const{viewCache:i,chart:o,generateSettings:r}=e;o.update({settings:r()}),i.set("chartWidth",o.element.clientWidth),i.set("chartHeight",o.element.clientHeight),n.effect&&n.effect.update(t,o)}),[i.width,i.height])}({instance:e}),Fu({instance:e,services:i})}}}))}}}));
14
+ */Ho();var Uo=Date.now(),Bo="fnValues"+Uo,Go="fnStyle"+ ++Uo,Ko="@global",Jo="@global ",Zo=function(){function e(e,t,n){for(var i in this.type="global",this.at=Ko,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new xo(jn({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var i=this.rules.add(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),i},t.replaceRule=function(e,t,n){var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),i},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),Xo=function(){function e(e,t,n){this.type="global",this.at=Ko,this.isProcessed=!1,this.key=e,this.options=n;var i=e.substr(8);this.rule=n.jss.createRule(i,t,jn({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Yo=/\s*,\s*/g;function Qo(e,t){for(var n=e.split(Yo),i="",o=0;o<n.length;o++)i+=t+" "+n[o].trim(),n[o+1]&&(i+=", ");return i}function er(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Ko)return new Zo(e,t,n);if("@"===e[0]&&e.substr(0,8)===Jo)return new Xo(e,t,n);var i=n.parent;return i&&("global"===i.type||i.options.parent&&"global"===i.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,i=e.style,o=i?i[Ko]:null;if(o){for(var r in o)t.addRule(r,o[r],jn({},n,{selector:Qo(r,e.selector)}));delete i[Ko]}}(e,t),function(e,t){var n=e.options,i=e.style;for(var o in i)if("@"===o[0]&&o.substr(0,7)===Ko){var r=Qo(o.substr(7),e.selector);t.addRule(r,i[o],jn({},n,{selector:r})),delete i[o]}}(e,t))}}}var tr=/\s*,\s*/g,nr=/&/g,ir=/\$([\w-]+)/g;function or(){function e(e,t){return function(n,i){var o=e.getRule(i)||t&&t.getRule(i);return o?o.selector:i}}function t(e,t){for(var n=t.split(tr),i=e.split(tr),o="",r=0;r<n.length;r++)for(var a=n[r],s=0;s<i.length;s++){var l=i[s];o&&(o+=", "),o+=-1!==l.indexOf("&")?l.replace(nr,a):a+" "+l}return o}function n(e,t,n){if(n)return jn({},n,{index:n.index+1});var i=e.options.nestingLevel;i=void 0===i?1:i+1;var o=jn({},e.options,{nestingLevel:i,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(i,o,r){if("style"!==o.type)return i;var a,s,l=o,c=l.options.parent;for(var u in i){var d=-1!==u.indexOf("&"),p="@"===u[0];if(d||p){if(a=n(l,c,a),d){var h=t(u,l.selector);s||(s=e(c,r)),h=h.replace(ir,s);var f=l.key+"-"+u;"replaceRule"in c?c.replaceRule(f,i[u],jn({},a,{selector:h})):c.addRule(f,i[u],jn({},a,{selector:h}))}else p&&c.addRule(u,{},a).addRule(l.key,i[u],{selector:l.selector});delete i[u]}}return i}}}var rr=/[A-Z]/g,ar=/^ms-/,sr={};function lr(e){return"-"+e.toLowerCase()}function cr(e){if(sr.hasOwnProperty(e))return sr[e];var t=e.replace(rr,lr);return sr[e]=ar.test(t)?"-"+t:t}function ur(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:cr(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(ur):t.fallbacks=ur(e.fallbacks)),t}var dr=Vo&&CSS?CSS.px:"px",pr=Vo&&CSS?CSS.ms:"ms",hr=Vo&&CSS?CSS.percent:"%";function fr(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},i={};for(var o in e)i[o]=e[o],i[o.replace(t,n)]=e[o];return i}var mr=fr({"animation-delay":pr,"animation-duration":pr,"background-position":dr,"background-position-x":dr,"background-position-y":dr,"background-size":dr,border:dr,"border-bottom":dr,"border-bottom-left-radius":dr,"border-bottom-right-radius":dr,"border-bottom-width":dr,"border-left":dr,"border-left-width":dr,"border-radius":dr,"border-right":dr,"border-right-width":dr,"border-top":dr,"border-top-left-radius":dr,"border-top-right-radius":dr,"border-top-width":dr,"border-width":dr,"border-block":dr,"border-block-end":dr,"border-block-end-width":dr,"border-block-start":dr,"border-block-start-width":dr,"border-block-width":dr,"border-inline":dr,"border-inline-end":dr,"border-inline-end-width":dr,"border-inline-start":dr,"border-inline-start-width":dr,"border-inline-width":dr,"border-start-start-radius":dr,"border-start-end-radius":dr,"border-end-start-radius":dr,"border-end-end-radius":dr,margin:dr,"margin-bottom":dr,"margin-left":dr,"margin-right":dr,"margin-top":dr,"margin-block":dr,"margin-block-end":dr,"margin-block-start":dr,"margin-inline":dr,"margin-inline-end":dr,"margin-inline-start":dr,padding:dr,"padding-bottom":dr,"padding-left":dr,"padding-right":dr,"padding-top":dr,"padding-block":dr,"padding-block-end":dr,"padding-block-start":dr,"padding-inline":dr,"padding-inline-end":dr,"padding-inline-start":dr,"mask-position-x":dr,"mask-position-y":dr,"mask-size":dr,height:dr,width:dr,"min-height":dr,"max-height":dr,"min-width":dr,"max-width":dr,bottom:dr,left:dr,top:dr,right:dr,inset:dr,"inset-block":dr,"inset-block-end":dr,"inset-block-start":dr,"inset-inline":dr,"inset-inline-end":dr,"inset-inline-start":dr,"box-shadow":dr,"text-shadow":dr,"column-gap":dr,"column-rule":dr,"column-rule-width":dr,"column-width":dr,"font-size":dr,"font-size-delta":dr,"letter-spacing":dr,"text-decoration-thickness":dr,"text-indent":dr,"text-stroke":dr,"text-stroke-width":dr,"word-spacing":dr,motion:dr,"motion-offset":dr,outline:dr,"outline-offset":dr,"outline-width":dr,perspective:dr,"perspective-origin-x":hr,"perspective-origin-y":hr,"transform-origin":hr,"transform-origin-x":hr,"transform-origin-y":hr,"transform-origin-z":hr,"transition-delay":pr,"transition-duration":pr,"vertical-align":dr,"flex-basis":dr,"shape-margin":dr,size:dr,gap:dr,grid:dr,"grid-gap":dr,"row-gap":dr,"grid-row-gap":dr,"grid-column-gap":dr,"grid-template-rows":dr,"grid-template-columns":dr,"grid-auto-rows":dr,"grid-auto-columns":dr,"box-shadow-x":dr,"box-shadow-y":dr,"box-shadow-blur":dr,"box-shadow-spread":dr,"font-line-height":dr,"text-shadow-x":dr,"text-shadow-y":dr,"text-shadow-blur":dr});function gr(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]=gr(e,t[i],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=gr(o,t[o],n);else for(var r in t)t[r]=gr(e+"-"+r,t[r],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||mr[e];return!a||0===t&&a===dr?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function vr(e){void 0===e&&(e={});var t=fr(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var i in e)e[i]=gr(i,e[i],t);return e},onChangeValue:function(e,n){return gr(n,e,t)}}}var yr="",br="",xr="",Sr="",Cr=qi&&"ontouchstart"in document.documentElement;if(qi){var wr={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Er=document.createElement("p").style;for(var kr in wr)if(kr+"Transform"in Er){yr=kr,br=wr[kr];break}"Webkit"===yr&&"msHyphens"in Er&&(yr="ms",br=wr.ms,Sr="edge"),"Webkit"===yr&&"-apple-trailing-word"in Er&&(xr="apple")}var Rr=yr,Tr=br,qr=xr,Dr=Sr,Pr=Cr;var Ir={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Rr?"-webkit-"+e:Tr+e)}},Mr={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Rr?Tr+"print-"+e:e)}},Nr=/[-\s]+(.)?/g;function Or(e,t){return t?t.toUpperCase():""}function Lr(e){return e.replace(Nr,Or)}function Ar(e){return Lr("-"+e)}var zr,jr={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Rr){var n="mask-image";if(Lr(n)in t)return e;if(Rr+Ar(n)in t)return Tr+e}return e}},Fr={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==qr||Pr?e:Tr+e)}},_r={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Tr+e)}},$r={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Tr+e)}},Hr={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Rr||"ms"===Rr&&"edge"!==Dr?Tr+e:e)}},Vr={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Rr||"ms"===Rr||"apple"===qr?Tr+e:e)}},Wr={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Rr?"WebkitColumn"+Ar(e)in t&&Tr+"column-"+e:"Moz"===Rr&&("page"+Ar(e)in t&&"page-"+e))}},Ur={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Rr)return e;var n=e.replace("-inline","");return Rr+Ar(n)in t&&Tr+n}},Br={supportedProperty:function(e,t){return Lr(e)in t&&e}},Gr={supportedProperty:function(e,t){var n=Ar(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Rr+n in t?Tr+e:"Webkit"!==Rr&&"Webkit"+n in t&&"-webkit-"+e}},Kr={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Rr?""+Tr+e:e)}},Jr={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Rr?Tr+"scroll-chaining":e)}},Zr={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Xr={supportedProperty:function(e,t){var n=Zr[e];return!!n&&(Rr+Ar(n)in t&&Tr+n)}},Yr={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Qr=Object.keys(Yr),ea=function(e){return Tr+e},ta={supportedProperty:function(e,t,n){var i=n.multiple;if(Qr.indexOf(e)>-1){var o=Yr[e];if(!Array.isArray(o))return Rr+Ar(o)in t&&Tr+o;if(!i)return!1;for(var r=0;r<o.length;r++)if(!(Rr+Ar(o[0])in t))return!1;return o.map(ea)}return!1}},na=[Ir,Mr,jr,Fr,_r,$r,Hr,Vr,Wr,Ur,Br,Gr,Kr,Jr,Xr,ta],ia=na.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),oa=na.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,fi(t.noPrefill)),e}),[]),ra={};if(qi){zr=document.createElement("p");var aa=window.getComputedStyle(document.documentElement,"");for(var sa in aa)isNaN(sa)||(ra[aa[sa]]=aa[sa]);oa.forEach((function(e){return delete ra[e]}))}function la(e,t){if(void 0===t&&(t={}),!zr)return e;if(null!=ra[e])return ra[e];"transition"!==e&&"transform"!==e||(t[e]=e in zr.style);for(var n=0;n<ia.length&&(ra[e]=ia[n](e,zr.style,t),!ra[e]);n++);try{zr.style[e]=""}catch(e){return!1}return ra[e]}var ca,ua={},da={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},pa=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function ha(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var i=t?la(t):", "+la(n);return i||(t||n)}function fa(e,t){var n=t;if(!ca||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var i=e+n;if(null!=ua[i])return ua[i];try{ca.style[e]=n}catch(e){return ua[i]=!1,!1}if(da[e])n=n.replace(pa,ha);else if(""===ca.style[e]&&("-ms-flex"===(n=Tr+n)&&(ca.style[e]="-ms-flexbox"),ca.style[e]=n,""===ca.style[e]))return ua[i]=!1,!1;return ca.style[e]="",ua[i]=n,ua[i]}function ma(){function e(t){for(var n in t){var i=t[n];if("fallbacks"===n&&Array.isArray(i))t[n]=i.map(e);else{var o=!1,r=la(n);r&&r!==n&&(o=!0);var a=!1,s=fa(r,zi(i));s&&s!==i&&(a=!0),(o||a)&&(o&&delete t[n],t[r||n]=s||i)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Rr?e:"@"+Tr+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return fa(t,zi(e))||e}}}function ga(){return{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var i=Li(e,{},n);return i[Go]=t,i},onProcessStyle:function(e,t){if(Bo in t||Go in t)return e;var n={};for(var i in e){var o=e[i];"function"==typeof o&&(delete e[i],n[i]=o)}return t[Bo]=n,e},onUpdate:function(e,t,n,i){var o=t,r=o[Go];r&&(o.style=r(e)||{});var a=o[Bo];if(a)for(var s in a)o.prop(s,a[s](e),i)}},er(),or(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=ur(e[t]);return e}return ur(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var i=cr(t);return t===i?e:(n.prop(i,e),null)}},vr(),"undefined"==typeof window?null:ma(),(e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var i={},o=Object.keys(t).sort(e),r=0;r<o.length;r++)i[o[r]]=t[o[r]];return i}})]};var e}function va(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var i=jn({},t);return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}qi&&(ca=document.createElement("p"));var ya=function(e,t,n,i){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,i)},ba=function(e,t,n){var i=e.get(t);return i?i.get(n):void 0},xa=function(e,t,n){e.get(t).delete(n)},Sa=v.createContext(null);function Ca(){return v.useContext(Sa)}var wa,Ea=Ho(ga()),ka={disableGeneration:!1,generateClassName:ki(),jss:Ea,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Ra=v.createContext(ka);function Ta(e){var t=e.children,n=e.injectFirst,i=void 0!==n&&n,o=e.disableGeneration,r=void 0!==o&&o,a=Xn(e,["children","injectFirst","disableGeneration"]),s=jn({},v.useContext(Ra),{disableGeneration:r},a);if(!s.jss.options.insertionPoint&&i&&"undefined"!=typeof window){if(!wa){var l=document.head;wa=document.createComment("mui-inject-first"),l.insertBefore(wa,l.firstChild)}s.jss=Ho({plugins:ga().plugins,insertionPoint:wa})}return v.createElement(Ra.Provider,{value:s},t)}var qa=-1e9;var Da={};function Pa(e,t){var n=e.state,i=e.theme,o=e.stylesOptions,r=e.stylesCreator,a=e.name;if(!o.disableGeneration){var s=ba(o.sheetsManager,r,i);s||(s={refs:0,staticSheet:null,dynamicStyles:null},ya(o.sheetsManager,r,i,s));var l=jn({},r.options,o,{theme:i,flip:"boolean"==typeof o.flip?o.flip:"rtl"===i.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var c=o.sheetsRegistry;if(0===s.refs){var u;o.sheetsCache&&(u=ba(o.sheetsCache,r,i));var d=r.create(i,a);u||((u=o.jss.createStyleSheet(d,jn({link:!1},l))).attach(),o.sheetsCache&&ya(o.sheetsCache,r,i,u)),c&&c.add(u),s.staticSheet=u,s.dynamicStyles=Wo(d)}if(s.dynamicStyles){var p=o.jss.createStyleSheet(s.dynamicStyles,jn({link:!0},l));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=va({baseClasses:s.staticSheet.classes,newClasses:p.classes}),c&&c.add(p)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Ia(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,o=t.Component,r=t.defaultTheme,a=void 0===r?Da:r,s=Xn(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,i){var o;try{o=t?e(n):e}catch(e){throw e}if(!i||!n.overrides||!n.overrides[i])return o;var r=n.overrides[i],a=jn({},o);return Object.keys(r).forEach((function(e){a[e]=$n(a[e],r[e])})),a},options:{}}}(e),c=n||i||"makeStyles";l.options={index:qa+=1,name:n,meta:c,classNamePrefix:c};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Ca()||a,i=jn({},v.useContext(Ra),s),r=v.useRef(),c=v.useRef();!function(e,t){var n,i=v.useRef([]),o=v.useMemo((function(){return{}}),t);i.current!==o&&(i.current=o,n=e()),v.useEffect((function(){return function(){n&&n()}}),[o])}((function(){var o={name:n,state:{},stylesCreator:l,stylesOptions:i,theme:t};return Pa(o,e),c.current=!1,r.current=o,function(){!function(e){var t=e.state,n=e.theme,i=e.stylesOptions,o=e.stylesCreator;if(!i.disableGeneration){var r=ba(i.sheetsManager,o,n);r.refs-=1;var a=i.sheetsRegistry;0===r.refs&&(xa(i.sheetsManager,o,n),i.jss.removeStyleSheet(r.staticSheet),a&&a.remove(r.staticSheet)),t.dynamicSheet&&(i.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(o)}}),[t,l]),v.useEffect((function(){c.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(r.current,e),c.current=!0}));var u=function(e,t,n){var i=e.state;if(e.stylesOptions.disableGeneration)return t||{};i.cacheClasses||(i.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return i.classes!==i.cacheClasses.lastJSS&&(i.cacheClasses.lastJSS=i.classes,o=!0),t!==i.cacheClasses.lastProp&&(i.cacheClasses.lastProp=t,o=!0),o&&(i.cacheClasses.value=va({baseClasses:i.cacheClasses.lastJSS,newClasses:t,Component:n})),i.cacheClasses.value}(r.current,e.classes,o);return u}}function Ma(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ma(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Na(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Ma(e))&&(i&&(i+=" "),i+=t);return i}var Oa={exports:{}},La={},Aa="function"==typeof Symbol&&Symbol.for,za=Aa?Symbol.for("react.element"):60103,ja=Aa?Symbol.for("react.portal"):60106,Fa=Aa?Symbol.for("react.fragment"):60107,_a=Aa?Symbol.for("react.strict_mode"):60108,$a=Aa?Symbol.for("react.profiler"):60114,Ha=Aa?Symbol.for("react.provider"):60109,Va=Aa?Symbol.for("react.context"):60110,Wa=Aa?Symbol.for("react.async_mode"):60111,Ua=Aa?Symbol.for("react.concurrent_mode"):60111,Ba=Aa?Symbol.for("react.forward_ref"):60112,Ga=Aa?Symbol.for("react.suspense"):60113,Ka=Aa?Symbol.for("react.suspense_list"):60120,Ja=Aa?Symbol.for("react.memo"):60115,Za=Aa?Symbol.for("react.lazy"):60116,Xa=Aa?Symbol.for("react.block"):60121,Ya=Aa?Symbol.for("react.fundamental"):60117,Qa=Aa?Symbol.for("react.responder"):60118,es=Aa?Symbol.for("react.scope"):60119;function ts(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case za:switch(e=e.type){case Wa:case Ua:case Fa:case $a:case _a:case Ga:return e;default:switch(e=e&&e.$$typeof){case Va:case Ba:case Za:case Ja:case Ha:return e;default:return t}}case ja:return t}}}function ns(e){return ts(e)===Ua}La.AsyncMode=Wa,La.ConcurrentMode=Ua,La.ContextConsumer=Va,La.ContextProvider=Ha,La.Element=za,La.ForwardRef=Ba,La.Fragment=Fa,La.Lazy=Za,La.Memo=Ja,La.Portal=ja,La.Profiler=$a,La.StrictMode=_a,La.Suspense=Ga,La.isAsyncMode=function(e){return ns(e)||ts(e)===Wa},La.isConcurrentMode=ns,La.isContextConsumer=function(e){return ts(e)===Va},La.isContextProvider=function(e){return ts(e)===Ha},La.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===za},La.isForwardRef=function(e){return ts(e)===Ba},La.isFragment=function(e){return ts(e)===Fa},La.isLazy=function(e){return ts(e)===Za},La.isMemo=function(e){return ts(e)===Ja},La.isPortal=function(e){return ts(e)===ja},La.isProfiler=function(e){return ts(e)===$a},La.isStrictMode=function(e){return ts(e)===_a},La.isSuspense=function(e){return ts(e)===Ga},La.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Fa||e===Ua||e===$a||e===_a||e===Ga||e===Ka||"object"==typeof e&&null!==e&&(e.$$typeof===Za||e.$$typeof===Ja||e.$$typeof===Ha||e.$$typeof===Va||e.$$typeof===Ba||e.$$typeof===Ya||e.$$typeof===Qa||e.$$typeof===es||e.$$typeof===Xa)},La.typeOf=ts,Oa.exports=La;var is=Oa.exports,os={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},rs={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},as={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ss={};function ls(e){return is.isMemo(e)?as:ss[e.$$typeof]||os}ss[is.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ss[is.Memo]=as;var cs=Object.defineProperty,us=Object.getOwnPropertyNames,ds=Object.getOwnPropertySymbols,ps=Object.getOwnPropertyDescriptor,hs=Object.getPrototypeOf,fs=Object.prototype;var ms=function e(t,n,i){if("string"!=typeof n){if(fs){var o=hs(n);o&&o!==fs&&e(t,o,i)}var r=us(n);ds&&(r=r.concat(ds(n)));for(var a=ls(t),s=ls(n),l=0;l<r.length;++l){var c=r[l];if(!(rs[c]||i&&i[c]||s&&s[c]||a&&a[c])){var u=ps(n,c);try{cs(t,c,u)}catch(e){}}}}return t},gs=Y(ms);function vs(e){return function(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.name,r=Xn(i,["name"]),a=o,s="function"==typeof t?function(e){return{root:function(n){return t(jn({theme:e},n))}}}:{root:t},l=Ia(s,jn({Component:e,name:o||e.displayName,classNamePrefix:a},r));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var c=v.forwardRef((function(t,i){var o,r,a,s=t.children,c=t.className,u=t.clone,d=t.component,p=Xn(t,["children","className","clone","component"]),h=Na(l(t).root,c),f=p;if(n&&(o=f,r=n,a={},Object.keys(o).forEach((function(e){-1===r.indexOf(e)&&(a[e]=o[e])})),f=a),u)return v.cloneElement(s,jn({className:Na(s.props.className,h)},f));if("function"==typeof s)return s(jn({className:h},f));var m=d||e;return v.createElement(m,jn({ref:i,className:h},f),s)}));return gs(c,e),c}}function ys(e){var t=e.children,n=e.theme,i=Ca(),o=v.useMemo((function(){var e=null===i?n:function(e,t){return"function"==typeof t?t(e):jn({},e,t)}(i,n);return null!=e&&(e[wi]=null!==i),e}),[n,i]);return v.createElement(Sa.Provider,{value:o},t)}var bs=Ci(),xs=function(e){var t=vs(e);return function(e,n){return t(e,jn({defaultTheme:bs},n))}};function Ss(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=t.defaultTheme,o=t.withTheme,r=void 0!==o&&o,a=t.name,s=Xn(t,["defaultTheme","withTheme","name"]),l=a,c=Ia(e,jn({defaultTheme:i,Component:n,name:a||n.displayName,classNamePrefix:l},s)),u=v.forwardRef((function(e,t){e.classes;var o,s=e.innerRef,l=Xn(e,["classes","innerRef"]),u=c(jn({},n.defaultProps,e)),d=l;return("string"==typeof a||r)&&(o=Ca()||i,a&&(d=Ri({theme:o,name:a,props:l})),r&&!d.theme&&(d.theme=o)),v.createElement(n,jn({ref:s||t,classes:u},d))}));return gs(u,n),u}}(e,jn({defaultTheme:bs},t))}function Cs(e){if("string"!=typeof e)throw new Error(Wn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ws(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];e.apply(this,i),t.apply(this,i)}}),(function(){}))}function Es(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Es(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function ks(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Es(e))&&(i&&(i+=" "),i+=t);return i}function Rs(e){return e&&e.ownerDocument||document}function Ts(e){return Rs(e).defaultView||window}function qs(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Ds="undefined"!=typeof window?y.useLayoutEffect:y.useEffect;function Ps(e){var t=y.useRef(e);return Ds((function(){t.current=e})),y.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Is(e,t){return y.useMemo((function(){return null==e&&null==t?null:function(n){qs(e,n),qs(t,n)}}),[e,t])}var Ms=!0,Ns=!1,Os=null,Ls={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function As(e){e.metaKey||e.altKey||e.ctrlKey||(Ms=!0)}function zs(){Ms=!1}function js(){"hidden"===this.visibilityState&&Ns&&(Ms=!0)}function Fs(e){var t,n,i,o=e.target;try{return o.matches(":focus-visible")}catch(e){}return Ms||(n=(t=o).type,!("INPUT"!==(i=t.tagName)||!Ls[n]||t.readOnly)||"TEXTAREA"===i&&!t.readOnly||!!t.isContentEditable)}function _s(){Ns=!0,window.clearTimeout(Os),Os=window.setTimeout((function(){Ns=!1}),100)}function $s(){return{isFocusVisible:Fs,onBlurVisible:_s,ref:y.useCallback((function(e){var t,n=C.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",As,!0),t.addEventListener("mousedown",zs,!0),t.addEventListener("pointerdown",zs,!0),t.addEventListener("touchstart",zs,!0),t.addEventListener("visibilitychange",js,!0))}),[])}}var Hs=!1,Vs=v.createContext(null),Ws="unmounted",Us="exited",Bs="entering",Gs="entered",Ks="exiting",Js=function(e){function t(t,n){var i;i=e.call(this,t,n)||this;var o,r=n&&!n.isMounting?t.enter:t.appear;return i.appearStatus=null,t.in?r?(o=Us,i.appearStatus=Bs):o=Gs:o=t.unmountOnExit||t.mountOnEnter?Ws:Us,i.state={status:o},i.nextCallback=null,i}Ii(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ws?{status:Us}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Bs&&n!==Gs&&(t=Bs):n!==Bs&&n!==Gs||(t=Ks)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,i=this.props.timeout;return e=t=n=i,null!=i&&"number"!=typeof i&&(e=i.exit,t=i.enter,n=void 0!==i.appear?i.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Bs){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Us&&this.setState({status:Ws})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,o=this.props.nodeRef?[i]:[w.findDOMNode(this),i],r=o[0],a=o[1],s=this.getTimeouts(),l=i?s.appear:s.enter;!e&&!n||Hs?this.safeSetState({status:Gs},(function(){t.props.onEntered(r)})):(this.props.onEnter(r,a),this.safeSetState({status:Bs},(function(){t.props.onEntering(r,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Gs},(function(){t.props.onEntered(r,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:w.findDOMNode(this);t&&!Hs?(this.props.onExit(i),this.safeSetState({status:Ks},(function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Us},(function(){e.props.onExited(i)}))}))}))):this.safeSetState({status:Us},(function(){e.props.onExited(i)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(i){n&&(n=!1,t.nextCallback=null,e(i))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this),i=null==e&&!this.props.addEndListener;if(n&&!i){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=o[0],a=o[1];this.props.addEndListener(r,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Ws)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var i=Zn(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return v.createElement(Vs.Provider,{value:null},"function"==typeof n?n(e,i):v.cloneElement(v.Children.only(n),i))},t}(v.Component);function Zs(){}function Xs(e,t){var n=Object.create(null);return e&&S.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&b(e)?t(e):e}(e)})),n}function Ys(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Qs(e,t,n){var i=Xs(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var i,o=Object.create(null),r=[];for(var a in e)a in t?r.length&&(o[a]=r,r=[]):r.push(a);var s={};for(var l in t){if(o[l])for(i=0;i<o[l].length;i++){var c=o[l][i];s[o[l][i]]=n(c)}s[l]=n(l)}for(i=0;i<r.length;i++)s[r[i]]=n(r[i]);return s}(t,i);return Object.keys(o).forEach((function(r){var a=o[r];if(b(a)){var s=r in t,l=r in i,c=t[r],u=b(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&b(c)&&(o[r]=x(a,{onExited:n.bind(null,a),in:c.props.in,exit:Ys(a,"exit",e),enter:Ys(a,"enter",e)})):o[r]=x(a,{in:!1}):o[r]=x(a,{onExited:n.bind(null,a),in:!0,exit:Ys(a,"exit",e),enter:Ys(a,"enter",e)})}})),o}Js.contextType=Vs,Js.propTypes={},Js.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zs,onEntering:Zs,onEntered:Zs,onExit:Zs,onExiting:Zs,onExited:Zs},Js.UNMOUNTED=Ws,Js.EXITED=Us,Js.ENTERING=Bs,Js.ENTERED=Gs,Js.EXITING=Ks;var el=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},tl=function(e){function t(t,n){var i,o=(i=e.call(this,t,n)||this).handleExited.bind(Mi(i));return i.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},i}Ii(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,i,o=t.children,r=t.handleExited;return{children:t.firstRender?(n=e,i=r,Xs(n.children,(function(e){return x(e,{onExited:i.bind(null,e),in:!0,appear:Ys(e,"appear",n),enter:Ys(e,"enter",n),exit:Ys(e,"exit",n)})}))):Qs(e,o,r),firstRender:!1}},n.handleExited=function(e,t){var n=Xs(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=jn({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,i=Zn(e,["component","childFactory"]),o=this.state.contextValue,r=el(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===t?v.createElement(Vs.Provider,{value:o},r):v.createElement(Vs.Provider,{value:o},v.createElement(t,i,r))},t}(v.Component);tl.propTypes={},tl.defaultProps={component:"div",childFactory:function(e){return e}};function nl(e,t){var n=e.timeout,i=e.style,o=void 0===i?{}:i;return{duration:o.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}var il=y.forwardRef((function(e,t){var n=e.classes,i=e.className,o=e.component,r=void 0===o?"div":o,a=e.square,s=void 0!==a&&a,l=e.elevation,c=void 0===l?1:l,u=e.variant,d=void 0===u?"elevation":u,p=Xn(e,["classes","className","component","square","elevation","variant"]);return y.createElement(r,jn({className:ks(n.root,i,"outlined"===d?n.outlined:n["elevation".concat(c)],!s&&n.rounded),ref:t},p))})),ol=Ss((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),jn({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(il),rl="undefined"==typeof window?y.useEffect:y.useLayoutEffect;function al(e){var t=e.classes,n=e.pulsate,i=void 0!==n&&n,o=e.rippleX,r=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,c=void 0===l?function(){}:l,u=e.timeout,d=y.useState(!1),p=d[0],h=d[1],f=ks(t.ripple,t.rippleVisible,i&&t.ripplePulsate),m={width:a,height:a,top:-a/2+r,left:-a/2+o},g=ks(t.child,p&&t.childLeaving,i&&t.childPulsate),v=Ps(c);return rl((function(){if(!s){h(!0);var e=setTimeout(v,u);return function(){clearTimeout(e)}}}),[v,s,u]),y.createElement("span",{className:f,style:m},y.createElement("span",{className:g}))}var sl=y.forwardRef((function(e,t){var n=e.center,i=void 0!==n&&n,o=e.classes,r=e.className,a=Xn(e,["center","classes","className"]),s=y.useState([]),l=s[0],c=s[1],u=y.useRef(0),d=y.useRef(null);y.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var p=y.useRef(!1),h=y.useRef(null),f=y.useRef(null),m=y.useRef(null);y.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var g=y.useCallback((function(e){var t=e.pulsate,n=e.rippleX,i=e.rippleY,r=e.rippleSize,a=e.cb;c((function(e){return[].concat(fi(e),[y.createElement(al,{key:u.current,classes:o,timeout:550,pulsate:t,rippleX:n,rippleY:i,rippleSize:r})])})),u.current+=1,d.current=a}),[o]),v=y.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=t.pulsate,r=void 0!==o&&o,a=t.center,s=void 0===a?i||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&p.current)p.current=!1;else{"touchstart"===e.type&&(p.current=!0);var u,d,v,y=c?null:m.current,b=y?y.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,S=x.clientX,C=x.clientY;u=Math.round(S-b.left),d=Math.round(C-b.top)}if(s)(v=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(v+=1);else{var w=2*Math.max(Math.abs((y?y.clientWidth:0)-u),u)+2,E=2*Math.max(Math.abs((y?y.clientHeight:0)-d),d)+2;v=Math.sqrt(Math.pow(w,2)+Math.pow(E,2))}e.touches?null===f.current&&(f.current=function(){g({pulsate:r,rippleX:u,rippleY:d,rippleSize:v,cb:n})},h.current=setTimeout((function(){f.current&&(f.current(),f.current=null)}),80)):g({pulsate:r,rippleX:u,rippleY:d,rippleSize:v,cb:n})}}),[i,g]),b=y.useCallback((function(){v({},{pulsate:!0})}),[v]),x=y.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&f.current)return e.persist(),f.current(),f.current=null,void(h.current=setTimeout((function(){x(e,t)})));f.current=null,c((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return y.useImperativeHandle(t,(function(){return{pulsate:b,start:v,stop:x}}),[b,v,x]),y.createElement("span",jn({className:ks(o.root,r),ref:m},a),y.createElement(tl,{component:null,exit:!0},l))})),ll=Ss((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(y.memo(sl)),cl=y.forwardRef((function(e,t){var n=e.action,i=e.buttonRef,o=e.centerRipple,r=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"button":c,d=e.disabled,p=void 0!==d&&d,h=e.disableRipple,f=void 0!==h&&h,m=e.disableTouchRipple,g=void 0!==m&&m,v=e.focusRipple,b=void 0!==v&&v,x=e.focusVisibleClassName,S=e.onBlur,w=e.onClick,E=e.onFocus,k=e.onFocusVisible,R=e.onKeyDown,T=e.onKeyUp,q=e.onMouseDown,D=e.onMouseLeave,P=e.onMouseUp,I=e.onTouchEnd,M=e.onTouchMove,N=e.onTouchStart,O=e.onDragLeave,L=e.tabIndex,A=void 0===L?0:L,z=e.TouchRippleProps,j=e.type,F=void 0===j?"button":j,_=Xn(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),$=y.useRef(null);var H=y.useRef(null),V=y.useState(!1),W=V[0],U=V[1];p&&W&&U(!1);var B=$s(),G=B.isFocusVisible,K=B.onBlurVisible,J=B.ref;function Z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return Ps((function(i){return t&&t(i),!n&&H.current&&H.current[e](i),!0}))}y.useImperativeHandle(n,(function(){return{focusVisible:function(){U(!0),$.current.focus()}}}),[]),y.useEffect((function(){W&&b&&!f&&H.current.pulsate()}),[f,b,W]);var X=Z("start",q),Y=Z("stop",O),Q=Z("stop",P),ee=Z("stop",(function(e){W&&e.preventDefault(),D&&D(e)})),te=Z("start",N),ne=Z("stop",I),ie=Z("stop",M),oe=Z("stop",(function(e){W&&(K(e),U(!1)),S&&S(e)}),!1),re=Ps((function(e){$.current||($.current=e.currentTarget),G(e)&&(U(!0),k&&k(e)),E&&E(e)})),ae=function(){var e=C.findDOMNode($.current);return u&&"button"!==u&&!("A"===e.tagName&&e.href)},se=y.useRef(!1),le=Ps((function(e){b&&!se.current&&W&&H.current&&" "===e.key&&(se.current=!0,e.persist(),H.current.stop(e,(function(){H.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!p&&(e.preventDefault(),w&&w(e))})),ce=Ps((function(e){b&&" "===e.key&&H.current&&W&&!e.defaultPrevented&&(se.current=!1,e.persist(),H.current.stop(e,(function(){H.current.pulsate(e)}))),T&&T(e),w&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&w(e)})),ue=u;"button"===ue&&_.href&&(ue="a");var de={};"button"===ue?(de.type=F,de.disabled=p):("a"===ue&&_.href||(de.role="button"),de["aria-disabled"]=p);var pe=Is(i,t),he=Is(J,$),fe=Is(pe,he),me=y.useState(!1),ge=me[0],ve=me[1];y.useEffect((function(){ve(!0)}),[]);var ye=ge&&!f&&!p;return y.createElement(ue,jn({className:ks(s.root,l,W&&[s.focusVisible,x],p&&s.disabled),onBlur:oe,onClick:w,onFocus:re,onKeyDown:le,onKeyUp:ce,onMouseDown:X,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Y,onTouchEnd:ne,onTouchMove:ie,onTouchStart:te,ref:fe,tabIndex:p?-1:A},de,_),a,ye?y.createElement(ll,jn({ref:H,center:r},z)):null)})),ul=Ss({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(cl),dl={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},pl=y.forwardRef((function(e,t){var n=e.align,i=void 0===n?"inherit":n,o=e.classes,r=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,c=e.display,u=void 0===c?"initial":c,d=e.gutterBottom,p=void 0!==d&&d,h=e.noWrap,f=void 0!==h&&h,m=e.paragraph,g=void 0!==m&&m,v=e.variant,b=void 0===v?"body1":v,x=e.variantMapping,S=void 0===x?dl:x,C=Xn(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),w=l||(g?"p":S[b]||dl[b])||"span";return y.createElement(w,jn({className:ks(o.root,r,"inherit"!==b&&o[b],"initial"!==s&&o["color".concat(Cs(s))],f&&o.noWrap,p&&o.gutterBottom,g&&o.paragraph,"inherit"!==i&&o["align".concat(Cs(i))],"initial"!==u&&o["display".concat(Cs(u))]),ref:t},C))})),hl=Ss((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(pl),fl=y.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.color,a=void 0===r?"default":r,s=e.component,l=void 0===s?"button":s,c=e.disabled,u=void 0!==c&&c,d=e.disableElevation,p=void 0!==d&&d,h=e.disableFocusRipple,f=void 0!==h&&h,m=e.endIcon,g=e.focusVisibleClassName,v=e.fullWidth,b=void 0!==v&&v,x=e.size,S=void 0===x?"medium":x,C=e.startIcon,w=e.type,E=void 0===w?"button":w,k=e.variant,R=void 0===k?"text":k,T=Xn(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),q=C&&y.createElement("span",{className:ks(i.startIcon,i["iconSize".concat(Cs(S))])},C),D=m&&y.createElement("span",{className:ks(i.endIcon,i["iconSize".concat(Cs(S))])},m);return y.createElement(ul,jn({className:ks(i.root,i[R],o,"inherit"===a?i.colorInherit:"default"!==a&&i["".concat(R).concat(Cs(a))],"medium"!==S&&[i["".concat(R,"Size").concat(Cs(S))],i["size".concat(Cs(S))]],p&&i.disableElevation,u&&i.disabled,b&&i.fullWidth),component:l,disabled:u,focusRipple:!f,focusVisibleClassName:ks(i.focusVisible,g),ref:t,type:E},T),y.createElement("span",{className:i.label},q,n,D))})),ml=Ss((function(e){return{root:jn({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Jn(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Jn(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Jn(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Jn(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Jn(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Jn(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Jn(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(fl);var gl="undefined"!=typeof window?y.useLayoutEffect:y.useEffect,vl=y.forwardRef((function(e,t){var n=e.children,i=e.container,o=e.disablePortal,r=void 0!==o&&o,a=e.onRendered,s=y.useState(null),l=s[0],c=s[1],u=Is(y.isValidElement(n)?n.ref:null,t);return gl((function(){r||c(function(e){return e="function"==typeof e?e():e,C.findDOMNode(e)}(i)||document.body)}),[i,r]),gl((function(){if(l&&!r)return qs(t,l),function(){qs(t,null)}}),[t,l,r]),gl((function(){a&&(l||r)&&a()}),[a,l,r]),r?y.isValidElement(n)?y.cloneElement(n,{ref:u}):n:l?C.createPortal(n,l):l}));function yl(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function bl(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function xl(e,t,n){var i=arguments.length>4?arguments[4]:void 0,o=[t,n].concat(fi(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),r=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===r.indexOf(e.tagName)&&yl(e,i)}))}function Sl(e,t){var n=-1;return e.some((function(e,i){return!!t(e)&&(n=i,!0)})),n}function Cl(e,t){var n,i=[],o=[],r=e.container;if(!t.disableScrollLock){if(function(e){var t=Rs(e);return t.body===e?Ts(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();i.push({value:r.style.paddingRight,key:"padding-right",el:r}),r.style["padding-right"]="".concat(bl(r)+a,"px"),n=Rs(r).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(bl(e)+a,"px")}))}var s=r.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:r;i.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),i.forEach((function(e){var t=e.value,n=e.el,i=e.key;t?n.style.setProperty(i,t):n.style.removeProperty(i)}))}}var wl=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Di(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&yl(e.modalRef,!1);var i=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);xl(t,e.mountNode,e.modalRef,i,!0);var o=Sl(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:i}),n)}},{key:"mount",value:function(e,t){var n=Sl(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),i=this.containers[n];i.restore||(i.restore=Cl(i,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Sl(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),i=this.containers[n];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(t,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&yl(e.modalRef,!0),xl(i.container,e.mountNode,e.modalRef,i.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=i.modals[i.modals.length-1];o.modalRef&&yl(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function El(e){var t=e.children,n=e.disableAutoFocus,i=void 0!==n&&n,o=e.disableEnforceFocus,r=void 0!==o&&o,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,c=e.isEnabled,u=e.open,d=y.useRef(),p=y.useRef(null),h=y.useRef(null),f=y.useRef(),m=y.useRef(null),g=y.useCallback((function(e){m.current=C.findDOMNode(e)}),[]),v=Is(t.ref,g),b=y.useRef();return y.useEffect((function(){b.current=u}),[u]),!b.current&&u&&"undefined"!=typeof window&&(f.current=l().activeElement),y.useEffect((function(){if(u){var e=Rs(m.current);i||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){null!==m.current&&(e.hasFocus()&&!r&&c()&&!d.current?m.current&&!m.current.contains(e.activeElement)&&m.current.focus():d.current=!1)},n=function(t){!r&&c()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():p.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(f.current&&f.current.focus&&f.current.focus(),f.current=null)}}}),[i,r,s,c,u]),y.createElement(y.Fragment,null,y.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelStart"}),y.cloneElement(t,{ref:v}),y.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var kl={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Rl=y.forwardRef((function(e,t){var n=e.invisible,i=void 0!==n&&n,o=e.open,r=Xn(e,["invisible","open"]);return o?y.createElement("div",jn({"aria-hidden":!0,ref:t},r,{style:jn({},kl.root,i?kl.invisible:{},r.style)})):null}));var Tl=new wl,ql=y.forwardRef((function(e,t){var n=Ca(),i=Ri({name:"MuiModal",props:jn({},e),theme:n}),o=i.BackdropComponent,r=void 0===o?Rl:o,a=i.BackdropProps,s=i.children,l=i.closeAfterTransition,c=void 0!==l&&l,u=i.container,d=i.disableAutoFocus,p=void 0!==d&&d,h=i.disableBackdropClick,f=void 0!==h&&h,m=i.disableEnforceFocus,g=void 0!==m&&m,v=i.disableEscapeKeyDown,b=void 0!==v&&v,x=i.disablePortal,S=void 0!==x&&x,w=i.disableRestoreFocus,E=void 0!==w&&w,k=i.disableScrollLock,R=void 0!==k&&k,T=i.hideBackdrop,q=void 0!==T&&T,D=i.keepMounted,P=void 0!==D&&D,I=i.manager,M=void 0===I?Tl:I,N=i.onBackdropClick,O=i.onClose,L=i.onEscapeKeyDown,A=i.onRendered,z=i.open,j=Xn(i,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),F=y.useState(!0),_=F[0],$=F[1],H=y.useRef({}),V=y.useRef(null),W=y.useRef(null),U=Is(W,t),B=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(i),G=function(){return Rs(V.current)},K=function(){return H.current.modalRef=W.current,H.current.mountNode=V.current,H.current},J=function(){M.mount(K(),{disableScrollLock:R}),W.current.scrollTop=0},Z=Ps((function(){var e=function(e){return e="function"==typeof e?e():e,C.findDOMNode(e)}(u)||G().body;M.add(K(),e),W.current&&J()})),X=y.useCallback((function(){return M.isTopModal(K())}),[M]),Y=Ps((function(e){V.current=e,e&&(A&&A(),z&&X()?J():yl(W.current,!0))})),Q=y.useCallback((function(){M.remove(K())}),[M]);if(y.useEffect((function(){return function(){Q()}}),[Q]),y.useEffect((function(){z?Z():B&&c||Q()}),[z,Q,B,c,Z]),!P&&!z&&(!B||_))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:Si}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),B&&(te.onEnter=ws((function(){$(!1)}),s.props.onEnter),te.onExited=ws((function(){$(!0),c&&Q()}),s.props.onExited)),y.createElement(vl,{ref:Y,container:u,disablePortal:S},y.createElement("div",jn({ref:U,onKeyDown:function(e){"Escape"===e.key&&X()&&(L&&L(e),b||(e.stopPropagation(),O&&O(e,"escapeKeyDown")))},role:"presentation"},j,{style:jn({},ee.root,!z&&_?ee.hidden:{},j.style)}),q?null:y.createElement(r,jn({open:z,onClick:function(e){e.target===e.currentTarget&&(N&&N(e),!f&&O&&O(e,"backdropClick"))}},a)),y.createElement(El,{disableEnforceFocus:g,disableAutoFocus:p,disableRestoreFocus:E,getDoc:G,isEnabled:X,open:z},y.cloneElement(s,te))))})),Dl=y.forwardRef((function(e,t){var n=e.absolute,i=void 0!==n&&n,o=e.classes,r=e.className,a=e.component,s=void 0===a?"hr":a,l=e.flexItem,c=void 0!==l&&l,u=e.light,d=void 0!==u&&u,p=e.orientation,h=void 0===p?"horizontal":p,f=e.role,m=void 0===f?"hr"!==s?"separator":void 0:f,g=e.variant,v=void 0===g?"fullWidth":g,b=Xn(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return y.createElement(s,jn({className:ks(o.root,r,"fullWidth"!==v&&o[v],i&&o.absolute,c&&o.flexItem,d&&o.light,"vertical"===h&&o.vertical),role:m,ref:t},b))})),Pl=Ss((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:Jn(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(Dl);function Il(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Ml={entering:{opacity:1,transform:Il(1)},entered:{opacity:1,transform:"none"}},Nl=y.forwardRef((function(e,t){var n=e.children,i=e.disableStrictModeCompat,o=void 0!==i&&i,r=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,c=e.onExit,u=e.onExited,d=e.onExiting,p=e.style,h=e.timeout,f=void 0===h?"auto":h,m=e.TransitionComponent,g=void 0===m?Js:m,v=Xn(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),b=y.useRef(),x=y.useRef(),S=Ca()||bs,C=S.unstable_strictMode&&!o,w=y.useRef(null),E=Is(n.ref,t),k=Is(C?w:void 0,E),R=function(e){return function(t,n){if(e){var i=mi(C?[w.current,t]:[t,n],2),o=i[0],r=i[1];void 0===r?e(o):e(o,r)}}},T=R(l),q=R((function(e,t){!function(e){e.scrollTop}(e);var n,i=nl({style:p,timeout:f},{mode:"enter"}),o=i.duration,r=i.delay;"auto"===f?(n=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=n):n=o,e.style.transition=[S.transitions.create("opacity",{duration:n,delay:r}),S.transitions.create("transform",{duration:.666*n,delay:r})].join(","),a&&a(e,t)})),D=R(s),P=R(d),I=R((function(e){var t,n=nl({style:p,timeout:f},{mode:"exit"}),i=n.duration,o=n.delay;"auto"===f?(t=S.transitions.getAutoHeightDuration(e.clientHeight),x.current=t):t=i,e.style.transition=[S.transitions.create("opacity",{duration:t,delay:o}),S.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=Il(.75),c&&c(e)})),M=R(u);return y.useEffect((function(){return function(){clearTimeout(b.current)}}),[]),y.createElement(g,jn({appear:!0,in:r,nodeRef:C?w:void 0,onEnter:q,onEntered:D,onEntering:T,onExit:I,onExited:M,onExiting:P,addEndListener:function(e,t){var n=C?e:t;"auto"===f&&(b.current=setTimeout(n,x.current||0))},timeout:"auto"===f?null:f},v),(function(e,t){return y.cloneElement(n,jn({style:jn({opacity:0,transform:Il(.75),visibility:"exited"!==e||r?void 0:"hidden"},Ml[e],p,n.props.style),ref:k},t))}))}));Nl.muiSupportAuto=!0;var Ol=y.createContext({}),Ll=y.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.component,a=void 0===r?"ul":r,s=e.dense,l=void 0!==s&&s,c=e.disablePadding,u=void 0!==c&&c,d=e.subheader,p=Xn(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=y.useMemo((function(){return{dense:l}}),[l]);return y.createElement(Ol.Provider,{value:h},y.createElement(a,jn({className:ks(i.root,o,l&&i.dense,!u&&i.padding,d&&i.subheader),ref:t},p),d,n))})),Al=Ss({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Ll),zl="undefined"==typeof window?y.useEffect:y.useLayoutEffect,jl=y.forwardRef((function(e,t){var n=e.alignItems,i=void 0===n?"center":n,o=e.autoFocus,r=void 0!==o&&o,a=e.button,s=void 0!==a&&a,l=e.children,c=e.classes,u=e.className,d=e.component,p=e.ContainerComponent,h=void 0===p?"li":p,f=e.ContainerProps,m=(f=void 0===f?{}:f).className,g=Xn(f,["className"]),v=e.dense,b=void 0!==v&&v,x=e.disabled,S=void 0!==x&&x,w=e.disableGutters,E=void 0!==w&&w,k=e.divider,R=void 0!==k&&k,T=e.focusVisibleClassName,q=e.selected,D=void 0!==q&&q,P=Xn(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),I=y.useContext(Ol),M={dense:b||I.dense||!1,alignItems:i},N=y.useRef(null);zl((function(){r&&N.current&&N.current.focus()}),[r]);var O,L,A=y.Children.toArray(l),z=A.length&&(O=A[A.length-1],L=["ListItemSecondaryAction"],y.isValidElement(O)&&-1!==L.indexOf(O.type.muiName)),j=Is(y.useCallback((function(e){N.current=C.findDOMNode(e)}),[]),t),F=jn({className:ks(c.root,u,M.dense&&c.dense,!E&&c.gutters,R&&c.divider,S&&c.disabled,s&&c.button,"center"!==i&&c.alignItemsFlexStart,z&&c.secondaryAction,D&&c.selected),disabled:S},P),_=d||"li";return s&&(F.component=d||"div",F.focusVisibleClassName=ks(c.focusVisible,T),_=ul),z?(_=F.component||d?_:"div","li"===h&&("li"===_?_="div":"li"===F.component&&(F.component="div")),y.createElement(Ol.Provider,{value:M},y.createElement(h,jn({className:ks(c.container,m),ref:j},g),y.createElement(_,F,A),A.pop()))):y.createElement(Ol.Provider,{value:M},y.createElement(_,jn({ref:j},F),A))})),Fl=Ss((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(jl),_l=y.forwardRef((function(e,t){var n=e.classes,i=e.className,o=Xn(e,["classes","className"]),r=y.useContext(Ol);return y.createElement("div",jn({className:ks(n.root,i,"flex-start"===r.alignItems&&n.alignItemsFlexStart),ref:t},o))})),$l=Ss((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(_l),Hl=y.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,r=e.disableTypography,a=void 0!==r&&r,s=e.inset,l=void 0!==s&&s,c=e.primary,u=e.primaryTypographyProps,d=e.secondary,p=e.secondaryTypographyProps,h=Xn(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),f=y.useContext(Ol).dense,m=null!=c?c:n;null==m||m.type===hl||a||(m=y.createElement(hl,jn({variant:f?"body2":"body1",className:i.primary,component:"span",display:"block"},u),m));var g=d;return null==g||g.type===hl||a||(g=y.createElement(hl,jn({variant:"body2",className:i.secondary,color:"textSecondary",display:"block"},p),g)),y.createElement("div",jn({className:ks(i.root,o,f&&i.dense,l&&i.inset,m&&g&&i.multiline),ref:t},h),m,g)})),Vl=Ss({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(Hl);function Wl(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Ul(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Bl(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function Gl(e){return"function"==typeof e?e():e}var Kl=y.forwardRef((function(e,t){var n=e.action,i=e.anchorEl,o=e.anchorOrigin,r=void 0===o?{vertical:"top",horizontal:"left"}:o,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,c=e.children,u=e.classes,d=e.className,p=e.container,h=e.elevation,f=void 0===h?8:h,m=e.getContentAnchorEl,g=e.marginThreshold,v=void 0===g?16:g,b=e.onEnter,x=e.onEntered,S=e.onEntering,w=e.onExit,E=e.onExited,k=e.onExiting,R=e.open,T=e.PaperProps,q=void 0===T?{}:T,D=e.transformOrigin,P=void 0===D?{vertical:"top",horizontal:"left"}:D,I=e.TransitionComponent,M=void 0===I?Nl:I,N=e.transitionDuration,O=void 0===N?"auto":N,L=e.TransitionProps,A=void 0===L?{}:L,z=Xn(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),j=y.useRef(),F=y.useCallback((function(e){if("anchorPosition"===l)return a;var t=Gl(i),n=(t&&1===t.nodeType?t:Rs(j.current).body).getBoundingClientRect(),o=0===e?r.vertical:"center";return{top:n.top+Wl(n,o),left:n.left+Ul(n,r.horizontal)}}),[i,r.horizontal,r.vertical,a,l]),_=y.useCallback((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var i=function(e,t){for(var n=t,i=0;n&&n!==e;)i+=(n=n.parentElement).scrollTop;return i}(e,n);t=n.offsetTop+n.clientHeight/2-i||0}}return t}),[r.vertical,l,m]),$=y.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Wl(e,P.vertical)+t,horizontal:Ul(e,P.horizontal)}}),[P.horizontal,P.vertical]),H=y.useCallback((function(e){var t=_(e),n={width:e.offsetWidth,height:e.offsetHeight},o=$(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Bl(o)};var r=F(t),a=r.top-o.vertical,s=r.left-o.horizontal,c=a+n.height,u=s+n.width,d=Ts(Gl(i)),p=d.innerHeight-v,h=d.innerWidth-v;if(a<v){var f=a-v;a-=f,o.vertical+=f}else if(c>p){var m=c-p;a-=m,o.vertical+=m}if(s<v){var g=s-v;s-=g,o.horizontal+=g}else if(u>h){var y=u-h;s-=y,o.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Bl(o)}}),[i,l,F,_,$,v]),V=y.useCallback((function(){var e=j.current;if(e){var t=H(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[H]),W=y.useCallback((function(e){j.current=C.findDOMNode(e)}),[]);y.useEffect((function(){R&&V()})),y.useImperativeHandle(n,(function(){return R?{updatePosition:function(){V()}}:null}),[R,V]),y.useEffect((function(){if(R){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function i(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,o)}),n)}return i.clear=function(){clearTimeout(t)},i}((function(){V()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[R,V]);var U=O;"auto"!==O||M.muiSupportAuto||(U=void 0);var B=p||(i?Rs(Gl(i)).body:void 0);return y.createElement(ql,jn({container:B,open:R,ref:t,BackdropProps:{invisible:!0},className:ks(u.root,d)},z),y.createElement(M,jn({appear:!0,in:R,onEnter:b,onEntered:x,onExit:w,onExited:E,onExiting:k,timeout:U},A,{onEntering:ws((function(e,t){S&&S(e,t),V()}),A.onEntering)}),y.createElement(ol,jn({elevation:f,ref:W},q,{className:ks(u.paper,q.className)}),c)))})),Jl=Ss({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Kl);function Zl(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Xl({d:e,size:t,style:n={},viewBox:i="0 0 16 16"}){const o={fontSize:Zl(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return v.createElement("i",{style:o},v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:i,fill:"currentColor"},v.createElement("path",{d:e})))}const Yl="alternative-menu-item",Ql=e=>{const{nested:t,className:n,...i}=e,o=(({nested:e,dir:t})=>Ia((n=>({root:{textAlign:"ltr"===t?"start":"end","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"},...e&&"ltr"===t&&{paddingLeft:n.spacing(4)},...e&&"rtl"===t&&{paddingRight:n.spacing(4)}}}))))(e)();return v.createElement(Fl,hn({className:`${o.root} ${n}`},i))},ec=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${Yl}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function tc({title:e,selected:t,onClick:n,nested:i,icon:o,bold:r,dir:a}){const s=xe.detectTextDirection(e);return v.createElement(Ql,{nested:i,role:"menuitem",button:!0,onClick:n,className:Yl,onKeyDown:ec,dir:a,autoFocus:t},v.createElement(Vl,{primary:e,primaryTypographyProps:{dir:s,...r&&{style:{fontWeight:600}}}}),v.createElement($l,{style:{minWidth:16}},v.createElement(Xl,{d:t?Jt:""})),o&&v.createElement($l,{style:{minWidth:16}},v.createElement(Xl,{d:o.d})))}tc.propTypes={title:vn.string.isRequired,selected:vn.bool,onClick:vn.func.isRequired,nested:vn.bool,icon:vn.shape({d:vn.string.isRequired}),bold:vn.bool,dir:vn.string.isRequired},tc.defaultProps={selected:!1,nested:!1,icon:void 0,bold:!1},Ql.propTypes={nested:vn.bool,className:vn.string},Ql.defaultProps={nested:!1,className:Yl};const nc={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"}}};function ic({chartId:e,alignTo:t,currentId:n,dir:i,dock:o,list:r,onClose:a,show:s,instruction:l}){const c=r.map(((t,o)=>{var s;return v.createElement(v.Fragment,{key:t.id},v.createElement(tc,{icon:t.icon,title:t.title,bold:t.groupItem,selected:t.selected,onClick:()=>{t.onSelect&&t.onSelect(n),a(`${e}-${t.id}`)},dir:i}),(null===(s=t.children)||void 0===s?void 0:s.length)>0&&v.createElement(Al,{dense:!0,dir:i,component:"div",disablePadding:!0},t.children.map((e=>v.createElement(tc,{key:e.id,nested:!0,title:e.title,selected:e.selected,onClick:()=>{e.onSelect(),a(t.id)},dir:i})))),o<r.length-1&&v.createElement(Pl,{key:`divider-${t.id}`}))}));return v.createElement(Jl,hn({anchorEl:t,open:s,onClose:a},nc[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),v.createElement(Al,{dense:!0,disablePadding:!0,dir:i,"aria-label":l,component:"nav"},c))}ic.propTypes={chartId:vn.string.isRequired,alignTo:vn.any,currentId:vn.string.isRequired,dir:vn.string.isRequired,dock:vn.string.isRequired,list:vn.array,onClose:vn.func.isRequired,show:vn.bool.isRequired,instruction:vn.string.isRequired},ic.defaultProps={list:[],alignTo:null};const oc="title-button",rc="active-title-button",ac=xs((({children:e,...t})=>v.createElement(ml,hn({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),sc=xs(ml)((()=>({borderRadius:"4px",width:"24px",height:"24px",minWidth:"22px",padding:0})));class lc extends v.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasPopoverOptions:!1,disableCyclicButton:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.alignToRef=v.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n,showGroupDimOptions:i}=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||i)&&e.getPopoverOptions().then((e=>{this.setState({hasPopoverOptions:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:i,showGroupDimOptions:o}=this.props;n&&(i||o)&&n.getPopoverOptions().then((e=>{t.hasPopoverOptions!==(0!==e.length)&&this.setState({hasPopoverOptions: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))}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${oc}`);t&&(t.focus(),t.classList.add(rc))}this.props.popover.getPopoverOptions().then((e=>{this.setState({open:!0,list:e})}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${oc}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${rc}`);e&&(e.classList.remove(rc),setTimeout((()=>{e.focus()}),50))}}render(){const{chartId:e,titleData:t,popover:n,translator:i,disabled:o,isDimension:r,padding:a,minWidth:s,hasAlternative:l,supportConditional:c,showGroupDimOptions:u}=this.props,d={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},p=t.breadcrumbs.length,h=o||Boolean(!t.drillUp)||this.state.inSelection,f=t.breadcrumbs.map(((e,n)=>v.createElement(ac,{style:{display:"flex",alignItems:"center",color:h&&"rgba(89, 89, 89, 0.8)",pointerEvents:h?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>h?void 0:t.drillUp(p-n),title:e},v.createElement("span",{style:d},e),v.createElement(Xl,hn({},Xt,{size:"small",style:{margin:"0 8px"}}))))),m=c||u?this.state.hasPopoverOptions:l,g=n&&!this.state.open?this.openPopover:this.closePopover,y=!n||o||this.state.inSelection,b={display:"flex",alignItems:"center",width:"100%",color:y&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!r&&y&&"none",...a?{padding:a}:{paddingTop:0,paddingBottom:0},...s&&{minWidth:s}};this.state.open&&(b.background="rgba(0,0,0,0.08)");const x=()=>{this.setState({disableCyclicButton:!0})},S=xe.detectTextDirection(t.text),C=v.createElement(ac,{"aria-label":i.get(`Accessibility.${n&&m?"Alternative":"Normal"}.Instructions`,[t.text]),style:b,onClick:y?void 0:g,title:t.text,tabIndex:y?-1:0,onFocus:y?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:y?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${oc} ${t.id}`,"data-id":`${e}-${t.id}`},t.locked&&v.createElement(Xl,hn({},Kt,{size:"small",title:i.get("Tooltip.selections.locked")})),v.createElement("span",{style:d,dir:S},t.text),n&&m&&v.createElement(Xl,hn({},Zt,{size:"small",style:{margin:"0 8px"}})));return v.createElement(v.Fragment,null,t.icon&&t.icon.onClick&&v.createElement(sc,{variant:"outlined",disabled:this.state.disableCyclicButton||this.state.inSelection,onClick:o?void 0:()=>t.icon.onClick({onError:x})},v.createElement(Xl,hn({},t.icon.path,{size:"small",title:i.get(t.icon.tooltip)}))),t.icon&&!t.icon.onClick&&v.createElement(Xl,hn({},t.icon.path,{size:"small",title:i.get(t.icon.tooltip),style:{margin:"0 4px 0 0"}})),f,v.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:m?"auto":"none",height:"100%"}},C),n&&m&&v.createElement(ic,{chartId:e,dock:n.dock,dir:n.dir,currentId:t.id,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.list,onClose:this.closePopover,changeTo:this.changeTo,instruction:i.get("Accessibility.Popover.Instructions")}))}}function cc(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function uc(e){function t(e){return!e.isDimension&&me.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:n}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||t(this.settings.settings)?Math.max(28,n):Math.max(20,n)},render(){const{settings:{app:e,disabled:n,explicitItemInfos:i,hyperCube:o,hyperCubeDef:r,isDimension:a,minWidth:s,model:l,onChangeToAlternative:c,padding:u,rtl:d,selections:p,skipAttributeExpressions:h,translator:f,supportConditional:m=!1},layout:{dock:g}}=this.settings,y="top"!==g&&"bottom"!==g||!d?"ltr":"rtl",b=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}(g,this.rect),x=r&&r.qLayoutExclude&&r.qLayoutExclude.qHyperCubeDef,S=x&&x[a?"qDimensions":"qMeasures"]||[],C=i||o[a?"qDimensionInfo":"qMeasureInfo"],w=a?cn:dn,E=a?un:pn,k=Boolean(l&&l.colorSupport&&l.modifiers),R=k&&((T=this.settings.settings).isDimension&&me.getValue(T,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||t(this.settings.settings));var T;const q=C.map(((t,i)=>{var o;const r="number"==typeof t.explicitColumn?t.explicitColumn:i,y=E(t,r,l,e),b=i===C.length-1,x=Boolean(e)&&a&&"N"!==t.qGrouping,T=k||x?w({column:r,activeInfo:t,altList:S,app:e,dir:d?"rtl":"ltr",dock:cc(g),model:l,onChange:c,skipAttributeExpressions:h,translator:f,allowChangeOfAlternatives:k}):void 0;return v.createElement(v.Fragment,{key:t.cId},v.createElement(lc,{chartId:null!==(o=null==l?void 0:l.id)&&void 0!==o?o:"",showGroupDimOptions:x,popover:T,titleData:y,model:l,translator:f,selections:p,disabled:n(),style:this.style,isDimension:a,padding:u,minWidth:s,hasAlternative:R,supportConditional:m}),!b&&v.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return v.createElement("div",{style:b,dir:y},q)}}}lc.propTypes={chartId:vn.string.isRequired,disabled:vn.bool.isRequired,padding:vn.string,minWidth:vn.string,titleData:vn.shape({breadcrumbs:vn.arrayOf(vn.string).isRequired,icon:vn.shape({path:vn.shape({d:vn.string.isRequired}),tooltip:vn.string.isRequired,onClick:vn.func}),index:vn.number.isRequired,locked:vn.bool.isRequired,text:vn.string.isRequired,popoverText:vn.string.isRequired,drillUp:vn.func,id:vn.string.isRequired}).isRequired,popover:vn.shape({dir:vn.string.isRequired,dock:vn.string.isRequired,getPopoverOptions:vn.func.isRequired}),translator:vn.shape({get:vn.func.isRequired}).isRequired,selections:vn.shape({isActive:vn.func,addListener:vn.func,removeListener:vn.func}),style:vn.shape({fontSize:vn.string,color:vn.string,fontFamily:vn.string}).isRequired,isDimension:vn.bool.isRequired,hasAlternative:vn.bool.isRequired,supportConditional:vn.bool.isRequired,showGroupDimOptions:vn.bool.isRequired},lc.defaultProps={popover:null,selections:null,padding:"",minWidth:""};const dc=Ci({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 pc=ki({productionPrefix:"q8463",disableGlobal:!0,seed:""});function hc(){function e({x:e,y:t,width:n,height:i,scaleRatio:o,margin:r}={}){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(i)?a.height:i,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==r&&(a.margin.left=Number.isNaN(r.left)?0:r.left,a.margin.top=Number.isNaN(r.top)?0:r.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let i,o=e();const r={element:()=>i,root:()=>i,appendTo:e=>(i||(i=n("div"),i.style.position="absolute",i.style["-webkit-font-smoothing"]="antialiased",i.style["-moz-osx-font-smoothing"]="antialiased",i.style.pointerEvents="none"),e.appendChild(i),i),render(e){if(!i)return!1;const t=o.scaleRatio.x,n=o.scaleRatio.y;return i.style.left=`${Math.round(o.margin.left+o.x*t)}px`,i.style.top=`${Math.round(o.margin.top+o.y*n)}px`,i.style.width=`${Math.round(o.width)}px`,i.style.height=`${Math.round(o.height)}px`,i.style.transform=`scale(${t}, ${n})`,i.style.transformOrigin="top left",w.render(function(e,t){return v.createElement(Ta,{generateClassName:t},v.createElement(ys,{theme:dc},e))}(e,pc),i),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(i&&w.unmountComponentAtNode(i),r),destroy(){i&&i.parentElement&&(w.unmountComponentAtNode(i),i.parentElement.removeChild(i)),i=null},size:t=>(t&&(o=e(t)),o)};return r}}function fc(e){return bt(e).l<70}function mc(e,t){const n=bt(e).l/100,i=bt(t).l/100;return n>i?(n+.05)/(i+.05):(i+.05)/(n+.05)}function gc(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var vc={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const i=e.findShapes(t.selector).filter((e=>e.key===t.component));if(i.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const o=[];let r=i[i.length-1];for(let e=0;e<i.length;e+=1){const t=i[e],n=r.attrs.fill,a=t.attrs.fill;if(mc(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:i,outerRadius:s}=t.desc.slice;if(i=Math.max(i,r.desc.slice.innerRadius),s=Math.min(s,r.desc.slice.outerRadius),s>i){const t=gc({r:s,a:e},n),r=gc({r:i,a:e},n);o.push({type:"line",x1:t.x,y1:t.y,x2:r.x,y2:r.y,strokeWidth:1,opacity:.4,stroke:fc(a)?"#ccc":"#333"})}}r=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function yc(e,t=!0){let n="";for(let t=0;t<e.length;t++){const i=e[t];n+=0===t?`M${i.x} ${i.y}`:`L${i.x} ${i.y}`,n+=" "}return t&&(n+="Z"),n}function bc(e){const{size:t,angle:n}=e,i={x:e.x,y:e.y},o=t/2,r=e.x-o,a=e.y-o;let s=[{x:r,y:a+t},{x:r+o,y:a},{x:r+t,y:a+t},{x:r,y:a+t}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const i=Math.cos(t),o=Math.sin(t),r=(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:i*r.x-o*r.y,y:o*r.x+i*r.y},n)}(e,n,i))),{type:"path",fill:e.fill,d:yc(s)}}var xc={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 i=[];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=(o={r:t.offset,a:l},{x:(r=s).x+o.r*Math.sin(o.a),y:r.y-o.r*Math.cos(o.a)}),u=bc({size:t.size,fill:t.fill,angle:l+Math.PI,...c});u.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},i.push(u)}}var o,r;return i}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Sc(){const e=n();return e.use(i),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",X(e))};e.interaction("hammer",X(Hammer))}(t)),e.use((function(e){e.renderer("react",hc()),e.component("data-title",uc(e.renderer("svg")()))})),e.renderer("react-qcm",E),e.component("axis-title",k),e.component("disclaimer",R),e.component("pie-dividers",vc),e.component("negative-indicators",xc),e}var Cc={};function wc(){wc.init.call(this)}Cc.isObject=function(e){return"object"==typeof e&&null!==e},Cc.isNumber=function(e){return"number"==typeof e},Cc.isUndefined=function(e){return void 0===e},Cc.isFunction=function(e){return"function"==typeof e};var Ec=wc;wc.EventEmitter=wc,wc.prototype._events=void 0,wc.prototype._maxListeners=void 0,wc.defaultMaxListeners=10,wc.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},wc.prototype.setMaxListeners=function(e){if(!Cc.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},wc.prototype.emit=function(e){var t,n,i,o,r,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],Cc.isUndefined(n))return!1;if(Cc.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(i=arguments.length,o=new Array(i-1),r=1;r<i;r++)o[r-1]=arguments[r];n.apply(this,o)}else if(Cc.isObject(n)){for(i=arguments.length,o=new Array(i-1),r=1;r<i;r++)o[r-1]=arguments[r];for(i=(a=n.slice()).length,r=0;r<i;r++)a[r].apply(this,o)}return!0},wc.prototype.addListener=function(e,t){var n;if(!Cc.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Cc.isFunction(t.listener)?t.listener:t),this._events[e]?Cc.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Cc.isObject(this._events[e])&&!this._events[e].warned)&&((n=Cc.isUndefined(this._maxListeners)?wc.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,Cc.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),Cc.isFunction(console.trace)&&console.trace()));return this},wc.prototype.on=wc.prototype.addListener,wc.prototype.once=function(e,t){if(!Cc.isFunction(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},wc.prototype.removeListener=function(e,t){var n,i,o,r;if(!Cc.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,i=-1,n===t||Cc.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Cc.isObject(n)){for(r=o;r-- >0;)if(n[r]===t||n[r].listener&&n[r].listener===t){i=r;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},wc.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],Cc.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},wc.prototype.listeners=function(e){return this._events&&this._events[e]?Cc.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},wc.listenerCount=function(e,t){return e._events&&e._events[t]?Cc.isFunction(e._events[t])?1:e._events[t].length:0};var kc=Y(Ec);function Rc(){const e={};var t;return t=e,Object.keys(kc.prototype).forEach((e=>{t[e]=kc.prototype[e]})),kc.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}const Tc={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 qc(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Dc={getImageSize(e,t){let n;function i(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,i()}const r={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=r[t]*(n>l?1:n/l),u=r[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},i()):(e={height:c,width:u},i()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Pc(e,t,n){let i=e.ref.qStaticContentUrl.qUrl;const o=function(e){var t,n,i;let o,r,a,s,l,c;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(n=n.session)&&void 0!==n&&n.sessionConfig||null!==(i=e.session)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.url)){var u;if(o=e.session.options||(null===(u=e.enigmaModel)||void 0===u?void 0:u.session.sessionConfig),!o){var d;o=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(o.url);o.host=t.hostname,o.port=t.port,o.isSecure="wss:"===t.protocol}return c=void 0!==o.secure?o.secure:o.isSecure,r=c?"https://":"http://",a=o.host||"localhost",s=o.port?`:${o.port}`:"",l=o.prefix?o.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),r+a+s+l}return""}(n);o&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(i,o),i=i.replace(/"/g,'\\"'),i=i.replace(/'/g,"\\'"),i=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(i,o));const{height:r,width:a,imageError:s}=await Dc.getImageSize(i,t);return{src:i,size:t,height:r,width:a,imageError:s}}async function Ic(e,t,n,i){var o,r,a;const{app:s,flags:l}=t,c=null===(o=e.layout)||void 0===o||null===(o=o.tooltip)||void 0===o?void 0:o.imageComponents;if(!c)return[];const[u]=c,d=u.size||"small",p=u.type||"media";let h=-1;for(let e=0;e<n.length;e++)if(n[e].cId===u.cId){h=e;break}const f=(null===(r=i.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];let m;if(-1!==h&&f[h]&&(m=f[h]),"media"===p&&null!==(a=u.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return Pc(u,d,s);if("url"===p)return async function(e,t,n,i,o){let r,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&qc(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:o,imageError:s}=await Dc.getImageSize(t,i);r={src:t,size:i,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Dc.getImageSize(a,i);r={src:a,size:i,height:e,width:t,imageError:n}}return r}(s,l,u,d,m);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===p&&m&&m.label){return async function(e,t,n,i){let o;const r=i.label,a=`qmem://${t.qFallbackTitle}/${r}`;if(qc(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:i,width:r,imageError:a}=await Dc.getImageSize(e,n);o={src:e,size:n,height:i,width:r,imageError:a}}}catch(e){}return o}(s,n[h],d,m)}return[]}const Mc={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){const o=t,r=[];for(let t=0;t<o.length;t++)r.push(Ic(e,i,n,o[t]));const a=await Promise.all(r);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t;const n=null===(t=e.layout)||void 0===t||null===(t=t.tooltip)||void 0===t?void 0:t.imageComponents;return!!n&&n.length>0}},Nc={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){let o=t;return o=await Mc.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}),o},checkIfPromisesExist:({customTooltipModel:e})=>Mc.checkIfPromisesExist({customTooltipModel:e})};const Oc=(e,t)=>{var n,i,o;const r=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:Tc.CHART.CHART_PARENT_TYPE,qId:Tc.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:r,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Lc=e=>{var t;const n=null===(t=e.tooltip)||void 0===t||null===(t=t.chart)||void 0===t||null===(t=t.object)||void 0===t?void 0:t.refId;return{qInfo:{qType:Tc.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const Ac={createContainer:({ctx:e,layout:t})=>{var n;if(!((null===(n=t.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,i;const o=null!==(n=null===(i=t.tooltip)||void 0===i||null===(i=i.chart)||void 0===i||null===(i=i.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",r=Tc.CHART.STYLE[o];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Tc.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:i,customTooltipModel:o,rtl:r})=>{var a;const s=o,l=null==t||null===(a=t.tooltip)||void 0===a||null===(a=a.chart)||void 0===a||null===(a=a.object)||void 0===a?void 0:a.refId;if(null!=s&&s.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&l&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Ac.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const i=n,o=Tc.CHART.STATE,r=t.qStateName;i.miniChartToken.alternateState||(i.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,r),i.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var i;const o=n;null!==(i=o.miniChartToken.sessionObj)&&void 0!==i&&i.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const r=Tc.CHART.STATE,a=Oc(t,r),s=await e.createSessionObject(a),l=Lc(t);if(s.id!==Tc.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var c,u,d,p;const e=n.length>0&&void 0!==(null===(c=n[0].data)||void 0===c?void 0:c.value)?[null===(u=n[0].data)||void 0===u?void 0:u.value]:[],a=void 0!==i?i:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===i&&n.length>0){var h,f;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(f=e.source)&&void 0!==f&&f.field){var m;const t=null==e||null===(m=e.source)||void 0===m?void 0:m.field.split("/"),n=t[t.length-1],i=void 0!==e.value?[e.value]:[];i.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),i,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(Tc.CHART.CONTAINER_ID),g={direction:r?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await o.embed.render({element:l,model:s.miniChartToken.model,options:g,id:null===(d=s.miniChartToken.model)||void 0===d?void 0:d.id,type:null===(p=s.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await Ac.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(Ac.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Tc.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,i=Tc.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(i)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(t=t.vis)||void 0===t?void 0:t.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function zc(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function jc(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:i}=Tc.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[i]=!0,o}function Fc(e){const t=jc();return e.filter((e=>t[e.id]))}const _c={getNodes(e,t){const n=function(e,t){let n=0,i=0;e.center?(n+=e.center.x,i+=e.center.y):(n+=e.clientX,i+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:i-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,i=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var r,a,s,l;const c=null!==(r=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==r?r:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],i.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const i=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return i&&i.value===c.value&&i.label===c.label}));t.length>0&&(i=i.concat(t[0]))}})),i},displayTooltip(e,t,{nodes:n,opts:i={},customTooltipModel:o,extractedNodes:r=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=_c.getAttrExprData(a);r.length||n.length?Nc.handlePromises({customTooltipModel:o,nodes:_c.getDataNodes(s,r.length>0?r:n),attrExps:l,opts:i}).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!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&Ac.hide({app:i.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Nc.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const i=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return i[o]||(i[o]=[]),i[o]},getAttrExprData(e){var t;let n=[],i="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var r;const t=o.length-1;n=(null===(r=e.qHyperCube)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r||null===(r=r[t])||void 0===r?void 0:r.qAttrExprInfo)||[],i=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:i}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[Tc.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let i=n.qLayoutExclude;i||(n.qLayoutExclude={quarantine:{}},i=n.qLayoutExclude),i.quarantine||(i.quarantine={}),i.quarantine[Tc.CUSTOM.QUARANTINE]=[],e.forEach((e=>{i.quarantine[Tc.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=i}(Fc(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(t=t.quarantine)||void 0===t?void 0:t[Tc.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[Tc.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=zc(e);if(!n)return;const i=void 0!==t?t:n.length-1;if(!n[i])return;const o=this.getAttrExps(e,n[i]);if(0===Fc(o).length){var r;const t=(null===(r=e.qLayoutExclude)||void 0===r||null===(r=r.quarantine)||void 0===r?void 0:r.customTooltip)||[],n=[...o,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[i].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[i].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let i=[];const o=zc(e)||[];[...o,t].forEach((e=>{const t=Fc(e.qAttributeExpressions||[]);t.length>0&&(i=t)}));const r=jc(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!r[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(i));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:xe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=xe.detectTextDirection(e.src),i=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){i.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;i.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,i),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function $c(e,t,n,i){var o;const r=(null===(o=t.qHyperCube)||void 0===o||null===(o=o[n])||void 0===o||null===(o=o[i])||void 0===o?void 0:o.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[i]?e.qSubNodes[i].qAttrExps:e.qAttrExps;return s?(r.forEach(((e,t)=>{const o=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,r=void 0===o?"NaN":function(e,t){let n;switch(e.id){case Tc.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Tc.CUSTOM.TITLE:case Tc.CUSTOM.DESCRIPTION:case Tc.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);a.push({source:{key:"qHyperCube",field:`${n}/${i}/qAttrExprInfo/${t}`},label:r,value:"value"})})),a):a}const Hc={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,i="qDimensionInfo";return{field:`${i}/${n}`,value:t=>$c(t,e,i,n)}}};const Vc={getCustomAttrExps(e,t,n){var i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},r=(null===(i=t.data)||void 0===i||null===(i=i.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(r))return o;return function(e,t,n,i){const o={[Tc.CUSTOM.TITLE]:!0,[Tc.CUSTOM.DESCRIPTION]:!0},{attrExps:r,fieldPath:a}=_c.getAttrExprData(e);return 0===t.length||0===r.length||""===a||r.forEach(((e,r)=>{const s=t[r];if(e.id===Tc.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${r}`).formatter()(s.value);i.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&i.customTooltipInfoAttrExpsArr.push({...e.id===Tc.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),i}(n,r.map((t=>Se.getMeasure(e,t))),e,o)}};function Wc({nodes:e,layout:t,dataset:n}){const i=function(e,t,n){const i=[];return e.forEach((e=>{i.push(Vc.getCustomAttrExps(n,e,t))})),i}(e,t,n);return i.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Uc(e){const t=Tc.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:i,qLabelExpression:o,cId:r}}function Bc(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Gc={attrExpr:{migrateProperties(e){var t,n;const i=le(!0,{},e),o=(null===(t=i.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[];let r=Bc(i);return r=function(e,t){return t.concat(e.map((e=>Uc(e))))}(o,r),function(e,t){var n;const i=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;i[i.length-1].qAttributeExpressions=e}(r,i),null===(n=i.tooltip)||void 0===n||delete n.data,i},getPatches(e){var t,n;const i=(null===(t=e.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[],o=(null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions.length)-1,r=function(e,t,n){let i=e.length;const o=[];return t.forEach((e=>{const t=Uc(e),r=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${i}`,qOp:"add",qValue:r}),i++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Bc(e),i,o);return r},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var i,o,r;const a=(null===(i=t.qHyperCube)||void 0===i?void 0:i.qDimensionInfo)||[],s=(null===(o=t.tooltip)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.qHyperCube)||{},l=null===(r=t.qMeta)||void 0===r||null===(r=r.privileges)||void 0===r?void 0:r.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(s,a)&&e.getEffectiveProperties().then((t=>{if(l){const i=this.migrateProperties(t);e.setProperties(i).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const i=this.getPatches(t);e.applyPatches(i,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:Kc}=Tc;function Jc({flags:e,layout:t,app:n,model:i,picasso:r,chart:a,translator:s,localeInfo:l,embed:c,options:u}){const d={properties:void 0},p=function({layout:e,app:t,picasso:n,model:i,chart:o,translator:r,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:i,chart:o,translator:r,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:_c,miniChartToken:{},embed:s}}({layout:t,app:n,model:i,picasso:r,chart:a,translator:s,localeInfo:l,embed:c}),h="rtl"===u.direction,f=()=>{var e;const n=!(null===(e=d.properties)||void 0===e||null===(e=e.qHyperCubeDef)||void 0===e||!e.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv})));return!(!t.tooltip||t.tooltip.auto||n)};return{setProperties:e=>{d.properties=e},isEnabled:()=>f(),hideBasic:()=>f()&&o(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var i,o;const r=Wc({dataset:e,nodes:n,layout:t});return{title:null===(i=r.customTooltipInfoAttrExpsArr.find((e=>e.id===Kc.TITLE)))||void 0===i?void 0:i.title,description:null===(o=r.customTooltipInfoAttrExpsArr.find((e=>e.id===Kc.DESCRIPTION)))||void 0===o?void 0:o.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>_c.checkIfPromisesExist({customTooltipModel:p}),createImageRow:({value:e,h:t})=>_c.getImageRow(e,{h:t,rtl:h}),addImages:({nodes:i})=>{const o=_c.getDataNodes(a,i),{attrExps:r}=_c.getAttrExprData(t);return Nc.handlePromises({customTooltipModel:p,nodes:o,attrExps:r,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(f()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e.chart)&&void 0!==e&&null!==(e=e.object)&&void 0!==e&&e.refId&&c&&"function"==typeof(null==i?void 0:i.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>Ac.createContainer({layout:t,ctx:{h:e,rtl:h}}),createLimitationRow:()=>_c.getFooterRow(s.get("properties.tooltip.notselectedmessage"),h),show:({nodes:e,properties:t})=>Ac.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:()=>Ac.hide({app:n,customTooltipModel:p}),destroy:()=>Ac.destroyVisualization({customTooltipModel:p})}}}function Zc(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Xc({layout:e}){const t=({ds:e,encodings:t})=>{const n={field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}};return t.slice.outerRadius&&(n.props.radius={field:t.slice.outerRadius}),e.extract(n)},n=({rows:e,encodings:t})=>t.slice.outerRadius?e.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):e.filter((e=>"NaN"!==e.num.value)),i=({rows:t,encodings:n})=>n.slice.outerRadius&&!e.donut.showAsDonut?t.filter((e=>e.num.value>0&&e.radius.value>0)):t.filter((e=>e.num.value>0));return c({layout:e,config:{args:{},disclaimers:{NoDataExist:{condition:({ds:e,encodings:n})=>0===t({ds:e,encodings:n}).length},LimitedData:{condition:()=>{const t=me.getValue(e,"qHyperCube.qSize.qcy");return me.getValue(e,"qHyperCube.qDataPages.0.qArea.qHeight")<t}},OnlyNanData:{condition:({ds:e,encodings:i})=>{const o=t({ds:e,encodings:i});return 0===n({rows:o,encodings:i}).length}},OnlyNegativeOrZeroValues:{condition:({ds:e,encodings:o})=>{const r=t({ds:e,encodings:o}),a=n({rows:r,encodings:o});return 0===i({rows:a,encodings:o}).length}},NegativeOrZeroValues:{condition:({ds:e,encodings:o})=>{const r=t({ds:e,encodings:o}),a=n({rows:r,encodings:o}),s=a,l=i({rows:a,encodings:o});return s.length!==l.length}}}}})}function Yc({chart:e,translator:t,layout:n,constraints:i,options:o,themeService:r,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,c="rtl"===o.direction,{fontFamily:d}=r.getStyles();return u({chart:e,translator:t,config:{rtl:c,enable:()=>!i.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:d},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:i,formatter:o,create:r,util:a})=>{const[c]=n,{title:u,description:d,measures:p}=s.isEnabled()?s.getAttributes({dataset:i,nodes:n}):{},h=[];u&&h.push(r.text({value:u,style:{bold:!0}})),d&&h.push(r.text({value:d}));const f=s.hideBasic();if(f&&!p.length&&(u||d)||h.push(r.text({value:c.data.label,style:{bold:!0}})),!f){h.push(r.color({nodes:n,property:"fill"}));const{num:e}=c.data;if(h.push(r.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=c.data;h.push(r.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}h.push(r.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:o("share")(c.desc.share)}))}p&&h.push(...p.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),h.push(r.raw({value:s.chart.createLimitationRow()}))):h.push(r.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:m}=c.data;return s.isEnabled()&&m&&h.push(...m.map((t=>r.raw({value:s.createImageRow({value:t,h:e})})))),h},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"}}}})}const Qc=e=>"[object Object]"===Object.prototype.toString.call(e),eu=e=>Array.isArray(e);function tu(e,t){if(e===t)return!0;if(eu(e)){if(!eu(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!tu(e[n],t[n]))return!1;return!0}if(Qc(e)){if(!Qc(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i<n.length;i++){if(!Object.hasOwn(t,n[i]))return!1;if(!tu(e[n[i]],t[n[i]]))return!1}return!0}return e===t}function nu({enable:e=!0}={}){const t=L(),n=()=>Date.now().toString()+Math.random(),[i,o]=P(n()),r={properties:void 0};return O((()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const i=()=>{t.getEffectiveProperties().then((e=>{const t=le(!0,{},e);if(!r.properties)return void(r.properties=t);const i=function(e,t){var n,i,o,r;const a={properties:!1,exclude:!1};if(e===t)return a;const s=le(!0,{},e),l=le(!0,{},t);return a.exclude=!tu(null===(n=s.qHyperCubeDef)||void 0===n?void 0:n.qLayoutExclude,null===(i=l.qHyperCubeDef)||void 0===i?void 0:i.qLayoutExclude),null===(o=s.qHyperCubeDef)||void 0===o||delete o.qLayoutExclude,null===(r=l.qHyperCubeDef)||void 0===r||delete r.qLayoutExclude,a.properties=!tu(s,l),a}(r.properties,t);r.properties=t,i.exclude&&!i.properties&&o(n())}))};return t.on("changed",i),i(),()=>{t.removeListener("changed",i)}}),[e]),i}function iu({scaleKey:e,legend:t,onEdited:n}){const{layout:i}=t,{dock:o}=i||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:`${e}Range`,direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const ou=.8,ru=.55,au={CORNER_RADIUS:0,INNER_RADIUS:ru,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},su=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var i,o;let r=ou,a=0;const s=null!==(i=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==i?i:ru;e.donut.showAsDonut&&(r=ou-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*r+a}}:ou,lu=({layout:e},t,n)=>{var i,o;if(!e.donut.showAsDonut)return 0;const r=null!==(i=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==i?i:ru;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=ou-r,n=r;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:r},cu=({layout:e},t)=>{var n,i,o,r,a;const s=t.colorService.getDatumProps(),l=s[Object.keys(s)[0]],c=l&&l.field?l.field:void 0,u="qDimensionInfo/0"===c,d=c?t.ds.field(c).raw():null,p=d&&(d.label||d.title||d.qFallbackTitle)||"",h=t.encodings.slice.outerRadius,{formatter:f}=t.chart,m=me.getValue(e,"qHyperCube.qDimensionInfo",[]).length;function g(e,n){const i=t.ds.field(e).raw();return{field:e,label:!i.isCustomFormatted&&(i.qIsAutoFormat||"U"===i.qNumFormat.qType)?e=>f(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:{...s,num:g(t.encodings.slice.arc,"arc"),fillTooltip:c?{field:c,label:p,value:e=>u?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==m?Hc.getNode(e,{dimensionCount:m}):void 0,radius:h?g(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:lu({layout:e},t,v),fill:t.colorService.getColor(),strokeWidth:null!=v&&null!==(n=v.style)&&void 0!==n&&n.strokeWidth?au.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:au.STROKE.WIDTH.NONE,stroke:null!==(i=null==v||null===(o=v.style)||void 0===o||null===(o=o.strokeColor)||void 0===o?void 0:o.color)&&void 0!==i?i:au.STROKE.COLOR,outerRadius:su({layout:e},t,v),cornerRadius:null!==(r=null==v||null===(a=v.style)||void 0===a?void 0:a.cornerRadius)&&void 0!==r?r:0}},animations:{enabled:t.animations.enabled,isMainComponent:!0}}};function uu({layout:e},t){var n,i;const o=(e.components||[]).filter((e=>"slices"===e.key))[0],r=null!==(n=null==o||null===(i=o.style)||void 0===i?void 0:i.innerRadius)&&void 0!==n?n:ru,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=ou-r,n=r;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled}}}function du(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 pu({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 hu(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function fu(e){return e.node.data.num.label}function mu(e){return e.node.data.radius.label}function gu(e,t,n){if(e.dataPoint.auto)return n?fu:hu;if("share"===e.dataPoint.labelMode)return hu;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?mu:fu}return null}function vu({data:e}){return e?e.label:""}function yu(e){const t=parseInt(e,10);if(!isNaN(t))return t}function bu(e){var t,n;const i=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return(null!==(t=null==i||null===(n=i.style)||void 0===n?void 0:n.innerRadius)&&void 0!==t?t:ru)>.3}function xu({node:e,data:t}){return le({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function Su(e,t,n){const i=t.styleService.label.name.getStyle(),o=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",padding:t.encodings.slice.outerRadius?4:2,fill:i.fill}],fontSize:yu(i.fontSize),fontFamily:i.fontFamily,label:vu,linkData:({node:e,data:t})=>le({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(gu(e,t,!1)){const i=function(e,t,n){return{label:gu(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&bu(e)?"inside":"into",onBackground:e.donut.showAsDonut&&bu(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),r=Ee(le(t,i),n.theme);r.linkData=xu,o.push(r)}return{key:"pie-labels",type:"labels",renderer:Wt(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:o}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}function Cu({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const i=gu(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme),r=t.themeService.getStyles(),a=t.styleService.label.name.getStyle(),s=t.styleService.label.value.getStyle(),l=a.fill===r.label.name.color,c=s.fill===r.label.value.color;return{key:"pie-labels",type:"labels",renderer:Wt(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fontSize:yu(a.fontSize),fontFamily:a.fontFamily,fill:l&&!e.donut.showAsDonut?o:a.fill,label:vu,linkData:({data:e})=>e},{fontSize:yu(s.fontSize),fontFamily:s.fontFamily,fill:c&&!e.donut.showAsDonut?o:s.fill,label:i,linkData:({data:e})=>e}]}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}(e,n,t):Su(e,n,t))}const wu=(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 i=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type)),o=(i||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 o||this.chart.component("legendRangeBrush").emit("rangeClear"),o}},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 Eu(e,t){const n=t.element.getBoundingClientRect();let i,o;return e.center?(({x:i}=e.center),({y:o}=e.center)):(i=e.clientX,o=e.clientY),{x:i-n.left,y:o-n.top}}function ku(e,t){const n=t.component("slices");if(!n)return!1;const{x:i,y:o}=Eu(e,t),r=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*ou;return(r-i)**2+(a-o)**2<=s**2}const Ru=(e,t,{requireFailure:n,recognizeWith:i}={})=>({type:"Tap",requireFailure:n,recognizeWith:i,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:i}=n.srcEvent;if(i&&("INPUT"===i.nodeName||i.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))return void this.chart.component(i.getAttribute("data-component-key")).emit(i.getAttribute("data-action"));if(i&&i.children&&i.children[0]&&"legend-cat"===i.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let o=Eu(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(o={cx:o.x,cy:o.y,r:5});const r=this.chart.shapesAt(o,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});r.length&&(this.chart.brushFromShapes(r,{components:[{key:r[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),Tu=(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 i=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(i)&&i.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()}}}),qu=(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 i=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return i.some((e=>"slices"===e.key))&&!e.isLocked(i)}},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 Du(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&ku(t,this.chart)){const i=Math.sign(-t.deltaY);e.viewState.set("rotation",i*(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 Pu=(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()&&ku(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}}}),Iu=(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}}}),Mu=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[Pu(e,{}),Ru(e,t,{}),...n]:[wu(e,{}),qu(e,{}),Pu(e,{}),Tu(e,{}),Iu(e,{}),Ru(e,t,{}),...n]});function Nu(e,t,n){const i=e.getIsSingleSelect(0),{constraints:o}=n;if(o.active&&o.passive)return[];const r=t.tooltipService.getInteractions();return[Mu(t,i,r.gestures),Du(t),r.native]}function Ou({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 Lu({layout:e},t,n){var i;if(null!=t&&null!==(i=t.flags)&&void 0!==i&&i.isEnabled("IM_5788_DATA_TITLE_REFACTOR"))return!1;if(!e.dimensionTitle)return!1;const o=t.properties,r=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:o&&o.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections,isEnabled:t.flags.isEnabled},style:{fontFamily:r.fontFamily,fontSize:r.fontSize,color:r.color}}}function Au({layout:e},t,n){var i;if(null==t||null===(i=t.flags)||void 0===i||!i.isEnabled("IM_5788_DATA_TITLE_REFACTOR"))return!1;if(!e.dimensionTitle)return!1;const o=t.alternativeService.getAlternatives(),r=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"axis-title",renderer:"react-qcm",layout:{dock:"top",minimumLayoutMode:"SMALL"},data:{infos:e.qHyperCube.qDimensionInfo,alternatives:o.dimensions},resources:{app:t.app,cache:t.viewCache,model:t.model,selections:t.selections,translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>n.constraints.active,isRTL:n.rtl,isSnapshot:!!e.snapshotData,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:r.color,fontFamily:r.fontFamily,fontSize:r.fontSize}}}}function zu({layout:e,context:t,selectionService:n},i={}){const o=function({layout:e}={},t={}){const n={};return le(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&le(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},i),r={scales:o};let a=[];const s=function(e,t){const n=e.disclaimerService.getDisclaimer();if(!n)return!1;const{rtl:i}=t,{translator:o}=e,{fontFamily:r}=e.themeService.getStyles();return{key:"disclaimer",type:"disclaimer",layout:{dock:n.alignment},settings:{isRTL:i,label:o.get(`Object.Disclaimer.${n.key}`)},style:{fontFamily:r}}}(i,t);if(i.disclaimerService.getHasSuppressingDisclaimer())return{components:[s]};const l=t.constraints.select||t.constraints.active,c=i.colorService.getLegend({eventName:"legend",key:"legend",viewState:i.viewState,chart:i.chart,styleReference:"object.pieChart",styleOverrides:{title:i.styleService.legend.title.getStyle(),label:i.styleService.legend.label.getStyle()},rtl:t.rtl},{navigationDisabled:l});return o.fillRange&&c.components[0]&&("right"===c.components[0].layout.dock||"left"===c.components[0].layout.dock||t.rtl)&&(o.fillRange.invert=!0),a=[cu({layout:e},i),uu({layout:e},i),du(i),pu({layout:e},i),Lu({layout:e},i,t),Au({layout:e},i,t),...c.components,iu({scaleKey:"fill",legend:c.components[0]||{},onEdited:i.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}}},Cu({layout:{components:e.components,dataPoint:le({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},i),...i.tooltipService.getComponents(),s],a=a.filter((e=>!1!==e)),{interactions:Nu(n,i,t),scales:o,components:i.pluginService.extendComponents(a),palettes:i.colorService.getPalettes(),formatters:Ou({settings:r},i),strategy:pe(0,i)}}function ju({instance:e,services:t,picasso:n,flags:o}){const r=T(),a=L(),s=A(),l=M(),c=_(),u=z(),d=D(),p=F(),{qLocaleInfo:h}=$(),f=nu({enable:u&&!u.snapshotData}),[g]=V((()=>{if(!t)return Promise.resolve();Gc.attrExpr.updateProperties(a,u);const e=({getUseBaseColors:e})=>({theme:c,legendProps:u.legend,layout:u,localeInfo:h,hc:u.qHyperCube,colorProps:{...u.color,useBaseColors:e(u)}});return Promise.resolve(a&&!u.snapshotData?a.getEffectiveProperties():{}).then((async n=>Promise.all([t.colorService.initialize({createConfig:e}),Promise.resolve(n),t.pluginService.initialize(),t.alternativeService.initialize({properties:n})])))}),[t,f]);O((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(u)}),[u]),O((()=>{if(!e||!g)return;const{chart:f,viewState:v,interactions:y,viewCache:b}=e,{alternativeService:x,colorService:S,disclaimerService:C,pluginService:w,themeService:E,tooltipService:k,styleService:R}=t,T=r.viewState||{};u.snapshotData||(v.preventSet("legendScrollOffset",T.legendScrollOffset||0),v.preventSet("rotation",T.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,v),k.expando.set("properties",g[1]);const q=n.data("q")({key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:h}}),D=[{type:"q",key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:h}},...S.getData()],P={slice:{arc:"qMeasureInfo/0"}};u.qHyperCube.qMeasureInfo.length>1&&(P.slice.outerRadius="qMeasureInfo/1"),C.initialize({args:{ds:q,encodings:P}});const I=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}(n.data("q")({data:u.qHyperCube,config:{localeInfo:h}}),P),M=d?()=>{const e=f.brush("selection");i.selections(e,{},u).forEach((e=>{d.select(e)}))}:()=>{},N=u.snapshotData&&!r.freeResize?{width:(u.snapshotData.content.size||u.snapshotData.object.size).w,height:(u.snapshotData.content.size||u.snapshotData.object.size).h}:void 0,O=t=>e.selectionService.getIsSelectionLocked(t),L=()=>zu({layout:u,context:{rtl:"rtl"===r.direction,theme:c,constraints:p,model:a},selectionService:e.selectionService},{picasso:n,ds:q,model:a,app:s,chart:f,onSelect:M,isLocked:O,interactions:y,constraints:p,translator:l,viewState:v,dataRowCount:I,encodings:P,alternativeService:x,colorService:S,disclaimerService:C,pluginService:w,themeService:E,styleService:R,tooltipService:k,debouncer:m,properties:g[1],selections:d,logicalSize:N,flags:o,viewCache:b,animations:{enabled:()=>function({viewState:e,options:t,viewCache:n,layout:i,chart:o}){return!1!==t.chartAnimations&&n.get("chartWidth")===o.element.clientWidth&&n.get("chartHeight")===o.element.clientHeight&&n.get("hasZeroLine")===!!o.component("zeroLine")&&0===e.get("rotation")&&!Vt.propertiesHaveChanged({viewCache:n,layout:i})}({viewState:v,options:r,layout:u,viewCache:b,chart:f})}});e.generateSettings=L;const A=L();f.update({data:D,settings:A}),b.set("chartWidth",f.element.clientWidth),b.set("chartHeight",f.element.clientHeight),b.set("hasZeroLine",A.components.filter((e=>"zeroLine"===e.key)).length>0),Vt.cacheProperties({viewCache:b,layout:u}),r.effect&&u.effectProperties?r.effect.update(u,f,{encodings:P}):u.effectPath||f.brush("highlight").end()}),[e,g,r.direction,r.effectProperties,p,c.name(),l.language()])}function Fu({instance:e,services:t}){const n=q(),i=z();U((o=>{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}}(o,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:i}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:ge(t,"legend-cat"),rotation:n.get("rotation")},i.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),B((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:ge(e.chart,"legend-cat")})})),[e])}const _u={setValue(e,t,n){if(!t)return;const i=t.split(".");let o=e;const r=i[i.length-1];let a;for(a=0;a<i.length-1;++a)null==o[i[a]]&&(o[i[a]]=Number.isNaN(+i[a+1])?{}:[]),o=o[i[a]];void 0!==n?o[r]=n:delete o[r]},getValue(e,t,n){const i=t.split(".");let o,r=e;if(void 0===r)return n;for(o=0;o<i.length;++o){if(null==r[i[o]])return n;r=r[i[o]]}return r}},$u={getDimensions:e=>_u.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>_u.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>_u.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>_u.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=_u.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=_u.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 Hu={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>$u.getNumMeasures(e)>=1},showLegend:e=>{const t=_u.getValue(e,"color.auto"),n=_u.getValue(e,"color.expressionIsColor"),i=_u.getValue(e,"color.mode");return!(!t&&"primary"===i||!t&&"byExpression"===i&&(n||void 0===n))},persistentColorsShow:e=>!_u.getValue(e,"color.auto")&&"byDimension"===_u.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===_u.getValue(e,"color.useDimColVal")&&_u.setValue(e,"color.useDimColVal",!1),!_u.getValue(e,"color.auto")&&"byDimension"===_u.getValue(e,"color.mode")&&"libraryItem"===_u.getValue(e,"color.byDimDef.type"))},Vu=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:i,showLegend:o}=Hu;this.color={colorMode:{options(n){const i=[];return"explore"===e&&i.push({value:"auto",translation:"Common.Auto"}),i.push({value:"primary",translation:"properties.colorMode.primary"}),i.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),i.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&i.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),i}},persistentColors:{show:e=>i(e)?n(e)&&!_u.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:i}},this.legend={show:o,showTitle:{show(e){const t=_u.getValue(e,"color.auto");return _u.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===_u.getValue(e,"color.mode")&&!0===_u.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>_u.getValue(e,"legend.show")&&o(e)}}};function Wu(e){return new Vu(e)}const Uu={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}}}}}}},Bu=(e,t,n)=>{const i=`${e}.fontFamily`,o=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:o,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.pieChart",e,"color")})}}}}},Gu=(e,t,n,i)=>{const o=g({theme:i,translator:n,flags:t,config:{id:"pieChart",paths:["axis.title","label.name","label.value","legend.title","legend.label"]}});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:Bu("axis.title",o,i)}}}: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:Bu("label.name",o,i)}}}: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:Bu("label.value",o,i)}}}:void 0,legendTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Bu("legend.title",o,i)}}}:void 0,legendLabelSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Bu("legend.label",o,i)}}}:void 0}}},Ku=Wu("hard");const Ju=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(r(e,"color.mode","byDimension"),r(e,"color.byDimDef.activeDimensionIndex",0),r(e,"color.persistent",!1))},Zu=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},Xu=e=>{var t;const{flags:n,translator:i}=e||{},o=null==e||null===(t=e.sense)||void 0===t?void 0:t.theme,a=null==n?void 0:n.isEnabled("SENSECLIENT_IM_2429_PIECHART_BG"),s={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?i.get("Simple.Color.Auto",i.get("properties.colorMode.byDimension")):i.get("Common.Custom")},change:Ju},colorMode:{options:Zu}}}}},l={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||r(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,i)=>!i.dimensionTitle,set(e,t,n,i,o){o.dimensionTitle=!e}}}}}}},c={uses:"settings",items:{simpleStyling:Uu,simpleLabels:l,general:{items:{showDisclaimer:{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:Gu(a,n,i,o),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:Ku.color.colorMode.options},persistentColors:{show:Ku.color.persistentColors.show}}},simpleColors:s,legend:{show:Ku.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Ku.legend.showTitle.show},dock:{show:Ku.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}};return c},Yu={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)}}}}}}},Qu={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:i}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=i.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},ed={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function td(e){return{type:"items",component:"accordion",items:{data:Yu,sorting:Qu,addons:ed,settings:Xu(e)}}}const nd=Wu("explore"),id=td();var od={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:id.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:id.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:nd.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&nd.color.useDimColVal.show(e))}}}}}}};const rd="slices";function ad(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function sd(e){return e.data.num.label}function ld(e){return e.data.radius.label}function cd(e,t,n,i){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?sd:ad;if("share"===e.dataPoint.labelMode)return ad;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?ld:sd;return sd}(n,i)(e,t)}function ud(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 dd{constructor({element:e,properties:t,effectHelper:n,Flag:i}){this.element=e,this.Flag=i,n.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.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"),i=this.effectLayer[0].getBoundingClientRect(),o=n.map((n=>{const{start:o,end:r,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,c=n.element.getBoundingClientRect(),u=(o+r)/2,d=c.left-i.left+l.x*(s.x+a*Math.sin(u)),p=c.top-i.top+l.y*(s.y-a*Math.cos(u)),h=Math.cos(u)>0?"top":"bottom",f=Math.sin(u)>0?"right":"left";return{title:ud(n),label:cd(n,this.chart.formatter,e,t),orientation:`${h}${f}`,position:{x:d,y:p}}}));this.Flag.show(this.effectLayer,o)}init(e,t,n,i){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=le(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=i,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=le(e.options,{effect:null}),n?t.getProperties().then((e=>le(e,{effectPath:null,effectProperties:null,dataPoint:le(!0,{},e.originalModelSettings.dataPoint),legend:le(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class pd extends dd{init(e,t,n,i){return e.options=le(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===i.max?Promise.resolve():super.init(e,t,n,i)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(rd).data.items,n=e.effectProperties.min,i=e.effectProperties.max,o=[];let r=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;n&&o<r[0]&&(r=[o,t]),i&&o>a[0]&&(a=[o,t])})),-1!==r[1]&&o.push(t[r[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class hd extends dd{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],i=this.chart.component(rd).data.items.map((e=>e.value)),o=i.indexOf(n.data.value);-1!==o&&(this.selectedIndex=o,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(rd).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===rd)).map(((n,i)=>{const o=cd(n,this.chart.formatter,e,t);return{text:`${ud(n)} (${o})`,value:i}}))}init(e,t,n,i){return e.options=le(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===i.selectedIndex?Promise.resolve():super.init(e,t,n,i)}}const fd="/effects/highlight-value",md="/effects/maxmin";var gd={isCompatible:({effectPath:e})=>e===md||e===fd,create:e=>e.effectPath===md?new pd(e):e.effectPath===fd?new hd(e):null};function vd(e){const t={},{components:n,tooltip:i}=e,o=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t[`chart_style_${e}`]=o.style[e]})),i){var r;t.chart_tooltip_custom=!i.auto;const e=null===(r=i.chart)||void 0===r||null===(r=r.object)||void 0===r?void 0:r.refId;!i.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function yd(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 bd(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function xd({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){bd(e),yd(t),_c.addCallbackCustomTooltip(t)},move(e,t){bd(e),yd(t),_c.moveCallbackCustomTooltip(t,e)},remove(e,t){_c.removeCallbackCustomTooltip(t,e)},replace(e,t,n,i){bd(e),yd(i),_c.replaceCallbackCustomTooltip(i,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){yd(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 Sd=e=>e.qMax<=0,Cd=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(Sd));function wd(e){return{definition:td(e),softDefinition:od,support:{snapshot:Cd,export:Cd,exportData:!0,sharing:Cd,viewData:!0,effects:!0},effects:gd,extendMetrics:vd,importProperties:(t,n,i,o)=>{const r={layout:{templateId:n.templateId}};i.mapProperties(r);const a={defaultDimension:i.getDefaultDimensionProperties(),defaultMeasure:i.getDefaultMeasureProperties()},s=G.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:xd(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>G.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function Ed(e){return{properties:{version:"1.28.9",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:au.STROKE.COLOR},cornerRadius:au.CORNER_RADIUS,innerRadius:au.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:[xd(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:i})=>{const o=G.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:xd(e),hypercubePath:i});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>G.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}e("default",(e=>{const{flags:t}=e;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(K).forEach((t=>{e.add(K[t])}))}}(e.translator);const n=Sc();return{qae:Ed(e),ext:wd(e),component(){const e=function({picasso:e}){var t;const n=T(),i=q(),o=D(),[r,c]=P(),u=Rc(),d=I(),p=M(),h=!(null===(t=d.qSelectionInfo)||void 0===t||!t.qInSelections),[f,m]=P(!1);return u.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:i,translator:o}){var r;return{active:n,label:o.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(r=e.qHyperCube)||void 0===r||null===(r=r.qDimensionInfo)||void 0===r||null===(r=r[0])||void 0===r||!r.qIsOneAndOnlyOne),action(e){i("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:d,isInSelections:h,isLassoActionActive:f,setIsLassoActionActive:m,translator:p}),N((()=>(r&&(r.interactions.lasso.active=()=>f),{...u.lasso})),[r,f,h,p.language()]),O((()=>{i.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),r=t.chart({element:i,data:[],settings:{}}),p=a({chart:r,actions:u,selections:o,config:{selectionActions:!1}});p.setLayout(d),p.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const h=s({legendScrollOffset:0,rotation:0});h.intercept("rotation",(e=>(h.get("rotation")+e)%(2*Math.PI))),h.onChanged("rotation",(()=>{r.update({partialData:!0})}));const f=l();return u.on("selections-start",(()=>{r.brush("selection").start()})),c({picasso:t,chart:r,selectionService:p,viewState:h,viewCache:f,interactions:u}),()=>{p.destroy(),r.destroy(),u.removeAllListeners(),delete u.select,h.intercept("rotation",void 0),h.onChanged("rotation",void 0)}}),[]),r}({picasso:n}),i=function({flags:e,picasso:t,instance:n}){const i=L(),o=A(),r=M(),a=q(),[s,l]=P(),c=z(),u=j(),m=F(),g=T(),v=_(),{qLocaleInfo:y}=$(),b=H();return O((()=>{if(!n)return;a.style.overflow="hidden";const s=d({app:o,translator:r}),x=p({picasso:n.picasso,model:i,app:o,translator:r,config:{auto:!1,key:"fill"}}),S=h({picassoInstance:n.picasso,plugins:u,pluginArgs:Zc(c)}),C=Jc({flags:e,layout:c,app:o,model:i,picasso:t,chart:n.chart,translator:r,localeInfo:y,embed:b,options:g}),w=f({theme:v,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),E=Yc({chart:n.chart,translator:r,layout:c,constraints:m,options:g,themeService:w,colorService:x,custom:C}),k=function({layout:e,themeService:t,colorService:n,flags:i}){const o=t.getStyles(),r=t=>{var n;return i.isEnabled("CLIENT_IM_3050")?null===(n=e.components)||void 0===n?void 0:n.find((e=>e.key===t)):void 0},a=(e,t)=>{const i=n.getPaletteColor;if(null!=e&&e.color&&i){const n=i(e);var o;return"none"===n&&e.index>0?null!==(o=null==e?void 0:e.color)&&void 0!==o?o:t:null!=n?n:t}return t};return{axis:{title:{getStyle:()=>{var e,t,n;const i=null===(e=r("axis"))||void 0===e||null===(e=e.axis)||void 0===e?void 0:e.title;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:o.axis.title.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:o.axis.title.fontSize,color:a(null==i?void 0:i.color,o.axis.title.color)}}}},label:{name:{getStyle:()=>{var e,t,n;const i=null===(e=r("label"))||void 0===e||null===(e=e.label)||void 0===e?void 0:e.name;return{fill:a(null==i?void 0:i.color,o.label.name.color),fontSize:null!==(t=null==i?void 0:i.fontSize)&&void 0!==t?t:o.label.name.fontSize,fontFamily:null!==(n=null==i?void 0:i.fontFamily)&&void 0!==n?n:o.label.name.fontFamily}}},value:{getStyle:()=>{var e,t,n;const i=null===(e=r("label"))||void 0===e||null===(e=e.label)||void 0===e?void 0:e.value;return{fill:a(null==i?void 0:i.color,o.label.value.color),fontSize:null!==(t=null==i?void 0:i.fontSize)&&void 0!==t?t:o.label.value.fontSize,fontFamily:null!==(n=null==i?void 0:i.fontFamily)&&void 0!==n?n:o.label.value.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n;const i=null===(e=r("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.title;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:o.legend.title.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:o.legend.title.fontSize,color:a(null==i?void 0:i.color,o.legend.title.color)}}},label:{getStyle:()=>{var e,t,n;const i=null===(e=r("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.label;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:o.legend.label.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:o.legend.label.fontSize,color:a(null==i?void 0:i.color,o.legend.label.color)}}}}}}({layout:c,themeService:w,colorService:x,flags:e}),R=Xc({layout:c});l({alternativeService:s,colorService:x,disclaimerService:R,pluginService:S,themeService:w,tooltipService:E,styleService:k})}),[i,o,n,c,r.language(),m,g.direction,v.name()]),s}({flags:t,picasso:n,instance:e});ju({instance:e,services:i,picasso:n,flags:t}),function({instance:e}){const t=z(),n=T(),i=W();O((()=>{if(!e||!e.generateSettings)return;const{viewCache:i,chart:o,generateSettings:r}=e;o.update({settings:r()}),i.set("chartWidth",o.element.clientWidth),i.set("chartHeight",o.element.clientHeight),n.effect&&n.effect.update(t,o)}),[i.width,i.height])}({instance:e}),Fu({instance:e,services:i})}}}))}}}));