@nebula.js/sn-pie-chart 1.28.1 → 1.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specifications/plugins.json +1 -1
- package/api-specifications/properties.json +1 -1
- package/core/esm/index.js +3 -3
- package/dist/sn-pie-chart.js +4 -4
- package/dist/sn-pie-chart.systemjs.js +4 -4
- package/package.json +1 -1
- package/sn-pie-chart-ext/dist/sn-pie-chart.js +4 -4
- package/sn-pie-chart-ext/sn-pie-chart.qext +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-pie-chart v1.28.
|
|
2
|
+
* @nebula.js/sn-pie-chart v1.28.2
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
12
12
|
* Licensed under the MIT license */!function(e){!function(t,n,r,i){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),l=Math.round,c=Math.abs,u=Date.now;function d(e,t,n){return setTimeout(v(e,n),t)}function f(e,t,n){return!!Array.isArray(e)&&(h(e,n[t],n),!0)}function h(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function p(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===i||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var m=p((function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&e[r[o]]===i)&&(e[r[o]]=t[r[o]]),o++;return e}),"extend","Use `assign`."),g=p((function(e,t){return m(e,t,!0)}),"merge","Use `assign`.");function y(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&o(r,n)}function v(e,t){return function(){return e.apply(t,arguments)}}function b(e,t){return"function"==typeof e?e.apply(t&&t[0]||i,t):e}function x(e,t){return e===i?t:e}function w(e,t,n){h(E(t),(function(t){e.addEventListener(t,n,!1)}))}function k(e,t,n){h(E(t),(function(t){e.removeEventListener(t,n,!1)}))}function S(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function C(e,t){return e.indexOf(t)>-1}function E(e){return e.trim().split(/\s+/g)}function M(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function _(e){return Array.prototype.slice.call(e,0)}function D(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=e[o][t];M(i,a)<0&&r.push(e[o]),i[o]=a,o++}return r=r.sort((function(e,n){return e[t]>n[t]})),r}function q(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((r=(n=a[s])?n+o:t)in e)return r;s++}return i}var R=1;function T(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var O="ontouchstart"in t,P=q(t,"PointerEvent")!==i,N=O&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),A="touch",I="mouse",L=24,z=["x","y"],F=["clientX","clientY"];function j(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}function $(e,t,n){var r=n.pointers.length,o=n.changedPointers.length,a=1&t&&r-o==0,s=12&t&&r-o==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,o=r.length;n.firstInput||(n.firstInput=H(t));o>1&&!n.firstMultiple?n.firstMultiple=H(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,l=s?s.center:a.center,d=t.center=V(r);t.timeStamp=u(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Y(l,d),t.distance=U(l,d),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=W(t.deltaX,t.deltaY);var f=B(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=f.x,t.overallVelocityY=f.y,t.overallVelocity=c(f.x)>c(f.y)?f.x:f.y,t.scale=s?function(e,t){return U(t[0],t[1],F)/U(e[0],e[1],F)}(s.pointers,r):1,t.rotation=s?function(e,t){return Y(t[1],t[0],F)+Y(e[1],e[0],F)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(l>25||s.velocity===i)){var u=t.deltaX-s.deltaX,d=t.deltaY-s.deltaY,f=B(l,u,d);r=f.x,o=f.y,n=c(f.x)>c(f.y)?f.x:f.y,a=W(u,d),e.lastInterval=t}else n=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=a}(n,t);var h=e.element;S(t.srcEvent.target,h)&&(h=t.srcEvent.target);t.target=h}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function H(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:l(e.pointers[n].clientX),clientY:l(e.pointers[n].clientY)},n++;return{timeStamp:u(),pointers:t,center:V(t),deltaX:e.deltaX,deltaY:e.deltaY}}function V(e){var t=e.length;if(1===t)return{x:l(e[0].clientX),y:l(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:l(n/t),y:l(r/t)}}function B(e,t,n){return{x:t/e||0,y:n/e||0}}function W(e,t){return e===t?1:c(e)>=c(t)?e<0?2:4:t<0?8:16}function U(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Y(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}j.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(T(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(T(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4},G="mousedown",X="mousemove mouseup";function J(){this.evEl=G,this.evWin=X,this.pressed=!1,j.apply(this,arguments)}y(J,j,{handler:function(e){var t=K[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:I,srcEvent:e}))}});var Z={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:A,3:"pen",4:I,5:"kinect"},ee="pointerdown",te="pointermove pointerup pointercancel";function ne(){this.evEl=ee,this.evWin=te,j.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ee="MSPointerDown",te="MSPointerMove MSPointerUp MSPointerCancel"),y(ne,j,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Z[r],o=Q[e.pointerType]||e.pointerType,a=o==A,s=M(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var re={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ie(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,j.apply(this,arguments)}function oe(e,t){var n=_(e.touches),r=_(e.changedTouches);return 12&t&&(n=D(n.concat(r),"identifier")),[n,r]}y(ie,j,{handler:function(e){var t=re[e.type];if(1===t&&(this.started=!0),this.started){var n=oe.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:A,srcEvent:e})}}});var ae={touchstart:1,touchmove:2,touchend:4,touchcancel:8},se="touchstart touchmove touchend touchcancel";function le(){this.evTarget=se,this.targetIds={},j.apply(this,arguments)}function ce(e,t){var n=_(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=_(e.changedTouches),s=[],l=this.target;if(o=n.filter((function(e){return S(e.target,l)})),1===t)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&t&&delete r[a[i].identifier],i++;return s.length?[D(o.concat(s),"identifier"),s]:void 0}y(le,j,{handler:function(e){var t=ae[e.type],n=ce.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:A,srcEvent:e})}});function ue(){j.apply(this,arguments);var e=v(this.handler,this);this.touch=new le(this.manager,e),this.mouse=new J(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function de(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,fe.call(this,t)):12&e&&fe.call(this,t)}function fe(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),2500)}}function he(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}y(ue,j,{handler:function(e,t,n){var r=n.pointerType==A,i=n.pointerType==I;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)de.call(this,t,n);else if(i&&he.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var pe=q(s.style,"touchAction"),me=pe!==i,ge="compute",ye="auto",ve="manipulation",be="none",xe="pan-x",we="pan-y",ke=function(){if(!me)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){e[r]=!n||t.CSS.supports("touch-action",r)})),e}();function Se(e,t){this.manager=e,this.set(t)}Se.prototype={set:function(e){e==ge&&(e=this.compute()),me&&this.manager.element.style&&ke[e]&&(this.manager.element.style[pe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return h(this.manager.recognizers,(function(t){b(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(C(e,be))return be;var t=C(e,xe),n=C(e,we);if(t&&n)return be;if(t||n)return t?xe:we;if(C(e,ve))return ve;return ye}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=C(r,be)&&!ke[be],o=C(r,we)&&!ke[we],a=C(r,xe)&&!ke[xe];if(i){var s=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(s&&l&&c)return}if(!a||!o)return i||o&&6&n||a&&n&L?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Ce=32;function Ee(e){this.options=o({},this.defaults,e||{}),this.id=R++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Me(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function _e(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function De(e,t){var n=t.manager;return n?n.get(e):e}function qe(){Ee.apply(this,arguments)}function Re(){qe.apply(this,arguments),this.pX=null,this.pY=null}function Te(){qe.apply(this,arguments)}function Oe(){Ee.apply(this,arguments),this._timer=null,this._input=null}function Pe(){qe.apply(this,arguments)}function Ne(){qe.apply(this,arguments)}function Ae(){Ee.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ie(e,t){return(t=t||{}).recognizers=x(t.recognizers,Ie.defaults.preset),new Le(e,t)}Ee.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(f(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=De(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return f(e,"dropRecognizeWith",this)||(e=De(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(f(e,"requireFailure",this))return this;var t=this.requireFail;return-1===M(t,e=De(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(f(e,"dropRequireFailure",this))return this;e=De(e,this);var t=M(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+Me(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Me(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Ce},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=o({},e);if(!b(this.options.enable,[this,t]))return this.reset(),void(this.state=Ce);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},y(qe,Ee,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:Ce}}),y(Re,qe,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(we),e&L&&t.push(xe),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(6&t.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return qe.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=_e(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),y(Te,qe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[be]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),y(Oe,Ee,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ye]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return Ce},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),y(Pe,qe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[be]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),y(Ne,qe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Re.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&L&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=_e(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),y(Ae,Ee,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ve]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||U(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=d((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Ce},failTimeout:function(){return this._timer=d((function(){this.state=Ce}),this.options.interval,this),Ce},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Ie.VERSION="2.0.7",Ie.defaults={domEvents:!1,touchAction:ge,enable:!0,inputTarget:null,inputClass:null,preset:[[Pe,{enable:!1}],[Te,{enable:!1},["rotate"]],[Ne,{direction:6}],[Re,{direction:6},["swipe"]],[Ae],[Ae,{event:"doubletap",taps:2},["tap"]],[Oe]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Le(e,t){var n;this.options=o({},Ie.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(P?ne:N?le:O?ue:J))(n,$),this.touchAction=new Se(this,this.options.touchAction),ze(this,!0),h(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function ze(e,t){var n,r=e.element;r.style&&(h(e.options.cssProps,(function(i,o){n=q(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Le.prototype={set:function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Ee)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(f(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(f(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=M(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return h(E(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==i){var n=this.handlers;return h(E(e),(function(e){t?n[e]&&n[e].splice(M(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var r=n.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=t,t.target.dispatchEvent(r)}(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](t),i++}},destroy:function(){this.element&&ze(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(Ie,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Ce,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:L,DIRECTION_ALL:30,Manager:Le,Input:j,TouchAction:Se,TouchInput:le,MouseInput:J,PointerEventInput:ne,TouchMouseInput:ue,SingleTouchInput:ie,Recognizer:Ee,AttrRecognizer:qe,Tap:Ae,Pan:Re,Swipe:Ne,Pinch:Te,Rotate:Pe,Press:Oe,on:w,off:k,each:h,merge:g,extend:m,assign:o,inherit:y,bindFn:v,prefixed:q}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Ie,e.exports?e.exports=Ie:t.Hammer=Ie}(window,document)}(o);var a=r(o.exports),s=Object.prototype.hasOwnProperty,l=Object.prototype.toString,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===l.call(e)},f=function(e){if(!e||"[object Object]"!==l.call(e))return!1;var t,n=s.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&s.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||s.call(e,t)},h=function(e,t){c&&"__proto__"===t.name?c(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},p=function(e,t){if("__proto__"===t){if(!s.call(e,t))return;if(u)return u(e,t).value}return e[t]},m=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=p(s,n),s!==(i=p(t,n))&&(u&&i&&(f(i)||(o=d(i)))?(o?(o=!1,a=r&&d(r)?r:[]):a=r&&f(r)?r:{},h(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&h(s,{name:n,newValue:i}));return s},g="2.8.1";function y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){return!!e.changedTouches}function w(e){return"number"==typeof e&&!isNaN(e)}function k(e){return"number"!=typeof e||isNaN(e)}function S(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function C(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function E(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function M(e){const[t,n,r,i]=S(e);return{x:t,y:n,width:r-t,height:i-n}}function _(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function D(e){const{x:t,y:n,width:r,height:i,x1:o,x2:a,y1:s,y2:l,cx:c,cy:u,r:d,vertices:f}=e||{};return w(c)&&w(u)&&w(d)?"circle":w(o)&&w(a)&&w(s)&&w(l)?"line":w(t)&&w(n)&&w(r)&&w(i)?"rect":w(t)&&w(n)?"point":Array.isArray(f)?f.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function q(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var R=Math.PI,T=2*R,O=1e-6,P=T-O;function N(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function A(){return new N}function I(e){return function(){return e}}N.prototype=A.prototype={constructor:N,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>O)if(Math.abs(u*s-l*c)>O&&i){var f=n-o,h=r-a,p=s*s+l*l,m=f*f+h*h,g=Math.sqrt(p),y=Math.sqrt(d),v=i*Math.tan((R-Math.acos((p+d-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>O&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*h)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>O||Math.abs(this._y1-c)>O)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%T+T),d>P?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>O&&(this._+="A"+n+","+n+",0,"+ +(d>=R)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var L=Math.abs,z=Math.atan2,F=Math.cos,j=Math.max,$=Math.min,H=Math.sin,V=Math.sqrt,B=1e-12,W=Math.PI,U=W/2,Y=2*W;function K(e){return e>=1?U:e<=-1?-U:Math.asin(e)}function G(e){return e.innerRadius}function X(e){return e.outerRadius}function J(e){return e.startAngle}function Z(e){return e.endAngle}function Q(e){return e&&e.padAngle}function ee(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/V(s*s+l*l),u=c*l,d=-c*s,f=e+u,h=t+d,p=n+u,m=r+d,g=(f+p)/2,y=(h+m)/2,v=p-f,b=m-h,x=v*v+b*b,w=i-o,k=f*m-p*h,S=(b<0?-1:1)*V(j(0,w*w*x-k*k)),C=(k*b-v*S)/x,E=(-k*v-b*S)/x,M=(k*b+v*S)/x,_=(-k*v+b*S)/x,D=C-g,q=E-y,R=M-g,T=_-y;return D*D+q*q>R*R+T*T&&(C=M,E=_),{cx:C,cy:E,x01:-u,y01:-d,x11:C*(i/w-1),y11:E*(i/w-1)}}function te(){var e=G,t=X,n=I(0),r=null,i=J,o=Z,a=Q,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),f=i.apply(this,arguments)-U,h=o.apply(this,arguments)-U,p=L(h-f),m=h>f;if(s||(s=l=A()),d<u&&(c=d,d=u,u=c),d>B)if(p>Y-B)s.moveTo(d*F(f),d*H(f)),s.arc(0,0,d,f,h,!m),u>B&&(s.moveTo(u*F(h),u*H(h)),s.arc(0,0,u,h,f,m));else{var g,y,v=f,b=h,x=f,w=h,k=p,S=p,C=a.apply(this,arguments)/2,E=C>B&&(r?+r.apply(this,arguments):V(u*u+d*d)),M=$(L(d-u)/2,+n.apply(this,arguments)),_=M,D=M;if(E>B){var q=K(E/u*H(C)),R=K(E/d*H(C));(k-=2*q)>B?(x+=q*=m?1:-1,w-=q):(k=0,x=w=(f+h)/2),(S-=2*R)>B?(v+=R*=m?1:-1,b-=R):(S=0,v=b=(f+h)/2)}var T=d*F(v),O=d*H(v),P=u*F(w),N=u*H(w);if(M>B){var I,j=d*F(b),G=d*H(b),X=u*F(x),J=u*H(x);if(p<W&&(I=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,f=d*l-u*c;if(!(f*f<B))return[e+(f=(u*(t-o)-d*(e-i))/f)*l,t+f*c]}(T,O,X,J,j,G,P,N))){var Z=T-I[0],Q=O-I[1],te=j-I[0],ne=G-I[1],re=1/H(function(e){return e>1?0:e<-1?W:Math.acos(e)}((Z*te+Q*ne)/(V(Z*Z+Q*Q)*V(te*te+ne*ne)))/2),ie=V(I[0]*I[0]+I[1]*I[1]);_=$(M,(u-ie)/(re-1)),D=$(M,(d-ie)/(re+1))}}S>B?D>B?(g=ee(X,J,T,O,d,D,m),y=ee(j,G,P,N,d,D,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),D<M?s.arc(g.cx,g.cy,D,z(g.y01,g.x01),z(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,D,z(g.y01,g.x01),z(g.y11,g.x11),!m),s.arc(0,0,d,z(g.cy+g.y11,g.cx+g.x11),z(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,D,z(y.y11,y.x11),z(y.y01,y.x01),!m))):(s.moveTo(T,O),s.arc(0,0,d,v,b,!m)):s.moveTo(T,O),u>B&&k>B?_>B?(g=ee(P,N,j,G,u,-_,m),y=ee(T,O,X,J,u,-_,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),_<M?s.arc(g.cx,g.cy,_,z(g.y01,g.x01),z(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,_,z(g.y01,g.x01),z(g.y11,g.x11),!m),s.arc(0,0,u,z(g.cy+g.y11,g.cx+g.x11),z(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,_,z(y.y11,y.x11),z(y.y01,y.x01),!m))):s.arc(0,0,u,w,x,m):s.lineTo(P,N)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-W/2;return[F(r)*n,H(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:I(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:I(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:I(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:I(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:I(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:I(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:I(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function ne(e){this._context=e}function re(e){return new ne(e)}function ie(e){return e[0]}function oe(e){return e[1]}function ae(){var e=ie,t=null,n=I(0),r=oe,i=I(!0),o=null,a=re,s=null;function l(l){var c,u,d,f,h,p=l.length,m=!1,g=new Array(p),y=new Array(p);for(null==o&&(s=a(h=A())),c=0;c<=p;++c){if(!(c<p&&i(f=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(f,c,l),y[c]=+n(f,c,l),s.point(t?+t(f,c,l):g[c],r?+r(f,c,l):y[c]))}if(h)return s=null,h+""||null}function c(){return function(){var e=ie,t=oe,n=I(!0),r=null,i=re,o=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(o=i(c=A())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,s,a),+t(l,s,a));if(c)return o=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:I(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:I(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:I(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}().defined(i).curve(a).context(o)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:I(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:I(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:I(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:I(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:I(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:I(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:I(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}function se(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function le(e){return e}ne.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var ce=Array.prototype.slice;function ue(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function de(e){this._context=e}function fe(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function he(e,t){this._context=e,this._k=(1-t)/6}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ue(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ue(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:fe(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:fe(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var pe=function e(t){function n(e){return new he(e,t)}return n.tension=function(t){return e(+t)},n}(0);function me(e,t){this._context=e,this._alpha=t}me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>B){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>B){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=function e(t){function n(e){return t?new me(e,t):new he(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function ye(e){return e<0?-1:1}function ve(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(ye(o)+ye(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function be(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function xe(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function we(e){this._context=e}function ke(e){this._context=new Se(e)}function Se(e){this._context=e}function Ce(e){this._context=e}function Ee(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Me(e,t){this._context=e,this._t=t}function _e(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function De(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function qe(e,t){return e[t]}function Re(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function Te(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function Oe(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map((e=>i[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function Pe(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ne(e){return(e=Pe(Math.abs(e)))?e[1]:NaN}we.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xe(this,this._t0,be(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,xe(this,be(this,n=ve(this,e,t)),n);break;default:xe(this,this._t0,n=ve(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(ke.prototype=Object.create(we.prototype)).point=function(e,t){we.prototype.point.call(this,t,e)},Se.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},Ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Ee(e),i=Ee(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Ae,Ie=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Le(e){if(!(t=Ie.exec(e)))throw new Error("invalid format: "+e);var t;return new ze({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function ze(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Fe(e,t){var n=Pe(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Le.prototype=ze.prototype,ze.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var je={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fe(100*e,t),r:Fe,s:function(e,t){var n=Pe(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Ae=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Pe(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function $e(e){return e}var He,Ve,Be,We=Array.prototype.map,Ue=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ye(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?$e:(t=We.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?$e:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(We.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=Le(e)).fill,n=e.align,d=e.sign,f=e.symbol,h=e.zero,p=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):je[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?o:/[%p]/.test(v)?l:"",w=je[v],k=/[defgprs%]/.test(v);function S(e){var i,o,l,f=b,S=x;if("c"===v)S=w(e)+S,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),f=(C?"("===d?d:c:"-"===d||"("===d?"":d)+f,S=("s"===v?Ue[8+Ae/3]:"")+S+(C&&"("===d?")":""),k)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){S=(46===l?a+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}m&&!h&&(e=r(e,1/0));var E=f.length+e.length+S.length,M=E<p?new Array(p-E+1).join(t):"";switch(m&&h&&(e=r(M+e,M.length?p-S.length:1/0),M=""),n){case"<":e=f+e+S+M;break;case"=":e=f+M+e+S;break;case"^":e=M.slice(0,E=M.length>>1)+f+e+S+M.slice(E);break;default:e=M+f+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var n=d(((e=Le(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ne(t)/3))),i=Math.pow(10,-r),o=Ue[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){He=Ye(e),Ve=He.format,Be=He.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const Ke=new Date,Ge=new Date;function Xe(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Xe((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(Ke.setTime(+t),Ge.setTime(+r),e(Ke),e(Ge),Math.floor(n(Ke,Ge))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const Je=6e4,Ze=864e5,Qe=6048e5,et=Xe((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Je)/Ze),(e=>e.getDate()-1));et.range;const tt=Xe((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Ze),(e=>e.getUTCDate()-1));tt.range;const nt=Xe((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Ze),(e=>Math.floor(e/Ze)));function rt(e){return Xe((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Je)/Qe))}nt.range;const it=rt(0),ot=rt(1),at=rt(2),st=rt(3),lt=rt(4),ct=rt(5),ut=rt(6);function dt(e){return Xe((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/Qe))}it.range,ot.range,at.range,st.range,lt.range,ct.range,ut.range;const ft=dt(0),ht=dt(1),pt=dt(2),mt=dt(3),gt=dt(4),yt=dt(5),vt=dt(6);ft.range,ht.range,pt.range,mt.range,gt.range,yt.range,vt.range;const bt=Xe((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));bt.every=e=>isFinite(e=Math.floor(e))&&e>0?Xe((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,bt.range;const xt=Xe((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function wt(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function kt(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function St(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=wt,n=(t,n)=>wt(e(t),n),r=(t,n)=>e(t)-n):(t=e===wt||e===kt?e:Ct,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function Ct(){return 0}xt.every=e=>isFinite(e=Math.floor(e))&&e>0?Xe((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,xt.range;const Et=St(wt).right;St((function(e){return null===e?NaN:+e})).center;var Mt=Et;class _t extends Map{constructor(e,t=qt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(Dt(this,e))}has(e){return super.has(Dt(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function Dt({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function qt(e){return null!==e&&"object"==typeof e?e.valueOf():e}const Rt=Math.sqrt(50),Tt=Math.sqrt(10),Ot=Math.sqrt(2);function Pt(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Rt?10:o>=Tt?5:o>=Ot?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Pt(e,t,2*n):[s,l,c]}function Nt(e,t,n){return Pt(e=+e,t=+t,n=+n)[2]}function At(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function It(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Lt(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function zt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Wt(i),u=Ut(i),d=Wt(o),f=Ut(o),h=Wt(a),p=Ut(a),m=Wt(s),g=Ut(s),y=Wt(l),v=Ut(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:pn,e:pn,f:bn,g:Rn,G:On,H:mn,I:gn,j:yn,L:vn,m:xn,M:wn,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:tr,s:nr,S:kn,u:Sn,U:Cn,V:Mn,w:_n,W:Dn,x:null,X:null,y:qn,Y:Tn,Z:Pn,"%":er},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Nn,e:Nn,f:Fn,g:Xn,G:Zn,H:An,I:In,j:Ln,L:zn,m:jn,M:$n,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:tr,s:nr,S:Hn,u:Vn,U:Bn,V:Un,w:Yn,W:Kn,x:null,X:null,y:Gn,Y:Jn,Z:Qn,"%":er},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:rn,e:rn,f:un,g:Qt,G:Zt,H:an,I:an,j:on,L:cn,m:nn,M:sn,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:tn,Q:fn,s:hn,S:ln,u:Kt,U:Gt,V:Xt,w:Yt,W:Jt,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:Qt,Y:Zt,Z:en,"%":dn};function k(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Ft[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function S(e,t){return function(n){var r,i,o=Lt(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=It(Lt(o.y,0,1))).getUTCDay(),r=i>4||0===i?ht.ceil(r):ht(r),r=tt.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=At(Lt(o.y,0,1))).getDay(),r=i>4||0===i?ot.ceil(r):ot(r),r=et.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?It(Lt(o.y,0,1)).getUTCDay():At(Lt(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,It(o)):At(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in Ft?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(t,b),x.x=k(n,x),x.X=k(r,x),x.c=k(t,x),{format:function(e){var t=k(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}var Ft={"-":"",_:" ",0:"0"},jt=/^\s*\d+/,$t=/^%/,Ht=/[\\^$*+?|[\]().{}]/g;function Vt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Bt(e){return e.replace(Ht,"\\$&")}function Wt(e){return new RegExp("^(?:"+e.map(Bt).join("|")+")","i")}function Ut(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function Yt(e,t,n){var r=jt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Kt(e,t,n){var r=jt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Gt(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Xt(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Jt(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Zt(e,t,n){var r=jt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Qt(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function en(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function tn(e,t,n){var r=jt.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function nn(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rn(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function on(e,t,n){var r=jt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function an(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function sn(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ln(e,t,n){var r=jt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cn(e,t,n){var r=jt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function un(e,t,n){var r=jt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function dn(e,t,n){var r=$t.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function fn(e,t,n){var r=jt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function hn(e,t,n){var r=jt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function pn(e,t){return Vt(e.getDate(),t,2)}function mn(e,t){return Vt(e.getHours(),t,2)}function gn(e,t){return Vt(e.getHours()%12||12,t,2)}function yn(e,t){return Vt(1+et.count(bt(e),e),t,3)}function vn(e,t){return Vt(e.getMilliseconds(),t,3)}function bn(e,t){return vn(e,t)+"000"}function xn(e,t){return Vt(e.getMonth()+1,t,2)}function wn(e,t){return Vt(e.getMinutes(),t,2)}function kn(e,t){return Vt(e.getSeconds(),t,2)}function Sn(e){var t=e.getDay();return 0===t?7:t}function Cn(e,t){return Vt(it.count(bt(e)-1,e),t,2)}function En(e){var t=e.getDay();return t>=4||0===t?lt(e):lt.ceil(e)}function Mn(e,t){return e=En(e),Vt(lt.count(bt(e),e)+(4===bt(e).getDay()),t,2)}function _n(e){return e.getDay()}function Dn(e,t){return Vt(ot.count(bt(e)-1,e),t,2)}function qn(e,t){return Vt(e.getFullYear()%100,t,2)}function Rn(e,t){return Vt((e=En(e)).getFullYear()%100,t,2)}function Tn(e,t){return Vt(e.getFullYear()%1e4,t,4)}function On(e,t){var n=e.getDay();return Vt((e=n>=4||0===n?lt(e):lt.ceil(e)).getFullYear()%1e4,t,4)}function Pn(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Vt(t/60|0,"0",2)+Vt(t%60,"0",2)}function Nn(e,t){return Vt(e.getUTCDate(),t,2)}function An(e,t){return Vt(e.getUTCHours(),t,2)}function In(e,t){return Vt(e.getUTCHours()%12||12,t,2)}function Ln(e,t){return Vt(1+tt.count(xt(e),e),t,3)}function zn(e,t){return Vt(e.getUTCMilliseconds(),t,3)}function Fn(e,t){return zn(e,t)+"000"}function jn(e,t){return Vt(e.getUTCMonth()+1,t,2)}function $n(e,t){return Vt(e.getUTCMinutes(),t,2)}function Hn(e,t){return Vt(e.getUTCSeconds(),t,2)}function Vn(e){var t=e.getUTCDay();return 0===t?7:t}function Bn(e,t){return Vt(ft.count(xt(e)-1,e),t,2)}function Wn(e){var t=e.getUTCDay();return t>=4||0===t?gt(e):gt.ceil(e)}function Un(e,t){return e=Wn(e),Vt(gt.count(xt(e),e)+(4===xt(e).getUTCDay()),t,2)}function Yn(e){return e.getUTCDay()}function Kn(e,t){return Vt(ht.count(xt(e)-1,e),t,2)}function Gn(e,t){return Vt(e.getUTCFullYear()%100,t,2)}function Xn(e,t){return Vt((e=Wn(e)).getUTCFullYear()%100,t,2)}function Jn(e,t){return Vt(e.getUTCFullYear()%1e4,t,4)}function Zn(e,t){var n=e.getUTCDay();return Vt((e=n>=4||0===n?gt(e):gt.ceil(e)).getUTCFullYear()%1e4,t,4)}function Qn(){return"+0000"}function er(){return"%"}function tr(e){return+e}function nr(e){return Math.floor(+e/1e3)}const rr=Oe();rr("d3-number",(function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=Ye(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o})),rr("d3-time",(function(e){let t=zt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=zt(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const ir={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return rr(t.type||"d3-number")(t.format||"")})(e)};function or(e){let{id:t=ir.id,key:n=ir.key,min:r=ir.min,max:i=ir.max,type:o=ir.type,tags:a=ir.tags,title:s=ir.title,values:l=ir.values,value:c=ir.value,label:u=ir.label,formatter:d=ir.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>o(e),min:()=>r(e),max:()=>i(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:c,label:u}}const ar=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),sr=e=>e.reduce(((e,t)=>e+t),0),lr={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=ar(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=ar(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=ar(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=ar(e),n=t.length;return n?sr(t)/n:NaN}};function cr(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>cr(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=lr[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?lr[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=lr[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?lr[l.field.reduceLabel]:l.field.reduceLabel))})),i}function ur(e,t){const{main:n}=cr(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:cr(e,t,e.props||{},n),main:n}}function dr(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function fr(e,t){let{main:n,propsArr:r,props:i}=t,o=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=i[e].field?i[e].field.formatter():e=>e})),o.push(...e.map((e=>{const t=dr(e.items,n,a);return r.forEach((n=>{t[n]=dr(e.items,i[n],s[n],n)})),t}))),o}function hr(e){let{cfg:t,itemData:n,obj:r,target:i,tracker:o,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=o[s];l||(l=o[s]={items:[],id:s},i.push(l)),l.items.push(r)}function pr(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function mr(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const gr={diverging:function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},none:_e,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}_e(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}_e(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,h=0;h<s;++h){var p=e[t[h]];f+=(p[a][1]||0)-(p[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,_e(e,t)}}},yr={ascending:function(e){var t=e.map(Te);return De(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(Te),o=function(e){var t=e.map(Re);return De(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:De,reverse:function(e){return De(e).reverse()}};function vr(e,t,n){const r={},i=t.stackKey,o=t.value,a=t.startProp||"start",s=t.endProp||"end",l=t.offset||"none",c=t.order||"none",u=t.valueRef||"";let d=0,f={};for(let t=0;t<e.items.length;t++){let n=e.items[t],o=u?n[u]:null;if(o&&o.source){let e="".concat(o.source.key||"","/").concat(o.source.field);f[e]||(f[e]=o.source)}let a=i(n);r[a]=r[a]||{items:[]},r[a].items.push(n),d=Math.max(d,r[a].items.length)}const h=Array.apply(null,{length:d}).map(Number.call,Number),p=Object.keys(r).map((e=>r[e].items)),m=function(){var e=I([]),t=De,n=_e,r=qe;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,c=s.length,u=new Array(c);for(o=0;o<c;++o){for(var d,f=s[o],h=u[o]=new Array(l),p=0;p<l;++p)h[p]=d=[0,+r(i[p],f,p,i)],d.data=i[p];h.key=f}for(o=0,a=t(u);o<c;++o)u[a[o]].index=o;return n(u,a),u}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:I(ce.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:I(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?De:"function"==typeof e?e:I(ce.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?_e:e,i):n},i}().keys(h).value(((e,t)=>e[t]?o(e[t]):0)).order(yr[c]).offset(gr[l]);let g=m(p),y=[];for(let e=0;e<g.length;e++){let t=g[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[a]={value:n[0]},r[s]={value:n[1]},y.push(n[0],n[1]))}}let v=Object.keys(f).map((e=>{let t=n(f[e].key);return t?t.field(f[e].field):null})).filter((e=>!!e));const b=or({title:v.map((e=>e.title())).join(", "),min:mr(y),max:pr(y),type:"measure",formatter:v[0]?v[0].formatter:void 0});e.fields.push(b)}function br(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=b({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map((e=>({value:o(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))})),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map((t=>({value:o(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&vr(n,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function xr(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:br;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function wr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const kr=Symbol("implicit");function Sr(){var e=new _t,t=[],n=[],r=kr;function i(i){let o=e.get(i);if(void 0===o){if(r!==kr)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new _t;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Sr(t,n).unknown(r)},wr.apply(i,arguments),i}function Cr(){var e,t,n=Sr().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,f=d?a:o,h=d?o:a;e=(h-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(h-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var p=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map((function(t){return f+e*t}));return i(d?p.reverse():p)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return Cr(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},wr.apply(d(),arguments)}function Er(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Mr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function _r(){}var Dr=.7,qr=1/Dr,Rr="\\s*([+-]?\\d+)\\s*",Tr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Or="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pr=/^#([0-9a-f]{3,8})$/,Nr=new RegExp(`^rgb\\(${Rr},${Rr},${Rr}\\)$`),Ar=new RegExp(`^rgb\\(${Or},${Or},${Or}\\)$`),Ir=new RegExp(`^rgba\\(${Rr},${Rr},${Rr},${Tr}\\)$`),Lr=new RegExp(`^rgba\\(${Or},${Or},${Or},${Tr}\\)$`),zr=new RegExp(`^hsl\\(${Tr},${Or},${Or}\\)$`),Fr=new RegExp(`^hsla\\(${Tr},${Or},${Or},${Tr}\\)$`),jr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $r(){return this.rgb().formatHex()}function Hr(){return this.rgb().formatRgb()}function Vr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Pr.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Br(t):3===n?new Yr(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Wr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Wr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Nr.exec(e))?new Yr(t[1],t[2],t[3],1):(t=Ar.exec(e))?new Yr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ir.exec(e))?Wr(t[1],t[2],t[3],t[4]):(t=Lr.exec(e))?Wr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zr.exec(e))?Qr(t[1],t[2]/100,t[3]/100,1):(t=Fr.exec(e))?Qr(t[1],t[2]/100,t[3]/100,t[4]):jr.hasOwnProperty(e)?Br(jr[e]):"transparent"===e?new Yr(NaN,NaN,NaN,0):null}function Br(e){return new Yr(e>>16&255,e>>8&255,255&e,1)}function Wr(e,t,n,r){return r<=0&&(e=t=n=NaN),new Yr(e,t,n,r)}function Ur(e,t,n,r){return 1===arguments.length?function(e){return e instanceof _r||(e=Vr(e)),e?new Yr((e=e.rgb()).r,e.g,e.b,e.opacity):new Yr}(e):new Yr(e,t,n,null==r?1:r)}function Yr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Kr(){return`#${Zr(this.r)}${Zr(this.g)}${Zr(this.b)}`}function Gr(){const e=Xr(this.opacity);return`${1===e?"rgb(":"rgba("}${Jr(this.r)}, ${Jr(this.g)}, ${Jr(this.b)}${1===e?")":`, ${e})`}`}function Xr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zr(e){return((e=Jr(e))<16?"0":"")+e.toString(16)}function Qr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ti(e,t,n,r)}function ei(e){if(e instanceof ti)return new ti(e.h,e.s,e.l,e.opacity);if(e instanceof _r||(e=Vr(e)),!e)return new ti;if(e instanceof ti)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ti(a,s,l,e.opacity)}function ti(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ni(e){return(e=(e||0)%360)<0?e+360:e}function ri(e){return Math.max(0,Math.min(1,e||0))}function ii(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Er(_r,Vr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$r,formatHex:$r,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ei(this).formatHsl()},formatRgb:Hr,toString:Hr}),Er(Yr,Ur,Mr(_r,{brighter(e){return e=null==e?qr:Math.pow(qr,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Dr:Math.pow(Dr,e),new Yr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yr(Jr(this.r),Jr(this.g),Jr(this.b),Xr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Kr,formatHex:Kr,formatHex8:function(){return`#${Zr(this.r)}${Zr(this.g)}${Zr(this.b)}${Zr(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Gr,toString:Gr})),Er(ti,(function(e,t,n,r){return 1===arguments.length?ei(e):new ti(e,t,n,null==r?1:r)}),Mr(_r,{brighter(e){return e=null==e?qr:Math.pow(qr,e),new ti(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Dr:Math.pow(Dr,e),new ti(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Yr(ii(e>=240?e-240:e+120,i,r),ii(e,i,r),ii(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ti(ni(this.h),ri(this.s),ri(this.l),Xr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xr(this.opacity);return`${1===e?"hsl(":"hsla("}${ni(this.h)}, ${100*ri(this.s)}%, ${100*ri(this.l)}%${1===e?")":`, ${e})`}`}}));var oi=e=>()=>e;function ai(e){return 1==(e=+e)?si:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):oi(isNaN(t)?n:t)}}function si(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):oi(isNaN(e)?t:e)}var li=function e(t){var n=ai(t);function r(e,t){var r=n((e=Ur(e)).r,(t=Ur(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=si(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function ci(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function ui(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=yi(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function di(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function fi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function hi(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=yi(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var pi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mi=new RegExp(pi.source,"g");function gi(e,t){var n,r,i,o=pi.lastIndex=mi.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=pi.exec(e))&&(r=mi.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:fi(n,r)})),o=mi.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function yi(e,t){var n,r=typeof t;return null==t||"boolean"===r?oi(t):("number"===r?fi:"string"===r?(n=Vr(t))?(t=n,li):gi:t instanceof Vr?li:t instanceof Date?di:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?ci:Array.isArray(t)?ui:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?hi:fi)(e,t)}function vi(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function bi(e){return+e}var xi=[0,1];function wi(e){return e}function ki(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Si(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=ki(i,r),o=n(a,o)):(r=ki(r,i),o=n(o,a)),function(e){return o(r(e))}}function Ci(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=ki(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Mt(e,t,1,r)-1;return o[n](i[n](t))}}function Ei(){var e,t,n,r,i,o,a=xi,s=xi,l=yi,c=wi;function u(){var e=Math.min(a.length,s.length);return c!==wi&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?Ci:Si,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),fi)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,bi),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=vi,u()},d.clamp=function(e){return arguments.length?(c=!!e||wi,u()):c!==wi},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Mi(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?Nt(t,e,n):Nt(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=Le(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ne(t)/3)))-Ne(Math.abs(e)))}(o,a))||(r.precision=i),Be(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ne(t)-Ne(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Ne(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Ve(r)}function _i(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[i,o,a]=r?Pt(t,e,n):Pt(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Mi(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=Nt(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Di(){var e=Ei()(wi,wi);return e.copy=function(){return t=e,Di().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},wr.apply(e,arguments),_i(e)}function qi(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[Mt(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return qi().domain(t).range(n).unknown(e)},wr.apply(i,arguments)}function Ri(e){return void 0===e?e=>e:t=>e(t)}function Ti(e){return Math.max(0,Math.min(1,e))}function Oi(e){return"object"==typeof e}function Pi(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function Ni(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...Pi(t,o,a)),o-=a-o,a=e[i],r.push(...Pi(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...Pi(t,o,a))):r.push(...Pi(t,o,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function Ai(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=k(i)||k(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const c=r>0?Ni(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(Ri(o));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:u[t],value:e,isMinor:-1===l.indexOf(e)}}))}function Ii(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=k(i)||k(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const c=n.ticks(s),u=r>0?Ni(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(Ri(o));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===c.indexOf(e)}}))}function Li(e){let t,{settings:n,scale:r,distance:i,formatter:o=e=>e}=e;const a=n.minorTicks&&!k(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!k(e.value):!k(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(Oi(e)?e.value:e)-(Oi(t)?t.value:t))).filter(((e,t,r)=>{const i=Oi(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=Oi(e),i=t?e.value:e,o=n(i);return{position:o,value:i,label:t&&void 0!==e.label?e.label:r(i),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?Ti(n(e.start)):o,end:t&&!isNaN(e.end)?Ti(n(e.end)):o}}))}({values:e,scale:r.copy(),formatter:o})}else if(k(n.ticks.count)){t=(n.ticks.tight?Ii:Ai)({distance:i,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:o}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,o)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:i}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:o})}return t}function zi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]})),r}const Fi={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},ji={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},$i={count:NaN};function Hi(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function Vi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Di(),i={instance:null,invert:!1},o={data:t,resources:n},a=zi(e,Fi,o);let s;function l(e){return k(e)?NaN:r(e)}a.ticks=zi(e.ticks,ji,o),a.minorTicks=zi(e.minorTicks,$i,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=m(!0,{},a,e.settings),e.scale=l,s=Li(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=Vi(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return Hi(i,l),i.instance(e)},l.normInvert=function(e){return Hi(i,l),i.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]);return l.domain([c,u]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const Bi={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function Wi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=zi(e,Bi,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}}))}(t,n.trackBy)}}const c=Cr();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=m({datum:i[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const Ui={depth:0};function Yi(e,t,n){return e.ancestors().map((e=>t(m({datum:e.data},n)))).reverse().slice(1).toString()}const Ki=e=>e.min(),Gi=e=>e.max();function Xi(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(Ki).filter(w);i=e.length?Math.min(...e):i}if(!r){const e=t.map(Gi).filter(w);o=e.length?Math.max(...e):o}}return[i,o]}const Ji={domain:[],range:[],invert:!1,min:NaN,max:NaN};function Zi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Vi(e,t,n).clamp(!0).interpolate(li),i=zi(e,Ji,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;m(!0,s,r);const[l,c]=Xi(i,t?t.fields:[]),u=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],f=a?i.range:d;return s.range(i.invert?f.slice().reverse():f.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),l,c)),s}const Qi={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function eo(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const to={domain:[],range:[]};const no={domain:[],range:[],unknown:void 0},ro={domain:[],range:[],override:!1};const io=Oe();function oo(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const i=br(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}io("linear",Vi),io("band",Wi),io("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=zi(t,Bi,i);o.ticks=zi(t.ticks,Ui,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=Wi(o);const{values:s,labels:l,items:c,ticks:u}=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter((e=>{if(e.depth>0){const t=Yi(e,i,n),d=e.leaves()||[e],f=i(m({datum:e.data},n)),h=o(m({datum:e.data},n)),p=Array.isArray(e.children),g={key:t,count:d.length,value:f,label:h,leftEdge:Yi(d[0],i,n),rightEdge:Yi(d[Math.max(d.length-1,0)],i,n),node:e};p?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(h)),(r<=0&&!p||e.depth===r)&&c.push(g),l[t]=g}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),d=function(e){const t=String(e),n=c[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};m(!0,d,a),d.bandwidth=function(e){const t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=c[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=c[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>u.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const f=a.pxScale;return d.pxScale=function(e){return a=f(e),d},d.domain(s),d})),io("sequential-color",Zi),io("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=qi(),i=zi(e,Qi,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return k(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=Xi(i,l),d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[];let h=a?i.range:f,p=[];return p=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=Di().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(h,c,u):[c+(u-c)/2],h.length>p.length+1?p=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(h,c,u):h.length<p.length+1&&(h=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=Zi().domain([n,r]).range(t);return[n,...eo(e),r].map((e=>i(e)))}(p,h,c,u)),s.data=()=>t,s.range(i.invert?h.slice().reverse():h),s.domain(p),s})),io("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Sr(),i={data:t,resources:n},o=zi(e,to,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=m({datum:l[e]},i),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(u),r}(e,t,n),i=n.theme,o=zi(e,no,{data:t,resources:n});let a;if(o.explicit=zi(e.explicit,ro,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var ao={};function so(){so.init.call(this)}ao.isObject=function(e){return"object"==typeof e&&null!==e},ao.isNumber=function(e){return"number"==typeof e},ao.isUndefined=function(e){return void 0===e},ao.isFunction=function(e){return"function"==typeof e};var lo=so;so.EventEmitter=so,so.prototype._events=void 0,so.prototype._maxListeners=void 0,so.defaultMaxListeners=10,so.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},so.prototype.setMaxListeners=function(e){if(!ao.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},so.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],ao.isUndefined(n))return!1;if(ao.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(ao.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},so.prototype.addListener=function(e,t){var n;if(!ao.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,ao.isFunction(t.listener)?t.listener:t),this._events[e]?ao.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,ao.isObject(this._events[e])&&!this._events[e].warned)&&((n=ao.isUndefined(this._maxListeners)?so.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,ao.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),ao.isFunction(console.trace)&&console.trace()));return this},so.prototype.on=so.prototype.addListener,so.prototype.once=function(e,t){if(!ao.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},so.prototype.removeListener=function(e,t){var n,r,i,o;if(!ao.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||ao.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(ao.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},so.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],ao.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},so.prototype.listeners=function(e){return this._events&&this._events[e]?ao.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},so.listenerCount=function(e,t){return e._events&&e._events[t]?ao.isFunction(e._events[t])?1:e._events[t].length:0};var co={mixin:e=>(Object.keys(lo.prototype).forEach((t=>{e[t]=lo.prototype[t]})),lo.init(e),e)};function uo(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;({min:e=e,max:t=t}=o),void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return co.mixin(i),i}function fo(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||uo();return o.update({min:n,max:r,viewSize:i}),o}function ho(e,t){return e<=t}function po(e,t){return e<t}function mo(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function go(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:i=!0}=n;e=r?ho:po,t=i?ho:po},i.add=e=>{let{min:t,max:n}=e;const i=mo(r,t),o=mo(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let{min:t,max:n}=e;const i=mo(r,t),o=mo(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let{min:t,max:n}=e;const i=mo(r,t,!0),o=mo(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function yo(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const vo={key:void 0,includeMin:!0,includeMax:!0};function bo(e){let{items:t,collection:n,vc:r}=e;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function xo(e){let{items:t,collection:n}=e;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function wo(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function ko(e){let{key:t,collection:n,obj:r,fn:i,value:o}=e;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function So(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function Co(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?m({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function Eo(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function Mo(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function _o(e,t,n){let{ranges:r,interceptors:i,rc:o,aliases:a,rangeConfig:s}=n;const l=Co(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}})),c}function Do(){let{vc:e=yo,rc:t=go}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},i={},o={},a={sources:{},default:m({},vo)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(i).forEach((t=>{e.values[t]=i[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},c={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:m({},vo)},e.ranges.forEach((e=>{const t={};Object.keys(vo).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:vo[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{i[n]&&e.values[n].join(";")===i[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(i).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,r={},i={};for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},i={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(i).map((e=>({type:"value",id:e,brush:i[e]})))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const r=Co(s.addValues,t,o),a=bo({vc:e,collection:i,items:r});u.emit("add-values",r),a.length&&(n||(n=!0,u.emit("start")),u.emit("update",a,[]),c.updateValues())}};return u.setValues=t=>{const r=Co(s.setValues,t,o),a=function(e){let{items:t,vCollection:n,vc:r}=e;const i={},o=wo(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||ko({key:a,value:e,collection:n,obj:i,fn:r})},f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)a=f[e],o[a].forEach(d);return l=So(c,i),s=So(i,c),[s,l]}({items:r,vCollection:i,vc:e});u.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=Co(s.removeValues,e,o),n=xo({collection:i,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=Co(s.addValues,t,o),l=Co(s.removeValues,r,o),d=bo({vc:e,collection:i,items:a}),f=xo({collection:i,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||f.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,f),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=Co(s.toggleValues,t,o),a=function(e){let{items:t,values:n,vc:r}=e;const i={},o={},a=[],s=[],l=wo(t);let c,u,d;const f=Object.keys(l);for(let e=0,t=f.length;e<t;e++){c=f[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):ko({key:c,value:u,collection:n,obj:i,fn:r})}const h=Object.keys(i);for(let e=0,t=h.length;e<t;e++)c=h[e],a.push({id:c,values:i[c]});const p=Object.keys(o);for(let e=0,t=p.length;e<t;e++)c=p[e],s.push({id:c,values:o[c]});return[a,s]}({items:r,values:i,vc:e});u.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=o[e]||e;return!!i[n]&&i[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{_o(e,"add",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{_o(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{_o(e,"set",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{_o(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsValue(t)},u.containsRange=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,c,u,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)c=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],a[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in o&&(u=o[u]),d=c.value,r[u]?a[t].bool=Array.isArray(d)?r[u].containsRange({min:d[0],max:d[1]}):r[u].containsValue(d):i[u]&&i[u].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},u.intercept=(e,t)=>{const n=Eo(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=Eo(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=Eo(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:Mo(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>u.removeInterceptor(e.name,t)))}))},u.addKeyAlias=(e,t)=>{o[e]=t},u.removeKeyAlias=e=>{delete o[e]},co.mixin(u),u}function qo(e){return e*e*e}function Ro(e){return--e*e*e+1}function To(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}Oe();const Oo=["stroke","fill","color","backgroundColor","thumbColor"];function Po(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=No(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function No(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?fi:"string"===r?(i=Vr(t))&&Oo.includes(n)?(t=i,li):gi:t instanceof Vr?li:t instanceof Date?di:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?ci:Array.isArray(t)?Po:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Ao:fi)(e,t)}function Ao(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=No(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function Io(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const Lo={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},zo=/^\$/;function Fo(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function jo(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function $o(e,t){return e.pxScale?e.pxScale(t):e}const Ho={normalizeSettings:function(e,t,n){const r=m({},e),i=m({},t);return Object.keys(r).forEach((e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(Fo(o)){let n=t[e];"string"==typeof n&&zo.test(n)&&(n=Lo[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&zo.test(n)?i[e]=Lo[n]:i[e]=n})),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,f=u&&o in s,h=d?s[c.ref]:f?s[o]:a;Fo(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&h?(r[o]=c.scale(h.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&h?r[o]=h.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:jo};function Vo(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...Vo(t.children)),e):(e.push(t),e)),[])}function Bo(e,t){let{context:n,data:r,style:i,filter:o,mode:a}=t;const s=e.chart.brush(n),l=r,c=i.active||{},u=i.inactive||{},d=[];Object.keys(c).forEach((e=>{d.push(e)})),Object.keys(u).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const f=[];let h=!1;const p=()=>{let t=Vo(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},g=()=>{const e=p(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,i,a),o=f.indexOf(e[r]);let l=!1;t&&-1===o?(f.push(e[r]),l=!0):t||-1===o||(f.splice(o,1),l=!0),e[r].needToUpdate=l||h,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=m({},e[i],e[i].__style),n=e[i].isActive;d.forEach((r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,f):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,f):u[r]:e[i].__style[r]})),r=!0}delete e[i].needToUpdate}return h=!1,r},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=p(),i=r.length;for(let e=0;e<i;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in u&&(r[e][t]="function"==typeof u[t]?u[t].call(null,r[e]):u[t])})));h=!0,f.length=0,n||e.renderer.render(e.nodes)},v=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=p(),i=r.length;for(let e=0;e<i;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);f.length=0,n||e.renderer.render(e.nodes)},b=()=>{if(g()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",y),s.on("end",v),s.on("update",b),{isActive:()=>s.isActive(),update:()=>{f.length=0,h=!0,g()},cleanUp:function(){s.removeListener("start",y),s.removeListener("end",v),s.removeListener("update",b)}}}function Wo(e){let{nodes:t,action:n,chart:r,trigger:i}=e;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:i}=e;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}i.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:o,action:n,chart:r,trigger:i})}function Uo(e){let{collisions:t,t:n,config:r,action:i}=e,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map((e=>e.node));return Wo({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function Yo(e,t,n){const r=n.element().getBoundingClientRect();let i=x(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&x(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!x(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function Ko(e,t,n){return e?"function"==typeof e?e(t):e:n}const Go={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function Xo(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function Jo(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function Zo(e){return-e/180*Math.PI}function Qo(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(Zo(e))}function ea(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ta(e,t){return{x:e.x-t.x,y:e.y-t.y}}function na(e,t){return{x:e.x*t,y:e.y*t}}function ra(e,t){return e.x-t.x}function ia(e,t){return e.y-t.y}function oa(e,t){return ra(e,t)**2+ia(e,t)**2}function aa(e,t){return Math.sqrt(oa(e,t))}function sa(e,t){return e.x*t.x+e.y*t.y}function la(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=ta(e,n);return ea({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const ca={up:0,down:180,left:90,right:-90};function ua(e){let{x:t,y:n,size:r}=e;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const da=Oe();da.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),da.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:Xo([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),da.add("saltire",(function(e){const t=Zo(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=Jo(e.x,e.y,o,i).map((e=>la(e,t,s)));return{type:"path",fill:"black",d:Xo(l)}})),da.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),da.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=ca[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=Zo(r);return s=s.map((e=>la(e,l,n))),{type:"path",fill:"black",d:Xo(s)}})),da.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:ua(e)}})),da.add("star",(function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=Zo(i),c=Zo(i+s/2),u=Math.sin(l),d=Math.cos(l),f=Math.sin(c),h=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+h*o,y:e.y+f*o})}return{type:"path",fill:"black",d:Xo(n)}})),da.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=Zo(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:Xo(t)}})),da.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:Xo(Jo(t,n,e.size,o))}})),da.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=Zo(90);o=o.map((n=>la(n,e,t)))}const a=M(o);return a.type="rect",a.fill="black",a})),da.add("rect",(function(e){const{x:t,y:n,size:r}=e,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}}));const fa=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:da;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==Go[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function ha(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:i=0,preferredSize:o=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:i}=e;return"function"==typeof o?o({inner:n,outer:r,children:i,dock:this.dock()},t):o},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(i=e,this):"function"==typeof i?i(t):i},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function pa(e,t,n){const{require:r=[]}=t,i=t.mediator||{},{settings:o,formatter:a,scale:s,data:l,renderer:c,chart:u,dockConfig:d,mediator:f,instance:h,rect:p,style:m,registries:g,resolver:y,update:v,_DO_NOT_USE_getInfo:b,symbol:x,isVisible:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:o}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:f}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),p&&Object.defineProperty(e,"rect",{get:p}),b&&(e._DO_NOT_USE_getInfo=b),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:h}):"update"===t&&v?Object.defineProperty(e,"update",{get:v}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(i).forEach((t=>{e.mediator.on(t,i[t].bind(e))}))}function ma(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function ga(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function ya(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:i,container:o,mediator:a,registries:s,theme:l,renderer:c}=t,u=co.mixin({});let d,f,h,p,g,y=t.settings||{},v=m(!0,{},n,y),x=[],w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ho,n={};return{resolve:function(r){let{data:i,settings:o,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(o,a,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const u=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:c};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:c};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],u.push(o)}}return{settings:n.norm,items:u}}}}({chart:i}),k=!1;const S={nodes:[],chart:i,config:v.brush||{},renderer:null},C={tap:[],over:[]},E=[],M={},_=m({},y);function D(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==y[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(M,...l):r&&(a=e[t])),o&&("function"==typeof y[t]?a=y[t].call(_,...l):r&&(a=y[t])),i||o||(a=n.call(M,...l)),a}}const q=D("preferredSize",(()=>0),!0),R=D("resize",(e=>{let{inner:t}=e;return t})),T=D("created"),O=D("beforeMount"),P=D("mounted"),N=D("beforeUnmount"),A=D("beforeUpdate"),I=D("updated"),L=D("beforeRender"),z=D("beforeDestroy"),F=D("destroyed"),j=e.render,$=()=>{v.brush&&(v.brush.consume||[]).forEach((e=>{e.context&&e.style&&E.push(Bo(S,e))}))},H=()=>{v.brush&&(v.brush.trigger||[]).forEach((e=>{"over"===e.on?C.over.push(e):C.tap.push(e)}))};Object.defineProperty(S,"data",{get:()=>x});const V=v.renderer||e.renderer,B=V?c||s.renderer(V)():c||s.renderer()();"function"==typeof B.settings&&B.settings(v.rendererSettings),S.renderer=B;const W={resources:i.logger?{logger:i.logger()}:{}};let U=ha(ma(v,q,i.logger()),W);const Y=e=>{e.key=v.key,e.element=B.element()},K=()=>{};K.dockConfig=()=>U,K.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(y=e.settings,v=m(!0,{},n,e.settings),U=ha(ma(v,q,i.logger()),W),S.config=v.brush||{}),v.scale&&(d=i.scale(v.scale)),v.data){const{rendererSettings:e}=v,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=br(v.data,{dataset:i.dataset,collection:i.dataCollection},{logger:i.logger()},i.dataCollection);t?t.isFirst?(x=n,x.items&&(x.items=[...n.items])):x.items&&(x.items=[...x.items,...n.items||[]]):x=n}else x=d?d.data():[];"string"==typeof v.formatter||"object"==typeof v.formatter?f=i.formatter(v.formatter):d&&d.data().fields&&(f=d.data().fields[0].formatter()),g=l.style(v.style||{})},K.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=R({inner:e,outer:t});p=n?B.size(n):B.size(e),_.rect=m(!0,{computedPhysical:p.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),p=m(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},p)},K.getRect=()=>_.rect;const G=()=>{const e=B.renderArgs?B.renderArgs.slice(0):[],{rendererSettings:t}=v;let n=x;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return x.items&&r&&(n=b(b({},x),{},{items:x.items.slice(r.start,r.end)})),e.push({data:n}),e};let X,J,Z;function Q(e){const{rendererSettings:t}=v,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?S.nodes=[...e||[]]:S.nodes&&(S.nodes=[...S.nodes,...e||[]]):S.nodes=e}K.beforeMount=O,K.beforeRender=()=>{L({size:p})},K.render=()=>{const e=j.call(M,...G());Q(e),B.render(e),X=e,J=_.rect.computed},K.hide=()=>{K.unmount(),B.size({x:0,y:0,width:0,height:0}),B.clear()},K.beforeUpdate=()=>{A({settings:v,data:x})},K.update=()=>{Z&&Z.stop();const{rendererSettings:e,brush:t,animations:n}=v;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return B.render(),void(X=null);const r=j.call(M,...G());Q(r),E.forEach((e=>e.cleanUp())),E.length=0,C.tap=[],C.over=[],t&&($(),H()),E.forEach((e=>{e.isActive()&&e.update()})),X&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:X,currentRect:_.rect.computed,previousRect:J}),Z=function(e,t,n,r){let i,{old:o,current:a}=e,{renderer:s}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},f=[],h=null;const p=n.trackBy||Io,g={start(){let e={};if(o.forEach(((t,n)=>{let r=p(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=p(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),i=r.map((e=>e.data.major.value)),o=n.filter((e=>i.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>o.includes(e.data.major.value))),s=r.filter((e=>o.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(Ao(m({},e[r],{points:n.old}),m({},t,{points:n.current}))),l.push(m({},e[r],{commonPoints:n.old}))}else d.ips.push(Ao(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(Ao(m({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(Ao(e[t],m({},e[t],{r:1e-4,opacity:0}))))})),f.push({name:"exiting",easing:qo,duration:200,tweens:u.ips,nodes:[...l]}),f.push({name:"updating",easing:To,duration:400,tweens:d.ips,nodes:[]}),f.push({name:"entering",easing:Ro,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,{isInit:o,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===o?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===i)}f.length&&(h=s.getScene(a),f[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(g.tick)))},tick(){let e=f[0];e||g.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,o=[],a=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));const{adjustTweenedNodes:l}=n;if(l&&l(a),o.push(...a),o.push(...e.nodes),s.render(o),t>=1){f.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");f.length?"updating"===f[0].name&&t&&f.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),g.stop())}i&&(i=window.requestAnimationFrame(g.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return h}};return g}({old:X,current:r},{renderer:B},n,i.storage),Z.start()):B.render(r),X=r,J=_.rect.computed,B.setKey&&"string"==typeof y.key&&B.setKey(y.key)},K.updated=I,K.destroy=()=>{K.unmount(),z(h),B.destroy(),F(),h=null};const ee=e=>{S.nodes=e,E.forEach((e=>{e.isActive()&&e.update()})),B.render(e)};return pa(M,e,{settings:()=>v,data:()=>x,scale:()=>d,formatter:()=>f,renderer:()=>B,chart:()=>i,dockConfig:()=>U,mediator:()=>a,instance:()=>_,rect:()=>_.rect,style:()=>g,update:()=>ee,registries:()=>s,resolver:()=>w,symbol:()=>fa(s.symbol)}),pa(_,y,{settings:()=>v,data:()=>x,scale:()=>d,formatter:()=>f,renderer:()=>B,chart:()=>i,dockConfig:()=>U,mediator:()=>a,style:()=>g,_DO_NOT_USE_getInfo:r.bind(M),isVisible:()=>k}),K.getBrushedShapes=function(e,t,n){const r=[];if(v.brush&&v.brush.consume){const o=i.brush(e),a=B.findShapes("*");v.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let i=0;i<a.length;i++){const s=a[i];s.data&&o.containsMappedData(s.data,n||e.data,t)&&(Y(s),r.push(s),a.splice(i,1),i--)}}))}return r},K.findShapes=e=>{var t;const n=(null!==(t=Z)&&void 0!==t&&t.inProgress()?Z.targetScene:B).findShapes(e);for(let e=0,t=n.length;e<t;e++)Y(n[e]);return n},K.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=B.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)Y(r[e]);return r},K.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];Wo({nodes:e,action:t.action||"toggle",trigger:t,chart:i,data:S.data})},K.mount=()=>{h=B.element&&B.element()?h:B.appendTo(o),B.setKey&&"string"==typeof y.key&&B.setKey(y.key),v.brush&&($(),H()),ga(_,u,y),ga(M,u,e),k=!0},K.mounted=()=>P(h),K.unmount=()=>{[_,M].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,u)})),C.tap=[],C.over=[],E.forEach((e=>{e.cleanUp()})),E.length=0,N(),k=!1},K.onBrushTap=e=>{C.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return Uo({collisions:Yo(t,n,r.renderer),t:n,config:r,action:Ko(n.action,t,"toggle")})})({e:e,t:t,config:S})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},K.onBrushOver=e=>{C.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return Uo({collisions:Yo(t,n,r.renderer),t:n,config:r,action:Ko(n.action,t,"set")})})({e:e,t:t,config:S})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)}))},K.def=M,K.ctx=_,K.renderer=()=>B,K.set({settings:y}),T(),K}function va(e){const t=m(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function ba(e,t,n){const r=ea(function(e,t){const n=sa(e,t)/sa(t,t)||1;return{x:t.x*n,y:t.y*n}}(ta(n,e),ta(t,e)),e);return r}function xa(e,t,n){return aa(e,n)+aa(t,n)-aa(e,t)<1e-12}function wa(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function ka(e){return e.x1===e.x2&&e.y1===e.y2}function Sa(e){return e.width<=0||e.height<=0}function Ca(e){return e.r<=0}function Ea(e){return e.edges.length<=2}function Ma(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=Pa(e,_(t.edges[r])),!0===n)return!0;return!1}function _a(e,t){let n=!1;const{numPolygons:r,polygons:i}=t;for(let t=0;t<r;t++){if(n=Ha(e,i[t]),!0===n)return!0}return!1}function Da(e,t){if(Ca(e))return!1;return oa({x:e.cx,y:e.cy},t)<=e.r**2}function qa(e,t){if(Sa(t)||Ca(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function Ra(e,t){if(Ca(e)||ka(t))return!1;const[n,r]=C(t);if(Da(e,n)||Da(e,r))return!0;const i={x:e.cx,y:e.cy},o=ba(n,r,i);return oa(o,i)<=e.r**2&&xa(n,r,o)}function Ta(e,t){if(Ea(t)||Ca(e))return!1;if(Oa(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(Ra(e,_(t.edges[r])))return!0}return!1}function Oa(e,t){if(Ea(e)||!La(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function Pa(e,t){if(Ea(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(Fa(t,_(e.edges[n])))return!0}const[n,r]=C(t);return Oa(e,n)||Oa(e,r)}function Na(e,t){if(Ea(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(za(t,_(e.edges[n])))return!0}const[n,r,i,o]=E(t);return Oa(e,n)||Oa(e,r)||Oa(e,i)||Oa(e,o)}function Aa(e,t){return!Sa(e)&&!Sa(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function Ia(e,t){if(Sa(e)||Sa(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>La(e,t)))}function La(e,t){return!Sa(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function za(e,t){if(ka(t)||Sa(e))return!1;const[n,r]=C(t);if(La(e,n)||La(e,r))return!0;const i=E(e);let o=i.length;for(let e=0;e<o;e++){if(Fa(_([i[e],i[3!==e?e+1:0]]),t))return!0}return!1}function Fa(e,t){const[n,r]=C(e),[i,o]=C(t),a=ra(r,n),s=ia(r,n),l=ra(o,i),c=ia(o,i),u=ra(n,i),d=ia(n,i);let f=c*a-l*s;const h=l*d-c*u,p=a*d-s*u;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===c)return!1;if(0===f){if(0===h&&0===p){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=ia(i,n)/s,g=ia(o,n)/s}else m=(i.x-n.x)/a,g=(o.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=h/f;return f=p/f,y>=0&&y<=1&&f>=0&&f<=1}function ja(e,t){if(ka(e))return!1;const[n,r]=C(e);return xa(n,r,t)}function $a(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!Aa(n,r)&&(Ia(n,r)?Ma(e,t):Ma(t,e))}function Ha(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!Aa(n,r)&&(Ia(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:i}=e;for(let e=0;e<r;e++)if(n=$a(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=Wa(e,_(t.edges[r])),!0===n)return!0;return!1}(e,t))}function Va(e,t){if(Ca(e))return!1;if(Ba(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(Ra(e,_(n.edges[t])))return!0}}return!1}function Ba(e,t){if(!La(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function Wa(e,t){const[n,r]=C(t);if(Ba(e,n)||Ba(e,r))return!0;const{numPolygons:i,polygons:o}=e;for(let e=0;e<i;e++){const n=o[e];for(let e=0,r=n.edges.length;e<r;e++){if(Fa(t,_(n.edges[e])))return!0}}return!1}function Ua(e,t){const[n,r,i,o]=E(t);if(Ba(e,n)||Ba(e,r)||Ba(e,i)||Ba(e,o))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(za(t,_(n.edges[e])))return!0}}return!1}const Ya=/^\$/,Ka="@extend";function Ga(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function Xa(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&Ga(e),Ya.test(r)?(n.push(e),Xa(r,t,n)):r}let r=e;const i=m(!0,{},t,e),o={};if(e[Ka]){const o=e[Ka];-1!==n.indexOf(o)&&Ga(o);let a=n.slice();a.push(o),r=m(!0,{},Xa(i[o],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===Ka||Ya.test(e))return;o[e]=r[e];let a=o[e];Ya.test(a)&&a in i?(-1!==n.indexOf(a)&&Ga(a),t.push(a),a=i[a],"object"==typeof a||Ya.test(a)&&a in i?o[e]=Xa(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=Xa(a,i,t))})),o}function Ja(e,t){return Xa(e,t,[])}function Za(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>Ja(e,n),setStyle:t=>{n=m({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function Qa(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function es(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return m(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function ts(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function ns(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function rs(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function is(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function os(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function as(e,t,n,r,i){const o=m({},t),a=m({},n);rs(o,r),is(a,r),os(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(rs(t,r),is(n,r),!0)}function ss(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function ls(e){return M([].concat(...e.map(E)))}function cs(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:i,translation:o}=e;const a=ts(r.x,r.y,r.width,r.height),s=ts(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n})).forEach((e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=ls(n.map((e=>e.outerRect))),c=ls(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=ss(c),t.edgeBleed=e.edgeBleed,t.computed=ss(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0})),u}function us(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function ds(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function fs(e){let t=es(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:i}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),Qa(r),Qa(n),{logicalContainerRect:r,containerRect:n}}(e,t),[o,a]=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];ds(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];us(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:i}=e;const o=ts(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];ns(n,o,t),as(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every((e=>t.some((t=>t.key===e))));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),os(t,o,a),o}({layoutRect:r,visible:o,hidden:a,settings:t}),l=cs({visible:o,layoutRect:r,reducedRect:s,containerRect:i,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=ts();e.comp.resize(t,t)})),{visible:o.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=es(e)},n}const hs=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},ps=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(b(b({},n),{},{children:ps(e.children)}))}})),ms=(e,t)=>({visible:[],hidden:t,ordered:[]}),gs=e=>(t,n)=>{var r;const i=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(b(b({},t),{},{children:ps(e.children)}))}})),o=e=>n[e.index],{visible:a=i,hidden:s=[],ordered:l=a}=null!==(r=e(t,i))&&void 0!==r?r:{};return{visible:a.map(o),hidden:s.map(o),ordered:l.map(o)}},ys=e=>"function"==typeof e?gs(e):(e=>{const t=fs(e);return gs(((e,n)=>t.layout(e,n)))})(e);function vs(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=D(e),a=m(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function bs(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach((t=>{e.insertBefore(t,r)}))):(o&&o.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function xs(e,t){let{element:n,data:r=[],settings:i={},on:o={}}=e;const a=t.registries,s=t.logger,l=Za(t.style,t.palettes),c=[],u=m({},e),d=function(){const e={};return co.mixin(e),e}();let f=[],h=null,p=null,g=null,y=[],v=()=>{},w=()=>{};const k={};let S=!1;const C=function(e){let{createComponent:t}=e;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>o(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find((e=>r.hasKey&&r.key===e.key));i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:s}=e;return s.map((e=>{const s=hs(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)})).filter((e=>!!e))},c=e=>{let{components:t,hidden:n,layoutFn:r,ordered:i,rect:o,visible:a}=e;const{visible:s,hidden:l,ordered:u}=r(o,t);a.push(...s),n.push(...l),i.push(...u),s.forEach((e=>{if(e.children){var t,r;const o=ys(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&c({components:e.children,hidden:n,layoutFn:ms,ordered:i,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],i=[]},n.findComponentByKey=e=>hs(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],o=[],a=[],s=ys(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let{components:t}=e;i=t.map((e=>o(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:o,scales:a}=e;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:ya(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:m(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function E(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(u,...a):n.call(u,...a),i}}const M=()=>{let e;i.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=i.dockLayout):e=i.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return C.layout({layoutSettings:e,rect:t})},_=E("created"),D=E("beforeMount"),q=E("mounted"),R=E("beforeUpdate"),T=E("updated"),O=E("beforeRender"),P=E("beforeDestroy"),N=E("destroyed"),A=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:i={},scroll:o={}}=t;v=function(e,t){let{types:n,logger:r}=t;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach(((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}})),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(k).forEach((e=>k[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),w=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:br;const i={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=m(r,{fields:e}))}return r}}(t.collections,{dataset:v},{logger:s});const c={theme:l,logger:s};h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:oo;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:v,collection:w},b(b({},c),{},{scale:a.scale})),p=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xr;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(r,{dataset:v,collection:w},b(b({},c),{},{formatter:a.formatter})),g=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=fo(e[r],t?t[r]:null));return n}(o,g)};function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));y.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),y=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(u,d,n);return r.set(e),r}))}const L=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return f.forEach((e=>{const t=e.instance.getRect();La(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)})),a},z=()=>{if(c.length||!n)return;Object.keys(o).forEach((e=>{const t=o[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=L(e)},r=t=>{const n=e.comps||L(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=x(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),S){S=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=L(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),S){S=!1;break}}}}),i.forEach((e=>{n.addEventListener(e.key,e.listener),c.push(e)}))},F=()=>{c.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),c.length=0},j=()=>{n.innerHTML="",(()=>{const{components:e=[]}=i;O(),A(r,i),C.set({components:e});const{visible:t,hidden:o,ordered:a}=M();f=t,o.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),bs(n,a)})(),z(),I(i.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(i=e.settings,I(e.settings.interactions)),R(),A(r,i);const{formatters:n,scales:o,components:a=[]}=i;C.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:o}),C.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),C.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),M()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:o=[]}=e;let a;e.data&&(r=e.data),e.settings&&(i=e.settings,I(e.settings.interactions)),R(),A(r,i,{partialData:t});const{formatters:s,scales:l,components:c=[]}=i;C.update({components:c,data:r,excludeFromUpdate:o,formatters:s,scales:l}),C.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),C.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const u=[],d=[];let h;if(t)C.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),h=u;else{const{visible:e,hidden:t,ordered:n}=M();f=e,h=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?u.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),h.forEach((e=>e.instance.beforeRender())),h.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||bs(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),f.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),T()},u.destroy=()=>{P(),C.destroy(),F(),I(),delete u.update,delete u.destroy,N()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return f.filter((e=>null==r||e.key===r)).forEach((r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]})),i},u.findShapes=e=>{let t=[];return f.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},u.componentsFromPoint=e=>L(e).map((e=>e.instance.ctx)),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=f;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));o=f.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=vs(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;f.filter((e=>r===e.key)).forEach((r=>{let i=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(i,t.components[n])}))}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=uo()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",g)},u.dataset=e=>v(e),u.dataCollection=e=>w(e),u.scales=function(){return h.all()},u.formatters=function(){return p.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return k[e]||(k[e]=Do()),k[e]},u.scale=function(e){return h.get(e)},u.formatter=function(e){return p.get(e)},u.toggleBrushing=function(e){S=void 0!==e?e:!S},u.component=e=>{const t=C.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>s,u.theme=()=>l,u.storage=va({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:y,on(){z(),y.forEach((e=>e.on()))},off(){F(),y.forEach((e=>e.off()))}})}),_(),n&&(D(),j(),q(n),u.element=n),u}const ws=e=>{let t=Oe(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var ks=Oe();function Ss(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const Cs=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const Es=e=>{let{key:t,data:n,cache:r,config:i}=e;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,{source:n,data:r,cache:i,config:o}=e,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?c=u.map((()=>[])):(c={},u.forEach((e=>{c[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=Cs(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(or(m({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:r,source:t,config:i})};function Ms(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},i={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:o,main:a}=ur(e,t),s=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],f=n.items(),h=[];for(let t=0;t<f.length;t++){const n=f[t];if(a.filter&&!a.filter(n))continue;const r=Ss(a,n,{key:i});s.forEach((e=>{const a=o[e];let s=a.field?a.field.items()[t]:n;r[e]=Ss(a,s,{key:i})})),l&&hr({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),h.push(r)}r=l?[...r,...fr(d,{main:a,propsArr:s,props:o})]:[...r,...h]}})),r}(e,i),hierarchy:()=>null};return Es({key:e,data:t,config:n,cache:r}),i}Ms.util={normalizeConfig:ur,collect:fr,track:hr};const _s=Oe();_s.default("matrix"),_s("matrix",Ms),_s("default",Ms);const Ds=Oe();function qs(e,t,n){return Math.max(e,Math.min(t,n))}function Rs(e){let{item:t,value:n,boxCenter:r,rendWidth:i,rendHeight:o,flipXY:a,symbol:s}=e,l="x",c="y",u=i,d=o,f=n<.5?90:-90;return a&&(l="y",c="x",u=o,d=i,f=n<.5?180:0),s(m({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:f}))}function Ts(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:i,rendHeight:o,flipXY:a}=e,s="x",l="y",c="width",u="height",d=i,f=o;a&&(s="y",l="x",c="height",u="width",d=o,f=i);const{actualDiff:h,actualLow:p}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:i=1}=e;const o=Math.max(t,n),a=Math.min(t,n),s=qs(-.1,1.2,o),l=qs(-.1,1.2,a),c=s*i-l*i,u=Math.max(r,c),d=(u-c)/2;return{actualDiff:u,startModifier:d,actualLow:l*i-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:f});return m({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:p,[u]:h,[c]:n*d,data:t.data||{},collider:{type:null}})}function Os(e){let{item:t,from:n,to:r,boxCenter:i,rendWidth:o,rendHeight:a,flipXY:s}=e,l="x1",c="y1",u="x2",d="y2",f=o,h=a;return s&&(l="y1",c="x1",u="y2",d="x2",f=a,h=o),m({},t.line,{type:"line",[d]:Math.floor(n*h),[l]:i*f,[c]:Math.floor(r*h),[u]:i*f,data:t.data||{},collider:{type:null}})}function Ps(e){let{item:t,key:n,position:r,width:i,boxCenter:o,rendWidth:a,rendHeight:s,flipXY:l}=e,c="x1",u="y1",d="x2",f="y2",h=a,p=s;l&&(c="y1",u="x1",d="y2",f="x2",h=s,p=a);const g=i/2;return m({type:"line"},t[n],{[u]:Math.floor(r*p),[c]:(o-g)*h,[f]:Math.floor(r*p),[d]:(o+g)*h,r:g*h,cx:o*h,cy:r*p,width:i*h,data:t.data||{},collider:{type:null}})}function Ns(e,t,n){const{width:r,maxWidthPx:i,minWidthPx:o}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(i)?n:i/n);return s=isNaN(o)?s:Math.max(o/n,s),s*a}Ds("native",(function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function c(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}}));const As={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},Is=Object.keys(As),Ls={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,i="horizontal"===this.settings.settings.orientation,{style:o,resolver:a,symbol:s}=this,l=Is.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=As[e]));const u=function(e){let{keys:t,data:n,defaultSettings:r,style:i,settings:o,width:a,height:s,resolver:l}=e;const c=m(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let f;f="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:m(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:m(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const h=o.minor||{},p={};["start","end","min","max","med"].forEach((e=>{(h[e]||n.items&&n.items.length&&n.items[0][e])&&(p[e]={scale:h.scale,ref:e})}));let g,y={major:f,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:m(!0,{},p,h)})};for(let e=0,r=t.length;e<r;e++)o[g]&&!1===o[g].show||(g=t[e],y[g]=l.resolve({data:n,defaults:c[g],settings:o[g],scaled:u}));return y}({keys:l,data:t,defaultSettings:c,style:o,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:f}=u,h=function(e){let{width:t,height:n,flipXY:r,resolved:i,keys:o,symbol:a}=e;const s=[],l=i.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,f=i.major.settings,h=["start","end","min","max","med"].filter((e=>void 0!==i.minor.settings[e])),p=h.length,g=o.filter((e=>"oob"!==e));let y,v,b,x,k,S,C,E,M;const _=o?o.length:0,D=g?g.length:0,q={box:function(){b.box&&w(b.start)&&w(b.end)&&y.push(Ts({item:b,boxWidth:x,boxPadding:k,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){w(b.min)&&w(b.start)&&y.push(Os({item:b,from:b.min,to:b.start,boxCenter:S,rendWidth:c,rendHeight:u,flipXY:r})),w(b.max)&&w(b.end)&&y.push(Os({item:b,from:b.max,to:b.end,boxCenter:S,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){b.median&&w(b.med)&&y.push(Ps({item:b,key:"median",position:b.med,width:x,boxCenter:S,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(b.whisker){const e=x*b.whisker.width;w(b.min)&&y.push(Ps({item:b,key:"whisker",position:b.min,width:e,boxCenter:S,rendWidth:c,rendHeight:u,flipXY:r})),w(b.max)&&y.push(Ps({item:b,key:"whisker",position:b.max,width:e,boxCenter:S,rendWidth:c,rendHeight:u,flipXY:r}))}}};function R(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<p;r++)e=b[h[r]],w(e)&&(t<e&&(t=e),n>e&&(n=e));C=t<0&&t!==-Number.MAX_VALUE,E=n>1&&n!==Number.MAX_VALUE,M=C||E}for(let e=0,t=l.length;e<t;e++){y=[],v=null;const t=l[e],n=t.data;let h=null,p=null;void 0!==f.binStart?(h=t.binStart,p=t.binEnd,v=f.binStart.scale):(v=f.major.scale,h=v?t.major:0);let w=0;v?v.bandwidth?(w=v.bandwidth(),h-=w/2):w=p-h:w=1,b=m({},{major:h,majorEnd:p},i.minor.items[e]);for(let t=0;t<_;t++)b[o[t]]=i[o[t]].items[e];if(x=Ns(w,b,d),k=(w-x)/2,S=k+b.major+x/2,R(),M)b.oob&&(C?y.push(Rs({item:b,value:0,boxCenter:S,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):E&&y.push(Rs({item:b,value:1,boxCenter:S,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<D;e++)b[g[e]]&&!1===b[g[e]].show||q[g[e]]();const T={type:"container",data:n,collider:{type:"bounds"},children:y};s.push(T)}return s}({width:n,height:r,flipXY:i,resolved:u,keys:l,symbol:s});return h}};const zs={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},Fs=/px$/,js={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},$s={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function Hs(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function Vs(e,t,n,r){let{width:i,height:o}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=Fs.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);k(a)&&(t=zs,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=js.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=b(b({},l),{},{type:s,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(c.width=t.width);const u=r(c);return u.data=e.data,u}))}const Bs={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:m({},js,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:i}=this.rect,o=m({},$s,this.settings.settings.sizeLimits),a=n.items,s=function(e,t,n,r,i){const o=Hs(e?e.scale:void 0,n),a=Hs(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,r,i,o);return Vs(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const Ws={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function Us(e,t,n,r){let{x:i,y:o,width:a,height:s}=t;const l=te(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,f=d/100;return e.map(((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=f*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const h=l.centroid(e),p=i.offset?function(e,t,n,r){let[i,o]=e;const a=Math.sqrt(i*i+o*o);i/=a,o/=a;const s=n-r;return{x:i*t*s,y:o*t*s}}(h,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(p.x,", ").concat(p.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+p.x,y:c.y+p.y}}},i}))}function Ys(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const Ks={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],i=this.settings.settings,{items:o}=this.resolver.resolve({data:t,defaults:m({},Ws,this.style.slice),settings:i.slice});let a=0;for(let e=0,t=o.length;e<t;e++){const t=Ys(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=le,t=se,n=null,r=I(0),i=I(Y),o=I(0);function a(a){var s,l,c,u,d,f=a.length,h=0,p=new Array(f),m=new Array(f),g=+r.apply(this,arguments),y=Math.min(Y,Math.max(-Y,i.apply(this,arguments)-g)),v=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s<f;++s)(d=m[p[s]=s]=+e(a[s],s,a))>0&&(h+=d);for(null!=t?p.sort((function(e,n){return t(m[e],m[n])})):null!=n&&p.sort((function(e,t){return n(a[e],a[t])})),s=0,c=h?(y-f*b)/h:0;s<f;++s,g=u)l=p[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:v};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:I(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:I(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:I(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:I(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return Us(s(n),m({},this.rect,{x:0,y:0}),r,a)}};const Gs=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class Xs{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[Xs.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=Xs.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&Gs(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function Js(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Xs(...t)}function Zs(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const Qs={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=Js(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,jo(this,"x",this.rect.width),jo(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=m({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=m({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=Zs(this.x,this.rect.width),this.lines.y=Zs(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>m(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function el(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function tl(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(i?t+n:t-n," Z\n ")}function nl(e,t,n){return e<t||e>n}function rl(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function il(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function ol(e){var t,n;let{chart:r,blueprint:i,renderer:o,p:a,settings:s,items:l,slopeLine:c}=e,u=!0,d=!1,f=!1,h=!1,p=!1,g=m(!0,{},s.style.line,a.line||{}),y=m(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:g.stroke});if(d=c?i.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:g.stroke||"black",strokeWidth:g.strokeWidth||1,strokeDasharray:g.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):i.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:g.stroke||"black",strokeWidth:g.strokeWidth||1,strokeDasharray:g.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=m(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:g.stroke},a.label);let t,n={width:0,height:0},c="";t=rl(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=o.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=o.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),y={width:d.width+n.width,height:Math.max(d.height,n.height)},v=e.padding,b=il(a.flipXY?e.vAlign:e.align),x=il(a.flipXY?e.align:e.vAlign),w=Math.min(1+y.width+2*v,e.maxWidth*i.width,e.maxWidthPx),k=y.height+2*v,S=a.flipXY?k:w,C=a.flipXY?w:k;if(f=i.processItem({fn:t=>{let{width:n,height:r}=t,o=a.position*n-(a.flipXY?k:w)*(1-b);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(x*r-C*x),0),width:a.flipXY?S:Math.min(S,i.width-o),height:C,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),f.x<-1||f.x+f.width>i.width+1||f.y<-1||f.y+f.height>i.height+1)f=void 0;else{h={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+v,y:f.y+f.height/2+y.height/3,maxWidth:f.width-2*v-n.width,anchor:"start"},c&&(p={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:h.x+3+(f.width-(n.width+2*v)),y:h.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?Aa(f,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&za(f,t)&&(u=!1)}}}if(d&&l.push(d),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var v,b,x;let e,t;const n=120;let s=!1!==(null===(v=c.label)||void 0===v?void 0:v.show)?null===(b=c.label)||void 0===b?void 0:b.text:"";if(!1!==(null===(x=c.label)||void 0===x?void 0:x.showValue)){var w;const t=rl(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(w=c.label)&&void 0!==w&&w.text?" ".concat(e):e}if(s.length>1){var k,S,C;const e=o.measureText({text:s,fontFamily:y.fontFamily,fontSize:y.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.min()*t+n>=i.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r((i.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?y.padding:3*y.padding,f=void 0!==a||c.slope>0?3*y.padding:y.padding,h=function(e,t,n,r,i,o){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*o.padding:2*o.padding,e.isRtl,n*i.width+a;if(1===n)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding);if(n>.8)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding)}else if(e.slope>0)return t.x2-(r.width+2*o.padding);return e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(c,d,a,e,i,y),p=Math.min(d.y1,d.y2);null!==(k=c.label)&&void 0!==k&&k.stroke&&(t={type:"rect",x:c.isRtl?Math.max(h,u)-2:Math.max(h,u)+2,y:Math.abs(Math.max(p,f)-e.height),rx:3,ry:3,width:e.width+y.padding,height:e.height-2,stroke:g.stroke,fill:g.stroke});const m={type:"text",text:s,fill:null!==(S=null===(C=c.label)||void 0===C?void 0:C.stroke)&&void 0!==S?S:g.stroke,opacity:y.opacity,fontFamily:y.fontFamily,fontSize:y.fontSize,x:t?t.x+2:Math.max(h,u)+2,y:t?t.y+e.height-y.padding:Math.abs(Math.max(p,f)-y.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,i){for(let o=0,a=e.length;o<a;o++){const a=e[o];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+i)return!0}return!1})(l,m,e,u,f)||(t&&l.push(t),l.push(m))}}u&&f&&h&&(l.push(f,h),p&&l.push(p))}function al(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function sl(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function ll(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function cl(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const ul={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=Js(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(sl).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=ll(t,e.value);return m(e,{scale:t,position:n})}return m(e,{position:e.value})})),this.lines.y=this.lines.y.filter(sl).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=ll(t,e.value);return m(e,{scale:t,position:n,flipXY:!0})}return m(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(al(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(al(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max(),s=n.min(),l=n.max();i=b(b({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=o*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,f=(l-r.value)/r.slope;let h=[];nl(c,s,l)||(h[0]={x:ll(e,o),y:ll(n,c)}),nl(d,o,a)||(h[1]={x:ll(e,d),y:1}),nl(u,s,l)||(h[2]={x:ll(e,a),y:ll(n,u)}),nl(f,o,a)||(h[3]={x:ll(e,f),y:0});if(h.filter((e=>!!e)).length>2&&function(e){cl(e[0],e[1])&&(e[1]=void 0),cl(e[1],e[2])&&(e[2]=void 0),cl(e[2],e[3])&&(e[3]=void 0),cl(e[3],e[0])&&(e[3]=void 0)}(h),h=h.filter((e=>!!e)),h.length<2)return void t["y".concat(c>l?0:1)].push(al(r));i.x1=h[0].x,i.y1=h[0].y,i.x2=h[1].x,i.y2=h[1].y}else i=void 0;ol({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:i}=e;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:r,height:i}=t,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:el(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,f=u.cy||u.y;const h=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),p=h.reduce(((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t)),"");let m={type:"text",text:s.length||"",title:p,x:d-.4*a.width,y:f+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:tl(d,f,a.width,c),x:d,y:f,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function dl(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){m(e,t.style)}(t,e),t}function fl(e){return"string"==typeof e||"number"==typeof e?e:"-"}function hl(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map((e=>la(e,r,{x:t.x,y:t.y}))),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},f=r>=0?[u,d]:[d,u];c.push(...f),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function pl(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function ml(e,t){var n,r;const i={type:"text",text:fl(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+pl(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+pl(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),hl(e,i,t),i}function gl(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){m(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function yl(e){return!e.isMinor&&e.position>=0&&e.position<=1}function vl(e){let{rect:t,state:n,majorTicks:r,measure:i,horizontal:o}=e;return o?function(e){let{majorTicks:t,measureText:n,rect:r,state:i}=e;const o="layered"===i.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(o*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const i=r.height,o=n("M").height;return!(t.length<2)&&i*Math.abs(t[0].position-t[1].position)<o}({majorTicks:r,measureText:i,rect:t})}function bl(e){let{value:t,maxValue:n,minValue:r,range:i,modifier:o}=e;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function xl(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,f="top"===e||"bottom"===e,h=f?n.inner.width:n.inner.height,p=o.ticks({settings:a,distance:h,formatter:r}).filter(yl),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=bl({value:t.width,maxValue:u,minValue:d}),t};if(t&&f&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:i,settings:o}=e;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,f=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(f=s*u*Math.abs(r.start-r.end),o+c>f)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(f=s*u*e,d=n("M").width*l*a,d+c>f)return!0}return!1}({majorTicks:p,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&vl({rect:n.inner,state:s,majorTicks:p,measure:m,horizontal:f})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>bl({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=f?e=>e.height:e=>bl({value:e.width,maxValue:u,minValue:d});if(f&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=p.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const v=y.map(m),b=v.map(g),x=Math.max(...b,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=p[r]?p[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...v.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:i,angle:o}=e;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:p,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const wl=(e,t,n)=>e.width*Math.abs(t.position-n.position);function kl(e){let{layered:t,major:n,innerRect:r,outerRect:i,tick:o,index:a}=e;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?wl(r,o,l)/2-2:1/0,d=c?wl(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:i}=e;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:i}=e;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function Sl(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,i=r+e.style.strokeWidth,o={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:i}},ticks:[]};return function(e,t){m(e,t.style)}(o,e),o}function Cl(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function El(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o;let c=a-e.position*l;c-=Math.PI/2;const u=Cl(r.cx,r.cy,i+s,c),d=Cl(r.cx,r.cy,i,c),f={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=b({},t.style);m(e,n)}(f,t),f}function Ml(e){return"string"==typeof e||"number"==typeof e?e:"-"}function _l(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function Dl(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:o+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const f=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,i+s+6,u);let h;h="left"===d?"end":"right"===d?"start":"middle";const p={type:"text",text:Ml(e.label),align:d,x:f.x,y:f.y,maxHeight:t.maxHeight,maxWidth:_l(t,d,f),anchor:h,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(p,t),function(e,t){e.boundingRect=t.textBounds(e)}(p,t),function(e,t,n){let r,i;const o=parseFloat(n.fontSize)||0;r=t.y-o/2,i=e.innerRect.height-(t.y+o/2),(r<0||i<0)&&(n.text="")}(t,f,p),p}function ql(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function Rl(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function Tl(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=ql(e)+e.labels.margin,t}function Ol(e,t){return e.map((e=>gl(e,t)))}function Pl(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function Nl(e){let{textMetrics:t,settings:n,innerRect:r,scale:i,tilted:o,layered:a,tick:s}=e;const l=t.height,c=Pl(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-Tl(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-Tl(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=bl({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function Al(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:i,tilted:o,layered:a,tick:s,index:l,major:c}=e;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-Tl(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-Tl(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=kl({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=bl({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function Il(e){let t;function n(){return t=Al,n}function r(){return t=Nl,r}function i(e){let{settings:n,scale:r,innerRect:i,outerRect:o,measureText:a,ticks:s,state:l,textBounds:c}=e;const u=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),f=function(e){return e.filter((e=>e.isMinor))}(s),h={innerRect:i,align:n.align,outerRect:o},p="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(h.startAngle=n.arc.startAngle,h.endAngle=n.arc.endAngle,h.radius=n.arc.radius),n.line.show&&(h.style=n.line,h.padding=n.paddingStart,n.arc?u.push(Sl(h)):u.push(dl(h))),n.ticks.show&&(h.style=n.ticks,h.tickSize=n.ticks.tickSize,h.padding=ql(n),n.arc?(h.padding=Rl(n),g=function(e,t){return e.map((e=>El(e,t)))}(d,h)):g=Ol(d,h)),n.labels.show){const e=Tl(n);h.style=n.labels,h.padding=e,h.tilted=p,h.layered=m,h.angle=n.labels.tiltAngle,h.paddingEnd=n.paddingEnd,h.textBounds=c;const s=(e,s)=>{h.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:h.style});const l=t({textMetrics:h.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:p,layered:m,tick:e,major:d,index:s});h.maxWidth=l.width,h.maxHeight=l.height,h.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:i}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*Pl(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(h.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=Rl(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=Dl(e,t);return i.data=e.data,i}))}(d,h,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const i=ml(e,t);return i.data=e.data,i}))}(d,h,s):function(e,t,n,r){const i=t.padding,o=Tl(n);return e.map(((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=ml(e,t);return l.data=e.data,l}))}(d,h,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>Aa(q(1,e[t].boundingRect),q(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(l,g,h),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&f.length>0&&(h.style=n.minorTicks,h.tickSize=n.minorTicks.tickSize,h.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...Ol(f,h))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const Ll={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},zl={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const Fl={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const i=m(!0,{},t.isDiscrete?Ll:zl,n),o=m(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=o;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=Il(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=$o(r,i);const o=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const{size:c,edgeBleed:u,isToLarge:d}=xl({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s});if(l+=c,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=m({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return m(this.state.innerRect,r),m(this.state.outerRect,i),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=$o(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),Gs.multiple(t),t}};const jl={render:()=>[]};function $l(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function Hl(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const Vl={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=$l(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:i,measureText:o,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:Hl(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};m(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(m(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=$l(t,n,this.scale)}};function Bl(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function Wl(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const Ul={require:["chart","renderer"],on:{panStart(e){const t=Wl(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=Bl(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=Wl(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=Wl(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=Wl(e,this.renderer);Bl(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function Yl(e){let{h:t,isVertical:n,value:r,pos:i,align:o,borderHit:a,state:s,idx:l}=e;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,f="100%",h="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(f="".concat(s.targetRect.x+s.targetRect.width,"px"),h="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,f="".concat(s.rect.width-d,"px"),h="".concat(s.rect.height-d,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:i,"px"),top:"".concat(n?i:d,"px"),height:n?"".concat(a,"px"):h,width:n?f:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:m({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function Kl(e){let{h:t,isVertical:n,label:r,otherValue:i,rangeIdx:o,idx:a,pos:s,align:l,state:c,value:u}=e;const d="end"!==l,f="outside"===c.settings.bubbles.placement;let h,p="none";n?(h=d?"left":"right",f&&(p=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(h=d?"top":"bottom",f&&(p=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const v=m?t("input",{type:"text",value:u,style:b(b({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[h]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:p}},[v])}function Gl(e){let{h:t,isVertical:n,top:r,height:i,color:o,on:a,opacity:s}=e;return t("div",m({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function Xl(e){let{borderHit:t,els:n,isVertical:r,state:i,vStart:o,vEnd:a,idx:s}=e,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,f=Math.abs(u-d),h=Math.min(u,d)+l,p=h+f;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),f={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(f.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[Gl(f)]))}const m=u<d?o:a,g=u<d?a:o,[y,v]=c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],b=m+1e-5>=y&&m-1e-5<=v,x=g-1e-5<=v&&g+1e-5>=y;b&&n.push(Yl({h:i.h,isVertical:r,borderHit:t,value:m,pos:h,align:"start",state:i,idx:s})),x&&n.push(Yl({h:i.h,isVertical:r,borderHit:t,value:g,pos:p,align:"end",state:i,idx:s}));const w=i.settings.bubbles;if(w&&w.show){w.fontSize,w.fontFamily,w.fill;const e=[o,a];b&&n.push(Kl({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,e)),pos:h,state:i})),x&&n.push(Kl({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(i.format(g,e)),pos:p,state:i}))}}function Jl(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function Zl(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,i)=>{e.active&&i===e.active.idx||Xl({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})})),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=Jl(e);r=e.active.start+t,i=e.active.end+t}Xl({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function Ql(e){return{min:e.scale.min(),max:e.scale.max()}}function ec(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function tc(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function nc(e){e.renderer.render(Zl(e))}function rc(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}function ic(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function oc(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function ac(e){const t=e.reduce(((e,t)=>(e.push(...E(t.bounds)),e)),[]);return M(t)}const sc={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=rc(this.state,this.state.brushInstance),this.state.active=null,nc(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=$o(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=ac(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=$o(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=ac(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map((e=>({min:e.min,max:e.max})));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=b({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)}))}(this.state,e,t,n),this.emit("bubbleEnd"),nc(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,nc(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=Vi(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>oc(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(ic(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=Do(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach((e=>{if(!oc(r,[e.min,e.max]))return;const o=n.indexOf(ic(e.min,t)),a=n.indexOf(ic(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))})),i}(e,i);return this.state.ranges=rc(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Zl(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=m({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(h/t.size),c.start=t.scale.normInvert(f/t.size);let p=t.ranges;const g=Ql(t);let y,v,b=-1;if(l&&l.hasAttribute("data-idx"))b=parseInt(l.getAttribute("data-idx"),10),g.min=b>0?p[b-1].max:g.min,g.max=b+1<p.length?p[b+1].min:g.max;else{for(y=0;y<p.length;y++){if(p[y].min<=c.start&&c.start<=p[y].max){b=y,g.min=y?p[y-1].max:g.min,g.max=y+1<p.length?p[y+1].min:g.max;break}if(c.start<p[y].min){g.max=p[y].min,g.min=y?p[y-1].max:g.min;break}}-1===b&&p.length&&y>=p.length&&(g.min=p[p.length-1].max)}if(-1!==b||t.multi||(c.ranges=[],g.min=t.scale.min(),g.max=t.scale.max()),-1!==b)if(v={idx:b,start:p[b].min,end:p[b].max,limitLow:g.min,limitHigh:g.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),v.mode="modify";else{let e=t.scale.norm(v.start)*t.size,n=t.scale.norm(v.end)*t.size;Math.abs(f-e)<=o?(c.start=v.end,v.mode="modify"):Math.abs(f-n)<=o&&(c.start=v.start,v.mode="modify")}else v={idx:-1,start:c.start,end:c.current,limitLow:g.min,limitHigh:g.max,mode:"current"};c.active=v,"modify"!==v.mode&&t.targetRect&&!La(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:rc,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=Ql(e);tc(e,e.current,n)}(this.state,rc),nc(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=Jl(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=rc(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter((e=>-1===i.indexOf(e))),s=i.filter((e=>-1===o.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),c=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),nc(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;nc(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function lc(e){e.renderer.render(Zl(e))}function cc(e){return e.rc.ranges()}function uc(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const dc={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=o[0]?o.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=go(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let p=h,m=f;c.start=f,c.current=h;let g=t.ranges;const y=ec(t);let v,b,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(v=0;v<g.length;v++){if(g[v].min<=m&&m<=g[v].max){x=v,y.min=v?g[v-1].max:y.min,y.max=v+1<g.length?g[v+1].min:y.max;break}if(m<g[v].min){y.max=g[v].min,y.min=v?g[v-1].max:y.min;break}}-1===x&&g.length&&v>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(b={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),b.mode="modify";else{let e=b.start,t=b.end;Math.abs(f-e)<=o?(c.start=b.end,b.mode="modify"):Math.abs(f-t)<=o&&(c.start=b.start,b.mode="modify")}else b={idx:-1,start:m,end:p,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=b,"modify"!==b.mode&&t.targetRect&&!La(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:cc,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=ec(e);tc(e,e.current,n)}(this.state,cc),lc(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=Jl(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...uc(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),lc(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function fc(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),i=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return i?i.brush.ranges():[]}(e).map((i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function hc(e,t,n,r){function i(){!function(e){e.renderer.render(fc(e))}(e)}function o(){!function(e){e.renderer.render(fc(e))}(e)}function a(){!function(e){e.renderer.render(fc(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function pc(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const mc={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=$o(this.chart.scale(e.scale),r);return pc(this.state),hc(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,fc(this.state)},beforeDestroy(){pc(this.state)}};function gc(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function yc(e,t,n){return oa(e,t.points[0])<n.settings.snapIndicator.threshold**2}function vc(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function bc(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function xc(e,t){e.snapIndicator.visible=t}const wc={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})));const n=gc(this.state.rendererBounds,e);vc(this.state,n),bc({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=gc(this.state.rendererBounds,e);yc(t,this.state,this.settings)?xc(this.state,!0):xc(this.state,!1),vc(this.state,t),bc({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;xc(this.state,!1);yc(gc(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map((e=>({x:e.x+n,y:e.y+r}))),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){this.state.active&&(!function(e,t){e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))}))}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function kc(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function Sc(e){let{orientation:t,targetNodes:n,labels:r,container:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kc;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:f}=r[t];if(d[s]<i[s]||d[s]+d[l]>i[s]+i[l])return!1;for(let e=o(d,a,s,l,c);e<a.length;e++)if(Aa(d,a[e].textBounds))return!1;const h=o(d,n,s,l,u),p=d[s]+d[l];for(let e=h;e<n.length;e++){const t=n[e].node;if(p<t.localBounds[s])break;if(Aa(d,t.localBounds)&&f!==t)return!1}return a.push(r[t]),!0}}const Cc=4;function Ec(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Mc(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function _c(e){return b(b({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function Dc(e,t,n){return n?e.width>=t.height:e.width>=t.width}function qc(e,t,n){return n?e.height>=t.width:e.height>=t.height}function Rc(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||Dc(t,n,!0),a=qc(t,n,!r)):(o=Dc(t,n),a=i||qc(t,n,!1)),o&&a}function Tc(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function Oc(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return Dc(e,t,n.rotate)&&qc(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=Tc(e.x,e.width,i.height,n.align)+o,r.y=Tc(e.y,e.height,i.width,n.justify),r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=Tc(e.x,e.width,i.width,n.align),r.y=Tc(e.y,e.height,i.height,n.justify)+o),r}function Pc(e){let{bar:t,view:n,direction:r,position:i,padding:o=Cc,measured:a}=e;const s={};if(m(s,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(s.y=0,s.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(s.y=o,s.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(s.x=0,s.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(s.x=o,s.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(s,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:r=Cc,bottom:i=Cc,left:o=Cc,right:a=Cc}=n,s="function"==typeof o?o(t):o,l="function"==typeof a?a(t):a,c="function"==typeof r?r(t):r,u="function"==typeof i?i(t):i;e.x+=s,e.width-=s+l,e.y+=c,e.height-=c+u}(s,a,o),s}function Nc(e){let t,n,r,i,o,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:f}=e,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pc;const p=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=h({bar:c.localBounds,view:f,direction:a,position:r.position,padding:r.padding,measured:l}),p.push(i),t=!o||i[m]>t[m]?i:t,Rc(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=p.indexOf(n)),r=d[o],{bounds:n,placement:r}}function Ac(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=Cc,bottom:a=Cc,left:s=Cc,right:l=Cc}=i,c="function"==typeof s?s(t):s,u="function"==typeof l?l(t):l,d="function"==typeof o?o(t):o,f="function"==typeof a?a(t):a,h=e.x+e.dx,p=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,v=1e-9;return{x:(n?h-y:h)-c-v,y:(n?p:p-y)-d-v,width:g+(c+u)-v,height:m+(d+f)-v}}function Ic(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:i,collectiveOrientation:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nc,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Oc,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Sc;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,f,h,p,m,g,y,v,x,w,k,S,C,E;for(let e=0,l=n.length;e<l;e++){g=null,f=n[e],h=f.node,C=Ec(h,t),x=f.direction,E="left"===x||"right"===x?"h":"v";for(let t=0;t<f.texts.length;t++){if(p=f.texts[t],!Mc(p))continue;w=f.labelSettings[t],v=f.measurements[t],S=w.placements;const n=a({direction:x,fitsHorizontally:i,lblStngs:w,measured:v,node:h,orientation:E,placements:S,placementSettings:f.placementSettings[t],rect:r});if(g=n.bounds,k=n.placement,g&&k){m=k.justify;const t="function"==typeof w.linkData?w.linkData(C,e):void 0,n="function"==typeof k.overflow?k.overflow(C,e):k.overflow;"up"===x&&(m=1-m),"opposite"===k.position&&(m=1-m),"left"===x&&(m=1-m);const r=!("h"===o||i);if(d=s(g,p,{justify:"h"===E?k.align:m,align:"h"===E?m:k.align,fontSize:w.fontSize,fontFamily:w.fontFamily,textMetrics:v,rotate:r,overflow:!!n}),d){const n=Ac(d,v,r,g,k.padding);y="function"==typeof k.fill?k.fill(b(b({},C),{},{textBounds:n}),e):k.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof k.background&&(d.backgroundColor="function"==typeof k.background.fill?k.background.fill(b(b({},C),{},{textBounds:n}),e):k.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=Ac(d,v,r,g,k.background.padding))),c.push(d),u.labels.push({node:h,textBounds:n})}}}}const M=c.filter(l(u)),_=M.filter((e=>void 0!==e.backgroundBounds)).map(_c);return[..._,...M]}function Lc(e){const t=2*Math.PI;return(e%t+t)%t}function zc(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function Fc(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function jc(e,t,n){let{x:r,y:i}=t;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function $c(e){let t,n,{radius:r,size:i,angle:o}=e,{width:a,height:s}=i,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=jc(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=jc(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=jc(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=jc(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function Hc(e){let{slice:t,measured:n,padding:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=Lc((i+o)/2);let d=s-r,f={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(f.angle=u-Math.PI/2,f.anchor="end"):(f.angle=u+Math.PI/2,f.anchor="start"),f}function Vc(e){let{context:t,node:n,bounds:r}=e;let{start:i,end:o}=n.desc.slice;const a=Lc((i+o)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function Bc(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Wc(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function Uc(e){let t,n,{slice:r,direction:i,position:o,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:f,innerRadius:h,offset:p}=r;switch(o){case"into":t="rotate"===i?Hc({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t;const l=Lc((i+o)/2);let c=$c({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",za(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||za(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||qa({cx:0,cy:0,r:a},c)?null:(zc(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:f,innerRadius:0,outerRadius:h},t="rotate"===i?Hc({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:i}=e;const{start:o,end:a,outerRadius:s}=t,l=Lc((o+a)/2);let c=$c({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",zc(c,n),i.insideLabelBounds.some((e=>Aa(e,c)))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let{slice:t,measured:n,padding:r,view:i}=e,{start:o,end:a,outerRadius:s,offset:l}=t,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=Lc((o+a)/2);let f=Math.sin(d)*c,h=-Math.cos(d)*c,p=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=h<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<p&&(p=t)}if(Math.sin(m)>.001){let e=f<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<p&&(p=t)}if(p<=0||p<n.minReqWidth)return null;let g={x:f,y:h,width:p,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:i,context:o}=e,{start:a,end:s,outerRadius:l,offset:c}=t;const u=Lc((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,f=Math.sin(u)*d,h=-Math.cos(u)*d,p=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(f+c.x));e<p&&(p=e)}else{let e=Math.abs(i.x-(f+c.x));e<p&&(p=e)}if(p<n.minReqWidth)return null;let m={x:f,y:h,width:p,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=p.x,t.y+=p.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const{start:r,end:i,offset:o,outerRadius:a}=n,s=Lc((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function Yc(e){let{context:t,direction:n,measured:r,node:i,placementSettings:o,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uc;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function Kc(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const Gc=/\n+|\r+|\r\n/,Xc=/\s/,Jc=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Zc(e){return"string"==typeof e?-1!==e.search(Gc):-1!==String(e).search(Gc)}function Qc(e){return-1!==e.search(Xc)}function eu(e){return-1!==e.search(Jc)}function tu(e,t,n){return Math.max(t,Math.min(n,e))}function nu(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:i=[Zc],noBreakAllowedIdentifiers:o=[],suppressIdentifier:a=[Qc,Zc,e=>""===e],hyphenationIdentifiers:s=[eu]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let d=n?c:-1;function f(e){const t=tu(e,0,c-1),n=l[t],u=r(n),d=function(e,t,n,r,i){return r.some((r=>r(e,t,n)))?1:i.some((r=>r(e,t,n)))?0:2}(n,t,l,i,o);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=tu(e,0,c-1),u(d)?f(d):{done:!0}},peek:f,length:c}}const ru="…",iu=/^\s*\d+(\.\d+)?px\s*$/i;function ou(e){return"string"===typeof e&&iu.test(e)}function au(e){const t=e["font-size"]||e.fontSize;return ou(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function su(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=au(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function lu(e,t){return{lines:[],line:"",width:0,maxLines:su(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function cu(e){e.lines.push(e.line),e.line="",e.width=0}function uu(e,t){e.line+=t.value,e.width+=t.width}function du(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function fu(e,t,n){const r=nu({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?du(e,t,r):t,cu(e),uu(e,t)):uu(e,t)}}function hu(e,t){const n=nu({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=lu(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){cu(r),i=!1;break}1===e.breakOpportunity?cu(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?du(r,e,n):e,cu(r),uu(r,e)):uu(r,e)}return{lines:r.lines,reduced:i}}function pu(e,t){const n=nu({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=lu(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){cu(r),i=!1;break}1===e.breakOpportunity?cu(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?cu(r):e.width>r.maxWidth?fu(r,e,t):(cu(r),uu(r,e)):uu(r,e)}return{lines:r.lines,reduced:i}}function mu(e){return{"break-all":hu,"break-word":pu}[e.wordBreak]}function gu(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=mu(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||Zc(n.text)){const o=(au(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach(((a,s)=>{const l=m({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=ru:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)})),i}(a,n,o,i.height)}}}}function yu(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,i="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:o}=e;if(void 0===o)return i;let a=t({text:i,fontSize:r,fontFamily:n}).width;if(a<=o)return i;let s=0,l=i.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:i.substr(0,e)+ru,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+ru}function vu(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const bu={},xu={},wu={fontSize:void 0,fontFamily:void 0};let ku;function Su(e,t){return!e&&!t||e===t}function Cu(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof xu[o]&&(ku=ku||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;Su(wu.fontWeight,t)&&Su(wu.fontSize,n)&&Su(wu.fontFamily,r)||(ku.font=[t,n,r].filter((e=>!!e)).join(" "),wu.fontWeight=t,wu.fontSize=n,wu.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),xu[o]=ku.measureText(t).width),xu[o]}function Eu(e){return"number"!=typeof bu[e]&&(bu[e]=function(e){if(ou(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),bu[e]}function Mu(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;return{width:Cu({text:t,fontWeight:n,fontSize:r,fontFamily:i}),height:Eu(r)}}function _u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mu;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+vu(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function Du(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mu;const n=mu(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||Zc(e.text))){const o=n(e,(e=>t({text:e,fontFamily:i,fontSize:r}))),a=m({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?ru:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=_u(a,t);return c.height=au(e)*o.lines.length,c}return _u(e,t)}function qu(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Ru(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function Tu(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function Ou(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:i,offset:o}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return Tu({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?Tu(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var Pu={bar:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ic;const l=m({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>m({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>m({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:f,targetNodes:h}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:i,placementSettings:o,settings:a,renderer:s}=e;const l={},c=[];let u,d,f,h,p,m,g,y=!0,v=!1;for(let e=0;e<t.length;e++){if(d=t[e],h=d.localBounds,!Aa(h,n))continue;let b=Ec(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],f="function"==typeof m.label?m.label(b,e):void 0,Mc(f)&&(g="function"==typeof a.direction?a.direction(b,e):a.direction||"up",v=v||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=f,p=s.measureText(l),u.measurements.push(p),u.texts.push(f),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&p.width<=h.width-2*Cc);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:v}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:u}),p=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:f?"h":"v"}),g="h"===p?"y":"x",y="h"===p?"height":"width";return h.sort(((e,t)=>e.node.localBounds[g]+e.node.localBounds[y]-(t.node.localBounds[g]+t.node.localBounds[y]))),s({chart:n,targetNodes:h,stngs:t,rect:i,fitsHorizontally:d,collectiveOrientation:p})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yc,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Wc;const c=m({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>m({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>m({},c,t,e,n))))),f=[],h={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const{start:a,end:s}=e[o].desc.slice,l=Lc((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>Lc((e.desc.slice.start+e.desc.slice.end)/2)-Lc((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const p={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=Bc(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=Kc(c,r,o),v=s({context:p,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:h}),b=v.bounds,x=v.placement;if(b&&x){if("outside"===x.position&&"rotate"!==m){Vc({context:p,node:t,bounds:b});if(!wa(Fc(b),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(b,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),f.push(o),b.line&&(b.line.stroke=n,f.push(b.line)))}}}return f},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:i,style:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ru;const s=m({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=m({},s,t),c=t.labels.map((e=>m({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=qu(t,n),{type:s,bounds:f}=Ou(t);if(!f)continue;let h,p=0,m=[],g=[],y="circle"===s?2*f.r*.9:f.height;for(p+=l.padding,h=0;h<c.length;h++){let t=c[h],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=i.measureText(u);if(p+=r.height+t.padding,p>y)break;g.push(n),m.push(r)}const v=h,b=Math.max(0,y-p);let x;for(x="circle"===s?f.cy-.9*f.r:f.y,x+=l.justify*b+l.padding,h=0;h<v;h++){let t,n=c[h];if("circle"===s){let e=Math.max(Math.abs(x-f.cy),Math.abs(x+m[h].height-f.cy)),n=Math.sqrt(f.r*f.r-e*e);t={x:f.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[h].height}}else t={x:f.x+l.padding,y:x,width:f.width-2*l.padding,height:m[h].height};x+=m[h].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const u="function"==typeof n.linkData?n.linkData(o,e):void 0;let p=a(t,g[h],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[h]});if(p){if(p.text&&p.text!==ru){const e=yu(p,i.measureText);if(ru===e)continue;p.ellipsed=e}void 0!==u&&(p.data=u),d.push(p)}}}return d}};const Nu={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&Pu[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:i,renderer:o,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},Pu[e.strategy.type]))})),t}};const Au={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function Iu(e){let{x:t=0,y:n,item:r,globalMetrics:i,createSymbol:o,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,c=r.symbol.meta;const u="rtl"===a;let d={x:u?t+i.maxLabelBounds.width:t+i.maxSymbolSize+i.spacing,y:n,width:i.maxLabelBounds.width,height:Math.max(i.maxSymbolSize,i.maxLabelBounds.height)},f=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:u?t+i.maxLabelBounds.width+i.spacing:t,y:n,width:i.maxSymbolSize,height:d.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const h=o(m({},c,f));return delete h.collider,s.anchor=u?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[h,s],collider:{type:"rect",x:t,y:n,width:i.maxItemBounds.width,height:i.maxItemBounds.height}},metrics:d}}function Lu(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function zu(e,t){let n,r,i,o,{onScroll:a=()=>{}}=t,s=null,l=0;const c={itemize:t=>{n=function(e,t){let n,r,{resolved:i,dock:o}=e,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,d=0,f=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=m({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),f=Math.max(r.label.bounds.height,f)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,f),width:u+8+d},maxLabelBounds:{width:d,height:f}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,l=c.getContentOverflow(i);const a=c.extent();s=Math.max(0,Math.min(s,l)),o=m({},i);const u="horizontal"===c.orientation()?"x":"y";return o[u]-=s,o["x"===u?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:i,create:o=Iu,parallels:a,createSymbol:s}=n;const l=i.layout.direction,c=i.globalMetrics,u=i.items,d="horizontal"===i.layout.orientation;let f=0;const h=[],p=c.maxItemBounds.height,m=c.maxItemBounds.width,g=i.layout.margin.vertical+p,y=i.layout.margin.horizontal+m;let v=t.x,b=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:b,x:"rtl"===l?r.x+x+r.width-m-(v-t.x):v,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&v>=r.x-m||!d&&b>=r.y-p)&&h.push(n.item),f++,f>=a?(f=0,d?(v+=y,b=t.y):(b+=g,v=t.x)):d?b+=g:v+=y,!d&&b>r.y+r.height)break;if(d&&v>r.x+r.width)break}return h}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return Lu(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,Lu(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===c.orientation()?o.x<i.x:o.y<i.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>Lu(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return c}function Fu(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const ju={up:"▲",right:"▶",down:"▼",left:"◀"};function $u(e,t){let{size:n,isActive:r,direction:i,nav:o,attrs:a}=t,s={},l="";const c=a;o&&o.button&&("function"==typeof o.button.class?s=o.button.class({direction:i}):o.button.class&&(s=o.button.class),"function"==typeof o.button.content&&(l=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(c.tabindex=o.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(u.border="0",u.background="none"),(!r||o&&o.disabled)&&(c.disabled="disabled"),e("button",m({class:Fu(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[ju[i]])])}function Hu(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:i,itemRenderer:o}=t;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const f=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[$u(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),$u(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(f)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function Vu(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=m({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(m({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function Bu(e,t,n,r){let i,o,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const f={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:f.x,y:f.y,width:f.width,height:c.spread()},"horizontal"===n){i={x:f.x,y:f.y,width:c.extent(),height:c.spread()};const e=f.width-i.width-(i.width?t.spacing:0),n=f.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,h=s.spread(),p=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:f.y+Math.max(0,(p-h)/2),width:f.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:f.y,width:r,height:f.height},i.y=o.y;"rtl"===s.direction()&&(a.x=f.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),d=Math.max(i.height,p,s.spread())}else{const e=f.height-i.height-(i.height?t.spacing:0),n=f.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:f.x,y:f.y+f.height-r,width:f.width,height:r},o={x:f.x,y:i.y+i.height+(i.height?t.spacing:0),width:f.width,height:f.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=m({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:m({},e,i),content:m({},e,o),navigation:m({},e,a),orientation:n,preferredSize:d}}function Wu(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const i=e.scale.datum?m({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i}))}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:m(!0,{},Au.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:Au.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:m(!0,{},Au.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=m(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:m(!0,{},Au.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:m(!0,{},{show:Au.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function Uu(e){const{rect:t,settings:n,state:r,itemRenderer:i,navigationRenderer:o,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=Bu(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:m({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},u}const Yu={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=Uu(this);this.update(e)},this.itemRenderer=zu(this,{onScroll:this.onScroll}),this.navigationRenderer=Hu(this),this.titleRenderer=Vu(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Wu(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=Bu(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){Wu(this)},render(){return Uu(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function Ku(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function Gu(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Xu(e){return Gu(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Ju(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function Zu(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map(((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return o}(e,i),a=Gu((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),c=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),u={isVertical:t,nodes:[],title:{anchor:Xu(e.settings),textMetrics:l,textBounds:c,requiredWidth:()=>{if(!n.show)return 0;let e=c.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=c.height;return t&&(e+=n.padding),Math.min(e,u.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...u.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...o.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return u}const Qu={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=Ju(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=Zu(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Zu(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Ju(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return Ku(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Ku(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}}));return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const ed={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function td(e,t){let{generatorType:n,item:r,data:i,major:o,minor:a,layerObj:s,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function nd(e){const{metaLayers:t,coordinates:n,layers:r,lines:i,areas:o}=function(e){let{data:t,stngs:n,rect:r,resolver:i,style:o,domain:a}=e;const{width:s,height:l}=r,c=i.resolve({data:t,defaults:ed.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let f=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:f++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const h=Object.keys(d).map((e=>(d[e].consumableData=b({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),p={items:h.map((e=>e.consumableData))},g=n.layers||{};return{coordinates:c,metaLayers:h,layers:i.resolve({data:p,defaults:{curve:ed.layers.curve,show:ed.layers.show},settings:{curve:g.curve,show:g.show}}),lines:i.resolve({data:p,defaults:m({},ed.layers.line,o.line),settings:g.line}),areas:i.resolve({data:p,defaults:m({},ed.layers.area,o.area),settings:g.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,f;for(let r=0;r<t.items.length;r++){if(d=t.items[r],f=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(f.minor0?f.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const h=c.sort(((e,t)=>e-t))[Math.floor((c.length-1)/2)];a.push({layerObj:l,lineObj:i.items[s],areaObj:o.items[s],median:h,points:u,consumableData:t.consumableData})})),a}const rd={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const i=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=nd({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:i,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=o.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));o.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else o.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:i,stngs:o}=t;const a=[],s=o.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let d={size:r,p:"y"},f={size:n,p:"x"};if("vertical"===o.orientation){const e=m(!0,{},f);f=m(!0,{},d),d=m(!0,{},e)}s.area&&!1!==c.show&&a.push(td(u,{data:e.consumableData,item:c,generatorType:"area",major:f,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(td(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:f,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(td(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:f,minor:d,layerObj:l,stngs:o},"none")))})),a}(o,{width:n,height:r,missingMinor0:i,stngs:this.stngs})}};function id(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function od(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function ad(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const sd={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=id(this,e,!1);La({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"}))),this.state.start=id(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=id(this,e),function(e){if(e.state.active){const t=od(e,e.state.start),n=od(e,e.state.end),r=e.chart.shapesAt(ad(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([m({type:"rect"},ad(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){this.state.active&&(!function(e,t){e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))}))}(this.state,this.chart),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function ld(e,t,n){let{renderer:r,style:i,props:o,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:Fu(m({"pic-tooltip":!0},s.tooltip)),style:m({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:Fu(m({"pic-tooltip-content":!0},s.content))},l),a("div",{class:Fu(m({"pic-tooltip-arrow":!0},s.arrow)),style:m({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function cd(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),o=!0,r=null,a.set("active")}),c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function ud(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function dd(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function fd(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function hd(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function pd(e){let{area:t,vx:n,vy:r,width:i,height:o,offset:a}=e;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,f=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,f+=l+u>t.height?-(l+u-t.height):0,{x:d,y:f}}function md(e){let{options:t,pointer:n,width:r,height:i,dockOrder:o,x:a,y:s}=e;const{targetBounds:l}=n,c=ud(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:fd(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},f=dd(r,i,t.offset),h=[],p="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=pd({area:d,vx:p,vy:m,width:r,height:i,offset:f[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=fd(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,h.push(y)}return h.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),h[0]}function gd(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return m({scaleRatio:i.scaleRatio},i.computedInner)}const yd={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:i,height:o,options:a}=e;const{targetBounds:s}=r,{x:l,y:c,width:u,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),f={left:{x:l,y:c+d/2},right:{x:l+u,y:c+d/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+d},inside:{x:l+u/2,y:c+d/2}},h=ud(a.offset),p=h[a.dock];if(p)return{computedTooltipStyle:{left:"".concat(f[a.dock].x,"px"),top:"".concat(f[a.dock].y,"px"),transform:p},computedArrowStyle:fd(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=dd(i,o,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(hd(m,"target"===a.area?f[t].x:s.left+f[t].x,"target"===a.area?f[t].y:s.top+f[t].y,i,o,g[t]))return{computedTooltipStyle:{left:"".concat(f[t].x,"px"),top:"".concat(f[t].y,"px"),transform:h[t]},computedArrowStyle:fd(a.offset)[t],dock:t}}const v=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:i,area:o,width:a}=e;const s="top",l="target"===t.area?n[s].x:i.left+n[s].x,c=("target"===t.area?n[s].y:(i.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let f=n.top.x;return u<0&&u+d>o.width||(u<0?f-=u:u+d>o.width&&(f-=u+d-o.width)),f}({options:a,docks:f,dockOffsets:g,targetBounds:s,area:m,width:i});return{computedTooltipStyle:{left:"".concat(v,"px"),top:"".concat(f.top.y,"px"),transform:h.top},computedArrowStyle:fd(a.offset+v-f.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:i}=e;const{x:o,y:a}=n;return md({x:o,y:a,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:i,nodes:o,resources:a}=e;const s=o[0],{dx:l,dy:c}=n,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,f=c+u.y+u.height/2,{start:h,end:p,outerRadius:m}=s.desc.slice,g=(h+p)/2-Math.PI/2,y=2*Math.PI,v=(g%y+y)%y;let b=["top","left","right","bottom"];return"auto"===t.dock&&(b=v<=Math.PI/4||v>=7*Math.PI/4?["right","top","bottom","left"]:v<=3*Math.PI/4?["bottom","left","right","top"]:v<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),md({x:d+m*u.scaleRatio.x*Math.cos(v),y:f+m*u.scaleRatio.y*Math.sin(v),pointer:n,width:r,height:i,options:t,dockOrder:b})}};function vd(e,t){let{width:n,height:r}=e,{chart:i,state:o,props:a}=t;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>gd(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=gd(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=m(c,a.placement(s))),"object"===l&&yd[a.placement.type]?c=m(c,a.placement):"string"===l&&yd[a.placement]&&(c=m(c,{type:a.placement})),s.options=c;const u=yd[c.type](s);let{x:d,y:f,width:h,height:p}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,h+=d,f+=s.pointer.dy,p+=f,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),h),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,f,parseFloat(u.computedTooltipStyle.top)),p),"px"),u}let bd;function xd(){bd=null}const wd={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const kd={require:["chart","renderer"],defaultSettings:{settings:wd,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,f=i-a.left,h=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:f,cy:h,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,i)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=cd({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){bd&&bd!==e&&bd()}(t),bd=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,m({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,m({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),bd===t&&(bd=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),xd()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),xd()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:i,h:o}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach((e=>{if("function"==typeof i.extract){const t=m({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=vd(ld(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=ld(t,n,this)}};const Sd={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var Cd={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Ed=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Md=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function _d(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(Ed,((e,n,r)=>{const i=function(e){const t=e.match(Md);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<Cd[o])return"";for(t.push([a,...i.splice(0,Cd[o])]);i.length>=Cd[o]&&i.length&&Cd[o];)t.push([a,...i.splice(0,Cd[o])]);return""})),t}const Dd=2*Math.PI;function qd(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function Rd(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function Td(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=qd(e,t),s=qd(t,n),l=qd(n,r),c={x:Rd(.5,e.x,t.x,n.x,r.x),y:Rd(.5,e.y,t.y,n.y,r.y)},u=qd(a,s),d=qd(s,l);return Td(e,a,u,c,i,o-1),Td(c,d,l,r,i,o-1),i}function Od(e,t,n){const{cp1:r,cp2:i}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return Td(e,r,i,n)}function Pd(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],f=e[7],h=e[1],p=e[2];if("a"===e[0]&&(d+=t,f+=n),t===f&&n===f)return r;if(!h||!p)return r.push({x:d,y:f}),r;({cx:s,cy:l,rx:h,ry:p,sweepAngle:c,startAngle:u}=function(e,t,n,r,i,o,a,s,l){let c,u,d,f,h,p;const m=Zo(n%360),g=Math.cos(m),y=Math.sin(m),v=(s-o)/2,b=(l-a)/2,x=g*v+y*b,w=g*b-y*v;p=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,p>1&&(p=Math.sqrt(p),e*=p,t*=p);const k=e*w,S=t*x,C=k**2+S**2,E=(e*t)**2-C;let M=Math.sqrt(Math.max(E/C,0));r===i&&(M=-M);const _=M*(k/t),D=M*(-S/e);f=g*_-y*D+(s+o)/2,h=y*_+g*D+(l+a)/2;const q=(x-_)/e,R=(w-D)/t,T=(-x-_)/e,O=(-w-D)/t;return c=Math.atan2(R,q),c+=c<0?Dd:0,u=Math.atan2(O,T),u+=u<0?Dd:0,d=u-c,!i&&c<u?d-=Dd:i&&u<c&&(d+=Dd),d%=Dd,{startAngle:c,sweepAngle:d,cx:f,cy:h,rx:e,ry:t}}(h,p,a,i,o,d,f,t,n));const m=Math.abs(c*Math.sqrt((h**2+p**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%Dd,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*h+-i*n,y:l+i*p+n*i})}return r}function Nd(e){const t=_d(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(...Pd(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...Pd(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...Td({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...Td({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...Td({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...Td({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...Od({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...Od({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...Od({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...Od({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const Ad={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{Nd(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var Id=[function(e){e.component("box",Ls),e.component("box-marker",Ls)},function(e){e.component("point",Bs),e.component("point-marker",Bs)},function(e){e.component("pie",Ks)},function(e){e.component("grid-line",Qs)},function(e){e.component("ref-line",ul)},function(e){e.component("axis",Fl)},function(e){e.component("container",jl)},function(e){e.component("text",Vl)},function(e){e.component("scrollbar",Ul)},function(e){e.component("brush-range",sc),e.component("brush-area-dir",dc)},function(e){e.component("range",mc)},function(e){e.component("brush-lasso",wc)},function(e){e.component("labels",Nu)},function(e){e.component("legend-cat",Yu)},function(e){e.component("legend-seq",Qu)},function(e){e.component("line",rd)},function(e){e.component("brush-area",sd)},function(e){e.component("tooltip",kd)},function(e){e.component("debug-collider",Sd)},function(e){e.component("debug-path-to-points",Ad)}];let Ld=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}};class zd{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:i,minHeight:o})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,i)):(this.x=e+Math.min(n,-i),this.width=-Math.min(n,-i)),r>=0?(this.y=t,this.height=Math.max(r,o)):(this.y=t+Math.min(r,-o),this.height=-Math.min(r,-o))}containsPoint(e){return La(this,e)}intersectsLine(e){return za(this,_(e))}intersectsRect(e){return Aa(this,M(e))}intersectsCircle(e){return qa(e,this)}intersectsPolygon(e){return Na(e,this)}intersectsGeoPolygon(e){return Ua(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class Fd{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return Da(this,e)}intersectsLine(e){return Ra(this,_(e))}intersectsRect(e){return qa(this,M(e))}intersectsCircle(e){return n=e,!Ca(t=this)&&!Ca(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return Ta(this,e)}intersectsGeoPolygon(e){return Va(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class jd{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:i})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(i)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return Ra({cx:e.x,cy:e.y,r:this.tolerance},this)}return ja(this,e)}intersectsLine(e){return Fa(this,_(e))}intersectsRect(e){return za(M(e),this)}intersectsCircle(e){return Ra(e,this)}intersectsPolygon(e){return Pa(e,this)}intersectsGeoPolygon(e){return Wa(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class $d{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return Oa(this,e)}intersectsCircle(e){return Ta(e,this)}intersectsLine(e){return Pa(this,_(e))}intersectsRect(e){return Na(this,M(e))}intersectsPolygon(e){return $a(this,e)}intersectsGeoPolygon(e){return Ha(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Hd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new $d(...t)}function Vd(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function Bd(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class Wd{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)Bd(this.vertices[e]),this.vertices[e].length>2&&Vd(this.vertices[e]),this.polygons[e]=Hd({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return Ba(this,e)}intersectsCircle(e){return Va(e,this)}intersectsLine(e){return Wa(this,_(e))}intersectsRect(e){return Ua(this,M(e))}intersectsPolygon(e){return Ha(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!Aa(n,r)&&(Ia(r,n)?_a(t,e):_a(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function Ud(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Wd(...t)}class Yd{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>ja(t,e)))}intersectsCircle(e){return this.segments.some((t=>Ra(e,t)))}intersectsLine(e){const t=_(e);return this.segments.some((e=>Fa(e,t)))}intersectsRect(e){const t=M(e);return this.segments.some((e=>za(t,e)))}intersectsPolygon(e){return this.segments.some((t=>Pa(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>Wa(e,t)))}points(){return this._points}}const Kd=Oe();function Gd(e,t){return Kd.get(e)(t)}Kd.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new zd(...t)})),Kd.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Fd(...t)})),Kd.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new jd(...t)})),Kd.add("polygon",Hd),Kd.add("geopolygon",Ud),Kd.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Yd(...t)}));class Xd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=Gd(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class Jd{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new Jd).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof Jd&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const Zd=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Qd(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function ef(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function tf(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function nf(e,t){t.args.length>=6&&e.transform(...t.args)}function rf(e,t){const n=function(e){let t,n=[];for(;null!==(t=Zd.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?Qd(t,r):"scale"===r.cmd?ef(t,r):"matrix"===r.cmd?nf(t,r):"translate"===r.cmd&&tf(t,r)}const of={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},af={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function sf(e,t){if(!t||!t.length||!e||"function"!=typeof af[e.type])return[];switch(e.type){case"type":case"tag":return af[e.type](e.value,t);case"attr":return af[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return af[e.type](t);default:return[]}}var lf={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{i=e.match(of[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(of).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););})),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=sf(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function cf(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every((e=>Array.isArray(e)))?i.map((e=>n.transformPoints(e))):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=M(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=_(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:Xo(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=Xo(i[t],!0);o={type:"path",d:e}}return o}class uf{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:i,height:o}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:i,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>cf(e,t,n)))}:cf(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new uf(e))),this._parent=()=>e.parent?new uf(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();i-=t,o-=n}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function df(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new uf(...t)}class ff{constructor(e){this._node=df(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function hf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ff(...t)}function pf(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=hf(n);const e=n.parent;e&&"stage"!==e.type&&pf(e,t.parent)}}function mf(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?Ud(n):Hd(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=hf(i);return pf(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=hf(e);return pf(e,t),t}return null}(e,t,r)}function gf(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=mf(i,t,r);a&&n.push(a),!i.children||a||i.collider||gf(i.children,t,n,r)}}function yf(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==mf(r,t,n))return!0;if(r.children&&!r.collider)return yf(r.children,t,n)}return!1}function vf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(D(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=E(e).map((e=>na(e,t))),["intersectsRect",n];case"line":return n=C(e).map((e=>na(e,t))),["intersectsLine",n];case"point":return n=na(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>na(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>na(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function bf(e,t){const[n,r]=vf(t,e.dpi),i=[];return n&&(gf([e],n,i,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,i)),i}function xf(e,t){const[n,r]=vf(t,e.dpi);return yf([e],n,r)}class wf extends Ld{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:i,fillReference:o}=e;var a,s;a=this.attrs,s=e,Object.keys(Go).forEach((e=>{const t=s[e];void 0!==t&&(a[Go[e]]=t)})),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=m(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return lf.find(e,this).map((e=>df(e)))}getItemsFrom(e){return bf(this,e)}containsPoint(e){return xf(this,e)}intersectsLine(e){return xf(this,e)}intersectsRect(e){return xf(this,e)}intersectsCircle(e){return xf(this,e)}intersectsPolygon(e){return xf(this,e)}intersectsGeoPolygon(e){return xf(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jd;void 0!==this.attrs.transform&&rf(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Jd;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Xd(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Gd("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Gd(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class kf extends Ld{addChild(e){if(!(e&&e instanceof Ld))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const Sf=kf.prototype;class Cf extends wf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=m({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,i]=e.bounds(t),{x:o,y:a}=r,{x:s,y:l}=i,c=isNaN(n.width)?s:Math.max(s,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=m({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=Sf.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=m({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=Sf.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=m({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(Sf.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=m(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(Sf.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=m(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function Ef(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Cf(...t)}class Mf extends Cf{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const _f=kf.prototype,Df=["x1","x2","y1","y2","id","offset","style"];class qf extends wf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=Df.length;r!==i;r++)n=Df[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return _f.addChild.call(this,e)}addChildren(e){return _f.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return _f.removeChild.call(this,e),this}removeChildren(e){return _f.removeChildren.call(this,e),this}}function Rf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qf(...t)}const Tf=kf.prototype,Of=["patternUnits","x","y","width","height","id"];class Pf extends wf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=Of.length;r!==i;r++)n=Of[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return Tf.addChild.call(this,e)}addChildren(e){return Tf.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return Tf.removeChild.call(this,e),this}removeChildren(e){return Tf.removeChildren.call(this,e),this}}class Nf extends wf{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,collider:s}=e,l=m({type:"rect",x:t,y:n,width:r,height:i},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=E(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=S(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class Af extends wf{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:i}=e,o=m({type:"circle",cx:t,cy:n,r:r},i);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=o,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:i}=this.attrs,o=t-r,a=n-i;let s=2*r,l=2*i,c=[{x:o,y:a},{x:o+s,y:a},{x:o+s,y:a+l},{x:o,y:a+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,r,i]=S(c);s=r-t,l=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class If extends wf{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:i=0,collider:o}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=i;const a={type:"line",x1:t,y1:n,x2:r,y2:i};this.collider=m(a,o),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=C(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,i,o]=S(t),a=n!==i||r!==o;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,i-n):0,height:a?Math.max(1,o-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const Lf=Math.PI/2;function zf(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function Ff(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const jf={step:function(e){return new Me(e,.5)},stepAfter:function(e){return new Me(e,1)},stepBefore:function(e){return new Me(e,0)},linear:re,basis:function(e){return new de(e)},cardinal:pe.tension(0),catmullRom:ge,monotonex:function(e){return new we(e)},monotoney:function(e){return new ke(e)},natural:function(e){return new Ce(e)}};function $f(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class Hf extends wf{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=te();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:i,stngs:o,generatorType:a}=e,s=ae(),l=o.coordinates?o.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(jf["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=Nd(this.attrs.d),this.segments.length>1&&this.segments.every((e=>$f(e))))return void(this.collider=m({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if($f(t))this.collider=m({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=zf(s,a),u=zf(s,l),d=(c+u)/2,f=d+Math.PI,h=Math.max(d,f),p=Math.min(d,f),m=c>u;if(1===n){const e=zf(a,s);r.push(Ff(a,e-Lf,t)),i.unshift(Ff(a,e+Lf,t))}const g=m?h:p,y=m?p:h;if(r.push(Ff(s,g,t)),i.unshift(Ff(s,y,t)),n===o-1){const e=zf(l,s);r.push(Ff(l,e+Lf,t)),i.unshift(Ff(l,e-Lf,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=m({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:Nd(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,i,o]=S(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function Vf(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}class Bf extends wf{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:i=0,textBoundsFn:o,text:a,title:s,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=i,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof o&&(this._textBoundsFn=o),"string"==typeof u&&(this.ellipsed=u),this.collider=m({type:Vf(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=E(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[i,o,a,s]=S(r);return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const Wf=Oe();function Uf(e,t){return Wf.get(e)(t)}Wf.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Nf(...t)})),Wf.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Af(...t)})),Wf.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Bf(...t)})),Wf.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new If(...t)})),Wf.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Hf(...t)})),Wf.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Mf(...t)})),Wf.add("container",Ef),Wf.add("defs",Ef),Wf.add("linearGradient",Rf),Wf.add("radialGradient",Rf),Wf.add("conicGradient",Rf),Wf.add("stop",Rf),Wf.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Pf(...t)}));const Yf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return m(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Kf(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function Gf(e,t,n){e.node=n[t],e.index=t}function Xf(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(Gf(o,a,e),Kf(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=Yf.save(o.node);const s=Uf(o.node.type,o.node);s&&(o.node.transform&&(n.save(),rf(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&Xf(o.node.children,s,n,r),o.node.transform&&n.restore()),Yf.restore()}}function Jf(e){let{items:t,stage:n,dpi:r,on:i={}}=e;return n||(n=Uf("stage",r)),Xf(t,n,new Jd,i),n}function Zf(e,t,n){const{orientation:r,degree:i,stops:o=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,i=n.y||0;a=e.createConicGradient(t,r,i)}else{const r=Qo(i);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const o=t.boundingRect();a=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=o.length;e<t;e++){let t=o[e];a.addColorStop(t.offset,t.color)}return a}function Qf(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function eh(){let{x:e,y:t,width:n,height:r,scaleRatio:i,margin:o,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==i&&(s.scaleRatio.x=isNaN(i.x)?s.scaleRatio.x:i.x,s.scaleRatio.y=isNaN(i.y)?s.scaleRatio.y:i.y),void 0!==o&&(s.margin.left=isNaN(o.left)?0:o.left,s.margin.top=isNaN(o.top)?0:o.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function th(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:Mu,textBounds:Du,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function nh(e){return t=>{let{node:n}=t;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}const rh=200,ih=200;class oh{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:i}=e;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*rh,height:n.computedPhysical.height+2*ih},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const ah=Oe();function sh(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function lh(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function ch(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function uh(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function dh(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=Zf(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=Zf(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),uh(t,o,n,a),o.modelViewMatrix&&ch(o.modelViewMatrix.elements,t),ah.has(o.type)&&ah.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&dh(o.children,t,n,r),t.restore()}}function fh(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jf;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=eh();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",sh]];let l;const c=th();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new oh(e)),n.appendChild(e),e),c.getScene=r=>{const i=lh(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[gu(c.measureText),nh(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||Qf(e,t,n),r[i]):Qf(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=lh(u),f=t&&r.transform();if(f)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:f}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const h=c.getScene(n),p=!i||!h.equals(i);l.clear();const m=o||p,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),dh(h.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&h.children.unshift(...i.children),i=h,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=eh(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function hh(e,t){ah.add(e,t)}function ph(e,t){return Math.max(0,Math.min(e,t))}const mh=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),gh=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),yh=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function vh(e){return mh.test(e)}function bh(e){return gh.test(e)||yh.test(e)}function xh(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],vh(n))return"ltr";if(bh(n))return"rtl"}return"ltr"}const wh={start:"end",end:"start",center:"center",middle:"middle"};function kh(e,t){return"rtl"===t?wh[e]:e}function Sh(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=Sh([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=Sh(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function Ch(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function Eh(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function Mh(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(Ch(i.diff.added,i.object,t),Eh(i.diff.removed,r),Mh(i.diff.items,t,n,r)))}function _h(e,t,n,r,i,o){const a=Sh(e,t);return Ch(a.added,n,r),Eh(a.removed,o),Mh(a.items,r,i,o),a.items}hh("rect",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=ph(r/2,o>0?o:a),a=ph(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()})),hh("circle",(function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()})),hh("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),hh("path",(function(e,t){let{g:n,doStroke:r,doFill:i}=t;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)})),hh("text",(function(e,t){let{g:n,ellipsed:r,doStroke:i}=t;const o=r||yu(e,Mu);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=xh(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=kh("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=vu(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)}));const Dh="http://www.w3.org/2000/svg",qh=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(Dh,"container"===e?"g":e);return t.appendChild(n),n},Rh=e=>{e.parentNode&&e.parentNode.removeChild(e)},Th=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||yu(t.attrs,Mu);const n=xh(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",kh(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(Dh,"title");n.textContent=t.attrs.title,e.appendChild(n)}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?vu(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class Oh{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function Ph(){return new Oh(_h,qh,Th,Rh)}function Nh(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function Ah(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dh,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Jf;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ph)();let r,i,o,a=!1,s=eh();const l={transform:void 0,disableScreenReader:!1},c=th(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nh,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach((a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")}))},clear(){n={}}};return i}(u.children),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nh,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=i[o],c={};void 0===r&&(r=90),"radial"===t?c.type="radialGradient":(c=Qo(r),["x1","x2","y1","y2"].forEach((e=>{e in i[o]&&(c[e]=i[o][e])})),c.type="linearGradient"),c.id=l,c.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(c),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},f.onCreate,d.onCreate,gu(c.measureText),nh(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),f.clear(),d.clear(),u.children.length=0;const h=c.getScene(e),p=!o||!h.equals(o),m=a||p;return m&&(c.clear(),n.render(h.children,i)),a=!1,o=h,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=eh(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var Ih,Lh,zh,Fh,jh,$h,Hh,Vh={},Bh=[],Wh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Uh(e,t){for(var n in t)e[n]=t[n];return e}function Yh(e){var t=e.parentNode;t&&t.removeChild(e)}function Kh(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Ih.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Gh(e,a,r,i,null)}function Gh(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++zh:i};return null==i&&null!=Lh.vnode&&Lh.vnode(o),o}function Xh(e){return e.children}function Jh(e,t){this.props=e,this.context=t}function Zh(e,t){if(null==t)return e.__?Zh(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Zh(e):null}function Qh(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Qh(e)}}function ep(e){(!e.__d&&(e.__d=!0)&&Fh.push(e)&&!tp.__r++||jh!==Lh.debounceRendering)&&((jh=Lh.debounceRendering)||$h)(tp)}function tp(){var e,t,n,r,i,o,a,s;for(Fh.sort(Hh);e=Fh.shift();)e.__d&&(t=Fh.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Uh({},o)).__v=o.__v+1,up(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?Zh(o):a,o.__h),dp(r,o),o.__e!=a&&Qh(o)),Fh.length>t&&Fh.sort(Hh));tp.__r=0}function np(e,t,n,r,i,o,a,s,l,c){var u,d,f,h,p,m,g,y=r&&r.__k||Bh,v=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?Gh(null,h,null,null,h):Array.isArray(h)?Gh(Xh,{children:h},null,null,null):h.__b>0?Gh(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=y[u])||f&&h.key==f.key&&h.type===f.type)y[u]=void 0;else for(d=0;d<v;d++){if((f=y[d])&&h.key==f.key&&h.type===f.type){y[d]=void 0;break}f=null}up(e,h,f=f||Vh,i,o,a,s,l,c),p=h.__e,(d=h.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,h),g.push(d,h.__c||p,h)),null!=p?(null==m&&(m=p),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=rp(h,l,e):l=ip(e,h,f,y,p,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=Zh(f))}for(n.__e=m,u=v;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=op(r).nextSibling),hp(y[u],y[u]));if(g)for(u=0;u<g.length;u++)fp(g[u],g[++u],g[++u])}function rp(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?rp(r,t,n):ip(n,r,r,i,r.__e,t));return t}function ip(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function op(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=op(n)))return r;return null}function ap(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Wh.test(t)?n:n+"px"}function sp(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ap(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ap(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?cp:lp,o):e.removeEventListener(t,o?cp:lp,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function lp(e){return this.l[e.type+!1](Lh.event?Lh.event(e):e)}function cp(e){return this.l[e.type+!0](Lh.event?Lh.event(e):e)}function up(e,t,n,r,i,o,a,s,l){var c,u,d,f,h,p,m,g,y,v,b,x,w,k,S,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=Lh.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],v=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,v):(t.__c=u=new Jh(g,v),u.constructor=C,u.render=pp),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=Uh({},u.__s)),Uh(u.__s,C.getDerivedStateFromProps(g,u.__s))),f=u.props,h=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,v),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,h,p)}))}if(u.context=v,u.props=g,u.__P=e,x=Lh.__r,w=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),k=0;k<u._sb.length;k++)u.__h.push(u._sb[k]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=Uh(Uh({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(p=u.getSnapshotBeforeUpdate(f,h)),S=null!=c&&c.type===Xh&&null==c.key?c.props.children:c,np(e,Array.isArray(S)?S:[S],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,f=t.props,h=t.type,p=0;if("svg"===h&&(i=!0),null!=o)for(;p<o.length;p++)if((l=o[p])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,o[p]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),o=null,s=!1}if(null===h)d===f||s&&e.data===f||(e.data=f);else{if(o=o&&Ih.call(e.childNodes),c=(d=n.props||Vh).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},p=0;p<e.attributes.length;p++)d[e.attributes[p].name]=e.attributes[p].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||sp(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||sp(e,o,t[o],n[o],r)}(e,f,d,i,s),u)t.__k=[];else if(p=t.props.children,np(e,Array.isArray(p)?p:[p],t,n,r,i&&"foreignObject"!==h,o,a,o?o[0]:n.__k&&Zh(n,0),s),null!=o)for(p=o.length;p--;)null!=o[p]&&Yh(o[p]);s||("value"in f&&void 0!==(p=f.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==d.value)&&sp(e,"value",p,d.value,!1),"checked"in f&&void 0!==(p=f.checked)&&p!==e.checked&&sp(e,"checked",p,d.checked,!1))}return e}(n.__e,t,n,r,i,o,a,l);(c=Lh.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),Lh.__e(e,t,n)}}function dp(e,t){Lh.__c&&Lh.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Lh.__e(e,t.__v)}}))}function fp(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Lh.__e(e,n)}}function hp(e,t,n){var r,i;if(Lh.unmount&&Lh.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||fp(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Lh.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&hp(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Yh(e.__e),e.__=e.__e=e.__d=void 0}function pp(e,t,n){return this.constructor(e,n)}function mp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,i=eh();const o={transform:void 0,disableScreenReader:!1},a=th();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach((t=>{void 0!==e[t]&&(o[t]=e[t])})),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:i,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return o.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?Kh("div",null,e):e,r=function(e,t,n){var r,i,o;Lh.__&&Lh.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],up(t,e=(!r&&n||t).__k=Kh(Xh,null,[e]),i||Vh,Vh,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?Ih.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),dp(o,e)}(a,n,r),!0},a.renderArgs=[Kh],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=eh(e)),i),a}Ih=Bh.slice,Lh={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},zh=0,Jh.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Uh({},this.state),"function"==typeof e&&(e=e(Uh({},n),this.props)),e&&Uh(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),ep(this))},Jh.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ep(this))},Jh.prototype.render=Xh,Fh=[],$h="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hh=function(e,t){return e.__v.__b-t.__v.__b},tp.__r=0;var gp=[function(e){e.renderer("svg",Ah)},function(e){e.renderer("canvas",fh)},function(e){e.renderer("dom",mp)}];const yp={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const vp=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=yp.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[yp.OFF]:()=>{},[yp.ERROR]:function(){return t.error(...arguments)},[yp.WARN]:function(){return t.warn(...arguments)},[yp.INFO]:function(){return t.info(...arguments)},[yp.DEBUG]:function(){return t.log(...arguments)}},i=function(e){if(e&&!(n<e)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];(r[e]||r[yp.DEBUG])(...i)}};return{log:i,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(yp.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(yp.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(yp.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(yp.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:yp}}(t.logger),i={component:Oe(n.component,"component",r),data:Oe(n.data,"data",r),formatter:Oe(n.formatter,"formatter",r),interaction:Oe(n.interaction,"interaction",r),renderer:ws(n.renderer),scale:Oe(n.scale,"scale",r),symbol:Oe(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:m({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>xs(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach((e=>{o[e]=i[e]})),o.version=g,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:ks,data:_s,formatter:rr,interaction:Ds,renderer:ws(),scale:io,symbol:da});function bp(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xp(Object(n),!0).forEach((function(t){bp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Id.forEach(vp.use),gp.forEach(vp.use),[].forEach(vp.use);var kp=Object.prototype.hasOwnProperty,Sp=Object.prototype.toString,Cp=Object.defineProperty,Ep=Object.getOwnPropertyDescriptor,Mp=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Sp.call(e)},_p=function(e){if(!e||"[object Object]"!==Sp.call(e))return!1;var t,n=kp.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&kp.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||kp.call(e,t)},Dp=function(e,t){Cp&&"__proto__"===t.name?Cp(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},qp=function(e,t){if("__proto__"===t){if(!kp.call(e,t))return;if(Ep)return Ep(e,t).value}return e[t]},Rp=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=qp(s,n),s!==(i=qp(t,n))&&(u&&i&&(_p(i)||(o=Mp(i)))?(o?(o=!1,a=r&&Mp(r)?r:[]):a=r&&_p(r)?r:{},Dp(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&Dp(s,{name:n,newValue:i}));return s};function Tp(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function Op(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Pp(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=Tp(i.field,o,{cache:t},d);if(-1===e)return;f=Rp({qRow:a},e(s))}c[u]=Op(i,f,{key:l})}function Np(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),f=!!i[e].trackBy,h=typeof i[e].trackBy,p={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=Tp(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=Rp({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=Op(u,b,{key:s});if(!(u.filter&&!u.filter(b))){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)Pp({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:p,trackType:h}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function Ap(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Ip(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=zp)):void 0===t&&(t=Lp);for(var n,r,i,o,a,s=new $p(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new $p(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(jp)}function Lp(e){return e.children}function zp(e){return Array.isArray(e)?e[1]:null}function Fp(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function jp(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function $p(e){this.data=e,this.depth=this.height=0,this.parent=null}function Hp(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}$p.prototype=Ip.prototype={constructor:$p,count:function(){return this.eachAfter(Ap)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Ip(this).eachBefore(Fp)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var Vp={depth:-1},Bp={},Wp={};function Up(e){return e.id}function Yp(e){return e.parentId}function Kp(){var e,t=Up,n=Yp;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),h=t,p=n,m=new Map;if(null!=e){const t=f.map(((t,n)=>function(e){e=`${e}`;let t=e.length;Xp(e,t-1)&&!Xp(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(Gp),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(Gp(e)),f.push(Wp));h=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new $p(o),null!=(u=h(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?Bp:c)),null!=(u=p(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===Bp)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===Wp&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===Wp;--e)c.data=null}if(s.parent=Vp,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(jp),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=Hp(e),r):t},r.parentId=function(e){return arguments.length?(n=Hp(e),r):n},r.path=function(t){return arguments.length?(e=Hp(t),r):e},r}function Gp(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Xp(e,t););return e.slice(0,t)}function Xp(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function Jp(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=Jp(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=Jp(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function Zp(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...Zp(e[i].children,t-1,n)]);return r}function Qp(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>Zp(e.children,r-1,n)}return!1}const em=/^qDimensionInfo(?:\/(\d+))?/,tm=/^\/?qMeasureInfo\/(\d+)/,nm=/\/qAttrExprInfo\/(\d+)/,rm=/\/qAttrDimInfo\/(\d+)/;function im(e){const t=e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t));return t.filter((t=>t<e.qDimensionInfo.length))}function om(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,h=im(n);return em.test(d)&&(i=!0,o=+em.exec(d)[1],d=r.replace(em,"")),tm.test(d)&&("K"===n.qMode?c=+tm.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+tm.exec(d)[1],u=0):u=+tm.exec(d)[1],d=d.replace(tm,"")),d&&(rm.exec(d)?s=+rm.exec(d)[1]:nm.exec(d)&&(a=+nm.exec(d)[1])),l=i?"S"===n.qMode?h[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function am(e,t){let n,r,i=Qp(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function sm(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function lm(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,h,p,m,g,y;if("primitive"===d.type?(p=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(p=g.map(f),f=null),h&&(y=g.map(h),h=null),p=d.reduce?d.reduce(p):p,y=d.reduceLabel?d.reduceLabel(y,p):String(p)):(p=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=p)):(p=i,y=i)),s.fields){const e=f?f(p):p;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=f?f(p):p;o[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const cm=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Jp(r,e);return o&&o[0]?(t.tree=Ip(o[0],n.children||(e=>e[i])),t.tree):null};const um=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=am(o,om(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function dm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=wp({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),c=Kp().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):cm(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=im(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(wp(wp({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?om(a,{cube:i}):{fieldDepth:0};um({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=sm(r,a,{key:o});lm({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function fm(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!cm(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(u),h=om(c,{cube:s}),{nodeFn:p,attrFn:m,valueFn:g}=am({fieldDepth:0},h);um({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},x=[],w=p(n.tree),k=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=sm(d,n,{key:l});lm({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),k.push(o)}const S=y?r.collect(x,{main:d,propsArr:f,props:u}):k;o=[...o,...S]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var hm=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
|
|
13
13
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
14
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}));function pm(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const mm={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},gm=/%\)?$/,ym=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,vm=/^\(oct\)/i,bm=/^\(dec\)/i,xm=/^\(hex\)/i,wm=/^\(bin\)/i,km=/^\(rom\)/i,Sm=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Cm=/#|0/g;function Em(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Mm(e,t,n){let r;return ym.test(t)?e=Em(e,Number(/\d{2}/.exec(t)[0]),t,n):vm.test(t)?e=Em(e,8,t,n):bm.test(t)?e=Em(e,10,t,n):xm.test(t)?e=Em(e,16,t,n):wm.test(t)?e=Em(e,2,t,n):km.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function _m(e,t,n){const r=pm(e);return n?r:new RegExp(r||"",t)}function Dm(e,t,n,r){let i,o,a,s,l,c,u,d,f,h=e.pattern;var p,m;r&&(e.abbreviate=!0),p=t,(m=n)&&(m=pm(m)),p&&(p=pm(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(f),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(_m(c,"g"),t)),u=n,n=".",u&&(a=a.replace(_m(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(Cm)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=gm.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(_m(t,null,!0),"|").concat(_m(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class qm{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return mm;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new qm(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Sm.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Sm.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Sm.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||Dm(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&Dm(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&Dm(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=Mm(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=hm(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=hm(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===o?u.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function Rm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function Tm(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qm(...t)}(i,e,t,n,r),a=Rm(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const Om="D",Pm="T",Nm="TS",Am="IV",Im=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zm=["January","February","March","April","May","June","July","August","September","October","November","December"],Fm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jm(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function $m(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function Hm(e,t){let n,r=function(e){const t=e,n=24*$m(t),r=60*$m(n),i=60*$m(r),o=1e3*$m(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class Vm{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Im,qDayNames:Lm,qLongMonthNames:zm,qMonthNames:Fm}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[Pm]:r.qTimeFmt||"hh:mm:ss",[Om]:r.qDateFmt||"YYYY-MM-DD",[Nm]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new Vm(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=Hm(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:jm("".concat(t.year).slice(-2),2),YYY:jm("".concat(t.year).slice(-3),3),def:e=>jm("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:jm("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:jm("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>jm("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>jm("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>jm("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>jm("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function Bm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Vm(...t)}function Wm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=Bm(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=Rm(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==Am?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=Bm(i,e,t),r=Rm(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function Um(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Wm(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),Tm(n,r,i,o,t)}function Ym(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=Um(t,i),f="dimension"===s?"first":(e,t)=>d(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return h}function Km(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Ym(Rp({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Km("qAttrDimInfo",t,n,a,Rp({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=Km("qAttrExprInfo",t,n,a,Rp({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=Km("qMeasureInfo",t,n,a,Rp({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function Gm(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=Gm.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=fm,a.hierarchy=dm,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=Np,a.pages=i.qDataPages,a.hierarchy=dm):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...Km("qDimensionInfo",i,e,"",Rp({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...Km("qMeasureInfo",i,e,"",Rp({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),i=Ym(wp({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),s}const Xm=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Jm=/\/qDimensionInfo(?:\/(\d+))?/,Zm=/\/qMeasureInfo\/(\d+)/,Qm=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,eg=/\/qAttrExprInfo\/(\d+)/,tg=/\/?qHyperCube/,ng=/\/?qTreeData/,rg=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),ig=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function og(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;tg.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=rg):ng.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=ig);let s=!0;if(Jm.test(e)&&(r=+Jm.exec(e)[1]),Zm.test(e)&&(i=+Zm.exec(e)[1]),Qm.test(e)){i=-1,r=0;const e=+Qm.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(eg.test(e)){const e=i;if(t){i=0;const a=Jp(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+eg.exec(n)[1]}else r>-1?(r=-1,i=+eg.exec(n)[1]):i+=+eg.exec(n)[1]+1}return Xm.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function ag(e){Gm.util=e.data("matrix").util,e.data("q",Gm),e.formatter("q-number",Tm),e.formatter("q-time",Wm)}ag.qBrushHelper=og,ag.selections=og;const sg={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function lg(e){return sg[e]||e}function cg(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=lg(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=lg(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}var ug=Object.prototype.hasOwnProperty,dg=Object.prototype.toString,fg=Object.defineProperty,hg=Object.getOwnPropertyDescriptor,pg=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===dg.call(e)},mg=function(e){if(!e||"[object Object]"!==dg.call(e))return!1;var t,n=ug.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ug.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ug.call(e,t)},gg=function(e,t){fg&&"__proto__"===t.name?fg(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},yg=function(e,t){if("__proto__"===t){if(!ug.call(e,t))return;if(hg)return hg(e,t).value}return e[t]},vg=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=yg(s,n),s!==(i=yg(t,n))&&(u&&i&&(mg(i)||(o=pg(i)))?(o?(o=!1,a=r&&pg(r)?r:[]):a=r&&mg(r)?r:{},gg(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&gg(s,{name:n,newValue:i}));return s},bg=r(vg);const xg=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],wg={};xg.forEach((([e,{width:t,height:n}])=>{wg[e]={width:t,height:n}}));const kg={getLayoutModes:()=>wg,getLayoutMode(e,t){let n;for(n=0;n<xg.length;++n)if(e>=xg[n][1].width&&t>=xg[n][1].height)return xg[n][0];return"SPARK"}};function Sg(e,t){return{layoutModes:kg.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const Cg=/^[A-Z][A-z0-9_]*$/i,Eg={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},Mg={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||Cg.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},generateId:()=>Eg.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)};function _g(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const Dg=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),qg=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Rg=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Tg={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Dg.test(e),isRtlChar:e=>qg.test(e)||Rg.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Tg.isLtrChar(r))return"ltr";if(Tg.isRtlChar(r))return"rtl"}return"ltr"}},Og={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Og.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=Tg.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=Tg.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Tg.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=Tg.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Tg.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Og.getColorSymbol(e,t)]:[Og.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Tg.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Tg.detectTextDirection(e.value);let l;return l=i?r?[e.value,Og.getColorSymbol(t,n)]:[Og.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Pg(e){const t=parseInt(e,10);if(!isNaN(t))return t}const Ng=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function Ag(e,t){const n=e.styleService.label.value.getStyle();return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){const r=n.themeService.getStyles(),i=n.styleService.label.value.getStyle(),o=i.fill===r.label.value.color;return{position:e.position,justify:e.justify,fill:o&&!e.onBackground?Ng(t):i.fill,overflow:e.overflow,padding:e.padding}}(n,t,e))),fontSize:Pg(n.fontSize),fontFamily:n.fontFamily,label:e.label}}function Ig(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Lg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zg(){}var Fg=.7,jg=1/Fg,$g="\\s*([+-]?\\d+)\\s*",Hg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Bg=/^#([0-9a-f]{3,8})$/,Wg=new RegExp(`^rgb\\(${$g},${$g},${$g}\\)$`),Ug=new RegExp(`^rgb\\(${Vg},${Vg},${Vg}\\)$`),Yg=new RegExp(`^rgba\\(${$g},${$g},${$g},${Hg}\\)$`),Kg=new RegExp(`^rgba\\(${Vg},${Vg},${Vg},${Hg}\\)$`),Gg=new RegExp(`^hsl\\(${Hg},${Vg},${Vg}\\)$`),Xg=new RegExp(`^hsla\\(${Hg},${Vg},${Vg},${Hg}\\)$`),Jg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Zg(){return this.rgb().formatHex()}function Qg(){return this.rgb().formatRgb()}function ey(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Bg.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ty(t):3===n?new iy(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ny(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ny(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Wg.exec(e))?new iy(t[1],t[2],t[3],1):(t=Ug.exec(e))?new iy(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Yg.exec(e))?ny(t[1],t[2],t[3],t[4]):(t=Kg.exec(e))?ny(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Gg.exec(e))?uy(t[1],t[2]/100,t[3]/100,1):(t=Xg.exec(e))?uy(t[1],t[2]/100,t[3]/100,t[4]):Jg.hasOwnProperty(e)?ty(Jg[e]):"transparent"===e?new iy(NaN,NaN,NaN,0):null}function ty(e){return new iy(e>>16&255,e>>8&255,255&e,1)}function ny(e,t,n,r){return r<=0&&(e=t=n=NaN),new iy(e,t,n,r)}function ry(e){return e instanceof zg||(e=ey(e)),e?new iy((e=e.rgb()).r,e.g,e.b,e.opacity):new iy}function iy(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function oy(){return`#${cy(this.r)}${cy(this.g)}${cy(this.b)}`}function ay(){const e=sy(this.opacity);return`${1===e?"rgb(":"rgba("}${ly(this.r)}, ${ly(this.g)}, ${ly(this.b)}${1===e?")":`, ${e})`}`}function sy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ly(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cy(e){return((e=ly(e))<16?"0":"")+e.toString(16)}function uy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fy(e,t,n,r)}function dy(e){if(e instanceof fy)return new fy(e.h,e.s,e.l,e.opacity);if(e instanceof zg||(e=ey(e)),!e)return new fy;if(e instanceof fy)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new fy(a,s,l,e.opacity)}function fy(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function hy(e){return(e=(e||0)%360)<0?e+360:e}function py(e){return Math.max(0,Math.min(1,e||0))}function my(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ig(zg,ey,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Zg,formatHex:Zg,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return dy(this).formatHsl()},formatRgb:Qg,toString:Qg}),Ig(iy,(function(e,t,n,r){return 1===arguments.length?ry(e):new iy(e,t,n,null==r?1:r)}),Lg(zg,{brighter(e){return e=null==e?jg:Math.pow(jg,e),new iy(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Fg:Math.pow(Fg,e),new iy(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new iy(ly(this.r),ly(this.g),ly(this.b),sy(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oy,formatHex:oy,formatHex8:function(){return`#${cy(this.r)}${cy(this.g)}${cy(this.b)}${cy(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ay,toString:ay})),Ig(fy,(function(e,t,n,r){return 1===arguments.length?dy(e):new fy(e,t,n,null==r?1:r)}),Lg(zg,{brighter(e){return e=null==e?jg:Math.pow(jg,e),new fy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Fg:Math.pow(Fg,e),new fy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new iy(my(e>=240?e-240:e+120,i,r),my(e,i,r),my(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new fy(hy(this.h),py(this.s),py(this.l),sy(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=sy(this.opacity);return`${1===e?"hsl(":"hsla("}${hy(this.h)}, ${100*py(this.s)}%, ${100*py(this.l)}%${1===e?")":`, ${e})`}`}}));const gy=Math.PI/180,yy=180/Math.PI,vy=.96422,by=.82521,xy=4/29,wy=6/29,ky=3*wy*wy,Sy=wy*wy*wy;function Cy(e){if(e instanceof Ey)return new Ey(e.l,e.a,e.b,e.opacity);if(e instanceof Ty)return Oy(e);e instanceof iy||(e=ry(e));var t,n,r=qy(e.r),i=qy(e.g),o=qy(e.b),a=My((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=My((.4360747*r+.3850649*i+.1430804*o)/vy),n=My((.0139322*r+.0971045*i+.7141733*o)/by)),new Ey(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ey(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function My(e){return e>Sy?Math.pow(e,1/3):e/ky+xy}function _y(e){return e>wy?e*e*e:ky*(e-xy)}function Dy(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qy(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ry(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ty)return new Ty(e.h,e.c,e.l,e.opacity);if(e instanceof Ey||(e=Cy(e)),0===e.a&&0===e.b)return new Ty(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*yy;return new Ty(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ty(e,t,n,null==r?1:r)}function Ty(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Oy(e){if(isNaN(e.h))return new Ey(e.l,0,0,e.opacity);var t=e.h*gy;return new Ey(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Py(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}Ig(Ey,(function(e,t,n,r){return 1===arguments.length?Cy(e):new Ey(e,t,n,null==r?1:r)}),Lg(zg,{brighter(e){return new Ey(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Ey(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new iy(Dy(3.1338561*(t=vy*_y(t))-1.6168667*(e=1*_y(e))-.4906146*(n=by*_y(n))),Dy(-.9787684*t+1.9161415*e+.033454*n),Dy(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ig(Ty,Ry,Lg(zg,{brighter(e){return new Ty(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ty(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Oy(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,n){return Py(e(t),n)}}(e))}(Py);var Ny="$";function Ay(){}function Iy(e,t){var n=new Ay;if(e instanceof Ay)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Ly(){}Ay.prototype=Iy.prototype={constructor:Ay,has:function(e){return Ny+e in this},get:function(e){return this[Ny+e]},set:function(e,t){return this[Ny+e]=t,this},remove:function(e){var t=Ny+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ny&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ny&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ny&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ny&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ny&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ny)return!1;return!0},each:function(e){for(var t in this)t[0]===Ny&&e(this[t],t.slice(1),this)}};var zy=Iy.prototype;Ly.prototype={constructor:Ly,has:zy.has,add:function(e){return this[Ny+(e+="")]=e,this},remove:zy.remove,clear:zy.clear,values:zy.keys,size:zy.size,empty:zy.empty,each:zy.each};const Fy=bg.bind(null,!0),jy={},{isArray:$y}=Array;function Hy(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Vy(e){return void 0===e}function By(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Wy(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=Vy(e[r||t])?o:e[t],e=e[r||t]})),e}function Uy(e,t){return t?Object.keys(e).filter((t=>void 0!==e[t])).length:Object.keys(e).length}function Yy(e,t,n){let r=!0;if(Hy(e)&&Hy(t))return Uy(e,n)===Uy(t,n)&&(Object.keys(e).forEach((i=>{Yy(e[i],t[i],n)||(r=!1)})),r);if($y(e)&&$y(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!Yy(e[r],t[r],n))return!1;return!0}return e===t}jy.compare=Yy,jy.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Fy({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;Yy(o,a)||By(t,i)||(Vy(a)?r.push({op:"add",path:s,value:o}):Hy(o)&&Hy(a)?r=r.concat(jy.generate(a,o,s)):$y(o)&&$y(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&Vy(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Yy(t,i))return r;if(!Vy(t[0])&&Vy(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(jy.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{Vy(t[i])&&!By(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},jy.apply=function(e,t){t.forEach((t=>{let n=Wy(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if($y(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if($y(i)&&$y(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(Hy(i)&&Hy(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!By(a,e)&&delete a[e]})),Fy(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=Wy(e,t.from);$y(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&($y(n)?n.splice(+r,1):delete n[r]);var a}))},jy.clone=function(e){return Fy({},e)},jy.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},jy.updateObject=function(e,t){Object.keys(e).length?jy.apply(e,jy.generate(e,t)):Fy(e,t)};const Ky=[[2,4,6],[2,4],[3]],Gy=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Xy(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function Jy(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Xy(e[r],t,n)}function Zy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qy(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function ev(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Qy(o,r,i,a,s,"next",e)}function s(e){Qy(o,r,i,a,s,"throw",e)}a(void 0)}))}}function tv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nv(Object(n),!0).forEach((function(t){tv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iv(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ov(){ov=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new q(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",p="completed",m={};function g(){}function y(){}function v(){}var b={};c(b,a,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(R([])));w&&w!==n&&r.call(w,a)&&(b=w);var k=v.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function E(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=M(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?p:"suspendedYield",c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=p,r.method="throw",r.arg=c.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,i(k,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(C.prototype),c(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function av(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||cv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sv(e){return function(e){if(Array.isArray(e))return Zy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cv(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lv(e){return lv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lv(e)}function cv(e,t){if(e){if("string"==typeof e)return Zy(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zy(e,t):void 0}}!function(){let e,t;for(Jy(Ky,1,10),e=0;e<Gy.length;e++)if(Gy[e])for(t=0;t<Gy[e].length;t++)Array.isArray(Gy[e][t])&&Jy(Gy[e][t])}();var uv=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],dv=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var fv=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function hv(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,sv(new Set([r].concat(sv(a.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):o.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(sv(o.map((function(e){return fv(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],sv(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?dv:uv}(i).map((function(e){return fv(e)}))))}function pv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return hv({theme:t,translator:n,defaultValue:a(),flags:o})}}}var mv,gv,yv=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],vv=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function bv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,sv(new Set([n].concat(sv(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(sv(r.map((function(e){return vv(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],sv(yv.map((function(e){return vv(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function xv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:pv({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:bv({theme:t,translator:n,id:r,path:i})}}function wv(e){return kv.apply(this,arguments)}function kv(){return(kv=ev(ov().mark((function e(t){var n,r,i,o;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.items,n.evaluate){e.next=3;break}return e.abrupt("return",r);case 3:return e.next=5,Promise.all(r.filter((function(e){var t;return!(null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t||!t.qv)})).map((function(e){var t=e.qCalcCondition.qCond.qv;return n.evaluate(t).then((function(t){return"0"===t?e.qDef.cId:void 0})).catch((function(){return e.qDef.cId}))})));case 5:return i=e.sent,o=i.filter(Boolean),e.abrupt("return",r.filter((function(e){return!o.includes(e.qDef.cId)})));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Sv(e){var t=e.app,n=e.translator,r=e.dimension,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingDimension"),meta:{}},o=r.qLibraryId;if(o)return t.getDimension?t.getDimension(o).then((function(e){return e.getLayout()})).catch((function(){})).then((function(e){if(!e)return i;var t=e.qDim,n=t.qGrouping,o=t.qLabelExpression,a="C"===n,s="H"===n,l="N"===n;return{id:r.qDef.cId,text:o&&l?o:e.qDim.title,meta:{isCyclic:a,isDrillDown:s,isNormal:l}}})):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qFieldLabels,u=a.qFieldDefs,d={isCyclic:!1,isDrillDown:!1,isNormal:!0};return l?t.evaluate?t.evaluate(l).then((function(e){return{id:s,text:e,meta:d}})):i:{id:s,text:c[0]||u[0],meta:d}}function Cv(e){return Ev.apply(this,arguments)}function Ev(){return(Ev=ev(ov().mark((function e(t){var n,r,i,o,a,s,l,c;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qDimensions,(l=void 0===s?[]:s).length){e.next=4;break}return e.abrupt("return",Promise.resolve([]));case 4:return e.next=6,wv({app:r,items:l});case 6:return c=e.sent,e.abrupt("return",Promise.all(c.map((function(e){return Sv({app:r,translator:i,dimension:e})}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mv(e){var t=e.app,n=e.translator,r=e.measure,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingMeasure")},o=r.qLibraryId;if(o)return t.getMeasure?t.getMeasure(o).then((function(e){return e.getLayout()})).catch((function(){})).then((function(e){if(!e)return i;var t=e.qMeasure.qLabelExpression;return{id:r.qDef.cId,text:t||e.qMeasure.qLabel||e.qMeasure.qDef}})):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qLabel,u=a.qDef;return l?t.evaluate?t.evaluate(l).then((function(e){return{id:s,text:e}})):i:{id:s,text:c||u}}function _v(e){return Dv.apply(this,arguments)}function Dv(){return(Dv=ev(ov().mark((function e(t){var n,r,i,o,a,s,l,c;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qMeasures,(l=void 0===s?[]:s).length){e.next=4;break}return e.abrupt("return",Promise.resolve([]));case 4:return e.next=6,wv({app:r,items:l});case 6:return c=e.sent,e.abrupt("return",Promise.all(c.map((function(e){return Mv({app:r,translator:i,measure:e})}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qv=function(){if(gv)return mv;gv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return mv=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},mv}(),Rv=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(qv);function Tv(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function Ov(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function Pv(e,t,n,r,i){var o,a,s=i.byRow,l=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return l(r,r.raw().qCardinal);if(r){var c=t.pic.extract({field:r.key(),trackBy:r.value}).length;return s(r,c)}return{}}function Nv(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Av(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function Iv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Lv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zv(){}var Fv=1/.7,jv="\\s*([+-]?\\d+)\\s*",$v="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vv=/^#([0-9a-f]{3,8})$/,Bv=new RegExp(`^rgb\\(${jv},${jv},${jv}\\)$`),Wv=new RegExp(`^rgb\\(${Hv},${Hv},${Hv}\\)$`),Uv=new RegExp(`^rgba\\(${jv},${jv},${jv},${$v}\\)$`),Yv=new RegExp(`^rgba\\(${Hv},${Hv},${Hv},${$v}\\)$`),Kv=new RegExp(`^hsl\\(${$v},${Hv},${Hv}\\)$`),Gv=new RegExp(`^hsla\\(${$v},${Hv},${Hv},${$v}\\)$`),Xv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Jv(){return this.rgb().formatHex()}function Zv(){return this.rgb().formatRgb()}function Qv(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Vv.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?eb(t):3===n?new ib(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?tb(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?tb(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Bv.exec(e))?new ib(t[1],t[2],t[3],1):(t=Wv.exec(e))?new ib(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Uv.exec(e))?tb(t[1],t[2],t[3],t[4]):(t=Yv.exec(e))?tb(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Kv.exec(e))?ub(t[1],t[2]/100,t[3]/100,1):(t=Gv.exec(e))?ub(t[1],t[2]/100,t[3]/100,t[4]):Xv.hasOwnProperty(e)?eb(Xv[e]):"transparent"===e?new ib(NaN,NaN,NaN,0):null}function eb(e){return new ib(e>>16&255,e>>8&255,255&e,1)}function tb(e,t,n,r){return r<=0&&(e=t=n=NaN),new ib(e,t,n,r)}function nb(e){return e instanceof zv||(e=Qv(e)),e?new ib((e=e.rgb()).r,e.g,e.b,e.opacity):new ib}function rb(e,t,n,r){return 1===arguments.length?nb(e):new ib(e,t,n,null==r?1:r)}function ib(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ob(){return`#${cb(this.r)}${cb(this.g)}${cb(this.b)}`}function ab(){const e=sb(this.opacity);return`${1===e?"rgb(":"rgba("}${lb(this.r)}, ${lb(this.g)}, ${lb(this.b)}${1===e?")":`, ${e})`}`}function sb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lb(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cb(e){return((e=lb(e))<16?"0":"")+e.toString(16)}function ub(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fb(e,t,n,r)}function db(e){if(e instanceof fb)return new fb(e.h,e.s,e.l,e.opacity);if(e instanceof zv||(e=Qv(e)),!e)return new fb;if(e instanceof fb)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new fb(a,s,l,e.opacity)}function fb(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function hb(e){return(e=(e||0)%360)<0?e+360:e}function pb(e){return Math.max(0,Math.min(1,e||0))}function mb(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Iv(zv,Qv,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jv,formatHex:Jv,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return db(this).formatHsl()},formatRgb:Zv,toString:Zv}),Iv(ib,rb,Lv(zv,{brighter(e){return e=null==e?Fv:Math.pow(Fv,e),new ib(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ib(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ib(lb(this.r),lb(this.g),lb(this.b),sb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ob,formatHex:ob,formatHex8:function(){return`#${cb(this.r)}${cb(this.g)}${cb(this.b)}${cb(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ab,toString:ab})),Iv(fb,(function(e,t,n,r){return 1===arguments.length?db(e):new fb(e,t,n,null==r?1:r)}),Lv(zv,{brighter(e){return e=null==e?Fv:Math.pow(Fv,e),new fb(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new fb(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ib(mb(e>=240?e-240:e+120,i,r),mb(e,i,r),mb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new fb(hb(this.h),pb(this.s),pb(this.l),sb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=sb(this.opacity);return`${1===e?"hsl(":"hsla("}${hb(this.h)}, ${100*pb(this.s)}%, ${100*pb(this.l)}%${1===e?")":`, ${e})`}`}}));const gb=Math.PI/180,yb=180/Math.PI,vb=4/29,bb=6/29,xb=3*bb*bb;function wb(e){if(e instanceof kb)return new kb(e.l,e.a,e.b,e.opacity);if(e instanceof _b)return Db(e);e instanceof ib||(e=nb(e));var t,n,r=Mb(e.r),i=Mb(e.g),o=Mb(e.b),a=Sb((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Sb((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Sb((.0139322*r+.0971045*i+.7141733*o)/.82521)),new kb(116*a-16,500*(t-a),200*(a-n),e.opacity)}function kb(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Sb(e){return e>.008856451679035631?Math.pow(e,1/3):e/xb+vb}function Cb(e){return e>bb?e*e*e:xb*(e-vb)}function Eb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Mb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _b(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Db(e){if(isNaN(e.h))return new kb(e.l,0,0,e.opacity);var t=e.h*gb;return new kb(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Iv(kb,(function(e,t,n,r){return 1===arguments.length?wb(e):new kb(e,t,n,null==r?1:r)}),Lv(zv,{brighter(e){return new kb(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new kb(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new ib(Eb(3.1338561*(t=.96422*Cb(t))-1.6168667*(e=1*Cb(e))-.4906146*(n=.82521*Cb(n))),Eb(-.9787684*t+1.9161415*e+.033454*n),Eb(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Iv(_b,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof _b)return new _b(e.h,e.c,e.l,e.opacity);if(e instanceof kb||(e=wb(e)),0===e.a&&0===e.b)return new _b(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*yb;return new _b(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new _b(e,t,n,null==r?1:r)}),Lv(zv,{brighter(e){return new _b(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new _b(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Db(this).rgb()}}));var qb=e=>()=>e;function Rb(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):qb(isNaN(e)?t:e)}var Tb=function e(t){var n=function(e){return 1==(e=+e)?Rb:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):qb(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=rb(e)).r,(t=rb(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Rb(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),Ob=/^class(-pyramid)?/,Pb=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,l=t.limits,c={},u="percent"===t.limitType?l.map((function(e){return i+(o-i)*e})):l,d=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(sv(u))),o=Math.max.apply(Math,[o].concat(sv(u))),c.min=i,c.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))c.type="categorical",Object.assign(c,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),o.push(i[l]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var c=0;c<r.length;c++)if(r[c]>n){o.push(i[c]),o.push(i[c]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:d,limits:"percent"===t.limitType?u:l}));else if(t.breakTypes){var f=t.breakTypes;c.type="continuous",c.domain=[i],c.range=[d[0]];for(var h=0;h<u.length;h+=1)if(f[h]){var p=d[h],m=d[h+1],g=Tb(p,m)(.5);c.range.push(g),c.domain.push(u[h]),h<u.length-1&&f[h+1]&&(c.range.push(d[h+1]),c.domain.push((u[h]+u[h+1])/2))}else c.range.push(d[h]),c.range.push(d[h+1]),c.domain.push(u[h]),c.domain.push(u[h]+Math.min(1e-6,(o-i)/1e6));c.range.push(d[d.length-1]),c.domain.push(o)}else c.domain=u,c.range=d;return c};function Nb(e,t,n,r,i){var o,a,s,l=0,c=[],u=(e-t)/(r+1);if(0===u)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/u):n[o]<t?0:Math.floor(a/u),Number.isNaN(s)||(c[s]?c[s]+=1:c[s]=1);for(o=0;o<c.length;o+=1)c[o]&&(l+=1);return l<=r||l>=i?Math.max(l,r):Nb(e,t,n,r+1,i)}var Ab=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,l=r.f,c={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},u=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(u=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,sv(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(c.min=n.input.measureMin,c.max=n.input.measureMax,c.max<c.min)return{invalid:!0}}else if(l&&!d)c.min=l.min(),c.max=l.max();else if(l){if(!u.length)return{invalid:!0};c.min=Math.min.apply(Math,sv(u)),c.max=Math.max.apply(Math,sv(u))}if(n.input.measureScheme&&(c.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];c.type=f&&Ob.test(f.type)?"categorical":"continuous","categorical"===c.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,sv(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===c.type){for(var h=d?Nb(c.max,c.min,u,1,o):o,p=(c.max-c.min)/h,m=[],g=0;g<h+1;g+=1)m.push(c.min+p*g);c.domain=m,c.range=function(e){for(var t=e.resources.theme.palette("quant",h),n=Math.max(1,Math.floor(t.length/h)),r=[],i=0;i<h;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return c};function Ib(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function Lb(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function zb(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var l=n.indexOf(o);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:i}}function Fb(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?Ib:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),c=Ab(0,{theme:r,hc:i},n,{f:l});if(c.invalid)return c;"expression"===s.type&&(s.activeMeasureIndex<0||void 0===s.activeMeasureIndex)&&(c.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(c.label=n.input.altLabel)),!c.label&&l&&(c.label=l.title());var u=s.activeMeasureIndex>=0?l:null;if(!u&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(u=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(u){var d=u.raw().coloring;d&&d.gradient&&Rv(c,Pb(e,d.gradient,c,u))}else c.auxiliary=s;return c}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?Nv:i,a=r.getCByField,s=void 0===a?Av:a,l=r.getPersistence,c=void 0===l?Pv:l,u=o(t,n),d=s(n,u),f=d?d.raw():{},h=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!h.qHasOtherValues)return{invalid:!0};var p={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===u.type||u.activeDimensionIndex<0)&&(p.label=u.label,"color.altLabel"===f.labelExpRef&&(p.label=n.input.altLabel)),!p.label&&d&&(p.label=d.title()),n.input.dimensionScheme&&(p.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===u.type&&(p.auxiliary=u),Rv(p,c(t,n,u,d,{byRow:Ov,byElemNo:Tv})),p}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=Ab(0,{hc:i,theme:o},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],c=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?c.push(r.primary):c.push(i)}}));var u=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(u={categorical:d.key}),{mode:"measure",type:"categorical",palettes:u,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:c}:void 0}}if("dimension"===s){var f=[],h=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?h.push(r.primary):h.push(i)}})),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:h}:void 0}}var p=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(p=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(p=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:p}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),rv(rv({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return rv(rv({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(Lb(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=zb(e.measureOverrides,e.explicit),Lb(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=zb(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var jb=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},$b=function(e){throw e.isHandled=!0,e};function Hb(e){return function(t){return"object"===lv(t.datum[e])?t.datum[e].value:void 0}}function Vb(e){return"object"===lv(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Bb(e){return-3===e.datum.value}var Wb={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},Ub={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"};function Yb(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:Wb.COLOR,fontSize:Wb.FONT_SIZE,fontFamily:Wb.FONT_FAMILY},label:{color:Ub.COLOR,fontSize:Ub.FONT_SIZE,fontFamily:Ub.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,s=o.label,l=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=l(null==a?void 0:a.color,"legend.title","color",Wb.COLOR),i.title.fontSize=l(null==a?void 0:a.fontSize,"legend.title","fontSize",Wb.FONT_SIZE),i.title.fontFamily=l(null==a?void 0:a.fontFamily,"legend.title","fontFamily",Wb.FONT_FAMILY),i.label.color=l(null==s?void 0:s.color,"legend.label","color",Ub.COLOR),i.label.fontSize=l(null==s?void 0:s.fontSize,"legend.label","fontSize",Ub.FONT_SIZE),i.label.fontFamily=l(null==s?void 0:s.fontFamily,"legend.label","fontFamily",Ub.FONT_FAMILY),i}var Kb=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},Gb=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Xb(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,s=t.coloring,l=t.theme,c=t.hc,u=Yb({theme:l,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:Kb(a,i,o)},show:"function"==typeof a.show?function(){return Gb(a,c,s)}:Gb(a,c,s),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:s.label||"",fill:u.title.color,fontSize:u.title.fontSize,fontFamily:u.title.fontFamily}}}}function Jb(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Xb(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,s=e.styleOverrides,l=e.viewState,c=e.rtl,u=e.settings,d=e.style,f=t.scaleKey,h=t.theme,p=t.scales,m=Yb({theme:h,key:a,styleOverrides:s}),g=r.layout.dock,y="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},v={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return Rv(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in p?b:f,settings:{layout:{scrollOffset:function(){return l?l.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:c?"rtl":"ltr",horizontal:20},item:{show:i,label:rv({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},y)},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:v[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:u,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,s=e.settings,l=e.style,c=t.scaleKey,u=t.theme,d="".concat(c,"Range"),f=Xb(e,t);if(!f.show)return!1;var h=Yb({theme:u,key:i,styleOverrides:o}),p=f.layout.dock,m="right"===p||"left"===p,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),Rv(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:c,major:d,length:1,tick:{fill:h.label.color,fontSize:h.label.fontSize,fontFamily:h.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:s,style:l})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:tv(tv(tv({},"".concat(t,"start"),(function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),"".concat(t,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),"".concat(t,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1}))}}(e,n))),{interactions:i,components:r}}function Zb(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=rv({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Rv(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=Rv(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=Rv(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return Pb(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var c=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=c}return l?function(e,t,n,r){var i=r.external,o=r.field,a=rv({},e);Rv(a,Tv(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Rv(a,Tv(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Rv(a,Tv(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var l=i.items[s],c=(l.text||l).label;r[c]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(r[c])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,l,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=rv(rv({},e),r.getDataColorSpecials())),n.settings=Rv(e,Fb(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()}(e,{layout:t.layout,app:t.app})})).getMeasure((function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()}(e,{layout:t.layout,app:t.app})})).getAttributeDimension((function(e,t){return function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch($b):Promise.reject()}(e,{layout:t.layout,model:t.model,app:t.app})}));return n.getSnapshotData=jb,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=rv({},i),r={},!n.key)throw new Error("Missing key");t.set(rv(rv({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=rv(rv({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0]||r.getDataColorScales()[0];if(l){var c=l.colors[0]?l.colors:[[]].concat(sv(l.colors.slice(1)));c=Array.isArray(c[0])?c.map((function(e){return e.slice().reverse()})):c.slice().reverse(),i.push({key:"quant",colors:c})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},l=i;if(n){var c={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(sv((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(sv((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var u,d=function(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var f=0,h={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return h[t]=f++,e[0]}}),u={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return h[e.qElemNumber]}}}}}}var p={data:d,range:n.range,domain:n.domain,explicit:c,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=p,u&&(s["".concat(l,"Legend")]=rv(rv({},p),{},{data:u})),t&&t.qHasOtherValues&&u&&((u||p.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};s[l]=Rv({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Rv({},m,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=Hb(r),o=Hb("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,c=e.others,u=e.primary,d=e.type;return a?function(e){return Bb(e)||o(e)?c:l}:n[t]?function(e){return Bb(e)?c:Vb(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?l:o(e)?c:e.resources.scale(t)(i(e))||c}:"constant"===s?function(e){return Bb(e)||o(e)?c:Vb(e)?l:u}:"color"===d?function(e){return Bb(e)||o(e)?c:Vb(e)?l:i(e)||c}:null},s=a(t,r);if(t.measureOverrides){var l=Hb("".concat(r,"MeasureIdx")),c=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return c[t]?c[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=a,u=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")}(e.qNum):e.qText&&Qv(e.qText)?e.qText:u})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=l);var d=tv({},c,n);return r.qDimensionInfo.length>1&&(d["".concat(c,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(c,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,c=void 0===l?"object.legend":l,u=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,h=e.style,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Jb({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:c,styleOverrides:u,settings:f,style:void 0===h?{}:h},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},p)}};return o}var Qb=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function ex(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Qb),o=r.some(Qb),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var tx=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function nx(e){var t,n=e.qHyperCube.qDimensionInfo.some(tx),r=e.qHyperCube.qMeasureInfo.some(tx),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var rx=function(){};function ix(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,c=e.layoutService,u=void 0===c?void 0:c,d=e.createConfig,f=void 0===d?rx:d,h=e.config,p=void 0===h?{}:h,m=e.custom,g=void 0===m?{}:m,y=p.localeInfo,v=p.key,b=p.theme,x=void 0===b?void 0:b,w=p.auto,k=void 0===w?void 0:w,S=p.definitionPath,C=null==u||null===(t=u.getLayout)||void 0===t?void 0:t.call(u),E={theme:x,key:v,localeInfo:y,layout:C,hc:null==u||null===(n=u.getHyperCube)||void 0===n?void 0:n.call(u),legendProps:null==u||null===(r=u.getLayoutValue)||void 0===r?void 0:r.call(u,"legend"),colorProps:rv(rv({},null==u||null===(i=u.getLayoutValue)||void 0===i?void 0:i.call(u,"color")),{},{useBaseColors:C?ex(C):void 0})},M=Zb({picasso:o,model:a,app:s,translator:l,auto:k});!1!==k&&M.auto((function(e){return k?k({layout:e,defaultAuto:nx}):nx(e)}));var _=!1,D={getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(S)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return _},custom:rv({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:ex}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return rv(rv(rv({},e),t),{},{colorProps:rv(rv({},e.colorProps),t.colorProps||{})})}(E,t);return M.config(n),M.getAuxiliarySettings(S).then((function(){_=!0}))}};return D}var ox="center",ax="bottom",sx=[{key:"NoDataExist",alignment:ox,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:ox,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:ox,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:ox},{key:"DataRangeIncludingZero",alignment:ax},{key:"LimitedData",alignment:ax},{key:"NegativeOrZeroValues",alignment:ax}].reduce((function(e,t){return e[t.key]=t,e}),{}),lx=function(){return!1};function cx(e){var t,n=e.layout,r=e.config,i=void 0===r?{}:r,o={disclaimer:void 0,isSuppressing:!1,showDisclaimer:null!==(t=i.args)&&void 0!==t&&t.layoutService?i.args.layoutService.getLayoutValue("showDisclaimer"):null==n?void 0:n.showDisclaimer};return{initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).args;o.disclaimer=function(e){var t=e.args,n=e.disclaimers,r=[];return Object.keys(n).forEach((function(e){var i=sx[e],o=n[e];o&&(o.condition||(null==i?void 0:i.condition)||lx)(t)&&r.push({key:(null==i?void 0:i.translationKey)||(null==i?void 0:i.key)||e,alignment:o.alignment||(null==i?void 0:i.alignment)||ax})})),r.find((function(e){return e.alignment===ox}))||r[0]}({args:rv(rv({layout:n},i.args),e),disclaimers:i.disclaimers||{}}),o.isSuppressing=!(!o.disclaimer||o.disclaimer.alignment!==ox)},getDisclaimer:function(){return o.isSuppressing?o.disclaimer:!1===o.showDisclaimer?void 0:o.disclaimer},getHasSuppressingDisclaimer:function(){return o.isSuppressing}}}function ux(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}var dx=["__proto__","constructor"];function fx(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!dx.some((function(e){return r.includes(e)}))){for(var o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}}function hx(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function px(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,o)}),n)}}function mx(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function gx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yx(Object(n),!0).forEach((function(t){gx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bx=Object.prototype.hasOwnProperty,xx=Object.prototype.toString,wx=Object.defineProperty,kx=Object.getOwnPropertyDescriptor,Sx=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===xx.call(e)},Cx=function(e){if(!e||"[object Object]"!==xx.call(e))return!1;var t,n=bx.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&bx.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||bx.call(e,t)},Ex=function(e,t){wx&&"__proto__"===t.name?wx(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Mx=function(e,t){if("__proto__"===t){if(!bx.call(e,t))return;if(kx)return kx(e,t).value}return e[t]},_x=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Mx(s,n),s!==(i=Mx(t,n))&&(u&&i&&(Cx(i)||(o=Sx(i)))?(o?(o=!1,a=r&&Sx(r)?r:[]):a=r&&Cx(r)?r:{},Ex(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&Ex(s,{name:n,newValue:i}));return s};function Dx(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function qx(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Rx(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=Dx(i.field,o,{cache:t},d);if(-1===e)return;f=_x({qRow:a},e(s))}c[u]=qx(i,f,{key:l})}function Tx(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),f=!!i[e].trackBy,h=typeof i[e].trackBy,p={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=Dx(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=_x({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=qx(u,b,{key:s});if(!u.filter||u.filter(b)){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)Rx({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:p,trackType:h}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function Ox(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Px(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Ax)):void 0===t&&(t=Nx);for(var n,r,i,o,a,s=new zx(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new zx(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Lx)}function Nx(e){return e.children}function Ax(e){return Array.isArray(e)?e[1]:null}function Ix(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Lx(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function zx(e){this.data=e,this.depth=this.height=0,this.parent=null}function Fx(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}zx.prototype=Px.prototype={constructor:zx,count:function(){return this.eachAfter(Ox)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Px(this).eachBefore(Ix)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var jx={depth:-1},$x={},Hx={};function Vx(e){return e.id}function Bx(e){return e.parentId}function Wx(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Ux(e,t););return e.slice(0,t)}function Ux(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function Yx(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=Yx(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=Yx(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function Kx(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...Kx(e[i].children,t-1,n)]);return r}function Gx(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>Kx(e.children,r-1,n)}return!1}const Xx=/^qDimensionInfo(?:\/(\d+))?/,Jx=/^\/?qMeasureInfo\/(\d+)/,Zx=/\/qAttrExprInfo\/(\d+)/,Qx=/\/qAttrDimInfo\/(\d+)/;function ew(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function tw(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,h=ew(n);return Xx.test(d)&&(i=!0,o=+Xx.exec(d)[1],d=r.replace(Xx,"")),Jx.test(d)&&("K"===n.qMode?c=+Jx.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+Jx.exec(d)[1],u=0):u=+Jx.exec(d)[1],d=d.replace(Jx,"")),d&&(Qx.exec(d)?s=+Qx.exec(d)[1]:Zx.exec(d)&&(a=+Zx.exec(d)[1])),l=i?"S"===n.qMode?h[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function nw(e,t){let n,r,i=Gx(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function rw(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function iw(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,h,p,m,g,y;if("primitive"===d.type?(p=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(p=g.map(f),f=null),h&&(y=g.map(h),h=null),p=d.reduce?d.reduce(p):p,y=d.reduceLabel?d.reduceLabel(y,p):String(p)):(p=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=p)):(p=i,y=i)),s.fields){const e=f?f(p):p;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=f?f(p):p;o[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const ow=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Yx(r,e);return o&&o[0]?(t.tree=Px(o[0],n.children||(e=>e[i])),t.tree):null};function aw(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=vx({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e]));return function(){var e,t=Vx,n=Bx;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),h=t,p=n,m=new Map;if(null!=e){const t=f.map(((t,n)=>function(e){let t=(e=`${e}`).length;return Ux(e,t-1)&&!Ux(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(Wx),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(Wx(e)),f.push(Hx));h=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new zx(o),null!=(u=h(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?$x:c)),null!=(u=p(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===$x)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===Hx&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===Hx;--e)c.data=null}if(s.parent=jx,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(Lx),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=Fx(e),r):t},r.parentId=function(e){return arguments.length?(n=Fx(e),r):n},r.path=function(t){return arguments.length?(e=Fx(t),r):e},r}().id((e=>e.__id)).parentId((e=>e.__parent))(l)}const sw=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=nw(o,tw(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function lw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?aw(t):ow(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=ew(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(vx(vx({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?tw(a,{cube:i}):{fieldDepth:0};sw({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=rw(r,a,{key:o});iw({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function cw(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!ow(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(u),h=tw(c,{cube:s}),{nodeFn:p,attrFn:m,valueFn:g}=nw({fieldDepth:0},h);sw({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},x=[],w=p(n.tree),k=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=rw(d,n,{key:l});iw({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),k.push(o)}const S=y?r.collect(x,{main:d,propsArr:f,props:u}):k;o=[...o,...S]}return o}var uw,dw,fw=(uw=function(e){
|
|
14
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}));function pm(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const mm={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},gm=/%\)?$/,ym=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,vm=/^\(oct\)/i,bm=/^\(dec\)/i,xm=/^\(hex\)/i,wm=/^\(bin\)/i,km=/^\(rom\)/i,Sm=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Cm=/#|0/g;function Em(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Mm(e,t,n){let r;return ym.test(t)?e=Em(e,Number(/\d{2}/.exec(t)[0]),t,n):vm.test(t)?e=Em(e,8,t,n):bm.test(t)?e=Em(e,10,t,n):xm.test(t)?e=Em(e,16,t,n):wm.test(t)?e=Em(e,2,t,n):km.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function _m(e,t,n){const r=pm(e);return n?r:new RegExp(r||"",t)}function Dm(e,t,n,r){let i,o,a,s,l,c,u,d,f,h=e.pattern;var p,m;r&&(e.abbreviate=!0),p=t,(m=n)&&(m=pm(m)),p&&(p=pm(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(f),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(_m(c,"g"),t)),u=n,n=".",u&&(a=a.replace(_m(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(Cm)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=gm.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(_m(t,null,!0),"|").concat(_m(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class qm{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return mm;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new qm(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Sm.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Sm.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Sm.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||Dm(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&Dm(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&Dm(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=Mm(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=hm(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=hm(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===o?u.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function Rm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function Tm(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qm(...t)}(i,e,t,n,r),a=Rm(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const Om="D",Pm="T",Nm="TS",Am="IV",Im=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zm=["January","February","March","April","May","June","July","August","September","October","November","December"],Fm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jm(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function $m(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function Hm(e,t){let n,r=function(e){const t=e,n=24*$m(t),r=60*$m(n),i=60*$m(r),o=1e3*$m(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class Vm{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Im,qDayNames:Lm,qLongMonthNames:zm,qMonthNames:Fm}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[Pm]:r.qTimeFmt||"hh:mm:ss",[Om]:r.qDateFmt||"YYYY-MM-DD",[Nm]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new Vm(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=Hm(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:jm("".concat(t.year).slice(-2),2),YYY:jm("".concat(t.year).slice(-3),3),def:e=>jm("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:jm("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:jm("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>jm("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>jm("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>jm("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>jm("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function Bm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Vm(...t)}function Wm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=Bm(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=Rm(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==Am?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=Bm(i,e,t),r=Rm(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function Um(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Wm(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),Tm(n,r,i,o,t)}function Ym(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=Um(t,i),f="dimension"===s?"first":(e,t)=>d(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return h}function Km(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Ym(Rp({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Km("qAttrDimInfo",t,n,a,Rp({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=Km("qAttrExprInfo",t,n,a,Rp({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=Km("qMeasureInfo",t,n,a,Rp({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function Gm(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=Gm.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=fm,a.hierarchy=dm,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=Np,a.pages=i.qDataPages,a.hierarchy=dm):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...Km("qDimensionInfo",i,e,"",Rp({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...Km("qMeasureInfo",i,e,"",Rp({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),i=Ym(wp({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),s}const Xm=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Jm=/\/qDimensionInfo(?:\/(\d+))?/,Zm=/\/qMeasureInfo\/(\d+)/,Qm=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,eg=/\/qAttrExprInfo\/(\d+)/,tg=/\/?qHyperCube/,ng=/\/?qTreeData/,rg=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),ig=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function og(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;tg.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=rg):ng.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=ig);let s=!0;if(Jm.test(e)&&(r=+Jm.exec(e)[1]),Zm.test(e)&&(i=+Zm.exec(e)[1]),Qm.test(e)){i=-1,r=0;const e=+Qm.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(eg.test(e)){const e=i;if(t){i=0;const a=Jp(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+eg.exec(n)[1]}else r>-1?(r=-1,i=+eg.exec(n)[1]):i+=+eg.exec(n)[1]+1}return Xm.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function ag(e){Gm.util=e.data("matrix").util,e.data("q",Gm),e.formatter("q-number",Tm),e.formatter("q-time",Wm)}ag.qBrushHelper=og,ag.selections=og;const sg={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function lg(e){return sg[e]||e}function cg(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=lg(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=lg(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}var ug=Object.prototype.hasOwnProperty,dg=Object.prototype.toString,fg=Object.defineProperty,hg=Object.getOwnPropertyDescriptor,pg=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===dg.call(e)},mg=function(e){if(!e||"[object Object]"!==dg.call(e))return!1;var t,n=ug.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ug.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ug.call(e,t)},gg=function(e,t){fg&&"__proto__"===t.name?fg(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},yg=function(e,t){if("__proto__"===t){if(!ug.call(e,t))return;if(hg)return hg(e,t).value}return e[t]},vg=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=yg(s,n),s!==(i=yg(t,n))&&(u&&i&&(mg(i)||(o=pg(i)))?(o?(o=!1,a=r&&pg(r)?r:[]):a=r&&mg(r)?r:{},gg(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&gg(s,{name:n,newValue:i}));return s},bg=r(vg);const xg=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],wg={};xg.forEach((([e,{width:t,height:n}])=>{wg[e]={width:t,height:n}}));const kg={getLayoutModes:()=>wg,getLayoutMode(e,t){let n;for(n=0;n<xg.length;++n)if(e>=xg[n][1].width&&t>=xg[n][1].height)return xg[n][0];return"SPARK"}};function Sg(e,t){return{layoutModes:kg.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const Cg=/^[A-Z][A-z0-9_]*$/i,Eg={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},Mg={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||Cg.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},generateId:()=>Eg.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)};function _g(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const Dg=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),qg=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Rg=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Tg={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Dg.test(e),isRtlChar:e=>qg.test(e)||Rg.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Tg.isLtrChar(r))return"ltr";if(Tg.isRtlChar(r))return"rtl"}return"ltr"}},Og={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Og.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=Tg.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getDescriptionRow(e,t){const n=Tg.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Tg.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=Tg.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Tg.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Og.getColorSymbol(e,t)]:[Og.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Tg.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Tg.detectTextDirection(e.value);let l;return l=i?r?[e.value,Og.getColorSymbol(t,n)]:[Og.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Pg(e){const t=parseInt(e,10);if(!isNaN(t))return t}const Ng=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function Ag(e,t){const n=e.styleService.label.value.getStyle();return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){const r=n.themeService.getStyles(),i=n.styleService.label.value.getStyle(),o=i.fill===r.label.value.color;return{position:e.position,justify:e.justify,fill:o&&!e.onBackground?Ng(t):i.fill,overflow:e.overflow,padding:e.padding}}(n,t,e))),fontSize:Pg(n.fontSize),fontFamily:n.fontFamily,label:e.label}}function Ig(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Lg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zg(){}var Fg=.7,jg=1/Fg,$g="\\s*([+-]?\\d+)\\s*",Hg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Bg=/^#([0-9a-f]{3,8})$/,Wg=new RegExp(`^rgb\\(${$g},${$g},${$g}\\)$`),Ug=new RegExp(`^rgb\\(${Vg},${Vg},${Vg}\\)$`),Yg=new RegExp(`^rgba\\(${$g},${$g},${$g},${Hg}\\)$`),Kg=new RegExp(`^rgba\\(${Vg},${Vg},${Vg},${Hg}\\)$`),Gg=new RegExp(`^hsl\\(${Hg},${Vg},${Vg}\\)$`),Xg=new RegExp(`^hsla\\(${Hg},${Vg},${Vg},${Hg}\\)$`),Jg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Zg(){return this.rgb().formatHex()}function Qg(){return this.rgb().formatRgb()}function ey(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Bg.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ty(t):3===n?new iy(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ny(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ny(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Wg.exec(e))?new iy(t[1],t[2],t[3],1):(t=Ug.exec(e))?new iy(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Yg.exec(e))?ny(t[1],t[2],t[3],t[4]):(t=Kg.exec(e))?ny(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Gg.exec(e))?uy(t[1],t[2]/100,t[3]/100,1):(t=Xg.exec(e))?uy(t[1],t[2]/100,t[3]/100,t[4]):Jg.hasOwnProperty(e)?ty(Jg[e]):"transparent"===e?new iy(NaN,NaN,NaN,0):null}function ty(e){return new iy(e>>16&255,e>>8&255,255&e,1)}function ny(e,t,n,r){return r<=0&&(e=t=n=NaN),new iy(e,t,n,r)}function ry(e){return e instanceof zg||(e=ey(e)),e?new iy((e=e.rgb()).r,e.g,e.b,e.opacity):new iy}function iy(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function oy(){return`#${cy(this.r)}${cy(this.g)}${cy(this.b)}`}function ay(){const e=sy(this.opacity);return`${1===e?"rgb(":"rgba("}${ly(this.r)}, ${ly(this.g)}, ${ly(this.b)}${1===e?")":`, ${e})`}`}function sy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ly(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cy(e){return((e=ly(e))<16?"0":"")+e.toString(16)}function uy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fy(e,t,n,r)}function dy(e){if(e instanceof fy)return new fy(e.h,e.s,e.l,e.opacity);if(e instanceof zg||(e=ey(e)),!e)return new fy;if(e instanceof fy)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new fy(a,s,l,e.opacity)}function fy(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function hy(e){return(e=(e||0)%360)<0?e+360:e}function py(e){return Math.max(0,Math.min(1,e||0))}function my(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ig(zg,ey,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Zg,formatHex:Zg,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return dy(this).formatHsl()},formatRgb:Qg,toString:Qg}),Ig(iy,(function(e,t,n,r){return 1===arguments.length?ry(e):new iy(e,t,n,null==r?1:r)}),Lg(zg,{brighter(e){return e=null==e?jg:Math.pow(jg,e),new iy(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Fg:Math.pow(Fg,e),new iy(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new iy(ly(this.r),ly(this.g),ly(this.b),sy(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oy,formatHex:oy,formatHex8:function(){return`#${cy(this.r)}${cy(this.g)}${cy(this.b)}${cy(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ay,toString:ay})),Ig(fy,(function(e,t,n,r){return 1===arguments.length?dy(e):new fy(e,t,n,null==r?1:r)}),Lg(zg,{brighter(e){return e=null==e?jg:Math.pow(jg,e),new fy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Fg:Math.pow(Fg,e),new fy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new iy(my(e>=240?e-240:e+120,i,r),my(e,i,r),my(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new fy(hy(this.h),py(this.s),py(this.l),sy(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=sy(this.opacity);return`${1===e?"hsl(":"hsla("}${hy(this.h)}, ${100*py(this.s)}%, ${100*py(this.l)}%${1===e?")":`, ${e})`}`}}));const gy=Math.PI/180,yy=180/Math.PI,vy=.96422,by=.82521,xy=4/29,wy=6/29,ky=3*wy*wy,Sy=wy*wy*wy;function Cy(e){if(e instanceof Ey)return new Ey(e.l,e.a,e.b,e.opacity);if(e instanceof Ty)return Oy(e);e instanceof iy||(e=ry(e));var t,n,r=qy(e.r),i=qy(e.g),o=qy(e.b),a=My((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=My((.4360747*r+.3850649*i+.1430804*o)/vy),n=My((.0139322*r+.0971045*i+.7141733*o)/by)),new Ey(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ey(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function My(e){return e>Sy?Math.pow(e,1/3):e/ky+xy}function _y(e){return e>wy?e*e*e:ky*(e-xy)}function Dy(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qy(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ry(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ty)return new Ty(e.h,e.c,e.l,e.opacity);if(e instanceof Ey||(e=Cy(e)),0===e.a&&0===e.b)return new Ty(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*yy;return new Ty(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ty(e,t,n,null==r?1:r)}function Ty(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Oy(e){if(isNaN(e.h))return new Ey(e.l,0,0,e.opacity);var t=e.h*gy;return new Ey(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Py(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}Ig(Ey,(function(e,t,n,r){return 1===arguments.length?Cy(e):new Ey(e,t,n,null==r?1:r)}),Lg(zg,{brighter(e){return new Ey(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Ey(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new iy(Dy(3.1338561*(t=vy*_y(t))-1.6168667*(e=1*_y(e))-.4906146*(n=by*_y(n))),Dy(-.9787684*t+1.9161415*e+.033454*n),Dy(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ig(Ty,Ry,Lg(zg,{brighter(e){return new Ty(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ty(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Oy(this).rgb()}})),function(e){1===e.length&&(e=function(e){return function(t,n){return Py(e(t),n)}}(e))}(Py);var Ny="$";function Ay(){}function Iy(e,t){var n=new Ay;if(e instanceof Ay)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Ly(){}Ay.prototype=Iy.prototype={constructor:Ay,has:function(e){return Ny+e in this},get:function(e){return this[Ny+e]},set:function(e,t){return this[Ny+e]=t,this},remove:function(e){var t=Ny+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ny&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ny&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ny&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ny&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ny&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ny)return!1;return!0},each:function(e){for(var t in this)t[0]===Ny&&e(this[t],t.slice(1),this)}};var zy=Iy.prototype;Ly.prototype={constructor:Ly,has:zy.has,add:function(e){return this[Ny+(e+="")]=e,this},remove:zy.remove,clear:zy.clear,values:zy.keys,size:zy.size,empty:zy.empty,each:zy.each};const Fy=bg.bind(null,!0),jy={},{isArray:$y}=Array;function Hy(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Vy(e){return void 0===e}function By(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Wy(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=Vy(e[r||t])?o:e[t],e=e[r||t]})),e}function Uy(e,t){return t?Object.keys(e).filter((t=>void 0!==e[t])).length:Object.keys(e).length}function Yy(e,t,n){let r=!0;if(Hy(e)&&Hy(t))return Uy(e,n)===Uy(t,n)&&(Object.keys(e).forEach((i=>{Yy(e[i],t[i],n)||(r=!1)})),r);if($y(e)&&$y(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!Yy(e[r],t[r],n))return!1;return!0}return e===t}jy.compare=Yy,jy.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Fy({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;Yy(o,a)||By(t,i)||(Vy(a)?r.push({op:"add",path:s,value:o}):Hy(o)&&Hy(a)?r=r.concat(jy.generate(a,o,s)):$y(o)&&$y(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&Vy(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Yy(t,i))return r;if(!Vy(t[0])&&Vy(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(jy.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{Vy(t[i])&&!By(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},jy.apply=function(e,t){t.forEach((t=>{let n=Wy(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if($y(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if($y(i)&&$y(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(Hy(i)&&Hy(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!By(a,e)&&delete a[e]})),Fy(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=Wy(e,t.from);$y(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&($y(n)?n.splice(+r,1):delete n[r]);var a}))},jy.clone=function(e){return Fy({},e)},jy.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},jy.updateObject=function(e,t){Object.keys(e).length?jy.apply(e,jy.generate(e,t)):Fy(e,t)};const Ky=[[2,4,6],[2,4],[3]],Gy=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Xy(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function Jy(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Xy(e[r],t,n)}function Zy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qy(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function ev(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Qy(o,r,i,a,s,"next",e)}function s(e){Qy(o,r,i,a,s,"throw",e)}a(void 0)}))}}function tv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nv(Object(n),!0).forEach((function(t){tv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iv(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ov(){ov=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new q(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",p="completed",m={};function g(){}function y(){}function v(){}var b={};c(b,a,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(R([])));w&&w!==n&&r.call(w,a)&&(b=w);var k=v.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function E(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=M(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?p:"suspendedYield",c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=p,r.method="throw",r.arg=c.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,i(k,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(C.prototype),c(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function av(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||cv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sv(e){return function(e){if(Array.isArray(e))return Zy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cv(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lv(e){return lv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lv(e)}function cv(e,t){if(e){if("string"==typeof e)return Zy(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zy(e,t):void 0}}!function(){let e,t;for(Jy(Ky,1,10),e=0;e<Gy.length;e++)if(Gy[e])for(t=0;t<Gy[e].length;t++)Array.isArray(Gy[e][t])&&Jy(Gy[e][t])}();var uv=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],dv=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var fv=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function hv(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,sv(new Set([r].concat(sv(a.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):o.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(sv(o.map((function(e){return fv(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],sv(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?dv:uv}(i).map((function(e){return fv(e)}))))}function pv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return hv({theme:t,translator:n,defaultValue:a(),flags:o})}}}var mv,gv,yv=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],vv=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function bv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,sv(new Set([n].concat(sv(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(sv(r.map((function(e){return vv(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],sv(yv.map((function(e){return vv(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function xv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:pv({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:bv({theme:t,translator:n,id:r,path:i})}}function wv(e){return kv.apply(this,arguments)}function kv(){return(kv=ev(ov().mark((function e(t){var n,r,i,o;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.items,n.evaluate){e.next=3;break}return e.abrupt("return",r);case 3:return e.next=5,Promise.all(r.filter((function(e){var t;return!(null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t||!t.qv)})).map((function(e){var t=e.qCalcCondition.qCond.qv;return n.evaluate(t).then((function(t){return"0"===t?e.qDef.cId:void 0})).catch((function(){return e.qDef.cId}))})));case 5:return i=e.sent,o=i.filter(Boolean),e.abrupt("return",r.filter((function(e){return!o.includes(e.qDef.cId)})));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Sv(e){var t=e.app,n=e.translator,r=e.dimension,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingDimension"),meta:{}},o=r.qLibraryId;if(o)return t.getDimension?t.getDimension(o).then((function(e){return e.getLayout()})).catch((function(){})).then((function(e){if(!e)return i;var t=e.qDim,n=t.qGrouping,o=t.qLabelExpression,a="C"===n,s="H"===n,l="N"===n;return{id:r.qDef.cId,text:o&&l?o:e.qDim.title,meta:{isCyclic:a,isDrillDown:s,isNormal:l}}})):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qFieldLabels,u=a.qFieldDefs,d={isCyclic:!1,isDrillDown:!1,isNormal:!0};return l?t.evaluate?t.evaluate(l).then((function(e){return{id:s,text:e,meta:d}})):i:{id:s,text:c[0]||u[0],meta:d}}function Cv(e){return Ev.apply(this,arguments)}function Ev(){return(Ev=ev(ov().mark((function e(t){var n,r,i,o,a,s,l,c;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qDimensions,(l=void 0===s?[]:s).length){e.next=4;break}return e.abrupt("return",Promise.resolve([]));case 4:return e.next=6,wv({app:r,items:l});case 6:return c=e.sent,e.abrupt("return",Promise.all(c.map((function(e){return Sv({app:r,translator:i,dimension:e})}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mv(e){var t=e.app,n=e.translator,r=e.measure,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingMeasure")},o=r.qLibraryId;if(o)return t.getMeasure?t.getMeasure(o).then((function(e){return e.getLayout()})).catch((function(){})).then((function(e){if(!e)return i;var t=e.qMeasure.qLabelExpression;return{id:r.qDef.cId,text:t||e.qMeasure.qLabel||e.qMeasure.qDef}})):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qLabel,u=a.qDef;return l?t.evaluate?t.evaluate(l).then((function(e){return{id:s,text:e}})):i:{id:s,text:c||u}}function _v(e){return Dv.apply(this,arguments)}function Dv(){return(Dv=ev(ov().mark((function e(t){var n,r,i,o,a,s,l,c;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qMeasures,(l=void 0===s?[]:s).length){e.next=4;break}return e.abrupt("return",Promise.resolve([]));case 4:return e.next=6,wv({app:r,items:l});case 6:return c=e.sent,e.abrupt("return",Promise.all(c.map((function(e){return Mv({app:r,translator:i,measure:e})}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qv=function(){if(gv)return mv;gv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return mv=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},mv}(),Rv=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(qv);function Tv(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function Ov(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function Pv(e,t,n,r,i){var o,a,s=i.byRow,l=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return l(r,r.raw().qCardinal);if(r){var c=t.pic.extract({field:r.key(),trackBy:r.value}).length;return s(r,c)}return{}}function Nv(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Av(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function Iv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Lv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zv(){}var Fv=1/.7,jv="\\s*([+-]?\\d+)\\s*",$v="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vv=/^#([0-9a-f]{3,8})$/,Bv=new RegExp(`^rgb\\(${jv},${jv},${jv}\\)$`),Wv=new RegExp(`^rgb\\(${Hv},${Hv},${Hv}\\)$`),Uv=new RegExp(`^rgba\\(${jv},${jv},${jv},${$v}\\)$`),Yv=new RegExp(`^rgba\\(${Hv},${Hv},${Hv},${$v}\\)$`),Kv=new RegExp(`^hsl\\(${$v},${Hv},${Hv}\\)$`),Gv=new RegExp(`^hsla\\(${$v},${Hv},${Hv},${$v}\\)$`),Xv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Jv(){return this.rgb().formatHex()}function Zv(){return this.rgb().formatRgb()}function Qv(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Vv.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?eb(t):3===n?new ib(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?tb(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?tb(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Bv.exec(e))?new ib(t[1],t[2],t[3],1):(t=Wv.exec(e))?new ib(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Uv.exec(e))?tb(t[1],t[2],t[3],t[4]):(t=Yv.exec(e))?tb(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Kv.exec(e))?ub(t[1],t[2]/100,t[3]/100,1):(t=Gv.exec(e))?ub(t[1],t[2]/100,t[3]/100,t[4]):Xv.hasOwnProperty(e)?eb(Xv[e]):"transparent"===e?new ib(NaN,NaN,NaN,0):null}function eb(e){return new ib(e>>16&255,e>>8&255,255&e,1)}function tb(e,t,n,r){return r<=0&&(e=t=n=NaN),new ib(e,t,n,r)}function nb(e){return e instanceof zv||(e=Qv(e)),e?new ib((e=e.rgb()).r,e.g,e.b,e.opacity):new ib}function rb(e,t,n,r){return 1===arguments.length?nb(e):new ib(e,t,n,null==r?1:r)}function ib(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ob(){return`#${cb(this.r)}${cb(this.g)}${cb(this.b)}`}function ab(){const e=sb(this.opacity);return`${1===e?"rgb(":"rgba("}${lb(this.r)}, ${lb(this.g)}, ${lb(this.b)}${1===e?")":`, ${e})`}`}function sb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lb(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cb(e){return((e=lb(e))<16?"0":"")+e.toString(16)}function ub(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fb(e,t,n,r)}function db(e){if(e instanceof fb)return new fb(e.h,e.s,e.l,e.opacity);if(e instanceof zv||(e=Qv(e)),!e)return new fb;if(e instanceof fb)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new fb(a,s,l,e.opacity)}function fb(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function hb(e){return(e=(e||0)%360)<0?e+360:e}function pb(e){return Math.max(0,Math.min(1,e||0))}function mb(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Iv(zv,Qv,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jv,formatHex:Jv,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return db(this).formatHsl()},formatRgb:Zv,toString:Zv}),Iv(ib,rb,Lv(zv,{brighter(e){return e=null==e?Fv:Math.pow(Fv,e),new ib(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ib(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ib(lb(this.r),lb(this.g),lb(this.b),sb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ob,formatHex:ob,formatHex8:function(){return`#${cb(this.r)}${cb(this.g)}${cb(this.b)}${cb(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ab,toString:ab})),Iv(fb,(function(e,t,n,r){return 1===arguments.length?db(e):new fb(e,t,n,null==r?1:r)}),Lv(zv,{brighter(e){return e=null==e?Fv:Math.pow(Fv,e),new fb(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new fb(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ib(mb(e>=240?e-240:e+120,i,r),mb(e,i,r),mb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new fb(hb(this.h),pb(this.s),pb(this.l),sb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=sb(this.opacity);return`${1===e?"hsl(":"hsla("}${hb(this.h)}, ${100*pb(this.s)}%, ${100*pb(this.l)}%${1===e?")":`, ${e})`}`}}));const gb=Math.PI/180,yb=180/Math.PI,vb=4/29,bb=6/29,xb=3*bb*bb;function wb(e){if(e instanceof kb)return new kb(e.l,e.a,e.b,e.opacity);if(e instanceof _b)return Db(e);e instanceof ib||(e=nb(e));var t,n,r=Mb(e.r),i=Mb(e.g),o=Mb(e.b),a=Sb((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Sb((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Sb((.0139322*r+.0971045*i+.7141733*o)/.82521)),new kb(116*a-16,500*(t-a),200*(a-n),e.opacity)}function kb(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Sb(e){return e>.008856451679035631?Math.pow(e,1/3):e/xb+vb}function Cb(e){return e>bb?e*e*e:xb*(e-vb)}function Eb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Mb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _b(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Db(e){if(isNaN(e.h))return new kb(e.l,0,0,e.opacity);var t=e.h*gb;return new kb(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Iv(kb,(function(e,t,n,r){return 1===arguments.length?wb(e):new kb(e,t,n,null==r?1:r)}),Lv(zv,{brighter(e){return new kb(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new kb(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new ib(Eb(3.1338561*(t=.96422*Cb(t))-1.6168667*(e=1*Cb(e))-.4906146*(n=.82521*Cb(n))),Eb(-.9787684*t+1.9161415*e+.033454*n),Eb(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Iv(_b,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof _b)return new _b(e.h,e.c,e.l,e.opacity);if(e instanceof kb||(e=wb(e)),0===e.a&&0===e.b)return new _b(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*yb;return new _b(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new _b(e,t,n,null==r?1:r)}),Lv(zv,{brighter(e){return new _b(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new _b(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Db(this).rgb()}}));var qb=e=>()=>e;function Rb(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):qb(isNaN(e)?t:e)}var Tb=function e(t){var n=function(e){return 1==(e=+e)?Rb:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):qb(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=rb(e)).r,(t=rb(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Rb(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),Ob=/^class(-pyramid)?/,Pb=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,l=t.limits,c={},u="percent"===t.limitType?l.map((function(e){return i+(o-i)*e})):l,d=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(sv(u))),o=Math.max.apply(Math,[o].concat(sv(u))),c.min=i,c.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))c.type="categorical",Object.assign(c,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),o.push(i[l]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var c=0;c<r.length;c++)if(r[c]>n){o.push(i[c]),o.push(i[c]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:d,limits:"percent"===t.limitType?u:l}));else if(t.breakTypes){var f=t.breakTypes;c.type="continuous",c.domain=[i],c.range=[d[0]];for(var h=0;h<u.length;h+=1)if(f[h]){var p=d[h],m=d[h+1],g=Tb(p,m)(.5);c.range.push(g),c.domain.push(u[h]),h<u.length-1&&f[h+1]&&(c.range.push(d[h+1]),c.domain.push((u[h]+u[h+1])/2))}else c.range.push(d[h]),c.range.push(d[h+1]),c.domain.push(u[h]),c.domain.push(u[h]+Math.min(1e-6,(o-i)/1e6));c.range.push(d[d.length-1]),c.domain.push(o)}else c.domain=u,c.range=d;return c};function Nb(e,t,n,r,i){var o,a,s,l=0,c=[],u=(e-t)/(r+1);if(0===u)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/u):n[o]<t?0:Math.floor(a/u),Number.isNaN(s)||(c[s]?c[s]+=1:c[s]=1);for(o=0;o<c.length;o+=1)c[o]&&(l+=1);return l<=r||l>=i?Math.max(l,r):Nb(e,t,n,r+1,i)}var Ab=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,l=r.f,c={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},u=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(u=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,sv(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(c.min=n.input.measureMin,c.max=n.input.measureMax,c.max<c.min)return{invalid:!0}}else if(l&&!d)c.min=l.min(),c.max=l.max();else if(l){if(!u.length)return{invalid:!0};c.min=Math.min.apply(Math,sv(u)),c.max=Math.max.apply(Math,sv(u))}if(n.input.measureScheme&&(c.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];c.type=f&&Ob.test(f.type)?"categorical":"continuous","categorical"===c.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,sv(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===c.type){for(var h=d?Nb(c.max,c.min,u,1,o):o,p=(c.max-c.min)/h,m=[],g=0;g<h+1;g+=1)m.push(c.min+p*g);c.domain=m,c.range=function(e){for(var t=e.resources.theme.palette("quant",h),n=Math.max(1,Math.floor(t.length/h)),r=[],i=0;i<h;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return c};function Ib(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function Lb(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function zb(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var l=n.indexOf(o);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:i}}function Fb(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?Ib:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),c=Ab(0,{theme:r,hc:i},n,{f:l});if(c.invalid)return c;"expression"===s.type&&(s.activeMeasureIndex<0||void 0===s.activeMeasureIndex)&&(c.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(c.label=n.input.altLabel)),!c.label&&l&&(c.label=l.title());var u=s.activeMeasureIndex>=0?l:null;if(!u&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(u=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(u){var d=u.raw().coloring;d&&d.gradient&&Rv(c,Pb(e,d.gradient,c,u))}else c.auxiliary=s;return c}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?Nv:i,a=r.getCByField,s=void 0===a?Av:a,l=r.getPersistence,c=void 0===l?Pv:l,u=o(t,n),d=s(n,u),f=d?d.raw():{},h=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!h.qHasOtherValues)return{invalid:!0};var p={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===u.type||u.activeDimensionIndex<0)&&(p.label=u.label,"color.altLabel"===f.labelExpRef&&(p.label=n.input.altLabel)),!p.label&&d&&(p.label=d.title()),n.input.dimensionScheme&&(p.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===u.type&&(p.auxiliary=u),Rv(p,c(t,n,u,d,{byRow:Ov,byElemNo:Tv})),p}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=Ab(0,{hc:i,theme:o},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],c=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?c.push(r.primary):c.push(i)}}));var u=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(u={categorical:d.key}),{mode:"measure",type:"categorical",palettes:u,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:c}:void 0}}if("dimension"===s){var f=[],h=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?h.push(r.primary):h.push(i)}})),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:h}:void 0}}var p=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(p=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(p=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:p}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),rv(rv({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return rv(rv({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(Lb(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=zb(e.measureOverrides,e.explicit),Lb(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=zb(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var jb=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},$b=function(e){throw e.isHandled=!0,e};function Hb(e){return function(t){return"object"===lv(t.datum[e])?t.datum[e].value:void 0}}function Vb(e){return"object"===lv(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Bb(e){return-3===e.datum.value}var Wb={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},Ub={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"};function Yb(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:Wb.COLOR,fontSize:Wb.FONT_SIZE,fontFamily:Wb.FONT_FAMILY},label:{color:Ub.COLOR,fontSize:Ub.FONT_SIZE,fontFamily:Ub.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,s=o.label,l=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=l(null==a?void 0:a.color,"legend.title","color",Wb.COLOR),i.title.fontSize=l(null==a?void 0:a.fontSize,"legend.title","fontSize",Wb.FONT_SIZE),i.title.fontFamily=l(null==a?void 0:a.fontFamily,"legend.title","fontFamily",Wb.FONT_FAMILY),i.label.color=l(null==s?void 0:s.color,"legend.label","color",Ub.COLOR),i.label.fontSize=l(null==s?void 0:s.fontSize,"legend.label","fontSize",Ub.FONT_SIZE),i.label.fontFamily=l(null==s?void 0:s.fontFamily,"legend.label","fontFamily",Ub.FONT_FAMILY),i}var Kb=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},Gb=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Xb(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,s=t.coloring,l=t.theme,c=t.hc,u=Yb({theme:l,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:Kb(a,i,o)},show:"function"==typeof a.show?function(){return Gb(a,c,s)}:Gb(a,c,s),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:s.label||"",fill:u.title.color,fontSize:u.title.fontSize,fontFamily:u.title.fontFamily}}}}function Jb(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Xb(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,s=e.styleOverrides,l=e.viewState,c=e.rtl,u=e.settings,d=e.style,f=t.scaleKey,h=t.theme,p=t.scales,m=Yb({theme:h,key:a,styleOverrides:s}),g=r.layout.dock,y="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},v={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return Rv(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in p?b:f,settings:{layout:{scrollOffset:function(){return l?l.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:c?"rtl":"ltr",horizontal:20},item:{show:i,label:rv({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},y)},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:v[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:u,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,s=e.settings,l=e.style,c=t.scaleKey,u=t.theme,d="".concat(c,"Range"),f=Xb(e,t);if(!f.show)return!1;var h=Yb({theme:u,key:i,styleOverrides:o}),p=f.layout.dock,m="right"===p||"left"===p,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),Rv(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:c,major:d,length:1,tick:{fill:h.label.color,fontSize:h.label.fontSize,fontFamily:h.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:s,style:l})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:tv(tv(tv({},"".concat(t,"start"),(function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),"".concat(t,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),"".concat(t,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1}))}}(e,n))),{interactions:i,components:r}}function Zb(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=rv({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Rv(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=Rv(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=Rv(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return Pb(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var c=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=c}return l?function(e,t,n,r){var i=r.external,o=r.field,a=rv({},e);Rv(a,Tv(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Rv(a,Tv(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Rv(a,Tv(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var l=i.items[s],c=(l.text||l).label;r[c]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(r[c])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,l,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=rv(rv({},e),r.getDataColorSpecials())),n.settings=Rv(e,Fb(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()}(e,{layout:t.layout,app:t.app})})).getMeasure((function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()}(e,{layout:t.layout,app:t.app})})).getAttributeDimension((function(e,t){return function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch($b):Promise.reject()}(e,{layout:t.layout,model:t.model,app:t.app})}));return n.getSnapshotData=jb,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=rv({},i),r={},!n.key)throw new Error("Missing key");t.set(rv(rv({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=rv(rv({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0]||r.getDataColorScales()[0];if(l){var c=l.colors[0]?l.colors:[[]].concat(sv(l.colors.slice(1)));c=Array.isArray(c[0])?c.map((function(e){return e.slice().reverse()})):c.slice().reverse(),i.push({key:"quant",colors:c})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},l=i;if(n){var c={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(sv((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(sv((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var u,d=function(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var f=0,h={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return h[t]=f++,e[0]}}),u={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return h[e.qElemNumber]}}}}}}var p={data:d,range:n.range,domain:n.domain,explicit:c,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=p,u&&(s["".concat(l,"Legend")]=rv(rv({},p),{},{data:u})),t&&t.qHasOtherValues&&u&&((u||p.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};s[l]=Rv({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Rv({},m,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=Hb(r),o=Hb("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,c=e.others,u=e.primary,d=e.type;return a?function(e){return Bb(e)||o(e)?c:l}:n[t]?function(e){return Bb(e)?c:Vb(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?l:o(e)?c:e.resources.scale(t)(i(e))||c}:"constant"===s?function(e){return Bb(e)||o(e)?c:Vb(e)?l:u}:"color"===d?function(e){return Bb(e)||o(e)?c:Vb(e)?l:i(e)||c}:null},s=a(t,r);if(t.measureOverrides){var l=Hb("".concat(r,"MeasureIdx")),c=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return c[t]?c[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=a,u=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")}(e.qNum):e.qText&&Qv(e.qText)?e.qText:u})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=l);var d=tv({},c,n);return r.qDimensionInfo.length>1&&(d["".concat(c,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(c,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,c=void 0===l?"object.legend":l,u=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,h=e.style,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Jb({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:c,styleOverrides:u,settings:f,style:void 0===h?{}:h},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},p)}};return o}var Qb=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function ex(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Qb),o=r.some(Qb),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var tx=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function nx(e){var t,n=e.qHyperCube.qDimensionInfo.some(tx),r=e.qHyperCube.qMeasureInfo.some(tx),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var rx=function(){};function ix(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,c=e.layoutService,u=void 0===c?void 0:c,d=e.createConfig,f=void 0===d?rx:d,h=e.config,p=void 0===h?{}:h,m=e.custom,g=void 0===m?{}:m,y=p.localeInfo,v=p.key,b=p.theme,x=void 0===b?void 0:b,w=p.auto,k=void 0===w?void 0:w,S=p.definitionPath,C=null==u||null===(t=u.getLayout)||void 0===t?void 0:t.call(u),E={theme:x,key:v,localeInfo:y,layout:C,hc:null==u||null===(n=u.getHyperCube)||void 0===n?void 0:n.call(u),legendProps:null==u||null===(r=u.getLayoutValue)||void 0===r?void 0:r.call(u,"legend"),colorProps:rv(rv({},null==u||null===(i=u.getLayoutValue)||void 0===i?void 0:i.call(u,"color")),{},{useBaseColors:C?ex(C):void 0})},M=Zb({picasso:o,model:a,app:s,translator:l,auto:k});!1!==k&&M.auto((function(e){return k?k({layout:e,defaultAuto:nx}):nx(e)}));var _=!1,D={getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(S)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return _},custom:rv({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:ex}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return rv(rv(rv({},e),t),{},{colorProps:rv(rv({},e.colorProps),t.colorProps||{})})}(E,t);return M.config(n),M.getAuxiliarySettings(S).then((function(){_=!0}))}};return D}var ox="center",ax="bottom",sx=[{key:"NoDataExist",alignment:ox,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:ox,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:ox,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:ox},{key:"DataRangeIncludingZero",alignment:ax},{key:"LimitedData",alignment:ax},{key:"NegativeOrZeroValues",alignment:ax}].reduce((function(e,t){return e[t.key]=t,e}),{}),lx=function(){return!1};function cx(e){var t,n=e.layout,r=e.config,i=void 0===r?{}:r,o={disclaimer:void 0,isSuppressing:!1,showDisclaimer:null!==(t=i.args)&&void 0!==t&&t.layoutService?i.args.layoutService.getLayoutValue("showDisclaimer"):null==n?void 0:n.showDisclaimer};return{initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).args;o.disclaimer=function(e){var t=e.args,n=e.disclaimers,r=[];return Object.keys(n).forEach((function(e){var i=sx[e],o=n[e];o&&(o.condition||(null==i?void 0:i.condition)||lx)(t)&&r.push({key:(null==i?void 0:i.translationKey)||(null==i?void 0:i.key)||e,alignment:o.alignment||(null==i?void 0:i.alignment)||ax})})),r.find((function(e){return e.alignment===ox}))||r[0]}({args:rv(rv({layout:n},i.args),e),disclaimers:i.disclaimers||{}}),o.isSuppressing=!(!o.disclaimer||o.disclaimer.alignment!==ox)},getDisclaimer:function(){return o.isSuppressing?o.disclaimer:!1===o.showDisclaimer?void 0:o.disclaimer},getHasSuppressingDisclaimer:function(){return o.isSuppressing}}}function ux(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}var dx=["__proto__","constructor"];function fx(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!dx.some((function(e){return r.includes(e)}))){for(var o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}}function hx(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function px(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,o)}),n)}}function mx(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function gx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yx(Object(n),!0).forEach((function(t){gx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bx=Object.prototype.hasOwnProperty,xx=Object.prototype.toString,wx=Object.defineProperty,kx=Object.getOwnPropertyDescriptor,Sx=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===xx.call(e)},Cx=function(e){if(!e||"[object Object]"!==xx.call(e))return!1;var t,n=bx.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&bx.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||bx.call(e,t)},Ex=function(e,t){wx&&"__proto__"===t.name?wx(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Mx=function(e,t){if("__proto__"===t){if(!bx.call(e,t))return;if(kx)return kx(e,t).value}return e[t]},_x=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Mx(s,n),s!==(i=Mx(t,n))&&(u&&i&&(Cx(i)||(o=Sx(i)))?(o?(o=!1,a=r&&Sx(r)?r:[]):a=r&&Cx(r)?r:{},Ex(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&Ex(s,{name:n,newValue:i}));return s};function Dx(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function qx(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Rx(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=Dx(i.field,o,{cache:t},d);if(-1===e)return;f=_x({qRow:a},e(s))}c[u]=qx(i,f,{key:l})}function Tx(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),f=!!i[e].trackBy,h=typeof i[e].trackBy,p={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=Dx(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=_x({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=qx(u,b,{key:s});if(!u.filter||u.filter(b)){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)Rx({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:p,trackType:h}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function Ox(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Px(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Ax)):void 0===t&&(t=Nx);for(var n,r,i,o,a,s=new zx(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new zx(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Lx)}function Nx(e){return e.children}function Ax(e){return Array.isArray(e)?e[1]:null}function Ix(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Lx(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function zx(e){this.data=e,this.depth=this.height=0,this.parent=null}function Fx(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}zx.prototype=Px.prototype={constructor:zx,count:function(){return this.eachAfter(Ox)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Px(this).eachBefore(Ix)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var jx={depth:-1},$x={},Hx={};function Vx(e){return e.id}function Bx(e){return e.parentId}function Wx(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Ux(e,t););return e.slice(0,t)}function Ux(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function Yx(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=Yx(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=Yx(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function Kx(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...Kx(e[i].children,t-1,n)]);return r}function Gx(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>Kx(e.children,r-1,n)}return!1}const Xx=/^qDimensionInfo(?:\/(\d+))?/,Jx=/^\/?qMeasureInfo\/(\d+)/,Zx=/\/qAttrExprInfo\/(\d+)/,Qx=/\/qAttrDimInfo\/(\d+)/;function ew(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function tw(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,h=ew(n);return Xx.test(d)&&(i=!0,o=+Xx.exec(d)[1],d=r.replace(Xx,"")),Jx.test(d)&&("K"===n.qMode?c=+Jx.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+Jx.exec(d)[1],u=0):u=+Jx.exec(d)[1],d=d.replace(Jx,"")),d&&(Qx.exec(d)?s=+Qx.exec(d)[1]:Zx.exec(d)&&(a=+Zx.exec(d)[1])),l=i?"S"===n.qMode?h[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function nw(e,t){let n,r,i=Gx(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function rw(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function iw(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,h,p,m,g,y;if("primitive"===d.type?(p=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(p=g.map(f),f=null),h&&(y=g.map(h),h=null),p=d.reduce?d.reduce(p):p,y=d.reduceLabel?d.reduceLabel(y,p):String(p)):(p=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=p)):(p=i,y=i)),s.fields){const e=f?f(p):p;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=f?f(p):p;o[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const ow=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Yx(r,e);return o&&o[0]?(t.tree=Px(o[0],n.children||(e=>e[i])),t.tree):null};function aw(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=vx({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e]));return function(){var e,t=Vx,n=Bx;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),h=t,p=n,m=new Map;if(null!=e){const t=f.map(((t,n)=>function(e){let t=(e=`${e}`).length;return Ux(e,t-1)&&!Ux(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(Wx),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(Wx(e)),f.push(Hx));h=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new zx(o),null!=(u=h(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?$x:c)),null!=(u=p(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===$x)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===Hx&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===Hx;--e)c.data=null}if(s.parent=jx,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(Lx),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=Fx(e),r):t},r.parentId=function(e){return arguments.length?(n=Fx(e),r):n},r.path=function(t){return arguments.length?(e=Fx(t),r):e},r}().id((e=>e.__id)).parentId((e=>e.__parent))(l)}const sw=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=nw(o,tw(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function lw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?aw(t):ow(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=ew(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(vx(vx({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?tw(a,{cube:i}):{fieldDepth:0};sw({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=rw(r,a,{key:o});iw({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function cw(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!ow(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(u),h=tw(c,{cube:s}),{nodeFn:p,attrFn:m,valueFn:g}=nw({fieldDepth:0},h);sw({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},x=[],w=p(n.tree),k=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=rw(d,n,{key:l});iw({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),k.push(o)}const S=y?r.collect(x,{main:d,propsArr:f,props:u}):k;o=[...o,...S]}return o}var uw,dw,fw=(uw=function(e){
|
|
15
15
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
16
16
|
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}},uw(dw={exports:{}}),dw.exports);function hw(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const pw={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},mw=/%\)?$/,gw=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,yw=/^\(oct\)/i,vw=/^\(dec\)/i,bw=/^\(hex\)/i,xw=/^\(bin\)/i,ww=/^\(rom\)/i,kw=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Sw=/#|0/g;function Cw(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Ew(e,t,n){const r=hw(e);return n?r:new RegExp(r||"",t)}function Mw(e,t,n,r){let i,o,a,s,l,c,u,d,f,h=e.pattern;var p,m;r&&(e.abbreviate=!0),p=t,(m=n)&&(m=hw(m)),p&&(p=hw(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(f),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(Ew(c,"g"),t)),u=n,n=".",u&&(a=a.replace(Ew(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(Sw)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=mw.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(Ew(t,null,!0),"|").concat(Ew(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class _w{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return pw;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new _w(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],kw.test(e[0])&&(r.positive.isFunctional=!0),e[1]?kw.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?kw.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||Mw(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&Mw(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&Mw(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=function(e,t,n){let r;return gw.test(t)?e=Cw(e,Number(/\d{2}/.exec(t)[0]),t,n):yw.test(t)?e=Cw(e,8,t,n):vw.test(t)?e=Cw(e,10,t,n):bw.test(t)?e=Cw(e,16,t,n):xw.test(t)?e=Cw(e,2,t,n):ww.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=fw(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=fw(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===o?u.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function Dw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function qw(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new _w(...t)}(i,e,t,n,r),a=Dw(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const Rw="D",Tw="T",Ow="TS",Pw=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Nw=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Aw=["January","February","March","April","May","June","July","August","September","October","November","December"],Iw=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Lw(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function zw(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class Fw{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Pw,qDayNames:Nw,qLongMonthNames:Aw,qMonthNames:Iw}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={[Tw]:r.qTimeFmt||"hh:mm:ss",[Rw]:r.qDateFmt||"YYYY-MM-DD",[Ow]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new Fw(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*zw(t),r=60*zw(n),i=60*zw(r),o=1e3*zw(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:Lw("".concat(a.year).slice(-2),2),YYY:Lw("".concat(a.year).slice(-3),3),def:e=>Lw("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:Lw("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:Lw("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>Lw("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>Lw("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>Lw("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>Lw("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const s=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&s.push(e);const l=new RegExp(s.join("|"),"g");return t.replace(l,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}function jw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Fw(...t)}function $w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=jw(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=Dw(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return"IV"!==t?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=jw(i,e,t),r=Dw(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function Hw(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return $w(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),qw(n,r,i,o,t)}(t,i),f="dimension"===s?"first":(e,t)=>d(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return h}function Vw(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Hw(_x({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Vw("qAttrDimInfo",t,n,a,_x({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=Vw("qAttrExprInfo",t,n,a,_x({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=Vw("qMeasureInfo",t,n,a,_x({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function Bw(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=Bw.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=cw,a.hierarchy=lw,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=Tx,a.pages=i.qDataPages,a.hierarchy=lw):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...Vw("qDimensionInfo",i,e,"",_x({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...Vw("qMeasureInfo",i,e,"",_x({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),i=Hw(vx({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),s}const Ww=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Uw=/\/qDimensionInfo(?:\/(\d+))?/,Yw=/\/qMeasureInfo\/(\d+)/,Kw=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Gw=/\/qAttrExprInfo\/(\d+)/,Xw=/\/?qHyperCube/,Jw=/\/?qTreeData/,Zw=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Qw=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function ek(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;return e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;Xw.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Zw):Jw.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Qw);let s=!0;if(Uw.test(e)&&(r=+Uw.exec(e)[1]),Yw.test(e)&&(i=+Yw.exec(e)[1]),Kw.test(e)){i=-1,r=0;const e=+Kw.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(Gw.test(e)){const e=i;if(t){i=0;const a=Yx(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+Gw.exec(n)[1]}else r>-1?(r=-1,i=+Gw.exec(n)[1]):i+=+Gw.exec(n)[1]+1}return Ww.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var c}function tk(e){Bw.util=e.data("matrix").util,e.data("q",Bw),e.formatter("q-number",qw),e.formatter("q-time",$w)}function nk(e){var t=ux(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function rk(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}tk.qBrushHelper=ek,tk.selections=ek;var ik="Shift";var ok=function(e,t){return t[e]?ok(e+1,t):e},ak=function(e,t){var n=t.reduce((function(e,t){return e[t]=!0,e}),{});return e.reduce((function(e,t,r){var i=ok(r,n);return n[i]=!0,e[r]=i,e}),{})};function sk(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,s=i.qMeasureInfo,l=void 0===s?[]:s;return{dimensions:ak(a,r.dimensions||[]),measures:ak(l,r.measures||[])}}function lk(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach((function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)})),t}var ck=[],uk=0,dk=function(e){var t=ck.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))};function fk(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,c=void 0===l?"rangeClear":l,u=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(u||!d)return!1;var f=t.component(o);return!!f&&(f.emit(c),"string"==typeof s&&t.brush(s).clear(),f)}var hk=["chart","document","selections","selectionInfo"],pk=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=iv(e,hk);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function mk(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function gk(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var c=i.reset,u=void 0===c?mk:c,d=i.clear,f=!1!==d&&function(e){var t=e.clear,n=void 0===t?pk:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(rv({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return fk({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}(rv(rv({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return fk({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}(rv(rv({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,c=void 0!==l&&l,u=e.brushName,d=fk({selectionInfo:t,chart:n,document:r,eventName:c?void 0:s,componentName:o,brushName:void 0!==u&&u});if(d){var f=d.settings.settings,h=f.scale,p=f.brush,m=n.scale(h).data().fields.map((function(e){return e.id()})),g=n.brush(p),y=g.brushes().filter((function(e){return"range"===e.type&&m.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}(rv(rv({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;fk({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(rv(rv({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}(rv(rv({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,c=e.cleared,u=void 0!==c&&c,d=e.brushName;fk({selectionInfo:t,chart:n,document:r,eventName:u?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}(rv(rv({},t),e))}},t))}}({clear:d,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:f,reset:u,actions:a}),p={};Object.entries(h).forEach((function(e){var t=av(e,2),n=t[0],r=t[1];p[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},c=function(e){return Object.assign(r,e||{})},u=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(rv(rv({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,selectionInfo:r,setSelectionInfo:c})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(rv(rv({defaultFunc:u({event:e,components:t}),setSelectionInfo:c,clear:i},l),{},{event:e,components:t}))}:function(e){u({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:f,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(p).forEach((function(e){var t=av(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(p).forEach((function(e){var t=av(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var yk=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function vk(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,c=void 0===l?void 0:l,u=o.selectionActions,d=void 0===u?{}:u,f=d.clear,h=d.reset,p=o.selectionEvents,m=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,g=o.brushEvents,y=void 0===g?{}:g,v=o.brushName,b=void 0===v?"selection":v,x=o.brushMaxListeners,w=void 0===x?20:x,k=o.brushRanges,S=void 0!==k&&k,C=o.interceptors,E=void 0===C?{}:C,M=o.selectionsFn,_=void 0===M?i.selections:M,D=t.brush(b);if("number"==typeof w&&D.setMaxListeners(w),S){var q=!0===S?yk:S;D.configure({ranges:q})}var R={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},T=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var c=++uk,u=null,d={dimensions:[],measures:[]},f=[],h={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var p=function(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));if(l.length>1){var c=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=nk({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,sv(o))})),a.filter(Boolean)}({layout:s,values:l});return c}return l},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}({brush:r,getConfig:function(){return{layout:u,allowSimultaneous:f}}}),m=p.rangeInterceptor,g=p.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",(function(){return n.begin(l)}));var y={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};!function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))}(n,y);var v=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(h=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){var e=a(r,h,u),t=sk({layout:u,filtered:d});e.forEach((function(e){var r=lk({selection:e,fieldMap:t});(function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}})(r,o.select.brushSelectionIncludeMax,v),n.select(r)}))}))):r.on("update",(function(){var e=a(r,h,u),t=sk({layout:u,filtered:d});e.forEach((function(e){n.select(lk({selection:e,fieldMap:t}))}))})),0===ck.length&&document.addEventListener("keyup",dk),ck.push({key:c,selections:n}),{layout:function(e){u=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){u=null;var e=ck.indexOf(ck.filter((function(e){return e.key===c}))[0]);-1!==e&&ck.splice(e,1),ck.length||document.removeEventListener("keyup",dk),function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))}(n,y)}}}({brush:D,majorScale:c,actions:n,selections:r,picassoQ:i,selectionsFn:_});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=av(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:D,interceptors:E});var O=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=av(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]}));return function(){a.forEach((function(e){var n=av(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),c=gk({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),u=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==ik||(t.lasso.action(!0),n=!0)},i=function(e){e.key===ik&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),c(),u()}}({chart:t,brush:D,actions:n,selections:r,selectionInfo:R.selectionInfo,selectionActions:{clear:f,reset:h},selectionEvents:m,brushEvents:y});if(s){var P=!0===s?sv(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;T.allowSimultaneous(P)}return{unbindEvents:O,state:R,picassoSelections:T,brush:D}}var bk=["colorField","useLegendCube"];function xk(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=vk({chart:t,actions:i,selections:n,picassoQ:tk,config:a}),l=s.unbindEvents,c=s.state,u=s.picassoSelections,d=s.brush,f=a.custom,h=void 0===f?{}:f,p=a.legendAlias,m=void 0===p?void 0:p,g=a.setBrushAliases,y=void 0===g?rk:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return c.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===lv(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.singleSelectIndex;return c.singleSelectDimensions[e]},getCanSelect:function(){return c.canSelect},getSelectionsObject:function(){return n},getSelectionInfo:function(){return c.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,c=void 0===l?[]:l;return s.lockedDimensions=c.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=c.map((function(e,t){return nk({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===c.length||c.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=c[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:u,layout:e});Object.assign(c,t)},setFilteredFields:function(e){u.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=iv(e,bk),o=rv({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);y(rv(rv({},o),{},{defaultFunc:function(){return rk(o)}}))},destroy:function(){l(),u.release()},custom:rv({},h)}}var wk="'Source Sans Pro', 'Arial', 'sans-serif'",kk="#333333",Sk="#595959",Ck="#737373",Ek="#cccccc",Mk="#e6e6e6";function _k(e){var t={};return[].concat(sv(e),sv([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Sk],["object","axis.label.name","fontFamily",wk],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Ek],["object","axis.line.minor","color",Mk],["object","axis.title","color"],["object","axis.title","fontFamily",wk],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Mk],["object","grid.line.major","color",Ek],["object","grid.line.minor","color",Mk],["object","label.value","color",Sk],["object","label.value","fontFamily",wk],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Sk],[!1,"label.value","lightColor",Mk],["object","outOfRange","color","#999"],["object","legend.title","color",kk],["object","legend.title","fontFamily",wk],["object","legend.title","fontSize","15px"],["object","legend.label","color",Sk],["object","legend.label","fontFamily",wk],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",kk],["object","referenceLine.label.name","fontFamily",wk],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Mk],["object","referenceLine.outOfBounds","fontFamily",wk],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Ck,function(e){return"transparent"===e?Ck:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var Dk=function(e){return e};function qk(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},s=r.reduce((function(e,t){var n=av(t,2),r=n[0],i=n[1];return e[r]=i,e}),{});return o.forEach((function(e){var r=av(e,5),i=r[0],o=r[1],l=r[2],c=r[3],u=r[4],d=void 0===u?function(e){return e}:u,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var s=t.getStyle(n,r,i);return void 0===s?a:s}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:l,defaultValue:c}),h=(s["".concat(o,".").concat(l)]||Dk)(d(f));fx(a,[o,l].filter(Boolean).join("."),h)})),i.forEach((function(e){var t=av(e,2),n=t[0],r=t[1];fx(a,n,r)})),a}var Rk={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},Tk="chart-modules-tooltip",Ok="#".concat(Tk);function Pk(){if(!document.querySelector(Ok)){var e=document.createElement("div");e.id=Tk,e.setAttribute("data-qs-css",""),e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Nk(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Pk()},beforeUpdate:function(){Pk()},destroyed:function(){var e;null!=(e=document.querySelector(Ok))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(Ok)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Ak="position",Ik={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},Lk=function(e){return e.data.value},zk=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};var Fk=Number.MAX_VALUE;function jk(e){var t=e.nodes.reduce((function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e}),{xMin:Fk,xMax:-Fk,yMin:Fk,yMax:-Fk}),n=t.xMin,r=t.xMax,i=t.yMin;return{x:n,y:i,width:r-n,height:t.yMax-i}}function $k(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.nodes;if(!o.length)return[];var a=av(o,1)[0].key,s=n.main.collectibles;if(!s.length)return[];var l=n.main.triggers.find((function(e){return-1!==e.keys.indexOf(a)}))||{},c=l.collect,u=l.placement;if(!c||!c.from||!u)return[];var d={triggerer:a,position:i.get(Ak)},f=(function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.collectConfig,o=e.collectibles,a=e.meta,s=i.from,l={chart:t,expando:n,nodes:r,collectConfig:i,collectibles:o,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=av(e.nodes,1)[0];return["container"===t.type&&t.children[0]||t]}(l);case"position":return function(e){var t=e.collectibles,n=e.meta;return e.chart.shapesAt(n.position.absolute,{components:t.map((function(e){return{key:e.key}}))})}(l);case"dimension":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=av(e.nodes,1)[0],o=n.filter,a="function"==typeof o?o:function(){return!0},s=n.by,l=void 0===s?Lk:s;return r.reduce((function(e,n){var r=n.major,o=void 0===r?zk:r,a=Ik[n.type]||n.type;return e.push.apply(e,sv(t.findShapes(a).filter((function(e){return e.key===n.key&&e.data&&o({data:e.data})===l({data:i.data})})))),e}),[]).filter(a)}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=e.meta,o=av(e.nodes,1)[0].localBounds,a=n.distance,s=n.filter,l="function"==typeof s?s:function(){return!0},c=r.map((function(e){return e.key}));return t.shapesAt({cx:i.position.absolute.x,cy:i.position.absolute.y,r:a||Math.max(o.width,o.height)},{components:c.map((function(e){return{key:e}}))}).filter(l)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:i})}(l);default:return[]}}({chart:t,expando:r,nodes:o,collectConfig:c,collectibles:s,meta:d})||[]).map((function(e){return e.children.length?e.children[0]:e}));return f.length?function(e){var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=av(o,1)[0],c=Array.isArray(i)?i:[i],u={bounds:l.bounds,key:l.key},d=jk({nodes:a}),f=0;f<c.length;f++){var h=c[f];if("function"==typeof h){var p=h({chart:t,expando:r,hovered:o,collected:sv(a),meta:s,collectedBounds:d,combineBounds:jk});if(p)return p}if("trigger"===h)return u;if("collectible"===h){var m=n.main.placements.collectible;return{bounds:"function"==typeof m?m({collected:sv(a)}):d,key:a[0].key}}}return u}({chart:t,config:n,expando:r,placementConfig:i,hovered:o,collected:a,meta:s}),c=l.bounds,u=l.key,d=av(a,1)[0].desc;return[{bounds:c,nodes:a,data:a.map((function(e){return e.data})),key:u,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:u,hovered:o,collected:f,meta:d}):[]}var Hk=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Vk=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Bk=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Wk=function(e){return Hk.test(e)},Uk=function(e){return Vk.test(e)||Bk.test(e)};function Yk(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(Wk(r))return"ltr";if(Uk(r))return"rtl"}return"ltr"}function Kk(e){var t=e.config,n=e.h,r=e.context,i={section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,i=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,i=void 0===r?{}:r,o=i.bold,a=void 0!==o&&o,s=i.italic,l=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":a?"bold":"normal","font-style":void 0!==s&&s?"italic":"normal","text-align":t.rtl?"right":"left",direction:Yk(n)},colspan:2}],visibility:rv(rv({},{count:!0}),l)}}({config:t,value:n,style:r,visibility:i})},measure:function(e){var r=e.label,i=e.value,o=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,i,o=e.h,a=e.label,s=e.value,l=e.color,c=e.style,u=e.survive,d=e.visibility,f=e.config.rtl,h=o("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:f?[":",a]:[a,":"],style:{"text-align":f?"right":"left","font-weight":null!=c&&null!==(t=c.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=c&&null!==(n=c.label)&&void 0!==n&&n.italic?"italic":"normal",direction:Yk(a)}},{content:l?f?[s,h]:[h,s]:s,style:{"text-align":f?"left":"right","vertical-align":"middle","font-weight":null!=c&&null!==(r=c.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=c&&null!==(i=c.value)&&void 0!==i&&i.italic?"italic":"normal",direction:Yk(s)}}],survive:rv(rv({},{color:!1,duplicate:!1}),u),visibility:rv(rv({},{count:!0}),d)}}({config:t,h:n,label:r,value:i,color:o,style:a,survive:s,visibility:l})},divider:function(){return function(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],visibility:rv(rv({},{count:!1}),t)}}({visibility:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).visibility})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:rv(rv({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:rv(rv({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var i=e.nodes,o=e.property,a=e.filter,s=void 0===a||a,l=e.visibility,c=e.fillColor;return function(e){var t=e.config,n=e.h,r=e.context,i=e.nodes,o=e.property,a=e.filter,s=e.visibility,l=e.fillColor,c=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:rv(rv({},{count:!0}),s)},d=t.getColorSettings();if("color"===d.type||!d.fieldType)return u;var f=av(i,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,i=e.node,o=i.data[r];if(o){if(-3===i.data.value)return i.data.label;var a=n.resources.dataset(o.source.key).field(o.source.field).formatter(),s=o.value,l=o.label,c=t.getColorSettings();if(a&&"measure"===c.fieldType)return Number.isNaN(+s)?"-":a(o.value);var u=l||s;return void 0===u||Number.isNaN(u)||"NaN"===u?"-":u}}({config:t,context:r,property:o,node:f}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,i=e.config.getColorSettings();if(i.label)return i.label;var o=r.data[n];if(o&&"color"!==i.type){var a=t.resources.dataset,s=o.source,l=s.key,c=s.field;return a(l).field(c).title()}}({config:t,context:r,property:o,node:f});var h=null!=l?l:function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:f}),p=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":h,margin:"0 8px"}});return u.content.push({content:c?[":",u.label]:[u.label,":"],style:{"text-align":c?"right":"left",direction:Yk(u.label)}},{content:c?[u.value,p]:[p,u.value],style:{"text-align":c?"left":"right","vertical-align":"middle",direction:Yk(u.value)}}),u}({config:t,h:n,context:r,nodes:i,property:o,filter:s,visibility:l,fillColor:c})}};return i}function Gk(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.h,a=e.data,s=e.style,l=av(a,1)[0],c=function(e){var t=e.config,n=e.nodes.reduce((function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]={sorting:Object.keys(e).length,items:[]}),e[r].items.push(n),e}),{});return Object.keys(n).map((function(e){return n[e]})).sort((function(e,t){return e.sorting-t.sorting})).map((function(e){return e.items}))}({config:r,nodes:l.node.nodes}),u=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.h,o=e.context,a=e.groups,s=o.node.meta,l=o.resources,c=l.dataset,u=l.formatter,d=Kk({config:n,h:i,context:o}),f=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:c}),h=a.map((function(e){var t=d.section({content:sv((n.main.section({expando:r,h:i,nodes:e,dataset:c,formatter:u,meta:s,create:d,util:f})||[]).filter((function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length}))).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find((function(e){return"color"===e.type&&e.filter})),i=r?n.filter((function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value})):n;return t.main.showDuplicateMeasures?i:i.reduce((function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var i="".concat(t.label,"-").concat(t.value);return e.memory[i]||(e.memory[i]=!0,e.filtered.push(t)),e}),{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t}));return n.main.sections({chart:t,expando:r,h:i,nodes:o.node.nodes,dataset:c,formatter:u,meta:s,create:d,util:f,sections:h}),h.filter(Boolean)}({chart:t,config:r,expando:i,h:o,context:l,groups:c}),d=function(e){var t=e.translator,n=e.config,r=e.context,i=e.templates,o=n.main.layout,a=o.rows,s=o.grouping,l=o.single,c=function(e){var t=e.limit,n=e.grouping,r=e.single,i={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var o=e.visibility,a=e.index;if(r&&0!==a)return n?(i.index.started!==a&&i.index.group!==a&&(i.overflow++,i.index.group=a),!1):(i.overflow++,!1);if(i.count>=t){if(!n)return i.overflow++,!1;if(i.index.started!==a)return i.index.group!==a&&(i.overflow++,i.index.group=a),!1}return o.count&&i.count++,n&&(i.index.started=a),!0},overflow:function(){return i.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:i}):l}),u=i.reduce((function(e,t,n){var r=t.type,o=t.content;"section"===r&&(void 0===o?[]:o).forEach((function(t){c.process({visibility:t.visibility,index:n})&&e.push(t.content)}));var a=n===i.length-1;return"divider"!==r||a||c.process({visibility:t.visibility,index:n})&&e.push(t.content),e}),[]).filter((function(e){return e.length})),d=c.overflow();return d&&u.push(function(e){var t=e.translator,n=e.config,r=e.count,i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=Yk(i);return[{content:i,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:o},colspan:2}]}({translator:t,config:n,count:d})),u}({translator:n,config:r,context:l,templates:u});return d.length?function(e){var t=e.h,n=e.style;return e.rows.map((function(e){return t("tr",{},e.map((function(e){var r={style:rv(rv({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})))}))}({h:o,style:s,rows:d}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:o})}function Xk(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.internal;if(!r.main.key)return!1;var a=hx(),s=Nk({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,c=l.afterShow,u=l.afterHide,d=function(){var e=a.get("collected");return{expando:i,nodes:e.nodes,meta:e.meta}};return Rv(!0,s,{settings:{filter:function(e){return $k({chart:t,config:r,expando:i,internal:o,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var o=e.h,a=e.data,s=e.style;return Gk({chart:t,translator:n,config:r,expando:i,h:o,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return c(d())},afterHide:function(){return u(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function Jk(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=Nk({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Rv(!0,r,{settings:{filter:function(e){return e.filter((function(e){return e.data&&e.key===n.component}))},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:rv(rv({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function Zk(e){var t=e.config.main.triggers.reduce((function(e,t){return t.keys.forEach((function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)})),e}),{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter((function(e){return t.key[e.key]})).reduce((function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e}),{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}var Qk=function(){return!0};function eS(e){var t=e.config.main.triggers.reduce((function(e,t){var n=t.filter;return t.keys.forEach((function(t){e[t]="function"==typeof n?n:Qk})),e}),{});return function(e){var n=t[e.key];return!n||n(e)}}function tS(e){var t=e.chart,n=e.event,r=e.component,i={absolute:{x:0,y:0},relative:{x:0,y:0}},o=t.element.getBoundingClientRect(),a=o.left,s=o.top;i.absolute.x=(void 0===n.clientX?Math.floor(n.srcEvent.clientX):n.clientX)-a,i.absolute.y=(void 0===n.clientY?Math.floor(n.srcEvent.clientY):n.clientY)-s;var l=t.component(r);if(l){var c=l.rect.computedInner;i.relative.x=i.absolute.x-c.x,i.relative.y=i.absolute.y-c.y}return i}function nS(e){var t=e.chart,n=e.filter,r=e.hits,i=e.position,o=[];if(r.position.length&&o.push.apply(o,sv(t.shapesAt(i.absolute,{components:r.position.map((function(e){return{key:e}}))}).filter(n))),!o.length&&r.distances.length){var a=[];r.distances.forEach((function(e){a.push.apply(a,sv(t.shapesAt({cx:i.absolute.x,cy:i.absolute.y,r:e},{components:r.distanceKeys[e].map((function(e){return{key:e}}))}).filter(n)))})),a.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find((function(e){return"path"===e.type}));if(r)return r;var i=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce((function(e,t){var n=i(t);return n<e.distance&&(e.distance=n,e.node=t),e}),{node:t[0],distance:i(t[0])}).node}({nodes:a,origin:i.relative}))}return o}function rS(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=n.delay.tap,s=Zk({config:n}),l=eS({config:n}),c=n.main.triggers.reduce((function(e,t){return e.push.apply(e,sv(t.keys)),e}),[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return-1!==c.indexOf(e.key)})).length>0}},recognizeWith:"tap",events:tv({},"tooltipTap",(function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var c=t.component(n.main.key);if(c&&c.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),d=s({components:u});if(d.any){var f=av(d.components,1)[0],h=tS({chart:t,event:e,component:f});i.set(Ak,h);var p=nS({chart:t,filter:l,hits:d,position:h});if(p.length){var m=p[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return o.collectNodes({nodes:p})},meta:{triggerer:m,position:h}}).then((function(){c.emit("show",e,{nodes:p,delay:a})})).catch((function(){}))}else c.emit("hide")}else c.emit("hide")}}}))}}function iS(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=Zk({config:n}),s=eS({config:n}),l=function(e){var t=e.config,n=e.expando,r=e.internal,i=e.facade,o=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,c=e.nodes,u=function(e){var t=e.nodes;return JSON.stringify(t.map((function(e){var t;return{key:e.key,bounds:e.bounds,value:null===(t=e.data)||void 0===t?void 0:t.value}})))}({nodes:c});if(!s.ongoing[u]){s.ongoing[u]=!0,s.latest=u;var d=c[0].key;o({expando:n,event:t,collectNodes:function(){return i.collectNodes({nodes:c})},meta:{triggerer:d,position:r.get(Ak)}}).then((function(){u===s.latest&&l.emit("show",t,{nodes:c,delay:a})})).catch((function(){l.emit("show")})).finally((function(){delete s.ongoing[u],u===s.latest&&(s.latest=void 0)}))}}}({config:n,expando:r,internal:i,facade:o}),c=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){c.forEach((function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")}))};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),o=t.component(n.main.key);if(o&&o.show){var c=a({components:r});if(c.any){var u=av(c.components,1)[0],d=tS({chart:t,event:e,component:u});i.set(Ak,d);var f=nS({chart:t,filter:s,hits:c,position:d});if(!f.length)return void o.emit("hide");l({event:e,tooltip:o,nodes:f})}else o.emit("hide")}var h=n.legend;if(h.keys.tooltip&&h.keys.component){var p=t.component(h.keys.tooltip);p&&p.show&&(r.some((function(e){return e.key===h.keys.component}))?p.emit("show",e):p.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function oS(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Rv(!0,{},{rtl:!1,enable:Rk.FALSE,getColorSettings:Rk.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:Rk.FALSE,getGroupByValue:Rk.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:Rk.ARRAY,sections:Rk.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:Rk.NOOP,afterHide:Rk.NOOP},interaction:{mouseleave:Rk.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),i=hx(),o=hx(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[Xk({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),Jk({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:i,internal:o})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal;return{collectNodes:function(e){var o=e.nodes,a=av($k({chart:t,config:n,expando:r,internal:i,nodes:o}),1)[0];return(void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:i});return{gestures:[rS({chart:t,config:n,expando:r,internal:i,facade:o})],native:iS({chart:t,config:n,expando:r,internal:i,facade:o})}}({chart:t,config:r,expando:i,internal:o})),a.interactions},expando:i}}var aS={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function sS(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=bg(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:c}=aS;return c.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==ux(l,e)&&fx(l,e,null);else{const e=t[0],n=t[1].split("].")[1];ux(l,e,[]).forEach((e=>{void 0!==ux(e,n)&&fx(e,n,null)}))}})),l}var lS={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)}))}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=sS(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=sS(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function cS(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=e&&e.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}var uS={exports:{}},dS={},fS=Symbol.for("react.element"),hS=Symbol.for("react.portal"),pS=Symbol.for("react.fragment"),mS=Symbol.for("react.strict_mode"),gS=Symbol.for("react.profiler"),yS=Symbol.for("react.provider"),vS=Symbol.for("react.context"),bS=Symbol.for("react.forward_ref"),xS=Symbol.for("react.suspense"),wS=Symbol.for("react.memo"),kS=Symbol.for("react.lazy"),SS=Symbol.iterator;var CS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ES=Object.assign,MS={};function _S(e,t,n){this.props=e,this.context=t,this.refs=MS,this.updater=n||CS}function DS(){}function qS(e,t,n){this.props=e,this.context=t,this.refs=MS,this.updater=n||CS}_S.prototype.isReactComponent={},_S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},_S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},DS.prototype=_S.prototype;var RS=qS.prototype=new DS;RS.constructor=qS,ES(RS,_S.prototype),RS.isPureReactComponent=!0;var TS=Array.isArray,OS=Object.prototype.hasOwnProperty,PS={current:null},NS={key:!0,ref:!0,__self:!0,__source:!0};function AS(e,t,n){var r,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)OS.call(t,r)&&!NS.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:fS,type:e,key:o,ref:a,props:i,_owner:PS.current}}function IS(e){return"object"==typeof e&&null!==e&&e.$$typeof===fS}var LS=/\/+/g;function zS(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function FS(e,t,n,r,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case fS:case hS:a=!0}}if(a)return i=i(a=e),e=""===r?"."+zS(a,0):r,TS(i)?(n="",null!=e&&(n=e.replace(LS,"$&/")+"/"),FS(i,t,n,"",(function(e){return e}))):null!=i&&(IS(i)&&(i=function(e,t){return{$$typeof:fS,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(LS,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=""===r?".":r+":",TS(e))for(var s=0;s<e.length;s++){var l=r+zS(o=e[s],s);a+=FS(o,t,n,l,i)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=SS&&e[SS]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(o=e.next()).done;)a+=FS(o=o.value,t,n,l=r+zS(o,s++),i);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function jS(e,t,n){if(null==e)return e;var r=[],i=0;return FS(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function $S(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var HS={current:null},VS={transition:null},BS={ReactCurrentDispatcher:HS,ReactCurrentBatchConfig:VS,ReactCurrentOwner:PS};function WS(){throw Error("act(...) is not supported in production builds of React.")}dS.Children={map:jS,forEach:function(e,t,n){jS(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return jS(e,(function(){t++})),t},toArray:function(e){return jS(e,(function(e){return e}))||[]},only:function(e){if(!IS(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},dS.Component=_S,dS.Fragment=pS,dS.Profiler=gS,dS.PureComponent=qS,dS.StrictMode=mS,dS.Suspense=xS,dS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BS,dS.act=WS,dS.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ES({},e.props),i=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=PS.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)OS.call(t,l)&&!NS.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:fS,type:e.type,key:i,ref:o,props:r,_owner:a}},dS.createContext=function(e){return(e={$$typeof:vS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:yS,_context:e},e.Consumer=e},dS.createElement=AS,dS.createFactory=function(e){var t=AS.bind(null,e);return t.type=e,t},dS.createRef=function(){return{current:null}},dS.forwardRef=function(e){return{$$typeof:bS,render:e}},dS.isValidElement=IS,dS.lazy=function(e){return{$$typeof:kS,_payload:{_status:-1,_result:e},_init:$S}},dS.memo=function(e,t){return{$$typeof:wS,type:e,compare:void 0===t?null:t}},dS.startTransition=function(e){var t=VS.transition;VS.transition={};try{e()}finally{VS.transition=t}},dS.unstable_act=WS,dS.useCallback=function(e,t){return HS.current.useCallback(e,t)},dS.useContext=function(e){return HS.current.useContext(e)},dS.useDebugValue=function(){},dS.useDeferredValue=function(e){return HS.current.useDeferredValue(e)},dS.useEffect=function(e,t){return HS.current.useEffect(e,t)},dS.useId=function(){return HS.current.useId()},dS.useImperativeHandle=function(e,t,n){return HS.current.useImperativeHandle(e,t,n)},dS.useInsertionEffect=function(e,t){return HS.current.useInsertionEffect(e,t)},dS.useLayoutEffect=function(e,t){return HS.current.useLayoutEffect(e,t)},dS.useMemo=function(e,t){return HS.current.useMemo(e,t)},dS.useReducer=function(e,t,n){return HS.current.useReducer(e,t,n)},dS.useRef=function(e){return HS.current.useRef(e)},dS.useState=function(e){return HS.current.useState(e)},dS.useSyncExternalStore=function(e,t,n){return HS.current.useSyncExternalStore(e,t,n)},dS.useTransition=function(){return HS.current.useTransition()},dS.version="18.3.1",uS.exports=dS;var US=uS.exports,YS=r(US),KS=t({__proto__:null,default:YS},[US]);const GS={d:"M7 4h9v1H7zm2 4h7v1H9zm2 4h5v1h-5zM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4z"},XS={d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"},JS={d:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"},ZS={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},QS="m 13.914 4.5 l -7.707 7.707 L 2 8 l 0.707 -0.707 l 3.5 3.5 l 7 -7 Z",eC={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},tC={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},nC="N",rC="H",iC="C",oC={N:void 0,H:GS,C:JS},aC=(e,t)=>{switch(e.qGrouping){case nC:return;case rC:return{path:GS,tooltip:"Tooltip.dimensions.drilldown",onClick:void 0};case iC:return{path:t?XS:JS,tooltip:"Tooltip.dimensions.cyclic",onClick:t?({onError:n})=>{t.getDimension(e.qLibraryId).then((e=>{e.stepCycle?e.stepCycle(1):n()})).catch((()=>null))}:void 0};default:return}};function sC(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=jy.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function lC(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),c=bg(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,i&&i({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),sC(e,a,c)}))}function cC(e){return e.qGrouping===nC?e.qFallbackTitle||"":e.title||""}const uC=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))},dC=async(e,t,n,r,i)=>{const o=await uC(e,n),a=n.filter((e=>!o.includes(e.qDef.cId))),s=await Promise.all(a.map((async n=>{const o=await((e,t)=>{if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null))})(n,e),a=await function(e,t,n,r){if(e.qLibraryId)return r?r.qDim.qGrouping===nC&&r.qDim.qLabelExpression?Promise.resolve(r.qDim.qLabelExpression):Promise.resolve(r.qDim.title):Promise.resolve(n.get("Object.ErrorMessage.MissingDimension"));const i=e.qDef.qLabelExpression;if(i)return t.evaluate(i);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(n,e,r,o),s=(null==o?void 0:o.qDim.qGrouping)||n.qDef.qGrouping,l=oC[s],c=s!==nC;return{id:n.qDef.cId,icon:l,groupItem:c,selected:!1,title:a,onSelect(e){lC(t,e,n.qDef.cId,"qDimensions",i)}}})));return s};function fC({column:e,dir:t,dock:n,altList:r,model:i,translator:o,app:a,onChange:s,activeInfo:l,allowChangeOfAlternatives:c}){const u=l.qGrouping===nC,d=l.qGrouping===rC;return 0===r.length&&u?null:{dir:t,dock:n,getPopoverOptions:async()=>{const t=await(async(e,t,n,r,i="/qHyperCubeDef")=>{switch(e.qGrouping){case rC:{const n=e.qGroupFallbackTitles.slice(0,e.qGroupPos+1).map(((n,o)=>({id:`${e.cId}-${o}`,title:n,selected:e.qGroupPos===o,onSelect:()=>{t.drillUp(i,r,e.qGroupPos-o)}})));return{id:e.cId,icon:GS,groupItem:!0,title:e.title,selected:!1,children:n}}case iC:{const t=await(null==n?void 0:n.getDimension(e.qLibraryId)),r=null!=t&&t.setActiveField?e.qGroupFallbackTitles.map(((n,r)=>({id:`${e.cId}-${r}`,title:n,selected:e.qGroupPos===r,onSelect:()=>{t.setActiveField(r).catch((()=>null))}}))):[];return{id:e.cId,icon:JS,groupItem:!0,title:e.title,selected:!1,children:r}}default:return{selected:!0,id:e.cId,title:cC(e)}}})(l,i,a,e),n=c?await dC(a,i,r,o,s):[];return(u||d||0===t.children.length)&&0===n.length?[]:[t,...n]}}}function hC(e,t,n,r,i="/qHyperCubeDef"){return{breadcrumbs:e.qGrouping===rC?e.qGroupFallbackTitles.slice(0,e.qGroupPos):[],icon:aC(e,r),index:t,locked:!!e.qLocked,text:e.qGrouping===nC?e.qFallbackTitle:e.qGroupFallbackTitles[e.qGroupPos],popoverText:cC(e),...n&&{drillUp(e){n.drillUp(i,t,e)}},id:e.cId}}function pC({activeInfo:e,altList:t,app:n,dir:r,dock:i,model:o,onChange:a,skipAttributeExpressions:s,translator:l,allowChangeOfAlternatives:c}){return 0===t.length?null:{dir:r,dock:i,getPopoverOptions:async()=>{const r=[{id:e.cId,title:e.qFallbackTitle,selected:!0,onSelect:()=>{}}],i=await uC(n,t),u=t.filter((e=>!i.includes(e.qDef.cId))),d=c?await Promise.all(u.map((async e=>{const t=await function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,n,l);return{id:e.qDef.cId,selected:!1,title:t,onSelect(t){lC(o,t,e.qDef.cId,"qMeasures",a,s)}}}))):[];return 0===d.length?[]:[...r,...d]}}}function mC(e,t){return{breadcrumbs:[],index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}function gC(){return gC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gC.apply(null,arguments)}var yC={exports:{}};function vC(){}function bC(){}bC.resetWarningCache=vC;yC.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:bC,resetWarningCache:vC};return n.PropTypes=n,n}();var xC=r(yC.exports),wC={black:"#000",white:"#fff"},kC="#e57373",SC="#f44336",CC="#d32f2f",EC="#ff4081",MC="#f50057",_C="#c51162",DC="#7986cb",qC="#3f51b5",RC="#303f9f",TC="#64b5f6",OC="#2196f3",PC="#1976d2",NC="#81c784",AC="#4caf50",IC="#388e3c",LC="#ffb74d",zC="#ff9800",FC="#f57c00",jC={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};function $C(){return $C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$C.apply(null,arguments)}function HC(e){return HC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},HC(e)}function VC(e){return e&&"object"===HC(e)&&e.constructor===Object}function BC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?$C({},e):e;return VC(e)&&VC(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(VC(t[i])&&i in e?r[i]=BC(e[i],t[i],n):r[i]=t[i])})),r}function WC(e){var t=function(e,t){if("object"!=HC(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=HC(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==HC(t)?t:t+""}function UC(e,t,n){return(t=WC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YC(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function KC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function GC(e){if(e.type)return e;if("#"===e.charAt(0))return GC(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(YC(3,e));var r=e.substring(t+1,e.length-1).split(",");return r=r.map((function(e){return parseFloat(e)})),{type:n,values:r}}function XC(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function JC(e){var t="hsl"===(e=GC(e)).type?GC(function(e){var t=(e=GC(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),XC({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ZC(e,t){return e=GC(e),t=KC(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,XC(e)}function QC(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function eE(e,t){if(null==e)return{};var n,r,i=QC(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var tE=["xs","sm","md","lg","xl"];function nE(e,t,n){var r;return $C({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),$C({paddingLeft:t(2),paddingRight:t(2)},n,UC({},e.up("sm"),$C({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},UC(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),UC(r,e.up("sm"),{minHeight:64}),r)},n)}var rE={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:wC.white,default:jC[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},iE={text:{primary:wC.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:jC[800],default:"#303030"},action:{active:wC.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function oE(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=GC(e),t=KC(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return XC(e)}(e.main,i):"dark"===t&&(e.dark=function(e,t){if(e=GC(e),t=KC(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return XC(e)}(e.main,o)))}function aE(e){var t=e.primary,n=void 0===t?{light:DC,main:qC,dark:RC}:t,r=e.secondary,i=void 0===r?{light:EC,main:MC,dark:_C}:r,o=e.error,a=void 0===o?{light:kC,main:SC,dark:CC}:o,s=e.warning,l=void 0===s?{light:LC,main:zC,dark:FC}:s,c=e.info,u=void 0===c?{light:TC,main:OC,dark:PC}:c,d=e.success,f=void 0===d?{light:NC,main:AC,dark:IC}:d,h=e.type,p=void 0===h?"light":h,m=e.contrastThreshold,g=void 0===m?3:m,y=e.tonalOffset,v=void 0===y?.2:y,b=eE(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){var t=function(e,t){var n=JC(e),r=JC(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,iE.text.primary)>=g?iE.text.primary:rE.text.primary;return t}var w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=$C({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(YC(4,t));if("string"!=typeof e.main)throw new Error(YC(5,JSON.stringify(e.main)));return oE(e,"light",n,v),oE(e,"dark",r,v),e.contrastText||(e.contrastText=x(e.main)),e},k={dark:iE,light:rE};return BC($C({common:wC,type:p,primary:w(n),secondary:w(i,"A400","A200","A700"),error:w(a),warning:w(l),info:w(u),success:w(f),grey:jC,contrastThreshold:g,getContrastText:x,augmentColor:w,tonalOffset:v},k[p]),b)}function sE(e){return Math.round(1e5*e)/1e5}function lE(e){return sE(e)}var cE={textTransform:"uppercase"},uE='"Roboto", "Helvetica", "Arial", sans-serif';function dE(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?uE:r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,l=void 0===s?300:s,c=n.fontWeightRegular,u=void 0===c?400:c,d=n.fontWeightMedium,f=void 0===d?500:d,h=n.fontWeightBold,p=void 0===h?700:h,m=n.htmlFontSize,g=void 0===m?16:m,y=n.allVariants,v=n.pxToRem,b=eE(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,w=v||function(e){return"".concat(e/g*x,"rem")},k=function(e,t,n,r,o){return $C({fontFamily:i,fontWeight:e,fontSize:w(t),lineHeight:n},i===uE?{letterSpacing:"".concat(sE(r/t),"em")}:{},o,y)},S={h1:k(l,96,1.167,-1.5),h2:k(l,60,1.2,-.5),h3:k(u,48,1.167,0),h4:k(u,34,1.235,.25),h5:k(u,24,1.334,0),h6:k(f,20,1.6,.15),subtitle1:k(u,16,1.75,.15),subtitle2:k(f,14,1.57,.1),body1:k(u,16,1.5,.15),body2:k(u,14,1.43,.15),button:k(f,14,1.75,.4,cE),caption:k(u,12,1.66,.4),overline:k(u,12,2.66,1,cE)};return BC($C({htmlFontSize:g,pxToRem:w,round:lE,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:f,fontWeightBold:p},S),b,{clone:!1})}function fE(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var hE=["none",fE(0,2,1,-1,0,1,1,0,0,1,3,0),fE(0,3,1,-2,0,2,2,0,0,1,5,0),fE(0,3,3,-2,0,3,4,0,0,1,8,0),fE(0,2,4,-1,0,4,5,0,0,1,10,0),fE(0,3,5,-1,0,5,8,0,0,1,14,0),fE(0,3,5,-1,0,6,10,0,0,1,18,0),fE(0,4,5,-2,0,7,10,1,0,2,16,1),fE(0,5,5,-3,0,8,10,1,0,3,14,2),fE(0,5,6,-3,0,9,12,1,0,3,16,2),fE(0,6,6,-3,0,10,14,1,0,4,18,3),fE(0,6,7,-4,0,11,15,1,0,4,20,3),fE(0,7,8,-4,0,12,17,2,0,5,22,4),fE(0,7,8,-4,0,13,19,2,0,5,24,4),fE(0,7,9,-4,0,14,21,2,0,5,26,4),fE(0,8,9,-5,0,15,22,2,0,6,28,5),fE(0,8,10,-5,0,16,24,2,0,6,30,5),fE(0,8,11,-5,0,17,26,2,0,6,32,5),fE(0,9,11,-5,0,18,28,2,0,7,34,6),fE(0,9,12,-6,0,19,29,2,0,7,36,6),fE(0,10,13,-6,0,20,31,3,0,8,38,7),fE(0,10,13,-6,0,21,33,3,0,8,40,7),fE(0,10,14,-6,0,22,35,3,0,8,42,7),fE(0,11,14,-7,0,23,36,3,0,9,44,8),fE(0,11,15,-7,0,24,38,3,0,9,46,8)],pE={borderRadius:4};function mE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gE(e,t){if(e){if("string"==typeof e)return mE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mE(e,t):void 0}}function yE(e){return function(e){if(Array.isArray(e))return mE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gE(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||gE(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var xE={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},wE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function kE(e){return"".concat(Math.round(e),"ms")}var SE={easing:xE,duration:wE,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?wE.standard:n,i=t.easing,o=void 0===i?xE.easeInOut:i,a=t.delay,s=void 0===a?0:a;return eE(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:kE(r)," ").concat(o," ").concat("string"==typeof s?s:kE(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},CE={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function EE(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.spacing,l=e.typography,c=void 0===l?{}:l,u=eE(e,["breakpoints","mixins","palette","spacing","typography"]),d=aE(a),f=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=eE(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function c(e,t){var r=tE.indexOf(t);return r===tE.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(i,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[tE[r+1]]?n[tE[r+1]]:t)-a/100).concat(i,")")}return $C({keys:tE,values:n,up:l,down:function(e){var t=tE.indexOf(e)+1,r=n[tE[t]];return t===tE.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:c,only:function(e){return c(e,e)},width:function(e){return n[e]}},s)}(n),h=bE(s),p=BC({breakpoints:f,direction:"ltr",mixins:nE(f,h,i),overrides:{},palette:d,props:{},shadows:hE,typography:dE(d,c),spacing:h,shape:pE,transitions:SE,zIndex:CE},u),m=arguments.length,g=new Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return p=g.reduce((function(e,t){return BC(e,t)}),p)}var ME="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",_E=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function DE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,c=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==_E.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[ME]&&""===a?"".concat(o,"-").concat(c()):o}return"".concat(s).concat(i).concat(c())}}function qE(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var RE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TE="object"===("undefined"==typeof window?"undefined":RE(window))&&"object"===("undefined"==typeof document?"undefined":RE(document))&&9===document.nodeType;function OE(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WC(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PE(e,t){return PE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},PE(e,t)}function NE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PE(e,t)}function AE(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var IE={}.constructor;function LE(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(LE);if(e.constructor!==IE)return e;var t={};for(var n in e)t[n]=LE(e[n]);return t}function zE(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=LE(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var FE=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},jE=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=FE(e[n]," ");else t=FE(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function $E(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function HE(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function VE(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=$E(n),l=s.linebreak,c=s.space;if(e&&o++,a)if(Array.isArray(a))for(var u=0;u<a.length;u++){var d=a[u];for(var f in d){var h=d[f];null!=h&&(r&&(r+=l),r+=HE(f+":"+c+jE(h)+";",o))}}else for(var p in a){var m=a[p];null!=m&&(r&&(r+=l),r+=HE(p+":"+c+jE(m)+";",o))}for(var g in t){var y=t[g];null!=y&&"fallbacks"!==g&&(r&&(r+=l),r+=HE(g+":"+c+jE(y)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),HE(""+e+c+"{"+r,--o)+HE("}",o)):r}var BE=/([[\].#*$><+~=|^:(),"'`\s])/g,WE="undefined"!=typeof CSS&&CSS.escape,UE=function(e){return WE?WE(e):e.replace(BE,"\\$1")},YE=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),KE=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(AE(AE(i)),s),i.selectorText="."+UE(i.id)),i}NE(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=jE(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?$C({},e,{allowEmpty:!0}):e;return VE(this.selectorText,this.style,n)},OE(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(YE),GE={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new KE(e,t,n)}},XE={indent:1,children:!0},JE=/@([\w-]+)/,ZE=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(JE);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new kM($C({},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.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=XE);var t=$E(e).linebreak;if(null==e.indent&&(e.indent=XE.indent),null==e.children&&(e.children=XE.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),QE=/@container|@media|@supports\s+/,eM={onCreateRule:function(e,t,n){return QE.test(e)?new ZE(e,t,n):null}},tM={indent:1,children:!0},nM=/@keyframes\s+([\w-]+)/,rM=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(nM);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:UE(a(this,o)),this.rules=new kM($C({},n,{parent:this})),t)this.rules.add(s,t[s],$C({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=tM);var t=$E(e).linebreak;if(null==e.indent&&(e.indent=tM.indent),null==e.children&&(e.children=tM.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),iM=/@keyframes\s+/,oM=/\$([\w-]+)/g,aM=function(e,t){return"string"==typeof e?e.replace(oM,(function(e,n){return n in t?t[n]:e})):e},sM=function(e,t,n){var r=e[t],i=aM(r,n);i!==r&&(e[t]=i)},lM={onCreateRule:function(e,t,n){return"string"==typeof e&&iM.test(e)?new rM(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&sM(e,"animation-name",n.keyframes),"animation"in e&&sM(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return aM(e,r.keyframes);default:return e}}},cM=function(e){function t(){return e.apply(this,arguments)||this}return NE(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?$C({},e,{allowEmpty:!0}):e;return VE(this.key,this.style,n)},t}(YE),uM={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new cM(e,t,n):null}},dM=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=$E(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=VE(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return VE(this.at,this.style,e)},e}(),fM=/@font-face/,hM={onCreateRule:function(e,t,n){return fM.test(e)?new dM(e,t,n):null}},pM=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return VE(this.key,this.style,e)},e}(),mM={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new pM(e,t,n):null}},gM=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),yM={"@charset":!0,"@import":!0,"@namespace":!0},vM={onCreateRule:function(e,t,n){return e in yM?new gM(e,t,n):null}},bM=[GE,eM,lM,uM,hM,mM,vM],xM={process:!0},wM={force:!0,process:!0},kM=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,c=r.scoped,u=$C({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(u.selector="."+UE(this.classes[d]));var f=zE(d,t,u);if(!f)return null;this.register(f);var h=void 0===u.index?this.index.length:u.index;return this.index.splice(h,0,f),f},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=$C({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof KE?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof rM&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof KE?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof rM&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=xM);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var c=t.style[l];c!==s[l]&&t.prop(l,c,wM)}for(var u in s){var d=t.style[u],f=s[u];null==d&&d!==f&&t.prop(u,null,wM)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=$E(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),SM=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=$C({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new kM(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),CM=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),EM=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=QC(t,["attached"]),i=$E(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},OE(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),MM=new EM,_M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),DM="2f1acc6c3a606b082e5eef5e54414ffb";null==_M[DM]&&(_M[DM]=0);var qM=_M[DM]++,RM=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+qM+i+t:o+n.key+"-"+qM+(i?"-"+i:"")+"-"+t}},TM=function(e){var t;return function(){return t||(t=e()),t}},OM=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},PM=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=jE(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(e){return!1}return!0},NM=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},AM=function(e,t){return e.selectorText=t,e.selectorText===t},IM=TM((function(){return document.querySelector("head")}));function LM(e){var t=MM.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=IM(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var zM=TM((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),FM=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},jM=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},$M=function(){function e(e){this.getPropertyValue=OM,this.setProperty=PM,this.removeProperty=NM,this.setSelector=AM,this.hasInsertedRules=!1,this.cssRules=[],e&&MM.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=zM();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=LM(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else IM().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=jM(n,t);if(!1===(i=FM(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=jM(n,t),l=FM(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof SM&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),HM=0,VM=function(){function e(e){this.id=HM++,this.version="10.10.0",this.plugins=new CM,this.options={id:{minify:!1},createGenerateId:RM,Renderer:TE?$M:null,plugins:[]},this.generateId=RM({minify:!1});for(var t=0;t<bM.length;t++)this.plugins.use(bM[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=$C({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===MM.index?0:MM.index+1);var r=new SM(e,$C({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),MM.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=$C({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=zE(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),BM=function(e){return new VM(e)},WM="object"==typeof CSS&&null!=CSS&&"number"in CSS;function UM(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=UM(r);o&&(t||(t={}),t[n]=o)}}return t}
|
|
17
17
|
/**
|
|
@@ -39,7 +39,7 @@ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.le
|
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the MIT license found in the
|
|
41
41
|
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/function $q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hq=new Set,Vq={};function Bq(e,t){Wq(e,t),Wq(e+"Capture",t)}function Wq(e,t){for(Vq[e]=t,e=0;e<t.length;e++)Hq.add(t[e])}var Uq=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Yq=Object.prototype.hasOwnProperty,Kq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gq={},Xq={};function Jq(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Zq={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Zq[e]=new Jq(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Zq[t]=new Jq(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Zq[e]=new Jq(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Zq[e]=new Jq(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Zq[e]=new Jq(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Zq[e]=new Jq(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){Zq[e]=new Jq(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){Zq[e]=new Jq(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){Zq[e]=new Jq(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Qq=/[\-:]([a-z])/g;function eR(e){return e[1].toUpperCase()}function tR(e,t,n,r){var i=Zq.hasOwnProperty(t)?Zq[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!Yq.call(Xq,e)||!Yq.call(Gq,e)&&(Kq.test(e)?Xq[e]=!0:(Gq[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Qq,eR);Zq[t]=new Jq(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Qq,eR);Zq[t]=new Jq(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Qq,eR);Zq[t]=new Jq(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){Zq[e]=new Jq(e,1,!1,e.toLowerCase(),null,!1,!1)})),Zq.xlinkHref=new Jq("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){Zq[e]=new Jq(e,1,!1,e.toLowerCase(),null,!0,!0)}));var nR=Fq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rR=Symbol.for("react.element"),iR=Symbol.for("react.portal"),oR=Symbol.for("react.fragment"),aR=Symbol.for("react.strict_mode"),sR=Symbol.for("react.profiler"),lR=Symbol.for("react.provider"),cR=Symbol.for("react.context"),uR=Symbol.for("react.forward_ref"),dR=Symbol.for("react.suspense"),fR=Symbol.for("react.suspense_list"),hR=Symbol.for("react.memo"),pR=Symbol.for("react.lazy"),mR=Symbol.for("react.offscreen"),gR=Symbol.iterator;function yR(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=gR&&e[gR]||e["@@iterator"])?e:null}var vR,bR=Object.assign;function xR(e){if(void 0===vR)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);vR=t&&t[1]||""}return"\n"+vR+e}var wR=!1;function kR(e,t){if(!e||wR)return"";wR=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{wR=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xR(e):""}function SR(e){switch(e.tag){case 5:return xR(e.type);case 16:return xR("Lazy");case 13:return xR("Suspense");case 19:return xR("SuspenseList");case 0:case 2:case 15:return e=kR(e.type,!1);case 11:return e=kR(e.type.render,!1);case 1:return e=kR(e.type,!0);default:return""}}function CR(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case oR:return"Fragment";case iR:return"Portal";case sR:return"Profiler";case aR:return"StrictMode";case dR:return"Suspense";case fR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case cR:return(e.displayName||"Context")+".Consumer";case lR:return(e._context.displayName||"Context")+".Provider";case uR:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case hR:return null!==(t=e.displayName||null)?t:CR(e.type)||"Memo";case pR:t=e._payload,e=e._init;try{return CR(e(t))}catch(e){}}return null}function ER(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return CR(t);case 8:return t===aR?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function MR(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function _R(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function DR(e){e._valueTracker||(e._valueTracker=function(e){var t=_R(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function qR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_R(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function RR(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function TR(e,t){var n=t.checked;return bR({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function OR(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=MR(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function PR(e,t){null!=(t=t.checked)&&tR(e,"checked",t,!1)}function NR(e,t){PR(e,t);var n=MR(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?IR(e,t.type,n):t.hasOwnProperty("defaultValue")&&IR(e,t.type,MR(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function AR(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function IR(e,t,n){"number"===t&&RR(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var LR=Array.isArray;function zR(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+MR(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function FR(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error($q(91));return bR({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function jR(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error($q(92));if(LR(n)){if(1<n.length)throw Error($q(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:MR(n)}}function $R(e,t){var n=MR(t.value),r=MR(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function HR(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function VR(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function BR(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?VR(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var WR,UR=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((WR=WR||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=WR.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function YR(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var KR={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},GR=["Webkit","ms","Moz","O"];function XR(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||KR.hasOwnProperty(e)&&KR[e]?(""+t).trim():t+"px"}function JR(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=XR(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(KR).forEach((function(e){GR.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),KR[t]=KR[e]}))}));var ZR=bR({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function QR(e,t){if(t){if(ZR[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error($q(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error($q(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error($q(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error($q(62))}}function eT(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tT=null;function nT(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var rT=null,iT=null,oT=null;function aT(e){if(e=QN(e)){if("function"!=typeof rT)throw Error($q(280));var t=e.stateNode;t&&(t=tA(t),rT(e.stateNode,e.type,t))}}function sT(e){iT?oT?oT.push(e):oT=[e]:iT=e}function lT(){if(iT){var e=iT,t=oT;if(oT=iT=null,aT(e),t)for(e=0;e<t.length;e++)aT(t[e])}}function cT(e,t){return e(t)}function uT(){}var dT=!1;function fT(e,t,n){if(dT)return e(t,n);dT=!0;try{return cT(e,t,n)}finally{dT=!1,(null!==iT||null!==oT)&&(uT(),lT())}}function hT(e,t){var n=e.stateNode;if(null===n)return null;var r=tA(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error($q(231,t,typeof n));return n}var pT=!1;if(Uq)try{var mT={};Object.defineProperty(mT,"passive",{get:function(){pT=!0}}),window.addEventListener("test",mT,mT),window.removeEventListener("test",mT,mT)}catch(Wh){pT=!1}function gT(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var yT=!1,vT=null,bT=!1,xT=null,wT={onError:function(e){yT=!0,vT=e}};function kT(e,t,n,r,i,o,a,s,l){yT=!1,vT=null,gT.apply(wT,arguments)}function ST(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function CT(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function ET(e){if(ST(e)!==e)throw Error($q(188))}function MT(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=ST(e)))throw Error($q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ET(i),e;if(o===r)return ET(i),t;o=o.sibling}throw Error($q(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error($q(189))}}if(n.alternate!==r)throw Error($q(190))}if(3!==n.tag)throw Error($q(188));return n.stateNode.current===n?e:t}(e),null!==e?_T(e):null}function _T(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=_T(e);if(null!==t)return t;e=e.sibling}return null}var DT=jq.unstable_scheduleCallback,qT=jq.unstable_cancelCallback,RT=jq.unstable_shouldYield,TT=jq.unstable_requestPaint,OT=jq.unstable_now,PT=jq.unstable_getCurrentPriorityLevel,NT=jq.unstable_ImmediatePriority,AT=jq.unstable_UserBlockingPriority,IT=jq.unstable_NormalPriority,LT=jq.unstable_LowPriority,zT=jq.unstable_IdlePriority,FT=null,jT=null;var $T=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(HT(e)/VT|0)|0},HT=Math.log,VT=Math.LN2;var BT=64,WT=4194304;function UT(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function YT(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=UT(s):0!==(o&=a)&&(r=UT(o))}else 0!==(a=n&~i)?r=UT(a):0!==o&&(r=UT(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-$T(t)),r|=e[n],t&=~i;return r}function KT(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function GT(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function XT(){var e=BT;return!(4194240&(BT<<=1))&&(BT=64),e}function JT(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ZT(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-$T(t)]=n}function QT(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$T(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var eO=0;function tO(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var nO,rO,iO,oO,aO,sO=!1,lO=[],cO=null,uO=null,dO=null,fO=new Map,hO=new Map,pO=[],mO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function gO(e,t){switch(e){case"focusin":case"focusout":cO=null;break;case"dragenter":case"dragleave":uO=null;break;case"mouseover":case"mouseout":dO=null;break;case"pointerover":case"pointerout":fO.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hO.delete(t.pointerId)}}function yO(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=QN(t))&&rO(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function vO(e){var t=ZN(e.target);if(null!==t){var n=ST(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=CT(n)))return e.blockedOn=t,void aO(e.priority,(function(){iO(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function bO(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=RO(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=QN(n))&&rO(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);tT=r,n.target.dispatchEvent(r),tT=null,t.shift()}return!0}function xO(e,t,n){bO(e)&&n.delete(t)}function wO(){sO=!1,null!==cO&&bO(cO)&&(cO=null),null!==uO&&bO(uO)&&(uO=null),null!==dO&&bO(dO)&&(dO=null),fO.forEach(xO),hO.forEach(xO)}function kO(e,t){e.blockedOn===t&&(e.blockedOn=null,sO||(sO=!0,jq.unstable_scheduleCallback(jq.unstable_NormalPriority,wO)))}function SO(e){function t(t){return kO(t,e)}if(0<lO.length){kO(lO[0],e);for(var n=1;n<lO.length;n++){var r=lO[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==cO&&kO(cO,e),null!==uO&&kO(uO,e),null!==dO&&kO(dO,e),fO.forEach(t),hO.forEach(t),n=0;n<pO.length;n++)(r=pO[n]).blockedOn===e&&(r.blockedOn=null);for(;0<pO.length&&null===(n=pO[0]).blockedOn;)vO(n),null===n.blockedOn&&pO.shift()}var CO=nR.ReactCurrentBatchConfig,EO=!0;function MO(e,t,n,r){var i=eO,o=CO.transition;CO.transition=null;try{eO=1,DO(e,t,n,r)}finally{eO=i,CO.transition=o}}function _O(e,t,n,r){var i=eO,o=CO.transition;CO.transition=null;try{eO=4,DO(e,t,n,r)}finally{eO=i,CO.transition=o}}function DO(e,t,n,r){if(EO){var i=RO(e,t,n,r);if(null===i)CN(e,t,r,qO,n),gO(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return cO=yO(cO,e,t,n,r,i),!0;case"dragenter":return uO=yO(uO,e,t,n,r,i),!0;case"mouseover":return dO=yO(dO,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return fO.set(o,yO(fO.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,hO.set(o,yO(hO.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(gO(e,r),4&t&&-1<mO.indexOf(e)){for(;null!==i;){var o=QN(i);if(null!==o&&nO(o),null===(o=RO(e,t,n,r))&&CN(e,t,r,qO,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else CN(e,t,r,null,n)}}var qO=null;function RO(e,t,n,r){if(qO=null,null!==(e=ZN(e=nT(r))))if(null===(t=ST(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=CT(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qO=e,null}function TO(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(PT()){case NT:return 1;case AT:return 4;case IT:case LT:return 16;case zT:return 536870912;default:return 16}default:return 16}}var OO=null,PO=null,NO=null;function AO(){if(NO)return NO;var e,t,n=PO,r=n.length,i="value"in OO?OO.value:OO.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return NO=i.slice(e,1<t?1-t:void 0)}function IO(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function LO(){return!0}function zO(){return!1}function FO(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?LO:zO,this.isPropagationStopped=zO,this}return bR(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=LO)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=LO)},persist:function(){},isPersistent:LO}),t}var jO,$O,HO,VO={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},BO=FO(VO),WO=bR({},VO,{view:0,detail:0}),UO=FO(WO),YO=bR({},WO,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oP,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==HO&&(HO&&"mousemove"===e.type?(jO=e.screenX-HO.screenX,$O=e.screenY-HO.screenY):$O=jO=0,HO=e),jO)},movementY:function(e){return"movementY"in e?e.movementY:$O}}),KO=FO(YO),GO=FO(bR({},YO,{dataTransfer:0})),XO=FO(bR({},WO,{relatedTarget:0})),JO=FO(bR({},VO,{animationName:0,elapsedTime:0,pseudoElement:0})),ZO=bR({},VO,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QO=FO(ZO),eP=FO(bR({},VO,{data:0})),tP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nP={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},rP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=rP[e])&&!!t[e]}function oP(){return iP}var aP=bR({},WO,{key:function(e){if(e.key){var t=tP[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=IO(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?nP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oP,charCode:function(e){return"keypress"===e.type?IO(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?IO(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),sP=FO(aP),lP=FO(bR({},YO,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),cP=FO(bR({},WO,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oP})),uP=FO(bR({},VO,{propertyName:0,elapsedTime:0,pseudoElement:0})),dP=bR({},YO,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fP=FO(dP),hP=[9,13,27,32],pP=Uq&&"CompositionEvent"in window,mP=null;Uq&&"documentMode"in document&&(mP=document.documentMode);var gP=Uq&&"TextEvent"in window&&!mP,yP=Uq&&(!pP||mP&&8<mP&&11>=mP),vP=String.fromCharCode(32),bP=!1;function xP(e,t){switch(e){case"keyup":return-1!==hP.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wP(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var kP=!1;var SP={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function CP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!SP[e.type]:"textarea"===t}function EP(e,t,n,r){sT(r),0<(t=MN(t,"onChange")).length&&(n=new BO("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var MP=null,_P=null;function DP(e){vN(e,0)}function qP(e){if(qR(eA(e)))return e}function RP(e,t){if("change"===e)return t}var TP=!1;if(Uq){var OP;if(Uq){var PP="oninput"in document;if(!PP){var NP=document.createElement("div");NP.setAttribute("oninput","return;"),PP="function"==typeof NP.oninput}OP=PP}else OP=!1;TP=OP&&(!document.documentMode||9<document.documentMode)}function AP(){MP&&(MP.detachEvent("onpropertychange",IP),_P=MP=null)}function IP(e){if("value"===e.propertyName&&qP(_P)){var t=[];EP(t,_P,e,nT(e)),fT(DP,t)}}function LP(e,t,n){"focusin"===e?(AP(),_P=n,(MP=t).attachEvent("onpropertychange",IP)):"focusout"===e&&AP()}function zP(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qP(_P)}function FP(e,t){if("click"===e)return qP(t)}function jP(e,t){if("input"===e||"change"===e)return qP(t)}var $P="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function HP(e,t){if($P(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Yq.call(t,i)||!$P(e[i],t[i]))return!1}return!0}function VP(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function BP(e,t){var n,r=VP(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=VP(r)}}function WP(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?WP(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function UP(){for(var e=window,t=RR();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=RR((e=t.contentWindow).document)}return t}function YP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function KP(e){var t=UP(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&WP(n.ownerDocument.documentElement,n)){if(null!==r&&YP(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=BP(n,o);var a=BP(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var GP=Uq&&"documentMode"in document&&11>=document.documentMode,XP=null,JP=null,ZP=null,QP=!1;function eN(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;QP||null==XP||XP!==RR(r)||("selectionStart"in(r=XP)&&YP(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ZP&&HP(ZP,r)||(ZP=r,0<(r=MN(JP,"onSelect")).length&&(t=new BO("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=XP)))}function tN(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nN={animationend:tN("Animation","AnimationEnd"),animationiteration:tN("Animation","AnimationIteration"),animationstart:tN("Animation","AnimationStart"),transitionend:tN("Transition","TransitionEnd")},rN={},iN={};function oN(e){if(rN[e])return rN[e];if(!nN[e])return e;var t,n=nN[e];for(t in n)if(n.hasOwnProperty(t)&&t in iN)return rN[e]=n[t];return e}Uq&&(iN=document.createElement("div").style,"AnimationEvent"in window||(delete nN.animationend.animation,delete nN.animationiteration.animation,delete nN.animationstart.animation),"TransitionEvent"in window||delete nN.transitionend.transition);var aN=oN("animationend"),sN=oN("animationiteration"),lN=oN("animationstart"),cN=oN("transitionend"),uN=new Map,dN="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fN(e,t){uN.set(e,t),Bq(t,[e])}for(var hN=0;hN<dN.length;hN++){var pN=dN[hN];fN(pN.toLowerCase(),"on"+(pN[0].toUpperCase()+pN.slice(1)))}fN(aN,"onAnimationEnd"),fN(sN,"onAnimationIteration"),fN(lN,"onAnimationStart"),fN("dblclick","onDoubleClick"),fN("focusin","onFocus"),fN("focusout","onBlur"),fN(cN,"onTransitionEnd"),Wq("onMouseEnter",["mouseout","mouseover"]),Wq("onMouseLeave",["mouseout","mouseover"]),Wq("onPointerEnter",["pointerout","pointerover"]),Wq("onPointerLeave",["pointerout","pointerover"]),Bq("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bq("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bq("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bq("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bq("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bq("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mN="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gN=new Set("cancel close invalid load scroll toggle".split(" ").concat(mN));function yN(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(kT.apply(this,arguments),yT){if(!yT)throw Error($q(198));var c=vT;yT=!1,vT=null,bT||(bT=!0,xT=c)}}(r,t,void 0,e),e.currentTarget=null}function vN(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;yN(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;yN(i,s,c),o=l}}}if(bT)throw e=xT,bT=!1,xT=null,e}function bN(e,t){var n=t[GN];void 0===n&&(n=t[GN]=new Set);var r=e+"__bubble";n.has(r)||(SN(t,e,2,!1),n.add(r))}function xN(e,t,n){var r=0;t&&(r|=4),SN(n,e,r,t)}var wN="_reactListening"+Math.random().toString(36).slice(2);function kN(e){if(!e[wN]){e[wN]=!0,Hq.forEach((function(t){"selectionchange"!==t&&(gN.has(t)||xN(t,!1,e),xN(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[wN]||(t[wN]=!0,xN("selectionchange",!1,t))}}function SN(e,t,n,r){switch(TO(t)){case 1:var i=MO;break;case 4:i=_O;break;default:i=DO}n=i.bind(null,t,n,e),i=void 0,!pT||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function CN(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=ZN(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}fT((function(){var r=o,i=nT(n),a=[];e:{var s=uN.get(e);if(void 0!==s){var l=BO,c=e;switch(e){case"keypress":if(0===IO(n))break e;case"keydown":case"keyup":l=sP;break;case"focusin":c="focus",l=XO;break;case"focusout":c="blur",l=XO;break;case"beforeblur":case"afterblur":l=XO;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=KO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=GO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=cP;break;case aN:case sN:case lN:l=JO;break;case cN:l=uP;break;case"scroll":l=UO;break;case"wheel":l=fP;break;case"copy":case"cut":case"paste":l=QO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=lP}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&(null!=(m=hT(p,f))&&u.push(EN(p,m,h)))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===tT||!(c=n.relatedTarget||n.fromElement)||!ZN(c)&&!c[KN])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?ZN(c):null)&&(c!==(d=ST(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=KO,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=lP,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==l?s:eA(l),h=null==c?s:eA(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=h,m=null,ZN(i)===r&&((u=new u(f,p+"enter",c,n,i)).target=h,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,p=0,h=u=l;h;h=_N(h))p++;for(h=0,m=f;m;m=_N(m))h++;for(;0<p-h;)u=_N(u),p--;for(;0<h-p;)f=_N(f),h--;for(;p--;){if(u===f||null!==f&&u===f.alternate)break e;u=_N(u),f=_N(f)}u=null}else u=null;null!==l&&DN(a,s,l,u,!1),null!==c&&null!==d&&DN(a,d,c,u,!0)}if("select"===(l=(s=r?eA(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=RP;else if(CP(s))if(TP)g=jP;else{g=zP;var y=LP}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=FP);switch(g&&(g=g(e,r))?EP(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&IR(s,"number",s.value)),y=r?eA(r):window,e){case"focusin":(CP(y)||"true"===y.contentEditable)&&(XP=y,JP=r,ZP=null);break;case"focusout":ZP=JP=XP=null;break;case"mousedown":QP=!0;break;case"contextmenu":case"mouseup":case"dragend":QP=!1,eN(a,n,i);break;case"selectionchange":if(GP)break;case"keydown":case"keyup":eN(a,n,i)}var v;if(pP)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else kP?xP(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(yP&&"ko"!==n.locale&&(kP||"onCompositionStart"!==b?"onCompositionEnd"===b&&kP&&(v=AO()):(PO="value"in(OO=i)?OO.value:OO.textContent,kP=!0)),0<(y=MN(r,b)).length&&(b=new eP(b,e,null,n,i),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=wP(n))&&(b.data=v))),(v=gP?function(e,t){switch(e){case"compositionend":return wP(t);case"keypress":return 32!==t.which?null:(bP=!0,vP);case"textInput":return(e=t.data)===vP&&bP?null:e;default:return null}}(e,n):function(e,t){if(kP)return"compositionend"===e||!pP&&xP(e,t)?(e=AO(),NO=PO=OO=null,kP=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return yP&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=MN(r,"onBeforeInput")).length&&(i=new eP("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}vN(a,t)}))}function EN(e,t,n){return{instance:e,listener:t,currentTarget:n}}function MN(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=hT(e,n))&&r.unshift(EN(e,o,i)),null!=(o=hT(e,t))&&r.push(EN(e,o,i))),e=e.return}return r}function _N(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function DN(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=hT(n,o))&&a.unshift(EN(n,l,s)):i||null!=(l=hT(n,o))&&a.push(EN(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var qN=/\r\n?/g,RN=/\u0000|\uFFFD/g;function TN(e){return("string"==typeof e?e:""+e).replace(qN,"\n").replace(RN,"")}function ON(e,t,n){if(t=TN(t),TN(e)!==t&&n)throw Error($q(425))}function PN(){}var NN=null,AN=null;function IN(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var LN="function"==typeof setTimeout?setTimeout:void 0,zN="function"==typeof clearTimeout?clearTimeout:void 0,FN="function"==typeof Promise?Promise:void 0,jN="function"==typeof queueMicrotask?queueMicrotask:void 0!==FN?function(e){return FN.resolve(null).then(e).catch($N)}:LN;function $N(e){setTimeout((function(){throw e}))}function HN(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void SO(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);SO(t)}function VN(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function BN(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var WN=Math.random().toString(36).slice(2),UN="__reactFiber$"+WN,YN="__reactProps$"+WN,KN="__reactContainer$"+WN,GN="__reactEvents$"+WN,XN="__reactListeners$"+WN,JN="__reactHandles$"+WN;function ZN(e){var t=e[UN];if(t)return t;for(var n=e.parentNode;n;){if(t=n[KN]||n[UN]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=BN(e);null!==e;){if(n=e[UN])return n;e=BN(e)}return t}n=(e=n).parentNode}return null}function QN(e){return!(e=e[UN]||e[KN])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function eA(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error($q(33))}function tA(e){return e[YN]||null}var nA=[],rA=-1;function iA(e){return{current:e}}function oA(e){0>rA||(e.current=nA[rA],nA[rA]=null,rA--)}function aA(e,t){rA++,nA[rA]=e.current,e.current=t}var sA={},lA=iA(sA),cA=iA(!1),uA=sA;function dA(e,t){var n=e.type.contextTypes;if(!n)return sA;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fA(e){return null!=(e=e.childContextTypes)}function hA(){oA(cA),oA(lA)}function pA(e,t,n){if(lA.current!==sA)throw Error($q(168));aA(lA,t),aA(cA,n)}function mA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error($q(108,ER(e)||"Unknown",i));return bR({},n,r)}function gA(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sA,uA=lA.current,aA(lA,e),aA(cA,cA.current),!0}function yA(e,t,n){var r=e.stateNode;if(!r)throw Error($q(169));n?(e=mA(e,t,uA),r.__reactInternalMemoizedMergedChildContext=e,oA(cA),oA(lA),aA(lA,e)):oA(cA),aA(cA,n)}var vA=null,bA=!1,xA=!1;function wA(e){null===vA?vA=[e]:vA.push(e)}function kA(){if(!xA&&null!==vA){xA=!0;var e=0,t=eO;try{var n=vA;for(eO=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}vA=null,bA=!1}catch(t){throw null!==vA&&(vA=vA.slice(e+1)),DT(NT,kA),t}finally{eO=t,xA=!1}}return null}var SA=[],CA=0,EA=null,MA=0,_A=[],DA=0,qA=null,RA=1,TA="";function OA(e,t){SA[CA++]=MA,SA[CA++]=EA,EA=e,MA=t}function PA(e,t,n){_A[DA++]=RA,_A[DA++]=TA,_A[DA++]=qA,qA=e;var r=RA;e=TA;var i=32-$T(r)-1;r&=~(1<<i),n+=1;var o=32-$T(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,RA=1<<32-$T(t)+i|n<<i|r,TA=o+e}else RA=1<<o|n<<i|r,TA=e}function NA(e){null!==e.return&&(OA(e,1),PA(e,1,0))}function AA(e){for(;e===EA;)EA=SA[--CA],SA[CA]=null,MA=SA[--CA],SA[CA]=null;for(;e===qA;)qA=_A[--DA],_A[DA]=null,TA=_A[--DA],_A[DA]=null,RA=_A[--DA],_A[DA]=null}var IA=null,LA=null,zA=!1,FA=null;function jA(e,t){var n=uj(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function $A(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,IA=e,LA=VN(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,IA=e,LA=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==qA?{id:RA,overflow:TA}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=uj(18,null,null,0)).stateNode=t,n.return=e,e.child=n,IA=e,LA=null,!0);default:return!1}}function HA(e){return!(!(1&e.mode)||128&e.flags)}function VA(e){if(zA){var t=LA;if(t){var n=t;if(!$A(e,t)){if(HA(e))throw Error($q(418));t=VN(n.nextSibling);var r=IA;t&&$A(e,t)?jA(r,n):(e.flags=-4097&e.flags|2,zA=!1,IA=e)}}else{if(HA(e))throw Error($q(418));e.flags=-4097&e.flags|2,zA=!1,IA=e}}}function BA(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;IA=e}function WA(e){if(e!==IA)return!1;if(!zA)return BA(e),zA=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!IN(e.type,e.memoizedProps)),t&&(t=LA)){if(HA(e))throw UA(),Error($q(418));for(;t;)jA(e,t),t=VN(t.nextSibling)}if(BA(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error($q(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){LA=VN(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}LA=null}}else LA=IA?VN(e.stateNode.nextSibling):null;return!0}function UA(){for(var e=LA;e;)e=VN(e.nextSibling)}function YA(){LA=IA=null,zA=!1}function KA(e){null===FA?FA=[e]:FA.push(e)}var GA=nR.ReactCurrentBatchConfig;function XA(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error($q(309));var r=n.stateNode}if(!r)throw Error($q(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error($q(284));if(!n._owner)throw Error($q(290,e))}return e}function JA(e,t){throw e=Object.prototype.toString.call(t),Error($q(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ZA(e){return(0,e._init)(e._payload)}function QA(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=fj(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=gj(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===oR?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===pR&&ZA(o)===t.type)?((r=i(t,n.props)).ref=XA(e,t,n),r.return=e,r):((r=hj(n.type,n.key,n.props,null,e.mode,r)).ref=XA(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=yj(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=pj(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=gj(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case rR:return(n=hj(t.type,t.key,t.props,null,e.mode,n)).ref=XA(e,null,t),n.return=e,n;case iR:return(t=yj(t,e.mode,n)).return=e,t;case pR:return d(e,(0,t._init)(t._payload),n)}if(LR(t)||yR(t))return(t=pj(t,e.mode,n,null)).return=e,t;JA(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case rR:return n.key===i?l(e,t,n,r):null;case iR:return n.key===i?c(e,t,n,r):null;case pR:return f(e,t,(i=n._init)(n._payload),r)}if(LR(n)||yR(n))return null!==i?null:u(e,t,n,r,null);JA(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case rR:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case iR:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case pR:return h(e,t,n,(0,r._init)(r._payload),i)}if(LR(r)||yR(r))return u(t,e=e.get(n)||null,r,i,null);JA(t,r)}return null}function p(i,a,s,l){for(var c=null,u=null,p=a,m=a=0,g=null;null!==p&&m<s.length;m++){p.index>m?(g=p,p=null):g=p.sibling;var y=f(i,p,s[m],l);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(i,p),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,p=g}if(m===s.length)return n(i,p),zA&&OA(i,m),c;if(null===p){for(;m<s.length;m++)null!==(p=d(i,s[m],l))&&(a=o(p,a,m),null===u?c=p:u.sibling=p,u=p);return zA&&OA(i,m),c}for(p=r(i,p);m<s.length;m++)null!==(g=h(p,i,m,s[m],l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&p.forEach((function(e){return t(i,e)})),zA&&OA(i,m),c}function m(i,a,s,l){var c=yR(s);if("function"!=typeof c)throw Error($q(150));if(null==(s=c.call(s)))throw Error($q(151));for(var u=c=null,p=a,m=a=0,g=null,y=s.next();null!==p&&!y.done;m++,y=s.next()){p.index>m?(g=p,p=null):g=p.sibling;var v=f(i,p,y.value,l);if(null===v){null===p&&(p=g);break}e&&p&&null===v.alternate&&t(i,p),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,p=g}if(y.done)return n(i,p),zA&&OA(i,m),c;if(null===p){for(;!y.done;m++,y=s.next())null!==(y=d(i,y.value,l))&&(a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return zA&&OA(i,m),c}for(p=r(i,p);!y.done;m++,y=s.next())null!==(y=h(p,i,m,y.value,l))&&(e&&null!==y.alternate&&p.delete(null===y.key?m:y.key),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return e&&p.forEach((function(e){return t(i,e)})),zA&&OA(i,m),c}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===oR&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case rR:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===oR){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===pR&&ZA(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=XA(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===oR?((o=pj(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=hj(s.type,s.key,s.props,null,r.mode,l)).ref=XA(r,o,s),l.return=r,r=l)}return a(r);case iR:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=yj(s,r.mode,l)).return=r,r=o}return a(r);case pR:return e(r,o,(u=s._init)(s._payload),l)}if(LR(s))return p(r,o,s,l);if(yR(s))return m(r,o,s,l);JA(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=gj(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var eI=QA(!0),tI=QA(!1),nI=iA(null),rI=null,iI=null,oI=null;function aI(){oI=iI=rI=null}function sI(e){var t=nI.current;oA(nI),e._currentValue=t}function lI(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function cI(e,t){rI=e,oI=iI=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(ZL=!0),e.firstContext=null)}function uI(e){var t=e._currentValue;if(oI!==e)if(e={context:e,memoizedValue:t,next:null},null===iI){if(null===rI)throw Error($q(308));iI=e,rI.dependencies={lanes:0,firstContext:e}}else iI=iI.next=e;return t}var dI=null;function fI(e){null===dI?dI=[e]:dI.push(e)}function hI(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,fI(t)):(n.next=i.next,i.next=n),t.interleaved=n,pI(e,r)}function pI(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var mI=!1;function gI(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yI(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vI(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bI(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&sF){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,pI(e,n)}return null===(i=r.interleaved)?(t.next=t,fI(r)):(t.next=i.next,i.next=t),r.interleaved=t,pI(e,n)}function xI(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,QT(e,n)}}function wI(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function kI(e,t,n,r){var i=e.updateQueue;mI=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(f=t,h=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(h,d,f):p))break e;d=bR({},d,f);break e;case 2:mI=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);mF|=a,e.lanes=a,e.memoizedState=d}}function SI(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error($q(191,i));i.call(r)}}}var CI={},EI=iA(CI),MI=iA(CI),_I=iA(CI);function DI(e){if(e===CI)throw Error($q(174));return e}function qI(e,t){switch(aA(_I,t),aA(MI,e),aA(EI,CI),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:BR(null,"");break;default:t=BR(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}oA(EI),aA(EI,t)}function RI(){oA(EI),oA(MI),oA(_I)}function TI(e){DI(_I.current);var t=DI(EI.current),n=BR(t,e.type);t!==n&&(aA(MI,e),aA(EI,n))}function OI(e){MI.current===e&&(oA(EI),oA(MI))}var PI=iA(0);function NI(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var AI=[];function II(){for(var e=0;e<AI.length;e++)AI[e]._workInProgressVersionPrimary=null;AI.length=0}var LI=nR.ReactCurrentDispatcher,zI=nR.ReactCurrentBatchConfig,FI=0,jI=null,$I=null,HI=null,VI=!1,BI=!1,WI=0,UI=0;function YI(){throw Error($q(321))}function KI(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!$P(e[n],t[n]))return!1;return!0}function GI(e,t,n,r,i,o){if(FI=o,jI=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,LI.current=null===e||null===e.memoizedState?OL:PL,e=n(r,i),BI){o=0;do{if(BI=!1,WI=0,25<=o)throw Error($q(301));o+=1,HI=$I=null,t.updateQueue=null,LI.current=NL,e=n(r,i)}while(BI)}if(LI.current=TL,t=null!==$I&&null!==$I.next,FI=0,HI=$I=jI=null,VI=!1,t)throw Error($q(300));return e}function XI(){var e=0!==WI;return WI=0,e}function JI(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===HI?jI.memoizedState=HI=e:HI=HI.next=e,HI}function ZI(){if(null===$I){var e=jI.alternate;e=null!==e?e.memoizedState:null}else e=$I.next;var t=null===HI?jI.memoizedState:HI.next;if(null!==t)HI=t,$I=e;else{if(null===e)throw Error($q(310));e={memoizedState:($I=e).memoizedState,baseState:$I.baseState,baseQueue:$I.baseQueue,queue:$I.queue,next:null},null===HI?jI.memoizedState=HI=e:HI=HI.next=e}return HI}function QI(e,t){return"function"==typeof t?t(e):t}function eL(e){var t=ZI(),n=t.queue;if(null===n)throw Error($q(311));n.lastRenderedReducer=e;var r=$I,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((FI&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,jI.lanes|=u,mF|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,$P(r,t.memoizedState)||(ZL=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,jI.lanes|=o,mF|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function tL(e){var t=ZI(),n=t.queue;if(null===n)throw Error($q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);$P(o,t.memoizedState)||(ZL=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function nL(){}function rL(e,t){var n=jI,r=ZI(),i=t(),o=!$P(r.memoizedState,i);if(o&&(r.memoizedState=i,ZL=!0),r=r.queue,mL(aL.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==HI&&1&HI.memoizedState.tag){if(n.flags|=2048,uL(9,oL.bind(null,n,r,i,t),void 0,null),null===lF)throw Error($q(349));30&FI||iL(n,t,i)}return i}function iL(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=jI.updateQueue)?(t={lastEffect:null,stores:null},jI.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function oL(e,t,n,r){t.value=n,t.getSnapshot=r,sL(t)&&lL(e)}function aL(e,t,n){return n((function(){sL(t)&&lL(e)}))}function sL(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$P(e,n)}catch(e){return!0}}function lL(e){var t=pI(e,1);null!==t&&AF(t,e,1,-1)}function cL(e){var t=JI();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:QI,lastRenderedState:e},t.queue=e,e=e.dispatch=_L.bind(null,jI,e),[t.memoizedState,e]}function uL(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=jI.updateQueue)?(t={lastEffect:null,stores:null},jI.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function dL(){return ZI().memoizedState}function fL(e,t,n,r){var i=JI();jI.flags|=e,i.memoizedState=uL(1|t,n,void 0,void 0===r?null:r)}function hL(e,t,n,r){var i=ZI();r=void 0===r?null:r;var o=void 0;if(null!==$I){var a=$I.memoizedState;if(o=a.destroy,null!==r&&KI(r,a.deps))return void(i.memoizedState=uL(t,n,o,r))}jI.flags|=e,i.memoizedState=uL(1|t,n,o,r)}function pL(e,t){return fL(8390656,8,e,t)}function mL(e,t){return hL(2048,8,e,t)}function gL(e,t){return hL(4,2,e,t)}function yL(e,t){return hL(4,4,e,t)}function vL(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function bL(e,t,n){return n=null!=n?n.concat([e]):null,hL(4,4,vL.bind(null,t,e),n)}function xL(){}function wL(e,t){var n=ZI();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&KI(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function kL(e,t){var n=ZI();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&KI(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function SL(e,t,n){return 21&FI?($P(n,t)||(n=XT(),jI.lanes|=n,mF|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ZL=!0),e.memoizedState=n)}function CL(e,t){var n=eO;eO=0!==n&&4>n?n:4,e(!0);var r=zI.transition;zI.transition={};try{e(!1),t()}finally{eO=n,zI.transition=r}}function EL(){return ZI().memoizedState}function ML(e,t,n){var r=NF(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DL(e))qL(t,n);else if(null!==(n=hI(e,t,n,r))){AF(n,e,r,PF()),RL(n,t,r)}}function _L(e,t,n){var r=NF(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DL(e))qL(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,$P(s,a)){var l=t.interleaved;return null===l?(i.next=i,fI(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=hI(e,t,i,r))&&(AF(n,e,r,i=PF()),RL(n,t,r))}}function DL(e){var t=e.alternate;return e===jI||null!==t&&t===jI}function qL(e,t){BI=VI=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RL(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,QT(e,n)}}var TL={readContext:uI,useCallback:YI,useContext:YI,useEffect:YI,useImperativeHandle:YI,useInsertionEffect:YI,useLayoutEffect:YI,useMemo:YI,useReducer:YI,useRef:YI,useState:YI,useDebugValue:YI,useDeferredValue:YI,useTransition:YI,useMutableSource:YI,useSyncExternalStore:YI,useId:YI,unstable_isNewReconciler:!1},OL={readContext:uI,useCallback:function(e,t){return JI().memoizedState=[e,void 0===t?null:t],e},useContext:uI,useEffect:pL,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,fL(4194308,4,vL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fL(4194308,4,e,t)},useInsertionEffect:function(e,t){return fL(4,2,e,t)},useMemo:function(e,t){var n=JI();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=JI();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ML.bind(null,jI,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},JI().memoizedState=e},useState:cL,useDebugValue:xL,useDeferredValue:function(e){return JI().memoizedState=e},useTransition:function(){var e=cL(!1),t=e[0];return e=CL.bind(null,e[1]),JI().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=jI,i=JI();if(zA){if(void 0===n)throw Error($q(407));n=n()}else{if(n=t(),null===lF)throw Error($q(349));30&FI||iL(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,pL(aL.bind(null,r,o,e),[e]),r.flags|=2048,uL(9,oL.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=JI(),t=lF.identifierPrefix;if(zA){var n=TA;t=":"+t+"R"+(n=(RA&~(1<<32-$T(RA)-1)).toString(32)+n),0<(n=WI++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=UI++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},PL={readContext:uI,useCallback:wL,useContext:uI,useEffect:mL,useImperativeHandle:bL,useInsertionEffect:gL,useLayoutEffect:yL,useMemo:kL,useReducer:eL,useRef:dL,useState:function(){return eL(QI)},useDebugValue:xL,useDeferredValue:function(e){return SL(ZI(),$I.memoizedState,e)},useTransition:function(){return[eL(QI)[0],ZI().memoizedState]},useMutableSource:nL,useSyncExternalStore:rL,useId:EL,unstable_isNewReconciler:!1},NL={readContext:uI,useCallback:wL,useContext:uI,useEffect:mL,useImperativeHandle:bL,useInsertionEffect:gL,useLayoutEffect:yL,useMemo:kL,useReducer:tL,useRef:dL,useState:function(){return tL(QI)},useDebugValue:xL,useDeferredValue:function(e){var t=ZI();return null===$I?t.memoizedState=e:SL(t,$I.memoizedState,e)},useTransition:function(){return[tL(QI)[0],ZI().memoizedState]},useMutableSource:nL,useSyncExternalStore:rL,useId:EL,unstable_isNewReconciler:!1};function AL(e,t){if(e&&e.defaultProps){for(var n in t=bR({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function IL(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:bR({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var LL={isMounted:function(e){return!!(e=e._reactInternals)&&ST(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=PF(),i=NF(e),o=vI(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=bI(e,o,i))&&(AF(t,e,i,r),xI(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=PF(),i=NF(e),o=vI(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=bI(e,o,i))&&(AF(t,e,i,r),xI(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=PF(),r=NF(e),i=vI(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=bI(e,i,r))&&(AF(t,e,r,n),xI(t,e,r))}};function zL(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!HP(n,r)||!HP(i,o))}function FL(e,t,n){var r=!1,i=sA,o=t.contextType;return"object"==typeof o&&null!==o?o=uI(o):(i=fA(t)?uA:lA.current,o=(r=null!=(r=t.contextTypes))?dA(e,i):sA),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=LL,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function jL(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&LL.enqueueReplaceState(t,t.state,null)}function $L(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},gI(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=uI(o):(o=fA(t)?uA:lA.current,i.context=dA(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(IL(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&LL.enqueueReplaceState(i,i.state,null),kI(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function HL(e,t){try{var n="",r=t;do{n+=SR(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function VL(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function BL(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var WL="function"==typeof WeakMap?WeakMap:Map;function UL(e,t,n){(n=vI(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){SF||(SF=!0,CF=r),BL(0,t)},n}function YL(e,t,n){(n=vI(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){BL(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){BL(0,t),"function"!=typeof r&&(null===EF?EF=new Set([this]):EF.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function KL(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new WL;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ij.bind(null,e,t,n),t.then(e,e))}function GL(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function XL(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=vI(-1,1)).tag=2,bI(n,t,1))),n.lanes|=1),e)}var JL=nR.ReactCurrentOwner,ZL=!1;function QL(e,t,n,r){t.child=null===e?tI(t,null,n,r):eI(t,e.child,n,r)}function ez(e,t,n,r,i){n=n.render;var o=t.ref;return cI(t,i),r=GI(e,t,n,r,o,i),n=XI(),null===e||ZL?(zA&&n&&NA(t),t.flags|=1,QL(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sz(e,t,i))}function tz(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||dj(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=hj(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,nz(e,t,o,r,i))}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:HP)(a,r)&&e.ref===t.ref)return Sz(e,t,i)}return t.flags|=1,(e=fj(o,r)).ref=t.ref,e.return=t,t.child=e}function nz(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(HP(o,r)&&e.ref===t.ref){if(ZL=!1,t.pendingProps=r=o,!(e.lanes&i))return t.lanes=e.lanes,Sz(e,t,i);131072&e.flags&&(ZL=!0)}}return oz(e,t,n,r,i)}function rz(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,aA(fF,dF),dF|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,aA(fF,dF),dF|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},aA(fF,dF),dF|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,aA(fF,dF),dF|=r;return QL(e,t,i,n),t.child}function iz(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function oz(e,t,n,r,i){var o=fA(n)?uA:lA.current;return o=dA(t,o),cI(t,i),n=GI(e,t,n,r,o,i),r=XI(),null===e||ZL?(zA&&r&&NA(t),t.flags|=1,QL(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sz(e,t,i))}function az(e,t,n,r,i){if(fA(n)){var o=!0;gA(t)}else o=!1;if(cI(t,i),null===t.stateNode)kz(e,t),FL(t,n,r),$L(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=uI(c):c=dA(t,c=fA(n)?uA:lA.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&jL(t,a,r,c),mI=!1;var f=t.memoizedState;a.state=f,kI(t,r,a,i),l=t.memoizedState,s!==r||f!==l||cA.current||mI?("function"==typeof u&&(IL(t,n,u,r),l=t.memoizedState),(s=mI||zL(t,n,s,r,f,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,yI(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:AL(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=uI(l):l=dA(t,l=fA(n)?uA:lA.current);var h=n.getDerivedStateFromProps;(u="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&jL(t,a,r,l),mI=!1,f=t.memoizedState,a.state=f,kI(t,r,a,i);var p=t.memoizedState;s!==d||f!==p||cA.current||mI?("function"==typeof h&&(IL(t,n,h,r),p=t.memoizedState),(c=mI||zL(t,n,c,r,f,p,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return sz(e,t,n,r,o,i)}function sz(e,t,n,r,i,o){iz(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&yA(t,n,!1),Sz(e,t,o);r=t.stateNode,JL.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=eI(t,e.child,null,o),t.child=eI(t,null,s,o)):QL(e,t,s,o),t.memoizedState=r.state,i&&yA(t,n,!0),t.child}function lz(e){var t=e.stateNode;t.pendingContext?pA(0,t.pendingContext,t.pendingContext!==t.context):t.context&&pA(0,t.context,!1),qI(e,t.containerInfo)}function cz(e,t,n,r,i){return YA(),KA(i),t.flags|=256,QL(e,t,n,r),t.child}var uz,dz,fz,hz,pz={dehydrated:null,treeContext:null,retryLane:0};function mz(e){return{baseLanes:e,cachePool:null,transitions:null}}function gz(e,t,n){var r,i=t.pendingProps,o=PI.current,a=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),aA(PI,1&o),null===e)return VA(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},1&i||null===a?a=mj(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=pj(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=mz(n),t.memoizedState=pz,e):yz(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,vz(e,t,a,r=VL(Error($q(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=mj({mode:"visible",children:r.children},i,0,null),(o=pj(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&eI(t,e.child,null,a),t.child.memoizedState=mz(a),t.memoizedState=pz,o);if(!(1&t.mode))return vz(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,vz(e,t,a,r=VL(o=Error($q(419)),r,void 0))}if(s=!!(a&e.childLanes),ZL||s){if(null!==(r=lF)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=i&(r.suspendedLanes|a)?0:i)&&i!==o.retryLane&&(o.retryLane=i,pI(e,i),AF(r,e,i,-1))}return KF(),vz(e,t,a,r=VL(Error($q(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=aj.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,LA=VN(i.nextSibling),IA=t,zA=!0,FA=null,null!==e&&(_A[DA++]=RA,_A[DA++]=TA,_A[DA++]=qA,RA=e.id,TA=e.overflow,qA=t),t=yz(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 1&s||t.child===o?(i=fj(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=fj(r,a):(a=pj(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?mz(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=pz,i}return e=(a=e.child).sibling,i=fj(a,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function yz(e,t){return(t=mj({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function vz(e,t,n,r){return null!==r&&KA(r),eI(t,e.child,null,n),(e=yz(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function bz(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),lI(e.return,t,n)}function xz(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function wz(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(QL(e,t,r.children,n),2&(r=PI.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&bz(e,n,t);else if(19===e.tag)bz(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(aA(PI,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===NI(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xz(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===NI(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xz(t,!0,n,null,o);break;case"together":xz(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function kz(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Sz(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),mF|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error($q(153));if(null!==t.child){for(n=fj(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=fj(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Cz(e,t){if(!zA)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ez(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Mz(e,t,n){var r=t.pendingProps;switch(AA(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ez(t),null;case 1:case 17:return fA(t.type)&&hA(),Ez(t),null;case 3:return r=t.stateNode,RI(),oA(cA),oA(lA),II(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(WA(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==FA&&(FF(FA),FA=null))),dz(e,t),Ez(t),null;case 5:OI(t);var i=DI(_I.current);if(n=t.type,null!==e&&null!=t.stateNode)fz(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error($q(166));return Ez(t),null}if(e=DI(EI.current),WA(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[UN]=t,r[YN]=o,e=!!(1&t.mode),n){case"dialog":bN("cancel",r),bN("close",r);break;case"iframe":case"object":case"embed":bN("load",r);break;case"video":case"audio":for(i=0;i<mN.length;i++)bN(mN[i],r);break;case"source":bN("error",r);break;case"img":case"image":case"link":bN("error",r),bN("load",r);break;case"details":bN("toggle",r);break;case"input":OR(r,o),bN("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},bN("invalid",r);break;case"textarea":jR(r,o),bN("invalid",r)}for(var a in QR(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&ON(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&ON(r.textContent,s,e),i=["children",""+s]):Vq.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&bN("scroll",r)}switch(n){case"input":DR(r),AR(r,o,!0);break;case"textarea":DR(r),HR(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=PN)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=VR(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[UN]=t,e[YN]=r,uz(e,t,!1,!1),t.stateNode=e;e:{switch(a=eT(n,r),n){case"dialog":bN("cancel",e),bN("close",e),i=r;break;case"iframe":case"object":case"embed":bN("load",e),i=r;break;case"video":case"audio":for(i=0;i<mN.length;i++)bN(mN[i],e);i=r;break;case"source":bN("error",e),i=r;break;case"img":case"image":case"link":bN("error",e),bN("load",e),i=r;break;case"details":bN("toggle",e),i=r;break;case"input":OR(e,r),i=TR(e,r),bN("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=bR({},r,{value:void 0}),bN("invalid",e);break;case"textarea":jR(e,r),i=FR(e,r),bN("invalid",e)}for(o in QR(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?JR(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&UR(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&YR(e,l):"number"==typeof l&&YR(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(Vq.hasOwnProperty(o)?null!=l&&"onScroll"===o&&bN("scroll",e):null!=l&&tR(e,o,l,a))}switch(n){case"input":DR(e),AR(e,r,!1);break;case"textarea":DR(e),HR(e);break;case"option":null!=r.value&&e.setAttribute("value",""+MR(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?zR(e,!!r.multiple,o,!1):null!=r.defaultValue&&zR(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=PN)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ez(t),null;case 6:if(e&&null!=t.stateNode)hz(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error($q(166));if(n=DI(_I.current),DI(EI.current),WA(t)){if(r=t.stateNode,n=t.memoizedProps,r[UN]=t,(o=r.nodeValue!==n)&&null!==(e=IA))switch(e.tag){case 3:ON(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ON(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[UN]=t,t.stateNode=r}return Ez(t),null;case 13:if(oA(PI),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(zA&&null!==LA&&1&t.mode&&!(128&t.flags))UA(),YA(),t.flags|=98560,o=!1;else if(o=WA(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error($q(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error($q(317));o[UN]=t}else YA(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ez(t),o=!1}else null!==FA&&(FF(FA),FA=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&PI.current?0===hF&&(hF=3):KF())),null!==t.updateQueue&&(t.flags|=4),Ez(t),null);case 4:return RI(),dz(e,t),null===e&&kN(t.stateNode.containerInfo),Ez(t),null;case 10:return sI(t.type._context),Ez(t),null;case 19:if(oA(PI),null===(o=t.memoizedState))return Ez(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)Cz(o,!1);else{if(0!==hF||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=NI(e))){for(t.flags|=128,Cz(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return aA(PI,1&PI.current|2),t.child}e=e.sibling}null!==o.tail&&OT()>wF&&(t.flags|=128,r=!0,Cz(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=NI(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Cz(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!zA)return Ez(t),null}else 2*OT()-o.renderingStartTime>wF&&1073741824!==n&&(t.flags|=128,r=!0,Cz(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=OT(),t.sibling=null,n=PI.current,aA(PI,r?1&n|2:1&n),t):(Ez(t),null);case 22:case 23:return BF(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&dF)&&(Ez(t),6&t.subtreeFlags&&(t.flags|=8192)):Ez(t),null;case 24:case 25:return null}throw Error($q(156,t.tag))}function _z(e,t){switch(AA(t),t.tag){case 1:return fA(t.type)&&hA(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return RI(),oA(cA),oA(lA),II(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return OI(t),null;case 13:if(oA(PI),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error($q(340));YA()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return oA(PI),null;case 4:return RI(),null;case 10:return sI(t.type._context),null;case 22:case 23:return BF(),null;default:return null}}uz=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},dz=function(){},fz=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,DI(EI.current);var o,a=null;switch(n){case"input":i=TR(e,i),r=TR(e,r),a=[];break;case"select":i=bR({},i,{value:void 0}),r=bR({},r,{value:void 0}),a=[];break;case"textarea":i=FR(e,i),r=FR(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=PN)}for(c in QR(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(Vq.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(Vq.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&bN("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},hz=function(e,t,n,r){n!==r&&(t.flags|=4)};var Dz=!1,qz=!1,Rz="function"==typeof WeakSet?WeakSet:Set,Tz=null;function Oz(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){rj(e,t,n)}else n.current=null}function Pz(e,t,n){try{n()}catch(n){rj(e,t,n)}}var Nz=!1;function Az(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Pz(t,n,o)}i=i.next}while(i!==r)}}function Iz(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Lz(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function zz(e){var t=e.alternate;null!==t&&(e.alternate=null,zz(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[UN],delete t[YN],delete t[GN],delete t[XN],delete t[JN])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fz(e){return 5===e.tag||3===e.tag||4===e.tag}function jz(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Fz(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function $z(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=PN));else if(4!==r&&null!==(e=e.child))for($z(e,t,n),e=e.sibling;null!==e;)$z(e,t,n),e=e.sibling}function Hz(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Hz(e,t,n),e=e.sibling;null!==e;)Hz(e,t,n),e=e.sibling}var Vz=null,Bz=!1;function Wz(e,t,n){for(n=n.child;null!==n;)Uz(e,t,n),n=n.sibling}function Uz(e,t,n){if(jT&&"function"==typeof jT.onCommitFiberUnmount)try{jT.onCommitFiberUnmount(FT,n)}catch(e){}switch(n.tag){case 5:qz||Oz(n,t);case 6:var r=Vz,i=Bz;Vz=null,Wz(e,t,n),Bz=i,null!==(Vz=r)&&(Bz?(e=Vz,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Vz.removeChild(n.stateNode));break;case 18:null!==Vz&&(Bz?(e=Vz,n=n.stateNode,8===e.nodeType?HN(e.parentNode,n):1===e.nodeType&&HN(e,n),SO(e)):HN(Vz,n.stateNode));break;case 4:r=Vz,i=Bz,Vz=n.stateNode.containerInfo,Bz=!0,Wz(e,t,n),Vz=r,Bz=i;break;case 0:case 11:case 14:case 15:if(!qz&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&Pz(n,t,a),i=i.next}while(i!==r)}Wz(e,t,n);break;case 1:if(!qz&&(Oz(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){rj(n,t,e)}Wz(e,t,n);break;case 21:Wz(e,t,n);break;case 22:1&n.mode?(qz=(r=qz)||null!==n.memoizedState,Wz(e,t,n),qz=r):Wz(e,t,n);break;default:Wz(e,t,n)}}function Yz(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Rz),t.forEach((function(t){var r=sj.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Kz(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:Vz=s.stateNode,Bz=!1;break e;case 3:case 4:Vz=s.stateNode.containerInfo,Bz=!0;break e}s=s.return}if(null===Vz)throw Error($q(160));Uz(o,a,i),Vz=null,Bz=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(e){rj(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Gz(t,e),t=t.sibling}function Gz(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kz(t,e),Xz(e),4&r){try{Az(3,e,e.return),Iz(3,e)}catch(t){rj(e,e.return,t)}try{Az(5,e,e.return)}catch(t){rj(e,e.return,t)}}break;case 1:Kz(t,e),Xz(e),512&r&&null!==n&&Oz(n,n.return);break;case 5:if(Kz(t,e),Xz(e),512&r&&null!==n&&Oz(n,n.return),32&e.flags){var i=e.stateNode;try{YR(i,"")}catch(t){rj(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&&PR(i,o),eT(s,a);var c=eT(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?JR(i,d):"dangerouslySetInnerHTML"===u?UR(i,d):"children"===u?YR(i,d):tR(i,u,d,c)}switch(s){case"input":NR(i,o);break;case"textarea":$R(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?zR(i,!!o.multiple,h,!1):f!==!!o.multiple&&(null!=o.defaultValue?zR(i,!!o.multiple,o.defaultValue,!0):zR(i,!!o.multiple,o.multiple?[]:"",!1))}i[YN]=o}catch(t){rj(e,e.return,t)}}break;case 6:if(Kz(t,e),Xz(e),4&r){if(null===e.stateNode)throw Error($q(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){rj(e,e.return,t)}}break;case 3:if(Kz(t,e),Xz(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{SO(t.containerInfo)}catch(t){rj(e,e.return,t)}break;case 4:default:Kz(t,e),Xz(e);break;case 13:Kz(t,e),Xz(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(xF=OT())),4&r&&Yz(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(qz=(c=qz)||u,Kz(t,e),qz=c):Kz(t,e),Xz(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Tz=e,u=e.child;null!==u;){for(d=Tz=u;null!==Tz;){switch(h=(f=Tz).child,f.tag){case 0:case 11:case 14:case 15:Az(4,f,f.return);break;case 1:Oz(f,f.return);var p=f.stateNode;if("function"==typeof p.componentWillUnmount){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(e){rj(r,n,e)}}break;case 5:Oz(f,f.return);break;case 22:if(null!==f.memoizedState){eF(d);continue}}null!==h?(h.return=f,Tz=h):eF(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{i=d.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=XR("display",a))}catch(t){rj(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){rj(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Kz(t,e),Xz(e),4&r&&Yz(e);case 21:}}function Xz(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Fz(n)){var r=n;break e}n=n.return}throw Error($q(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(YR(i,""),r.flags&=-33),Hz(e,jz(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;$z(e,jz(e),o);break;default:throw Error($q(161))}}catch(t){rj(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Jz(e,t,n){Tz=e,Zz(e)}function Zz(e,t,n){for(var r=!!(1&e.mode);null!==Tz;){var i=Tz,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Dz;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||qz;s=Dz;var c=qz;if(Dz=a,(qz=l)&&!c)for(Tz=i;null!==Tz;)l=(a=Tz).child,22===a.tag&&null!==a.memoizedState?tF(i):null!==l?(l.return=a,Tz=l):tF(i);for(;null!==o;)Tz=o,Zz(o),o=o.sibling;Tz=i,Dz=s,qz=c}Qz(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,Tz=o):Qz(e)}}function Qz(e){for(;null!==Tz;){var t=Tz;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:qz||Iz(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!qz)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:AL(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&SI(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}SI(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&SO(d)}}}break;default:throw Error($q(163))}qz||512&t.flags&&Lz(t)}catch(e){rj(t,t.return,e)}}if(t===e){Tz=null;break}if(null!==(n=t.sibling)){n.return=t.return,Tz=n;break}Tz=t.return}}function eF(e){for(;null!==Tz;){var t=Tz;if(t===e){Tz=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Tz=n;break}Tz=t.return}}function tF(e){for(;null!==Tz;){var t=Tz;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Iz(4,t)}catch(e){rj(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){rj(t,i,e)}}var o=t.return;try{Lz(t)}catch(e){rj(t,o,e)}break;case 5:var a=t.return;try{Lz(t)}catch(e){rj(t,a,e)}}}catch(e){rj(t,t.return,e)}if(t===e){Tz=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Tz=s;break}Tz=t.return}}var nF,rF=Math.ceil,iF=nR.ReactCurrentDispatcher,oF=nR.ReactCurrentOwner,aF=nR.ReactCurrentBatchConfig,sF=0,lF=null,cF=null,uF=0,dF=0,fF=iA(0),hF=0,pF=null,mF=0,gF=0,yF=0,vF=null,bF=null,xF=0,wF=1/0,kF=null,SF=!1,CF=null,EF=null,MF=!1,_F=null,DF=0,qF=0,RF=null,TF=-1,OF=0;function PF(){return 6&sF?OT():-1!==TF?TF:TF=OT()}function NF(e){return 1&e.mode?2&sF&&0!==uF?uF&-uF:null!==GA.transition?(0===OF&&(OF=XT()),OF):0!==(e=eO)?e:e=void 0===(e=window.event)?16:TO(e.type):1}function AF(e,t,n,r){if(50<qF)throw qF=0,RF=null,Error($q(185));ZT(e,n,r),2&sF&&e===lF||(e===lF&&(!(2&sF)&&(gF|=n),4===hF&&jF(e,uF)),IF(e,r),1===n&&0===sF&&!(1&t.mode)&&(wF=OT()+500,bA&&kA()))}function IF(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-$T(o),s=1<<a,l=i[a];-1===l?s&n&&!(s&r)||(i[a]=KT(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=YT(e,e===lF?uF:0);if(0===r)null!==n&&qT(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&qT(n),1===t)0===e.tag?function(e){bA=!0,wA(e)}($F.bind(null,e)):wA($F.bind(null,e)),jN((function(){!(6&sF)&&kA()})),n=null;else{switch(tO(r)){case 1:n=NT;break;case 4:n=AT;break;case 16:default:n=IT;break;case 536870912:n=zT}n=lj(n,LF.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function LF(e,t){if(TF=-1,OF=0,6&sF)throw Error($q(327));var n=e.callbackNode;if(tj()&&e.callbackNode!==n)return null;var r=YT(e,e===lF?uF:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=GF(e,r);else{t=r;var i=sF;sF|=2;var o=YF();for(lF===e&&uF===t||(kF=null,wF=OT()+500,WF(e,t));;)try{JF();break}catch(t){UF(e,t)}aI(),iF.current=o,sF=i,null!==cF?t=0:(lF=null,uF=0,t=hF)}if(0!==t){if(2===t&&(0!==(i=GT(e))&&(r=i,t=zF(e,i))),1===t)throw n=pF,WF(e,0),jF(e,r),IF(e,OT()),n;if(6===t)jF(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!$P(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=GF(e,r),2===t&&(o=GT(e),0!==o&&(r=o,t=zF(e,o))),1!==t)))throw n=pF,WF(e,0),jF(e,r),IF(e,OT()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error($q(345));case 2:case 5:ej(e,bF,kF);break;case 3:if(jF(e,r),(130023424&r)===r&&10<(t=xF+500-OT())){if(0!==YT(e,0))break;if(((i=e.suspendedLanes)&r)!==r){PF(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=LN(ej.bind(null,e,bF,kF),t);break}ej(e,bF,kF);break;case 4:if(jF(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-$T(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=OT()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rF(r/1960))-r)){e.timeoutHandle=LN(ej.bind(null,e,bF,kF),r);break}ej(e,bF,kF);break;default:throw Error($q(329))}}}return IF(e,OT()),e.callbackNode===n?LF.bind(null,e):null}function zF(e,t){var n=vF;return e.current.memoizedState.isDehydrated&&(WF(e,t).flags|=256),2!==(e=GF(e,t))&&(t=bF,bF=n,null!==t&&FF(t)),e}function FF(e){null===bF?bF=e:bF.push.apply(bF,e)}function jF(e,t){for(t&=~yF,t&=~gF,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$T(t),r=1<<n;e[n]=-1,t&=~r}}function $F(e){if(6&sF)throw Error($q(327));tj();var t=YT(e,0);if(!(1&t))return IF(e,OT()),null;var n=GF(e,t);if(0!==e.tag&&2===n){var r=GT(e);0!==r&&(t=r,n=zF(e,r))}if(1===n)throw n=pF,WF(e,0),jF(e,t),IF(e,OT()),n;if(6===n)throw Error($q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ej(e,bF,kF),IF(e,OT()),null}function HF(e,t){var n=sF;sF|=1;try{return e(t)}finally{0===(sF=n)&&(wF=OT()+500,bA&&kA())}}function VF(e){null!==_F&&0===_F.tag&&!(6&sF)&&tj();var t=sF;sF|=1;var n=aF.transition,r=eO;try{if(aF.transition=null,eO=1,e)return e()}finally{eO=r,aF.transition=n,!(6&(sF=t))&&kA()}}function BF(){dF=fF.current,oA(fF)}function WF(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,zN(n)),null!==cF)for(n=cF.return;null!==n;){var r=n;switch(AA(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&hA();break;case 3:RI(),oA(cA),oA(lA),II();break;case 5:OI(r);break;case 4:RI();break;case 13:case 19:oA(PI);break;case 10:sI(r.type._context);break;case 22:case 23:BF()}n=n.return}if(lF=e,cF=e=fj(e.current,null),uF=dF=t,hF=0,pF=null,yF=gF=mF=0,bF=vF=null,null!==dI){for(t=0;t<dI.length;t++)if(null!==(r=(n=dI[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}dI=null}return e}function UF(e,t){for(;;){var n=cF;try{if(aI(),LI.current=TL,VI){for(var r=jI.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}VI=!1}if(FI=0,HI=$I=jI=null,BI=!1,WI=0,oF.current=null,null===n||null===n.return){hF=1,pF=t,cF=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=uF,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=GL(a);if(null!==h){h.flags&=-257,XL(h,a,s,0,t),1&h.mode&&KL(o,c,t),l=c;var p=(t=h).updateQueue;if(null===p){var m=new Set;m.add(l),t.updateQueue=m}else p.add(l);break e}if(!(1&t)){KL(o,c,t),KF();break e}l=Error($q(426))}else if(zA&&1&s.mode){var g=GL(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),XL(g,a,s,0,t),KA(HL(l,s));break e}}o=l=HL(l,s),4!==hF&&(hF=2),null===vF?vF=[o]:vF.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,wI(o,UL(0,l,t));break e;case 1:s=l;var y=o.type,v=o.stateNode;if(!(128&o.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==EF&&EF.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t,wI(o,YL(o,s,t));break e}}o=o.return}while(null!==o)}QF(n)}catch(e){t=e,cF===n&&null!==n&&(cF=n=n.return);continue}break}}function YF(){var e=iF.current;return iF.current=TL,null===e?TL:e}function KF(){0!==hF&&3!==hF&&2!==hF||(hF=4),null===lF||!(268435455&mF)&&!(268435455&gF)||jF(lF,uF)}function GF(e,t){var n=sF;sF|=2;var r=YF();for(lF===e&&uF===t||(kF=null,WF(e,t));;)try{XF();break}catch(t){UF(e,t)}if(aI(),sF=n,iF.current=r,null!==cF)throw Error($q(261));return lF=null,uF=0,hF}function XF(){for(;null!==cF;)ZF(cF)}function JF(){for(;null!==cF&&!RT();)ZF(cF)}function ZF(e){var t=nF(e.alternate,e,dF);e.memoizedProps=e.pendingProps,null===t?QF(e):cF=t,oF.current=null}function QF(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=_z(n,t)))return n.flags&=32767,void(cF=n);if(null===e)return hF=6,void(cF=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Mz(n,t,dF)))return void(cF=n);if(null!==(t=t.sibling))return void(cF=t);cF=t=e}while(null!==t);0===hF&&(hF=5)}function ej(e,t,n){var r=eO,i=aF.transition;try{aF.transition=null,eO=1,function(e,t,n,r){do{tj()}while(null!==_F);if(6&sF)throw Error($q(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error($q(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-$T(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===lF&&(cF=lF=null,uF=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||MF||(MF=!0,lj(IT,(function(){return tj(),null}))),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=aF.transition,aF.transition=null;var a=eO;eO=1;var s=sF;sF|=4,oF.current=null,function(e,t){if(NN=EO,YP(e=UP())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var h;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(h=d.firstChild);)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++c===i&&(s=a),f===o&&++u===r&&(l=a),null!==(h=d.nextSibling))break;f=(d=f).parentNode}d=h}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(AN={focusedElem:e,selectionRange:n},EO=!1,Tz=t;null!==Tz;)if(e=(t=Tz).child,1028&t.subtreeFlags&&null!==e)e.return=t,Tz=e;else for(;null!==Tz;){t=Tz;try{var p=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var m=p.memoizedProps,g=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:AL(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error($q(163))}}catch(e){rj(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Tz=e;break}Tz=t.return}p=Nz,Nz=!1}(e,n),Gz(n,e),KP(AN),EO=!!NN,AN=NN=null,e.current=n,Jz(n),TT(),sF=s,eO=a,aF.transition=o}else e.current=n;if(MF&&(MF=!1,_F=e,DF=i),o=e.pendingLanes,0===o&&(EF=null),function(e){if(jT&&"function"==typeof jT.onCommitFiberRoot)try{jT.onCommitFiberRoot(FT,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),IF(e,OT()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(SF)throw SF=!1,e=CF,CF=null,e;!!(1&DF)&&0!==e.tag&&tj(),o=e.pendingLanes,1&o?e===RF?qF++:(qF=0,RF=e):qF=0,kA()}(e,t,n,r)}finally{aF.transition=i,eO=r}return null}function tj(){if(null!==_F){var e=tO(DF),t=aF.transition,n=eO;try{if(aF.transition=null,eO=16>e?16:e,null===_F)var r=!1;else{if(e=_F,_F=null,DF=0,6&sF)throw Error($q(331));var i=sF;for(sF|=4,Tz=e.current;null!==Tz;){var o=Tz,a=o.child;if(16&Tz.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Tz=c;null!==Tz;){var u=Tz;switch(u.tag){case 0:case 11:case 15:Az(8,u,o)}var d=u.child;if(null!==d)d.return=u,Tz=d;else for(;null!==Tz;){var f=(u=Tz).sibling,h=u.return;if(zz(u),u===c){Tz=null;break}if(null!==f){f.return=h,Tz=f;break}Tz=h}}}var p=o.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}Tz=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,Tz=a;else e:for(;null!==Tz;){if(2048&(o=Tz).flags)switch(o.tag){case 0:case 11:case 15:Az(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Tz=y;break e}Tz=o.return}}var v=e.current;for(Tz=v;null!==Tz;){var b=(a=Tz).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,Tz=b;else e:for(a=v;null!==Tz;){if(2048&(s=Tz).flags)try{switch(s.tag){case 0:case 11:case 15:Iz(9,s)}}catch(e){rj(s,s.return,e)}if(s===a){Tz=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,Tz=x;break e}Tz=s.return}}if(sF=i,kA(),jT&&"function"==typeof jT.onPostCommitFiberRoot)try{jT.onPostCommitFiberRoot(FT,e)}catch(e){}r=!0}return r}finally{eO=n,aF.transition=t}}return!1}function nj(e,t,n){e=bI(e,t=UL(0,t=HL(n,t),1),1),t=PF(),null!==e&&(ZT(e,1,t),IF(e,t))}function rj(e,t,n){if(3===e.tag)nj(e,e,n);else for(;null!==t;){if(3===t.tag){nj(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===EF||!EF.has(r))){t=bI(t,e=YL(t,e=HL(n,e),1),1),e=PF(),null!==t&&(ZT(t,1,e),IF(t,e));break}}t=t.return}}function ij(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=PF(),e.pingedLanes|=e.suspendedLanes&n,lF===e&&(uF&n)===n&&(4===hF||3===hF&&(130023424&uF)===uF&&500>OT()-xF?WF(e,0):yF|=n),IF(e,t)}function oj(e,t){0===t&&(1&e.mode?(t=WT,!(130023424&(WT<<=1))&&(WT=4194304)):t=1);var n=PF();null!==(e=pI(e,t))&&(ZT(e,t,n),IF(e,n))}function aj(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),oj(e,n)}function sj(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($q(314))}null!==r&&r.delete(t),oj(e,n)}function lj(e,t){return DT(e,t)}function cj(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function uj(e,t,n,r){return new cj(e,t,n,r)}function dj(e){return!(!(e=e.prototype)||!e.isReactComponent)}function fj(e,t){var n=e.alternate;return null===n?((n=uj(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function hj(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)dj(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case oR:return pj(n.children,i,o,t);case aR:a=8,i|=8;break;case sR:return(e=uj(12,n,t,2|i)).elementType=sR,e.lanes=o,e;case dR:return(e=uj(13,n,t,i)).elementType=dR,e.lanes=o,e;case fR:return(e=uj(19,n,t,i)).elementType=fR,e.lanes=o,e;case mR:return mj(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case lR:a=10;break e;case cR:a=9;break e;case uR:a=11;break e;case hR:a=14;break e;case pR:a=16,r=null;break e}throw Error($q(130,null==e?e:typeof e,""))}return(t=uj(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function pj(e,t,n,r){return(e=uj(7,e,r,t)).lanes=n,e}function mj(e,t,n,r){return(e=uj(22,e,r,t)).elementType=mR,e.lanes=n,e.stateNode={isHidden:!1},e}function gj(e,t,n){return(e=uj(6,e,null,t)).lanes=n,e}function yj(e,t,n){return(t=uj(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vj(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=JT(0),this.expirationTimes=JT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=JT(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function bj(e,t,n,r,i,o,a,s,l){return e=new vj(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=uj(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gI(o),e}function xj(e){if(!e)return sA;e:{if(ST(e=e._reactInternals)!==e||1!==e.tag)throw Error($q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(fA(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error($q(171))}if(1===e.tag){var n=e.type;if(fA(n))return mA(e,n,t)}return t}function wj(e,t,n,r,i,o,a,s,l){return(e=bj(n,r,!0,e,0,o,0,s,l)).context=xj(null),n=e.current,(o=vI(r=PF(),i=NF(n))).callback=null!=t?t:null,bI(n,o,i),e.current.lanes=i,ZT(e,i,r),IF(e,r),e}function kj(e,t,n,r){var i=t.current,o=PF(),a=NF(i);return n=xj(n),null===t.context?t.context=n:t.pendingContext=n,(t=vI(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=bI(i,t,a))&&(AF(e,i,a,o),xI(e,i,a)),a}function Sj(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Cj(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ej(e,t){Cj(e,t),(e=e.alternate)&&Cj(e,t)}nF=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||cA.current)ZL=!0;else{if(!(e.lanes&n||128&t.flags))return ZL=!1,function(e,t,n){switch(t.tag){case 3:lz(t),YA();break;case 5:TI(t);break;case 1:fA(t.type)&&gA(t);break;case 4:qI(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;aA(nI,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(aA(PI,1&PI.current),t.flags|=128,null):n&t.child.childLanes?gz(e,t,n):(aA(PI,1&PI.current),null!==(e=Sz(e,t,n))?e.sibling:null);aA(PI,1&PI.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return wz(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),aA(PI,PI.current),r)break;return null;case 22:case 23:return t.lanes=0,rz(e,t,n)}return Sz(e,t,n)}(e,t,n);ZL=!!(131072&e.flags)}else ZL=!1,zA&&1048576&t.flags&&PA(t,MA,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kz(e,t),e=t.pendingProps;var i=dA(t,lA.current);cI(t,n),i=GI(null,t,r,e,i,n);var o=XI();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,fA(r)?(o=!0,gA(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,gI(t),i.updater=LL,t.stateNode=i,i._reactInternals=t,$L(t,r,e,n),t=sz(null,t,r,!0,o,n)):(t.tag=0,zA&&o&&NA(t),QL(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kz(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return dj(e)?1:0;if(null!=e){if((e=e.$$typeof)===uR)return 11;if(e===hR)return 14}return 2}(r),e=AL(r,e),i){case 0:t=oz(null,t,r,e,n);break e;case 1:t=az(null,t,r,e,n);break e;case 11:t=ez(null,t,r,e,n);break e;case 14:t=tz(null,t,r,AL(r.type,e),n);break e}throw Error($q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,oz(e,t,r,i=t.elementType===r?i:AL(r,i),n);case 1:return r=t.type,i=t.pendingProps,az(e,t,r,i=t.elementType===r?i:AL(r,i),n);case 3:e:{if(lz(t),null===e)throw Error($q(387));r=t.pendingProps,i=(o=t.memoizedState).element,yI(e,t),kI(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=cz(e,t,r,n,i=HL(Error($q(423)),t));break e}if(r!==i){t=cz(e,t,r,n,i=HL(Error($q(424)),t));break e}for(LA=VN(t.stateNode.containerInfo.firstChild),IA=t,zA=!0,FA=null,n=tI(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(YA(),r===i){t=Sz(e,t,n);break e}QL(e,t,r,n)}t=t.child}return t;case 5:return TI(t),null===e&&VA(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,IN(r,i)?a=null:null!==o&&IN(r,o)&&(t.flags|=32),iz(e,t),QL(e,t,a,n),t.child;case 6:return null===e&&VA(t),null;case 13:return gz(e,t,n);case 4:return qI(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=eI(t,null,r,n):QL(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ez(e,t,r,i=t.elementType===r?i:AL(r,i),n);case 7:return QL(e,t,t.pendingProps,n),t.child;case 8:case 12:return QL(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,aA(nI,r._currentValue),r._currentValue=a,null!==o)if($P(o.value,a)){if(o.children===i.children&&!cA.current){t=Sz(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=vI(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),lI(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error($q(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),lI(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}QL(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,cI(t,n),r=r(i=uI(i)),t.flags|=1,QL(e,t,r,n),t.child;case 14:return i=AL(r=t.type,t.pendingProps),tz(e,t,r,i=AL(r.type,i),n);case 15:return nz(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:AL(r,i),kz(e,t),t.tag=1,fA(r)?(e=!0,gA(t)):e=!1,cI(t,n),FL(t,r,i),$L(t,r,i,n),sz(null,t,r,!0,e,n);case 19:return wz(e,t,n);case 22:return rz(e,t,n)}throw Error($q(156,t.tag))};var Mj="function"==typeof reportError?reportError:function(e){console.error(e)};function _j(e){this._internalRoot=e}function Dj(e){this._internalRoot=e}function qj(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Rj(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Tj(){}function Oj(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Sj(a);s.call(e)}}kj(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Sj(a);o.call(e)}}var a=wj(t,r,e,0,null,!1,0,"",Tj);return e._reactRootContainer=a,e[KN]=a.current,kN(8===e.nodeType?e.parentNode:e),VF(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Sj(l);s.call(e)}}var l=bj(e,0,!1,null,0,!1,0,"",Tj);return e._reactRootContainer=l,e[KN]=l.current,kN(8===e.nodeType?e.parentNode:e),VF((function(){kj(t,l,n,r)})),l}(n,t,e,i,r);return Sj(a)}Dj.prototype.render=_j.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error($q(409));kj(e,t,null,null)},Dj.prototype.unmount=_j.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;VF((function(){kj(null,e,null,null)})),t[KN]=null}},Dj.prototype.unstable_scheduleHydration=function(e){if(e){var t=oO();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pO.length&&0!==t&&t<pO[n].priority;n++);pO.splice(n,0,e),0===n&&vO(e)}},nO=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=UT(t.pendingLanes);0!==n&&(QT(t,1|n),IF(t,OT()),!(6&sF)&&(wF=OT()+500,kA()))}break;case 13:VF((function(){var t=pI(e,1);if(null!==t){var n=PF();AF(t,e,1,n)}})),Ej(e,1)}},rO=function(e){if(13===e.tag){var t=pI(e,134217728);if(null!==t)AF(t,e,134217728,PF());Ej(e,134217728)}},iO=function(e){if(13===e.tag){var t=NF(e),n=pI(e,t);if(null!==n)AF(n,e,t,PF());Ej(e,t)}},oO=function(){return eO},aO=function(e,t){var n=eO;try{return eO=e,t()}finally{eO=n}},rT=function(e,t,n){switch(t){case"input":if(NR(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=tA(r);if(!i)throw Error($q(90));qR(r),NR(r,i)}}}break;case"textarea":$R(e,n);break;case"select":null!=(t=n.value)&&zR(e,!!n.multiple,t,!1)}},cT=HF,uT=VF;var Pj={usingClientEntryPoint:!1,Events:[QN,eA,tA,sT,lT,HF]},Nj={findFiberByHostInstance:ZN,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Aj={bundleType:Nj.bundleType,version:Nj.version,rendererPackageName:Nj.rendererPackageName,rendererConfig:Nj.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nR.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=MT(e))?null:e.stateNode},findFiberByHostInstance:Nj.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Ij=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ij.isDisabled&&Ij.supportsFiber)try{FT=Ij.inject(Aj),jT=Ij}catch(Wh){}}Aq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pj,Aq.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!qj(t))throw Error($q(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:iR,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},Aq.createRoot=function(e,t){if(!qj(e))throw Error($q(299));var n=!1,r="",i=Mj;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=bj(e,1,!1,null,0,n,0,r,i),e[KN]=t.current,kN(8===e.nodeType?e.parentNode:e),new _j(t)},Aq.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error($q(188));throw e=Object.keys(e).join(","),Error($q(268,e))}return e=null===(e=MT(t))?null:e.stateNode},Aq.flushSync=function(e){return VF(e)},Aq.hydrate=function(e,t,n){if(!Rj(t))throw Error($q(200));return Oj(null,e,t,!0,n)},Aq.hydrateRoot=function(e,t,n){if(!qj(e))throw Error($q(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=Mj;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=wj(t,null,e,1,null!=n?n:null,i,0,o,a),e[KN]=t.current,kN(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Dj(t)},Aq.render=function(e,t,n){if(!Rj(t))throw Error($q(200));return Oj(null,e,t,!1,n)},Aq.unmountComponentAtNode=function(e){if(!Rj(e))throw Error($q(40));return!!e._reactRootContainer&&(VF((function(){Oj(null,null,e,!1,(function(){e._reactRootContainer=null,e[KN]=null}))})),!0)},Aq.unstable_batchedUpdates=HF,Aq.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Rj(n))throw Error($q(200));if(null==e||void 0===e._reactInternals)throw Error($q(38));return Oj(e,t,n,!1,r)},Aq.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),Nq.exports=Aq;var Lj=Nq.exports,zj=r(Lj),Fj=!0,jj=!1,$j=null,Hj={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 Vj(e){e.metaKey||e.altKey||e.ctrlKey||(Fj=!0)}function Bj(){Fj=!1}function Wj(){"hidden"===this.visibilityState&&jj&&(Fj=!0)}function Uj(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return Fj||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!Hj[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Yj(){jj=!0,window.clearTimeout($j),$j=window.setTimeout((function(){jj=!1}),100)}function Kj(){var e=US.useCallback((function(e){var t,n=Lj.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",Vj,!0),t.addEventListener("mousedown",Bj,!0),t.addEventListener("pointerdown",Bj,!0),t.addEventListener("touchstart",Bj,!0),t.addEventListener("visibilitychange",Wj,!0))}),[]);return{isFocusVisible:Uj,onBlurVisible:Yj,ref:e}}var Gj=!1,Xj=YS.createContext(null),Jj="unmounted",Zj="exited",Qj="entering",e$="entered",t$="exiting",n$=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Zj,r.appearStatus=Qj):i=e$:i=t.unmountOnExit||t.mountOnEnter?Jj:Zj,r.state={status:i},r.nextCallback=null,r}NE(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Jj?{status:Zj}: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!==Qj&&n!==e$&&(t=Qj):n!==Qj&&n!==e$||(t=t$)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.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===Qj){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:zj.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Zj&&this.setState({status:Jj})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[zj.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Gj?this.safeSetState({status:e$},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Qj},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:e$},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:zj.findDOMNode(this);t&&!Gj?(this.props.onExit(r),this.safeSetState({status:t$},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Zj},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Zj},(function(){e.props.onExited(r)}))},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(r){n&&(n=!1,t.nextCallback=null,e(r))},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:zj.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Jj)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 r=QC(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return YS.createElement(Xj.Provider,{value:null},"function"==typeof n?n(e,r):YS.cloneElement(YS.Children.only(n),r))},t}(YS.Component);function r$(){}function i$(e,t){var n=Object.create(null);return e&&US.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&US.isValidElement(e)?t(e):e}(e)})),n}function o$(e,t,n){return null!=n[t]?n[t]:e.props[t]}function a$(e,t,n){var r=i$(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(US.isValidElement(a)){var s=o in t,l=o in r,c=t[o],u=US.isValidElement(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&US.isValidElement(c)&&(i[o]=US.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:o$(a,"exit",e),enter:o$(a,"enter",e)})):i[o]=US.cloneElement(a,{in:!1}):i[o]=US.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:o$(a,"exit",e),enter:o$(a,"enter",e)})}})),i}n$.contextType=Xj,n$.propTypes={},n$.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:r$,onEntering:r$,onEntered:r$,onExit:r$,onExiting:r$,onExited:r$},n$.UNMOUNTED=Jj,n$.EXITED=Zj,n$.ENTERING=Qj,n$.ENTERED=e$,n$.EXITING=t$;var s$=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},l$=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(AE(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}NE(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,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,i$(n.children,(function(e){return US.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:o$(e,"appear",n),enter:o$(e,"enter",n),exit:o$(e,"exit",n)})}))):a$(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=i$(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=$C({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=QC(e,["component","childFactory"]),i=this.state.contextValue,o=s$(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?YS.createElement(Xj.Provider,{value:i},o):YS.createElement(Xj.Provider,{value:i},YS.createElement(t,r,o))},t}(YS.Component);l$.propTypes={},l$.defaultProps={component:"div",childFactory:function(e){return e}};function c$(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var u$=US.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,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,f=eE(e,["classes","className","component","square","elevation","variant"]);return US.createElement(o,$C({className:_q(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(c)],!s&&n.rounded),ref:t},f))})),d$=Sq((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),$C({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"})(u$),f$="undefined"==typeof window?US.useEffect:US.useLayoutEffect;function h$(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,c=void 0===l?function(){}:l,u=e.timeout,d=US.useState(!1),f=d[0],h=d[1],p=_q(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:a,height:a,top:-a/2+o,left:-a/2+i},g=_q(t.child,f&&t.childLeaving,r&&t.childPulsate),y=Oq(c);return f$((function(){if(!s){h(!0);var e=setTimeout(y,u);return function(){clearTimeout(e)}}}),[y,s,u]),US.createElement("span",{className:p,style:m},US.createElement("span",{className:g}))}var p$=US.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=eE(e,["center","classes","className"]),s=US.useState([]),l=s[0],c=s[1],u=US.useRef(0),d=US.useRef(null);US.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var f=US.useRef(!1),h=US.useRef(null),p=US.useRef(null),m=US.useRef(null);US.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var g=US.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;c((function(e){return[].concat(yE(e),[US.createElement(h$,{key:u.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),u.current+=1,d.current=a}),[i]),y=US.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,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&f.current)f.current=!1;else{"touchstart"===e.type&&(f.current=!0);var u,d,y,v=c?null:m.current,b=v?v.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,w=x.clientX,k=x.clientY;u=Math.round(w-b.left),d=Math.round(k-b.top)}if(s)(y=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(y+=1);else{var S=2*Math.max(Math.abs((v?v.clientWidth:0)-u),u)+2,C=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;y=Math.sqrt(Math.pow(S,2)+Math.pow(C,2))}e.touches?null===p.current&&(p.current=function(){g({pulsate:o,rippleX:u,rippleY:d,rippleSize:y,cb:n})},h.current=setTimeout((function(){p.current&&(p.current(),p.current=null)}),80)):g({pulsate:o,rippleX:u,rippleY:d,rippleSize:y,cb:n})}}),[r,g]),v=US.useCallback((function(){y({},{pulsate:!0})}),[y]),b=US.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&p.current)return e.persist(),p.current(),p.current=null,void(h.current=setTimeout((function(){b(e,t)})));p.current=null,c((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return US.useImperativeHandle(t,(function(){return{pulsate:v,start:y,stop:b}}),[v,y,b]),US.createElement("span",$C({className:_q(i.root,o),ref:m},a),US.createElement(l$,{component:null,exit:!0},l))})),m$=Sq((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"})(US.memo(p$)),g$=US.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"button":c,d=e.disabled,f=void 0!==d&&d,h=e.disableRipple,p=void 0!==h&&h,m=e.disableTouchRipple,g=void 0!==m&&m,y=e.focusRipple,v=void 0!==y&&y,b=e.focusVisibleClassName,x=e.onBlur,w=e.onClick,k=e.onFocus,S=e.onFocusVisible,C=e.onKeyDown,E=e.onKeyUp,M=e.onMouseDown,_=e.onMouseLeave,D=e.onMouseUp,q=e.onTouchEnd,R=e.onTouchMove,T=e.onTouchStart,O=e.onDragLeave,P=e.tabIndex,N=void 0===P?0:P,A=e.TouchRippleProps,I=e.type,L=void 0===I?"button":I,z=eE(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"]),F=US.useRef(null);var j=US.useRef(null),$=US.useState(!1),H=$[0],V=$[1];f&&H&&V(!1);var B=Kj(),W=B.isFocusVisible,U=B.onBlurVisible,Y=B.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return Oq((function(r){return t&&t(r),!n&&j.current&&j.current[e](r),!0}))}US.useImperativeHandle(n,(function(){return{focusVisible:function(){V(!0),F.current.focus()}}}),[]),US.useEffect((function(){H&&v&&!p&&j.current.pulsate()}),[p,v,H]);var G=K("start",M),X=K("stop",O),J=K("stop",D),Z=K("stop",(function(e){H&&e.preventDefault(),_&&_(e)})),Q=K("start",T),ee=K("stop",q),te=K("stop",R),ne=K("stop",(function(e){H&&(U(e),V(!1)),x&&x(e)}),!1),re=Oq((function(e){F.current||(F.current=e.currentTarget),W(e)&&(V(!0),S&&S(e)),k&&k(e)})),ie=function(){var e=Lj.findDOMNode(F.current);return u&&"button"!==u&&!("A"===e.tagName&&e.href)},oe=US.useRef(!1),ae=Oq((function(e){v&&!oe.current&&H&&j.current&&" "===e.key&&(oe.current=!0,e.persist(),j.current.stop(e,(function(){j.current.start(e)}))),e.target===e.currentTarget&&ie()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ie()&&"Enter"===e.key&&!f&&(e.preventDefault(),w&&w(e))})),se=Oq((function(e){v&&" "===e.key&&j.current&&H&&!e.defaultPrevented&&(oe.current=!1,e.persist(),j.current.stop(e,(function(){j.current.pulsate(e)}))),E&&E(e),w&&e.target===e.currentTarget&&ie()&&" "===e.key&&!e.defaultPrevented&&w(e)})),le=u;"button"===le&&z.href&&(le="a");var ce={};"button"===le?(ce.type=L,ce.disabled=f):("a"===le&&z.href||(ce.role="button"),ce["aria-disabled"]=f);var ue=Pq(r,t),de=Pq(Y,F),fe=Pq(ue,de),he=US.useState(!1),pe=he[0],me=he[1];US.useEffect((function(){me(!0)}),[]);var ge=pe&&!p&&!f;return US.createElement(le,$C({className:_q(s.root,l,H&&[s.focusVisible,b],f&&s.disabled),onBlur:ne,onClick:w,onFocus:re,onKeyDown:ae,onKeyUp:se,onMouseDown:G,onMouseLeave:Z,onMouseUp:J,onDragLeave:X,onTouchEnd:ee,onTouchMove:te,onTouchStart:Q,ref:fe,tabIndex:f?-1:N},ce,z),a,ge?US.createElement(m$,$C({ref:j,center:o},A)):null)})),y$=Sq({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"})(g$),v$={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},b$=US.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=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,f=void 0!==d&&d,h=e.noWrap,p=void 0!==h&&h,m=e.paragraph,g=void 0!==m&&m,y=e.variant,v=void 0===y?"body1":y,b=e.variantMapping,x=void 0===b?v$:b,w=eE(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),k=l||(g?"p":x[v]||v$[v])||"span";return US.createElement(k,$C({className:_q(i.root,o,"inherit"!==v&&i[v],"initial"!==s&&i["color".concat(Cq(s))],p&&i.noWrap,f&&i.gutterBottom,g&&i.paragraph,"inherit"!==r&&i["align".concat(Cq(r))],"initial"!==u&&i["display".concat(Cq(u))]),ref:t},w))})),x$=Sq((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"})(b$),w$=US.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,c=e.disabled,u=void 0!==c&&c,d=e.disableElevation,f=void 0!==d&&d,h=e.disableFocusRipple,p=void 0!==h&&h,m=e.endIcon,g=e.focusVisibleClassName,y=e.fullWidth,v=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,w=e.startIcon,k=e.type,S=void 0===k?"button":k,C=e.variant,E=void 0===C?"text":C,M=eE(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),_=w&&US.createElement("span",{className:_q(r.startIcon,r["iconSize".concat(Cq(x))])},w),D=m&&US.createElement("span",{className:_q(r.endIcon,r["iconSize".concat(Cq(x))])},m);return US.createElement(y$,$C({className:_q(r.root,r[E],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(E).concat(Cq(a))],"medium"!==x&&[r["".concat(E,"Size").concat(Cq(x))],r["size".concat(Cq(x))]],f&&r.disableElevation,u&&r.disabled,v&&r.fullWidth),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:_q(r.focusVisible,g),ref:t,type:S},M),US.createElement("span",{className:r.label},_,n,D))})),k$=Sq((function(e){return{root:$C({},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:ZC(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:ZC(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:ZC(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(ZC(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:ZC(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(ZC(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:ZC(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"})(w$);var S$="undefined"!=typeof window?US.useLayoutEffect:US.useEffect,C$=US.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=US.useState(null),l=s[0],c=s[1],u=Pq(US.isValidElement(n)?n.ref:null,t);return S$((function(){o||c(function(e){return e="function"==typeof e?e():e,Lj.findDOMNode(e)}(r)||document.body)}),[r,o]),S$((function(){if(l&&!o)return Rq(t,l),function(){Rq(t,null)}}),[t,l,o]),S$((function(){a&&(l||o)&&a()}),[a,l,o]),o?US.isValidElement(n)?US.cloneElement(n,{ref:u}):n:l?Lj.createPortal(n,l):l}));function E$(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function M$(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function _$(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(yE(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&E$(e,r)}))}function D$(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function q$(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Dq(e);return t.body===e?qq(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){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}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(M$(o)+a,"px"),n=Dq(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(M$(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var R$=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 OE(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&&E$(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);_$(t,e.mountNode,e.modalRef,r,!0);var i=D$(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=D$(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=q$(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=D$(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&E$(e.modalRef,!0),_$(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&E$(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function T$(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,c=e.isEnabled,u=e.open,d=US.useRef(),f=US.useRef(null),h=US.useRef(null),p=US.useRef(),m=US.useRef(null),g=US.useCallback((function(e){m.current=Lj.findDOMNode(e)}),[]),y=Pq(t.ref,g),v=US.useRef();return US.useEffect((function(){v.current=u}),[u]),!v.current&&u&&"undefined"!=typeof window&&(p.current=l().activeElement),US.useEffect((function(){if(u){var e=Dq(m.current);r||!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()&&!o&&c()&&!d.current?m.current&&!m.current.contains(e.activeElement)&&m.current.focus():d.current=!1)},n=function(t){!o&&c()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():f.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[r,o,s,c,u]),US.createElement(US.Fragment,null,US.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelStart"}),US.cloneElement(t,{ref:y}),US.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var O$={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"}},P$=US.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=eE(e,["invisible","open"]);return i?US.createElement("div",$C({"aria-hidden":!0,ref:t},o,{style:$C({},O$.root,r?O$.invisible:{},o.style)})):null}));var N$=new R$,A$=US.forwardRef((function(e,t){var n=CD(),r=qE({name:"MuiModal",props:$C({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?P$:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,c=void 0!==l&&l,u=r.container,d=r.disableAutoFocus,f=void 0!==d&&d,h=r.disableBackdropClick,p=void 0!==h&&h,m=r.disableEnforceFocus,g=void 0!==m&&m,y=r.disableEscapeKeyDown,v=void 0!==y&&y,b=r.disablePortal,x=void 0!==b&&b,w=r.disableRestoreFocus,k=void 0!==w&&w,S=r.disableScrollLock,C=void 0!==S&&S,E=r.hideBackdrop,M=void 0!==E&&E,_=r.keepMounted,D=void 0!==_&&_,q=r.manager,R=void 0===q?N$:q,T=r.onBackdropClick,O=r.onClose,P=r.onEscapeKeyDown,N=r.onRendered,A=r.open,I=eE(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),L=US.useState(!0),z=L[0],F=L[1],j=US.useRef({}),$=US.useRef(null),H=US.useRef(null),V=Pq(H,t),B=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return Dq($.current)},U=function(){return j.current.modalRef=H.current,j.current.mountNode=$.current,j.current},Y=function(){R.mount(U(),{disableScrollLock:C}),H.current.scrollTop=0},K=Oq((function(){var e=function(e){return e="function"==typeof e?e():e,Lj.findDOMNode(e)}(u)||W().body;R.add(U(),e),H.current&&Y()})),G=US.useCallback((function(){return R.isTopModal(U())}),[R]),X=Oq((function(e){$.current=e,e&&(N&&N(),A&&G()?Y():E$(H.current,!0))})),J=US.useCallback((function(){R.remove(U())}),[R]);if(US.useEffect((function(){return function(){J()}}),[J]),US.useEffect((function(){A?K():B&&c||J()}),[A,J,B,c,K]),!D&&!A&&(!B||z))return null;var Z=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:CE}),Q={};return void 0===s.props.tabIndex&&(Q.tabIndex=s.props.tabIndex||"-1"),B&&(Q.onEnter=Eq((function(){F(!1)}),s.props.onEnter),Q.onExited=Eq((function(){F(!0),c&&J()}),s.props.onExited)),US.createElement(C$,{ref:X,container:u,disablePortal:x},US.createElement("div",$C({ref:V,onKeyDown:function(e){"Escape"===e.key&&G()&&(P&&P(e),v||(e.stopPropagation(),O&&O(e,"escapeKeyDown")))},role:"presentation"},I,{style:$C({},Z.root,!A&&z?Z.hidden:{},I.style)}),M?null:US.createElement(o,$C({open:A,onClick:function(e){e.target===e.currentTarget&&(T&&T(e),!p&&O&&O(e,"backdropClick"))}},a)),US.createElement(T$,{disableEnforceFocus:g,disableAutoFocus:f,disableRestoreFocus:k,getDoc:W,isEnabled:G,open:A},US.cloneElement(s,Q))))})),I$=US.forwardRef((function(e,t){var n=e.absolute,r=void 0!==n&&n,i=e.classes,o=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,f=e.orientation,h=void 0===f?"horizontal":f,p=e.role,m=void 0===p?"hr"!==s?"separator":void 0:p,g=e.variant,y=void 0===g?"fullWidth":g,v=eE(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return US.createElement(s,$C({className:_q(i.root,o,"fullWidth"!==y&&i[y],r&&i.absolute,c&&i.flexItem,d&&i.light,"vertical"===h&&i.vertical),role:m,ref:t},v))})),L$=Sq((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:ZC(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"})(I$);function z$(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var F$={entering:{opacity:1,transform:z$(1)},entered:{opacity:1,transform:"none"}},j$=US.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,c=e.onExit,u=e.onExited,d=e.onExiting,f=e.style,h=e.timeout,p=void 0===h?"auto":h,m=e.TransitionComponent,g=void 0===m?n$:m,y=eE(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=US.useRef(),b=US.useRef(),x=CD()||wq,w=x.unstable_strictMode&&!i,k=US.useRef(null),S=Pq(n.ref,t),C=Pq(w?k:void 0,S),E=function(e){return function(t,n){if(e){var r=vE(w?[k.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},M=E(l),_=E((function(e,t){!function(e){e.scrollTop}(e);var n,r=c$({style:f,timeout:p},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===p?(n=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=n):n=i,e.style.transition=[x.transitions.create("opacity",{duration:n,delay:o}),x.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),D=E(s),q=E(d),R=E((function(e){var t,n=c$({style:f,timeout:p},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===p?(t=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=t):t=r,e.style.transition=[x.transitions.create("opacity",{duration:t,delay:i}),x.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=z$(.75),c&&c(e)})),T=E(u);return US.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),US.createElement(g,$C({appear:!0,in:o,nodeRef:w?k:void 0,onEnter:_,onEntered:D,onEntering:M,onExit:R,onExited:T,onExiting:q,addEndListener:function(e,t){var n=w?e:t;"auto"===p&&(v.current=setTimeout(n,b.current||0))},timeout:"auto"===p?null:p},y),(function(e,t){return US.cloneElement(n,$C({style:$C({opacity:0,transform:z$(.75),visibility:"exited"!==e||o?void 0:"hidden"},F$[e],f,n.props.style),ref:C},t))}))}));j$.muiSupportAuto=!0;var $$=US.createContext({}),H$=US.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,c=e.disablePadding,u=void 0!==c&&c,d=e.subheader,f=eE(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=US.useMemo((function(){return{dense:l}}),[l]);return US.createElement($$.Provider,{value:h},US.createElement(a,$C({className:_q(r.root,i,l&&r.dense,!u&&r.padding,d&&r.subheader),ref:t},f),d,n))})),V$=Sq({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(H$),B$="undefined"==typeof window?US.useEffect:US.useLayoutEffect,W$=US.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,c=e.classes,u=e.className,d=e.component,f=e.ContainerComponent,h=void 0===f?"li":f,p=e.ContainerProps,m=(p=void 0===p?{}:p).className,g=eE(p,["className"]),y=e.dense,v=void 0!==y&&y,b=e.disabled,x=void 0!==b&&b,w=e.disableGutters,k=void 0!==w&&w,S=e.divider,C=void 0!==S&&S,E=e.focusVisibleClassName,M=e.selected,_=void 0!==M&&M,D=eE(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),q=US.useContext($$),R={dense:v||q.dense||!1,alignItems:r},T=US.useRef(null);B$((function(){o&&T.current&&T.current.focus()}),[o]);var O,P,N=US.Children.toArray(l),A=N.length&&(O=N[N.length-1],P=["ListItemSecondaryAction"],US.isValidElement(O)&&-1!==P.indexOf(O.type.muiName)),I=US.useCallback((function(e){T.current=Lj.findDOMNode(e)}),[]),L=Pq(I,t),z=$C({className:_q(c.root,u,R.dense&&c.dense,!k&&c.gutters,C&&c.divider,x&&c.disabled,s&&c.button,"center"!==r&&c.alignItemsFlexStart,A&&c.secondaryAction,_&&c.selected),disabled:x},D),F=d||"li";return s&&(z.component=d||"div",z.focusVisibleClassName=_q(c.focusVisible,E),F=y$),A?(F=z.component||d?F:"div","li"===h&&("li"===F?F="div":"li"===z.component&&(z.component="div")),US.createElement($$.Provider,{value:R},US.createElement(h,$C({className:_q(c.container,m),ref:L},g),US.createElement(F,z,N),N.pop()))):US.createElement($$.Provider,{value:R},US.createElement(F,$C({ref:L},z),N))})),U$=Sq((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"})(W$),Y$=US.forwardRef((function(e,t){var n=e.classes,r=e.className,i=eE(e,["classes","className"]),o=US.useContext($$);return US.createElement("div",$C({className:_q(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),K$=Sq((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(Y$),G$=US.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,c=e.primary,u=e.primaryTypographyProps,d=e.secondary,f=e.secondaryTypographyProps,h=eE(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=US.useContext($$).dense,m=null!=c?c:n;null==m||m.type===x$||a||(m=US.createElement(x$,$C({variant:p?"body2":"body1",className:r.primary,component:"span",display:"block"},u),m));var g=d;return null==g||g.type===x$||a||(g=US.createElement(x$,$C({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},f),g)),US.createElement("div",$C({className:_q(r.root,i,p&&r.dense,l&&r.inset,m&&g&&r.multiline),ref:t},h),m,g)})),X$=Sq({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(G$);function J$(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Z$(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Q$(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function eH(e){return"function"==typeof e?e():e}var tH=US.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,c=e.children,u=e.classes,d=e.className,f=e.container,h=e.elevation,p=void 0===h?8:h,m=e.getContentAnchorEl,g=e.marginThreshold,y=void 0===g?16:g,v=e.onEnter,b=e.onEntered,x=e.onEntering,w=e.onExit,k=e.onExited,S=e.onExiting,C=e.open,E=e.PaperProps,M=void 0===E?{}:E,_=e.transformOrigin,D=void 0===_?{vertical:"top",horizontal:"left"}:_,q=e.TransitionComponent,R=void 0===q?j$:q,T=e.transitionDuration,O=void 0===T?"auto":T,P=e.TransitionProps,N=void 0===P?{}:P,A=eE(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"]),I=US.useRef(),L=US.useCallback((function(e){if("anchorPosition"===l)return a;var t=eH(r),n=(t&&1===t.nodeType?t:Dq(I.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+J$(n,i),left:n.left+Z$(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),z=US.useCallback((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,m]),F=US.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:J$(e,D.vertical)+t,horizontal:Z$(e,D.horizontal)}}),[D.horizontal,D.vertical]),j=US.useCallback((function(e){var t=z(e),n={width:e.offsetWidth,height:e.offsetHeight},i=F(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Q$(i)};var o=L(t),a=o.top-i.vertical,s=o.left-i.horizontal,c=a+n.height,u=s+n.width,d=qq(eH(r)),f=d.innerHeight-y,h=d.innerWidth-y;if(a<y){var p=a-y;a-=p,i.vertical+=p}else if(c>f){var m=c-f;a-=m,i.vertical+=m}if(s<y){var g=s-y;s-=g,i.horizontal+=g}else if(u>h){var v=u-h;s-=v,i.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Q$(i)}}),[r,l,L,z,F,y]),$=US.useCallback((function(){var e=I.current;if(e){var t=j(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[j]),H=US.useCallback((function(e){I.current=Lj.findDOMNode(e)}),[]);US.useEffect((function(){C&&$()})),US.useImperativeHandle(n,(function(){return C?{updatePosition:function(){$()}}:null}),[C,$]),US.useEffect((function(){if(C){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){$()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[C,$]);var V=O;"auto"!==O||R.muiSupportAuto||(V=void 0);var B=f||(r?Dq(eH(r)).body:void 0);return US.createElement(A$,$C({container:B,open:C,ref:t,BackdropProps:{invisible:!0},className:_q(u.root,d)},A),US.createElement(R,$C({appear:!0,in:C,onEnter:v,onEntered:b,onExit:w,onExited:k,onExiting:S,timeout:V},N,{onEntering:Eq((function(e,t){x&&x(e,t),$()}),N.onEntering)}),US.createElement(d$,$C({elevation:p,ref:H},M,{className:_q(u.paper,M.className)}),c)))})),nH=Sq({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(tH);function rH(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function iH({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:rH(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return YS.createElement("i",{style:i},YS.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},YS.createElement("path",{d:e})))}const oH="alternative-menu-item",aH=e=>{const{nested:t,className:n,...r}=e,i=(({nested:e,dir:t})=>PD((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 YS.createElement(U$,gC({className:`${i.root} ${n}`},r))},sH=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${oH}`);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 lH({title:e,selected:t,onClick:n,nested:r,icon:i,bold:o,dir:a}){const s=Tg.detectTextDirection(e);return YS.createElement(aH,{nested:r,role:"menuitem",button:!0,onClick:n,className:oH,onKeyDown:sH,dir:a,autoFocus:t},YS.createElement(X$,{primary:e,primaryTypographyProps:{dir:s,...o&&{style:{fontWeight:600}}}}),YS.createElement(K$,{style:{minWidth:16}},YS.createElement(iH,{d:t?QS:""})),i&&YS.createElement(K$,{style:{minWidth:16}},YS.createElement(iH,{d:i.d})))}lH.propTypes={title:xC.string.isRequired,selected:xC.bool,onClick:xC.func.isRequired,nested:xC.bool,icon:xC.shape({d:xC.string.isRequired}),bold:xC.bool,dir:xC.string.isRequired},lH.defaultProps={selected:!1,nested:!1,icon:void 0,bold:!1},aH.propTypes={nested:xC.bool,className:xC.string},aH.defaultProps={nested:!1,className:oH};const cH={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 uH({chartId:e,alignTo:t,currentId:n,dir:r,dock:i,list:o,onClose:a,show:s,instruction:l}){const c=o.map(((t,i)=>{var s;return YS.createElement(YS.Fragment,{key:t.id},YS.createElement(lH,{icon:t.icon,title:t.title,bold:t.groupItem,selected:t.selected,onClick:()=>{t.onSelect&&t.onSelect(n),a(`${e}-${t.id}`)},dir:r}),(null===(s=t.children)||void 0===s?void 0:s.length)>0&&YS.createElement(V$,{dense:!0,dir:r,component:"div",disablePadding:!0},t.children.map((e=>YS.createElement(lH,{key:e.id,nested:!0,title:e.title,selected:e.selected,onClick:()=>{e.onSelect(),a(t.id)},dir:r})))),i<o.length-1&&YS.createElement(L$,{key:`divider-${t.id}`}))}));return YS.createElement(nH,gC({anchorEl:t,open:s,onClose:a},cH[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),YS.createElement(V$,{dense:!0,disablePadding:!0,dir:r,"aria-label":l,component:"nav"},c))}uH.propTypes={chartId:xC.string.isRequired,alignTo:xC.any,currentId:xC.string.isRequired,dir:xC.string.isRequired,dock:xC.string.isRequired,list:xC.array,onClose:xC.func.isRequired,show:xC.bool.isRequired,instruction:xC.string.isRequired},uH.defaultProps={list:[],alignTo:null};const dH="title-button",fH="active-title-button",hH=kq((({children:e,...t})=>YS.createElement(k$,gC({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),pH=kq(k$)((()=>({borderRadius:"4px",width:"24px",height:"24px",minWidth:"22px",padding:0})));class mH extends YS.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=YS.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n,showGroupDimOptions:r}=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||r)&&e.getPopoverOptions().then((e=>{this.setState({hasPopoverOptions:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r,showGroupDimOptions:i}=this.props;n&&(r||i)&&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(`.${dH}`);t&&(t.focus(),t.classList.add(fH))}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(`.${dH}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${fH}`);e&&(e.classList.remove(fH),setTimeout((()=>{e.focus()}),50))}}render(){const{chartId:e,titleData:t,popover:n,translator:r,disabled:i,isDimension:o,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},f=t.breadcrumbs.length,h=i||Boolean(!t.drillUp)||this.state.inSelection,p=t.breadcrumbs.map(((e,n)=>YS.createElement(hH,{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(f-n),title:e},YS.createElement("span",{style:d},e),YS.createElement(iH,gC({},tC,{size:"small",style:{margin:"0 8px"}}))))),m=c||u?this.state.hasPopoverOptions:l,g=n&&!this.state.open?this.openPopover:this.closePopover,y=!n||i||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:y&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&y&&"none",...a?{padding:a}:{paddingTop:0,paddingBottom:0},...s&&{minWidth:s}};this.state.open&&(v.background="rgba(0,0,0,0.08)");const b=()=>{this.setState({disableCyclicButton:!0})},x=Tg.detectTextDirection(t.text),w=YS.createElement(hH,{"aria-label":r.get(`Accessibility.${n&&m?"Alternative":"Normal"}.Instructions`,[t.text]),style:v,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:`${dH} ${t.id}`,"data-id":`${e}-${t.id}`},t.locked&&YS.createElement(iH,gC({},ZS,{size:"small",title:r.get("Tooltip.selections.locked")})),YS.createElement("span",{style:d,dir:x},t.text),n&&m&&YS.createElement(iH,gC({},eC,{size:"small",style:{margin:"0 8px"}})));return YS.createElement(YS.Fragment,null,t.icon&&t.icon.onClick&&YS.createElement(pH,{variant:"outlined",disabled:this.state.disableCyclicButton||this.state.inSelection,onClick:i?void 0:()=>t.icon.onClick({onError:b})},YS.createElement(iH,gC({},t.icon.path,{size:"small",title:r.get(t.icon.tooltip)}))),t.icon&&!t.icon.onClick&&YS.createElement(iH,gC({},t.icon.path,{size:"small",title:r.get(t.icon.tooltip),style:{margin:"0 4px 0 0"}})),p,YS.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:m?"auto":"none",height:"100%"}},w),n&&m&&YS.createElement(uH,{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:r.get("Accessibility.Popover.Instructions")}))}}function gH(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function yH(e){function t(e){return!e.isDimension&&Mg.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:r,hyperCube:i,hyperCubeDef:o,isDimension:a,minWidth:s,model:l,onChangeToAlternative:c,padding:u,rtl:d,selections:f,skipAttributeExpressions:h,translator:p,supportConditional:m=!1},layout:{dock:g}}=this.settings,y="top"!==g&&"bottom"!==g||!d?"ltr":"rtl",v=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),b=o&&o.qLayoutExclude&&o.qLayoutExclude.qHyperCubeDef,x=b&&b[a?"qDimensions":"qMeasures"]||[],w=r||i[a?"qDimensionInfo":"qMeasureInfo"],k=a?fC:pC,S=a?hC:mC,C=Boolean(l&&l.colorSupport&&l.modifiers),E=C&&((M=this.settings.settings).isDimension&&Mg.getValue(M,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||t(this.settings.settings));var M;const _=w.map(((t,r)=>{var i;const o="number"==typeof t.explicitColumn?t.explicitColumn:r,y=S(t,o,l,e),v=r===w.length-1,b=Boolean(e)&&a&&"N"!==t.qGrouping,M=C||b?k({column:o,activeInfo:t,altList:x,app:e,dir:d?"rtl":"ltr",dock:gH(g),model:l,onChange:c,skipAttributeExpressions:h,translator:p,allowChangeOfAlternatives:C}):void 0;return YS.createElement(YS.Fragment,{key:t.cId},YS.createElement(mH,{chartId:null!==(i=null==l?void 0:l.id)&&void 0!==i?i:"",showGroupDimOptions:b,popover:M,titleData:y,model:l,translator:p,selections:f,disabled:n(),style:this.style,isDimension:a,padding:u,minWidth:s,hasAlternative:E,supportConditional:m}),!v&&YS.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return YS.createElement("div",{style:v,dir:y},_)}}}mH.propTypes={chartId:xC.string.isRequired,disabled:xC.bool.isRequired,padding:xC.string,minWidth:xC.string,titleData:xC.shape({breadcrumbs:xC.arrayOf(xC.string).isRequired,icon:xC.shape({path:xC.shape({d:xC.string.isRequired}),tooltip:xC.string.isRequired,onClick:xC.func}),index:xC.number.isRequired,locked:xC.bool.isRequired,text:xC.string.isRequired,popoverText:xC.string.isRequired,drillUp:xC.func,id:xC.string.isRequired}).isRequired,popover:xC.shape({dir:xC.string.isRequired,dock:xC.string.isRequired,getPopoverOptions:xC.func.isRequired}),translator:xC.shape({get:xC.func.isRequired}).isRequired,selections:xC.shape({isActive:xC.func,addListener:xC.func,removeListener:xC.func}),style:xC.shape({fontSize:xC.string,color:xC.string,fontFamily:xC.string}).isRequired,isDimension:xC.bool.isRequired,hasAlternative:xC.bool.isRequired,supportConditional:xC.bool.isRequired,showGroupDimOptions:xC.bool.isRequired},mH.defaultProps={popover:null,selections:null,padding:"",minWidth:""};const vH=EE({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 bH=DE({productionPrefix:"qe086",disableGlobal:!0,seed:""});function xH(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=`${Math.round(i.margin.left+i.x*t)}px`,r.style.top=`${Math.round(i.margin.top+i.y*n)}px`,r.style.width=`${Math.round(i.width)}px`,r.style.height=`${Math.round(i.height)}px`,r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",zj.render(function(e,t){return YS.createElement(qD,{generateClassName:t},YS.createElement(xq,{theme:vH},e))}(e,bH),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&zj.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(zj.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}const wH={black:"#000",white:"#fff"},kH="#e57373",SH="#ef5350",CH="#f44336",EH="#d32f2f",MH="#c62828",_H="#f3e5f5",DH="#ce93d8",qH="#ba68c8",RH="#ab47bc",TH="#9c27b0",OH="#7b1fa2",PH="#e3f2fd",NH="#90caf9",AH="#42a5f5",IH="#1976d2",LH="#1565c0",zH="#4fc3f7",FH="#29b6f6",jH="#03a9f4",$H="#0288d1",HH="#01579b",VH="#81c784",BH="#66bb6a",WH="#4caf50",UH="#388e3c",YH="#2e7d32",KH="#1b5e20",GH="#ffb74d",XH="#ffa726",JH="#ff9800",ZH="#f57c00",QH="#e65100",eV={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function tV(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var nV=Object.freeze({__proto__:null,default:tV}),rV="$$material";var iV=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),oV="-ms-",aV="-moz-",sV="-webkit-",lV="comm",cV="rule",uV="decl",dV="@keyframes",fV=Math.abs,hV=String.fromCharCode,pV=Object.assign;function mV(e){return e.trim()}function gV(e,t,n){return e.replace(t,n)}function yV(e,t){return e.indexOf(t)}function vV(e,t){return 0|e.charCodeAt(t)}function bV(e,t,n){return e.slice(t,n)}function xV(e){return e.length}function wV(e){return e.length}function kV(e,t){return t.push(e),e}var SV=1,CV=1,EV=0,MV=0,_V=0,DV="";function qV(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:SV,column:CV,length:a,return:""}}function RV(e,t){return pV(qV("",null,null,"",null,null,0),e,{length:-e.length},t)}function TV(){return _V=MV>0?vV(DV,--MV):0,CV--,10===_V&&(CV=1,SV--),_V}function OV(){return _V=MV<EV?vV(DV,MV++):0,CV++,10===_V&&(CV=1,SV++),_V}function PV(){return vV(DV,MV)}function NV(){return MV}function AV(e,t){return bV(DV,e,t)}function IV(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function LV(e){return SV=CV=1,EV=xV(DV=e),MV=0,[]}function zV(e){return DV="",e}function FV(e){return mV(AV(MV-1,HV(91===e?e+2:40===e?e+1:e)))}function jV(e){for(;(_V=PV())&&_V<33;)OV();return IV(e)>2||IV(_V)>3?"":" "}function $V(e,t){for(;--t&&OV()&&!(_V<48||_V>102||_V>57&&_V<65||_V>70&&_V<97););return AV(e,NV()+(t<6&&32==PV()&&32==OV()))}function HV(e){for(;OV();)switch(_V){case e:return MV;case 34:case 39:34!==e&&39!==e&&HV(_V);break;case 40:41===e&&HV(e);break;case 92:OV()}return MV}function VV(e,t){for(;OV()&&e+_V!==57&&(e+_V!==84||47!==PV()););return"/*"+AV(t,MV-1)+"*"+hV(47===e?e:OV())}function BV(e){for(;!IV(PV());)OV();return AV(e,MV)}function WV(e){return zV(UV("",null,null,null,[""],e=LV(e),0,[0],e))}function UV(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,y=1,v=0,b="",x=i,w=o,k=r,S=b;g;)switch(p=v,v=OV()){case 40:if(108!=p&&58==vV(S,d-1)){-1!=yV(S+=gV(FV(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:S+=FV(v);break;case 9:case 10:case 13:case 32:S+=jV(p);break;case 92:S+=$V(NV()-1,7);continue;case 47:switch(PV()){case 42:case 47:kV(KV(VV(OV(),NV()),t,n),l);break;default:S+="/"}break;case 123*m:s[c++]=xV(S)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(S=gV(S,/\f/g,"")),h>0&&xV(S)-d&&kV(h>32?GV(S+";",r,n,d-1):GV(gV(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(kV(k=YV(S,t,n,c,u,i,s,b,x=[],w=[],d),o),123===v)if(0===u)UV(S,t,k,k,x,o,d,s,w);else switch(99===f&&110===vV(S,3)?100:f){case 100:case 108:case 109:case 115:UV(e,k,k,r&&kV(YV(e,k,k,0,0,i,s,b,i,x=[],d),w),i,w,d,s,r?x:w);break;default:UV(S,k,k,k,[""],w,0,s,w)}}c=u=h=0,m=y=1,b=S="",d=a;break;case 58:d=1+xV(S),h=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==TV())continue;switch(S+=hV(v),v*m){case 38:y=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(xV(S)-1)*y,y=1;break;case 64:45===PV()&&(S+=FV(OV())),f=PV(),u=d=xV(b=S+=BV(NV())),v++;break;case 45:45===p&&2==xV(S)&&(m=0)}}return o}function YV(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=0===i?o:[""],h=wV(f),p=0,m=0,g=0;p<r;++p)for(var y=0,v=bV(e,d+1,d=fV(m=a[p])),b=e;y<h;++y)(b=mV(m>0?f[y]+" "+v:gV(v,/&\f/g,f[y])))&&(l[g++]=b);return qV(e,t,n,0===i?cV:s,l,c,u)}function KV(e,t,n){return qV(e,t,n,lV,hV(_V),bV(e,2,-2),0)}function GV(e,t,n,r){return qV(e,t,n,uV,bV(e,0,r),bV(e,r+1,-1),r)}function XV(e,t){for(var n="",r=wV(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function JV(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case uV:return e.return=e.return||e.value;case lV:return"";case dV:return e.return=e.value+"{"+XV(e.children,r)+"}";case cV:e.value=e.props.join(",")}return xV(n=XV(e.children,r))?e.return=e.value+"{"+n+"}":""}function ZV(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var QV=function(e,t,n){for(var r=0,i=0;r=i,i=PV(),38===r&&12===i&&(t[n]=1),!IV(i);)OV();return AV(e,MV)},eB=function(e,t){return zV(function(e,t){var n=-1,r=44;do{switch(IV(r)){case 0:38===r&&12===PV()&&(t[n]=1),e[n]+=QV(MV-1,t,n);break;case 2:e[n]+=FV(r);break;case 4:if(44===r){e[++n]=58===PV()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=hV(r)}}while(r=OV());return e}(LV(e),t))},tB=new WeakMap,nB=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||tB.get(n))&&!r){tB.set(e,!0);for(var i=[],o=eB(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},rB=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function iB(e,t){switch(function(e,t){return 45^vV(e,0)?(((t<<2^vV(e,0))<<2^vV(e,1))<<2^vV(e,2))<<2^vV(e,3):0}(e,t)){case 5103:return sV+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return sV+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return sV+e+aV+e+oV+e+e;case 6828:case 4268:return sV+e+oV+e+e;case 6165:return sV+e+oV+"flex-"+e+e;case 5187:return sV+e+gV(e,/(\w+).+(:[^]+)/,sV+"box-$1$2"+oV+"flex-$1$2")+e;case 5443:return sV+e+oV+"flex-item-"+gV(e,/flex-|-self/,"")+e;case 4675:return sV+e+oV+"flex-line-pack"+gV(e,/align-content|flex-|-self/,"")+e;case 5548:return sV+e+oV+gV(e,"shrink","negative")+e;case 5292:return sV+e+oV+gV(e,"basis","preferred-size")+e;case 6060:return sV+"box-"+gV(e,"-grow","")+sV+e+oV+gV(e,"grow","positive")+e;case 4554:return sV+gV(e,/([^-])(transform)/g,"$1"+sV+"$2")+e;case 6187:return gV(gV(gV(e,/(zoom-|grab)/,sV+"$1"),/(image-set)/,sV+"$1"),e,"")+e;case 5495:case 3959:return gV(e,/(image-set\([^]*)/,sV+"$1$`$1");case 4968:return gV(gV(e,/(.+:)(flex-)?(.*)/,sV+"box-pack:$3"+oV+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+sV+e+e;case 4095:case 3583:case 4068:case 2532:return gV(e,/(.+)-inline(.+)/,sV+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xV(e)-1-t>6)switch(vV(e,t+1)){case 109:if(45!==vV(e,t+4))break;case 102:return gV(e,/(.+:)(.+)-([^]+)/,"$1"+sV+"$2-$3$1"+aV+(108==vV(e,t+3)?"$3":"$2-$3"))+e;case 115:return~yV(e,"stretch")?iB(gV(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==vV(e,t+1))break;case 6444:switch(vV(e,xV(e)-3-(~yV(e,"!important")&&10))){case 107:return gV(e,":",":"+sV)+e;case 101:return gV(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+sV+(45===vV(e,14)?"inline-":"")+"box$3$1"+sV+"$2$3$1"+oV+"$2box$3")+e}break;case 5936:switch(vV(e,t+11)){case 114:return sV+e+oV+gV(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return sV+e+oV+gV(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return sV+e+oV+gV(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return sV+e+oV+e+e}return e}var oB=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case uV:e.return=iB(e.value,e.length);break;case dV:return XV([RV(e,{value:gV(e.value,"@","@"+sV)})],r);case cV:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return XV([RV(e,{props:[gV(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return XV([RV(e,{props:[gV(t,/:(plac\w+)/,":"+sV+"input-$1")]}),RV(e,{props:[gV(t,/:(plac\w+)/,":-moz-$1")]}),RV(e,{props:[gV(t,/:(plac\w+)/,oV+"input-$1")]})],r)}return""}))}}],aB=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||oB,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u=[JV,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=wV(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([nB,rB].concat(o,u));i=function(e,t,n,r){l=n,function(e){XV(WV(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new iV({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return f.sheet.hydrate(s),f};function sB(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var lB=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},cB=function(e,t,n){lB(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var uB={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},dB=/[A-Z]|^ms/g,fB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hB=function(e){return 45===e.charCodeAt(1)},pB=function(e){return null!=e&&"boolean"!=typeof e},mB=ZV((function(e){return hB(e)?e:e.replace(dB,"-$&").toLowerCase()})),gB=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(fB,(function(e,t,n){return vB={name:t,styles:n,next:vB},t}))}return 1===uB[e]||hB(e)||"number"!=typeof t||0===t?t:t+"px"};function yB(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return vB={name:i.name,styles:i.styles,next:vB},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)vB={name:a.name,styles:a.styles,next:vB},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=yB(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":pB(s)&&(r+=mB(o)+":"+gB(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=yB(e,t,a);switch(o){case"animation":case"animationName":r+=mB(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var c=0;c<a.length;c++)pB(a[c])&&(r+=mB(o)+":"+gB(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=vB,l=n(e);return vB=s,yB(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var vB,bB=/label:\s*([^\s;{]+)\s*(;|$)/g;function xB(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";vB=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=yB(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=yB(n,t,e[a]),r)i+=o[a]}bB.lastIndex=0;for(var s,l="";null!==(s=bB.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:vB}}var wB,kB,SB=!!KS.useInsertionEffect&&KS.useInsertionEffect,CB=SB||function(e){return e()},EB=SB||US.useLayoutEffect,MB=US.createContext("undefined"!=typeof HTMLElement?aB({key:"css"}):null),_B=MB.Provider,DB=function(e){return US.forwardRef((function(t,n){var r=US.useContext(MB);return e(t,r,n)}))},qB=US.createContext({}),RB={}.hasOwnProperty,TB="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",OB=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return lB(t,n,r),CB((function(){return cB(t,n,r)})),null},PB=DB((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[TB],o=[r],a="";"string"==typeof e.className?a=sB(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=xB(o,void 0,US.useContext(qB));a+=t.key+"-"+s.name;var l={};for(var c in e)RB.call(e,c)&&"css"!==c&&c!==TB&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),US.createElement(US.Fragment,null,US.createElement(OB,{cache:t,serialized:s,isStringTag:"string"==typeof i}),US.createElement(i,l))})),NB=PB,AB=function(e,t){var n=arguments;if(null==t||!RB.call(t,"css"))return US.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=NB,i[1]=function(e,t){var n={};for(var r in t)RB.call(t,r)&&(n[r]=t[r]);return n[TB]=e,n}(e,t);for(var o=2;o<r;o++)i[o]=n[o];return US.createElement.apply(null,i)};wB=AB||(AB={}),kB||(kB=wB.JSX||(wB.JSX={}));var IB=DB((function(e,t){var n=xB([e.styles],void 0,US.useContext(qB)),r=US.useRef();return EB((function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),i.hydrate([a])),r.current=[i,o],function(){i.flush()}}),[t]),EB((function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&cB(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}}),[t,n.name]),null}));function LB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xB(t)}function zB(){var e=LB.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var FB=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jB=ZV((function(e){return FB.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),$B=function(e){return"theme"!==e},HB=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?jB:$B},VB=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},BB=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return lB(t,n,r),CB((function(){return cB(t,n,r)})),null},WB=function e(t,n){var r,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var s=VB(t,n,o),l=s||HB(a),c=!l("as");return function(){var u=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var h=u.length,p=1;p<h;p++)d.push(u[p],f[p])}var m=DB((function(e,t,n){var r=c&&e.as||a,o="",u=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=US.useContext(qB)}"string"==typeof e.className?o=sB(t.registered,u,e.className):null!=e.className&&(o=e.className+" ");var p=xB(d.concat(u),t.registered,f);o+=t.key+"-"+p.name,void 0!==i&&(o+=" "+i);var m=c&&void 0===s?HB(r):l,g={};for(var y in e)c&&"as"===y||m(y)&&(g[y]=e[y]);return g.className=o,n&&(g.ref=n),US.createElement(US.Fragment,null,US.createElement(BB,{cache:t,serialized:p,isStringTag:"string"==typeof r}),US.createElement(r,g))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,r){return e(t,$C({},n,r,{shouldForwardProp:VB(m,r,!0)})).apply(void 0,d)},m}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){WB[e]=WB(e)}));var UB={exports:{}},YB={},KB=US,GB=Symbol.for("react.element"),XB=Symbol.for("react.fragment"),JB=Object.prototype.hasOwnProperty,ZB=KB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,QB={key:!0,ref:!0,__self:!0,__source:!0};function eW(e,t,n){var r,i={},o=null,a=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)JB.call(t,r)&&!QB.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:GB,type:e,key:o,ref:a,props:i,_owner:ZB.current}}YB.Fragment=XB,YB.jsx=eW,YB.jsxs=eW,UB.exports=YB;var tW=UB.exports;let nW;"object"==typeof document&&(nW=aB({key:"css",prepend:!0}));var rW=Object.freeze({__proto__:null,GlobalStyles:function(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return tW.jsx(IB,{styles:r})}
|
|
42
|
+
*/function $q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hq=new Set,Vq={};function Bq(e,t){Wq(e,t),Wq(e+"Capture",t)}function Wq(e,t){for(Vq[e]=t,e=0;e<t.length;e++)Hq.add(t[e])}var Uq=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Yq=Object.prototype.hasOwnProperty,Kq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gq={},Xq={};function Jq(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Zq={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Zq[e]=new Jq(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Zq[t]=new Jq(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Zq[e]=new Jq(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Zq[e]=new Jq(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Zq[e]=new Jq(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Zq[e]=new Jq(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){Zq[e]=new Jq(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){Zq[e]=new Jq(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){Zq[e]=new Jq(e,5,!1,e.toLowerCase(),null,!1,!1)}));var Qq=/[\-:]([a-z])/g;function eR(e){return e[1].toUpperCase()}function tR(e,t,n,r){var i=Zq.hasOwnProperty(t)?Zq[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!Yq.call(Xq,e)||!Yq.call(Gq,e)&&(Kq.test(e)?Xq[e]=!0:(Gq[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Qq,eR);Zq[t]=new Jq(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Qq,eR);Zq[t]=new Jq(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Qq,eR);Zq[t]=new Jq(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){Zq[e]=new Jq(e,1,!1,e.toLowerCase(),null,!1,!1)})),Zq.xlinkHref=new Jq("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){Zq[e]=new Jq(e,1,!1,e.toLowerCase(),null,!0,!0)}));var nR=Fq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rR=Symbol.for("react.element"),iR=Symbol.for("react.portal"),oR=Symbol.for("react.fragment"),aR=Symbol.for("react.strict_mode"),sR=Symbol.for("react.profiler"),lR=Symbol.for("react.provider"),cR=Symbol.for("react.context"),uR=Symbol.for("react.forward_ref"),dR=Symbol.for("react.suspense"),fR=Symbol.for("react.suspense_list"),hR=Symbol.for("react.memo"),pR=Symbol.for("react.lazy"),mR=Symbol.for("react.offscreen"),gR=Symbol.iterator;function yR(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=gR&&e[gR]||e["@@iterator"])?e:null}var vR,bR=Object.assign;function xR(e){if(void 0===vR)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);vR=t&&t[1]||""}return"\n"+vR+e}var wR=!1;function kR(e,t){if(!e||wR)return"";wR=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{wR=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xR(e):""}function SR(e){switch(e.tag){case 5:return xR(e.type);case 16:return xR("Lazy");case 13:return xR("Suspense");case 19:return xR("SuspenseList");case 0:case 2:case 15:return e=kR(e.type,!1);case 11:return e=kR(e.type.render,!1);case 1:return e=kR(e.type,!0);default:return""}}function CR(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case oR:return"Fragment";case iR:return"Portal";case sR:return"Profiler";case aR:return"StrictMode";case dR:return"Suspense";case fR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case cR:return(e.displayName||"Context")+".Consumer";case lR:return(e._context.displayName||"Context")+".Provider";case uR:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case hR:return null!==(t=e.displayName||null)?t:CR(e.type)||"Memo";case pR:t=e._payload,e=e._init;try{return CR(e(t))}catch(e){}}return null}function ER(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return CR(t);case 8:return t===aR?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function MR(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function _R(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function DR(e){e._valueTracker||(e._valueTracker=function(e){var t=_R(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function qR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_R(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function RR(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function TR(e,t){var n=t.checked;return bR({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function OR(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=MR(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function PR(e,t){null!=(t=t.checked)&&tR(e,"checked",t,!1)}function NR(e,t){PR(e,t);var n=MR(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?IR(e,t.type,n):t.hasOwnProperty("defaultValue")&&IR(e,t.type,MR(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function AR(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function IR(e,t,n){"number"===t&&RR(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var LR=Array.isArray;function zR(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+MR(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function FR(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error($q(91));return bR({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function jR(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error($q(92));if(LR(n)){if(1<n.length)throw Error($q(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:MR(n)}}function $R(e,t){var n=MR(t.value),r=MR(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function HR(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function VR(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function BR(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?VR(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var WR,UR=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((WR=WR||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=WR.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function YR(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var KR={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},GR=["Webkit","ms","Moz","O"];function XR(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||KR.hasOwnProperty(e)&&KR[e]?(""+t).trim():t+"px"}function JR(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=XR(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(KR).forEach((function(e){GR.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),KR[t]=KR[e]}))}));var ZR=bR({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function QR(e,t){if(t){if(ZR[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error($q(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error($q(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error($q(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error($q(62))}}function eT(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tT=null;function nT(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var rT=null,iT=null,oT=null;function aT(e){if(e=QN(e)){if("function"!=typeof rT)throw Error($q(280));var t=e.stateNode;t&&(t=tA(t),rT(e.stateNode,e.type,t))}}function sT(e){iT?oT?oT.push(e):oT=[e]:iT=e}function lT(){if(iT){var e=iT,t=oT;if(oT=iT=null,aT(e),t)for(e=0;e<t.length;e++)aT(t[e])}}function cT(e,t){return e(t)}function uT(){}var dT=!1;function fT(e,t,n){if(dT)return e(t,n);dT=!0;try{return cT(e,t,n)}finally{dT=!1,(null!==iT||null!==oT)&&(uT(),lT())}}function hT(e,t){var n=e.stateNode;if(null===n)return null;var r=tA(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error($q(231,t,typeof n));return n}var pT=!1;if(Uq)try{var mT={};Object.defineProperty(mT,"passive",{get:function(){pT=!0}}),window.addEventListener("test",mT,mT),window.removeEventListener("test",mT,mT)}catch(Wh){pT=!1}function gT(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var yT=!1,vT=null,bT=!1,xT=null,wT={onError:function(e){yT=!0,vT=e}};function kT(e,t,n,r,i,o,a,s,l){yT=!1,vT=null,gT.apply(wT,arguments)}function ST(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function CT(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function ET(e){if(ST(e)!==e)throw Error($q(188))}function MT(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=ST(e)))throw Error($q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ET(i),e;if(o===r)return ET(i),t;o=o.sibling}throw Error($q(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error($q(189))}}if(n.alternate!==r)throw Error($q(190))}if(3!==n.tag)throw Error($q(188));return n.stateNode.current===n?e:t}(e),null!==e?_T(e):null}function _T(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=_T(e);if(null!==t)return t;e=e.sibling}return null}var DT=jq.unstable_scheduleCallback,qT=jq.unstable_cancelCallback,RT=jq.unstable_shouldYield,TT=jq.unstable_requestPaint,OT=jq.unstable_now,PT=jq.unstable_getCurrentPriorityLevel,NT=jq.unstable_ImmediatePriority,AT=jq.unstable_UserBlockingPriority,IT=jq.unstable_NormalPriority,LT=jq.unstable_LowPriority,zT=jq.unstable_IdlePriority,FT=null,jT=null;var $T=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(HT(e)/VT|0)|0},HT=Math.log,VT=Math.LN2;var BT=64,WT=4194304;function UT(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function YT(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=UT(s):0!==(o&=a)&&(r=UT(o))}else 0!==(a=n&~i)?r=UT(a):0!==o&&(r=UT(o));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-$T(t)),r|=e[n],t&=~i;return r}function KT(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function GT(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function XT(){var e=BT;return!(4194240&(BT<<=1))&&(BT=64),e}function JT(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ZT(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-$T(t)]=n}function QT(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$T(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var eO=0;function tO(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var nO,rO,iO,oO,aO,sO=!1,lO=[],cO=null,uO=null,dO=null,fO=new Map,hO=new Map,pO=[],mO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function gO(e,t){switch(e){case"focusin":case"focusout":cO=null;break;case"dragenter":case"dragleave":uO=null;break;case"mouseover":case"mouseout":dO=null;break;case"pointerover":case"pointerout":fO.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hO.delete(t.pointerId)}}function yO(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=QN(t))&&rO(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function vO(e){var t=ZN(e.target);if(null!==t){var n=ST(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=CT(n)))return e.blockedOn=t,void aO(e.priority,(function(){iO(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function bO(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=RO(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=QN(n))&&rO(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);tT=r,n.target.dispatchEvent(r),tT=null,t.shift()}return!0}function xO(e,t,n){bO(e)&&n.delete(t)}function wO(){sO=!1,null!==cO&&bO(cO)&&(cO=null),null!==uO&&bO(uO)&&(uO=null),null!==dO&&bO(dO)&&(dO=null),fO.forEach(xO),hO.forEach(xO)}function kO(e,t){e.blockedOn===t&&(e.blockedOn=null,sO||(sO=!0,jq.unstable_scheduleCallback(jq.unstable_NormalPriority,wO)))}function SO(e){function t(t){return kO(t,e)}if(0<lO.length){kO(lO[0],e);for(var n=1;n<lO.length;n++){var r=lO[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==cO&&kO(cO,e),null!==uO&&kO(uO,e),null!==dO&&kO(dO,e),fO.forEach(t),hO.forEach(t),n=0;n<pO.length;n++)(r=pO[n]).blockedOn===e&&(r.blockedOn=null);for(;0<pO.length&&null===(n=pO[0]).blockedOn;)vO(n),null===n.blockedOn&&pO.shift()}var CO=nR.ReactCurrentBatchConfig,EO=!0;function MO(e,t,n,r){var i=eO,o=CO.transition;CO.transition=null;try{eO=1,DO(e,t,n,r)}finally{eO=i,CO.transition=o}}function _O(e,t,n,r){var i=eO,o=CO.transition;CO.transition=null;try{eO=4,DO(e,t,n,r)}finally{eO=i,CO.transition=o}}function DO(e,t,n,r){if(EO){var i=RO(e,t,n,r);if(null===i)CN(e,t,r,qO,n),gO(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return cO=yO(cO,e,t,n,r,i),!0;case"dragenter":return uO=yO(uO,e,t,n,r,i),!0;case"mouseover":return dO=yO(dO,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return fO.set(o,yO(fO.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,hO.set(o,yO(hO.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(gO(e,r),4&t&&-1<mO.indexOf(e)){for(;null!==i;){var o=QN(i);if(null!==o&&nO(o),null===(o=RO(e,t,n,r))&&CN(e,t,r,qO,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else CN(e,t,r,null,n)}}var qO=null;function RO(e,t,n,r){if(qO=null,null!==(e=ZN(e=nT(r))))if(null===(t=ST(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=CT(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qO=e,null}function TO(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(PT()){case NT:return 1;case AT:return 4;case IT:case LT:return 16;case zT:return 536870912;default:return 16}default:return 16}}var OO=null,PO=null,NO=null;function AO(){if(NO)return NO;var e,t,n=PO,r=n.length,i="value"in OO?OO.value:OO.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return NO=i.slice(e,1<t?1-t:void 0)}function IO(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function LO(){return!0}function zO(){return!1}function FO(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?LO:zO,this.isPropagationStopped=zO,this}return bR(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=LO)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=LO)},persist:function(){},isPersistent:LO}),t}var jO,$O,HO,VO={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},BO=FO(VO),WO=bR({},VO,{view:0,detail:0}),UO=FO(WO),YO=bR({},WO,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oP,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==HO&&(HO&&"mousemove"===e.type?(jO=e.screenX-HO.screenX,$O=e.screenY-HO.screenY):$O=jO=0,HO=e),jO)},movementY:function(e){return"movementY"in e?e.movementY:$O}}),KO=FO(YO),GO=FO(bR({},YO,{dataTransfer:0})),XO=FO(bR({},WO,{relatedTarget:0})),JO=FO(bR({},VO,{animationName:0,elapsedTime:0,pseudoElement:0})),ZO=bR({},VO,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QO=FO(ZO),eP=FO(bR({},VO,{data:0})),tP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nP={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},rP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=rP[e])&&!!t[e]}function oP(){return iP}var aP=bR({},WO,{key:function(e){if(e.key){var t=tP[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=IO(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?nP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oP,charCode:function(e){return"keypress"===e.type?IO(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?IO(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),sP=FO(aP),lP=FO(bR({},YO,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),cP=FO(bR({},WO,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oP})),uP=FO(bR({},VO,{propertyName:0,elapsedTime:0,pseudoElement:0})),dP=bR({},YO,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fP=FO(dP),hP=[9,13,27,32],pP=Uq&&"CompositionEvent"in window,mP=null;Uq&&"documentMode"in document&&(mP=document.documentMode);var gP=Uq&&"TextEvent"in window&&!mP,yP=Uq&&(!pP||mP&&8<mP&&11>=mP),vP=String.fromCharCode(32),bP=!1;function xP(e,t){switch(e){case"keyup":return-1!==hP.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wP(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var kP=!1;var SP={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function CP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!SP[e.type]:"textarea"===t}function EP(e,t,n,r){sT(r),0<(t=MN(t,"onChange")).length&&(n=new BO("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var MP=null,_P=null;function DP(e){vN(e,0)}function qP(e){if(qR(eA(e)))return e}function RP(e,t){if("change"===e)return t}var TP=!1;if(Uq){var OP;if(Uq){var PP="oninput"in document;if(!PP){var NP=document.createElement("div");NP.setAttribute("oninput","return;"),PP="function"==typeof NP.oninput}OP=PP}else OP=!1;TP=OP&&(!document.documentMode||9<document.documentMode)}function AP(){MP&&(MP.detachEvent("onpropertychange",IP),_P=MP=null)}function IP(e){if("value"===e.propertyName&&qP(_P)){var t=[];EP(t,_P,e,nT(e)),fT(DP,t)}}function LP(e,t,n){"focusin"===e?(AP(),_P=n,(MP=t).attachEvent("onpropertychange",IP)):"focusout"===e&&AP()}function zP(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qP(_P)}function FP(e,t){if("click"===e)return qP(t)}function jP(e,t){if("input"===e||"change"===e)return qP(t)}var $P="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function HP(e,t){if($P(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Yq.call(t,i)||!$P(e[i],t[i]))return!1}return!0}function VP(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function BP(e,t){var n,r=VP(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=VP(r)}}function WP(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?WP(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function UP(){for(var e=window,t=RR();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=RR((e=t.contentWindow).document)}return t}function YP(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function KP(e){var t=UP(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&WP(n.ownerDocument.documentElement,n)){if(null!==r&&YP(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=BP(n,o);var a=BP(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var GP=Uq&&"documentMode"in document&&11>=document.documentMode,XP=null,JP=null,ZP=null,QP=!1;function eN(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;QP||null==XP||XP!==RR(r)||("selectionStart"in(r=XP)&&YP(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ZP&&HP(ZP,r)||(ZP=r,0<(r=MN(JP,"onSelect")).length&&(t=new BO("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=XP)))}function tN(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nN={animationend:tN("Animation","AnimationEnd"),animationiteration:tN("Animation","AnimationIteration"),animationstart:tN("Animation","AnimationStart"),transitionend:tN("Transition","TransitionEnd")},rN={},iN={};function oN(e){if(rN[e])return rN[e];if(!nN[e])return e;var t,n=nN[e];for(t in n)if(n.hasOwnProperty(t)&&t in iN)return rN[e]=n[t];return e}Uq&&(iN=document.createElement("div").style,"AnimationEvent"in window||(delete nN.animationend.animation,delete nN.animationiteration.animation,delete nN.animationstart.animation),"TransitionEvent"in window||delete nN.transitionend.transition);var aN=oN("animationend"),sN=oN("animationiteration"),lN=oN("animationstart"),cN=oN("transitionend"),uN=new Map,dN="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fN(e,t){uN.set(e,t),Bq(t,[e])}for(var hN=0;hN<dN.length;hN++){var pN=dN[hN];fN(pN.toLowerCase(),"on"+(pN[0].toUpperCase()+pN.slice(1)))}fN(aN,"onAnimationEnd"),fN(sN,"onAnimationIteration"),fN(lN,"onAnimationStart"),fN("dblclick","onDoubleClick"),fN("focusin","onFocus"),fN("focusout","onBlur"),fN(cN,"onTransitionEnd"),Wq("onMouseEnter",["mouseout","mouseover"]),Wq("onMouseLeave",["mouseout","mouseover"]),Wq("onPointerEnter",["pointerout","pointerover"]),Wq("onPointerLeave",["pointerout","pointerover"]),Bq("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bq("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bq("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bq("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bq("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bq("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mN="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gN=new Set("cancel close invalid load scroll toggle".split(" ").concat(mN));function yN(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(kT.apply(this,arguments),yT){if(!yT)throw Error($q(198));var c=vT;yT=!1,vT=null,bT||(bT=!0,xT=c)}}(r,t,void 0,e),e.currentTarget=null}function vN(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;yN(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;yN(i,s,c),o=l}}}if(bT)throw e=xT,bT=!1,xT=null,e}function bN(e,t){var n=t[GN];void 0===n&&(n=t[GN]=new Set);var r=e+"__bubble";n.has(r)||(SN(t,e,2,!1),n.add(r))}function xN(e,t,n){var r=0;t&&(r|=4),SN(n,e,r,t)}var wN="_reactListening"+Math.random().toString(36).slice(2);function kN(e){if(!e[wN]){e[wN]=!0,Hq.forEach((function(t){"selectionchange"!==t&&(gN.has(t)||xN(t,!1,e),xN(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[wN]||(t[wN]=!0,xN("selectionchange",!1,t))}}function SN(e,t,n,r){switch(TO(t)){case 1:var i=MO;break;case 4:i=_O;break;default:i=DO}n=i.bind(null,t,n,e),i=void 0,!pT||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function CN(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=ZN(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}fT((function(){var r=o,i=nT(n),a=[];e:{var s=uN.get(e);if(void 0!==s){var l=BO,c=e;switch(e){case"keypress":if(0===IO(n))break e;case"keydown":case"keyup":l=sP;break;case"focusin":c="focus",l=XO;break;case"focusout":c="blur",l=XO;break;case"beforeblur":case"afterblur":l=XO;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=KO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=GO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=cP;break;case aN:case sN:case lN:l=JO;break;case cN:l=uP;break;case"scroll":l=UO;break;case"wheel":l=fP;break;case"copy":case"cut":case"paste":l=QO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=lP}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&(null!=(m=hT(p,f))&&u.push(EN(p,m,h)))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===tT||!(c=n.relatedTarget||n.fromElement)||!ZN(c)&&!c[KN])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?ZN(c):null)&&(c!==(d=ST(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=KO,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=lP,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==l?s:eA(l),h=null==c?s:eA(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=h,m=null,ZN(i)===r&&((u=new u(f,p+"enter",c,n,i)).target=h,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,p=0,h=u=l;h;h=_N(h))p++;for(h=0,m=f;m;m=_N(m))h++;for(;0<p-h;)u=_N(u),p--;for(;0<h-p;)f=_N(f),h--;for(;p--;){if(u===f||null!==f&&u===f.alternate)break e;u=_N(u),f=_N(f)}u=null}else u=null;null!==l&&DN(a,s,l,u,!1),null!==c&&null!==d&&DN(a,d,c,u,!0)}if("select"===(l=(s=r?eA(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=RP;else if(CP(s))if(TP)g=jP;else{g=zP;var y=LP}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=FP);switch(g&&(g=g(e,r))?EP(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&IR(s,"number",s.value)),y=r?eA(r):window,e){case"focusin":(CP(y)||"true"===y.contentEditable)&&(XP=y,JP=r,ZP=null);break;case"focusout":ZP=JP=XP=null;break;case"mousedown":QP=!0;break;case"contextmenu":case"mouseup":case"dragend":QP=!1,eN(a,n,i);break;case"selectionchange":if(GP)break;case"keydown":case"keyup":eN(a,n,i)}var v;if(pP)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else kP?xP(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(yP&&"ko"!==n.locale&&(kP||"onCompositionStart"!==b?"onCompositionEnd"===b&&kP&&(v=AO()):(PO="value"in(OO=i)?OO.value:OO.textContent,kP=!0)),0<(y=MN(r,b)).length&&(b=new eP(b,e,null,n,i),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=wP(n))&&(b.data=v))),(v=gP?function(e,t){switch(e){case"compositionend":return wP(t);case"keypress":return 32!==t.which?null:(bP=!0,vP);case"textInput":return(e=t.data)===vP&&bP?null:e;default:return null}}(e,n):function(e,t){if(kP)return"compositionend"===e||!pP&&xP(e,t)?(e=AO(),NO=PO=OO=null,kP=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return yP&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=MN(r,"onBeforeInput")).length&&(i=new eP("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}vN(a,t)}))}function EN(e,t,n){return{instance:e,listener:t,currentTarget:n}}function MN(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=hT(e,n))&&r.unshift(EN(e,o,i)),null!=(o=hT(e,t))&&r.push(EN(e,o,i))),e=e.return}return r}function _N(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function DN(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=hT(n,o))&&a.unshift(EN(n,l,s)):i||null!=(l=hT(n,o))&&a.push(EN(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var qN=/\r\n?/g,RN=/\u0000|\uFFFD/g;function TN(e){return("string"==typeof e?e:""+e).replace(qN,"\n").replace(RN,"")}function ON(e,t,n){if(t=TN(t),TN(e)!==t&&n)throw Error($q(425))}function PN(){}var NN=null,AN=null;function IN(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var LN="function"==typeof setTimeout?setTimeout:void 0,zN="function"==typeof clearTimeout?clearTimeout:void 0,FN="function"==typeof Promise?Promise:void 0,jN="function"==typeof queueMicrotask?queueMicrotask:void 0!==FN?function(e){return FN.resolve(null).then(e).catch($N)}:LN;function $N(e){setTimeout((function(){throw e}))}function HN(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void SO(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);SO(t)}function VN(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function BN(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var WN=Math.random().toString(36).slice(2),UN="__reactFiber$"+WN,YN="__reactProps$"+WN,KN="__reactContainer$"+WN,GN="__reactEvents$"+WN,XN="__reactListeners$"+WN,JN="__reactHandles$"+WN;function ZN(e){var t=e[UN];if(t)return t;for(var n=e.parentNode;n;){if(t=n[KN]||n[UN]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=BN(e);null!==e;){if(n=e[UN])return n;e=BN(e)}return t}n=(e=n).parentNode}return null}function QN(e){return!(e=e[UN]||e[KN])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function eA(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error($q(33))}function tA(e){return e[YN]||null}var nA=[],rA=-1;function iA(e){return{current:e}}function oA(e){0>rA||(e.current=nA[rA],nA[rA]=null,rA--)}function aA(e,t){rA++,nA[rA]=e.current,e.current=t}var sA={},lA=iA(sA),cA=iA(!1),uA=sA;function dA(e,t){var n=e.type.contextTypes;if(!n)return sA;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fA(e){return null!=(e=e.childContextTypes)}function hA(){oA(cA),oA(lA)}function pA(e,t,n){if(lA.current!==sA)throw Error($q(168));aA(lA,t),aA(cA,n)}function mA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error($q(108,ER(e)||"Unknown",i));return bR({},n,r)}function gA(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sA,uA=lA.current,aA(lA,e),aA(cA,cA.current),!0}function yA(e,t,n){var r=e.stateNode;if(!r)throw Error($q(169));n?(e=mA(e,t,uA),r.__reactInternalMemoizedMergedChildContext=e,oA(cA),oA(lA),aA(lA,e)):oA(cA),aA(cA,n)}var vA=null,bA=!1,xA=!1;function wA(e){null===vA?vA=[e]:vA.push(e)}function kA(){if(!xA&&null!==vA){xA=!0;var e=0,t=eO;try{var n=vA;for(eO=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}vA=null,bA=!1}catch(t){throw null!==vA&&(vA=vA.slice(e+1)),DT(NT,kA),t}finally{eO=t,xA=!1}}return null}var SA=[],CA=0,EA=null,MA=0,_A=[],DA=0,qA=null,RA=1,TA="";function OA(e,t){SA[CA++]=MA,SA[CA++]=EA,EA=e,MA=t}function PA(e,t,n){_A[DA++]=RA,_A[DA++]=TA,_A[DA++]=qA,qA=e;var r=RA;e=TA;var i=32-$T(r)-1;r&=~(1<<i),n+=1;var o=32-$T(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,RA=1<<32-$T(t)+i|n<<i|r,TA=o+e}else RA=1<<o|n<<i|r,TA=e}function NA(e){null!==e.return&&(OA(e,1),PA(e,1,0))}function AA(e){for(;e===EA;)EA=SA[--CA],SA[CA]=null,MA=SA[--CA],SA[CA]=null;for(;e===qA;)qA=_A[--DA],_A[DA]=null,TA=_A[--DA],_A[DA]=null,RA=_A[--DA],_A[DA]=null}var IA=null,LA=null,zA=!1,FA=null;function jA(e,t){var n=uj(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function $A(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,IA=e,LA=VN(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,IA=e,LA=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==qA?{id:RA,overflow:TA}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=uj(18,null,null,0)).stateNode=t,n.return=e,e.child=n,IA=e,LA=null,!0);default:return!1}}function HA(e){return!(!(1&e.mode)||128&e.flags)}function VA(e){if(zA){var t=LA;if(t){var n=t;if(!$A(e,t)){if(HA(e))throw Error($q(418));t=VN(n.nextSibling);var r=IA;t&&$A(e,t)?jA(r,n):(e.flags=-4097&e.flags|2,zA=!1,IA=e)}}else{if(HA(e))throw Error($q(418));e.flags=-4097&e.flags|2,zA=!1,IA=e}}}function BA(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;IA=e}function WA(e){if(e!==IA)return!1;if(!zA)return BA(e),zA=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!IN(e.type,e.memoizedProps)),t&&(t=LA)){if(HA(e))throw UA(),Error($q(418));for(;t;)jA(e,t),t=VN(t.nextSibling)}if(BA(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error($q(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){LA=VN(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}LA=null}}else LA=IA?VN(e.stateNode.nextSibling):null;return!0}function UA(){for(var e=LA;e;)e=VN(e.nextSibling)}function YA(){LA=IA=null,zA=!1}function KA(e){null===FA?FA=[e]:FA.push(e)}var GA=nR.ReactCurrentBatchConfig;function XA(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error($q(309));var r=n.stateNode}if(!r)throw Error($q(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error($q(284));if(!n._owner)throw Error($q(290,e))}return e}function JA(e,t){throw e=Object.prototype.toString.call(t),Error($q(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ZA(e){return(0,e._init)(e._payload)}function QA(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=fj(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=gj(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===oR?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===pR&&ZA(o)===t.type)?((r=i(t,n.props)).ref=XA(e,t,n),r.return=e,r):((r=hj(n.type,n.key,n.props,null,e.mode,r)).ref=XA(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=yj(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=pj(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=gj(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case rR:return(n=hj(t.type,t.key,t.props,null,e.mode,n)).ref=XA(e,null,t),n.return=e,n;case iR:return(t=yj(t,e.mode,n)).return=e,t;case pR:return d(e,(0,t._init)(t._payload),n)}if(LR(t)||yR(t))return(t=pj(t,e.mode,n,null)).return=e,t;JA(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case rR:return n.key===i?l(e,t,n,r):null;case iR:return n.key===i?c(e,t,n,r):null;case pR:return f(e,t,(i=n._init)(n._payload),r)}if(LR(n)||yR(n))return null!==i?null:u(e,t,n,r,null);JA(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case rR:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case iR:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case pR:return h(e,t,n,(0,r._init)(r._payload),i)}if(LR(r)||yR(r))return u(t,e=e.get(n)||null,r,i,null);JA(t,r)}return null}function p(i,a,s,l){for(var c=null,u=null,p=a,m=a=0,g=null;null!==p&&m<s.length;m++){p.index>m?(g=p,p=null):g=p.sibling;var y=f(i,p,s[m],l);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(i,p),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,p=g}if(m===s.length)return n(i,p),zA&&OA(i,m),c;if(null===p){for(;m<s.length;m++)null!==(p=d(i,s[m],l))&&(a=o(p,a,m),null===u?c=p:u.sibling=p,u=p);return zA&&OA(i,m),c}for(p=r(i,p);m<s.length;m++)null!==(g=h(p,i,m,s[m],l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&p.forEach((function(e){return t(i,e)})),zA&&OA(i,m),c}function m(i,a,s,l){var c=yR(s);if("function"!=typeof c)throw Error($q(150));if(null==(s=c.call(s)))throw Error($q(151));for(var u=c=null,p=a,m=a=0,g=null,y=s.next();null!==p&&!y.done;m++,y=s.next()){p.index>m?(g=p,p=null):g=p.sibling;var v=f(i,p,y.value,l);if(null===v){null===p&&(p=g);break}e&&p&&null===v.alternate&&t(i,p),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,p=g}if(y.done)return n(i,p),zA&&OA(i,m),c;if(null===p){for(;!y.done;m++,y=s.next())null!==(y=d(i,y.value,l))&&(a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return zA&&OA(i,m),c}for(p=r(i,p);!y.done;m++,y=s.next())null!==(y=h(p,i,m,y.value,l))&&(e&&null!==y.alternate&&p.delete(null===y.key?m:y.key),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return e&&p.forEach((function(e){return t(i,e)})),zA&&OA(i,m),c}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===oR&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case rR:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===oR){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===pR&&ZA(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=XA(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===oR?((o=pj(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=hj(s.type,s.key,s.props,null,r.mode,l)).ref=XA(r,o,s),l.return=r,r=l)}return a(r);case iR:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=yj(s,r.mode,l)).return=r,r=o}return a(r);case pR:return e(r,o,(u=s._init)(s._payload),l)}if(LR(s))return p(r,o,s,l);if(yR(s))return m(r,o,s,l);JA(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=gj(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var eI=QA(!0),tI=QA(!1),nI=iA(null),rI=null,iI=null,oI=null;function aI(){oI=iI=rI=null}function sI(e){var t=nI.current;oA(nI),e._currentValue=t}function lI(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function cI(e,t){rI=e,oI=iI=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(ZL=!0),e.firstContext=null)}function uI(e){var t=e._currentValue;if(oI!==e)if(e={context:e,memoizedValue:t,next:null},null===iI){if(null===rI)throw Error($q(308));iI=e,rI.dependencies={lanes:0,firstContext:e}}else iI=iI.next=e;return t}var dI=null;function fI(e){null===dI?dI=[e]:dI.push(e)}function hI(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,fI(t)):(n.next=i.next,i.next=n),t.interleaved=n,pI(e,r)}function pI(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var mI=!1;function gI(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yI(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vI(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bI(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&sF){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,pI(e,n)}return null===(i=r.interleaved)?(t.next=t,fI(r)):(t.next=i.next,i.next=t),r.interleaved=t,pI(e,n)}function xI(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,QT(e,n)}}function wI(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function kI(e,t,n,r){var i=e.updateQueue;mI=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(f=t,h=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(h,d,f):p))break e;d=bR({},d,f);break e;case 2:mI=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=d):u=u.next=h,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);mF|=a,e.lanes=a,e.memoizedState=d}}function SI(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error($q(191,i));i.call(r)}}}var CI={},EI=iA(CI),MI=iA(CI),_I=iA(CI);function DI(e){if(e===CI)throw Error($q(174));return e}function qI(e,t){switch(aA(_I,t),aA(MI,e),aA(EI,CI),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:BR(null,"");break;default:t=BR(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}oA(EI),aA(EI,t)}function RI(){oA(EI),oA(MI),oA(_I)}function TI(e){DI(_I.current);var t=DI(EI.current),n=BR(t,e.type);t!==n&&(aA(MI,e),aA(EI,n))}function OI(e){MI.current===e&&(oA(EI),oA(MI))}var PI=iA(0);function NI(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var AI=[];function II(){for(var e=0;e<AI.length;e++)AI[e]._workInProgressVersionPrimary=null;AI.length=0}var LI=nR.ReactCurrentDispatcher,zI=nR.ReactCurrentBatchConfig,FI=0,jI=null,$I=null,HI=null,VI=!1,BI=!1,WI=0,UI=0;function YI(){throw Error($q(321))}function KI(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!$P(e[n],t[n]))return!1;return!0}function GI(e,t,n,r,i,o){if(FI=o,jI=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,LI.current=null===e||null===e.memoizedState?OL:PL,e=n(r,i),BI){o=0;do{if(BI=!1,WI=0,25<=o)throw Error($q(301));o+=1,HI=$I=null,t.updateQueue=null,LI.current=NL,e=n(r,i)}while(BI)}if(LI.current=TL,t=null!==$I&&null!==$I.next,FI=0,HI=$I=jI=null,VI=!1,t)throw Error($q(300));return e}function XI(){var e=0!==WI;return WI=0,e}function JI(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===HI?jI.memoizedState=HI=e:HI=HI.next=e,HI}function ZI(){if(null===$I){var e=jI.alternate;e=null!==e?e.memoizedState:null}else e=$I.next;var t=null===HI?jI.memoizedState:HI.next;if(null!==t)HI=t,$I=e;else{if(null===e)throw Error($q(310));e={memoizedState:($I=e).memoizedState,baseState:$I.baseState,baseQueue:$I.baseQueue,queue:$I.queue,next:null},null===HI?jI.memoizedState=HI=e:HI=HI.next=e}return HI}function QI(e,t){return"function"==typeof t?t(e):t}function eL(e){var t=ZI(),n=t.queue;if(null===n)throw Error($q(311));n.lastRenderedReducer=e;var r=$I,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((FI&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,jI.lanes|=u,mF|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,$P(r,t.memoizedState)||(ZL=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,jI.lanes|=o,mF|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function tL(e){var t=ZI(),n=t.queue;if(null===n)throw Error($q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);$P(o,t.memoizedState)||(ZL=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function nL(){}function rL(e,t){var n=jI,r=ZI(),i=t(),o=!$P(r.memoizedState,i);if(o&&(r.memoizedState=i,ZL=!0),r=r.queue,mL(aL.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==HI&&1&HI.memoizedState.tag){if(n.flags|=2048,uL(9,oL.bind(null,n,r,i,t),void 0,null),null===lF)throw Error($q(349));30&FI||iL(n,t,i)}return i}function iL(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=jI.updateQueue)?(t={lastEffect:null,stores:null},jI.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function oL(e,t,n,r){t.value=n,t.getSnapshot=r,sL(t)&&lL(e)}function aL(e,t,n){return n((function(){sL(t)&&lL(e)}))}function sL(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$P(e,n)}catch(e){return!0}}function lL(e){var t=pI(e,1);null!==t&&AF(t,e,1,-1)}function cL(e){var t=JI();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:QI,lastRenderedState:e},t.queue=e,e=e.dispatch=_L.bind(null,jI,e),[t.memoizedState,e]}function uL(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=jI.updateQueue)?(t={lastEffect:null,stores:null},jI.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function dL(){return ZI().memoizedState}function fL(e,t,n,r){var i=JI();jI.flags|=e,i.memoizedState=uL(1|t,n,void 0,void 0===r?null:r)}function hL(e,t,n,r){var i=ZI();r=void 0===r?null:r;var o=void 0;if(null!==$I){var a=$I.memoizedState;if(o=a.destroy,null!==r&&KI(r,a.deps))return void(i.memoizedState=uL(t,n,o,r))}jI.flags|=e,i.memoizedState=uL(1|t,n,o,r)}function pL(e,t){return fL(8390656,8,e,t)}function mL(e,t){return hL(2048,8,e,t)}function gL(e,t){return hL(4,2,e,t)}function yL(e,t){return hL(4,4,e,t)}function vL(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function bL(e,t,n){return n=null!=n?n.concat([e]):null,hL(4,4,vL.bind(null,t,e),n)}function xL(){}function wL(e,t){var n=ZI();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&KI(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function kL(e,t){var n=ZI();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&KI(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function SL(e,t,n){return 21&FI?($P(n,t)||(n=XT(),jI.lanes|=n,mF|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ZL=!0),e.memoizedState=n)}function CL(e,t){var n=eO;eO=0!==n&&4>n?n:4,e(!0);var r=zI.transition;zI.transition={};try{e(!1),t()}finally{eO=n,zI.transition=r}}function EL(){return ZI().memoizedState}function ML(e,t,n){var r=NF(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DL(e))qL(t,n);else if(null!==(n=hI(e,t,n,r))){AF(n,e,r,PF()),RL(n,t,r)}}function _L(e,t,n){var r=NF(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DL(e))qL(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,$P(s,a)){var l=t.interleaved;return null===l?(i.next=i,fI(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=hI(e,t,i,r))&&(AF(n,e,r,i=PF()),RL(n,t,r))}}function DL(e){var t=e.alternate;return e===jI||null!==t&&t===jI}function qL(e,t){BI=VI=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RL(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,QT(e,n)}}var TL={readContext:uI,useCallback:YI,useContext:YI,useEffect:YI,useImperativeHandle:YI,useInsertionEffect:YI,useLayoutEffect:YI,useMemo:YI,useReducer:YI,useRef:YI,useState:YI,useDebugValue:YI,useDeferredValue:YI,useTransition:YI,useMutableSource:YI,useSyncExternalStore:YI,useId:YI,unstable_isNewReconciler:!1},OL={readContext:uI,useCallback:function(e,t){return JI().memoizedState=[e,void 0===t?null:t],e},useContext:uI,useEffect:pL,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,fL(4194308,4,vL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fL(4194308,4,e,t)},useInsertionEffect:function(e,t){return fL(4,2,e,t)},useMemo:function(e,t){var n=JI();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=JI();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ML.bind(null,jI,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},JI().memoizedState=e},useState:cL,useDebugValue:xL,useDeferredValue:function(e){return JI().memoizedState=e},useTransition:function(){var e=cL(!1),t=e[0];return e=CL.bind(null,e[1]),JI().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=jI,i=JI();if(zA){if(void 0===n)throw Error($q(407));n=n()}else{if(n=t(),null===lF)throw Error($q(349));30&FI||iL(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,pL(aL.bind(null,r,o,e),[e]),r.flags|=2048,uL(9,oL.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=JI(),t=lF.identifierPrefix;if(zA){var n=TA;t=":"+t+"R"+(n=(RA&~(1<<32-$T(RA)-1)).toString(32)+n),0<(n=WI++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=UI++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},PL={readContext:uI,useCallback:wL,useContext:uI,useEffect:mL,useImperativeHandle:bL,useInsertionEffect:gL,useLayoutEffect:yL,useMemo:kL,useReducer:eL,useRef:dL,useState:function(){return eL(QI)},useDebugValue:xL,useDeferredValue:function(e){return SL(ZI(),$I.memoizedState,e)},useTransition:function(){return[eL(QI)[0],ZI().memoizedState]},useMutableSource:nL,useSyncExternalStore:rL,useId:EL,unstable_isNewReconciler:!1},NL={readContext:uI,useCallback:wL,useContext:uI,useEffect:mL,useImperativeHandle:bL,useInsertionEffect:gL,useLayoutEffect:yL,useMemo:kL,useReducer:tL,useRef:dL,useState:function(){return tL(QI)},useDebugValue:xL,useDeferredValue:function(e){var t=ZI();return null===$I?t.memoizedState=e:SL(t,$I.memoizedState,e)},useTransition:function(){return[tL(QI)[0],ZI().memoizedState]},useMutableSource:nL,useSyncExternalStore:rL,useId:EL,unstable_isNewReconciler:!1};function AL(e,t){if(e&&e.defaultProps){for(var n in t=bR({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function IL(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:bR({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var LL={isMounted:function(e){return!!(e=e._reactInternals)&&ST(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=PF(),i=NF(e),o=vI(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=bI(e,o,i))&&(AF(t,e,i,r),xI(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=PF(),i=NF(e),o=vI(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=bI(e,o,i))&&(AF(t,e,i,r),xI(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=PF(),r=NF(e),i=vI(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=bI(e,i,r))&&(AF(t,e,r,n),xI(t,e,r))}};function zL(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!HP(n,r)||!HP(i,o))}function FL(e,t,n){var r=!1,i=sA,o=t.contextType;return"object"==typeof o&&null!==o?o=uI(o):(i=fA(t)?uA:lA.current,o=(r=null!=(r=t.contextTypes))?dA(e,i):sA),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=LL,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function jL(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&LL.enqueueReplaceState(t,t.state,null)}function $L(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},gI(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=uI(o):(o=fA(t)?uA:lA.current,i.context=dA(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(IL(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&LL.enqueueReplaceState(i,i.state,null),kI(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function HL(e,t){try{var n="",r=t;do{n+=SR(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function VL(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function BL(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var WL="function"==typeof WeakMap?WeakMap:Map;function UL(e,t,n){(n=vI(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){SF||(SF=!0,CF=r),BL(0,t)},n}function YL(e,t,n){(n=vI(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){BL(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){BL(0,t),"function"!=typeof r&&(null===EF?EF=new Set([this]):EF.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function KL(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new WL;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ij.bind(null,e,t,n),t.then(e,e))}function GL(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function XL(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=vI(-1,1)).tag=2,bI(n,t,1))),n.lanes|=1),e)}var JL=nR.ReactCurrentOwner,ZL=!1;function QL(e,t,n,r){t.child=null===e?tI(t,null,n,r):eI(t,e.child,n,r)}function ez(e,t,n,r,i){n=n.render;var o=t.ref;return cI(t,i),r=GI(e,t,n,r,o,i),n=XI(),null===e||ZL?(zA&&n&&NA(t),t.flags|=1,QL(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sz(e,t,i))}function tz(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||dj(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=hj(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,nz(e,t,o,r,i))}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:HP)(a,r)&&e.ref===t.ref)return Sz(e,t,i)}return t.flags|=1,(e=fj(o,r)).ref=t.ref,e.return=t,t.child=e}function nz(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(HP(o,r)&&e.ref===t.ref){if(ZL=!1,t.pendingProps=r=o,!(e.lanes&i))return t.lanes=e.lanes,Sz(e,t,i);131072&e.flags&&(ZL=!0)}}return oz(e,t,n,r,i)}function rz(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,aA(fF,dF),dF|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,aA(fF,dF),dF|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},aA(fF,dF),dF|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,aA(fF,dF),dF|=r;return QL(e,t,i,n),t.child}function iz(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function oz(e,t,n,r,i){var o=fA(n)?uA:lA.current;return o=dA(t,o),cI(t,i),n=GI(e,t,n,r,o,i),r=XI(),null===e||ZL?(zA&&r&&NA(t),t.flags|=1,QL(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Sz(e,t,i))}function az(e,t,n,r,i){if(fA(n)){var o=!0;gA(t)}else o=!1;if(cI(t,i),null===t.stateNode)kz(e,t),FL(t,n,r),$L(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=uI(c):c=dA(t,c=fA(n)?uA:lA.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&jL(t,a,r,c),mI=!1;var f=t.memoizedState;a.state=f,kI(t,r,a,i),l=t.memoizedState,s!==r||f!==l||cA.current||mI?("function"==typeof u&&(IL(t,n,u,r),l=t.memoizedState),(s=mI||zL(t,n,s,r,f,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,yI(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:AL(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=uI(l):l=dA(t,l=fA(n)?uA:lA.current);var h=n.getDerivedStateFromProps;(u="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&jL(t,a,r,l),mI=!1,f=t.memoizedState,a.state=f,kI(t,r,a,i);var p=t.memoizedState;s!==d||f!==p||cA.current||mI?("function"==typeof h&&(IL(t,n,h,r),p=t.memoizedState),(c=mI||zL(t,n,c,r,f,p,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return sz(e,t,n,r,o,i)}function sz(e,t,n,r,i,o){iz(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&yA(t,n,!1),Sz(e,t,o);r=t.stateNode,JL.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=eI(t,e.child,null,o),t.child=eI(t,null,s,o)):QL(e,t,s,o),t.memoizedState=r.state,i&&yA(t,n,!0),t.child}function lz(e){var t=e.stateNode;t.pendingContext?pA(0,t.pendingContext,t.pendingContext!==t.context):t.context&&pA(0,t.context,!1),qI(e,t.containerInfo)}function cz(e,t,n,r,i){return YA(),KA(i),t.flags|=256,QL(e,t,n,r),t.child}var uz,dz,fz,hz,pz={dehydrated:null,treeContext:null,retryLane:0};function mz(e){return{baseLanes:e,cachePool:null,transitions:null}}function gz(e,t,n){var r,i=t.pendingProps,o=PI.current,a=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),aA(PI,1&o),null===e)return VA(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},1&i||null===a?a=mj(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=pj(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=mz(n),t.memoizedState=pz,e):yz(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,vz(e,t,a,r=VL(Error($q(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=mj({mode:"visible",children:r.children},i,0,null),(o=pj(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&eI(t,e.child,null,a),t.child.memoizedState=mz(a),t.memoizedState=pz,o);if(!(1&t.mode))return vz(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,vz(e,t,a,r=VL(o=Error($q(419)),r,void 0))}if(s=!!(a&e.childLanes),ZL||s){if(null!==(r=lF)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=i&(r.suspendedLanes|a)?0:i)&&i!==o.retryLane&&(o.retryLane=i,pI(e,i),AF(r,e,i,-1))}return KF(),vz(e,t,a,r=VL(Error($q(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=aj.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,LA=VN(i.nextSibling),IA=t,zA=!0,FA=null,null!==e&&(_A[DA++]=RA,_A[DA++]=TA,_A[DA++]=qA,RA=e.id,TA=e.overflow,qA=t),t=yz(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 1&s||t.child===o?(i=fj(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=fj(r,a):(a=pj(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?mz(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=pz,i}return e=(a=e.child).sibling,i=fj(a,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function yz(e,t){return(t=mj({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function vz(e,t,n,r){return null!==r&&KA(r),eI(t,e.child,null,n),(e=yz(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function bz(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),lI(e.return,t,n)}function xz(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function wz(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(QL(e,t,r.children,n),2&(r=PI.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&bz(e,n,t);else if(19===e.tag)bz(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(aA(PI,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===NI(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xz(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===NI(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xz(t,!0,n,null,o);break;case"together":xz(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function kz(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Sz(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),mF|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error($q(153));if(null!==t.child){for(n=fj(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=fj(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Cz(e,t){if(!zA)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ez(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Mz(e,t,n){var r=t.pendingProps;switch(AA(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ez(t),null;case 1:case 17:return fA(t.type)&&hA(),Ez(t),null;case 3:return r=t.stateNode,RI(),oA(cA),oA(lA),II(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(WA(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==FA&&(FF(FA),FA=null))),dz(e,t),Ez(t),null;case 5:OI(t);var i=DI(_I.current);if(n=t.type,null!==e&&null!=t.stateNode)fz(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error($q(166));return Ez(t),null}if(e=DI(EI.current),WA(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[UN]=t,r[YN]=o,e=!!(1&t.mode),n){case"dialog":bN("cancel",r),bN("close",r);break;case"iframe":case"object":case"embed":bN("load",r);break;case"video":case"audio":for(i=0;i<mN.length;i++)bN(mN[i],r);break;case"source":bN("error",r);break;case"img":case"image":case"link":bN("error",r),bN("load",r);break;case"details":bN("toggle",r);break;case"input":OR(r,o),bN("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},bN("invalid",r);break;case"textarea":jR(r,o),bN("invalid",r)}for(var a in QR(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&ON(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&ON(r.textContent,s,e),i=["children",""+s]):Vq.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&bN("scroll",r)}switch(n){case"input":DR(r),AR(r,o,!0);break;case"textarea":DR(r),HR(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=PN)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=VR(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[UN]=t,e[YN]=r,uz(e,t,!1,!1),t.stateNode=e;e:{switch(a=eT(n,r),n){case"dialog":bN("cancel",e),bN("close",e),i=r;break;case"iframe":case"object":case"embed":bN("load",e),i=r;break;case"video":case"audio":for(i=0;i<mN.length;i++)bN(mN[i],e);i=r;break;case"source":bN("error",e),i=r;break;case"img":case"image":case"link":bN("error",e),bN("load",e),i=r;break;case"details":bN("toggle",e),i=r;break;case"input":OR(e,r),i=TR(e,r),bN("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=bR({},r,{value:void 0}),bN("invalid",e);break;case"textarea":jR(e,r),i=FR(e,r),bN("invalid",e)}for(o in QR(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?JR(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&UR(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&YR(e,l):"number"==typeof l&&YR(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(Vq.hasOwnProperty(o)?null!=l&&"onScroll"===o&&bN("scroll",e):null!=l&&tR(e,o,l,a))}switch(n){case"input":DR(e),AR(e,r,!1);break;case"textarea":DR(e),HR(e);break;case"option":null!=r.value&&e.setAttribute("value",""+MR(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?zR(e,!!r.multiple,o,!1):null!=r.defaultValue&&zR(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=PN)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ez(t),null;case 6:if(e&&null!=t.stateNode)hz(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error($q(166));if(n=DI(_I.current),DI(EI.current),WA(t)){if(r=t.stateNode,n=t.memoizedProps,r[UN]=t,(o=r.nodeValue!==n)&&null!==(e=IA))switch(e.tag){case 3:ON(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ON(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[UN]=t,t.stateNode=r}return Ez(t),null;case 13:if(oA(PI),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(zA&&null!==LA&&1&t.mode&&!(128&t.flags))UA(),YA(),t.flags|=98560,o=!1;else if(o=WA(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error($q(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error($q(317));o[UN]=t}else YA(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ez(t),o=!1}else null!==FA&&(FF(FA),FA=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&PI.current?0===hF&&(hF=3):KF())),null!==t.updateQueue&&(t.flags|=4),Ez(t),null);case 4:return RI(),dz(e,t),null===e&&kN(t.stateNode.containerInfo),Ez(t),null;case 10:return sI(t.type._context),Ez(t),null;case 19:if(oA(PI),null===(o=t.memoizedState))return Ez(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)Cz(o,!1);else{if(0!==hF||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=NI(e))){for(t.flags|=128,Cz(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return aA(PI,1&PI.current|2),t.child}e=e.sibling}null!==o.tail&&OT()>wF&&(t.flags|=128,r=!0,Cz(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=NI(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Cz(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!zA)return Ez(t),null}else 2*OT()-o.renderingStartTime>wF&&1073741824!==n&&(t.flags|=128,r=!0,Cz(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=OT(),t.sibling=null,n=PI.current,aA(PI,r?1&n|2:1&n),t):(Ez(t),null);case 22:case 23:return BF(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&dF)&&(Ez(t),6&t.subtreeFlags&&(t.flags|=8192)):Ez(t),null;case 24:case 25:return null}throw Error($q(156,t.tag))}function _z(e,t){switch(AA(t),t.tag){case 1:return fA(t.type)&&hA(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return RI(),oA(cA),oA(lA),II(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return OI(t),null;case 13:if(oA(PI),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error($q(340));YA()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return oA(PI),null;case 4:return RI(),null;case 10:return sI(t.type._context),null;case 22:case 23:return BF(),null;default:return null}}uz=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},dz=function(){},fz=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,DI(EI.current);var o,a=null;switch(n){case"input":i=TR(e,i),r=TR(e,r),a=[];break;case"select":i=bR({},i,{value:void 0}),r=bR({},r,{value:void 0}),a=[];break;case"textarea":i=FR(e,i),r=FR(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=PN)}for(c in QR(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(Vq.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(Vq.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&bN("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},hz=function(e,t,n,r){n!==r&&(t.flags|=4)};var Dz=!1,qz=!1,Rz="function"==typeof WeakSet?WeakSet:Set,Tz=null;function Oz(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){rj(e,t,n)}else n.current=null}function Pz(e,t,n){try{n()}catch(n){rj(e,t,n)}}var Nz=!1;function Az(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Pz(t,n,o)}i=i.next}while(i!==r)}}function Iz(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Lz(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function zz(e){var t=e.alternate;null!==t&&(e.alternate=null,zz(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[UN],delete t[YN],delete t[GN],delete t[XN],delete t[JN])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fz(e){return 5===e.tag||3===e.tag||4===e.tag}function jz(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Fz(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function $z(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=PN));else if(4!==r&&null!==(e=e.child))for($z(e,t,n),e=e.sibling;null!==e;)$z(e,t,n),e=e.sibling}function Hz(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Hz(e,t,n),e=e.sibling;null!==e;)Hz(e,t,n),e=e.sibling}var Vz=null,Bz=!1;function Wz(e,t,n){for(n=n.child;null!==n;)Uz(e,t,n),n=n.sibling}function Uz(e,t,n){if(jT&&"function"==typeof jT.onCommitFiberUnmount)try{jT.onCommitFiberUnmount(FT,n)}catch(e){}switch(n.tag){case 5:qz||Oz(n,t);case 6:var r=Vz,i=Bz;Vz=null,Wz(e,t,n),Bz=i,null!==(Vz=r)&&(Bz?(e=Vz,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Vz.removeChild(n.stateNode));break;case 18:null!==Vz&&(Bz?(e=Vz,n=n.stateNode,8===e.nodeType?HN(e.parentNode,n):1===e.nodeType&&HN(e,n),SO(e)):HN(Vz,n.stateNode));break;case 4:r=Vz,i=Bz,Vz=n.stateNode.containerInfo,Bz=!0,Wz(e,t,n),Vz=r,Bz=i;break;case 0:case 11:case 14:case 15:if(!qz&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&Pz(n,t,a),i=i.next}while(i!==r)}Wz(e,t,n);break;case 1:if(!qz&&(Oz(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){rj(n,t,e)}Wz(e,t,n);break;case 21:Wz(e,t,n);break;case 22:1&n.mode?(qz=(r=qz)||null!==n.memoizedState,Wz(e,t,n),qz=r):Wz(e,t,n);break;default:Wz(e,t,n)}}function Yz(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Rz),t.forEach((function(t){var r=sj.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Kz(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:Vz=s.stateNode,Bz=!1;break e;case 3:case 4:Vz=s.stateNode.containerInfo,Bz=!0;break e}s=s.return}if(null===Vz)throw Error($q(160));Uz(o,a,i),Vz=null,Bz=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(e){rj(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Gz(t,e),t=t.sibling}function Gz(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kz(t,e),Xz(e),4&r){try{Az(3,e,e.return),Iz(3,e)}catch(t){rj(e,e.return,t)}try{Az(5,e,e.return)}catch(t){rj(e,e.return,t)}}break;case 1:Kz(t,e),Xz(e),512&r&&null!==n&&Oz(n,n.return);break;case 5:if(Kz(t,e),Xz(e),512&r&&null!==n&&Oz(n,n.return),32&e.flags){var i=e.stateNode;try{YR(i,"")}catch(t){rj(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&&PR(i,o),eT(s,a);var c=eT(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?JR(i,d):"dangerouslySetInnerHTML"===u?UR(i,d):"children"===u?YR(i,d):tR(i,u,d,c)}switch(s){case"input":NR(i,o);break;case"textarea":$R(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?zR(i,!!o.multiple,h,!1):f!==!!o.multiple&&(null!=o.defaultValue?zR(i,!!o.multiple,o.defaultValue,!0):zR(i,!!o.multiple,o.multiple?[]:"",!1))}i[YN]=o}catch(t){rj(e,e.return,t)}}break;case 6:if(Kz(t,e),Xz(e),4&r){if(null===e.stateNode)throw Error($q(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){rj(e,e.return,t)}}break;case 3:if(Kz(t,e),Xz(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{SO(t.containerInfo)}catch(t){rj(e,e.return,t)}break;case 4:default:Kz(t,e),Xz(e);break;case 13:Kz(t,e),Xz(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(xF=OT())),4&r&&Yz(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(qz=(c=qz)||u,Kz(t,e),qz=c):Kz(t,e),Xz(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Tz=e,u=e.child;null!==u;){for(d=Tz=u;null!==Tz;){switch(h=(f=Tz).child,f.tag){case 0:case 11:case 14:case 15:Az(4,f,f.return);break;case 1:Oz(f,f.return);var p=f.stateNode;if("function"==typeof p.componentWillUnmount){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(e){rj(r,n,e)}}break;case 5:Oz(f,f.return);break;case 22:if(null!==f.memoizedState){eF(d);continue}}null!==h?(h.return=f,Tz=h):eF(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{i=d.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=XR("display",a))}catch(t){rj(e,e.return,t)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){rj(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Kz(t,e),Xz(e),4&r&&Yz(e);case 21:}}function Xz(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Fz(n)){var r=n;break e}n=n.return}throw Error($q(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(YR(i,""),r.flags&=-33),Hz(e,jz(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;$z(e,jz(e),o);break;default:throw Error($q(161))}}catch(t){rj(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Jz(e,t,n){Tz=e,Zz(e)}function Zz(e,t,n){for(var r=!!(1&e.mode);null!==Tz;){var i=Tz,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Dz;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||qz;s=Dz;var c=qz;if(Dz=a,(qz=l)&&!c)for(Tz=i;null!==Tz;)l=(a=Tz).child,22===a.tag&&null!==a.memoizedState?tF(i):null!==l?(l.return=a,Tz=l):tF(i);for(;null!==o;)Tz=o,Zz(o),o=o.sibling;Tz=i,Dz=s,qz=c}Qz(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,Tz=o):Qz(e)}}function Qz(e){for(;null!==Tz;){var t=Tz;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:qz||Iz(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!qz)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:AL(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&SI(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}SI(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&SO(d)}}}break;default:throw Error($q(163))}qz||512&t.flags&&Lz(t)}catch(e){rj(t,t.return,e)}}if(t===e){Tz=null;break}if(null!==(n=t.sibling)){n.return=t.return,Tz=n;break}Tz=t.return}}function eF(e){for(;null!==Tz;){var t=Tz;if(t===e){Tz=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Tz=n;break}Tz=t.return}}function tF(e){for(;null!==Tz;){var t=Tz;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Iz(4,t)}catch(e){rj(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){rj(t,i,e)}}var o=t.return;try{Lz(t)}catch(e){rj(t,o,e)}break;case 5:var a=t.return;try{Lz(t)}catch(e){rj(t,a,e)}}}catch(e){rj(t,t.return,e)}if(t===e){Tz=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Tz=s;break}Tz=t.return}}var nF,rF=Math.ceil,iF=nR.ReactCurrentDispatcher,oF=nR.ReactCurrentOwner,aF=nR.ReactCurrentBatchConfig,sF=0,lF=null,cF=null,uF=0,dF=0,fF=iA(0),hF=0,pF=null,mF=0,gF=0,yF=0,vF=null,bF=null,xF=0,wF=1/0,kF=null,SF=!1,CF=null,EF=null,MF=!1,_F=null,DF=0,qF=0,RF=null,TF=-1,OF=0;function PF(){return 6&sF?OT():-1!==TF?TF:TF=OT()}function NF(e){return 1&e.mode?2&sF&&0!==uF?uF&-uF:null!==GA.transition?(0===OF&&(OF=XT()),OF):0!==(e=eO)?e:e=void 0===(e=window.event)?16:TO(e.type):1}function AF(e,t,n,r){if(50<qF)throw qF=0,RF=null,Error($q(185));ZT(e,n,r),2&sF&&e===lF||(e===lF&&(!(2&sF)&&(gF|=n),4===hF&&jF(e,uF)),IF(e,r),1===n&&0===sF&&!(1&t.mode)&&(wF=OT()+500,bA&&kA()))}function IF(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-$T(o),s=1<<a,l=i[a];-1===l?s&n&&!(s&r)||(i[a]=KT(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=YT(e,e===lF?uF:0);if(0===r)null!==n&&qT(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&qT(n),1===t)0===e.tag?function(e){bA=!0,wA(e)}($F.bind(null,e)):wA($F.bind(null,e)),jN((function(){!(6&sF)&&kA()})),n=null;else{switch(tO(r)){case 1:n=NT;break;case 4:n=AT;break;case 16:default:n=IT;break;case 536870912:n=zT}n=lj(n,LF.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function LF(e,t){if(TF=-1,OF=0,6&sF)throw Error($q(327));var n=e.callbackNode;if(tj()&&e.callbackNode!==n)return null;var r=YT(e,e===lF?uF:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=GF(e,r);else{t=r;var i=sF;sF|=2;var o=YF();for(lF===e&&uF===t||(kF=null,wF=OT()+500,WF(e,t));;)try{JF();break}catch(t){UF(e,t)}aI(),iF.current=o,sF=i,null!==cF?t=0:(lF=null,uF=0,t=hF)}if(0!==t){if(2===t&&(0!==(i=GT(e))&&(r=i,t=zF(e,i))),1===t)throw n=pF,WF(e,0),jF(e,r),IF(e,OT()),n;if(6===t)jF(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!$P(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=GF(e,r),2===t&&(o=GT(e),0!==o&&(r=o,t=zF(e,o))),1!==t)))throw n=pF,WF(e,0),jF(e,r),IF(e,OT()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error($q(345));case 2:case 5:ej(e,bF,kF);break;case 3:if(jF(e,r),(130023424&r)===r&&10<(t=xF+500-OT())){if(0!==YT(e,0))break;if(((i=e.suspendedLanes)&r)!==r){PF(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=LN(ej.bind(null,e,bF,kF),t);break}ej(e,bF,kF);break;case 4:if(jF(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-$T(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=OT()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rF(r/1960))-r)){e.timeoutHandle=LN(ej.bind(null,e,bF,kF),r);break}ej(e,bF,kF);break;default:throw Error($q(329))}}}return IF(e,OT()),e.callbackNode===n?LF.bind(null,e):null}function zF(e,t){var n=vF;return e.current.memoizedState.isDehydrated&&(WF(e,t).flags|=256),2!==(e=GF(e,t))&&(t=bF,bF=n,null!==t&&FF(t)),e}function FF(e){null===bF?bF=e:bF.push.apply(bF,e)}function jF(e,t){for(t&=~yF,t&=~gF,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$T(t),r=1<<n;e[n]=-1,t&=~r}}function $F(e){if(6&sF)throw Error($q(327));tj();var t=YT(e,0);if(!(1&t))return IF(e,OT()),null;var n=GF(e,t);if(0!==e.tag&&2===n){var r=GT(e);0!==r&&(t=r,n=zF(e,r))}if(1===n)throw n=pF,WF(e,0),jF(e,t),IF(e,OT()),n;if(6===n)throw Error($q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ej(e,bF,kF),IF(e,OT()),null}function HF(e,t){var n=sF;sF|=1;try{return e(t)}finally{0===(sF=n)&&(wF=OT()+500,bA&&kA())}}function VF(e){null!==_F&&0===_F.tag&&!(6&sF)&&tj();var t=sF;sF|=1;var n=aF.transition,r=eO;try{if(aF.transition=null,eO=1,e)return e()}finally{eO=r,aF.transition=n,!(6&(sF=t))&&kA()}}function BF(){dF=fF.current,oA(fF)}function WF(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,zN(n)),null!==cF)for(n=cF.return;null!==n;){var r=n;switch(AA(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&hA();break;case 3:RI(),oA(cA),oA(lA),II();break;case 5:OI(r);break;case 4:RI();break;case 13:case 19:oA(PI);break;case 10:sI(r.type._context);break;case 22:case 23:BF()}n=n.return}if(lF=e,cF=e=fj(e.current,null),uF=dF=t,hF=0,pF=null,yF=gF=mF=0,bF=vF=null,null!==dI){for(t=0;t<dI.length;t++)if(null!==(r=(n=dI[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}dI=null}return e}function UF(e,t){for(;;){var n=cF;try{if(aI(),LI.current=TL,VI){for(var r=jI.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}VI=!1}if(FI=0,HI=$I=jI=null,BI=!1,WI=0,oF.current=null,null===n||null===n.return){hF=1,pF=t,cF=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=uF,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=GL(a);if(null!==h){h.flags&=-257,XL(h,a,s,0,t),1&h.mode&&KL(o,c,t),l=c;var p=(t=h).updateQueue;if(null===p){var m=new Set;m.add(l),t.updateQueue=m}else p.add(l);break e}if(!(1&t)){KL(o,c,t),KF();break e}l=Error($q(426))}else if(zA&&1&s.mode){var g=GL(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),XL(g,a,s,0,t),KA(HL(l,s));break e}}o=l=HL(l,s),4!==hF&&(hF=2),null===vF?vF=[o]:vF.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,wI(o,UL(0,l,t));break e;case 1:s=l;var y=o.type,v=o.stateNode;if(!(128&o.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==EF&&EF.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t,wI(o,YL(o,s,t));break e}}o=o.return}while(null!==o)}QF(n)}catch(e){t=e,cF===n&&null!==n&&(cF=n=n.return);continue}break}}function YF(){var e=iF.current;return iF.current=TL,null===e?TL:e}function KF(){0!==hF&&3!==hF&&2!==hF||(hF=4),null===lF||!(268435455&mF)&&!(268435455&gF)||jF(lF,uF)}function GF(e,t){var n=sF;sF|=2;var r=YF();for(lF===e&&uF===t||(kF=null,WF(e,t));;)try{XF();break}catch(t){UF(e,t)}if(aI(),sF=n,iF.current=r,null!==cF)throw Error($q(261));return lF=null,uF=0,hF}function XF(){for(;null!==cF;)ZF(cF)}function JF(){for(;null!==cF&&!RT();)ZF(cF)}function ZF(e){var t=nF(e.alternate,e,dF);e.memoizedProps=e.pendingProps,null===t?QF(e):cF=t,oF.current=null}function QF(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=_z(n,t)))return n.flags&=32767,void(cF=n);if(null===e)return hF=6,void(cF=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Mz(n,t,dF)))return void(cF=n);if(null!==(t=t.sibling))return void(cF=t);cF=t=e}while(null!==t);0===hF&&(hF=5)}function ej(e,t,n){var r=eO,i=aF.transition;try{aF.transition=null,eO=1,function(e,t,n,r){do{tj()}while(null!==_F);if(6&sF)throw Error($q(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error($q(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-$T(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===lF&&(cF=lF=null,uF=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||MF||(MF=!0,lj(IT,(function(){return tj(),null}))),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=aF.transition,aF.transition=null;var a=eO;eO=1;var s=sF;sF|=4,oF.current=null,function(e,t){if(NN=EO,YP(e=UP())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var h;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(h=d.firstChild);)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++c===i&&(s=a),f===o&&++u===r&&(l=a),null!==(h=d.nextSibling))break;f=(d=f).parentNode}d=h}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(AN={focusedElem:e,selectionRange:n},EO=!1,Tz=t;null!==Tz;)if(e=(t=Tz).child,1028&t.subtreeFlags&&null!==e)e.return=t,Tz=e;else for(;null!==Tz;){t=Tz;try{var p=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var m=p.memoizedProps,g=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:AL(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error($q(163))}}catch(e){rj(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Tz=e;break}Tz=t.return}p=Nz,Nz=!1}(e,n),Gz(n,e),KP(AN),EO=!!NN,AN=NN=null,e.current=n,Jz(n),TT(),sF=s,eO=a,aF.transition=o}else e.current=n;if(MF&&(MF=!1,_F=e,DF=i),o=e.pendingLanes,0===o&&(EF=null),function(e){if(jT&&"function"==typeof jT.onCommitFiberRoot)try{jT.onCommitFiberRoot(FT,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),IF(e,OT()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(SF)throw SF=!1,e=CF,CF=null,e;!!(1&DF)&&0!==e.tag&&tj(),o=e.pendingLanes,1&o?e===RF?qF++:(qF=0,RF=e):qF=0,kA()}(e,t,n,r)}finally{aF.transition=i,eO=r}return null}function tj(){if(null!==_F){var e=tO(DF),t=aF.transition,n=eO;try{if(aF.transition=null,eO=16>e?16:e,null===_F)var r=!1;else{if(e=_F,_F=null,DF=0,6&sF)throw Error($q(331));var i=sF;for(sF|=4,Tz=e.current;null!==Tz;){var o=Tz,a=o.child;if(16&Tz.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Tz=c;null!==Tz;){var u=Tz;switch(u.tag){case 0:case 11:case 15:Az(8,u,o)}var d=u.child;if(null!==d)d.return=u,Tz=d;else for(;null!==Tz;){var f=(u=Tz).sibling,h=u.return;if(zz(u),u===c){Tz=null;break}if(null!==f){f.return=h,Tz=f;break}Tz=h}}}var p=o.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}Tz=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,Tz=a;else e:for(;null!==Tz;){if(2048&(o=Tz).flags)switch(o.tag){case 0:case 11:case 15:Az(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Tz=y;break e}Tz=o.return}}var v=e.current;for(Tz=v;null!==Tz;){var b=(a=Tz).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,Tz=b;else e:for(a=v;null!==Tz;){if(2048&(s=Tz).flags)try{switch(s.tag){case 0:case 11:case 15:Iz(9,s)}}catch(e){rj(s,s.return,e)}if(s===a){Tz=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,Tz=x;break e}Tz=s.return}}if(sF=i,kA(),jT&&"function"==typeof jT.onPostCommitFiberRoot)try{jT.onPostCommitFiberRoot(FT,e)}catch(e){}r=!0}return r}finally{eO=n,aF.transition=t}}return!1}function nj(e,t,n){e=bI(e,t=UL(0,t=HL(n,t),1),1),t=PF(),null!==e&&(ZT(e,1,t),IF(e,t))}function rj(e,t,n){if(3===e.tag)nj(e,e,n);else for(;null!==t;){if(3===t.tag){nj(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===EF||!EF.has(r))){t=bI(t,e=YL(t,e=HL(n,e),1),1),e=PF(),null!==t&&(ZT(t,1,e),IF(t,e));break}}t=t.return}}function ij(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=PF(),e.pingedLanes|=e.suspendedLanes&n,lF===e&&(uF&n)===n&&(4===hF||3===hF&&(130023424&uF)===uF&&500>OT()-xF?WF(e,0):yF|=n),IF(e,t)}function oj(e,t){0===t&&(1&e.mode?(t=WT,!(130023424&(WT<<=1))&&(WT=4194304)):t=1);var n=PF();null!==(e=pI(e,t))&&(ZT(e,t,n),IF(e,n))}function aj(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),oj(e,n)}function sj(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($q(314))}null!==r&&r.delete(t),oj(e,n)}function lj(e,t){return DT(e,t)}function cj(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function uj(e,t,n,r){return new cj(e,t,n,r)}function dj(e){return!(!(e=e.prototype)||!e.isReactComponent)}function fj(e,t){var n=e.alternate;return null===n?((n=uj(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function hj(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)dj(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case oR:return pj(n.children,i,o,t);case aR:a=8,i|=8;break;case sR:return(e=uj(12,n,t,2|i)).elementType=sR,e.lanes=o,e;case dR:return(e=uj(13,n,t,i)).elementType=dR,e.lanes=o,e;case fR:return(e=uj(19,n,t,i)).elementType=fR,e.lanes=o,e;case mR:return mj(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case lR:a=10;break e;case cR:a=9;break e;case uR:a=11;break e;case hR:a=14;break e;case pR:a=16,r=null;break e}throw Error($q(130,null==e?e:typeof e,""))}return(t=uj(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function pj(e,t,n,r){return(e=uj(7,e,r,t)).lanes=n,e}function mj(e,t,n,r){return(e=uj(22,e,r,t)).elementType=mR,e.lanes=n,e.stateNode={isHidden:!1},e}function gj(e,t,n){return(e=uj(6,e,null,t)).lanes=n,e}function yj(e,t,n){return(t=uj(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vj(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=JT(0),this.expirationTimes=JT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=JT(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function bj(e,t,n,r,i,o,a,s,l){return e=new vj(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=uj(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gI(o),e}function xj(e){if(!e)return sA;e:{if(ST(e=e._reactInternals)!==e||1!==e.tag)throw Error($q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(fA(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error($q(171))}if(1===e.tag){var n=e.type;if(fA(n))return mA(e,n,t)}return t}function wj(e,t,n,r,i,o,a,s,l){return(e=bj(n,r,!0,e,0,o,0,s,l)).context=xj(null),n=e.current,(o=vI(r=PF(),i=NF(n))).callback=null!=t?t:null,bI(n,o,i),e.current.lanes=i,ZT(e,i,r),IF(e,r),e}function kj(e,t,n,r){var i=t.current,o=PF(),a=NF(i);return n=xj(n),null===t.context?t.context=n:t.pendingContext=n,(t=vI(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=bI(i,t,a))&&(AF(e,i,a,o),xI(e,i,a)),a}function Sj(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Cj(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ej(e,t){Cj(e,t),(e=e.alternate)&&Cj(e,t)}nF=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||cA.current)ZL=!0;else{if(!(e.lanes&n||128&t.flags))return ZL=!1,function(e,t,n){switch(t.tag){case 3:lz(t),YA();break;case 5:TI(t);break;case 1:fA(t.type)&&gA(t);break;case 4:qI(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;aA(nI,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(aA(PI,1&PI.current),t.flags|=128,null):n&t.child.childLanes?gz(e,t,n):(aA(PI,1&PI.current),null!==(e=Sz(e,t,n))?e.sibling:null);aA(PI,1&PI.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return wz(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),aA(PI,PI.current),r)break;return null;case 22:case 23:return t.lanes=0,rz(e,t,n)}return Sz(e,t,n)}(e,t,n);ZL=!!(131072&e.flags)}else ZL=!1,zA&&1048576&t.flags&&PA(t,MA,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kz(e,t),e=t.pendingProps;var i=dA(t,lA.current);cI(t,n),i=GI(null,t,r,e,i,n);var o=XI();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,fA(r)?(o=!0,gA(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,gI(t),i.updater=LL,t.stateNode=i,i._reactInternals=t,$L(t,r,e,n),t=sz(null,t,r,!0,o,n)):(t.tag=0,zA&&o&&NA(t),QL(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kz(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return dj(e)?1:0;if(null!=e){if((e=e.$$typeof)===uR)return 11;if(e===hR)return 14}return 2}(r),e=AL(r,e),i){case 0:t=oz(null,t,r,e,n);break e;case 1:t=az(null,t,r,e,n);break e;case 11:t=ez(null,t,r,e,n);break e;case 14:t=tz(null,t,r,AL(r.type,e),n);break e}throw Error($q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,oz(e,t,r,i=t.elementType===r?i:AL(r,i),n);case 1:return r=t.type,i=t.pendingProps,az(e,t,r,i=t.elementType===r?i:AL(r,i),n);case 3:e:{if(lz(t),null===e)throw Error($q(387));r=t.pendingProps,i=(o=t.memoizedState).element,yI(e,t),kI(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=cz(e,t,r,n,i=HL(Error($q(423)),t));break e}if(r!==i){t=cz(e,t,r,n,i=HL(Error($q(424)),t));break e}for(LA=VN(t.stateNode.containerInfo.firstChild),IA=t,zA=!0,FA=null,n=tI(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(YA(),r===i){t=Sz(e,t,n);break e}QL(e,t,r,n)}t=t.child}return t;case 5:return TI(t),null===e&&VA(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,IN(r,i)?a=null:null!==o&&IN(r,o)&&(t.flags|=32),iz(e,t),QL(e,t,a,n),t.child;case 6:return null===e&&VA(t),null;case 13:return gz(e,t,n);case 4:return qI(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=eI(t,null,r,n):QL(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ez(e,t,r,i=t.elementType===r?i:AL(r,i),n);case 7:return QL(e,t,t.pendingProps,n),t.child;case 8:case 12:return QL(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,aA(nI,r._currentValue),r._currentValue=a,null!==o)if($P(o.value,a)){if(o.children===i.children&&!cA.current){t=Sz(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=vI(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),lI(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error($q(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),lI(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}QL(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,cI(t,n),r=r(i=uI(i)),t.flags|=1,QL(e,t,r,n),t.child;case 14:return i=AL(r=t.type,t.pendingProps),tz(e,t,r,i=AL(r.type,i),n);case 15:return nz(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:AL(r,i),kz(e,t),t.tag=1,fA(r)?(e=!0,gA(t)):e=!1,cI(t,n),FL(t,r,i),$L(t,r,i,n),sz(null,t,r,!0,e,n);case 19:return wz(e,t,n);case 22:return rz(e,t,n)}throw Error($q(156,t.tag))};var Mj="function"==typeof reportError?reportError:function(e){console.error(e)};function _j(e){this._internalRoot=e}function Dj(e){this._internalRoot=e}function qj(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Rj(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Tj(){}function Oj(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Sj(a);s.call(e)}}kj(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Sj(a);o.call(e)}}var a=wj(t,r,e,0,null,!1,0,"",Tj);return e._reactRootContainer=a,e[KN]=a.current,kN(8===e.nodeType?e.parentNode:e),VF(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Sj(l);s.call(e)}}var l=bj(e,0,!1,null,0,!1,0,"",Tj);return e._reactRootContainer=l,e[KN]=l.current,kN(8===e.nodeType?e.parentNode:e),VF((function(){kj(t,l,n,r)})),l}(n,t,e,i,r);return Sj(a)}Dj.prototype.render=_j.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error($q(409));kj(e,t,null,null)},Dj.prototype.unmount=_j.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;VF((function(){kj(null,e,null,null)})),t[KN]=null}},Dj.prototype.unstable_scheduleHydration=function(e){if(e){var t=oO();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pO.length&&0!==t&&t<pO[n].priority;n++);pO.splice(n,0,e),0===n&&vO(e)}},nO=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=UT(t.pendingLanes);0!==n&&(QT(t,1|n),IF(t,OT()),!(6&sF)&&(wF=OT()+500,kA()))}break;case 13:VF((function(){var t=pI(e,1);if(null!==t){var n=PF();AF(t,e,1,n)}})),Ej(e,1)}},rO=function(e){if(13===e.tag){var t=pI(e,134217728);if(null!==t)AF(t,e,134217728,PF());Ej(e,134217728)}},iO=function(e){if(13===e.tag){var t=NF(e),n=pI(e,t);if(null!==n)AF(n,e,t,PF());Ej(e,t)}},oO=function(){return eO},aO=function(e,t){var n=eO;try{return eO=e,t()}finally{eO=n}},rT=function(e,t,n){switch(t){case"input":if(NR(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=tA(r);if(!i)throw Error($q(90));qR(r),NR(r,i)}}}break;case"textarea":$R(e,n);break;case"select":null!=(t=n.value)&&zR(e,!!n.multiple,t,!1)}},cT=HF,uT=VF;var Pj={usingClientEntryPoint:!1,Events:[QN,eA,tA,sT,lT,HF]},Nj={findFiberByHostInstance:ZN,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Aj={bundleType:Nj.bundleType,version:Nj.version,rendererPackageName:Nj.rendererPackageName,rendererConfig:Nj.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nR.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=MT(e))?null:e.stateNode},findFiberByHostInstance:Nj.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Ij=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ij.isDisabled&&Ij.supportsFiber)try{FT=Ij.inject(Aj),jT=Ij}catch(Wh){}}Aq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pj,Aq.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!qj(t))throw Error($q(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:iR,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},Aq.createRoot=function(e,t){if(!qj(e))throw Error($q(299));var n=!1,r="",i=Mj;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=bj(e,1,!1,null,0,n,0,r,i),e[KN]=t.current,kN(8===e.nodeType?e.parentNode:e),new _j(t)},Aq.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error($q(188));throw e=Object.keys(e).join(","),Error($q(268,e))}return e=null===(e=MT(t))?null:e.stateNode},Aq.flushSync=function(e){return VF(e)},Aq.hydrate=function(e,t,n){if(!Rj(t))throw Error($q(200));return Oj(null,e,t,!0,n)},Aq.hydrateRoot=function(e,t,n){if(!qj(e))throw Error($q(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=Mj;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=wj(t,null,e,1,null!=n?n:null,i,0,o,a),e[KN]=t.current,kN(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Dj(t)},Aq.render=function(e,t,n){if(!Rj(t))throw Error($q(200));return Oj(null,e,t,!1,n)},Aq.unmountComponentAtNode=function(e){if(!Rj(e))throw Error($q(40));return!!e._reactRootContainer&&(VF((function(){Oj(null,null,e,!1,(function(){e._reactRootContainer=null,e[KN]=null}))})),!0)},Aq.unstable_batchedUpdates=HF,Aq.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Rj(n))throw Error($q(200));if(null==e||void 0===e._reactInternals)throw Error($q(38));return Oj(e,t,n,!1,r)},Aq.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),Nq.exports=Aq;var Lj=Nq.exports,zj=r(Lj),Fj=!0,jj=!1,$j=null,Hj={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 Vj(e){e.metaKey||e.altKey||e.ctrlKey||(Fj=!0)}function Bj(){Fj=!1}function Wj(){"hidden"===this.visibilityState&&jj&&(Fj=!0)}function Uj(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return Fj||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!Hj[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function Yj(){jj=!0,window.clearTimeout($j),$j=window.setTimeout((function(){jj=!1}),100)}function Kj(){var e=US.useCallback((function(e){var t,n=Lj.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",Vj,!0),t.addEventListener("mousedown",Bj,!0),t.addEventListener("pointerdown",Bj,!0),t.addEventListener("touchstart",Bj,!0),t.addEventListener("visibilitychange",Wj,!0))}),[]);return{isFocusVisible:Uj,onBlurVisible:Yj,ref:e}}var Gj=!1,Xj=YS.createContext(null),Jj="unmounted",Zj="exited",Qj="entering",e$="entered",t$="exiting",n$=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Zj,r.appearStatus=Qj):i=e$:i=t.unmountOnExit||t.mountOnEnter?Jj:Zj,r.state={status:i},r.nextCallback=null,r}NE(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Jj?{status:Zj}: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!==Qj&&n!==e$&&(t=Qj):n!==Qj&&n!==e$||(t=t$)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.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===Qj){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:zj.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Zj&&this.setState({status:Jj})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[zj.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Gj?this.safeSetState({status:e$},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Qj},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:e$},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:zj.findDOMNode(this);t&&!Gj?(this.props.onExit(r),this.safeSetState({status:t$},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Zj},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Zj},(function(){e.props.onExited(r)}))},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(r){n&&(n=!1,t.nextCallback=null,e(r))},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:zj.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Jj)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 r=QC(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return YS.createElement(Xj.Provider,{value:null},"function"==typeof n?n(e,r):YS.cloneElement(YS.Children.only(n),r))},t}(YS.Component);function r$(){}function i$(e,t){var n=Object.create(null);return e&&US.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&US.isValidElement(e)?t(e):e}(e)})),n}function o$(e,t,n){return null!=n[t]?n[t]:e.props[t]}function a$(e,t,n){var r=i$(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(US.isValidElement(a)){var s=o in t,l=o in r,c=t[o],u=US.isValidElement(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&US.isValidElement(c)&&(i[o]=US.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:o$(a,"exit",e),enter:o$(a,"enter",e)})):i[o]=US.cloneElement(a,{in:!1}):i[o]=US.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:o$(a,"exit",e),enter:o$(a,"enter",e)})}})),i}n$.contextType=Xj,n$.propTypes={},n$.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:r$,onEntering:r$,onEntered:r$,onExit:r$,onExiting:r$,onExited:r$},n$.UNMOUNTED=Jj,n$.EXITED=Zj,n$.ENTERING=Qj,n$.ENTERED=e$,n$.EXITING=t$;var s$=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},l$=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(AE(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}NE(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,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,i$(n.children,(function(e){return US.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:o$(e,"appear",n),enter:o$(e,"enter",n),exit:o$(e,"exit",n)})}))):a$(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=i$(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=$C({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=QC(e,["component","childFactory"]),i=this.state.contextValue,o=s$(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?YS.createElement(Xj.Provider,{value:i},o):YS.createElement(Xj.Provider,{value:i},YS.createElement(t,r,o))},t}(YS.Component);l$.propTypes={},l$.defaultProps={component:"div",childFactory:function(e){return e}};function c$(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var u$=US.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,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,f=eE(e,["classes","className","component","square","elevation","variant"]);return US.createElement(o,$C({className:_q(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(c)],!s&&n.rounded),ref:t},f))})),d$=Sq((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),$C({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"})(u$),f$="undefined"==typeof window?US.useEffect:US.useLayoutEffect;function h$(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,c=void 0===l?function(){}:l,u=e.timeout,d=US.useState(!1),f=d[0],h=d[1],p=_q(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:a,height:a,top:-a/2+o,left:-a/2+i},g=_q(t.child,f&&t.childLeaving,r&&t.childPulsate),y=Oq(c);return f$((function(){if(!s){h(!0);var e=setTimeout(y,u);return function(){clearTimeout(e)}}}),[y,s,u]),US.createElement("span",{className:p,style:m},US.createElement("span",{className:g}))}var p$=US.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=eE(e,["center","classes","className"]),s=US.useState([]),l=s[0],c=s[1],u=US.useRef(0),d=US.useRef(null);US.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var f=US.useRef(!1),h=US.useRef(null),p=US.useRef(null),m=US.useRef(null);US.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var g=US.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;c((function(e){return[].concat(yE(e),[US.createElement(h$,{key:u.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),u.current+=1,d.current=a}),[i]),y=US.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,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&f.current)f.current=!1;else{"touchstart"===e.type&&(f.current=!0);var u,d,y,v=c?null:m.current,b=v?v.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,w=x.clientX,k=x.clientY;u=Math.round(w-b.left),d=Math.round(k-b.top)}if(s)(y=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(y+=1);else{var S=2*Math.max(Math.abs((v?v.clientWidth:0)-u),u)+2,C=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;y=Math.sqrt(Math.pow(S,2)+Math.pow(C,2))}e.touches?null===p.current&&(p.current=function(){g({pulsate:o,rippleX:u,rippleY:d,rippleSize:y,cb:n})},h.current=setTimeout((function(){p.current&&(p.current(),p.current=null)}),80)):g({pulsate:o,rippleX:u,rippleY:d,rippleSize:y,cb:n})}}),[r,g]),v=US.useCallback((function(){y({},{pulsate:!0})}),[y]),b=US.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&p.current)return e.persist(),p.current(),p.current=null,void(h.current=setTimeout((function(){b(e,t)})));p.current=null,c((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return US.useImperativeHandle(t,(function(){return{pulsate:v,start:y,stop:b}}),[v,y,b]),US.createElement("span",$C({className:_q(i.root,o),ref:m},a),US.createElement(l$,{component:null,exit:!0},l))})),m$=Sq((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"})(US.memo(p$)),g$=US.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"button":c,d=e.disabled,f=void 0!==d&&d,h=e.disableRipple,p=void 0!==h&&h,m=e.disableTouchRipple,g=void 0!==m&&m,y=e.focusRipple,v=void 0!==y&&y,b=e.focusVisibleClassName,x=e.onBlur,w=e.onClick,k=e.onFocus,S=e.onFocusVisible,C=e.onKeyDown,E=e.onKeyUp,M=e.onMouseDown,_=e.onMouseLeave,D=e.onMouseUp,q=e.onTouchEnd,R=e.onTouchMove,T=e.onTouchStart,O=e.onDragLeave,P=e.tabIndex,N=void 0===P?0:P,A=e.TouchRippleProps,I=e.type,L=void 0===I?"button":I,z=eE(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"]),F=US.useRef(null);var j=US.useRef(null),$=US.useState(!1),H=$[0],V=$[1];f&&H&&V(!1);var B=Kj(),W=B.isFocusVisible,U=B.onBlurVisible,Y=B.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return Oq((function(r){return t&&t(r),!n&&j.current&&j.current[e](r),!0}))}US.useImperativeHandle(n,(function(){return{focusVisible:function(){V(!0),F.current.focus()}}}),[]),US.useEffect((function(){H&&v&&!p&&j.current.pulsate()}),[p,v,H]);var G=K("start",M),X=K("stop",O),J=K("stop",D),Z=K("stop",(function(e){H&&e.preventDefault(),_&&_(e)})),Q=K("start",T),ee=K("stop",q),te=K("stop",R),ne=K("stop",(function(e){H&&(U(e),V(!1)),x&&x(e)}),!1),re=Oq((function(e){F.current||(F.current=e.currentTarget),W(e)&&(V(!0),S&&S(e)),k&&k(e)})),ie=function(){var e=Lj.findDOMNode(F.current);return u&&"button"!==u&&!("A"===e.tagName&&e.href)},oe=US.useRef(!1),ae=Oq((function(e){v&&!oe.current&&H&&j.current&&" "===e.key&&(oe.current=!0,e.persist(),j.current.stop(e,(function(){j.current.start(e)}))),e.target===e.currentTarget&&ie()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ie()&&"Enter"===e.key&&!f&&(e.preventDefault(),w&&w(e))})),se=Oq((function(e){v&&" "===e.key&&j.current&&H&&!e.defaultPrevented&&(oe.current=!1,e.persist(),j.current.stop(e,(function(){j.current.pulsate(e)}))),E&&E(e),w&&e.target===e.currentTarget&&ie()&&" "===e.key&&!e.defaultPrevented&&w(e)})),le=u;"button"===le&&z.href&&(le="a");var ce={};"button"===le?(ce.type=L,ce.disabled=f):("a"===le&&z.href||(ce.role="button"),ce["aria-disabled"]=f);var ue=Pq(r,t),de=Pq(Y,F),fe=Pq(ue,de),he=US.useState(!1),pe=he[0],me=he[1];US.useEffect((function(){me(!0)}),[]);var ge=pe&&!p&&!f;return US.createElement(le,$C({className:_q(s.root,l,H&&[s.focusVisible,b],f&&s.disabled),onBlur:ne,onClick:w,onFocus:re,onKeyDown:ae,onKeyUp:se,onMouseDown:G,onMouseLeave:Z,onMouseUp:J,onDragLeave:X,onTouchEnd:ee,onTouchMove:te,onTouchStart:Q,ref:fe,tabIndex:f?-1:N},ce,z),a,ge?US.createElement(m$,$C({ref:j,center:o},A)):null)})),y$=Sq({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"})(g$),v$={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},b$=US.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=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,f=void 0!==d&&d,h=e.noWrap,p=void 0!==h&&h,m=e.paragraph,g=void 0!==m&&m,y=e.variant,v=void 0===y?"body1":y,b=e.variantMapping,x=void 0===b?v$:b,w=eE(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),k=l||(g?"p":x[v]||v$[v])||"span";return US.createElement(k,$C({className:_q(i.root,o,"inherit"!==v&&i[v],"initial"!==s&&i["color".concat(Cq(s))],p&&i.noWrap,f&&i.gutterBottom,g&&i.paragraph,"inherit"!==r&&i["align".concat(Cq(r))],"initial"!==u&&i["display".concat(Cq(u))]),ref:t},w))})),x$=Sq((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"})(b$),w$=US.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,c=e.disabled,u=void 0!==c&&c,d=e.disableElevation,f=void 0!==d&&d,h=e.disableFocusRipple,p=void 0!==h&&h,m=e.endIcon,g=e.focusVisibleClassName,y=e.fullWidth,v=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,w=e.startIcon,k=e.type,S=void 0===k?"button":k,C=e.variant,E=void 0===C?"text":C,M=eE(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),_=w&&US.createElement("span",{className:_q(r.startIcon,r["iconSize".concat(Cq(x))])},w),D=m&&US.createElement("span",{className:_q(r.endIcon,r["iconSize".concat(Cq(x))])},m);return US.createElement(y$,$C({className:_q(r.root,r[E],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(E).concat(Cq(a))],"medium"!==x&&[r["".concat(E,"Size").concat(Cq(x))],r["size".concat(Cq(x))]],f&&r.disableElevation,u&&r.disabled,v&&r.fullWidth),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:_q(r.focusVisible,g),ref:t,type:S},M),US.createElement("span",{className:r.label},_,n,D))})),k$=Sq((function(e){return{root:$C({},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:ZC(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:ZC(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:ZC(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(ZC(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:ZC(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(ZC(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:ZC(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"})(w$);var S$="undefined"!=typeof window?US.useLayoutEffect:US.useEffect,C$=US.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=US.useState(null),l=s[0],c=s[1],u=Pq(US.isValidElement(n)?n.ref:null,t);return S$((function(){o||c(function(e){return e="function"==typeof e?e():e,Lj.findDOMNode(e)}(r)||document.body)}),[r,o]),S$((function(){if(l&&!o)return Rq(t,l),function(){Rq(t,null)}}),[t,l,o]),S$((function(){a&&(l||o)&&a()}),[a,l,o]),o?US.isValidElement(n)?US.cloneElement(n,{ref:u}):n:l?Lj.createPortal(n,l):l}));function E$(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function M$(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function _$(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(yE(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&E$(e,r)}))}function D$(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function q$(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Dq(e);return t.body===e?qq(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){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}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(M$(o)+a,"px"),n=Dq(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(M$(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var R$=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 OE(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&&E$(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);_$(t,e.mountNode,e.modalRef,r,!0);var i=D$(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=D$(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=q$(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=D$(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&E$(e.modalRef,!0),_$(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&E$(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function T$(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,c=e.isEnabled,u=e.open,d=US.useRef(),f=US.useRef(null),h=US.useRef(null),p=US.useRef(),m=US.useRef(null),g=US.useCallback((function(e){m.current=Lj.findDOMNode(e)}),[]),y=Pq(t.ref,g),v=US.useRef();return US.useEffect((function(){v.current=u}),[u]),!v.current&&u&&"undefined"!=typeof window&&(p.current=l().activeElement),US.useEffect((function(){if(u){var e=Dq(m.current);r||!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()&&!o&&c()&&!d.current?m.current&&!m.current.contains(e.activeElement)&&m.current.focus():d.current=!1)},n=function(t){!o&&c()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():f.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[r,o,s,c,u]),US.createElement(US.Fragment,null,US.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelStart"}),US.cloneElement(t,{ref:y}),US.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var O$={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"}},P$=US.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=eE(e,["invisible","open"]);return i?US.createElement("div",$C({"aria-hidden":!0,ref:t},o,{style:$C({},O$.root,r?O$.invisible:{},o.style)})):null}));var N$=new R$,A$=US.forwardRef((function(e,t){var n=CD(),r=qE({name:"MuiModal",props:$C({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?P$:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,c=void 0!==l&&l,u=r.container,d=r.disableAutoFocus,f=void 0!==d&&d,h=r.disableBackdropClick,p=void 0!==h&&h,m=r.disableEnforceFocus,g=void 0!==m&&m,y=r.disableEscapeKeyDown,v=void 0!==y&&y,b=r.disablePortal,x=void 0!==b&&b,w=r.disableRestoreFocus,k=void 0!==w&&w,S=r.disableScrollLock,C=void 0!==S&&S,E=r.hideBackdrop,M=void 0!==E&&E,_=r.keepMounted,D=void 0!==_&&_,q=r.manager,R=void 0===q?N$:q,T=r.onBackdropClick,O=r.onClose,P=r.onEscapeKeyDown,N=r.onRendered,A=r.open,I=eE(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),L=US.useState(!0),z=L[0],F=L[1],j=US.useRef({}),$=US.useRef(null),H=US.useRef(null),V=Pq(H,t),B=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return Dq($.current)},U=function(){return j.current.modalRef=H.current,j.current.mountNode=$.current,j.current},Y=function(){R.mount(U(),{disableScrollLock:C}),H.current.scrollTop=0},K=Oq((function(){var e=function(e){return e="function"==typeof e?e():e,Lj.findDOMNode(e)}(u)||W().body;R.add(U(),e),H.current&&Y()})),G=US.useCallback((function(){return R.isTopModal(U())}),[R]),X=Oq((function(e){$.current=e,e&&(N&&N(),A&&G()?Y():E$(H.current,!0))})),J=US.useCallback((function(){R.remove(U())}),[R]);if(US.useEffect((function(){return function(){J()}}),[J]),US.useEffect((function(){A?K():B&&c||J()}),[A,J,B,c,K]),!D&&!A&&(!B||z))return null;var Z=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:CE}),Q={};return void 0===s.props.tabIndex&&(Q.tabIndex=s.props.tabIndex||"-1"),B&&(Q.onEnter=Eq((function(){F(!1)}),s.props.onEnter),Q.onExited=Eq((function(){F(!0),c&&J()}),s.props.onExited)),US.createElement(C$,{ref:X,container:u,disablePortal:x},US.createElement("div",$C({ref:V,onKeyDown:function(e){"Escape"===e.key&&G()&&(P&&P(e),v||(e.stopPropagation(),O&&O(e,"escapeKeyDown")))},role:"presentation"},I,{style:$C({},Z.root,!A&&z?Z.hidden:{},I.style)}),M?null:US.createElement(o,$C({open:A,onClick:function(e){e.target===e.currentTarget&&(T&&T(e),!p&&O&&O(e,"backdropClick"))}},a)),US.createElement(T$,{disableEnforceFocus:g,disableAutoFocus:f,disableRestoreFocus:k,getDoc:W,isEnabled:G,open:A},US.cloneElement(s,Q))))})),I$=US.forwardRef((function(e,t){var n=e.absolute,r=void 0!==n&&n,i=e.classes,o=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,f=e.orientation,h=void 0===f?"horizontal":f,p=e.role,m=void 0===p?"hr"!==s?"separator":void 0:p,g=e.variant,y=void 0===g?"fullWidth":g,v=eE(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return US.createElement(s,$C({className:_q(i.root,o,"fullWidth"!==y&&i[y],r&&i.absolute,c&&i.flexItem,d&&i.light,"vertical"===h&&i.vertical),role:m,ref:t},v))})),L$=Sq((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:ZC(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"})(I$);function z$(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var F$={entering:{opacity:1,transform:z$(1)},entered:{opacity:1,transform:"none"}},j$=US.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,c=e.onExit,u=e.onExited,d=e.onExiting,f=e.style,h=e.timeout,p=void 0===h?"auto":h,m=e.TransitionComponent,g=void 0===m?n$:m,y=eE(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=US.useRef(),b=US.useRef(),x=CD()||wq,w=x.unstable_strictMode&&!i,k=US.useRef(null),S=Pq(n.ref,t),C=Pq(w?k:void 0,S),E=function(e){return function(t,n){if(e){var r=vE(w?[k.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},M=E(l),_=E((function(e,t){!function(e){e.scrollTop}(e);var n,r=c$({style:f,timeout:p},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===p?(n=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=n):n=i,e.style.transition=[x.transitions.create("opacity",{duration:n,delay:o}),x.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),D=E(s),q=E(d),R=E((function(e){var t,n=c$({style:f,timeout:p},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===p?(t=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=t):t=r,e.style.transition=[x.transitions.create("opacity",{duration:t,delay:i}),x.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=z$(.75),c&&c(e)})),T=E(u);return US.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),US.createElement(g,$C({appear:!0,in:o,nodeRef:w?k:void 0,onEnter:_,onEntered:D,onEntering:M,onExit:R,onExited:T,onExiting:q,addEndListener:function(e,t){var n=w?e:t;"auto"===p&&(v.current=setTimeout(n,b.current||0))},timeout:"auto"===p?null:p},y),(function(e,t){return US.cloneElement(n,$C({style:$C({opacity:0,transform:z$(.75),visibility:"exited"!==e||o?void 0:"hidden"},F$[e],f,n.props.style),ref:C},t))}))}));j$.muiSupportAuto=!0;var $$=US.createContext({}),H$=US.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,c=e.disablePadding,u=void 0!==c&&c,d=e.subheader,f=eE(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=US.useMemo((function(){return{dense:l}}),[l]);return US.createElement($$.Provider,{value:h},US.createElement(a,$C({className:_q(r.root,i,l&&r.dense,!u&&r.padding,d&&r.subheader),ref:t},f),d,n))})),V$=Sq({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(H$),B$="undefined"==typeof window?US.useEffect:US.useLayoutEffect,W$=US.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,c=e.classes,u=e.className,d=e.component,f=e.ContainerComponent,h=void 0===f?"li":f,p=e.ContainerProps,m=(p=void 0===p?{}:p).className,g=eE(p,["className"]),y=e.dense,v=void 0!==y&&y,b=e.disabled,x=void 0!==b&&b,w=e.disableGutters,k=void 0!==w&&w,S=e.divider,C=void 0!==S&&S,E=e.focusVisibleClassName,M=e.selected,_=void 0!==M&&M,D=eE(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),q=US.useContext($$),R={dense:v||q.dense||!1,alignItems:r},T=US.useRef(null);B$((function(){o&&T.current&&T.current.focus()}),[o]);var O,P,N=US.Children.toArray(l),A=N.length&&(O=N[N.length-1],P=["ListItemSecondaryAction"],US.isValidElement(O)&&-1!==P.indexOf(O.type.muiName)),I=US.useCallback((function(e){T.current=Lj.findDOMNode(e)}),[]),L=Pq(I,t),z=$C({className:_q(c.root,u,R.dense&&c.dense,!k&&c.gutters,C&&c.divider,x&&c.disabled,s&&c.button,"center"!==r&&c.alignItemsFlexStart,A&&c.secondaryAction,_&&c.selected),disabled:x},D),F=d||"li";return s&&(z.component=d||"div",z.focusVisibleClassName=_q(c.focusVisible,E),F=y$),A?(F=z.component||d?F:"div","li"===h&&("li"===F?F="div":"li"===z.component&&(z.component="div")),US.createElement($$.Provider,{value:R},US.createElement(h,$C({className:_q(c.container,m),ref:L},g),US.createElement(F,z,N),N.pop()))):US.createElement($$.Provider,{value:R},US.createElement(F,$C({ref:L},z),N))})),U$=Sq((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"})(W$),Y$=US.forwardRef((function(e,t){var n=e.classes,r=e.className,i=eE(e,["classes","className"]),o=US.useContext($$);return US.createElement("div",$C({className:_q(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),K$=Sq((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(Y$),G$=US.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,c=e.primary,u=e.primaryTypographyProps,d=e.secondary,f=e.secondaryTypographyProps,h=eE(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=US.useContext($$).dense,m=null!=c?c:n;null==m||m.type===x$||a||(m=US.createElement(x$,$C({variant:p?"body2":"body1",className:r.primary,component:"span",display:"block"},u),m));var g=d;return null==g||g.type===x$||a||(g=US.createElement(x$,$C({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},f),g)),US.createElement("div",$C({className:_q(r.root,i,p&&r.dense,l&&r.inset,m&&g&&r.multiline),ref:t},h),m,g)})),X$=Sq({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(G$);function J$(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Z$(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Q$(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function eH(e){return"function"==typeof e?e():e}var tH=US.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,c=e.children,u=e.classes,d=e.className,f=e.container,h=e.elevation,p=void 0===h?8:h,m=e.getContentAnchorEl,g=e.marginThreshold,y=void 0===g?16:g,v=e.onEnter,b=e.onEntered,x=e.onEntering,w=e.onExit,k=e.onExited,S=e.onExiting,C=e.open,E=e.PaperProps,M=void 0===E?{}:E,_=e.transformOrigin,D=void 0===_?{vertical:"top",horizontal:"left"}:_,q=e.TransitionComponent,R=void 0===q?j$:q,T=e.transitionDuration,O=void 0===T?"auto":T,P=e.TransitionProps,N=void 0===P?{}:P,A=eE(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"]),I=US.useRef(),L=US.useCallback((function(e){if("anchorPosition"===l)return a;var t=eH(r),n=(t&&1===t.nodeType?t:Dq(I.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+J$(n,i),left:n.left+Z$(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),z=US.useCallback((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,m]),F=US.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:J$(e,D.vertical)+t,horizontal:Z$(e,D.horizontal)}}),[D.horizontal,D.vertical]),j=US.useCallback((function(e){var t=z(e),n={width:e.offsetWidth,height:e.offsetHeight},i=F(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Q$(i)};var o=L(t),a=o.top-i.vertical,s=o.left-i.horizontal,c=a+n.height,u=s+n.width,d=qq(eH(r)),f=d.innerHeight-y,h=d.innerWidth-y;if(a<y){var p=a-y;a-=p,i.vertical+=p}else if(c>f){var m=c-f;a-=m,i.vertical+=m}if(s<y){var g=s-y;s-=g,i.horizontal+=g}else if(u>h){var v=u-h;s-=v,i.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Q$(i)}}),[r,l,L,z,F,y]),$=US.useCallback((function(){var e=I.current;if(e){var t=j(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[j]),H=US.useCallback((function(e){I.current=Lj.findDOMNode(e)}),[]);US.useEffect((function(){C&&$()})),US.useImperativeHandle(n,(function(){return C?{updatePosition:function(){$()}}:null}),[C,$]),US.useEffect((function(){if(C){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){$()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[C,$]);var V=O;"auto"!==O||R.muiSupportAuto||(V=void 0);var B=f||(r?Dq(eH(r)).body:void 0);return US.createElement(A$,$C({container:B,open:C,ref:t,BackdropProps:{invisible:!0},className:_q(u.root,d)},A),US.createElement(R,$C({appear:!0,in:C,onEnter:v,onEntered:b,onExit:w,onExited:k,onExiting:S,timeout:V},N,{onEntering:Eq((function(e,t){x&&x(e,t),$()}),N.onEntering)}),US.createElement(d$,$C({elevation:p,ref:H},M,{className:_q(u.paper,M.className)}),c)))})),nH=Sq({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(tH);function rH(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function iH({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:rH(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return YS.createElement("i",{style:i},YS.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},YS.createElement("path",{d:e})))}const oH="alternative-menu-item",aH=e=>{const{nested:t,className:n,...r}=e,i=(({nested:e,dir:t})=>PD((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 YS.createElement(U$,gC({className:`${i.root} ${n}`},r))},sH=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${oH}`);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 lH({title:e,selected:t,onClick:n,nested:r,icon:i,bold:o,dir:a}){const s=Tg.detectTextDirection(e);return YS.createElement(aH,{nested:r,role:"menuitem",button:!0,onClick:n,className:oH,onKeyDown:sH,dir:a,autoFocus:t},YS.createElement(X$,{primary:e,primaryTypographyProps:{dir:s,...o&&{style:{fontWeight:600}}}}),YS.createElement(K$,{style:{minWidth:16}},YS.createElement(iH,{d:t?QS:""})),i&&YS.createElement(K$,{style:{minWidth:16}},YS.createElement(iH,{d:i.d})))}lH.propTypes={title:xC.string.isRequired,selected:xC.bool,onClick:xC.func.isRequired,nested:xC.bool,icon:xC.shape({d:xC.string.isRequired}),bold:xC.bool,dir:xC.string.isRequired},lH.defaultProps={selected:!1,nested:!1,icon:void 0,bold:!1},aH.propTypes={nested:xC.bool,className:xC.string},aH.defaultProps={nested:!1,className:oH};const cH={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 uH({chartId:e,alignTo:t,currentId:n,dir:r,dock:i,list:o,onClose:a,show:s,instruction:l}){const c=o.map(((t,i)=>{var s;return YS.createElement(YS.Fragment,{key:t.id},YS.createElement(lH,{icon:t.icon,title:t.title,bold:t.groupItem,selected:t.selected,onClick:()=>{t.onSelect&&t.onSelect(n),a(`${e}-${t.id}`)},dir:r}),(null===(s=t.children)||void 0===s?void 0:s.length)>0&&YS.createElement(V$,{dense:!0,dir:r,component:"div",disablePadding:!0},t.children.map((e=>YS.createElement(lH,{key:e.id,nested:!0,title:e.title,selected:e.selected,onClick:()=>{e.onSelect(),a(t.id)},dir:r})))),i<o.length-1&&YS.createElement(L$,{key:`divider-${t.id}`}))}));return YS.createElement(nH,gC({anchorEl:t,open:s,onClose:a},cH[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),YS.createElement(V$,{dense:!0,disablePadding:!0,dir:r,"aria-label":l,component:"nav"},c))}uH.propTypes={chartId:xC.string.isRequired,alignTo:xC.any,currentId:xC.string.isRequired,dir:xC.string.isRequired,dock:xC.string.isRequired,list:xC.array,onClose:xC.func.isRequired,show:xC.bool.isRequired,instruction:xC.string.isRequired},uH.defaultProps={list:[],alignTo:null};const dH="title-button",fH="active-title-button",hH=kq((({children:e,...t})=>YS.createElement(k$,gC({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),pH=kq(k$)((()=>({borderRadius:"4px",width:"24px",height:"24px",minWidth:"22px",padding:0})));class mH extends YS.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=YS.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n,showGroupDimOptions:r}=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||r)&&e.getPopoverOptions().then((e=>{this.setState({hasPopoverOptions:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r,showGroupDimOptions:i}=this.props;n&&(r||i)&&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(`.${dH}`);t&&(t.focus(),t.classList.add(fH))}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(`.${dH}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${fH}`);e&&(e.classList.remove(fH),setTimeout((()=>{e.focus()}),50))}}render(){const{chartId:e,titleData:t,popover:n,translator:r,disabled:i,isDimension:o,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},f=t.breadcrumbs.length,h=i||Boolean(!t.drillUp)||this.state.inSelection,p=t.breadcrumbs.map(((e,n)=>YS.createElement(hH,{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(f-n),title:e},YS.createElement("span",{style:d},e),YS.createElement(iH,gC({},tC,{size:"small",style:{margin:"0 8px"}}))))),m=c||u?this.state.hasPopoverOptions:l,g=n&&!this.state.open?this.openPopover:this.closePopover,y=!n||i||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:y&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&y&&"none",...a?{padding:a}:{paddingTop:0,paddingBottom:0},...s&&{minWidth:s}};this.state.open&&(v.background="rgba(0,0,0,0.08)");const b=()=>{this.setState({disableCyclicButton:!0})},x=Tg.detectTextDirection(t.text),w=YS.createElement(hH,{"aria-label":r.get(`Accessibility.${n&&m?"Alternative":"Normal"}.Instructions`,[t.text]),style:v,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:`${dH} ${t.id}`,"data-id":`${e}-${t.id}`},t.locked&&YS.createElement(iH,gC({},ZS,{size:"small",title:r.get("Tooltip.selections.locked")})),YS.createElement("span",{style:d,dir:x},t.text),n&&m&&YS.createElement(iH,gC({},eC,{size:"small",style:{margin:"0 8px"}})));return YS.createElement(YS.Fragment,null,t.icon&&t.icon.onClick&&YS.createElement(pH,{variant:"outlined",disabled:this.state.disableCyclicButton||this.state.inSelection,onClick:i?void 0:()=>t.icon.onClick({onError:b})},YS.createElement(iH,gC({},t.icon.path,{size:"small",title:r.get(t.icon.tooltip)}))),t.icon&&!t.icon.onClick&&YS.createElement(iH,gC({},t.icon.path,{size:"small",title:r.get(t.icon.tooltip),style:{margin:"0 4px 0 0"}})),p,YS.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:m?"auto":"none",height:"100%"}},w),n&&m&&YS.createElement(uH,{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:r.get("Accessibility.Popover.Instructions")}))}}function gH(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function yH(e){function t(e){return!e.isDimension&&Mg.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:r,hyperCube:i,hyperCubeDef:o,isDimension:a,minWidth:s,model:l,onChangeToAlternative:c,padding:u,rtl:d,selections:f,skipAttributeExpressions:h,translator:p,supportConditional:m=!1},layout:{dock:g}}=this.settings,y="top"!==g&&"bottom"!==g||!d?"ltr":"rtl",v=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),b=o&&o.qLayoutExclude&&o.qLayoutExclude.qHyperCubeDef,x=b&&b[a?"qDimensions":"qMeasures"]||[],w=r||i[a?"qDimensionInfo":"qMeasureInfo"],k=a?fC:pC,S=a?hC:mC,C=Boolean(l&&l.colorSupport&&l.modifiers),E=C&&((M=this.settings.settings).isDimension&&Mg.getValue(M,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||t(this.settings.settings));var M;const _=w.map(((t,r)=>{var i;const o="number"==typeof t.explicitColumn?t.explicitColumn:r,y=S(t,o,l,e),v=r===w.length-1,b=Boolean(e)&&a&&"N"!==t.qGrouping,M=C||b?k({column:o,activeInfo:t,altList:x,app:e,dir:d?"rtl":"ltr",dock:gH(g),model:l,onChange:c,skipAttributeExpressions:h,translator:p,allowChangeOfAlternatives:C}):void 0;return YS.createElement(YS.Fragment,{key:t.cId},YS.createElement(mH,{chartId:null!==(i=null==l?void 0:l.id)&&void 0!==i?i:"",showGroupDimOptions:b,popover:M,titleData:y,model:l,translator:p,selections:f,disabled:n(),style:this.style,isDimension:a,padding:u,minWidth:s,hasAlternative:E,supportConditional:m}),!v&&YS.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return YS.createElement("div",{style:v,dir:y},_)}}}mH.propTypes={chartId:xC.string.isRequired,disabled:xC.bool.isRequired,padding:xC.string,minWidth:xC.string,titleData:xC.shape({breadcrumbs:xC.arrayOf(xC.string).isRequired,icon:xC.shape({path:xC.shape({d:xC.string.isRequired}),tooltip:xC.string.isRequired,onClick:xC.func}),index:xC.number.isRequired,locked:xC.bool.isRequired,text:xC.string.isRequired,popoverText:xC.string.isRequired,drillUp:xC.func,id:xC.string.isRequired}).isRequired,popover:xC.shape({dir:xC.string.isRequired,dock:xC.string.isRequired,getPopoverOptions:xC.func.isRequired}),translator:xC.shape({get:xC.func.isRequired}).isRequired,selections:xC.shape({isActive:xC.func,addListener:xC.func,removeListener:xC.func}),style:xC.shape({fontSize:xC.string,color:xC.string,fontFamily:xC.string}).isRequired,isDimension:xC.bool.isRequired,hasAlternative:xC.bool.isRequired,supportConditional:xC.bool.isRequired,showGroupDimOptions:xC.bool.isRequired},mH.defaultProps={popover:null,selections:null,padding:"",minWidth:""};const vH=EE({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 bH=DE({productionPrefix:"q29d5",disableGlobal:!0,seed:""});function xH(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=`${Math.round(i.margin.left+i.x*t)}px`,r.style.top=`${Math.round(i.margin.top+i.y*n)}px`,r.style.width=`${Math.round(i.width)}px`,r.style.height=`${Math.round(i.height)}px`,r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",zj.render(function(e,t){return YS.createElement(qD,{generateClassName:t},YS.createElement(xq,{theme:vH},e))}(e,bH),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&zj.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(zj.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}const wH={black:"#000",white:"#fff"},kH="#e57373",SH="#ef5350",CH="#f44336",EH="#d32f2f",MH="#c62828",_H="#f3e5f5",DH="#ce93d8",qH="#ba68c8",RH="#ab47bc",TH="#9c27b0",OH="#7b1fa2",PH="#e3f2fd",NH="#90caf9",AH="#42a5f5",IH="#1976d2",LH="#1565c0",zH="#4fc3f7",FH="#29b6f6",jH="#03a9f4",$H="#0288d1",HH="#01579b",VH="#81c784",BH="#66bb6a",WH="#4caf50",UH="#388e3c",YH="#2e7d32",KH="#1b5e20",GH="#ffb74d",XH="#ffa726",JH="#ff9800",ZH="#f57c00",QH="#e65100",eV={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function tV(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var nV=Object.freeze({__proto__:null,default:tV}),rV="$$material";var iV=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),oV="-ms-",aV="-moz-",sV="-webkit-",lV="comm",cV="rule",uV="decl",dV="@keyframes",fV=Math.abs,hV=String.fromCharCode,pV=Object.assign;function mV(e){return e.trim()}function gV(e,t,n){return e.replace(t,n)}function yV(e,t){return e.indexOf(t)}function vV(e,t){return 0|e.charCodeAt(t)}function bV(e,t,n){return e.slice(t,n)}function xV(e){return e.length}function wV(e){return e.length}function kV(e,t){return t.push(e),e}var SV=1,CV=1,EV=0,MV=0,_V=0,DV="";function qV(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:SV,column:CV,length:a,return:""}}function RV(e,t){return pV(qV("",null,null,"",null,null,0),e,{length:-e.length},t)}function TV(){return _V=MV>0?vV(DV,--MV):0,CV--,10===_V&&(CV=1,SV--),_V}function OV(){return _V=MV<EV?vV(DV,MV++):0,CV++,10===_V&&(CV=1,SV++),_V}function PV(){return vV(DV,MV)}function NV(){return MV}function AV(e,t){return bV(DV,e,t)}function IV(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function LV(e){return SV=CV=1,EV=xV(DV=e),MV=0,[]}function zV(e){return DV="",e}function FV(e){return mV(AV(MV-1,HV(91===e?e+2:40===e?e+1:e)))}function jV(e){for(;(_V=PV())&&_V<33;)OV();return IV(e)>2||IV(_V)>3?"":" "}function $V(e,t){for(;--t&&OV()&&!(_V<48||_V>102||_V>57&&_V<65||_V>70&&_V<97););return AV(e,NV()+(t<6&&32==PV()&&32==OV()))}function HV(e){for(;OV();)switch(_V){case e:return MV;case 34:case 39:34!==e&&39!==e&&HV(_V);break;case 40:41===e&&HV(e);break;case 92:OV()}return MV}function VV(e,t){for(;OV()&&e+_V!==57&&(e+_V!==84||47!==PV()););return"/*"+AV(t,MV-1)+"*"+hV(47===e?e:OV())}function BV(e){for(;!IV(PV());)OV();return AV(e,MV)}function WV(e){return zV(UV("",null,null,null,[""],e=LV(e),0,[0],e))}function UV(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,y=1,v=0,b="",x=i,w=o,k=r,S=b;g;)switch(p=v,v=OV()){case 40:if(108!=p&&58==vV(S,d-1)){-1!=yV(S+=gV(FV(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:S+=FV(v);break;case 9:case 10:case 13:case 32:S+=jV(p);break;case 92:S+=$V(NV()-1,7);continue;case 47:switch(PV()){case 42:case 47:kV(KV(VV(OV(),NV()),t,n),l);break;default:S+="/"}break;case 123*m:s[c++]=xV(S)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(S=gV(S,/\f/g,"")),h>0&&xV(S)-d&&kV(h>32?GV(S+";",r,n,d-1):GV(gV(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(kV(k=YV(S,t,n,c,u,i,s,b,x=[],w=[],d),o),123===v)if(0===u)UV(S,t,k,k,x,o,d,s,w);else switch(99===f&&110===vV(S,3)?100:f){case 100:case 108:case 109:case 115:UV(e,k,k,r&&kV(YV(e,k,k,0,0,i,s,b,i,x=[],d),w),i,w,d,s,r?x:w);break;default:UV(S,k,k,k,[""],w,0,s,w)}}c=u=h=0,m=y=1,b=S="",d=a;break;case 58:d=1+xV(S),h=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==TV())continue;switch(S+=hV(v),v*m){case 38:y=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(xV(S)-1)*y,y=1;break;case 64:45===PV()&&(S+=FV(OV())),f=PV(),u=d=xV(b=S+=BV(NV())),v++;break;case 45:45===p&&2==xV(S)&&(m=0)}}return o}function YV(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=0===i?o:[""],h=wV(f),p=0,m=0,g=0;p<r;++p)for(var y=0,v=bV(e,d+1,d=fV(m=a[p])),b=e;y<h;++y)(b=mV(m>0?f[y]+" "+v:gV(v,/&\f/g,f[y])))&&(l[g++]=b);return qV(e,t,n,0===i?cV:s,l,c,u)}function KV(e,t,n){return qV(e,t,n,lV,hV(_V),bV(e,2,-2),0)}function GV(e,t,n,r){return qV(e,t,n,uV,bV(e,0,r),bV(e,r+1,-1),r)}function XV(e,t){for(var n="",r=wV(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function JV(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case uV:return e.return=e.return||e.value;case lV:return"";case dV:return e.return=e.value+"{"+XV(e.children,r)+"}";case cV:e.value=e.props.join(",")}return xV(n=XV(e.children,r))?e.return=e.value+"{"+n+"}":""}function ZV(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var QV=function(e,t,n){for(var r=0,i=0;r=i,i=PV(),38===r&&12===i&&(t[n]=1),!IV(i);)OV();return AV(e,MV)},eB=function(e,t){return zV(function(e,t){var n=-1,r=44;do{switch(IV(r)){case 0:38===r&&12===PV()&&(t[n]=1),e[n]+=QV(MV-1,t,n);break;case 2:e[n]+=FV(r);break;case 4:if(44===r){e[++n]=58===PV()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=hV(r)}}while(r=OV());return e}(LV(e),t))},tB=new WeakMap,nB=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||tB.get(n))&&!r){tB.set(e,!0);for(var i=[],o=eB(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},rB=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function iB(e,t){switch(function(e,t){return 45^vV(e,0)?(((t<<2^vV(e,0))<<2^vV(e,1))<<2^vV(e,2))<<2^vV(e,3):0}(e,t)){case 5103:return sV+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return sV+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return sV+e+aV+e+oV+e+e;case 6828:case 4268:return sV+e+oV+e+e;case 6165:return sV+e+oV+"flex-"+e+e;case 5187:return sV+e+gV(e,/(\w+).+(:[^]+)/,sV+"box-$1$2"+oV+"flex-$1$2")+e;case 5443:return sV+e+oV+"flex-item-"+gV(e,/flex-|-self/,"")+e;case 4675:return sV+e+oV+"flex-line-pack"+gV(e,/align-content|flex-|-self/,"")+e;case 5548:return sV+e+oV+gV(e,"shrink","negative")+e;case 5292:return sV+e+oV+gV(e,"basis","preferred-size")+e;case 6060:return sV+"box-"+gV(e,"-grow","")+sV+e+oV+gV(e,"grow","positive")+e;case 4554:return sV+gV(e,/([^-])(transform)/g,"$1"+sV+"$2")+e;case 6187:return gV(gV(gV(e,/(zoom-|grab)/,sV+"$1"),/(image-set)/,sV+"$1"),e,"")+e;case 5495:case 3959:return gV(e,/(image-set\([^]*)/,sV+"$1$`$1");case 4968:return gV(gV(e,/(.+:)(flex-)?(.*)/,sV+"box-pack:$3"+oV+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+sV+e+e;case 4095:case 3583:case 4068:case 2532:return gV(e,/(.+)-inline(.+)/,sV+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xV(e)-1-t>6)switch(vV(e,t+1)){case 109:if(45!==vV(e,t+4))break;case 102:return gV(e,/(.+:)(.+)-([^]+)/,"$1"+sV+"$2-$3$1"+aV+(108==vV(e,t+3)?"$3":"$2-$3"))+e;case 115:return~yV(e,"stretch")?iB(gV(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==vV(e,t+1))break;case 6444:switch(vV(e,xV(e)-3-(~yV(e,"!important")&&10))){case 107:return gV(e,":",":"+sV)+e;case 101:return gV(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+sV+(45===vV(e,14)?"inline-":"")+"box$3$1"+sV+"$2$3$1"+oV+"$2box$3")+e}break;case 5936:switch(vV(e,t+11)){case 114:return sV+e+oV+gV(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return sV+e+oV+gV(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return sV+e+oV+gV(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return sV+e+oV+e+e}return e}var oB=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case uV:e.return=iB(e.value,e.length);break;case dV:return XV([RV(e,{value:gV(e.value,"@","@"+sV)})],r);case cV:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return XV([RV(e,{props:[gV(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return XV([RV(e,{props:[gV(t,/:(plac\w+)/,":"+sV+"input-$1")]}),RV(e,{props:[gV(t,/:(plac\w+)/,":-moz-$1")]}),RV(e,{props:[gV(t,/:(plac\w+)/,oV+"input-$1")]})],r)}return""}))}}],aB=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,o=e.stylisPlugins||oB,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u=[JV,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=wV(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([nB,rB].concat(o,u));i=function(e,t,n,r){l=n,function(e){XV(WV(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new iV({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return f.sheet.hydrate(s),f};function sB(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var lB=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},cB=function(e,t,n){lB(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var uB={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},dB=/[A-Z]|^ms/g,fB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hB=function(e){return 45===e.charCodeAt(1)},pB=function(e){return null!=e&&"boolean"!=typeof e},mB=ZV((function(e){return hB(e)?e:e.replace(dB,"-$&").toLowerCase()})),gB=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(fB,(function(e,t,n){return vB={name:t,styles:n,next:vB},t}))}return 1===uB[e]||hB(e)||"number"!=typeof t||0===t?t:t+"px"};function yB(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return vB={name:i.name,styles:i.styles,next:vB},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)vB={name:a.name,styles:a.styles,next:vB},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=yB(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":pB(s)&&(r+=mB(o)+":"+gB(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=yB(e,t,a);switch(o){case"animation":case"animationName":r+=mB(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var c=0;c<a.length;c++)pB(a[c])&&(r+=mB(o)+":"+gB(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=vB,l=n(e);return vB=s,yB(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var vB,bB=/label:\s*([^\s;{]+)\s*(;|$)/g;function xB(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";vB=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=yB(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=yB(n,t,e[a]),r)i+=o[a]}bB.lastIndex=0;for(var s,l="";null!==(s=bB.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:vB}}var wB,kB,SB=!!KS.useInsertionEffect&&KS.useInsertionEffect,CB=SB||function(e){return e()},EB=SB||US.useLayoutEffect,MB=US.createContext("undefined"!=typeof HTMLElement?aB({key:"css"}):null),_B=MB.Provider,DB=function(e){return US.forwardRef((function(t,n){var r=US.useContext(MB);return e(t,r,n)}))},qB=US.createContext({}),RB={}.hasOwnProperty,TB="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",OB=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return lB(t,n,r),CB((function(){return cB(t,n,r)})),null},PB=DB((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[TB],o=[r],a="";"string"==typeof e.className?a=sB(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=xB(o,void 0,US.useContext(qB));a+=t.key+"-"+s.name;var l={};for(var c in e)RB.call(e,c)&&"css"!==c&&c!==TB&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),US.createElement(US.Fragment,null,US.createElement(OB,{cache:t,serialized:s,isStringTag:"string"==typeof i}),US.createElement(i,l))})),NB=PB,AB=function(e,t){var n=arguments;if(null==t||!RB.call(t,"css"))return US.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=NB,i[1]=function(e,t){var n={};for(var r in t)RB.call(t,r)&&(n[r]=t[r]);return n[TB]=e,n}(e,t);for(var o=2;o<r;o++)i[o]=n[o];return US.createElement.apply(null,i)};wB=AB||(AB={}),kB||(kB=wB.JSX||(wB.JSX={}));var IB=DB((function(e,t){var n=xB([e.styles],void 0,US.useContext(qB)),r=US.useRef();return EB((function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),i.hydrate([a])),r.current=[i,o],function(){i.flush()}}),[t]),EB((function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&cB(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}}),[t,n.name]),null}));function LB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xB(t)}function zB(){var e=LB.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var FB=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jB=ZV((function(e){return FB.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),$B=function(e){return"theme"!==e},HB=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?jB:$B},VB=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},BB=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return lB(t,n,r),CB((function(){return cB(t,n,r)})),null},WB=function e(t,n){var r,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var s=VB(t,n,o),l=s||HB(a),c=!l("as");return function(){var u=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var h=u.length,p=1;p<h;p++)d.push(u[p],f[p])}var m=DB((function(e,t,n){var r=c&&e.as||a,o="",u=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=US.useContext(qB)}"string"==typeof e.className?o=sB(t.registered,u,e.className):null!=e.className&&(o=e.className+" ");var p=xB(d.concat(u),t.registered,f);o+=t.key+"-"+p.name,void 0!==i&&(o+=" "+i);var m=c&&void 0===s?HB(r):l,g={};for(var y in e)c&&"as"===y||m(y)&&(g[y]=e[y]);return g.className=o,n&&(g.ref=n),US.createElement(US.Fragment,null,US.createElement(BB,{cache:t,serialized:p,isStringTag:"string"==typeof r}),US.createElement(r,g))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,r){return e(t,$C({},n,r,{shouldForwardProp:VB(m,r,!0)})).apply(void 0,d)},m}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){WB[e]=WB(e)}));var UB={exports:{}},YB={},KB=US,GB=Symbol.for("react.element"),XB=Symbol.for("react.fragment"),JB=Object.prototype.hasOwnProperty,ZB=KB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,QB={key:!0,ref:!0,__self:!0,__source:!0};function eW(e,t,n){var r,i={},o=null,a=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)JB.call(t,r)&&!QB.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:GB,type:e,key:o,ref:a,props:i,_owner:ZB.current}}YB.Fragment=XB,YB.jsx=eW,YB.jsxs=eW,UB.exports=YB;var tW=UB.exports;let nW;"object"==typeof document&&(nW=aB({key:"css",prepend:!0}));var rW=Object.freeze({__proto__:null,GlobalStyles:function(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return tW.jsx(IB,{styles:r})}
|
|
43
43
|
/**
|
|
44
44
|
* @mui/styled-engine v5.16.14
|
|
45
45
|
*
|
|
@@ -119,4 +119,4 @@ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.le
|
|
|
119
119
|
animation-iteration-count: infinite;
|
|
120
120
|
animation-delay: 200ms;
|
|
121
121
|
}
|
|
122
|
-
`),bG.rippleVisible,MG,550,(({theme:e})=>e.transitions.easing.easeInOut),bG.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),bG.child,bG.childLeaving,_G,550,(({theme:e})=>e.transitions.easing.easeInOut),bG.childPulsate,DG,(({theme:e})=>e.transitions.easing.easeInOut)),TG=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=QC(n,xG),[s,l]=US.useState([]),c=US.useRef(0),u=US.useRef(null);US.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[s]);const d=US.useRef(!1),f=lY(),h=US.useRef(null),p=US.useRef(null),m=US.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l((e=>[...e,tW.jsx(RG,{classes:{ripple:kU(i.ripple,bG.ripple),rippleVisible:kU(i.rippleVisible,bG.rippleVisible),ripplePulsate:kU(i.ripplePulsate,bG.ripplePulsate),child:kU(i.child,bG.child),childLeaving:kU(i.childLeaving,bG.childLeaving),childPulsate:kU(i.childPulsate,bG.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)])),c.current+=1,u.current=a}),[i]),g=US.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:p.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})},f.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,m,f]),y=US.useCallback((()=>{g({},{pulsate:!0})}),[g]),v=US.useCallback(((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void f.start(0,(()=>{v(e,t)}));h.current=null,l((e=>e.length>0?e.slice(1):e)),u.current=t}),[f]);return US.useImperativeHandle(t,(()=>({pulsate:y,start:g,stop:v})),[y,g,v]),tW.jsx(qG,$C({className:kU(bG.root,i.root,o),ref:p},a,{children:tW.jsx(l$,{component:null,exit:!0,children:s})}))}));function OG(e){return CU("MuiButtonBase",e)}const PG=EU("MuiButtonBase",["root","disabled","focusVisible"]),NG=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],AG=eG("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${PG.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),IG=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:f="a",onBlur:h,onClick:p,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:v,onKeyDown:b,onKeyUp:x,onMouseDown:w,onMouseLeave:k,onMouseUp:S,onTouchEnd:C,onTouchMove:E,onTouchStart:M,tabIndex:_=0,TouchRippleProps:D,touchRippleRef:q,type:R}=n,T=QC(n,NG),O=US.useRef(null),P=US.useRef(null),N=iY(P,q),{isFocusVisibleRef:A,onFocus:I,onBlur:L,ref:z}=yY(),[F,j]=US.useState(!1);l&&F&&j(!1),US.useImperativeHandle(r,(()=>({focusVisible:()=>{j(!0),O.current.focus()}})),[]);const[$,H]=US.useState(!1);US.useEffect((()=>{H(!0)}),[]);const V=$&&!c&&!l;function B(e,t,n=u){return rY((r=>{t&&t(r);return!n&&P.current&&P.current[e](r),!0}))}US.useEffect((()=>{F&&d&&!c&&$&&P.current.pulsate()}),[c,d,F,$]);const W=B("start",w),U=B("stop",m),Y=B("stop",g),K=B("stop",S),G=B("stop",(e=>{F&&e.preventDefault(),k&&k(e)})),X=B("start",M),J=B("stop",C),Z=B("stop",E),Q=B("stop",(e=>{L(e),!1===A.current&&j(!1),h&&h(e)}),!1),ee=rY((e=>{O.current||(O.current=e.currentTarget),I(e),!0===A.current&&(j(!0),v&&v(e)),y&&y(e)})),te=()=>{const e=O.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=US.useRef(!1),re=rY((e=>{d&&!ne.current&&F&&P.current&&" "===e.key&&(ne.current=!0,P.current.stop(e,(()=>{P.current.start(e)}))),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),p&&p(e))})),ie=rY((e=>{d&&" "===e.key&&P.current&&F&&!e.defaultPrevented&&(ne.current=!1,P.current.stop(e,(()=>{P.current.pulsate(e)}))),x&&x(e),p&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&p(e)}));let oe=s;"button"===oe&&(T.href||T.to)&&(oe=f);const ae={};"button"===oe?(ae.type=void 0===R?"button":R,ae.disabled=l):(T.href||T.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=iY(t,z,O),le=$C({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:_,focusVisible:F}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=vY({root:["root",t&&"disabled",n&&"focusVisible"]},OG,i);return n&&r&&(o.root+=` ${r}`),o})(le);return tW.jsxs(AG,$C({as:oe,className:kU(ce.root,a),ownerState:le,onBlur:Q,onClick:p,onContextMenu:U,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:W,onMouseLeave:G,onMouseUp:K,onDragLeave:Y,onTouchEnd:J,onTouchMove:Z,onTouchStart:X,ref:se,tabIndex:l?-1:_,type:R},ae,T,{children:[o,V?tW.jsx(TG,$C({ref:N,center:i},D)):null]}))}));function LG(e){return CU("MuiTypography",e)}EU("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const zG=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],FG=eG("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${mW(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>$C({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),jG={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},$G={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},HG=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiTypography"}),r=(e=>$G[e]||e)(n.color),i=yU($C({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=jG}=i,h=QC(i,zG),p=$C({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f}),m=s||(u?"p":f[d]||jG[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return vY({root:["root",o,"inherit"!==e.align&&`align${mW(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},LG,a)})(p);return tW.jsx(FG,$C({as:m,ref:t,ownerState:p,className:kU(g.root,a)},h))})),VG=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function BG(e){const t=[],n=[];return Array.from(e.querySelectorAll(VG)).forEach(((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function WG(){return!0}function UG(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=BG,isEnabled:a=WG,open:s}=e,l=US.useRef(!1),c=US.useRef(null),u=US.useRef(null),d=US.useRef(null),f=US.useRef(null),h=US.useRef(!1),p=US.useRef(null),m=iY(t.ref,p),g=US.useRef(null);US.useEffect((()=>{s&&p.current&&(h.current=!n)}),[n,s]),US.useEffect((()=>{if(!s||!p.current)return;const e=eY(p.current);return p.current.contains(e.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),h.current&&p.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}}),[s]),US.useEffect((()=>{if(!s||!p.current)return;const e=eY(p.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===p.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=p.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=o(p.current)),n.length>0){var i,s;const e=Boolean((null==(i=g.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=g.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,i,a,s,o]);const y=e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0};return tW.jsxs(US.Fragment,{children:[tW.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),US.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),tW.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}const YG=US.forwardRef((function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=US.useState(null),s=iY(US.isValidElement(n)?n.ref:null,t);if(JU((()=>{i||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,i]),JU((()=>{if(o&&!i)return nY(t,o),()=>{nY(t,null)}}),[t,o,i]),i){if(US.isValidElement(n)){const e={ref:s};return US.cloneElement(n,e)}return tW.jsx(US.Fragment,{children:n})}return tW.jsx(US.Fragment,{children:o?Lj.createPortal(n,o):o})}));function KG(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function GG(e){return parseInt(tY(e).getComputedStyle(e).paddingRight,10)||0}function XG(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&KG(e,i)}))}function JG(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function ZG(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=eY(e);return t.body===e?tY(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(eY(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${GG(r)+e}px`;const t=eY(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${GG(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=eY(r).body;else{const t=r.parentElement,n=tY(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const QG=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&KG(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);XG(t,e.mount,e.modalRef,r,!0);const i=JG(this.containers,(e=>e.container===t));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=JG(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=ZG(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=JG(this.containers,(t=>-1!==t.modals.indexOf(e))),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&KG(e.modalRef,t),XG(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&KG(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function eX(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=QG,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,f=US.useRef({}),h=US.useRef(null),p=US.useRef(null),m=iY(p,d),[g,y]=US.useState(!u),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const x=()=>(f.current.modalRef=p.current,f.current.mount=h.current,f.current),w=()=>{i.mount(x(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},k=rY((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||eY(h.current).body;i.add(x(),e),p.current&&w()})),S=US.useCallback((()=>i.isTopModal(x())),[i]),C=rY((e=>{h.current=e,e&&(u&&S()?w():p.current&&KG(p.current,b))})),E=US.useCallback((()=>{i.remove(x(),b)}),[b,i]);US.useEffect((()=>()=>{E()}),[E]),US.useEffect((()=>{u?k():v&&o||E()}),[u,E,v,o,k]);const M=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},_=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const n=mG(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=$C({},n,t);return $C({role:"presentation"},r,{onKeyDown:M(r),ref:m})},getBackdropProps:(e={})=>$C({"aria-hidden":!0},e,{onClick:_(e),open:u}),getTransitionProps:()=>({onEnter:QU((()=>{y(!1),a&&a()}),null==l?void 0:l.props.onEnter),onExited:QU((()=>{y(!0),s&&s(),o&&E()}),null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:C,isTopModal:S,exited:g,hasTransition:v}}const tX=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],nX={entering:{opacity:1},entered:{opacity:1}},rX=US.forwardRef((function(e,t){const n=kK(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:h,onExiting:p,style:m,timeout:g=r,TransitionComponent:y=n$}=e,v=QC(e,tX),b=US.useRef(null),x=iY(b,a.ref,t),w=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},k=w(d),S=w(((e,t)=>{lG(e);const r=cG({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)})),C=w(u),E=w(p),M=w((e=>{const t=cG({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)})),_=w(h);return tW.jsx(y,$C({appear:o,in:l,nodeRef:b,onEnter:S,onEntered:C,onEntering:k,onExit:M,onExited:_,onExiting:E,addEndListener:e=>{i&&i(b.current,e)},timeout:g},v,{children:(e,t)=>US.cloneElement(a,$C({style:$C({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},nX[e],m,a.props.style),ref:x},t))}))}));function iX(e){return CU("MuiBackdrop",e)}EU("MuiBackdrop",["root","invisible"]);const oX=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],aX=eG("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>$C({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),sX=US.forwardRef((function(e,t){var n,r,i;const o=SK({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:f,slotProps:h={},slots:p={},TransitionComponent:m=rX,transitionDuration:g}=o,y=QC(o,oX),v=$C({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e;return vY({root:["root",n&&"invisible"]},iX,t)})(v),x=null!=(n=h.root)?n:u.root;return tW.jsx(m,$C({in:f,timeout:g},y,{children:tW.jsx(aX,$C({"aria-hidden":!0},x,{as:null!=(r=null!=(i=p.root)?i:c.Root)?r:l,className:kU(b.root,s,null==x?void 0:x.className),ownerState:$C({},v,null==x?void 0:x.ownerState),classes:b,ref:t,children:a}))}))}));function lX(e){return CU("MuiButton",e)}const cX=EU("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),uX=US.createContext({}),dX=US.createContext(void 0),fX=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],hX=e=>$C({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),pX=eG(IG,{shouldForwardProp:e=>QK(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${mW(n.color)}`],t[`size${mW(n.size)}`],t[`${n.variant}Size${mW(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const i="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],o="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return $C({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":$C({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:LY(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:LY(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:LY(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":$C({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${cX.focusVisible}`]:$C({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${cX.disabled}`]:$C({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${LY(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${cX.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${cX.disabled}`]:{boxShadow:"none"}})),mX=eG("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${mW(n.size)}`]]}})((({ownerState:e})=>$C({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},hX(e)))),gX=eG("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${mW(n.size)}`]]}})((({ownerState:e})=>$C({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},hX(e)))),yX=US.forwardRef((function(e,t){const n=US.useContext(uX),r=US.useContext(dX),i=SK({props:GU(n,e),name:"MuiButton"}),{children:o,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:h,fullWidth:p=!1,size:m="medium",startIcon:g,type:y,variant:v="text"}=i,b=QC(i,fX),x=$C({},i,{color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:p,size:m,type:y,variant:v}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e;return $C({},a,vY({root:["root",o,`${o}${mW(t)}`,`size${mW(i)}`,`${o}Size${mW(i)}`,`color${mW(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${mW(i)}`],endIcon:["icon","endIcon",`iconSize${mW(i)}`]},lX,a))})(x),k=g&&tW.jsx(mX,{className:w.startIcon,ownerState:x,children:g}),S=f&&tW.jsx(gX,{className:w.endIcon,ownerState:x,children:f}),C=r||"";return tW.jsxs(pX,$C({ownerState:x,className:kU(n.className,w.root,l,C),component:s,disabled:c,focusRipple:!d,focusVisibleClassName:kU(w.focusVisible,h),ref:t,type:y},b,{classes:w,children:[k,o,S]}))}));function vX(e){return CU("MuiModal",e)}EU("MuiModal",["root","hidden","backdrop"]);const bX=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],xX=eG("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>$C({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),wX=eG(sX,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),kX=US.forwardRef((function(e,t){var n,r,i,o,a,s;const l=SK({name:"MuiModal",props:e}),{BackdropComponent:c=wX,BackdropProps:u,className:d,closeAfterTransition:f=!1,children:h,container:p,component:m,components:g={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:k=!1,disableScrollLock:S=!1,hideBackdrop:C=!1,keepMounted:E=!1,onBackdropClick:M,open:_,slotProps:D,slots:q}=l,R=QC(l,bX),T=$C({},l,{closeAfterTransition:f,disableAutoFocus:v,disableEnforceFocus:b,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:k,disableScrollLock:S,hideBackdrop:C,keepMounted:E}),{getRootProps:O,getBackdropProps:P,getTransitionProps:N,portalRef:A,isTopModal:I,exited:L,hasTransition:z}=eX($C({},T,{rootRef:t})),F=$C({},T,{exited:L}),j=(e=>{const{open:t,exited:n,classes:r}=e;return vY({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},vX,r)})(F),$={};if(void 0===h.props.tabIndex&&($.tabIndex="-1"),z){const{onEnter:e,onExited:t}=N();$.onEnter=e,$.onExited=t}const H=null!=(n=null!=(r=null==q?void 0:q.root)?r:g.Root)?n:xX,V=null!=(i=null!=(o=null==q?void 0:q.backdrop)?o:g.Backdrop)?i:c,B=null!=(a=null==D?void 0:D.root)?a:y.root,W=null!=(s=null==D?void 0:D.backdrop)?s:y.backdrop,U=vG({elementType:H,externalSlotProps:B,externalForwardedProps:R,getSlotProps:O,additionalProps:{ref:t,as:m},ownerState:F,className:kU(d,null==B?void 0:B.className,null==j?void 0:j.root,!F.open&&F.exited&&(null==j?void 0:j.hidden))}),Y=vG({elementType:V,externalSlotProps:W,additionalProps:u,getSlotProps:e=>P($C({},e,{onClick:t=>{M&&M(t),null!=e&&e.onClick&&e.onClick(t)}})),className:kU(null==W?void 0:W.className,null==u?void 0:u.className,null==j?void 0:j.backdrop),ownerState:F});return E||_||z&&!L?tW.jsx(YG,{ref:A,container:p,disablePortal:w,children:tW.jsxs(H,$C({},U,{children:[!C&&c?tW.jsx(V,$C({},Y)):null,tW.jsx(UG,{disableEnforceFocus:b,disableAutoFocus:v,disableRestoreFocus:k,isEnabled:I,open:_,children:US.cloneElement(h,$)})]}))}):null}));function SX(e){return CU("MuiDivider",e)}EU("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const CX=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],EX=eG("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>$C({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:LY(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>$C({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>$C({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>$C({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>$C({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),MX=eG("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>$C({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),_X=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:f="fullWidth"}=n,h=QC(n,CX),p=$C({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:f}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e;return vY({root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},SX,r)})(p);return tW.jsx(EX,$C({as:a,className:kU(m.root,o),role:u,ref:t,ownerState:p},h,{children:i?tW.jsx(MX,{className:m.wrapper,ownerState:p,children:i}):null}))}));_X.muiSkipListHighlight=!0;const DX=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function qX(e){return`scale(${e}, ${e**2})`}const RX={entering:{opacity:1,transform:qX(1)},entered:{opacity:1,transform:"none"}},TX="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),OX=US.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:f,style:h,timeout:p="auto",TransitionComponent:m=n$}=e,g=QC(e,DX),y=lY(),v=US.useRef(),b=kK(),x=US.useRef(null),w=iY(x,i.ref,t),k=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=k(c),C=k(((e,t)=>{lG(e);const{duration:n,delay:r,easing:i}=cG({style:h,timeout:p,easing:o},{mode:"enter"});let a;"auto"===p?(a=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=a):a=n,e.style.transition=[b.transitions.create("opacity",{duration:a,delay:r}),b.transitions.create("transform",{duration:TX?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)})),E=k(l),M=k(f),_=k((e=>{const{duration:t,delay:n,easing:r}=cG({style:h,timeout:p,easing:o},{mode:"exit"});let i;"auto"===p?(i=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[b.transitions.create("opacity",{duration:i,delay:n}),b.transitions.create("transform",{duration:TX?i:.666*i,delay:TX?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=qX(.75),u&&u(e)})),D=k(d);return tW.jsx(m,$C({appear:r,in:a,nodeRef:x,onEnter:C,onEntered:E,onEntering:S,onExit:_,onExited:D,onExiting:M,addEndListener:e=>{"auto"===p&&y.start(v.current||0,e),n&&n(x.current,e)},timeout:"auto"===p?null:p},g,{children:(e,t)=>US.cloneElement(i,$C({style:$C({opacity:0,transform:qX(.75),visibility:"exited"!==e||a?void 0:"hidden"},RX[e],h,i.props.style),ref:w},t))}))}));OX.muiSupportAuto=!0;const PX=US.createContext({});function NX(e){return CU("MuiList",e)}EU("MuiList",["root","padding","dense","subheader"]);const AX=["children","className","component","dense","disablePadding","subheader"],IX=eG("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>$C({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),LX=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=QC(n,AX),u=US.useMemo((()=>({dense:a})),[a]),d=$C({},n,{component:o,dense:a,disablePadding:s}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return vY({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},NX,t)})(d);return tW.jsx(PX.Provider,{value:u,children:tW.jsxs(IX,$C({as:o,className:kU(f.root,i),ref:t,ownerState:d},c,{children:[l,r]}))})}));function zX(e){return CU("MuiListItemButton",e)}const FX=EU("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),jX=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],$X=eG(IG,{shouldForwardProp:e=>QK(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>$C({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${FX.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:LY(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${FX.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:LY(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${FX.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:LY(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:LY(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${FX.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${FX.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),HX=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:f}=n,h=QC(n,jX),p=US.useContext(PX),m=US.useMemo((()=>({dense:s||p.dense||!1,alignItems:r,disableGutters:l})),[r,p.dense,s,l]),g=US.useRef(null);JU((()=>{i&&g.current&&g.current.focus()}),[i]);const y=$C({},n,{alignItems:r,dense:m.dense,disableGutters:l,divider:c,selected:d}),v=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e;return $C({},n,vY({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},zX,n))})(y),b=iY(g,t);return tW.jsx(PX.Provider,{value:m,children:tW.jsx($X,$C({ref:b,href:h.href||h.to,component:(h.href||h.to)&&"div"===o?"button":o,focusVisibleClassName:kU(v.focusVisible,u),ownerState:y,className:kU(v.root,f)},h,{classes:v,children:a}))})}));function VX(e){return CU("MuiListItemIcon",e)}EU("MuiListItemIcon",["root","alignItemsFlexStart"]);const BX=["className"],WX=eG("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>$C({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),UX=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=QC(n,BX),o=$C({},n,{alignItems:US.useContext(PX).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return vY({root:["root","flex-start"===t&&"alignItemsFlexStart"]},VX,n)})(o);return tW.jsx(WX,$C({className:kU(a.root,r),ownerState:o,ref:t},i))}));function YX(e){return CU("MuiListItemText",e)}const KX=EU("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),GX=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],XX=eG("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${KX.primary}`]:t.primary},{[`& .${KX.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((({ownerState:e})=>$C({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}))),JX=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:u}=n,d=QC(n,GX),{dense:f}=US.useContext(PX);let h=null!=s?s:r,p=c;const m=$C({},n,{disableTypography:o,inset:a,primary:!!h,secondary:!!p,dense:f}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return vY({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},YX,t)})(m);return null==h||h.type===HG||o||(h=tW.jsx(HG,$C({variant:f?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:h}))),null==p||p.type===HG||o||(p=tW.jsx(HG,$C({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},u,{children:p}))),tW.jsxs(XX,$C({className:kU(g.root,i),ownerState:m,ref:t},d,{children:[h,p]}))}));function ZX(e){return CU("MuiPopover",e)}EU("MuiPopover",["root","paper"]);const QX=["onEntering"],eJ=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],tJ=["slotProps"];function nJ(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function rJ(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function iJ(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function oJ(e){return"function"==typeof e?e():e}const aJ=eG(kX,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sJ=eG(hG,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),lJ=US.forwardRef((function(e,t){var n,r,i;const o=SK({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:d,className:f,container:h,elevation:p=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:v,slotProps:b,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:w=OX,transitionDuration:k="auto",TransitionProps:{onEntering:S}={},disableScrollLock:C=!1}=o,E=QC(o.TransitionProps,QX),M=QC(o,eJ),_=null!=(n=null==b?void 0:b.paper)?n:y,D=US.useRef(),q=iY(D,_.ref),R=$C({},o,{anchorOrigin:l,anchorReference:u,elevation:p,marginThreshold:m,externalPaperSlotProps:_,transformOrigin:x,TransitionComponent:w,transitionDuration:k,TransitionProps:E}),T=(e=>{const{classes:t}=e;return vY({root:["root"],paper:["paper"]},ZX,t)})(R),O=US.useCallback((()=>{if("anchorPosition"===u)return c;const e=oJ(s),t=(e&&1===e.nodeType?e:eY(D.current).body).getBoundingClientRect();return{top:t.top+nJ(t,l.vertical),left:t.left+rJ(t,l.horizontal)}}),[s,l.horizontal,l.vertical,c,u]),P=US.useCallback((e=>({vertical:nJ(e,x.vertical),horizontal:rJ(e,x.horizontal)})),[x.horizontal,x.vertical]),N=US.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===u)return{top:null,left:null,transformOrigin:iJ(n)};const r=O();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=tY(oJ(s)),d=c.innerHeight-m,f=c.innerWidth-m;if(null!==m&&i<m){const e=i-m;i-=e,n.vertical+=e}else if(null!==m&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==m&&o<m){const e=o-m;o-=e,n.horizontal+=e}else if(l>f){const e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:iJ(n)}}),[s,u,O,P,m]),[A,I]=US.useState(g),L=US.useCallback((()=>{const e=D.current;if(!e)return;const t=N(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,I(!0)}),[N]);US.useEffect((()=>(C&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L))),[s,C,L]);US.useEffect((()=>{g&&L()})),US.useImperativeHandle(a,(()=>g?{updatePosition:()=>{L()}}:null),[g,L]),US.useEffect((()=>{if(!g)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}((()=>{L()})),t=tY(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[s,g,L]);let z=k;"auto"!==k||w.muiSupportAuto||(z=void 0);const F=h||(s?eY(oJ(s)).body:void 0),j=null!=(r=null==v?void 0:v.root)?r:aJ,$=null!=(i=null==v?void 0:v.paper)?i:sJ,H=vG({elementType:$,externalSlotProps:$C({},_,{style:A?_.style:$C({},_.style,{opacity:0})}),additionalProps:{elevation:p,ref:q},ownerState:R,className:kU(T.paper,null==_?void 0:_.className)}),V=vG({elementType:j,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:M,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:F,open:g},ownerState:R,className:kU(T.root,f)}),{slotProps:B}=V,W=QC(V,tJ);return tW.jsx(j,$C({},W,!pG(j)&&{slotProps:B,disableScrollLock:C},{children:tW.jsx(w,$C({appear:!0,in:g,onEntering:(e,t)=>{S&&S(e,t),L()},onExited:()=>{I(!1)},timeout:z},E,{children:tW.jsx($,$C({},H,{children:d}))}))}))}));function cJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uJ(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function dJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fJ(){return fJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fJ.apply(null,arguments)}function hJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hJ(Object(n),!0).forEach((function(t){dJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mJ(){mJ=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new q(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",p="completed",m={};function g(){}function y(){}function v(){}var b={};c(b,a,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(R([])));w&&w!==n&&r.call(w,a)&&(b=w);var k=v.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function E(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=M(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?p:"suspendedYield",c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=p,r.method="throw",r.arg=c.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,i(k,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(C.prototype),c(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function gJ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||bJ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yJ(e){return function(e){if(Array.isArray(e))return cJ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||bJ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vJ(e){return vJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vJ(e)}function bJ(e,t){if(e){if("string"==typeof e)return cJ(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cJ(e,t):void 0}}var xJ=function(e){var t=e.className,n=e.title,r=e.path,i=e.fillRule;return YS.createElement(sG,{className:t,viewBox:"0 0 16 16",fontSize:"small",role:"img",style:{height:12,width:12}},YS.createElement("path",{d:r}),n?YS.createElement("title",null,n):void 0,i?YS.createElement("use",{fillRule:i}):void 0)},wJ={STYLE:{ELLIPSIS:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},FOCUS:{boxShadow:"inset 0 0 0 2px #177FE6"},ICONS:{COLOR:{PRIMARY:"rgba(89, 89, 89)",SECONDARY:"rgba(89, 89, 89, 0.8)",DISABLED:"rgba(89, 89, 89, 0.4)"}}}},kJ={L:new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),R:new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),AL:new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]")},SJ=function(e){return kJ.R.test(e)||kJ.AL.test(e)};function CJ(e){for(var t,n,r=e?e.length:0,i=0;i<r;i++){if(n=t=e[i],kJ.L.test(n))return"ltr";if(SJ(t))return"rtl"}return"ltr"}var EJ,MJ,_J=eG(yX,{shouldForwardProp:function(e){return"direction"!==e&&"padding"!==e&&"styling"!==e}})((function(e){var t=e.direction,n=e.padding,r=e.styling,i=r.fontSize,o=r.fontFamily,a=r.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:i,fontFamily:o,color:a,height:"100%",minWidth:"0px",maxWidth:"640px",padding:n,"&:disabled":{color:a,opacity:1},"& .MuiButton-startIcon":{margin:"ltr"===t?"0 2px":void 0},"& .MuiButton-endIcon":{margin:"rtl"===t?"0 2px":void 0}}})),DJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z",fillRule:"evenodd"})}))((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px"}})),qJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})}))((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:wJ.STYLE.ICONS.COLOR.DISABLED,opacity:.6}}})),RJ=function(e){var t=e.isOpen,n=e.onClick,r=e.popoverId,i=e.source,o=i.styling,a=i.info.text,s=i.layout.direction,l=i.meta,c=l.allowed,u=l.hasAlternatives,d=l.hasCyclic,f=l.hasMultiple,h=l.isCyclic,p=l.isLocked,m=i.resources.translator,g=i.services.focus,y=i.settings.isDisabled,v=i.state.inSelections,b=!(!c.change||!u),x=!(!c.reload||!h),w=(b||x)&&!v&&!y(),k={pointerEvents:w?"auto":"none"},S=function(e){var t=e.allowed,n=e.canChange,r=e.canReload,i=e.direction,o=e.hasCyclic,a=e.isLocked,s={top:"8px",right:"6px",bottom:"8px",left:"6px"};if(!e.hasMultiple)return"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left);var l=o&&t.reload;return"ltr"===i&&(a?s.left="0px":r||!n&&l?s.left="4px":n||(s.left="2px"),n||r||(s.right="0px")),"rtl"===i&&(a?s.right="0px":r||!n&&l?s.right="4px":n||(s.right="2px"),n||r||(s.left="0px")),"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left)}({allowed:c,canChange:b,canReload:x,direction:s,hasCyclic:d,hasMultiple:f,isLocked:p}),C=dJ(dJ({},"rtl"===s?"endIcon":"startIcon",p&&YS.createElement(DJ,{height:12})),"rtl"===s?"startIcon":"endIcon",(b||x)&&YS.createElement(qJ,{className:"".concat(v||y()?"disabled":"")})),E=US.useRef(),M=US.useRef();US.useEffect((function(){t||g.get()&&(E.current.focus(),M.current.focusVisible(),g.set(!1))}));var _=CJ(a),D="Accessibility.".concat(w?"Alternative":"Normal",".Instructions");return YS.createElement(_J,fJ({action:M,"aria-describedby":r,"aria-label":m.get(D),color:"inherit",direction:s,disabled:!w||y()||v,onClick:function(e){w&&n(e)},padding:S,ref:E,style:k,styling:o.title,title:a},C),YS.createElement("span",{dir:_,style:wJ.STYLE.ELLIPSIS},a))},TJ=function(e){var t=e.className,n=e.title;return YS.createElement(xJ,{className:t,title:n,path:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"})},OJ=eG(yX,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e&&"styling"!==e}})((function(e){var t=e.direction,n=e.isFirst,r=e.isLast,i=e.styling.color;return{fontWeight:"normal",lineHeight:"normal",color:i,height:"24px",width:"24px",padding:0,marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px","&:disabled":{color:i,opacity:1}}})),PJ=eG(TJ,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})((function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:wJ.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}})),NJ=eG((function(e){var t=e.className,n=e.title;return YS.createElement(xJ,{className:t,title:n,path:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"})}),{})((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY,"&.disabled":{color:wJ.STYLE.ICONS.COLOR.DISABLED}}})),AJ=function(e){var t=e.source;if(!t.meta.isCyclic)return null;var n=gJ(US.useState(!1),2),r=n[0],i=n[1],o=t.styling,a=t.action.stepCycle,s=t.info,l=s.position,c=s.tooltip,u=t.layout.direction,d=t.meta,f=d.allowed,h=d.isFirst,p=d.isLast,m=t.settings.isDisabled,g=t.state.inSelections;return US.useEffect((function(){r&&i(!1)}),[l]),f.reload?YS.createElement(OJ,{direction:u,disabled:r||g||m(),isFirst:h,isLast:p,onClick:function(){return i(!0),void a()},styling:o.title,title:c,variant:"outlined"},YS.createElement(NJ,{className:"".concat(r||g||m()?"disabled":"")})):YS.createElement(PJ,{direction:u,isFirst:h,isLast:p,style:{flexShrink:0},title:c})},IJ=function(e){var t=e.className,n=e.title;return YS.createElement(xJ,{className:t,title:n,path:"M7 4h9v1H7V4ZM9 8h7v1H9V8ZM11 12h5v1h-5v-1ZM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4h1Z"})},LJ=eG(yX,{shouldForwardProp:function(e){return"styling"!==e}})((function(e){var t=e.styling,n=t.fontSize,r=t.fontFamily,i=t.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:n,fontFamily:r,color:i,padding:"0px 5px",height:"100%",minWidth:"45px","&:disabled":{color:i}}})),zJ={color:wJ.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:wJ.STYLE.ICONS.COLOR.DISABLED}},FJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})}))((function(){return zJ})),jJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}))((function(){return zJ})),$J=eG(IJ,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})((function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:wJ.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}})),HJ=function(e){var t=e.source;if(!t.meta.isDrillDown)return null;var n=t.styling,r=t.action.drillUp,i=t.info,o=i.breadcrumbs,a=i.tooltip,s=t.layout.direction,l=t.meta,c=l.isFirst,u=l.isLast,d=t.settings.isDisabled,f=t.state.inSelections,h=d()||f?"disabled":null,p=dJ({},"rtl"===s?"startIcon":"endIcon","rtl"===s?YS.createElement(jJ,{className:h}):YS.createElement(FJ,{className:h})),m=o.map((function(e,t){var i=CJ(e);return YS.createElement(LJ,fJ({disabled:d()||f,key:"breadcrumb-".concat(e),onClick:function(){return function(e){r({steps:o.length-e})}(t)},styling:n.title,title:e},p),YS.createElement("span",{dir:i,style:wJ.STYLE.ELLIPSIS},e))}));return YS.createElement(YS.Fragment,null,"rtl"===s?m.reverse():void 0,YS.createElement($J,{direction:s,isFirst:c,isLast:u,style:{flexShrink:0},title:a}),"rtl"===s?void 0:m)},VJ=eG(HX,{shouldForwardProp:function(e){return"nested"!==e&&"rtl"!==e}})((function(e){var t=e.nested,n=e.rtl;return{padding:"4px ".concat(t&&n?"32px":"16px"," 4px ").concat(t&&!n?"32px":"16px"),"&:focus":pJ({},wJ.STYLE.FOCUS)}})),BJ=eG(UX)((function(){return{marginRight:0,justifyContent:"center"}})),WJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"})}))((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY}})),UJ=eG(TJ)((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY}})),YJ=eG(IJ)((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY,fontWeight:600}})),KJ=function(e){var t=e.id,n=e.meta,r=e.nested,i=e.onClick,o=e.selected,a=e.source,s=e.text,l=a.styling,c=a.settings.isRTL,u=pJ({fontWeight:!n||n.isNormal?"normal":600,lineHeight:"normal",fontSize:l.popover.fontSize,fontFamily:l.popover.fontFamily,color:l.popover.color,textAlign:c?"end":"start"},wJ.STYLE.ELLIPSIS),d=CJ(s),f=YS.createElement(BJ,{sx:c?{paddingRight:"12px"}:{paddingLeft:"12px"}},function(e){var t=e.meta;return e.selected?YS.createElement(WJ,{height:12}):null!=t&&t.isCyclic?YS.createElement(UJ,{height:12}):null!=t&&t.isDrillDown?YS.createElement(YJ,{height:12}):void 0}({meta:n,selected:o}));return YS.createElement(YS.Fragment,{key:t},YS.createElement(VJ,{autoFocus:o,nested:r,onClick:function(e){return null==i?void 0:i(e)},rtl:c,title:s},c&&f,YS.createElement(JX,{dir:d,primaryTypographyProps:{style:u}},s),!c&&f))},GJ=eG(_X)((function(){return{marginTop:"-1px"}})),XJ=function(e){var t=e.anchor,n=e.id,r=e.onClose,i=e.open,o=e.source,a=o.action,s=a.changeTo,l=a.drillUp,c=a.setActiveField,u=o.info,d=u.breadcrumbs,f=u.group,h=u.id,p=u.text,m=o.data.alternatives,g=o.meta,y=g.isCyclic,v=g.isDrillDown,b=o.resources.translator,x=o.services.focus,w=y||v,k=YS.createElement(KJ,{id:h,key:h,meta:o.meta,onClick:r,selected:!w,source:o,text:w?f.name:p}),S=w&&f.items.map((function(e){return YS.createElement(KJ,{id:e.id,nested:!0,onClick:function(t){return function(e,t){y&&c({fieldIndex:t.index}),v&&l({steps:d.length-t.index}),r()}(0,e)},selected:e.current,source:o,text:e.text})})),C=m.map((function(e,t){return YS.createElement(YS.Fragment,{key:e.id},YS.createElement(KJ,{id:e.id,key:e.id,meta:e.meta,onClick:function(t){return n=t,r=e.id,"keydown"===n.type&&x.set(!0),void s({id:r});var n,r},source:o,text:e.text}),t<m.length-1&&YS.createElement(GJ,{key:"divider-".concat(e.id)}))}));return YS.createElement(lJ,{anchorEl:t,anchorOrigin:{vertical:"top",horizontal:"center"},id:n,onClose:r,open:i,slotProps:{paper:{style:{minWidth:"250px",maxWidth:"640px",maxHeight:"300px"}}},transformOrigin:{vertical:"bottom",horizontal:"center"}},YS.createElement(LX,{"aria-label":b.get("Accessibility.Popover.Instructions"),dense:!0},k,S,YS.createElement(GJ,{key:"divider-".concat(h)}),C))},JJ=function(e){var t=e.source,n=gJ(US.useState(null),2),r=n[0],i=n[1],o={id:r?"alternatives-popover":void 0,isOpen:Boolean(r)},a=t.layout.direction,s=t.services.focus,l=YS.createElement(AJ,{source:t}),c=YS.createElement(HJ,{source:t});return YS.createElement(YS.Fragment,null,"rtl"===a?void 0:c,"rtl"===a?void 0:l,YS.createElement(RJ,{onClick:function(e){var t=e.currentTarget;t.classList.contains("qcm-focus-visible")&&s.set(!0),i(t)},isOpen:o.isOpen,popoverId:o.id,source:t}),YS.createElement(XJ,{anchor:r,id:o.id,onClose:function(){i(null)},open:o.isOpen,source:t}),"rtl"===a?c:void 0,"rtl"===a?l:void 0)};var ZJ=function(){if(MJ)return EJ;MJ=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return EJ=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},EJ}(),QJ=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(ZJ);function eZ(e){var t=e.model,n=e.properties;return t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()}function tZ(e){return Array.isArray(e)}function nZ(e){return null!=e&&!Array.isArray(e)&&"object"===vJ(e)}function rZ(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function iZ(e){return void 0===e}function oZ(e,t){if(nZ(e)&&nZ(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=Object.keys(e),r=0,i=n.length;r<i;r+=1)if(!oZ(e[n[r]],t[n[r]]))return!1;return!0}if(tZ(e)&&tZ(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o+=1)if(!oZ(e[o],t[o]))return!1;return!0}return e===t}function aZ(e){var t=e.oldData,n=void 0===t?{}:t,r=e.newData,i=void 0===r?{}:r,o=e.basePath,a=void 0===o?"":o,s=[];return Object.keys(i).forEach((function(e){var t=function(e){return e?QJ(!0,{},{value:e}).value:e}(i[e]),r=n[e],o="".concat(a,"/").concat(e);oZ(t,r)||rZ(i,e)||(iZ(r)?s.push({op:"add",path:o,value:t}):nZ(t)&&nZ(r)?s.push.apply(s,yJ(aZ({oldData:r,newData:t,basePath:o}))):tZ(t)&&tZ(r)?s.push.apply(s,yJ(function(e){var t=e.newArray,n=e.basePath,r=[];return oZ(t,e.oldArray.slice())||(!iZ(t[0])&&iZ(t[0].qInfo)||0===t.length)&&r.push({op:"replace",path:n,value:t}),r}({oldArray:r,newArray:t,basePath:o}))):s.push({op:"replace",path:o,value:t}))})),Object.keys(n).forEach((function(e){iZ(i[e])&&!rZ(n,e)&&s.push({op:"remove",path:"".concat(a,"/").concat(e)})})),s}function sZ(e){var t=e.model,n=aZ({oldData:e.oldProperties,newData:e.newProperties});null!=t&&t.applyPatches&&null!=n&&n.length&&t.applyPatches(n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),!0)}function lZ(e){return cZ.apply(this,arguments)}function cZ(){return(cZ=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){uJ(o,r,i,a,s,"next",e)}function s(e){uJ(o,r,i,a,s,"throw",e)}a(void 0)}))}}(mJ().mark((function e(t){var n,r,i,o,a,s,l,c,u,d,f,h;return mJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.from,r=t.to,i=t.model,o=t.container,a=t.skipAttributeExpressions,s=t.onChange,e.next=3,i.getEffectiveProperties();case 3:return l=e.sent,c=l.qHyperCubeDef[o].findIndex((function(e){return e.qDef.cId===n})),u=l.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o].findIndex((function(e){return e.qDef.cId===r})),d=QJ(!0,{},l),f=d.qHyperCubeDef[o][c],(h=d.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][u]).qAttributeDimensions=f.qAttributeDimensions,f.qAttributeDimensions=[],a||(h.qAttributeExpressions=f.qAttributeExpressions,f.qAttributeExpressions=[]),d.qHyperCubeDef[o][c]=h,d.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][u]=f,s({fromItem:f,toItem:h,oldProperties:l,newProperties:d,model:i}),e.next=17,eZ({model:i,properties:d});case 17:i.colorSupport&&i.colorSupport.colorByUpdater(d,"qHyperCubeDef."),sZ({model:i,oldProperties:l,newProperties:d});case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function uZ(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=r.app,l=r.model,c=r.translator,u=i.skipAttributeExpressions;return a.map((function(e,t){var n=e.cId,r=e.qGrouping,i=e.qGroupFallbackTitles,a=e.qGroupPos,d=e.qFallbackTitle,f=e.qLocked,h=e.title,p="C"===r,m="H"===r,g="N"===r,y="number"==typeof e.explicitColumn?e.explicitColumn:t,v=function(t,n){p&&s&&s.getDimension&&s.getDimension(e.qLibraryId).then((function(e){null==e||e[t](n)})).catch((function(){}))};return{meta:{isCyclic:p,isDrillDown:m,isLocked:!!f,isNormal:g},info:{id:n,text:g?d:i[a],position:a,breadcrumbs:i.slice(0,e.qGroupPos),group:{name:h,items:i.slice(0,m?e.qGroupPos+1:i.length).map((function(e,t){return{id:"".concat(n,"-item-").concat(t),text:e,current:a===t,index:t}}))},tooltip:g?void 0:c.get(p?"Tooltip.dimensions.cyclic":"Tooltip.dimensions.drilldown")},action:{changeTo:function(e){var t=e.id;return lZ({from:n,to:t,container:"qDimensions",model:l,skipAttributeExpressions:u,onChange:o})},drillUp:function(e){var t=e.steps;m&&l&&(null==l||l.drillUp("/qHyperCubeDef",y,t))},stepCycle:function(){return v("stepCycle",1)},setActiveField:function(e){var t=e.fieldIndex;return v("setActiveField",t)}}}}))}function dZ(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=r.model,l=i.skipAttributeExpressions;return a.map((function(e){var t=e.cId,n=e.qFallbackTitle;return{meta:{isNormal:!0},info:{id:t,text:n},action:{changeTo:function(e){var n=e.id;return lZ({from:t,to:n,container:"qMeasures",model:s,skipAttributeExpressions:l,onChange:o})}}}}))}function fZ(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.rect,a=e.resources,s=e.settings,l=e.state,c=e.styling,u=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"!==t&&"right"!==t||(r.width="".concat(n.height,"px"),r.height="".concat(n.width,"px"),r.transformOrigin="top left"),"left"===t&&(r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)")),"right"===t&&(r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)")),r}({dock:r,rect:o}),d=function(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.resources,a=e.settings,s=e.state,l=e.styling,c=n.alternatives,u=n.infos,d=o.app,f=o.cache,h=o.model,p=a.forceAllowChange,m=a.isRTL,g=a.isSnapshot,y=a.type,v=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:r,isRTL:m}),b=function(e){var t=e.cache,n="axis-title-auto-focus_"+e.key;return{get:function(){var e;return(null==t||null===(e=t.get)||void 0===e?void 0:e.call(t,n))||!1},set:function(e){var r;return null==t||null===(r=t.set)||void 0===r?void 0:r.call(t,n,e)}}}({cache:f,key:i}),x=("dimension"===y?uZ:dZ)({callbacks:t,data:n,resources:o,settings:a});"rtl"===v&&x.reverse();var w={allowed:{change:(!(!h.modifiers||!h.colorSupport)||p)&&!g,reload:!!d&&!g},hasAlternatives:!!c.length,hasCyclic:x.some((function(e){return e.meta.isCyclic})),hasMultiple:u.length>1};return x.map((function(e,t){return pJ(pJ({data:n,layout:{direction:v},resources:{translator:o.translator},services:{focus:b},settings:a,state:s,styling:l},e),{},{meta:pJ(pJ(pJ({},w),e.meta),{},{isFirst:0===t,isLast:t===x.length-1})})}))}({callbacks:t,data:n,dock:r,key:i,resources:a,settings:s,state:l,styling:c});return YS.createElement("div",{style:u},d.map((function(e){return YS.createElement(YS.Fragment,{key:e.info.id},YS.createElement(JJ,{source:e}),!e.meta.isLast&&YS.createElement("span",{dir:e.layout.direction,style:pJ(pJ({},c.title),{},{lineHeight:"normal"})},", "))})))}var hZ,pZ='"Source Sans Pro", "Arial", "sans-serif"',mZ="12px",gZ=function(e){var t=e.rect,n=e.state,r=e.settings,i=r.callbacks,o=r.data,a=r.key,s=r.layout,l=r.resources,c=r.settings,u=r.style;return fZ({callbacks:i,data:o,dock:s.dock,key:a,rect:t,resources:l,settings:c,state:n,styling:u})},yZ={renderer:"react",require:["renderer"],disableTriggers:!0,key:"axis-title",defaultSettings:{callbacks:{onChange:function(){}},data:{alternatives:[],infos:[]},resources:{app:void 0,cache:void 0,model:void 0,selections:void 0,translator:void 0},settings:{forceAllowChange:!1,isDisabled:function(){return!1},isRTL:!1,isSnapshot:!1,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:"#333",fontFamily:pZ,fontSize:mZ},popover:{color:"#595959CC",fontFamily:pZ,fontSize:mZ}}},preferredSize:function(){var e=this.settings,t=e.data,n=e.settings,r=e.style,i=t.alternatives,o=n.type,a=r.title,s=a.fontSize,l=a.fontFamily,c=i.length||"measure"!==o?28:20,u=this.registries.renderer("svg")().measureText({text:"M",fontSize:s,fontFamily:l}).height;return Math.max(c,u)},created:function(){var e=this;this.state={inSelections:!1},this.listeners={onSelectionsActivated:function(){e.state.inSelections=!0,e.renderer.render(gZ(e))},onSelectionsDeactivated:function(){e.state.inSelections=!1}}},beforeMount:function(){var e=this.settings.resources.selections;e&&(e.addListener("activated",this.listeners.onSelectionsActivated),e.addListener("deactivated",this.listeners.onSelectionsDeactivated),e.addListener("canceled",this.listeners.onSelectionsDeactivated))},render:function(){return gZ(this)},beforeUnmount:function(){var e=this.settings.resources.selections;e&&(e.removeListener("activated",this.listeners.onSelectionsActivated),e.removeListener("deactivated",this.listeners.onSelectionsDeactivated),e.removeListener("canceled",this.listeners.onSelectionsDeactivated))}},vZ=function(e){var t=e.dock,n=e.settings.label,r="center"===t,i=r?{}:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};return YS.createElement("span",{style:i,title:n},r?n:"* ".concat(n))},bZ={renderer:"react",disableTriggers:!0,key:"disclaimer",defaultSettings:{settings:{isRTL:!1,label:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'}},preferredSize:function(){return 22},render:function(){var e=this.rect,t=this.settings,n=t.layout,r=t.settings,i=t.style;return function(e){var t=e.dock,n=e.rect,r=e.settings,i=e.styling,o=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:t,isRTL:r.isRTL}),a=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.styling.fontFamily};return"left"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)"),r.transformOrigin="top left"),"right"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)"),r.transformOrigin="top left"),"center"===t&&(r.width="".concat(n.width,"px"),r.height="".concat(n.height,"px"),r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center"),"bottom"!==t&&"top"!==t||(r.justifyContent="flex-start",r.alignItems="flex-start"),r}({dock:t,rect:n,styling:i});return YS.createElement("div",{dir:o,style:a},YS.createElement(vZ,{dock:t,settings:r}))}({dock:n.dock,rect:e,settings:r,styling:i})}},xZ={},wZ=function(){if(hZ)return xZ;hZ=1;var e=zj;return xZ.createRoot=e.createRoot,xZ.hydrateRoot=e.hydrateRoot,xZ}(),kZ=xK({spacing:8,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)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:14,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,htmlFontSize:14,fontFamily:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif",button:{fontWeight:600,fontSize:14,textTransform:"none"}},shape:{borderRadius:3},components:{MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"qcm-focus-visible"}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"qcm-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:141,borderRadius:3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transform:"translate3d(0,0,0)"},text:{padding:"8px 16px","&:active":{backgroundColor:"rgba(0, 0, 0, 0.1)"},"&.Mui-focusVisible":{boxShadow:"inset 0 0 0 2px ".concat("#177FE6")}},outlined:{border:"1px solid rgba(0, 0, 0, 0.15)"},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"}},variants:[]},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:14,height:"32px"}}},MuiListItemIcon:{styleOverrides:{root:{color:"#404040",minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:14,color:"#404040",lineHeight:"16px",fontWeight:600},secondary:{fontSize:12,color:"#737373",fontWeight:400,lineHeight:"16px"}}}}});function SZ(e){var t={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}},n=e||{},r=n.x,i=n.y,o=n.width,a=n.height,s=n.scaleRatio,l=n.margin;return t.x=Number.isNaN(r)||void 0===r?t.x:r,t.y=Number.isNaN(i)||void 0===i?t.y:i,t.width=Number.isNaN(o)||void 0===o?t.width:o,t.height=Number.isNaN(a)||void 0===a?t.height:a,void 0!==s&&(t.scaleRatio.x=Number.isNaN(s.x)?t.scaleRatio.x:s.x,t.scaleRatio.y=Number.isNaN(s.y)?t.scaleRatio.y:s.y),void 0!==l&&(t.margin.left=Number.isNaN(l.left)?0:l.left,t.margin.top=Number.isNaN(l.top)?0:l.top),t}function CZ(){var e={rendererBox:SZ(),container:void 0,root:void 0},t=function(){var t,n;null===(t=e.root)||void 0===t||t.unmount(),null===(n=e.container)||void 0===n||null===(n=n.parentElement)||void 0===n||n.removeChild(e.container),e.container=void 0};return{size:function(t){return t&&(e.rendererBox=SZ(t)),e.rendererBox},element:function(){return e.container},appendTo:function(t){return e.container||(e.container=document.createElement("div"),e.container.style.position="absolute",e.container.style["-webkit-font-smoothing"]="antialiased",e.container.style["-moz-osx-font-smoothing"]="antialiased",e.container.style.pointerEvents="none",e.root=wZ.createRoot(e.container)),t.appendChild(e.container),e.container},setKey:function(t){e.container&&e.container.setAttribute("data-key",t)},render:function(t){if(!e.container)return!1;var n=e.rendererBox,r=n.scaleRatio.x,i=n.scaleRatio.y;return e.container.style.left="".concat(Math.round(n.margin.left+n.x*r),"px"),e.container.style.top="".concat(Math.round(n.margin.top+n.y*i),"px"),e.container.style.width="".concat(Math.round(n.width),"px"),e.container.style.height="".concat(Math.round(n.height),"px"),e.container.style.transform="scale(".concat(r,", ").concat(i,")"),e.container.style.transformOrigin="top left",e.root.render(function(e){var t=e.nodes;return YS.createElement(YS.StrictMode,null,YS.createElement(nG,{theme:kZ},t))}({nodes:t})),!0},findShapes:function(){return[]},itemsAt:function(){return[]},clear:function(){t()},destroy:function(){t()}}}function EZ(e){return Ry(e).l<70}function MZ(e,t){const n=Ry(e).l/100,r=Ry(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function _Z(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var DZ={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const i=[];let o=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=o.attrs.fill,a=t.attrs.fill;if(MZ(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,o.desc.slice.innerRadius),s=Math.min(s,o.desc.slice.outerRadius),s>r){const t=_Z({r:s,a:e},n),o=_Z({r:r,a:e},n);i.push({type:"line",x1:t.x,y1:t.y,x2:o.x,y2:o.y,strokeWidth:1,opacity:.4,stroke:EZ(a)?"#ccc":"#333"})}}o=t}return i}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function qZ(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function RZ(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),i=Math.sin(t),o=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:qZ(s)}}var TZ={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,c=(i={r:t.offset,a:l},{x:(o=s).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),u=RZ({size:t.size,fill:t.fill,angle:l+Math.PI,...c});u.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(u)}}var i,o;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function OZ(){const e=vp();return e.use(ag),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",cg(e))};e.interaction("hammer",cg(Hammer))}(a)),e.use((function(e){e.renderer("react",xH()),e.component("data-title",yH(e.renderer("svg")()))})),e.renderer("react-qcm",CZ),e.component("axis-title",yZ),e.component("disclaimer",bZ),e.component("pie-dividers",DZ),e.component("negative-indicators",TZ),e}var PZ={};function NZ(){NZ.init.call(this)}PZ.isObject=function(e){return"object"==typeof e&&null!==e},PZ.isNumber=function(e){return"number"==typeof e},PZ.isUndefined=function(e){return void 0===e},PZ.isFunction=function(e){return"function"==typeof e};var AZ=NZ;NZ.EventEmitter=NZ,NZ.prototype._events=void 0,NZ.prototype._maxListeners=void 0,NZ.defaultMaxListeners=10,NZ.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},NZ.prototype.setMaxListeners=function(e){if(!PZ.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},NZ.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],PZ.isUndefined(n))return!1;if(PZ.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(PZ.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},NZ.prototype.addListener=function(e,t){var n;if(!PZ.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,PZ.isFunction(t.listener)?t.listener:t),this._events[e]?PZ.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,PZ.isObject(this._events[e])&&!this._events[e].warned)&&((n=PZ.isUndefined(this._maxListeners)?NZ.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,PZ.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),PZ.isFunction(console.trace)&&console.trace()));return this},NZ.prototype.on=NZ.prototype.addListener,NZ.prototype.once=function(e,t){if(!PZ.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},NZ.prototype.removeListener=function(e,t){var n,r,i,o;if(!PZ.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||PZ.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(PZ.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},NZ.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],PZ.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},NZ.prototype.listeners=function(e){return this._events&&this._events[e]?PZ.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},NZ.listenerCount=function(e,t){return e._events&&e._events[t]?PZ.isFunction(e._events[t])?1:e._events[t].length:0};var IZ=r(AZ);function LZ(){const e={};var t;return t=e,Object.keys(IZ.prototype).forEach((e=>{t[e]=IZ.prototype[e]})),IZ.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function zZ({picasso:t}){var n;const r=e.useOptions(),i=e.useElement(),o=e.useSelections(),[a,s]=e.useState(),l=LZ(),c=e.useLayout(),u=e.useTranslator(),d=!(null===(n=c.qSelectionInfo)||void 0===n||!n.qInSelections),[f,h]=e.useState(!1);return l.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:i}){var o;return{active:n,label:i.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[0])||void 0===o||!o.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:c,isInSelections:d,isLassoActionActive:f,setIsLassoActionActive:h,translator:u}),e.useAction((()=>(a&&(a.interactions.lasso.active=()=>f),{...l.lasso})),[a,f,d,u.language()]),e.useEffect((()=>{i.style.overflow="hidden";const e=t({renderer:{prio:[r.renderer||"canvas"]}}),n=e.chart({element:i,data:[],settings:{}}),a=xk({chart:n,actions:l,selections:o,config:{selectionActions:!1}});a.setLayout(c),a.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const u=function(e){var t=rv({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({legendScrollOffset:0,rotation:0});u.intercept("rotation",(e=>(u.get("rotation")+e)%(2*Math.PI))),u.onChanged("rotation",(()=>{n.update({partialData:!0})}));const d=hx();return l.on("selections-start",(()=>{n.brush("selection").start()})),s({picasso:e,chart:n,selectionService:a,viewState:u,viewCache:d,interactions:l}),()=>{a.destroy(),n.destroy(),l.removeAllListeners(),delete l.select,u.intercept("rotation",void 0),u.onChanged("rotation",void 0)}}),[]),a}const FZ={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 jZ(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const $Z={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function HZ(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r;let i,o,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!==(r=e.session)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.url)){var u;if(i=e.session.options||(null===(u=e.enigmaModel)||void 0===u?void 0:u.session.sessionConfig),!i){var d;i=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(i.url);i.host=t.hostname,i.port=t.port,i.isSecure="wss:"===t.protocol}return c=void 0!==i.secure?i.secure:i.isSecure,o=c?"https://":"http://",a=i.host||"localhost",s=i.port?`:${i.port}`:"",l=i.prefix?i.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),o+a+s+l}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await $Z.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function VZ(e,t,n,r){var i,o,a;const{app:s,flags:l}=t,c=null===(i=e.layout)||void 0===i||null===(i=i.tooltip)||void 0===i?void 0:i.imageComponents;if(!c)return[];const[u]=c,d=u.size||"small",f=u.type||"media";let h=-1;for(let e=0;e<n.length;e++)if(n[e].cId===u.cId){h=e;break}const p=(null===(o=r.data)||void 0===o||null===(o=o.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];let m;if(-1!==h&&p[h]&&(m=p[h]),"media"===f&&null!==(a=u.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return HZ(u,d,s);if("url"===f)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&jZ(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await $Z.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await $Z.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(s,l,u,d,m);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===f&&m&&m.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(jZ(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await $Z.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(s,n[h],d,m)}return[]}const BZ={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(VZ(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){var t;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}},WZ={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await BZ.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>BZ.checkIfPromisesExist({customTooltipModel:e})};const UZ=(e,t)=>{var n,r,i;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:FZ.CHART.CHART_PARENT_TYPE,qId:FZ.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},YZ=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:FZ.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const KZ={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,r;const i=null!==(n=null===(r=t.tooltip)||void 0===r||null===(r=r.chart)||void 0===r||null===(r=r.style)||void 0===r?void 0:r.size)&&void 0!==n?n:"medium",o=FZ.CHART.STYLE[i];return[{content:[e.h("div",{style:{display:"flex",width:o,height:o,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:FZ.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":o}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a;const s=i,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 KZ.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=FZ.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=FZ.CHART.STATE,a=UZ(t,o),s=await e.createSessionObject(a),l=YZ(t);if(s.id!==FZ.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var c,u,d,f;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!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,p;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(p=e.source)&&void 0!==p&&p.field){var m;const t=null==e||null===(m=e.source)||void 0===m?void 0:m.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(FZ.CHART.CONTAINER_ID),g={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await i.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===(f=s.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await KZ.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(KZ.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(FZ.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=FZ.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({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 GZ(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function XZ(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=FZ.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function JZ(e){const t=XZ();return e.filter((e=>t[e.id]))}const ZZ={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const c=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=ZZ.getAttrExprData(a);o.length||n.length?WZ.handlePromises({customTooltipModel:i,nodes:ZZ.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&KZ.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>WZ.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[t])||void 0===o?void 0:o.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[FZ.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[FZ.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[FZ.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(JZ(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[FZ.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[FZ.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=GZ(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===JZ(i).length){var o;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(o=o.quarantine)||void 0===o?void 0:o.customTooltip)||[],n=[...i,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=GZ(e)||[];[...i,t].forEach((e=>{const t=JZ(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=XZ(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:Tg.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Tg.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function QZ(e,t,n,r){var i;const o=(null===(i=t.qHyperCube)||void 0===i||null===(i=i[n])||void 0===i||null===(i=i[r])||void 0===i?void 0:i.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return s?(o.forEach(((e,t)=>{const i=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case FZ.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case FZ.CUSTOM.TITLE:case FZ.CUSTOM.DESCRIPTION:case FZ.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);a.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),a):a}const eQ={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>QZ(t,e,r,n)}}};const tQ={getCustomAttrExps(e,t,n){var r;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},o=(null===(r=t.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(o))return i;return function(e,t,n,r){const i={[FZ.CUSTOM.TITLE]:!0,[FZ.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=ZZ.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===FZ.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===FZ.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,o.map((t=>Og.getMeasure(e,t))),e,i)}};function nQ({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(tQ.getCustomAttrExps(n,e,t))})),r}(e,t,n);return r.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function rQ(e){const t=FZ.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function iQ(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}const oQ={migrateProperties(e){var t,n;const r=bg(!0,{},e),i=(null===(t=r.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[];let o=iQ(r);return o=function(e,t){return t.concat(e.map((e=>rQ(e))))}(i,o),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(o,r),null===(n=r.tooltip)||void 0===n||delete n.data,r},getPatches(e){var t,n;const r=(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)||[],i=(null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions.length)-1,o=function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=rQ(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(iQ(e),r,i);return o},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){const n=new Promise((n=>{var r,i,o;const a=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],s=(null===(i=t.tooltip)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.qHyperCube)||{},l=null===(o=t.qMeta)||void 0===o||null===(o=o.privileges)||void 0===o?void 0:o.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(s,a)&&e.getEffectiveProperties().then((t=>{if(l){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}));return n}};var aQ={attrExpr:oQ};const{CUSTOM:sQ}=FZ;function lQ({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},d=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:ZZ,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),f="rtl"===c.direction,h=()=>{var e;const n=!(null===(e=u.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=>{u.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&ux(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=nQ({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===sQ.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===sQ.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>ZZ.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>ZZ.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const i=ZZ.getDataNodes(o,r),{attrExps:a}=ZZ.getAttrExprData(t);return WZ.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(h()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e.chart)&&void 0!==e&&null!==(e=e.object)&&void 0!==e&&e.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>KZ.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>ZZ.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>KZ.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:f}),hasAlternateState:()=>{var e;return!(null===(e=d.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>KZ.hide({app:n,customTooltipModel:d}),destroy:()=>KZ.destroyVisualization({customTooltipModel:d})}}}function cQ(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function uQ({flags:t,picasso:n,instance:r}){const i=e.useModel(),o=e.useApp(),a=e.useTranslator(),s=e.useElement(),[l,c]=e.useState(),u=e.useStaleLayout(),d=e.usePlugins(),f=e.useConstraints(),h=e.useOptions(),p=e.useTheme(),{qLocaleInfo:m}=e.useAppLayout(),g=e.useEmbed();return e.useEffect((()=>{if(!r)return;s.style.overflow="hidden";const e=function(e){var t,n=e.app,r=e.translator,i={initialized:!1,dimensions:[],measures:[]};return{initialize:(t=ev(ov().mark((function e(t){var o,a,s,l,c,u,d;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.properties,!i.initialized){e.next=3;break}return e.abrupt("return");case 3:return s=[Cv(a={app:n,translator:r,properties:o}),_v(a)],e.next=7,Promise.all(s);case 7:l=e.sent,c=av(l,2),u=c[0],d=c[1],i.dimensions=u,i.measures=d,i.initialized=!0;case 12:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),getAlternatives:function(){return{dimensions:sv(i.dimensions),measures:sv(i.measures)}}}}({app:o,translator:a}),l=ix({picasso:r.picasso,model:i,app:o,translator:a,config:{auto:!1,key:"fill"}}),y=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return ev(ov().mark((function e(){var r,a,s,l;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=ev(ov().mark((function e(n){var r;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(rv({},i));case 4:if("object"===lv(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(rv({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,sv(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=av(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Rv(!0,{},n.brush);Rv(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===lv(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=mx({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=mx({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:r.picasso,plugins:d,pluginArgs:cQ(u)}),v=lQ({flags:t,layout:u,app:o,model:i,picasso:n,chart:r.chart,translator:a,localeInfo:m,embed:g,options:h}),b=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:_k(a),styles:void 0};return d.styles=qk({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=qk({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:p,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),x=function({chart:e,translator:t,layout:n,constraints:r,options:i,themeService:o,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,c="rtl"===i.direction,{fontFamily:u}=o.getStyles();return oS({chart:e,translator:t,config:{rtl:c,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:u},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:i,create:o,util:a})=>{const[c]=n,{title:u,description:d,measures:f}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},h=[];u&&h.push(o.text({value:u,style:{bold:!0}})),d&&h.push(o.text({value:d}));const p=s.hideBasic();if(p&&!f.length&&(u||d)||h.push(o.text({value:c.data.label,style:{bold:!0}})),!p){h.push(o.color({nodes:n,property:"fill"}));const{num:e}=c.data;if(h.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=c.data;h.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}h.push(o.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:i("share")(c.desc.share)}))}f&&h.push(...f.map((e=>o.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),h.push(o.raw({value:s.chart.createLimitationRow()}))):h.push(o.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:m}=c.data;return s.isEnabled()&&m&&h.push(...m.map((t=>o.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"}}}})}({chart:r.chart,translator:a,layout:u,constraints:f,options:h,themeService:b,colorService:l,custom:v}),w=function({layout:e,themeService:t,flags:n}){const r=t.getStyles(),i=t=>{var r;return n.isEnabled("CLIENT_IM_3050")?null===(r=e.components)||void 0===r?void 0:r.find((e=>e.key===t)):void 0};return{axis:{title:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(n=null===(o=i("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.axis.title.fontSize,color:null!==(a=null===(s=i("axis"))||void 0===s||null===(s=s.axis)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.axis.title.color}}}},label:{name:{getStyle:()=>{var e,t,n,o,a,s;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.name.color,fontSize:null!==(n=null===(o=i("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.label.name.fontSize,fontFamily:null!==(a=null===(s=i("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.name)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.label.name.fontFamily}}},value:{getStyle:()=>{var e,t,n,o,a,s;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.value.color,fontSize:null!==(n=null===(o=i("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.label.value.fontSize,fontFamily:null!==(a=null===(s=i("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.label.value.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.title.fontFamily,fontSize:null!==(n=null===(o=i("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.legend.title.fontSize,color:null!==(a=null===(s=i("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.title.color}}},label:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.label)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.label.fontFamily,fontSize:null!==(n=null===(o=i("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.label)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.legend.label.fontSize,color:null!==(a=null===(s=i("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.label.color}}}}}}({layout:u,themeService:b,flags:t}),k=function({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)),r=({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 cx({layout:e,config:{args:{},disclaimers:{NoDataExist:{condition:({ds:e,encodings:n})=>0===t({ds:e,encodings:n}).length},LimitedData:{condition:()=>{const t=Mg.getValue(e,"qHyperCube.qSize.qcy");return Mg.getValue(e,"qHyperCube.qDataPages.0.qArea.qHeight")<t}},OnlyNanData:{condition:({ds:e,encodings:r})=>{const i=t({ds:e,encodings:r});return 0===n({rows:i,encodings:r}).length}},OnlyNegativeOrZeroValues:{condition:({ds:e,encodings:i})=>{const o=t({ds:e,encodings:i}),a=n({rows:o,encodings:i});return 0===r({rows:a,encodings:i}).length}},NegativeOrZeroValues:{condition:({ds:e,encodings:i})=>{const o=t({ds:e,encodings:i}),a=n({rows:o,encodings:i}),s=a,l=r({rows:a,encodings:i});return s.length!==l.length}}}}})}({layout:u});c({alternativeService:e,colorService:l,disclaimerService:k,pluginService:y,themeService:b,tooltipService:x,styleService:w})}),[i,o,r,u,a.language(),f,h.direction,p.name()]),l}const dQ=e=>"[object Object]"===Object.prototype.toString.call(e),fQ=e=>Array.isArray(e);function hQ(e,t){if(e===t)return!0;if(fQ(e)){if(!fQ(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!hQ(e[n],t[n]))return!1;return!0}if(dQ(e)){if(!dQ(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!hQ(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function pQ({enable:t=!0}={}){const n=e.useModel(),r=()=>Date.now().toString()+Math.random(),[i,o]=e.useState(r()),a={properties:void 0};return e.useEffect((()=>{if(!n||!n.getEffectiveProperties||!t)return()=>{};const e=()=>{n.getEffectiveProperties().then((e=>{const t=bg(!0,{},e);if(!a.properties)return void(a.properties=t);const n=function(e,t){var n,r,i,o;const a={properties:!1,exclude:!1};if(e===t)return a;const s=bg(!0,{},e),l=bg(!0,{},t);return a.exclude=!hQ(null===(n=s.qHyperCubeDef)||void 0===n?void 0:n.qLayoutExclude,null===(r=l.qHyperCubeDef)||void 0===r?void 0:r.qLayoutExclude),null===(i=s.qHyperCubeDef)||void 0===i||delete i.qLayoutExclude,null===(o=l.qHyperCubeDef)||void 0===o||delete o.qLayoutExclude,a.properties=!hQ(s,l),a}(a.properties,t);a.properties=t,n.exclude&&!n.properties&&o(r())}))};return n.on("changed",e),e(),()=>{n.removeListener("changed",e)}}),[t]),i}function mQ({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:i}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:`${e}Range`,direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const gQ=.8,yQ=.55,vQ={CORNER_RADIUS:0,INNER_RADIUS:yQ,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},bQ=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,i;let o=gQ,a=0;const s=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:yQ;e.donut.showAsDonut&&(o=gQ-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*o+a}}:gQ,xQ=({layout:e},t,n)=>{var r,i;if(!e.donut.showAsDonut)return 0;const o=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:yQ;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=gQ-o,n=o;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:o},wQ=({layout:e},t)=>{var n,r,i,o,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,f=d&&(d.label||d.title||d.qFallbackTitle)||"",h=t.encodings.slice.outerRadius,{formatter:p}=t.chart,m=Mg.getValue(e,"qHyperCube.qDimensionInfo",[]).length;function g(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>p(n)(e.qNum):e=>e.qText}}const y=(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:f,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?eQ.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:xQ({layout:e},t,y),fill:t.colorService.getColor(),strokeWidth:null!=y&&null!==(n=y.style)&&void 0!==n&&n.strokeWidth?vQ.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:vQ.STROKE.WIDTH.NONE,stroke:null!==(r=null==y||null===(i=y.style)||void 0===i||null===(i=i.strokeColor)||void 0===i?void 0:i.color)&&void 0!==r?r:vQ.STROKE.COLOR,outerRadius:bQ({layout:e},t,y),cornerRadius:null!==(o=null==y||null===(a=y.style)||void 0===a?void 0:a.cornerRadius)&&void 0!==o?o:0}},animations:{enabled:t.animations.enabled,isMainComponent:!0}}};function kQ({layout:e},t){var n,r;const i=(e.components||[]).filter((e=>"slices"===e.key))[0],o=null!==(n=null==i||null===(r=i.style)||void 0===r?void 0:r.innerRadius)&&void 0!==n?n:yQ,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=gQ-o,n=o;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled}}}function SQ(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 CQ({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 EQ(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function MQ(e){return e.node.data.num.label}function _Q(e){return e.node.data.radius.label}function DQ(e,t,n){if(e.dataPoint.auto)return n?MQ:EQ;if("share"===e.dataPoint.labelMode)return EQ;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?_Q:MQ}return null}function qQ({data:e}){return e?e.label:""}function RQ(e){const t=parseInt(e,10);if(!isNaN(t))return t}function TQ(e){var t,n;const r=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return(null!==(t=null==r||null===(n=r.style)||void 0===n?void 0:n.innerRadius)&&void 0!==t?t:yQ)>.3}function OQ({node:e,data:t}){return bg({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function PQ(e,t,n){const r=t.styleService.label.name.getStyle(),i=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",padding:t.encodings.slice.outerRadius?4:2,fill:r.fill}],fontSize:RQ(r.fontSize),fontFamily:r.fontFamily,label:qQ,linkData:({node:e,data:t})=>bg({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(DQ(e,t,!1)){const r=function(e,t,n){return{label:DQ(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&TQ(e)?"inside":"into",onBackground:e.donut.showAsDonut&&TQ(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),o=Ag(bg(t,r),n.theme);o.linkData=OQ,i.push(o)}return{key:"pie-labels",type:"labels",renderer:cS(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:i}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}function NQ({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=DQ(e,t,!0),i=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme),o=t.themeService.getStyles(),a=t.styleService.label.name.getStyle(),s=t.styleService.label.value.getStyle(),l=a.fill===o.label.name.color,c=s.fill===o.label.value.color;return{key:"pie-labels",type:"labels",renderer:cS(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:RQ(a.fontSize),fontFamily:a.fontFamily,fill:l&&!e.donut.showAsDonut?i:a.fill,label:qQ,linkData:({data:e})=>e},{fontSize:RQ(s.fontSize),fontFamily:s.fontFamily,fill:c&&!e.donut.showAsDonut?i:s.fill,label:r,linkData:({data:e})=>e}]}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}(e,n,t):PQ(e,n,t))}const AQ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type)),i=(r||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 i||this.chart.component("legendRangeBrush").emit("rangeClear"),i}},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 IQ(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}function LQ(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:i}=IQ(e,t),o=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*gQ;return(o-r)**2+(a-i)**2<=s**2}const zQ=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let i=IQ(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(i={cx:i.x,cy:i.y,r:5});const o=this.chart.shapesAt(i,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});o.length&&(this.chart.brushFromShapes(o,{components:[{key:o[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),FQ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),jQ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function $Q(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&LQ(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const HQ=(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()&&LQ(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}}}),VQ=(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}}}),BQ=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[HQ(e,{}),zQ(e,t,{}),...n]:[AQ(e,{}),jQ(e,{}),HQ(e,{}),FQ(e,{}),VQ(e,{}),zQ(e,t,{}),...n]});function WQ(e,t,n){const r=e.getIsSingleSelect(0),{constraints:i}=n;if(i.active&&i.passive)return[];const o=t.tooltipService.getInteractions();return[BQ(t,r,o.gestures),$Q(t),o.native]}function UQ({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 YQ({layout:e},t,n){var r;if(null!=t&&null!==(r=t.flags)&&void 0!==r&&r.isEnabled("IM_5788_DATA_TITLE_REFACTOR"))return!1;if(!e.dimensionTitle)return!1;const i=t.properties,o=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:i&&i.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:o.fontFamily,fontSize:o.fontSize,color:o.color}}}function KQ({layout:e},t,n){var r;if(null==t||null===(r=t.flags)||void 0===r||!r.isEnabled("IM_5788_DATA_TITLE_REFACTOR"))return!1;if(!e.dimensionTitle)return!1;const i=t.alternativeService.getAlternatives(),o=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:i.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:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize}}}}function GQ({layout:e,context:t,selectionService:n},r={}){const i=function({layout:e}={},t={}){const n={};return bg(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&bg(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),o={scales:i};let a=[];const s=function(e,t){const n=e.disclaimerService.getDisclaimer();if(!n)return!1;const{rtl:r}=t,{translator:i}=e,{fontFamily:o}=e.themeService.getStyles();return{key:"disclaimer",type:"disclaimer",layout:{dock:n.alignment},settings:{isRTL:r,label:i.get(`Object.Disclaimer.${n.key}`)},style:{fontFamily:o}}}(r,t);if(r.disclaimerService.getHasSuppressingDisclaimer())return{components:[s]};const l=t.constraints.select||t.constraints.active,c=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",styleOverrides:{title:r.styleService.legend.title.getStyle(),label:r.styleService.legend.label.getStyle()},rtl:t.rtl},{navigationDisabled:l});return i.fillRange&&c.components[0]&&("right"===c.components[0].layout.dock||"left"===c.components[0].layout.dock||t.rtl)&&(i.fillRange.invert=!0),a=[wQ({layout:e},r),kQ({layout:e},r),SQ(r),CQ({layout:e},r),YQ({layout:e},r,t),KQ({layout:e},r,t),...c.components,mQ({scaleKey:"fill",legend:c.components[0]||{},onEdited:r.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},NQ({layout:{components:e.components,dataPoint:bg({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),s],a=a.filter((e=>!1!==e)),{interactions:WQ(n,r,t),scales:i,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:UQ({settings:o},r),strategy:Sg(0,r)}}function XQ({instance:t,services:n,picasso:r,flags:i}){const o=e.useOptions(),a=e.useModel(),s=e.useApp(),l=e.useTranslator(),c=e.useTheme(),u=e.useStaleLayout(),d=e.useSelections(),f=e.useConstraints(),{qLocaleInfo:h}=e.useAppLayout(),p=pQ({enable:u&&!u.snapshotData}),[m]=e.usePromise((()=>{if(!n)return Promise.resolve();aQ.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 t=>Promise.all([n.colorService.initialize({createConfig:e}),Promise.resolve(t),n.pluginService.initialize(),n.alternativeService.initialize({properties:t})])))}),[n,p]);e.useEffect((()=>{null!=t&&t.selectionService&&t.selectionService.setLayout(u)}),[u]),e.useEffect((()=>{if(!t||!m)return;const{chart:e,viewState:p,interactions:g,viewCache:y}=t,{alternativeService:v,colorService:b,disclaimerService:x,pluginService:w,themeService:k,tooltipService:S,styleService:C}=n,E=o.viewState||{};u.snapshotData||(p.preventSet("legendScrollOffset",E.legendScrollOffset||0),p.preventSet("rotation",E.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,p),S.expando.set("properties",m[1]);const M=r.data("q")({key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:h}}),_=[{type:"q",key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:h}},...b.getData()],D={slice:{arc:"qMeasureInfo/0"}};u.qHyperCube.qMeasureInfo.length>1&&(D.slice.outerRadius="qMeasureInfo/1"),x.initialize({args:{ds:M,encodings:D}});const q=function(e,t){if(t.slice.outerRadius)return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length;return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(r.data("q")({data:u.qHyperCube,config:{localeInfo:h}}),D),R=d?()=>{const t=e.brush("selection");ag.selections(t,{},u).forEach((e=>{d.select(e)}))}:()=>{},T=u.snapshotData&&!o.freeResize?{width:(u.snapshotData.content.size||u.snapshotData.object.size).w,height:(u.snapshotData.content.size||u.snapshotData.object.size).h}:void 0,O=e=>t.selectionService.getIsSelectionLocked(e),P=()=>GQ({layout:u,context:{rtl:"rtl"===o.direction,theme:c,constraints:f,model:a},selectionService:t.selectionService},{picasso:r,ds:M,model:a,app:s,chart:e,onSelect:R,isLocked:O,interactions:g,constraints:f,translator:l,viewState:p,dataRowCount:q,encodings:D,alternativeService:v,colorService:b,disclaimerService:x,pluginService:w,themeService:k,styleService:C,tooltipService:S,debouncer:px,properties:m[1],selections:d,logicalSize:T,flags:i,viewCache:y,animations:{enabled:()=>function({viewState:e,options:t,viewCache:n,layout:r,chart:i}){return!1!==t.chartAnimations&&n.get("chartWidth")===i.element.clientWidth&&n.get("chartHeight")===i.element.clientHeight&&n.get("hasZeroLine")===!!i.component("zeroLine")&&0===e.get("rotation")&&!lS.propertiesHaveChanged({viewCache:n,layout:r})}({viewState:p,options:o,layout:u,viewCache:y,chart:e})}});t.generateSettings=P;const N=P();e.update({data:_,settings:N}),y.set("chartWidth",e.element.clientWidth),y.set("chartHeight",e.element.clientHeight),y.set("hasZeroLine",N.components.filter((e=>"zeroLine"===e.key)).length>0),lS.cacheProperties({viewCache:y,layout:u}),o.effect&&u.effectProperties?o.effect.update(u,e,{encodings:D}):u.effectPath||e.brush("highlight").end()}),[t,m,o.direction,o.effectProperties,f,c.name(),l.language()])}function JQ({instance:t,services:n}){const r=e.useElement(),i=e.useStaleLayout();e.onTakeSnapshot((e=>{if(!(i.snapshotData&&i.snapshotData.content&&i.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(e,r),t&&n))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:_g(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:e,chart:t.chart,colorService:n.colorService,viewState:t.viewState})})),e.useImperativeHandle((()=>({getViewState:()=>({rotation:t.viewState.get("rotation"),legendScrollOffset:_g(t.chart,"legend-cat")})})),[t])}var ZQ={exports:{}};!function(e){self,e.exports=(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},645:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Te});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},o=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=v(u(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),h=p(0),m=p(1),g=v(d,h),y=v(f,m);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function w(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const k={isFullRange:d,getNumDimensions:w,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(h(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=p(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=p(0),f=p(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===w({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:h,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=w({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n})),t}};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}var E=t().bind(null,!0),M={},_=Array.isArray;function D(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function q(e){return void 0===e}function R(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function T(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=q(e[n||t])?o:e[t],e=e[n||t]}})),e}function O(e,t){var n=!0;if(D(e)&&D(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){O(e[r],t[r])||(n=!1)})),n);if(_(e)&&_(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!O(e[r],t[r]))return!1;return!0}return e===t}M.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?E({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);O(o,a)||R(t,i)||(q(a)?r.push({op:"add",path:s,value:o}):D(o)&&D(a)?r=r.concat(M.generate(a,o,s)):_(o)&&_(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&q(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(O(t,i))return r;if(!q(t[0])&&q(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(M.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){q(t[i])&&!R(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},M.apply=function(e,t){t.forEach((function(t){var n,r,i=T(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(_(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(_(a)&&_(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return S(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(D(a)&&D(t.value))n=a,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!R(n,e)&&delete n[e]})),E(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var u=T(e,t.from);_(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(_(i)?i.splice(+o,1):delete i[o])}))},M.clone=function(e){return E({},e)},M.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},M.updateObject=function(e,t){Object.keys(e).length?M.apply(e,M.generate(e,t)):E(e,t)};const P=M,N=function(e,n,r){if(!e)return Promise.resolve();var i=P.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(i,!0)):Promise.resolve()};var A="accumulation";function I(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===A)return n[r]}function L(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===A)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=k.getNumStepComp(n,l),f=k.getAboveComp(n,l,u,d),h=k.getRangeComp("RangeSum",f);if(k.needDimension({modifier:n,properties:r,layout:i})){var p=k.getDimComp(c,1),m=k.getDimComp(c,0),g=k.getAggrComp(h,p,m);h=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return h},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,z)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(L(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(L(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(L(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(L(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=I(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=I(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(L(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(A))return!1;var o=I(t,e);return o&&!o.disabled}};return n}};var j="movingAverage";function $(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function H(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var V={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const B={translationKey:"properties.modifier.movingAverage",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=k.getNumDimensions({properties:i,layout:a}));var u=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=k.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=k.getNumStepComp(r,c),p=k.getAboveComp(r,c,f,h);if(r.nullSuppression)t=k.getRangeComp("RangeAvg",p);else{var m=k.getRangeComp("RangeSum",p),g=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(k.needDimension({modifier:r,properties:i,layout:a})){var v=k.getDimComp(u,1),b=k.getDimComp(u,0),x=k.getAggrComp(y,v,b);y=r.showExcludedValues?k.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,V)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(H(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(H(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(H(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=$(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=$(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(j))return!1;var o=$(t,e);return o&&!o.disabled}};return n}};var W="timeSeriesDecomposition";function U(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function Y(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var K={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const G={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?k.generateTSDExpression(n,t,r):t},extractInputExpression:k.extractInputExpression,initModifier:function(e,t){k.initModifier(e,K),""===e.decomposition&&t&&(e.decomposition=k.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(Y(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(Y(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=U(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e})),e}))}},show:function(t){var n=U(t,e);return n&&!n.fullRange}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};return n}};var X="difference";function J(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=k.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(k.needDimension({modifier:n,properties:r,layout:i})){var h=k.getDimComp(c,1),p=k.getDimComp(c,0),m=k.getAggrComp(f,h,p);f=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(i,o),d=ce(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach((function(t){void 0===e[t]&&(e[t]=oe[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",fe="qDef.qDef",he="qDef.base.qDef",pe="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,he);return void 0!==t?t:o(e,fe)},getExpressionRef:function(e){return void 0!==o(e,he)?he:fe},getLibraryIdRef:function(e){return o(e,me)?me:pe},getLibraryId:function(e){return o(e,me)||o(e,pe)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",ve="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",we="qDef.qLabel",ke="qDef.qLabelExpression",Se="qDef.base.qLabel",Ce="qDef.base.qLabelExpression",Ee="qDef.qAggrFunc",Me="qDef.base.qAggrFunc",_e={initBase:function(e,t){(t||_e.isValid(e))&&(n(e,ve,o(e,ye)),n(e,xe,o(e,be)),n(e,Se,o(e,we)),n(e,Ce,o(e,ke)))},restoreBase:function(e){_e.isValid(e)&&(n(e,ye,o(e,ve)),n(e,be,o(e,xe)),n(e,we,o(e,Se)),n(e,ke,o(e,Ce)),o(e,Ee)&&o(e,Me)&&n(e,Ee,o(e,Me)),delete e.qDef.base)},isValid:function(e){var t=o(e,ve),n=o(e,xe);return void 0!==t||void 0!==n}};const De=_e;function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}var Re={accumulation:F,movingAverage:B,difference:ee,normalization:ue,timeSeriesDecomposition:G};const Te={modifiers:Re,apply:Pe,applyModifiers:Ne,cleanUpMeasure:Ae,destroy:function(e){e&&Oe[e.id]&&Oe[e.id].masterItemSubscriber&&(Oe[e.id].masterItemSubscriber&&Oe[e.id].masterItemSubscriber.unsubscribe(),delete Oe[e.id])},hasActiveModifiers:Ie,getActiveModifier:Le,initBase:De.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Re[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return Re[e]&&Re[e].isApplicable({properties:n,layout:r})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=je(e);Ye({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:ze};var Oe={};function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Oe[n.id]=Oe[n.id]||{isFirstTime:!0};var c=Oe[n.id].isFirstTime;if(Oe[n.id].isFirstTime=!1,r&&"object"===qe(r))return Ne({model:n,properties:r});var u=n?n.layout:void 0,d=o(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var f=o(u,"qHyperCube.qMeasureInfo"),h=Oe[n.id].lastReloadTime;if(Oe[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Ie({measures:f,layout:u})){var p=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:f,layout:u,model:n,lastReloadTime:h});return p||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ye({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:f,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then((function(e){var r=t()(!0,{},e);He(r);var i=Qe(r);return Ke({model:n}).then((function(t){return Ge({libraryIds:i,model:n}).then((function(i){return p&&function(e){var t=e.properties;Fe(t).forEach((function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===qe(e)&&!e.disabled){if(n++,"object"!==qe(Re[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Re[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:r}),Ne({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===qe(e.base)}))}(f)?n.getEffectiveProperties().then((function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then((function(){var e=t()(!0,{},r);return Fe(r).forEach((function(e){return Ae(e)})),Je({oldProperties:e,newProperties:r,model:n})}))}({model:n,properties:e})})):Promise.resolve(l)}function Ne(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),He(i);var f=Qe(i);return et({model:n,libraryIds:f,masterItem:c}).then((function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ie({measures:n,properties:r}))return n.forEach((function(e){return Ae(e)})),Promise.resolve();var l=a?void 0:Qe(r);return Ke({model:i,dimensionAndFieldList:s}).then((function(e){return Ge({libraryIds:l,model:i,libraryItemsProps:a}).then((function(i){n.forEach((function(n){Ye({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;De.isValid(n)||De.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===qe(e)&&!e.disabled){if(s++,"object"!==qe(Re[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Re[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Re[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Re[r.type].updateModifier&&Re[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Re[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||ze(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ze(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}}))}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),Ve(n)):Ae(n)}))}))}))}({measures:a,properties:i,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)}))}))}function Ae(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some((function(e){return"object"===qe(e)&&!e.disabled&&!Re[e.type]}))}(e)?De.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ve(e)}function Ie(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ye({modifiers:je(e),properties:n,layout:r})}))}function Le(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Re[r.type]&&!r.disabled)return r}}function ze(e){var t=Le(e);return!t||Re[t.type].enableTotalsFunction(e)}function Fe(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function $e(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function He(e){Fe(e).forEach((function(e){return function(e){var n=Le(e);n&&(void 0!==n.outputExpression&&$e(n)!==e.qDef.qDef?delete e.qDef.base:!De.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)}))}function Ve(e){var t=je(e);Array.isArray(t)&&t.forEach((function(t){"object"===qe(t)&&(t.disabled||!Re[t.type]&&$e(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Be(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,n=e.properties,r=e.layout;return!We(t)&&Ye({modifiers:je(t),properties:n,layout:r})}function Ye(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==qe(e)||e.disabled||!Re[e.type])&&(void 0===i[e.type]&&(i[e.type]=Re[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function Ke(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Ge(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):N(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===qe(e)&&!e.disabled&&Re[e.type]&&Re[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=je(t);if(Ye({modifiers:r,properties:e})){var o=We(t);o&&n.push(o),i=i||Ze({modifiers:r,properties:e})}})),o(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Oe[t.id].masterItemSubscriber=Oe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=o(e,n)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach((function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(u(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return Pe({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Oe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>He});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var f=n(645),h=n.n(f);const p=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},v=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach((function(e){h().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var w=n(229),k=n.n(w);function S(e,t){var n=k()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function C(e,t){return k()(!0,{},t,e)}function E(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var M=Math.pow(2,53)-1;function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const q=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},R=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},T=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},O=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},P=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},N=function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=S(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=S(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},A=function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=C(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=C(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},I=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=E(a.max,i.dimensions.length,M),l=E(a.min,i.dimensions.length,0);return{maxDimensions:E(o.max,s,M),minDimensions:E(o.min,l,0),maxMeasures:s,minMeasures:l}},L=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},z=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=k()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=k()(!0,{},n,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},j=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return _(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),r.dimensions.added(e,n)}))}},H=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return D(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),r.measures.added(e,n)}))}},V=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&h().isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))};function B(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),p({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),v({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,h=e.isHCModifierSupported,p=void 0===h||h,m={qChildren:[]},g=z({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=I({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,w=b.minDimensions,k=b.maxMeasures,S=b.minMeasures,C=l.defaultDimension,E=void 0===C?O():C,M=l.defaultMeasure,_=void 0===M?P():M;v.qDimensions.length=0,v.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:S})&&j({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:S,newHyperCubeDef:v}),N({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:E}),A({exportFormat:t,maxMeasures:k,minMeasures:S,newHyperCubeDef:v,defaultMeasure:_}),$({newProperties:g,dataDefinition:a,hypercubePath:c}),H({newProperties:g,dataDefinition:a,hypercubePath:c}),L({exportFormat:t,newHyperCubeDef:v}),R("qMaxStackedCells",y,v),R("qNoOfLeftDims",y,v),T("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),T("qMode",y,v,"S"),T("qReductionMode",y,v,"N"),T("qSortbyYValue",y,v),T("qIndentMode",y,v),T("qShowTotalsAbove",y,v),q(g,t,r),m.qProperty=g;var D=o.getValue(u||{},"support.modifiers");return V({measures:v.qMeasures,modifierTypes:D}),f&&B(m.qProperty,"storedFilters"),"S"===v.qMode&&p&&B(m.qProperty,"dynamicScript"),m}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function Y(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function K(e,t){return e.length!==t}const G={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(Y(a,t,r,i),K(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=G.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})),t.forEach((function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}))}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var h=G.create(G.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:h,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:h,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(h.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(h)):l.qAttributeExpressions.push(h)}}}function ie(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:h().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return h().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=G.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},de=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=G.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},fe=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},he=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},pe=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ye={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=W.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=G.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return G.moveByIdFromGroup(a,[],"qAttributeDimensions",c),G.moveByIdFromGroup(a,[],"qAttributeExpressions",c),G.moveByIdFromGroup(s,[],"qAttributeExpressions",u),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=W.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),h=o.getValue(d,"qHyperCubeDef.qDimensions",[]),p=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ce(d,f),y=ue({canColorBy:g,autoColor:m,colorMode:p,dimensions:h});return g[p]?he({shouldUpdateColorBy:y,properties:d})&&pe(d):me(d),y&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),fe(h),u}};var ve=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?B(n,"unsupportedAutoMinMax")||k()(n.measureAxis,t.measureAxis):B(n,"supportedAutoMinMax")||k()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&k()(s,n.properties.measureAxes[t[0].axis])):k()(s,n.properties.measureAxes[0])}},we=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},ke={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ye.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),we(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Se(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ce(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var c=Se(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Se(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var Me="qHyperCubeDef.qMeasures",_e="conditionalColoring",De="measures",qe="qDef.conditionalColoring";const Re={quarantine:function(e){Ce({properties:e,arrayPath:Me,quarantineName:_e,arrayName:De,itemPath:qe})},unquarantine:function(e){Ee({properties:e,arrayPath:Me,itemPath:qe,arrayName:De,quarantineName:_e})}};var Te="qHyperCubeDef.qMeasures",Oe="measures",Pe="qHyperCubeDef.qDimensions",Ne="dimensions",Ae="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ie="alternativeMeasures",Le="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",ze="alternativeDimensions",Fe="qCalcCondition",je="conditionalShowHide";const $e={quarantine:function(e){Ce({properties:e,arrayPath:Te,quarantineName:je,arrayName:Oe,itemPath:Fe}),Ce({properties:e,arrayPath:Pe,quarantineName:je,arrayName:Ne,itemPath:Fe})},unquarantine:function(e){Ee({properties:e,arrayPath:Te,quarantineName:je,arrayName:Oe,itemPath:Fe}),Ee({properties:e,arrayPath:Pe,quarantineName:je,arrayName:Ne,itemPath:Fe})},quarantineAlternative:function(e){Ce({properties:e,arrayPath:Ae,quarantineName:je,arrayName:Ie,itemPath:Fe}),Ce({properties:e,arrayPath:Le,quarantineName:je,arrayName:ze,itemPath:Fe})},unquarantineAlternative:function(e){Ee({properties:e,arrayPath:Ae,quarantineName:je,arrayName:Ie,itemPath:Fe}),Ee({properties:e,arrayPath:Le,quarantineName:je,arrayName:ze,itemPath:Fe})}},He={hypercube:W,colorChart:ye,axisChart:ke,quarantineProperty:x,unquarantineProperty:B,quarantineArrayProp:Ce,unquarantineArrayProp:Ee,conditionalColoring:Re,conditionalShow:$e}})(),r.default})()}(ZQ);var QQ=r(ZQ.exports);const e0={setValue(e,t,n){if(!t)return;const r=t.split(".");let i=e;const o=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==i[r[a]]&&(i[r[a]]=Number.isNaN(+r[a+1])?{}:[]),i=i[r[a]];void 0!==n?i[o]=n:delete i[o]},getValue(e,t,n){const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(null==o[r[i]])return n;o=o[r[i]]}return o}},t0={getDimensions:e=>e0.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>e0.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>e0.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>e0.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=e0.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=e0.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 n0={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>t0.getNumMeasures(e)>=1},showLegend:e=>{const t=e0.getValue(e,"color.auto"),n=e0.getValue(e,"color.expressionIsColor"),r=e0.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!e0.getValue(e,"color.auto")&&"byDimension"===e0.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===e0.getValue(e,"color.useDimColVal")&&e0.setValue(e,"color.useDimColVal",!1),!e0.getValue(e,"color.auto")&&"byDimension"===e0.getValue(e,"color.mode")&&"libraryItem"===e0.getValue(e,"color.byDimDef.type"))},r0=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:i}=n0;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),r.push({value:"primary",translation:"properties.colorMode.primary"}),r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!e0.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:i,showTitle:{show(e){const t=e0.getValue(e,"color.auto");return e0.getValue(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===e0.getValue(e,"color.mode")&&!0===e0.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>e0.getValue(e,"legend.show")&&i(e)}}};function i0(e){return new r0(e)}const o0={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}}}}}}},a0=(e,t,n)=>{const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.pieChart",e,"color")})}}}}},s0=(e,t,n,r)=>{const i=function(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,c={};l.forEach((function(e){for(var r=e.split("."),i=c,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=xv({theme:t,translator:n,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var u=function(e){for(var t=e.split("."),n=c,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}({theme:r,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:a0("axis.title",i,r)}}}:void 0,labelNameSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionValueLabel",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:a0("label.name",i,r)}}}:void 0,labelValueSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.value.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:a0("label.value",i,r)}}}: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:a0("legend.title",i,r)}}}: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:a0("legend.label",i,r)}}}:void 0}}},l0=i0("hard");const c0=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(fx(e,"color.mode","byDimension"),fx(e,"color.byDimDef.activeDimensionIndex",0),fx(e,"color.persistent",!1))},u0=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},d0=e=>{var t;const{flags:n,translator:r}=e||{},i=null==e||null===(t=e.sense)||void 0===t?void 0:t.theme,o=null==n?void 0:n.isEnabled("SENSECLIENT_IM_2429_PIECHART_BG"),a={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?r.get("Simple.Color.Auto",r.get("properties.colorMode.byDimension")):r.get("Common.Custom")},change:c0},colorMode:{options:u0}}}}},s={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||fx(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,i){i.dimensionTitle=!e}}}}}}},l={uses:"settings",items:{simpleStyling:o0,simpleLabels:s,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:s0(o,n,r,i),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:l0.color.colorMode.options},persistentColors:{show:l0.color.persistentColors.show}}},simpleColors:a,legend:{show:l0.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:l0.legend.showTitle.show},dock:{show:l0.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}};return l},f0={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)}}}}}}},h0={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},p0={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function m0(e){return{type:"items",component:"accordion",items:{data:f0,sorting:h0,addons:p0,settings:d0(e)}}}const g0=i0("explore"),y0=m0();var v0={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:y0.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:y0.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:g0.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&g0.color.useDimColVal.show(e))}}}}}}};const b0="slices";function x0(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function w0(e){return e.data.num.label}function k0(e){return e.data.radius.label}function S0(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?w0:x0;if("share"===e.dataPoint.labelMode)return x0;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?k0:w0;return w0}(n,r)(e,t)}function C0(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 E0{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const i=e.find(".effectLayer");i.length>0&&i.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),i=n.map((n=>{const{start:i,end:o,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,c=n.element.getBoundingClientRect(),u=(i+o)/2,d=c.left-r.left+l.x*(s.x+a*Math.sin(u)),f=c.top-r.top+l.y*(s.y-a*Math.cos(u)),h=Math.cos(u)>0?"top":"bottom",p=Math.sin(u)>0?"right":"left";return{title:C0(n),label:S0(n,this.chart.formatter,e,t),orientation:`${h}${p}`,position:{x:d,y:f}}}));this.Flag.show(this.effectLayer,i)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=bg(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=bg(e.options,{effect:null}),n?t.getProperties().then((e=>bg(e,{effectPath:null,effectProperties:null,dataPoint:bg(!0,{},e.originalModelSettings.dataPoint),legend:bg(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class M0 extends E0{init(e,t,n,r){return e.options=bg(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(b0).data.items,n=e.effectProperties.min,r=e.effectProperties.max,i=[];let o=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const i=e.num.value;n&&i<o[0]&&(o=[i,t]),r&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class _0 extends E0{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component(b0).data.items.map((e=>e.value)),i=r.indexOf(n.data.value);-1!==i&&(this.selectedIndex=i,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(b0).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===b0)).map(((n,r)=>{const i=S0(n,this.chart.formatter,e,t);return{text:`${C0(n)} (${i})`,value:r}}))}init(e,t,n,r){return e.options=bg(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}const D0="/effects/highlight-value",q0="/effects/maxmin";var R0={isCompatible:({effectPath:e})=>e===q0||e===D0,create:e=>e.effectPath===q0?new M0(e):e.effectPath===D0?new _0(e):null};function T0(e){const t={},{components:n,tooltip:r}=e,i=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((e=>{t[`chart_style_${e}`]=i.style[e]})),r){var o;t.chart_tooltip_custom=!r.auto;const e=null===(o=r.chart)||void 0===o||null===(o=o.object)||void 0===o?void 0:o.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function O0(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 P0(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function N0({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){P0(e),O0(t),ZZ.addCallbackCustomTooltip(t)},move(e,t){P0(e),O0(t),ZZ.moveCallbackCustomTooltip(t,e)},remove(e,t){ZZ.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){P0(e),O0(r),ZZ.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){O0(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 A0=e=>e.qMax<=0,I0=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(A0));function L0(e){return{definition:m0(e),softDefinition:v0,support:{snapshot:I0,export:I0,exportData:!0,sharing:I0,viewData:!0,effects:!0},effects:R0,extendMetrics:T0,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=QQ.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:N0(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>QQ.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function z0(e){return{properties:{version:"1.28.1",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:vQ.STROKE.COLOR},cornerRadius:vQ.CORNER_RADIUS,innerRadius:vQ.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:[N0(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const i=QQ.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:N0(e),hypercubePath:r});return i.qProperty.dataPoint&&!1===i.qProperty.dataPoint.show&&delete i.qProperty.dataPoint.show,i},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>QQ.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}return t=>{const{flags:r}=t;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(n).forEach((t=>{e.add(n[t])}))}}(t.translator);const i=OZ();return{qae:z0(t),ext:L0(t),component(){const t=zZ({picasso:i}),n=uQ({flags:r,picasso:i,instance:t});XQ({instance:t,services:n,picasso:i,flags:r}),function({instance:t}){const n=e.useStaleLayout(),r=e.useOptions(),i=e.useRect();e.useEffect((()=>{if(!t||!t.generateSettings)return;const{viewCache:e,chart:i,generateSettings:o}=t;i.update({settings:o()}),e.set("chartWidth",i.element.clientWidth),e.set("chartHeight",i.element.clientHeight),r.effect&&r.effect.update(n,i)}),[i.width,i.height])}({instance:t}),JQ({instance:t,services:n})}}}}));
|
|
122
|
+
`),bG.rippleVisible,MG,550,(({theme:e})=>e.transitions.easing.easeInOut),bG.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),bG.child,bG.childLeaving,_G,550,(({theme:e})=>e.transitions.easing.easeInOut),bG.childPulsate,DG,(({theme:e})=>e.transitions.easing.easeInOut)),TG=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=QC(n,xG),[s,l]=US.useState([]),c=US.useRef(0),u=US.useRef(null);US.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[s]);const d=US.useRef(!1),f=lY(),h=US.useRef(null),p=US.useRef(null),m=US.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l((e=>[...e,tW.jsx(RG,{classes:{ripple:kU(i.ripple,bG.ripple),rippleVisible:kU(i.rippleVisible,bG.rippleVisible),ripplePulsate:kU(i.ripplePulsate,bG.ripplePulsate),child:kU(i.child,bG.child),childLeaving:kU(i.childLeaving,bG.childLeaving),childPulsate:kU(i.childPulsate,bG.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)])),c.current+=1,u.current=a}),[i]),g=US.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:p.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})},f.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,m,f]),y=US.useCallback((()=>{g({},{pulsate:!0})}),[g]),v=US.useCallback(((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void f.start(0,(()=>{v(e,t)}));h.current=null,l((e=>e.length>0?e.slice(1):e)),u.current=t}),[f]);return US.useImperativeHandle(t,(()=>({pulsate:y,start:g,stop:v})),[y,g,v]),tW.jsx(qG,$C({className:kU(bG.root,i.root,o),ref:p},a,{children:tW.jsx(l$,{component:null,exit:!0,children:s})}))}));function OG(e){return CU("MuiButtonBase",e)}const PG=EU("MuiButtonBase",["root","disabled","focusVisible"]),NG=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],AG=eG("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${PG.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),IG=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:f="a",onBlur:h,onClick:p,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:v,onKeyDown:b,onKeyUp:x,onMouseDown:w,onMouseLeave:k,onMouseUp:S,onTouchEnd:C,onTouchMove:E,onTouchStart:M,tabIndex:_=0,TouchRippleProps:D,touchRippleRef:q,type:R}=n,T=QC(n,NG),O=US.useRef(null),P=US.useRef(null),N=iY(P,q),{isFocusVisibleRef:A,onFocus:I,onBlur:L,ref:z}=yY(),[F,j]=US.useState(!1);l&&F&&j(!1),US.useImperativeHandle(r,(()=>({focusVisible:()=>{j(!0),O.current.focus()}})),[]);const[$,H]=US.useState(!1);US.useEffect((()=>{H(!0)}),[]);const V=$&&!c&&!l;function B(e,t,n=u){return rY((r=>{t&&t(r);return!n&&P.current&&P.current[e](r),!0}))}US.useEffect((()=>{F&&d&&!c&&$&&P.current.pulsate()}),[c,d,F,$]);const W=B("start",w),U=B("stop",m),Y=B("stop",g),K=B("stop",S),G=B("stop",(e=>{F&&e.preventDefault(),k&&k(e)})),X=B("start",M),J=B("stop",C),Z=B("stop",E),Q=B("stop",(e=>{L(e),!1===A.current&&j(!1),h&&h(e)}),!1),ee=rY((e=>{O.current||(O.current=e.currentTarget),I(e),!0===A.current&&(j(!0),v&&v(e)),y&&y(e)})),te=()=>{const e=O.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=US.useRef(!1),re=rY((e=>{d&&!ne.current&&F&&P.current&&" "===e.key&&(ne.current=!0,P.current.stop(e,(()=>{P.current.start(e)}))),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),p&&p(e))})),ie=rY((e=>{d&&" "===e.key&&P.current&&F&&!e.defaultPrevented&&(ne.current=!1,P.current.stop(e,(()=>{P.current.pulsate(e)}))),x&&x(e),p&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&p(e)}));let oe=s;"button"===oe&&(T.href||T.to)&&(oe=f);const ae={};"button"===oe?(ae.type=void 0===R?"button":R,ae.disabled=l):(T.href||T.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=iY(t,z,O),le=$C({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:_,focusVisible:F}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=vY({root:["root",t&&"disabled",n&&"focusVisible"]},OG,i);return n&&r&&(o.root+=` ${r}`),o})(le);return tW.jsxs(AG,$C({as:oe,className:kU(ce.root,a),ownerState:le,onBlur:Q,onClick:p,onContextMenu:U,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:W,onMouseLeave:G,onMouseUp:K,onDragLeave:Y,onTouchEnd:J,onTouchMove:Z,onTouchStart:X,ref:se,tabIndex:l?-1:_,type:R},ae,T,{children:[o,V?tW.jsx(TG,$C({ref:N,center:i},D)):null]}))}));function LG(e){return CU("MuiTypography",e)}EU("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const zG=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],FG=eG("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${mW(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>$C({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),jG={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},$G={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},HG=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiTypography"}),r=(e=>$G[e]||e)(n.color),i=yU($C({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=jG}=i,h=QC(i,zG),p=$C({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f}),m=s||(u?"p":f[d]||jG[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return vY({root:["root",o,"inherit"!==e.align&&`align${mW(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},LG,a)})(p);return tW.jsx(FG,$C({as:m,ref:t,ownerState:p,className:kU(g.root,a)},h))})),VG=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function BG(e){const t=[],n=[];return Array.from(e.querySelectorAll(VG)).forEach(((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function WG(){return!0}function UG(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=BG,isEnabled:a=WG,open:s}=e,l=US.useRef(!1),c=US.useRef(null),u=US.useRef(null),d=US.useRef(null),f=US.useRef(null),h=US.useRef(!1),p=US.useRef(null),m=iY(t.ref,p),g=US.useRef(null);US.useEffect((()=>{s&&p.current&&(h.current=!n)}),[n,s]),US.useEffect((()=>{if(!s||!p.current)return;const e=eY(p.current);return p.current.contains(e.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),h.current&&p.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}}),[s]),US.useEffect((()=>{if(!s||!p.current)return;const e=eY(p.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===p.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=p.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=o(p.current)),n.length>0){var i,s;const e=Boolean((null==(i=g.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=g.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,i,a,s,o]);const y=e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0};return tW.jsxs(US.Fragment,{children:[tW.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),US.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),tW.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}const YG=US.forwardRef((function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=US.useState(null),s=iY(US.isValidElement(n)?n.ref:null,t);if(JU((()=>{i||a(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,i]),JU((()=>{if(o&&!i)return nY(t,o),()=>{nY(t,null)}}),[t,o,i]),i){if(US.isValidElement(n)){const e={ref:s};return US.cloneElement(n,e)}return tW.jsx(US.Fragment,{children:n})}return tW.jsx(US.Fragment,{children:o?Lj.createPortal(n,o):o})}));function KG(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function GG(e){return parseInt(tY(e).getComputedStyle(e).paddingRight,10)||0}function XG(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&KG(e,i)}))}function JG(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function ZG(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=eY(e);return t.body===e?tY(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(eY(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${GG(r)+e}px`;const t=eY(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${GG(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=eY(r).body;else{const t=r.parentElement,n=tY(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const QG=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&KG(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);XG(t,e.mount,e.modalRef,r,!0);const i=JG(this.containers,(e=>e.container===t));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=JG(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=ZG(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=JG(this.containers,(t=>-1!==t.modals.indexOf(e))),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&KG(e.modalRef,t),XG(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&KG(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function eX(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=QG,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,f=US.useRef({}),h=US.useRef(null),p=US.useRef(null),m=iY(p,d),[g,y]=US.useState(!u),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const x=()=>(f.current.modalRef=p.current,f.current.mount=h.current,f.current),w=()=>{i.mount(x(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},k=rY((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||eY(h.current).body;i.add(x(),e),p.current&&w()})),S=US.useCallback((()=>i.isTopModal(x())),[i]),C=rY((e=>{h.current=e,e&&(u&&S()?w():p.current&&KG(p.current,b))})),E=US.useCallback((()=>{i.remove(x(),b)}),[b,i]);US.useEffect((()=>()=>{E()}),[E]),US.useEffect((()=>{u?k():v&&o||E()}),[u,E,v,o,k]);const M=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},_=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const n=mG(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=$C({},n,t);return $C({role:"presentation"},r,{onKeyDown:M(r),ref:m})},getBackdropProps:(e={})=>$C({"aria-hidden":!0},e,{onClick:_(e),open:u}),getTransitionProps:()=>({onEnter:QU((()=>{y(!1),a&&a()}),null==l?void 0:l.props.onEnter),onExited:QU((()=>{y(!0),s&&s(),o&&E()}),null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:C,isTopModal:S,exited:g,hasTransition:v}}const tX=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],nX={entering:{opacity:1},entered:{opacity:1}},rX=US.forwardRef((function(e,t){const n=kK(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:h,onExiting:p,style:m,timeout:g=r,TransitionComponent:y=n$}=e,v=QC(e,tX),b=US.useRef(null),x=iY(b,a.ref,t),w=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},k=w(d),S=w(((e,t)=>{lG(e);const r=cG({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)})),C=w(u),E=w(p),M=w((e=>{const t=cG({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)})),_=w(h);return tW.jsx(y,$C({appear:o,in:l,nodeRef:b,onEnter:S,onEntered:C,onEntering:k,onExit:M,onExited:_,onExiting:E,addEndListener:e=>{i&&i(b.current,e)},timeout:g},v,{children:(e,t)=>US.cloneElement(a,$C({style:$C({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},nX[e],m,a.props.style),ref:x},t))}))}));function iX(e){return CU("MuiBackdrop",e)}EU("MuiBackdrop",["root","invisible"]);const oX=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],aX=eG("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((({ownerState:e})=>$C({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),sX=US.forwardRef((function(e,t){var n,r,i;const o=SK({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:f,slotProps:h={},slots:p={},TransitionComponent:m=rX,transitionDuration:g}=o,y=QC(o,oX),v=$C({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e;return vY({root:["root",n&&"invisible"]},iX,t)})(v),x=null!=(n=h.root)?n:u.root;return tW.jsx(m,$C({in:f,timeout:g},y,{children:tW.jsx(aX,$C({"aria-hidden":!0},x,{as:null!=(r=null!=(i=p.root)?i:c.Root)?r:l,className:kU(b.root,s,null==x?void 0:x.className),ownerState:$C({},v,null==x?void 0:x.ownerState),classes:b,ref:t,children:a}))}))}));function lX(e){return CU("MuiButton",e)}const cX=EU("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),uX=US.createContext({}),dX=US.createContext(void 0),fX=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],hX=e=>$C({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),pX=eG(IG,{shouldForwardProp:e=>QK(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${mW(n.color)}`],t[`size${mW(n.size)}`],t[`${n.variant}Size${mW(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;const i="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],o="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return $C({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":$C({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:LY(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:LY(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:LY(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":$C({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${cX.focusVisible}`]:$C({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${cX.disabled}`]:$C({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${LY(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${cX.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${cX.disabled}`]:{boxShadow:"none"}})),mX=eG("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${mW(n.size)}`]]}})((({ownerState:e})=>$C({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},hX(e)))),gX=eG("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${mW(n.size)}`]]}})((({ownerState:e})=>$C({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},hX(e)))),yX=US.forwardRef((function(e,t){const n=US.useContext(uX),r=US.useContext(dX),i=SK({props:GU(n,e),name:"MuiButton"}),{children:o,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:h,fullWidth:p=!1,size:m="medium",startIcon:g,type:y,variant:v="text"}=i,b=QC(i,fX),x=$C({},i,{color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:p,size:m,type:y,variant:v}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e;return $C({},a,vY({root:["root",o,`${o}${mW(t)}`,`size${mW(i)}`,`${o}Size${mW(i)}`,`color${mW(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${mW(i)}`],endIcon:["icon","endIcon",`iconSize${mW(i)}`]},lX,a))})(x),k=g&&tW.jsx(mX,{className:w.startIcon,ownerState:x,children:g}),S=f&&tW.jsx(gX,{className:w.endIcon,ownerState:x,children:f}),C=r||"";return tW.jsxs(pX,$C({ownerState:x,className:kU(n.className,w.root,l,C),component:s,disabled:c,focusRipple:!d,focusVisibleClassName:kU(w.focusVisible,h),ref:t,type:y},b,{classes:w,children:[k,o,S]}))}));function vX(e){return CU("MuiModal",e)}EU("MuiModal",["root","hidden","backdrop"]);const bX=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],xX=eG("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((({theme:e,ownerState:t})=>$C({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),wX=eG(sX,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),kX=US.forwardRef((function(e,t){var n,r,i,o,a,s;const l=SK({name:"MuiModal",props:e}),{BackdropComponent:c=wX,BackdropProps:u,className:d,closeAfterTransition:f=!1,children:h,container:p,component:m,components:g={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:k=!1,disableScrollLock:S=!1,hideBackdrop:C=!1,keepMounted:E=!1,onBackdropClick:M,open:_,slotProps:D,slots:q}=l,R=QC(l,bX),T=$C({},l,{closeAfterTransition:f,disableAutoFocus:v,disableEnforceFocus:b,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:k,disableScrollLock:S,hideBackdrop:C,keepMounted:E}),{getRootProps:O,getBackdropProps:P,getTransitionProps:N,portalRef:A,isTopModal:I,exited:L,hasTransition:z}=eX($C({},T,{rootRef:t})),F=$C({},T,{exited:L}),j=(e=>{const{open:t,exited:n,classes:r}=e;return vY({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},vX,r)})(F),$={};if(void 0===h.props.tabIndex&&($.tabIndex="-1"),z){const{onEnter:e,onExited:t}=N();$.onEnter=e,$.onExited=t}const H=null!=(n=null!=(r=null==q?void 0:q.root)?r:g.Root)?n:xX,V=null!=(i=null!=(o=null==q?void 0:q.backdrop)?o:g.Backdrop)?i:c,B=null!=(a=null==D?void 0:D.root)?a:y.root,W=null!=(s=null==D?void 0:D.backdrop)?s:y.backdrop,U=vG({elementType:H,externalSlotProps:B,externalForwardedProps:R,getSlotProps:O,additionalProps:{ref:t,as:m},ownerState:F,className:kU(d,null==B?void 0:B.className,null==j?void 0:j.root,!F.open&&F.exited&&(null==j?void 0:j.hidden))}),Y=vG({elementType:V,externalSlotProps:W,additionalProps:u,getSlotProps:e=>P($C({},e,{onClick:t=>{M&&M(t),null!=e&&e.onClick&&e.onClick(t)}})),className:kU(null==W?void 0:W.className,null==u?void 0:u.className,null==j?void 0:j.backdrop),ownerState:F});return E||_||z&&!L?tW.jsx(YG,{ref:A,container:p,disablePortal:w,children:tW.jsxs(H,$C({},U,{children:[!C&&c?tW.jsx(V,$C({},Y)):null,tW.jsx(UG,{disableEnforceFocus:b,disableAutoFocus:v,disableRestoreFocus:k,isEnabled:I,open:_,children:US.cloneElement(h,$)})]}))}):null}));function SX(e){return CU("MuiDivider",e)}EU("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const CX=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],EX=eG("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>$C({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:LY(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>$C({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>$C({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>$C({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>$C({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),MX=eG("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>$C({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),_X=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:f="fullWidth"}=n,h=QC(n,CX),p=$C({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:f}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e;return vY({root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},SX,r)})(p);return tW.jsx(EX,$C({as:a,className:kU(m.root,o),role:u,ref:t,ownerState:p},h,{children:i?tW.jsx(MX,{className:m.wrapper,ownerState:p,children:i}):null}))}));_X.muiSkipListHighlight=!0;const DX=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function qX(e){return`scale(${e}, ${e**2})`}const RX={entering:{opacity:1,transform:qX(1)},entered:{opacity:1,transform:"none"}},TX="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),OX=US.forwardRef((function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:f,style:h,timeout:p="auto",TransitionComponent:m=n$}=e,g=QC(e,DX),y=lY(),v=US.useRef(),b=kK(),x=US.useRef(null),w=iY(x,i.ref,t),k=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},S=k(c),C=k(((e,t)=>{lG(e);const{duration:n,delay:r,easing:i}=cG({style:h,timeout:p,easing:o},{mode:"enter"});let a;"auto"===p?(a=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=a):a=n,e.style.transition=[b.transitions.create("opacity",{duration:a,delay:r}),b.transitions.create("transform",{duration:TX?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)})),E=k(l),M=k(f),_=k((e=>{const{duration:t,delay:n,easing:r}=cG({style:h,timeout:p,easing:o},{mode:"exit"});let i;"auto"===p?(i=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[b.transitions.create("opacity",{duration:i,delay:n}),b.transitions.create("transform",{duration:TX?i:.666*i,delay:TX?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=qX(.75),u&&u(e)})),D=k(d);return tW.jsx(m,$C({appear:r,in:a,nodeRef:x,onEnter:C,onEntered:E,onEntering:S,onExit:_,onExited:D,onExiting:M,addEndListener:e=>{"auto"===p&&y.start(v.current||0,e),n&&n(x.current,e)},timeout:"auto"===p?null:p},g,{children:(e,t)=>US.cloneElement(i,$C({style:$C({opacity:0,transform:qX(.75),visibility:"exited"!==e||a?void 0:"hidden"},RX[e],h,i.props.style),ref:w},t))}))}));OX.muiSupportAuto=!0;const PX=US.createContext({});function NX(e){return CU("MuiList",e)}EU("MuiList",["root","padding","dense","subheader"]);const AX=["children","className","component","dense","disablePadding","subheader"],IX=eG("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((({ownerState:e})=>$C({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),LX=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=QC(n,AX),u=US.useMemo((()=>({dense:a})),[a]),d=$C({},n,{component:o,dense:a,disablePadding:s}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return vY({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},NX,t)})(d);return tW.jsx(PX.Provider,{value:u,children:tW.jsxs(IX,$C({as:o,className:kU(f.root,i),ref:t,ownerState:d},c,{children:[l,r]}))})}));function zX(e){return CU("MuiListItemButton",e)}const FX=EU("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),jX=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],$X=eG(IG,{shouldForwardProp:e=>QK(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>$C({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${FX.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:LY(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${FX.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:LY(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${FX.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:LY(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:LY(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${FX.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${FX.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),HX=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:f}=n,h=QC(n,jX),p=US.useContext(PX),m=US.useMemo((()=>({dense:s||p.dense||!1,alignItems:r,disableGutters:l})),[r,p.dense,s,l]),g=US.useRef(null);JU((()=>{i&&g.current&&g.current.focus()}),[i]);const y=$C({},n,{alignItems:r,dense:m.dense,disableGutters:l,divider:c,selected:d}),v=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e;return $C({},n,vY({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},zX,n))})(y),b=iY(g,t);return tW.jsx(PX.Provider,{value:m,children:tW.jsx($X,$C({ref:b,href:h.href||h.to,component:(h.href||h.to)&&"div"===o?"button":o,focusVisibleClassName:kU(v.focusVisible,u),ownerState:y,className:kU(v.root,f)},h,{classes:v,children:a}))})}));function VX(e){return CU("MuiListItemIcon",e)}EU("MuiListItemIcon",["root","alignItemsFlexStart"]);const BX=["className"],WX=eG("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>$C({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),UX=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=QC(n,BX),o=$C({},n,{alignItems:US.useContext(PX).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return vY({root:["root","flex-start"===t&&"alignItemsFlexStart"]},VX,n)})(o);return tW.jsx(WX,$C({className:kU(a.root,r),ownerState:o,ref:t},i))}));function YX(e){return CU("MuiListItemText",e)}const KX=EU("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),GX=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],XX=eG("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${KX.primary}`]:t.primary},{[`& .${KX.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((({ownerState:e})=>$C({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}))),JX=US.forwardRef((function(e,t){const n=SK({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:u}=n,d=QC(n,GX),{dense:f}=US.useContext(PX);let h=null!=s?s:r,p=c;const m=$C({},n,{disableTypography:o,inset:a,primary:!!h,secondary:!!p,dense:f}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return vY({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},YX,t)})(m);return null==h||h.type===HG||o||(h=tW.jsx(HG,$C({variant:f?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:h}))),null==p||p.type===HG||o||(p=tW.jsx(HG,$C({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},u,{children:p}))),tW.jsxs(XX,$C({className:kU(g.root,i),ownerState:m,ref:t},d,{children:[h,p]}))}));function ZX(e){return CU("MuiPopover",e)}EU("MuiPopover",["root","paper"]);const QX=["onEntering"],eJ=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],tJ=["slotProps"];function nJ(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function rJ(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function iJ(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function oJ(e){return"function"==typeof e?e():e}const aJ=eG(kX,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sJ=eG(hG,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),lJ=US.forwardRef((function(e,t){var n,r,i;const o=SK({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:d,className:f,container:h,elevation:p=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:v,slotProps:b,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:w=OX,transitionDuration:k="auto",TransitionProps:{onEntering:S}={},disableScrollLock:C=!1}=o,E=QC(o.TransitionProps,QX),M=QC(o,eJ),_=null!=(n=null==b?void 0:b.paper)?n:y,D=US.useRef(),q=iY(D,_.ref),R=$C({},o,{anchorOrigin:l,anchorReference:u,elevation:p,marginThreshold:m,externalPaperSlotProps:_,transformOrigin:x,TransitionComponent:w,transitionDuration:k,TransitionProps:E}),T=(e=>{const{classes:t}=e;return vY({root:["root"],paper:["paper"]},ZX,t)})(R),O=US.useCallback((()=>{if("anchorPosition"===u)return c;const e=oJ(s),t=(e&&1===e.nodeType?e:eY(D.current).body).getBoundingClientRect();return{top:t.top+nJ(t,l.vertical),left:t.left+rJ(t,l.horizontal)}}),[s,l.horizontal,l.vertical,c,u]),P=US.useCallback((e=>({vertical:nJ(e,x.vertical),horizontal:rJ(e,x.horizontal)})),[x.horizontal,x.vertical]),N=US.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=P(t);if("none"===u)return{top:null,left:null,transformOrigin:iJ(n)};const r=O();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=tY(oJ(s)),d=c.innerHeight-m,f=c.innerWidth-m;if(null!==m&&i<m){const e=i-m;i-=e,n.vertical+=e}else if(null!==m&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==m&&o<m){const e=o-m;o-=e,n.horizontal+=e}else if(l>f){const e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:iJ(n)}}),[s,u,O,P,m]),[A,I]=US.useState(g),L=US.useCallback((()=>{const e=D.current;if(!e)return;const t=N(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,I(!0)}),[N]);US.useEffect((()=>(C&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L))),[s,C,L]);US.useEffect((()=>{g&&L()})),US.useImperativeHandle(a,(()=>g?{updatePosition:()=>{L()}}:null),[g,L]),US.useEffect((()=>{if(!g)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}((()=>{L()})),t=tY(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[s,g,L]);let z=k;"auto"!==k||w.muiSupportAuto||(z=void 0);const F=h||(s?eY(oJ(s)).body:void 0),j=null!=(r=null==v?void 0:v.root)?r:aJ,$=null!=(i=null==v?void 0:v.paper)?i:sJ,H=vG({elementType:$,externalSlotProps:$C({},_,{style:A?_.style:$C({},_.style,{opacity:0})}),additionalProps:{elevation:p,ref:q},ownerState:R,className:kU(T.paper,null==_?void 0:_.className)}),V=vG({elementType:j,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:M,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:F,open:g},ownerState:R,className:kU(T.root,f)}),{slotProps:B}=V,W=QC(V,tJ);return tW.jsx(j,$C({},W,!pG(j)&&{slotProps:B,disableScrollLock:C},{children:tW.jsx(w,$C({appear:!0,in:g,onEntering:(e,t)=>{S&&S(e,t),L()},onExited:()=>{I(!1)},timeout:z},E,{children:tW.jsx($,$C({},H,{children:d}))}))}))}));function cJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uJ(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function dJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fJ(){return fJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fJ.apply(null,arguments)}function hJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hJ(Object(n),!0).forEach((function(t){dJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mJ(){mJ=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new q(r||[]);return i(a,"_invoke",{value:E(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="executing",p="completed",m={};function g(){}function y(){}function v(){}var b={};c(b,a,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(R([])));w&&w!==n&&r.call(w,a)&&(b=w);var k=v.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function E(t,n,r){var i=f;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=M(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?p:"suspendedYield",c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=p,r.method="throw",r.arg=c.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=v,i(k,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(C.prototype),c(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function gJ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||bJ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yJ(e){return function(e){if(Array.isArray(e))return cJ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||bJ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vJ(e){return vJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vJ(e)}function bJ(e,t){if(e){if("string"==typeof e)return cJ(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cJ(e,t):void 0}}var xJ=function(e){var t=e.className,n=e.title,r=e.path,i=e.fillRule;return YS.createElement(sG,{className:t,viewBox:"0 0 16 16",fontSize:"small",role:"img",style:{height:12,width:12}},YS.createElement("path",{d:r}),n?YS.createElement("title",null,n):void 0,i?YS.createElement("use",{fillRule:i}):void 0)},wJ={STYLE:{ELLIPSIS:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},FOCUS:{boxShadow:"inset 0 0 0 2px #177FE6"},ICONS:{COLOR:{PRIMARY:"rgba(89, 89, 89)",SECONDARY:"rgba(89, 89, 89, 0.8)",DISABLED:"rgba(89, 89, 89, 0.4)"}}}},kJ={L:new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),R:new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),AL:new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]")},SJ=function(e){return kJ.R.test(e)||kJ.AL.test(e)};function CJ(e){for(var t,n,r=e?e.length:0,i=0;i<r;i++){if(n=t=e[i],kJ.L.test(n))return"ltr";if(SJ(t))return"rtl"}return"ltr"}var EJ,MJ,_J=eG(yX,{shouldForwardProp:function(e){return"direction"!==e&&"padding"!==e&&"styling"!==e}})((function(e){var t=e.direction,n=e.padding,r=e.styling,i=r.fontSize,o=r.fontFamily,a=r.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:i,fontFamily:o,color:a,height:"100%",minWidth:"0px",maxWidth:"640px",padding:n,"&:disabled":{color:a,opacity:1},"& .MuiButton-startIcon":{margin:"ltr"===t?"0 2px":void 0},"& .MuiButton-endIcon":{margin:"rtl"===t?"0 2px":void 0}}})),DJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z",fillRule:"evenodd"})}))((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px"}})),qJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})}))((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:wJ.STYLE.ICONS.COLOR.DISABLED,opacity:.6}}})),RJ=function(e){var t=e.isOpen,n=e.onClick,r=e.popoverId,i=e.source,o=i.styling,a=i.info.text,s=i.layout.direction,l=i.meta,c=l.allowed,u=l.hasAlternatives,d=l.hasCyclic,f=l.hasMultiple,h=l.isCyclic,p=l.isLocked,m=i.resources.translator,g=i.services.focus,y=i.settings.isDisabled,v=i.state.inSelections,b=!(!c.change||!u),x=!(!c.reload||!h),w=(b||x)&&!v&&!y(),k={pointerEvents:w?"auto":"none"},S=function(e){var t=e.allowed,n=e.canChange,r=e.canReload,i=e.direction,o=e.hasCyclic,a=e.isLocked,s={top:"8px",right:"6px",bottom:"8px",left:"6px"};if(!e.hasMultiple)return"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left);var l=o&&t.reload;return"ltr"===i&&(a?s.left="0px":r||!n&&l?s.left="4px":n||(s.left="2px"),n||r||(s.right="0px")),"rtl"===i&&(a?s.right="0px":r||!n&&l?s.right="4px":n||(s.right="2px"),n||r||(s.left="0px")),"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left)}({allowed:c,canChange:b,canReload:x,direction:s,hasCyclic:d,hasMultiple:f,isLocked:p}),C=dJ(dJ({},"rtl"===s?"endIcon":"startIcon",p&&YS.createElement(DJ,{height:12})),"rtl"===s?"startIcon":"endIcon",(b||x)&&YS.createElement(qJ,{className:"".concat(v||y()?"disabled":"")})),E=US.useRef(),M=US.useRef();US.useEffect((function(){t||g.get()&&(E.current.focus(),M.current.focusVisible(),g.set(!1))}));var _=CJ(a),D="Accessibility.".concat(w?"Alternative":"Normal",".Instructions");return YS.createElement(_J,fJ({action:M,"aria-describedby":r,"aria-label":m.get(D),color:"inherit",direction:s,disabled:!w||y()||v,onClick:function(e){w&&n(e)},padding:S,ref:E,style:k,styling:o.title,title:a},C),YS.createElement("span",{dir:_,style:wJ.STYLE.ELLIPSIS},a))},TJ=function(e){var t=e.className,n=e.title;return YS.createElement(xJ,{className:t,title:n,path:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"})},OJ=eG(yX,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e&&"styling"!==e}})((function(e){var t=e.direction,n=e.isFirst,r=e.isLast,i=e.styling.color;return{fontWeight:"normal",lineHeight:"normal",color:i,height:"24px",width:"24px",padding:0,marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px","&:disabled":{color:i,opacity:1}}})),PJ=eG(TJ,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})((function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:wJ.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}})),NJ=eG((function(e){var t=e.className,n=e.title;return YS.createElement(xJ,{className:t,title:n,path:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"})}),{})((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY,"&.disabled":{color:wJ.STYLE.ICONS.COLOR.DISABLED}}})),AJ=function(e){var t=e.source;if(!t.meta.isCyclic)return null;var n=gJ(US.useState(!1),2),r=n[0],i=n[1],o=t.styling,a=t.action.stepCycle,s=t.info,l=s.position,c=s.tooltip,u=t.layout.direction,d=t.meta,f=d.allowed,h=d.isFirst,p=d.isLast,m=t.settings.isDisabled,g=t.state.inSelections;return US.useEffect((function(){r&&i(!1)}),[l]),f.reload?YS.createElement(OJ,{direction:u,disabled:r||g||m(),isFirst:h,isLast:p,onClick:function(){return i(!0),void a()},styling:o.title,title:c,variant:"outlined"},YS.createElement(NJ,{className:"".concat(r||g||m()?"disabled":"")})):YS.createElement(PJ,{direction:u,isFirst:h,isLast:p,style:{flexShrink:0},title:c})},IJ=function(e){var t=e.className,n=e.title;return YS.createElement(xJ,{className:t,title:n,path:"M7 4h9v1H7V4ZM9 8h7v1H9V8ZM11 12h5v1h-5v-1ZM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4h1Z"})},LJ=eG(yX,{shouldForwardProp:function(e){return"styling"!==e}})((function(e){var t=e.styling,n=t.fontSize,r=t.fontFamily,i=t.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:n,fontFamily:r,color:i,padding:"0px 5px",height:"100%",minWidth:"45px","&:disabled":{color:i}}})),zJ={color:wJ.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:wJ.STYLE.ICONS.COLOR.DISABLED}},FJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})}))((function(){return zJ})),jJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}))((function(){return zJ})),$J=eG(IJ,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})((function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:wJ.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}})),HJ=function(e){var t=e.source;if(!t.meta.isDrillDown)return null;var n=t.styling,r=t.action.drillUp,i=t.info,o=i.breadcrumbs,a=i.tooltip,s=t.layout.direction,l=t.meta,c=l.isFirst,u=l.isLast,d=t.settings.isDisabled,f=t.state.inSelections,h=d()||f?"disabled":null,p=dJ({},"rtl"===s?"startIcon":"endIcon","rtl"===s?YS.createElement(jJ,{className:h}):YS.createElement(FJ,{className:h})),m=o.map((function(e,t){var i=CJ(e);return YS.createElement(LJ,fJ({disabled:d()||f,key:"breadcrumb-".concat(e),onClick:function(){return function(e){r({steps:o.length-e})}(t)},styling:n.title,title:e},p),YS.createElement("span",{dir:i,style:wJ.STYLE.ELLIPSIS},e))}));return YS.createElement(YS.Fragment,null,"rtl"===s?m.reverse():void 0,YS.createElement($J,{direction:s,isFirst:c,isLast:u,style:{flexShrink:0},title:a}),"rtl"===s?void 0:m)},VJ=eG(HX,{shouldForwardProp:function(e){return"nested"!==e&&"rtl"!==e}})((function(e){var t=e.nested,n=e.rtl;return{padding:"4px ".concat(t&&n?"32px":"16px"," 4px ").concat(t&&!n?"32px":"16px"),"&:focus":pJ({},wJ.STYLE.FOCUS)}})),BJ=eG(UX)((function(){return{marginRight:0,justifyContent:"center"}})),WJ=eG((function(e){var t=e.className;return YS.createElement(xJ,{className:t,path:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"})}))((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY}})),UJ=eG(TJ)((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY}})),YJ=eG(IJ)((function(){return{color:wJ.STYLE.ICONS.COLOR.SECONDARY,fontWeight:600}})),KJ=function(e){var t=e.id,n=e.meta,r=e.nested,i=e.onClick,o=e.selected,a=e.source,s=e.text,l=a.styling,c=a.settings.isRTL,u=pJ({fontWeight:!n||n.isNormal?"normal":600,lineHeight:"normal",fontSize:l.popover.fontSize,fontFamily:l.popover.fontFamily,color:l.popover.color,textAlign:c?"end":"start"},wJ.STYLE.ELLIPSIS),d=CJ(s),f=YS.createElement(BJ,{sx:c?{paddingRight:"12px"}:{paddingLeft:"12px"}},function(e){var t=e.meta;return e.selected?YS.createElement(WJ,{height:12}):null!=t&&t.isCyclic?YS.createElement(UJ,{height:12}):null!=t&&t.isDrillDown?YS.createElement(YJ,{height:12}):void 0}({meta:n,selected:o}));return YS.createElement(YS.Fragment,{key:t},YS.createElement(VJ,{autoFocus:o,nested:r,onClick:function(e){return null==i?void 0:i(e)},rtl:c,title:s},c&&f,YS.createElement(JX,{dir:d,primaryTypographyProps:{style:u}},s),!c&&f))},GJ=eG(_X)((function(){return{marginTop:"-1px"}})),XJ=function(e){var t=e.anchor,n=e.id,r=e.onClose,i=e.open,o=e.source,a=o.action,s=a.changeTo,l=a.drillUp,c=a.setActiveField,u=o.info,d=u.breadcrumbs,f=u.group,h=u.id,p=u.text,m=o.data.alternatives,g=o.meta,y=g.isCyclic,v=g.isDrillDown,b=o.resources.translator,x=o.services.focus,w=y||v,k=YS.createElement(KJ,{id:h,key:h,meta:o.meta,onClick:r,selected:!w,source:o,text:w?f.name:p}),S=w&&f.items.map((function(e){return YS.createElement(KJ,{id:e.id,nested:!0,onClick:function(t){return function(e,t){y&&c({fieldIndex:t.index}),v&&l({steps:d.length-t.index}),r()}(0,e)},selected:e.current,source:o,text:e.text})})),C=m.map((function(e,t){return YS.createElement(YS.Fragment,{key:e.id},YS.createElement(KJ,{id:e.id,key:e.id,meta:e.meta,onClick:function(t){return n=t,r=e.id,"keydown"===n.type&&x.set(!0),void s({id:r});var n,r},source:o,text:e.text}),t<m.length-1&&YS.createElement(GJ,{key:"divider-".concat(e.id)}))}));return YS.createElement(lJ,{anchorEl:t,anchorOrigin:{vertical:"top",horizontal:"center"},id:n,onClose:r,open:i,slotProps:{paper:{style:{minWidth:"250px",maxWidth:"640px",maxHeight:"300px"}}},transformOrigin:{vertical:"bottom",horizontal:"center"}},YS.createElement(LX,{"aria-label":b.get("Accessibility.Popover.Instructions"),dense:!0},k,S,YS.createElement(GJ,{key:"divider-".concat(h)}),C))},JJ=function(e){var t=e.source,n=gJ(US.useState(null),2),r=n[0],i=n[1],o={id:r?"alternatives-popover":void 0,isOpen:Boolean(r)},a=t.layout.direction,s=t.services.focus,l=YS.createElement(AJ,{source:t}),c=YS.createElement(HJ,{source:t});return YS.createElement(YS.Fragment,null,"rtl"===a?void 0:c,"rtl"===a?void 0:l,YS.createElement(RJ,{onClick:function(e){var t=e.currentTarget;t.classList.contains("qcm-focus-visible")&&s.set(!0),i(t)},isOpen:o.isOpen,popoverId:o.id,source:t}),YS.createElement(XJ,{anchor:r,id:o.id,onClose:function(){i(null)},open:o.isOpen,source:t}),"rtl"===a?c:void 0,"rtl"===a?l:void 0)};var ZJ=function(){if(MJ)return EJ;MJ=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return EJ=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},EJ}(),QJ=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(ZJ);function eZ(e){var t=e.model,n=e.properties;return t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()}function tZ(e){return Array.isArray(e)}function nZ(e){return null!=e&&!Array.isArray(e)&&"object"===vJ(e)}function rZ(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function iZ(e){return void 0===e}function oZ(e,t){if(nZ(e)&&nZ(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=Object.keys(e),r=0,i=n.length;r<i;r+=1)if(!oZ(e[n[r]],t[n[r]]))return!1;return!0}if(tZ(e)&&tZ(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o+=1)if(!oZ(e[o],t[o]))return!1;return!0}return e===t}function aZ(e){var t=e.oldData,n=void 0===t?{}:t,r=e.newData,i=void 0===r?{}:r,o=e.basePath,a=void 0===o?"":o,s=[];return Object.keys(i).forEach((function(e){var t=function(e){return e?QJ(!0,{},{value:e}).value:e}(i[e]),r=n[e],o="".concat(a,"/").concat(e);oZ(t,r)||rZ(i,e)||(iZ(r)?s.push({op:"add",path:o,value:t}):nZ(t)&&nZ(r)?s.push.apply(s,yJ(aZ({oldData:r,newData:t,basePath:o}))):tZ(t)&&tZ(r)?s.push.apply(s,yJ(function(e){var t=e.newArray,n=e.basePath,r=[];return oZ(t,e.oldArray.slice())||(!iZ(t[0])&&iZ(t[0].qInfo)||0===t.length)&&r.push({op:"replace",path:n,value:t}),r}({oldArray:r,newArray:t,basePath:o}))):s.push({op:"replace",path:o,value:t}))})),Object.keys(n).forEach((function(e){iZ(i[e])&&!rZ(n,e)&&s.push({op:"remove",path:"".concat(a,"/").concat(e)})})),s}function sZ(e){var t=e.model,n=aZ({oldData:e.oldProperties,newData:e.newProperties});null!=t&&t.applyPatches&&null!=n&&n.length&&t.applyPatches(n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),!0)}function lZ(e){return cZ.apply(this,arguments)}function cZ(){return(cZ=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){uJ(o,r,i,a,s,"next",e)}function s(e){uJ(o,r,i,a,s,"throw",e)}a(void 0)}))}}(mJ().mark((function e(t){var n,r,i,o,a,s,l,c,u,d,f,h;return mJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.from,r=t.to,i=t.model,o=t.container,a=t.skipAttributeExpressions,s=t.onChange,e.next=3,i.getEffectiveProperties();case 3:return l=e.sent,c=l.qHyperCubeDef[o].findIndex((function(e){return e.qDef.cId===n})),u=l.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o].findIndex((function(e){return e.qDef.cId===r})),d=QJ(!0,{},l),f=d.qHyperCubeDef[o][c],(h=d.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][u]).qAttributeDimensions=f.qAttributeDimensions,f.qAttributeDimensions=[],a||(h.qAttributeExpressions=f.qAttributeExpressions,f.qAttributeExpressions=[]),d.qHyperCubeDef[o][c]=h,d.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][u]=f,s({fromItem:f,toItem:h,oldProperties:l,newProperties:d,model:i}),e.next=17,eZ({model:i,properties:d});case 17:i.colorSupport&&i.colorSupport.colorByUpdater(d,"qHyperCubeDef."),sZ({model:i,oldProperties:l,newProperties:d});case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function uZ(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=r.app,l=r.model,c=r.translator,u=i.skipAttributeExpressions;return a.map((function(e,t){var n=e.cId,r=e.qGrouping,i=e.qGroupFallbackTitles,a=e.qGroupPos,d=e.qFallbackTitle,f=e.qLocked,h=e.title,p="C"===r,m="H"===r,g="N"===r,y="number"==typeof e.explicitColumn?e.explicitColumn:t,v=function(t,n){p&&s&&s.getDimension&&s.getDimension(e.qLibraryId).then((function(e){null==e||e[t](n)})).catch((function(){}))};return{meta:{isCyclic:p,isDrillDown:m,isLocked:!!f,isNormal:g},info:{id:n,text:g?d:i[a],position:a,breadcrumbs:i.slice(0,e.qGroupPos),group:{name:h,items:i.slice(0,m?e.qGroupPos+1:i.length).map((function(e,t){return{id:"".concat(n,"-item-").concat(t),text:e,current:a===t,index:t}}))},tooltip:g?void 0:c.get(p?"Tooltip.dimensions.cyclic":"Tooltip.dimensions.drilldown")},action:{changeTo:function(e){var t=e.id;return lZ({from:n,to:t,container:"qDimensions",model:l,skipAttributeExpressions:u,onChange:o})},drillUp:function(e){var t=e.steps;m&&l&&(null==l||l.drillUp("/qHyperCubeDef",y,t))},stepCycle:function(){return v("stepCycle",1)},setActiveField:function(e){var t=e.fieldIndex;return v("setActiveField",t)}}}}))}function dZ(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=r.model,l=i.skipAttributeExpressions;return a.map((function(e){var t=e.cId,n=e.qFallbackTitle;return{meta:{isNormal:!0},info:{id:t,text:n},action:{changeTo:function(e){var n=e.id;return lZ({from:t,to:n,container:"qMeasures",model:s,skipAttributeExpressions:l,onChange:o})}}}}))}function fZ(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.rect,a=e.resources,s=e.settings,l=e.state,c=e.styling,u=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"!==t&&"right"!==t||(r.width="".concat(n.height,"px"),r.height="".concat(n.width,"px"),r.transformOrigin="top left"),"left"===t&&(r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)")),"right"===t&&(r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)")),r}({dock:r,rect:o}),d=function(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.resources,a=e.settings,s=e.state,l=e.styling,c=n.alternatives,u=n.infos,d=o.app,f=o.cache,h=o.model,p=a.forceAllowChange,m=a.isRTL,g=a.isSnapshot,y=a.type,v=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:r,isRTL:m}),b=function(e){var t=e.cache,n="axis-title-auto-focus_"+e.key;return{get:function(){var e;return(null==t||null===(e=t.get)||void 0===e?void 0:e.call(t,n))||!1},set:function(e){var r;return null==t||null===(r=t.set)||void 0===r?void 0:r.call(t,n,e)}}}({cache:f,key:i}),x=("dimension"===y?uZ:dZ)({callbacks:t,data:n,resources:o,settings:a});"rtl"===v&&x.reverse();var w={allowed:{change:(!(!h.modifiers||!h.colorSupport)||p)&&!g,reload:!!d&&!g},hasAlternatives:!!c.length,hasCyclic:x.some((function(e){return e.meta.isCyclic})),hasMultiple:u.length>1};return x.map((function(e,t){return pJ(pJ({data:n,layout:{direction:v},resources:{translator:o.translator},services:{focus:b},settings:a,state:s,styling:l},e),{},{meta:pJ(pJ(pJ({},w),e.meta),{},{isFirst:0===t,isLast:t===x.length-1})})}))}({callbacks:t,data:n,dock:r,key:i,resources:a,settings:s,state:l,styling:c});return YS.createElement("div",{style:u},d.map((function(e){return YS.createElement(YS.Fragment,{key:e.info.id},YS.createElement(JJ,{source:e}),!e.meta.isLast&&YS.createElement("span",{dir:e.layout.direction,style:pJ(pJ({},c.title),{},{lineHeight:"normal"})},", "))})))}var hZ,pZ='"Source Sans Pro", "Arial", "sans-serif"',mZ="12px",gZ=function(e){var t=e.rect,n=e.state,r=e.settings,i=r.callbacks,o=r.data,a=r.key,s=r.layout,l=r.resources,c=r.settings,u=r.style;return fZ({callbacks:i,data:o,dock:s.dock,key:a,rect:t,resources:l,settings:c,state:n,styling:u})},yZ={renderer:"react",require:["renderer"],disableTriggers:!0,key:"axis-title",defaultSettings:{callbacks:{onChange:function(){}},data:{alternatives:[],infos:[]},resources:{app:void 0,cache:void 0,model:void 0,selections:void 0,translator:void 0},settings:{forceAllowChange:!1,isDisabled:function(){return!1},isRTL:!1,isSnapshot:!1,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:"#333",fontFamily:pZ,fontSize:mZ},popover:{color:"#595959CC",fontFamily:pZ,fontSize:mZ}}},preferredSize:function(){var e=this.settings,t=e.data,n=e.settings,r=e.style,i=t.alternatives,o=n.type,a=r.title,s=a.fontSize,l=a.fontFamily,c=i.length||"measure"!==o?28:20,u=this.registries.renderer("svg")().measureText({text:"M",fontSize:s,fontFamily:l}).height;return Math.max(c,u)},created:function(){var e=this;this.state={inSelections:!1},this.listeners={onSelectionsActivated:function(){e.state.inSelections=!0,e.renderer.render(gZ(e))},onSelectionsDeactivated:function(){e.state.inSelections=!1}}},beforeMount:function(){var e=this.settings.resources.selections;e&&(e.addListener("activated",this.listeners.onSelectionsActivated),e.addListener("deactivated",this.listeners.onSelectionsDeactivated),e.addListener("canceled",this.listeners.onSelectionsDeactivated))},render:function(){return gZ(this)},beforeUnmount:function(){var e=this.settings.resources.selections;e&&(e.removeListener("activated",this.listeners.onSelectionsActivated),e.removeListener("deactivated",this.listeners.onSelectionsDeactivated),e.removeListener("canceled",this.listeners.onSelectionsDeactivated))}},vZ=function(e){var t=e.dock,n=e.settings.label,r="center"===t,i=r?{}:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};return YS.createElement("span",{style:i,title:n},r?n:"* ".concat(n))},bZ={renderer:"react",disableTriggers:!0,key:"disclaimer",defaultSettings:{settings:{isRTL:!1,label:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'}},preferredSize:function(){return 22},render:function(){var e=this.rect,t=this.settings,n=t.layout,r=t.settings,i=t.style;return function(e){var t=e.dock,n=e.rect,r=e.settings,i=e.styling,o=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:t,isRTL:r.isRTL}),a=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.styling.fontFamily};return"left"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)"),r.transformOrigin="top left"),"right"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)"),r.transformOrigin="top left"),"center"===t&&(r.width="".concat(n.width,"px"),r.height="".concat(n.height,"px"),r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center"),"bottom"!==t&&"top"!==t||(r.justifyContent="flex-start",r.alignItems="flex-start"),r}({dock:t,rect:n,styling:i});return YS.createElement("div",{dir:o,style:a},YS.createElement(vZ,{dock:t,settings:r}))}({dock:n.dock,rect:e,settings:r,styling:i})}},xZ={},wZ=function(){if(hZ)return xZ;hZ=1;var e=zj;return xZ.createRoot=e.createRoot,xZ.hydrateRoot=e.hydrateRoot,xZ}(),kZ=xK({spacing:8,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)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:14,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,htmlFontSize:14,fontFamily:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif",button:{fontWeight:600,fontSize:14,textTransform:"none"}},shape:{borderRadius:3},components:{MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"qcm-focus-visible"}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"qcm-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:141,borderRadius:3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transform:"translate3d(0,0,0)"},text:{padding:"8px 16px","&:active":{backgroundColor:"rgba(0, 0, 0, 0.1)"},"&.Mui-focusVisible":{boxShadow:"inset 0 0 0 2px ".concat("#177FE6")}},outlined:{border:"1px solid rgba(0, 0, 0, 0.15)"},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"}},variants:[]},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:14,height:"32px"}}},MuiListItemIcon:{styleOverrides:{root:{color:"#404040",minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:14,color:"#404040",lineHeight:"16px",fontWeight:600},secondary:{fontSize:12,color:"#737373",fontWeight:400,lineHeight:"16px"}}}}});function SZ(e){var t={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}},n=e||{},r=n.x,i=n.y,o=n.width,a=n.height,s=n.scaleRatio,l=n.margin;return t.x=Number.isNaN(r)||void 0===r?t.x:r,t.y=Number.isNaN(i)||void 0===i?t.y:i,t.width=Number.isNaN(o)||void 0===o?t.width:o,t.height=Number.isNaN(a)||void 0===a?t.height:a,void 0!==s&&(t.scaleRatio.x=Number.isNaN(s.x)?t.scaleRatio.x:s.x,t.scaleRatio.y=Number.isNaN(s.y)?t.scaleRatio.y:s.y),void 0!==l&&(t.margin.left=Number.isNaN(l.left)?0:l.left,t.margin.top=Number.isNaN(l.top)?0:l.top),t}function CZ(){var e={rendererBox:SZ(),container:void 0,root:void 0},t=function(){var t,n;null===(t=e.root)||void 0===t||t.unmount(),null===(n=e.container)||void 0===n||null===(n=n.parentElement)||void 0===n||n.removeChild(e.container),e.container=void 0};return{size:function(t){return t&&(e.rendererBox=SZ(t)),e.rendererBox},element:function(){return e.container},appendTo:function(t){return e.container||(e.container=document.createElement("div"),e.container.style.position="absolute",e.container.style["-webkit-font-smoothing"]="antialiased",e.container.style["-moz-osx-font-smoothing"]="antialiased",e.container.style.pointerEvents="none",e.root=wZ.createRoot(e.container)),t.appendChild(e.container),e.container},setKey:function(t){e.container&&e.container.setAttribute("data-key",t)},render:function(t){if(!e.container)return!1;var n=e.rendererBox,r=n.scaleRatio.x,i=n.scaleRatio.y;return e.container.style.left="".concat(Math.round(n.margin.left+n.x*r),"px"),e.container.style.top="".concat(Math.round(n.margin.top+n.y*i),"px"),e.container.style.width="".concat(Math.round(n.width),"px"),e.container.style.height="".concat(Math.round(n.height),"px"),e.container.style.transform="scale(".concat(r,", ").concat(i,")"),e.container.style.transformOrigin="top left",e.root.render(function(e){var t=e.nodes;return YS.createElement(YS.StrictMode,null,YS.createElement(nG,{theme:kZ},t))}({nodes:t})),!0},findShapes:function(){return[]},itemsAt:function(){return[]},clear:function(){t()},destroy:function(){t()}}}function EZ(e){return Ry(e).l<70}function MZ(e,t){const n=Ry(e).l/100,r=Ry(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function _Z(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var DZ={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const i=[];let o=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=o.attrs.fill,a=t.attrs.fill;if(MZ(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,o.desc.slice.innerRadius),s=Math.min(s,o.desc.slice.outerRadius),s>r){const t=_Z({r:s,a:e},n),o=_Z({r:r,a:e},n);i.push({type:"line",x1:t.x,y1:t.y,x2:o.x,y2:o.y,strokeWidth:1,opacity:.4,stroke:EZ(a)?"#ccc":"#333"})}}o=t}return i}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function qZ(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function RZ(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),i=Math.sin(t),o=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:qZ(s)}}var TZ={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,c=(i={r:t.offset,a:l},{x:(o=s).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),u=RZ({size:t.size,fill:t.fill,angle:l+Math.PI,...c});u.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(u)}}var i,o;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function OZ(){const e=vp();return e.use(ag),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",cg(e))};e.interaction("hammer",cg(Hammer))}(a)),e.use((function(e){e.renderer("react",xH()),e.component("data-title",yH(e.renderer("svg")()))})),e.renderer("react-qcm",CZ),e.component("axis-title",yZ),e.component("disclaimer",bZ),e.component("pie-dividers",DZ),e.component("negative-indicators",TZ),e}var PZ={};function NZ(){NZ.init.call(this)}PZ.isObject=function(e){return"object"==typeof e&&null!==e},PZ.isNumber=function(e){return"number"==typeof e},PZ.isUndefined=function(e){return void 0===e},PZ.isFunction=function(e){return"function"==typeof e};var AZ=NZ;NZ.EventEmitter=NZ,NZ.prototype._events=void 0,NZ.prototype._maxListeners=void 0,NZ.defaultMaxListeners=10,NZ.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},NZ.prototype.setMaxListeners=function(e){if(!PZ.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},NZ.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],PZ.isUndefined(n))return!1;if(PZ.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(PZ.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},NZ.prototype.addListener=function(e,t){var n;if(!PZ.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,PZ.isFunction(t.listener)?t.listener:t),this._events[e]?PZ.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,PZ.isObject(this._events[e])&&!this._events[e].warned)&&((n=PZ.isUndefined(this._maxListeners)?NZ.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,PZ.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),PZ.isFunction(console.trace)&&console.trace()));return this},NZ.prototype.on=NZ.prototype.addListener,NZ.prototype.once=function(e,t){if(!PZ.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},NZ.prototype.removeListener=function(e,t){var n,r,i,o;if(!PZ.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||PZ.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(PZ.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},NZ.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],PZ.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},NZ.prototype.listeners=function(e){return this._events&&this._events[e]?PZ.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},NZ.listenerCount=function(e,t){return e._events&&e._events[t]?PZ.isFunction(e._events[t])?1:e._events[t].length:0};var IZ=r(AZ);function LZ(){const e={};var t;return t=e,Object.keys(IZ.prototype).forEach((e=>{t[e]=IZ.prototype[e]})),IZ.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function zZ({picasso:t}){var n;const r=e.useOptions(),i=e.useElement(),o=e.useSelections(),[a,s]=e.useState(),l=LZ(),c=e.useLayout(),u=e.useTranslator(),d=!(null===(n=c.qSelectionInfo)||void 0===n||!n.qInSelections),[f,h]=e.useState(!1);return l.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:i}){var o;return{active:n,label:i.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[0])||void 0===o||!o.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:c,isInSelections:d,isLassoActionActive:f,setIsLassoActionActive:h,translator:u}),e.useAction((()=>(a&&(a.interactions.lasso.active=()=>f),{...l.lasso})),[a,f,d,u.language()]),e.useEffect((()=>{i.style.overflow="hidden";const e=t({renderer:{prio:[r.renderer||"canvas"]}}),n=e.chart({element:i,data:[],settings:{}}),a=xk({chart:n,actions:l,selections:o,config:{selectionActions:!1}});a.setLayout(c),a.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const u=function(e){var t=rv({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({legendScrollOffset:0,rotation:0});u.intercept("rotation",(e=>(u.get("rotation")+e)%(2*Math.PI))),u.onChanged("rotation",(()=>{n.update({partialData:!0})}));const d=hx();return l.on("selections-start",(()=>{n.brush("selection").start()})),s({picasso:e,chart:n,selectionService:a,viewState:u,viewCache:d,interactions:l}),()=>{a.destroy(),n.destroy(),l.removeAllListeners(),delete l.select,u.intercept("rotation",void 0),u.onChanged("rotation",void 0)}}),[]),a}const FZ={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 jZ(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const $Z={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function HZ(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r;let i,o,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!==(r=e.session)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.url)){var u;if(i=e.session.options||(null===(u=e.enigmaModel)||void 0===u?void 0:u.session.sessionConfig),!i){var d;i=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(i.url);i.host=t.hostname,i.port=t.port,i.isSecure="wss:"===t.protocol}return c=void 0!==i.secure?i.secure:i.isSecure,o=c?"https://":"http://",a=i.host||"localhost",s=i.port?`:${i.port}`:"",l=i.prefix?i.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),o+a+s+l}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await $Z.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function VZ(e,t,n,r){var i,o,a;const{app:s,flags:l}=t,c=null===(i=e.layout)||void 0===i||null===(i=i.tooltip)||void 0===i?void 0:i.imageComponents;if(!c)return[];const[u]=c,d=u.size||"small",f=u.type||"media";let h=-1;for(let e=0;e<n.length;e++)if(n[e].cId===u.cId){h=e;break}const p=(null===(o=r.data)||void 0===o||null===(o=o.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];let m;if(-1!==h&&p[h]&&(m=p[h]),"media"===f&&null!==(a=u.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return HZ(u,d,s);if("url"===f)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&jZ(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await $Z.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await $Z.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(s,l,u,d,m);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===f&&m&&m.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(jZ(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await $Z.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(s,n[h],d,m)}return[]}const BZ={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(VZ(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){var t;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}},WZ={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await BZ.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>BZ.checkIfPromisesExist({customTooltipModel:e})};const UZ=(e,t)=>{var n,r,i;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:FZ.CHART.CHART_PARENT_TYPE,qId:FZ.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},YZ=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:FZ.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const KZ={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,r;const i=null!==(n=null===(r=t.tooltip)||void 0===r||null===(r=r.chart)||void 0===r||null===(r=r.style)||void 0===r?void 0:r.size)&&void 0!==n?n:"medium",o=FZ.CHART.STYLE[i];return[{content:[e.h("div",{style:{display:"flex",width:o,height:o,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:FZ.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":o}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a;const s=i,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 KZ.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=FZ.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=FZ.CHART.STATE,a=UZ(t,o),s=await e.createSessionObject(a),l=YZ(t);if(s.id!==FZ.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var c,u,d,f;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!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,p;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(p=e.source)&&void 0!==p&&p.field){var m;const t=null==e||null===(m=e.source)||void 0===m?void 0:m.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(FZ.CHART.CONTAINER_ID),g={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await i.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===(f=s.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await KZ.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(KZ.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(FZ.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=FZ.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({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 GZ(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function XZ(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=FZ.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function JZ(e){const t=XZ();return e.filter((e=>t[e.id]))}const ZZ={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const c=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=ZZ.getAttrExprData(a);o.length||n.length?WZ.handlePromises({customTooltipModel:i,nodes:ZZ.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&KZ.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>WZ.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[t])||void 0===o?void 0:o.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[FZ.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[FZ.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[FZ.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(JZ(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[FZ.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[FZ.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=GZ(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===JZ(i).length){var o;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(o=o.quarantine)||void 0===o?void 0:o.customTooltip)||[],n=[...i,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=GZ(e)||[];[...i,t].forEach((e=>{const t=JZ(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=XZ(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:Tg.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Tg.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function QZ(e,t,n,r){var i;const o=(null===(i=t.qHyperCube)||void 0===i||null===(i=i[n])||void 0===i||null===(i=i[r])||void 0===i?void 0:i.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return s?(o.forEach(((e,t)=>{const i=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case FZ.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case FZ.CUSTOM.TITLE:case FZ.CUSTOM.DESCRIPTION:case FZ.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);a.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),a):a}const eQ={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>QZ(t,e,r,n)}}};const tQ={getCustomAttrExps(e,t,n){var r;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},o=(null===(r=t.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(o))return i;return function(e,t,n,r){const i={[FZ.CUSTOM.TITLE]:!0,[FZ.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=ZZ.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===FZ.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===FZ.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,o.map((t=>Og.getMeasure(e,t))),e,i)}};function nQ({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(tQ.getCustomAttrExps(n,e,t))})),r}(e,t,n);return r.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function rQ(e){const t=FZ.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function iQ(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}const oQ={migrateProperties(e){var t,n;const r=bg(!0,{},e),i=(null===(t=r.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[];let o=iQ(r);return o=function(e,t){return t.concat(e.map((e=>rQ(e))))}(i,o),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(o,r),null===(n=r.tooltip)||void 0===n||delete n.data,r},getPatches(e){var t,n;const r=(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)||[],i=(null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions.length)-1,o=function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=rQ(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++})),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(iQ(e),r,i);return o},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){const n=new Promise((n=>{var r,i,o;const a=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],s=(null===(i=t.tooltip)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.qHyperCube)||{},l=null===(o=t.qMeta)||void 0===o||null===(o=o.privileges)||void 0===o?void 0:o.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(s,a)&&e.getEffectiveProperties().then((t=>{if(l){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}));return n}};var aQ={attrExpr:oQ};const{CUSTOM:sQ}=FZ;function lQ({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},d=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:ZZ,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),f="rtl"===c.direction,h=()=>{var e;const n=!(null===(e=u.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=>{u.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&ux(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=nQ({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===sQ.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===sQ.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>ZZ.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>ZZ.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const i=ZZ.getDataNodes(o,r),{attrExps:a}=ZZ.getAttrExprData(t);return WZ.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(h()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e.chart)&&void 0!==e&&null!==(e=e.object)&&void 0!==e&&e.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>KZ.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>ZZ.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>KZ.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:f}),hasAlternateState:()=>{var e;return!(null===(e=d.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>KZ.hide({app:n,customTooltipModel:d}),destroy:()=>KZ.destroyVisualization({customTooltipModel:d})}}}function cQ(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function uQ({flags:t,picasso:n,instance:r}){const i=e.useModel(),o=e.useApp(),a=e.useTranslator(),s=e.useElement(),[l,c]=e.useState(),u=e.useStaleLayout(),d=e.usePlugins(),f=e.useConstraints(),h=e.useOptions(),p=e.useTheme(),{qLocaleInfo:m}=e.useAppLayout(),g=e.useEmbed();return e.useEffect((()=>{if(!r)return;s.style.overflow="hidden";const e=function(e){var t,n=e.app,r=e.translator,i={initialized:!1,dimensions:[],measures:[]};return{initialize:(t=ev(ov().mark((function e(t){var o,a,s,l,c,u,d;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.properties,!i.initialized){e.next=3;break}return e.abrupt("return");case 3:return s=[Cv(a={app:n,translator:r,properties:o}),_v(a)],e.next=7,Promise.all(s);case 7:l=e.sent,c=av(l,2),u=c[0],d=c[1],i.dimensions=u,i.measures=d,i.initialized=!0;case 12:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),getAlternatives:function(){return{dimensions:sv(i.dimensions),measures:sv(i.measures)}}}}({app:o,translator:a}),l=ix({picasso:r.picasso,model:i,app:o,translator:a,config:{auto:!1,key:"fill"}}),y=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return ev(ov().mark((function e(){var r,a,s,l;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=ev(ov().mark((function e(n){var r;return ov().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(rv({},i));case 4:if("object"===lv(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(rv({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,sv(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=av(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Rv(!0,{},n.brush);Rv(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===lv(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=mx({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=mx({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:r.picasso,plugins:d,pluginArgs:cQ(u)}),v=lQ({flags:t,layout:u,app:o,model:i,picasso:n,chart:r.chart,translator:a,localeInfo:m,embed:g,options:h}),b=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:_k(a),styles:void 0};return d.styles=qk({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=qk({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:p,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),x=function({chart:e,translator:t,layout:n,constraints:r,options:i,themeService:o,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,c="rtl"===i.direction,{fontFamily:u}=o.getStyles();return oS({chart:e,translator:t,config:{rtl:c,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:u},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:i,create:o,util:a})=>{const[c]=n,{title:u,description:d,measures:f}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},h=[];u&&h.push(o.text({value:u,style:{bold:!0}})),d&&h.push(o.text({value:d}));const p=s.hideBasic();if(p&&!f.length&&(u||d)||h.push(o.text({value:c.data.label,style:{bold:!0}})),!p){h.push(o.color({nodes:n,property:"fill"}));const{num:e}=c.data;if(h.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=c.data;h.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}h.push(o.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:i("share")(c.desc.share)}))}f&&h.push(...f.map((e=>o.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),h.push(o.raw({value:s.chart.createLimitationRow()}))):h.push(o.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:m}=c.data;return s.isEnabled()&&m&&h.push(...m.map((t=>o.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"}}}})}({chart:r.chart,translator:a,layout:u,constraints:f,options:h,themeService:b,colorService:l,custom:v}),w=function({layout:e,themeService:t,flags:n}){const r=t.getStyles(),i=t=>{var r;return n.isEnabled("CLIENT_IM_3050")?null===(r=e.components)||void 0===r?void 0:r.find((e=>e.key===t)):void 0};return{axis:{title:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(n=null===(o=i("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.axis.title.fontSize,color:null!==(a=null===(s=i("axis"))||void 0===s||null===(s=s.axis)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.axis.title.color}}}},label:{name:{getStyle:()=>{var e,t,n,o,a,s;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.name.color,fontSize:null!==(n=null===(o=i("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.label.name.fontSize,fontFamily:null!==(a=null===(s=i("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.name)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.label.name.fontFamily}}},value:{getStyle:()=>{var e,t,n,o,a,s;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.value.color,fontSize:null!==(n=null===(o=i("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.label.value.fontSize,fontFamily:null!==(a=null===(s=i("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.label.value.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.title.fontFamily,fontSize:null!==(n=null===(o=i("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.legend.title.fontSize,color:null!==(a=null===(s=i("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.title.color}}},label:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.label)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.label.fontFamily,fontSize:null!==(n=null===(o=i("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.label)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.legend.label.fontSize,color:null!==(a=null===(s=i("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.label.color}}}}}}({layout:u,themeService:b,flags:t}),k=function({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)),r=({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 cx({layout:e,config:{args:{},disclaimers:{NoDataExist:{condition:({ds:e,encodings:n})=>0===t({ds:e,encodings:n}).length},LimitedData:{condition:()=>{const t=Mg.getValue(e,"qHyperCube.qSize.qcy");return Mg.getValue(e,"qHyperCube.qDataPages.0.qArea.qHeight")<t}},OnlyNanData:{condition:({ds:e,encodings:r})=>{const i=t({ds:e,encodings:r});return 0===n({rows:i,encodings:r}).length}},OnlyNegativeOrZeroValues:{condition:({ds:e,encodings:i})=>{const o=t({ds:e,encodings:i}),a=n({rows:o,encodings:i});return 0===r({rows:a,encodings:i}).length}},NegativeOrZeroValues:{condition:({ds:e,encodings:i})=>{const o=t({ds:e,encodings:i}),a=n({rows:o,encodings:i}),s=a,l=r({rows:a,encodings:i});return s.length!==l.length}}}}})}({layout:u});c({alternativeService:e,colorService:l,disclaimerService:k,pluginService:y,themeService:b,tooltipService:x,styleService:w})}),[i,o,r,u,a.language(),f,h.direction,p.name()]),l}const dQ=e=>"[object Object]"===Object.prototype.toString.call(e),fQ=e=>Array.isArray(e);function hQ(e,t){if(e===t)return!0;if(fQ(e)){if(!fQ(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!hQ(e[n],t[n]))return!1;return!0}if(dQ(e)){if(!dQ(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!hQ(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function pQ({enable:t=!0}={}){const n=e.useModel(),r=()=>Date.now().toString()+Math.random(),[i,o]=e.useState(r()),a={properties:void 0};return e.useEffect((()=>{if(!n||!n.getEffectiveProperties||!t)return()=>{};const e=()=>{n.getEffectiveProperties().then((e=>{const t=bg(!0,{},e);if(!a.properties)return void(a.properties=t);const n=function(e,t){var n,r,i,o;const a={properties:!1,exclude:!1};if(e===t)return a;const s=bg(!0,{},e),l=bg(!0,{},t);return a.exclude=!hQ(null===(n=s.qHyperCubeDef)||void 0===n?void 0:n.qLayoutExclude,null===(r=l.qHyperCubeDef)||void 0===r?void 0:r.qLayoutExclude),null===(i=s.qHyperCubeDef)||void 0===i||delete i.qLayoutExclude,null===(o=l.qHyperCubeDef)||void 0===o||delete o.qLayoutExclude,a.properties=!hQ(s,l),a}(a.properties,t);a.properties=t,n.exclude&&!n.properties&&o(r())}))};return n.on("changed",e),e(),()=>{n.removeListener("changed",e)}}),[t]),i}function mQ({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:i}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:`${e}Range`,direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const gQ=.8,yQ=.55,vQ={CORNER_RADIUS:0,INNER_RADIUS:yQ,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},bQ=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,i;let o=gQ,a=0;const s=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:yQ;e.donut.showAsDonut&&(o=gQ-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*o+a}}:gQ,xQ=({layout:e},t,n)=>{var r,i;if(!e.donut.showAsDonut)return 0;const o=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:yQ;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=gQ-o,n=o;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:o},wQ=({layout:e},t)=>{var n,r,i,o,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,f=d&&(d.label||d.title||d.qFallbackTitle)||"",h=t.encodings.slice.outerRadius,{formatter:p}=t.chart,m=Mg.getValue(e,"qHyperCube.qDimensionInfo",[]).length;function g(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>p(n)(e.qNum):e=>e.qText}}const y=(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:f,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?eQ.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:xQ({layout:e},t,y),fill:t.colorService.getColor(),strokeWidth:null!=y&&null!==(n=y.style)&&void 0!==n&&n.strokeWidth?vQ.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:vQ.STROKE.WIDTH.NONE,stroke:null!==(r=null==y||null===(i=y.style)||void 0===i||null===(i=i.strokeColor)||void 0===i?void 0:i.color)&&void 0!==r?r:vQ.STROKE.COLOR,outerRadius:bQ({layout:e},t,y),cornerRadius:null!==(o=null==y||null===(a=y.style)||void 0===a?void 0:a.cornerRadius)&&void 0!==o?o:0}},animations:{enabled:t.animations.enabled,isMainComponent:!0}}};function kQ({layout:e},t){var n,r;const i=(e.components||[]).filter((e=>"slices"===e.key))[0],o=null!==(n=null==i||null===(r=i.style)||void 0===r?void 0:r.innerRadius)&&void 0!==n?n:yQ,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=gQ-o,n=o;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled}}}function SQ(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 CQ({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 EQ(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function MQ(e){return e.node.data.num.label}function _Q(e){return e.node.data.radius.label}function DQ(e,t,n){if(e.dataPoint.auto)return n?MQ:EQ;if("share"===e.dataPoint.labelMode)return EQ;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?_Q:MQ}return null}function qQ({data:e}){return e?e.label:""}function RQ(e){const t=parseInt(e,10);if(!isNaN(t))return t}function TQ(e){var t,n;const r=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return(null!==(t=null==r||null===(n=r.style)||void 0===n?void 0:n.innerRadius)&&void 0!==t?t:yQ)>.3}function OQ({node:e,data:t}){return bg({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function PQ(e,t,n){const r=t.styleService.label.name.getStyle(),i=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",padding:t.encodings.slice.outerRadius?4:2,fill:r.fill}],fontSize:RQ(r.fontSize),fontFamily:r.fontFamily,label:qQ,linkData:({node:e,data:t})=>bg({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(DQ(e,t,!1)){const r=function(e,t,n){return{label:DQ(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&TQ(e)?"inside":"into",onBackground:e.donut.showAsDonut&&TQ(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),o=Ag(bg(t,r),n.theme);o.linkData=OQ,i.push(o)}return{key:"pie-labels",type:"labels",renderer:cS(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:i}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}function NQ({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=DQ(e,t,!0),i=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme),o=t.themeService.getStyles(),a=t.styleService.label.name.getStyle(),s=t.styleService.label.value.getStyle(),l=a.fill===o.label.name.color,c=s.fill===o.label.value.color;return{key:"pie-labels",type:"labels",renderer:cS(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:RQ(a.fontSize),fontFamily:a.fontFamily,fill:l&&!e.donut.showAsDonut?i:a.fill,label:qQ,linkData:({data:e})=>e},{fontSize:RQ(s.fontSize),fontFamily:s.fontFamily,fill:c&&!e.donut.showAsDonut?i:s.fill,label:r,linkData:({data:e})=>e}]}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}(e,n,t):PQ(e,n,t))}const AQ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type)),i=(r||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 i||this.chart.component("legendRangeBrush").emit("rangeClear"),i}},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 IQ(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}function LQ(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:i}=IQ(e,t),o=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*gQ;return(o-r)**2+(a-i)**2<=s**2}const zQ=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let i=IQ(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(i={cx:i.x,cy:i.y,r:5});const o=this.chart.shapesAt(i,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});o.length&&(this.chart.brushFromShapes(o,{components:[{key:o[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),FQ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),jQ=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function $Q(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&LQ(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const HQ=(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()&&LQ(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}}}),VQ=(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}}}),BQ=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[HQ(e,{}),zQ(e,t,{}),...n]:[AQ(e,{}),jQ(e,{}),HQ(e,{}),FQ(e,{}),VQ(e,{}),zQ(e,t,{}),...n]});function WQ(e,t,n){const r=e.getIsSingleSelect(0),{constraints:i}=n;if(i.active&&i.passive)return[];const o=t.tooltipService.getInteractions();return[BQ(t,r,o.gestures),$Q(t),o.native]}function UQ({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 YQ({layout:e},t,n){var r;if(null!=t&&null!==(r=t.flags)&&void 0!==r&&r.isEnabled("IM_5788_DATA_TITLE_REFACTOR"))return!1;if(!e.dimensionTitle)return!1;const i=t.properties,o=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:i&&i.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:o.fontFamily,fontSize:o.fontSize,color:o.color}}}function KQ({layout:e},t,n){var r;if(null==t||null===(r=t.flags)||void 0===r||!r.isEnabled("IM_5788_DATA_TITLE_REFACTOR"))return!1;if(!e.dimensionTitle)return!1;const i=t.alternativeService.getAlternatives(),o=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:i.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:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize}}}}function GQ({layout:e,context:t,selectionService:n},r={}){const i=function({layout:e}={},t={}){const n={};return bg(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&bg(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),o={scales:i};let a=[];const s=function(e,t){const n=e.disclaimerService.getDisclaimer();if(!n)return!1;const{rtl:r}=t,{translator:i}=e,{fontFamily:o}=e.themeService.getStyles();return{key:"disclaimer",type:"disclaimer",layout:{dock:n.alignment},settings:{isRTL:r,label:i.get(`Object.Disclaimer.${n.key}`)},style:{fontFamily:o}}}(r,t);if(r.disclaimerService.getHasSuppressingDisclaimer())return{components:[s]};const l=t.constraints.select||t.constraints.active,c=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",styleOverrides:{title:r.styleService.legend.title.getStyle(),label:r.styleService.legend.label.getStyle()},rtl:t.rtl},{navigationDisabled:l});return i.fillRange&&c.components[0]&&("right"===c.components[0].layout.dock||"left"===c.components[0].layout.dock||t.rtl)&&(i.fillRange.invert=!0),a=[wQ({layout:e},r),kQ({layout:e},r),SQ(r),CQ({layout:e},r),YQ({layout:e},r,t),KQ({layout:e},r,t),...c.components,mQ({scaleKey:"fill",legend:c.components[0]||{},onEdited:r.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},NQ({layout:{components:e.components,dataPoint:bg({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),s],a=a.filter((e=>!1!==e)),{interactions:WQ(n,r,t),scales:i,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:UQ({settings:o},r),strategy:Sg(0,r)}}function XQ({instance:t,services:n,picasso:r,flags:i}){const o=e.useOptions(),a=e.useModel(),s=e.useApp(),l=e.useTranslator(),c=e.useTheme(),u=e.useStaleLayout(),d=e.useSelections(),f=e.useConstraints(),{qLocaleInfo:h}=e.useAppLayout(),p=pQ({enable:u&&!u.snapshotData}),[m]=e.usePromise((()=>{if(!n)return Promise.resolve();aQ.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 t=>Promise.all([n.colorService.initialize({createConfig:e}),Promise.resolve(t),n.pluginService.initialize(),n.alternativeService.initialize({properties:t})])))}),[n,p]);e.useEffect((()=>{null!=t&&t.selectionService&&t.selectionService.setLayout(u)}),[u]),e.useEffect((()=>{if(!t||!m)return;const{chart:e,viewState:p,interactions:g,viewCache:y}=t,{alternativeService:v,colorService:b,disclaimerService:x,pluginService:w,themeService:k,tooltipService:S,styleService:C}=n,E=o.viewState||{};u.snapshotData||(p.preventSet("legendScrollOffset",E.legendScrollOffset||0),p.preventSet("rotation",E.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,p),S.expando.set("properties",m[1]);const M=r.data("q")({key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:h}}),_=[{type:"q",key:"qHyperCube",data:u.qHyperCube,config:{localeInfo:h}},...b.getData()],D={slice:{arc:"qMeasureInfo/0"}};u.qHyperCube.qMeasureInfo.length>1&&(D.slice.outerRadius="qMeasureInfo/1"),x.initialize({args:{ds:M,encodings:D}});const q=function(e,t){if(t.slice.outerRadius)return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length;return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(r.data("q")({data:u.qHyperCube,config:{localeInfo:h}}),D),R=d?()=>{const t=e.brush("selection");ag.selections(t,{},u).forEach((e=>{d.select(e)}))}:()=>{},T=u.snapshotData&&!o.freeResize?{width:(u.snapshotData.content.size||u.snapshotData.object.size).w,height:(u.snapshotData.content.size||u.snapshotData.object.size).h}:void 0,O=e=>t.selectionService.getIsSelectionLocked(e),P=()=>GQ({layout:u,context:{rtl:"rtl"===o.direction,theme:c,constraints:f,model:a},selectionService:t.selectionService},{picasso:r,ds:M,model:a,app:s,chart:e,onSelect:R,isLocked:O,interactions:g,constraints:f,translator:l,viewState:p,dataRowCount:q,encodings:D,alternativeService:v,colorService:b,disclaimerService:x,pluginService:w,themeService:k,styleService:C,tooltipService:S,debouncer:px,properties:m[1],selections:d,logicalSize:T,flags:i,viewCache:y,animations:{enabled:()=>function({viewState:e,options:t,viewCache:n,layout:r,chart:i}){return!1!==t.chartAnimations&&n.get("chartWidth")===i.element.clientWidth&&n.get("chartHeight")===i.element.clientHeight&&n.get("hasZeroLine")===!!i.component("zeroLine")&&0===e.get("rotation")&&!lS.propertiesHaveChanged({viewCache:n,layout:r})}({viewState:p,options:o,layout:u,viewCache:y,chart:e})}});t.generateSettings=P;const N=P();e.update({data:_,settings:N}),y.set("chartWidth",e.element.clientWidth),y.set("chartHeight",e.element.clientHeight),y.set("hasZeroLine",N.components.filter((e=>"zeroLine"===e.key)).length>0),lS.cacheProperties({viewCache:y,layout:u}),o.effect&&u.effectProperties?o.effect.update(u,e,{encodings:D}):u.effectPath||e.brush("highlight").end()}),[t,m,o.direction,o.effectProperties,f,c.name(),l.language()])}function JQ({instance:t,services:n}){const r=e.useElement(),i=e.useStaleLayout();e.onTakeSnapshot((e=>{if(!(i.snapshotData&&i.snapshotData.content&&i.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(e,r),t&&n))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:_g(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:e,chart:t.chart,colorService:n.colorService,viewState:t.viewState})})),e.useImperativeHandle((()=>({getViewState:()=>({rotation:t.viewState.get("rotation"),legendScrollOffset:_g(t.chart,"legend-cat")})})),[t])}var ZQ={exports:{}};!function(e){self,e.exports=(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},645:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Te});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},o=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=v(u(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),h=p(0),m=p(1),g=v(d,h),y=v(f,m);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function w(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const k={isFullRange:d,getNumDimensions:w,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(h(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=p(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=p(0),f=p(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===w({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:h,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=w({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n})),t}};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}var E=t().bind(null,!0),M={},_=Array.isArray;function D(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function q(e){return void 0===e}function R(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function T(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=q(e[n||t])?o:e[t],e=e[n||t]}})),e}function O(e,t){var n=!0;if(D(e)&&D(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){O(e[r],t[r])||(n=!1)})),n);if(_(e)&&_(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!O(e[r],t[r]))return!1;return!0}return e===t}M.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?E({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);O(o,a)||R(t,i)||(q(a)?r.push({op:"add",path:s,value:o}):D(o)&&D(a)?r=r.concat(M.generate(a,o,s)):_(o)&&_(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&q(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(O(t,i))return r;if(!q(t[0])&&q(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(M.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){q(t[i])&&!R(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},M.apply=function(e,t){t.forEach((function(t){var n,r,i=T(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(_(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(_(a)&&_(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return S(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(D(a)&&D(t.value))n=a,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!R(n,e)&&delete n[e]})),E(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var u=T(e,t.from);_(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(_(i)?i.splice(+o,1):delete i[o])}))},M.clone=function(e){return E({},e)},M.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},M.updateObject=function(e,t){Object.keys(e).length?M.apply(e,M.generate(e,t)):E(e,t)};const P=M,N=function(e,n,r){if(!e)return Promise.resolve();var i=P.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(i,!0)):Promise.resolve()};var A="accumulation";function I(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===A)return n[r]}function L(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===A)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=k.getNumStepComp(n,l),f=k.getAboveComp(n,l,u,d),h=k.getRangeComp("RangeSum",f);if(k.needDimension({modifier:n,properties:r,layout:i})){var p=k.getDimComp(c,1),m=k.getDimComp(c,0),g=k.getAggrComp(h,p,m);h=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return h},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,z)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(L(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(L(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(L(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(L(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=I(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=I(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(L(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(A))return!1;var o=I(t,e);return o&&!o.disabled}};return n}};var j="movingAverage";function $(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function H(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var V={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const B={translationKey:"properties.modifier.movingAverage",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=k.getNumDimensions({properties:i,layout:a}));var u=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=k.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=k.getNumStepComp(r,c),p=k.getAboveComp(r,c,f,h);if(r.nullSuppression)t=k.getRangeComp("RangeAvg",p);else{var m=k.getRangeComp("RangeSum",p),g=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(k.needDimension({modifier:r,properties:i,layout:a})){var v=k.getDimComp(u,1),b=k.getDimComp(u,0),x=k.getAggrComp(y,v,b);y=r.showExcludedValues?k.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,V)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(H(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(H(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(H(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=$(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=$(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(j))return!1;var o=$(t,e);return o&&!o.disabled}};return n}};var W="timeSeriesDecomposition";function U(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function Y(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var K={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const G={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?k.generateTSDExpression(n,t,r):t},extractInputExpression:k.extractInputExpression,initModifier:function(e,t){k.initModifier(e,K),""===e.decomposition&&t&&(e.decomposition=k.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(Y(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(Y(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=U(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e})),e}))}},show:function(t){var n=U(t,e);return n&&!n.fullRange}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};return n}};var X="difference";function J(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=k.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(k.needDimension({modifier:n,properties:r,layout:i})){var h=k.getDimComp(c,1),p=k.getDimComp(c,0),m=k.getAggrComp(f,h,p);f=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(i,o),d=ce(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach((function(t){void 0===e[t]&&(e[t]=oe[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",fe="qDef.qDef",he="qDef.base.qDef",pe="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,he);return void 0!==t?t:o(e,fe)},getExpressionRef:function(e){return void 0!==o(e,he)?he:fe},getLibraryIdRef:function(e){return o(e,me)?me:pe},getLibraryId:function(e){return o(e,me)||o(e,pe)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",ve="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",we="qDef.qLabel",ke="qDef.qLabelExpression",Se="qDef.base.qLabel",Ce="qDef.base.qLabelExpression",Ee="qDef.qAggrFunc",Me="qDef.base.qAggrFunc",_e={initBase:function(e,t){(t||_e.isValid(e))&&(n(e,ve,o(e,ye)),n(e,xe,o(e,be)),n(e,Se,o(e,we)),n(e,Ce,o(e,ke)))},restoreBase:function(e){_e.isValid(e)&&(n(e,ye,o(e,ve)),n(e,be,o(e,xe)),n(e,we,o(e,Se)),n(e,ke,o(e,Ce)),o(e,Ee)&&o(e,Me)&&n(e,Ee,o(e,Me)),delete e.qDef.base)},isValid:function(e){var t=o(e,ve),n=o(e,xe);return void 0!==t||void 0!==n}};const De=_e;function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}var Re={accumulation:F,movingAverage:B,difference:ee,normalization:ue,timeSeriesDecomposition:G};const Te={modifiers:Re,apply:Pe,applyModifiers:Ne,cleanUpMeasure:Ae,destroy:function(e){e&&Oe[e.id]&&Oe[e.id].masterItemSubscriber&&(Oe[e.id].masterItemSubscriber&&Oe[e.id].masterItemSubscriber.unsubscribe(),delete Oe[e.id])},hasActiveModifiers:Ie,getActiveModifier:Le,initBase:De.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Re[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return Re[e]&&Re[e].isApplicable({properties:n,layout:r})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=je(e);Ye({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:ze};var Oe={};function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Oe[n.id]=Oe[n.id]||{isFirstTime:!0};var c=Oe[n.id].isFirstTime;if(Oe[n.id].isFirstTime=!1,r&&"object"===qe(r))return Ne({model:n,properties:r});var u=n?n.layout:void 0,d=o(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var f=o(u,"qHyperCube.qMeasureInfo"),h=Oe[n.id].lastReloadTime;if(Oe[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Ie({measures:f,layout:u})){var p=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:f,layout:u,model:n,lastReloadTime:h});return p||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ye({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:f,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then((function(e){var r=t()(!0,{},e);He(r);var i=Qe(r);return Ke({model:n}).then((function(t){return Ge({libraryIds:i,model:n}).then((function(i){return p&&function(e){var t=e.properties;Fe(t).forEach((function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===qe(e)&&!e.disabled){if(n++,"object"!==qe(Re[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Re[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:r}),Ne({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===qe(e.base)}))}(f)?n.getEffectiveProperties().then((function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then((function(){var e=t()(!0,{},r);return Fe(r).forEach((function(e){return Ae(e)})),Je({oldProperties:e,newProperties:r,model:n})}))}({model:n,properties:e})})):Promise.resolve(l)}function Ne(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),He(i);var f=Qe(i);return et({model:n,libraryIds:f,masterItem:c}).then((function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ie({measures:n,properties:r}))return n.forEach((function(e){return Ae(e)})),Promise.resolve();var l=a?void 0:Qe(r);return Ke({model:i,dimensionAndFieldList:s}).then((function(e){return Ge({libraryIds:l,model:i,libraryItemsProps:a}).then((function(i){n.forEach((function(n){Ye({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;De.isValid(n)||De.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===qe(e)&&!e.disabled){if(s++,"object"!==qe(Re[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Re[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Re[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Re[r.type].updateModifier&&Re[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Re[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||ze(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ze(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}}))}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),Ve(n)):Ae(n)}))}))}))}({measures:a,properties:i,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)}))}))}function Ae(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some((function(e){return"object"===qe(e)&&!e.disabled&&!Re[e.type]}))}(e)?De.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ve(e)}function Ie(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ye({modifiers:je(e),properties:n,layout:r})}))}function Le(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Re[r.type]&&!r.disabled)return r}}function ze(e){var t=Le(e);return!t||Re[t.type].enableTotalsFunction(e)}function Fe(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function $e(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function He(e){Fe(e).forEach((function(e){return function(e){var n=Le(e);n&&(void 0!==n.outputExpression&&$e(n)!==e.qDef.qDef?delete e.qDef.base:!De.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)}))}function Ve(e){var t=je(e);Array.isArray(t)&&t.forEach((function(t){"object"===qe(t)&&(t.disabled||!Re[t.type]&&$e(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Be(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,n=e.properties,r=e.layout;return!We(t)&&Ye({modifiers:je(t),properties:n,layout:r})}function Ye(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==qe(e)||e.disabled||!Re[e.type])&&(void 0===i[e.type]&&(i[e.type]=Re[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function Ke(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Ge(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):N(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===qe(e)&&!e.disabled&&Re[e.type]&&Re[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=je(t);if(Ye({modifiers:r,properties:e})){var o=We(t);o&&n.push(o),i=i||Ze({modifiers:r,properties:e})}})),o(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Oe[t.id].masterItemSubscriber=Oe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=o(e,n)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach((function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(u(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return Pe({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Oe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>He});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var f=n(645),h=n.n(f);const p=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},v=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach((function(e){h().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var w=n(229),k=n.n(w);function S(e,t){var n=k()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function C(e,t){return k()(!0,{},t,e)}function E(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var M=Math.pow(2,53)-1;function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const q=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},R=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},T=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},O=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},P=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},N=function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=S(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=S(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},A=function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=C(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=C(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},I=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=E(a.max,i.dimensions.length,M),l=E(a.min,i.dimensions.length,0);return{maxDimensions:E(o.max,s,M),minDimensions:E(o.min,l,0),maxMeasures:s,minMeasures:l}},L=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},z=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=k()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=k()(!0,{},n,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},j=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return _(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),r.dimensions.added(e,n)}))}},H=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return D(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),r.measures.added(e,n)}))}},V=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&h().isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))};function B(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),p({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),v({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,h=e.isHCModifierSupported,p=void 0===h||h,m={qChildren:[]},g=z({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=I({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,w=b.minDimensions,k=b.maxMeasures,S=b.minMeasures,C=l.defaultDimension,E=void 0===C?O():C,M=l.defaultMeasure,_=void 0===M?P():M;v.qDimensions.length=0,v.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:S})&&j({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:S,newHyperCubeDef:v}),N({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:E}),A({exportFormat:t,maxMeasures:k,minMeasures:S,newHyperCubeDef:v,defaultMeasure:_}),$({newProperties:g,dataDefinition:a,hypercubePath:c}),H({newProperties:g,dataDefinition:a,hypercubePath:c}),L({exportFormat:t,newHyperCubeDef:v}),R("qMaxStackedCells",y,v),R("qNoOfLeftDims",y,v),T("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),T("qMode",y,v,"S"),T("qReductionMode",y,v,"N"),T("qSortbyYValue",y,v),T("qIndentMode",y,v),T("qShowTotalsAbove",y,v),q(g,t,r),m.qProperty=g;var D=o.getValue(u||{},"support.modifiers");return V({measures:v.qMeasures,modifierTypes:D}),f&&B(m.qProperty,"storedFilters"),"S"===v.qMode&&p&&B(m.qProperty,"dynamicScript"),m}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function Y(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function K(e,t){return e.length!==t}const G={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(Y(a,t,r,i),K(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=G.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})),t.forEach((function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}))}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var h=G.create(G.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:h,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:h,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(h.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(h)):l.qAttributeExpressions.push(h)}}}function ie(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:h().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return h().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=G.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},de=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=G.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},fe=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},he=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},pe=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ye={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=W.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=G.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return G.moveByIdFromGroup(a,[],"qAttributeDimensions",c),G.moveByIdFromGroup(a,[],"qAttributeExpressions",c),G.moveByIdFromGroup(s,[],"qAttributeExpressions",u),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=W.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),h=o.getValue(d,"qHyperCubeDef.qDimensions",[]),p=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ce(d,f),y=ue({canColorBy:g,autoColor:m,colorMode:p,dimensions:h});return g[p]?he({shouldUpdateColorBy:y,properties:d})&&pe(d):me(d),y&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),fe(h),u}};var ve=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?B(n,"unsupportedAutoMinMax")||k()(n.measureAxis,t.measureAxis):B(n,"supportedAutoMinMax")||k()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&k()(s,n.properties.measureAxes[t[0].axis])):k()(s,n.properties.measureAxes[0])}},we=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},ke={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ye.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),we(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Se(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ce(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var c=Se(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Se(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var Me="qHyperCubeDef.qMeasures",_e="conditionalColoring",De="measures",qe="qDef.conditionalColoring";const Re={quarantine:function(e){Ce({properties:e,arrayPath:Me,quarantineName:_e,arrayName:De,itemPath:qe})},unquarantine:function(e){Ee({properties:e,arrayPath:Me,itemPath:qe,arrayName:De,quarantineName:_e})}};var Te="qHyperCubeDef.qMeasures",Oe="measures",Pe="qHyperCubeDef.qDimensions",Ne="dimensions",Ae="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ie="alternativeMeasures",Le="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",ze="alternativeDimensions",Fe="qCalcCondition",je="conditionalShowHide";const $e={quarantine:function(e){Ce({properties:e,arrayPath:Te,quarantineName:je,arrayName:Oe,itemPath:Fe}),Ce({properties:e,arrayPath:Pe,quarantineName:je,arrayName:Ne,itemPath:Fe})},unquarantine:function(e){Ee({properties:e,arrayPath:Te,quarantineName:je,arrayName:Oe,itemPath:Fe}),Ee({properties:e,arrayPath:Pe,quarantineName:je,arrayName:Ne,itemPath:Fe})},quarantineAlternative:function(e){Ce({properties:e,arrayPath:Ae,quarantineName:je,arrayName:Ie,itemPath:Fe}),Ce({properties:e,arrayPath:Le,quarantineName:je,arrayName:ze,itemPath:Fe})},unquarantineAlternative:function(e){Ee({properties:e,arrayPath:Ae,quarantineName:je,arrayName:Ie,itemPath:Fe}),Ee({properties:e,arrayPath:Le,quarantineName:je,arrayName:ze,itemPath:Fe})}},He={hypercube:W,colorChart:ye,axisChart:ke,quarantineProperty:x,unquarantineProperty:B,quarantineArrayProp:Ce,unquarantineArrayProp:Ee,conditionalColoring:Re,conditionalShow:$e}})(),r.default})()}(ZQ);var QQ=r(ZQ.exports);const e0={setValue(e,t,n){if(!t)return;const r=t.split(".");let i=e;const o=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==i[r[a]]&&(i[r[a]]=Number.isNaN(+r[a+1])?{}:[]),i=i[r[a]];void 0!==n?i[o]=n:delete i[o]},getValue(e,t,n){const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(null==o[r[i]])return n;o=o[r[i]]}return o}},t0={getDimensions:e=>e0.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>e0.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>e0.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>e0.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=e0.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=e0.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 n0={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>t0.getNumMeasures(e)>=1},showLegend:e=>{const t=e0.getValue(e,"color.auto"),n=e0.getValue(e,"color.expressionIsColor"),r=e0.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!e0.getValue(e,"color.auto")&&"byDimension"===e0.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===e0.getValue(e,"color.useDimColVal")&&e0.setValue(e,"color.useDimColVal",!1),!e0.getValue(e,"color.auto")&&"byDimension"===e0.getValue(e,"color.mode")&&"libraryItem"===e0.getValue(e,"color.byDimDef.type"))},r0=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:i}=n0;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),r.push({value:"primary",translation:"properties.colorMode.primary"}),r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!e0.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:i,showTitle:{show(e){const t=e0.getValue(e,"color.auto");return e0.getValue(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===e0.getValue(e,"color.mode")&&!0===e0.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>e0.getValue(e,"legend.show")&&i(e)}}};function i0(e){return new r0(e)}const o0={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}}}}}}},a0=(e,t,n)=>{const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.pieChart",e,"color")})}}}}},s0=(e,t,n,r)=>{const i=function(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,c={};l.forEach((function(e){for(var r=e.split("."),i=c,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=xv({theme:t,translator:n,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var u=function(e){for(var t=e.split("."),n=c,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}({theme:r,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:a0("axis.title",i,r)}}}:void 0,labelNameSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionValueLabel",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:a0("label.name",i,r)}}}:void 0,labelValueSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.value.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:a0("label.value",i,r)}}}: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:a0("legend.title",i,r)}}}: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:a0("legend.label",i,r)}}}:void 0}}},l0=i0("hard");const c0=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(fx(e,"color.mode","byDimension"),fx(e,"color.byDimDef.activeDimensionIndex",0),fx(e,"color.persistent",!1))},u0=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},d0=e=>{var t;const{flags:n,translator:r}=e||{},i=null==e||null===(t=e.sense)||void 0===t?void 0:t.theme,o=null==n?void 0:n.isEnabled("SENSECLIENT_IM_2429_PIECHART_BG"),a={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?r.get("Simple.Color.Auto",r.get("properties.colorMode.byDimension")):r.get("Common.Custom")},change:c0},colorMode:{options:u0}}}}},s={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||fx(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,i){i.dimensionTitle=!e}}}}}}},l={uses:"settings",items:{simpleStyling:o0,simpleLabels:s,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:s0(o,n,r,i),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:l0.color.colorMode.options},persistentColors:{show:l0.color.persistentColors.show}}},simpleColors:a,legend:{show:l0.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:l0.legend.showTitle.show},dock:{show:l0.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}};return l},f0={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)}}}}}}},h0={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},p0={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function m0(e){return{type:"items",component:"accordion",items:{data:f0,sorting:h0,addons:p0,settings:d0(e)}}}const g0=i0("explore"),y0=m0();var v0={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:y0.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:y0.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:g0.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&g0.color.useDimColVal.show(e))}}}}}}};const b0="slices";function x0(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function w0(e){return e.data.num.label}function k0(e){return e.data.radius.label}function S0(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?w0:x0;if("share"===e.dataPoint.labelMode)return x0;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?k0:w0;return w0}(n,r)(e,t)}function C0(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 E0{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const i=e.find(".effectLayer");i.length>0&&i.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),i=n.map((n=>{const{start:i,end:o,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,c=n.element.getBoundingClientRect(),u=(i+o)/2,d=c.left-r.left+l.x*(s.x+a*Math.sin(u)),f=c.top-r.top+l.y*(s.y-a*Math.cos(u)),h=Math.cos(u)>0?"top":"bottom",p=Math.sin(u)>0?"right":"left";return{title:C0(n),label:S0(n,this.chart.formatter,e,t),orientation:`${h}${p}`,position:{x:d,y:f}}}));this.Flag.show(this.effectLayer,i)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=bg(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=bg(e.options,{effect:null}),n?t.getProperties().then((e=>bg(e,{effectPath:null,effectProperties:null,dataPoint:bg(!0,{},e.originalModelSettings.dataPoint),legend:bg(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class M0 extends E0{init(e,t,n,r){return e.options=bg(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(b0).data.items,n=e.effectProperties.min,r=e.effectProperties.max,i=[];let o=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const i=e.num.value;n&&i<o[0]&&(o=[i,t]),r&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class _0 extends E0{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component(b0).data.items.map((e=>e.value)),i=r.indexOf(n.data.value);-1!==i&&(this.selectedIndex=i,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(b0).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===b0)).map(((n,r)=>{const i=S0(n,this.chart.formatter,e,t);return{text:`${C0(n)} (${i})`,value:r}}))}init(e,t,n,r){return e.options=bg(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}const D0="/effects/highlight-value",q0="/effects/maxmin";var R0={isCompatible:({effectPath:e})=>e===q0||e===D0,create:e=>e.effectPath===q0?new M0(e):e.effectPath===D0?new _0(e):null};function T0(e){const t={},{components:n,tooltip:r}=e,i=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((e=>{t[`chart_style_${e}`]=i.style[e]})),r){var o;t.chart_tooltip_custom=!r.auto;const e=null===(o=r.chart)||void 0===o||null===(o=o.object)||void 0===o?void 0:o.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function O0(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 P0(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function N0({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){P0(e),O0(t),ZZ.addCallbackCustomTooltip(t)},move(e,t){P0(e),O0(t),ZZ.moveCallbackCustomTooltip(t,e)},remove(e,t){ZZ.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){P0(e),O0(r),ZZ.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){O0(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 A0=e=>e.qMax<=0,I0=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(A0));function L0(e){return{definition:m0(e),softDefinition:v0,support:{snapshot:I0,export:I0,exportData:!0,sharing:I0,viewData:!0,effects:!0},effects:R0,extendMetrics:T0,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=QQ.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:N0(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>QQ.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function z0(e){return{properties:{version:"1.28.2",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:vQ.STROKE.COLOR},cornerRadius:vQ.CORNER_RADIUS,innerRadius:vQ.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:[N0(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const i=QQ.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:N0(e),hypercubePath:r});return i.qProperty.dataPoint&&!1===i.qProperty.dataPoint.show&&delete i.qProperty.dataPoint.show,i},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>QQ.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}return t=>{const{flags:r}=t;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(n).forEach((t=>{e.add(n[t])}))}}(t.translator);const i=OZ();return{qae:z0(t),ext:L0(t),component(){const t=zZ({picasso:i}),n=uQ({flags:r,picasso:i,instance:t});XQ({instance:t,services:n,picasso:i,flags:r}),function({instance:t}){const n=e.useStaleLayout(),r=e.useOptions(),i=e.useRect();e.useEffect((()=>{if(!t||!t.generateSettings)return;const{viewCache:e,chart:i,generateSettings:o}=t;i.update({settings:o()}),e.set("chartWidth",i.element.clientWidth),e.set("chartHeight",i.element.clientHeight),r.effect&&r.effect.update(n,i)}),[i.width,i.height])}({instance:t}),JQ({instance:t,services:n})}}}}));
|