(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4013],{6539:e=>{e.exports={button:"button-YKkCvwjV",content:"content-YKkCvwjV","icon-only":"icon-only-YKkCvwjV","color-brand":"color-brand-YKkCvwjV","variant-primary":"variant-primary-YKkCvwjV","variant-secondary":"variant-secondary-YKkCvwjV","color-gray":"color-gray-YKkCvwjV","color-green":"color-green-YKkCvwjV","color-red":"color-red-YKkCvwjV","size-xsmall":"size-xsmall-YKkCvwjV","size-small":"size-small-YKkCvwjV","size-medium":"size-medium-YKkCvwjV","size-large":"size-large-YKkCvwjV","size-xlarge":"size-xlarge-YKkCvwjV","with-start-icon":"with-start-icon-YKkCvwjV","with-end-icon":"with-end-icon-YKkCvwjV","start-icon-wrap":"start-icon-wrap-YKkCvwjV","end-icon-wrap":"end-icon-wrap-YKkCvwjV",animated:"animated-YKkCvwjV",stretch:"stretch-YKkCvwjV",grouped:"grouped-YKkCvwjV","adjust-position":"adjust-position-YKkCvwjV","first-row":"first-row-YKkCvwjV","first-col":"first-col-YKkCvwjV","no-corner-top-left":"no-corner-top-left-YKkCvwjV","no-corner-top-right":"no-corner-top-right-YKkCvwjV","no-corner-bottom-right":"no-corner-bottom-right-YKkCvwjV","no-corner-bottom-left":"no-corner-bottom-left-YKkCvwjV"}},21103:e=>{e.exports={container:"container-pgo9gj31","intent-default":"intent-default-pgo9gj31",focused:"focused-pgo9gj31",readonly:"readonly-pgo9gj31",disabled:"disabled-pgo9gj31","with-highlight":"with-highlight-pgo9gj31",grouped:"grouped-pgo9gj31","adjust-position":"adjust-position-pgo9gj31","first-row":"first-row-pgo9gj31","first-col":"first-col-pgo9gj31",stretch:"stretch-pgo9gj31","font-size-medium":"font-size-medium-pgo9gj31","font-size-large":"font-size-large-pgo9gj31","size-small":"size-small-pgo9gj31","size-medium":"size-medium-pgo9gj31","size-large":"size-large-pgo9gj31","intent-success":"intent-success-pgo9gj31","intent-warning":"intent-warning-pgo9gj31","intent-danger":"intent-danger-pgo9gj31","intent-primary":"intent-primary-pgo9gj31","border-none":"border-none-pgo9gj31","border-thin":"border-thin-pgo9gj31","border-thick":"border-thick-pgo9gj31","no-corner-top-left":"no-corner-top-left-pgo9gj31","no-corner-top-right":"no-corner-top-right-pgo9gj31","no-corner-bottom-right":"no-corner-bottom-right-pgo9gj31","no-corner-bottom-left":"no-corner-bottom-left-pgo9gj31",highlight:"highlight-pgo9gj31",shown:"shown-pgo9gj31"}},10306:e=>{e.exports={"inner-slot":"inner-slot-QpAAIiaV",interactive:"interactive-QpAAIiaV",icon:"icon-QpAAIiaV","inner-middle-slot":"inner-middle-slot-QpAAIiaV","before-slot":"before-slot-QpAAIiaV","after-slot":"after-slot-QpAAIiaV"}},66579:e=>{e.exports={input:"input-uGWFLwEy","with-start-slot":"with-start-slot-uGWFLwEy","with-end-slot":"with-end-slot-uGWFLwEy"}},22169:e=>{e.exports={scrollable:"scrollable-fejnDJJf",content:"content-fejnDJJf",row:"row-fejnDJJf",title:"title-fejnDJJf",control:"control-fejnDJJf"}},91131:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-xe9kH1lJ",submitButton:"submitButton-xe9kH1lJ",buttons:"buttons-xe9kH1lJ"}},67179:e=>{e.exports={dialog:"dialog-HExheUfY",
wrapper:"wrapper-HExheUfY",separator:"separator-HExheUfY"}},91441:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-tuOy5zvD",unsetAlign:"unsetAlign-tuOy5zvD",title:"title-tuOy5zvD",subtitle:"subtitle-tuOy5zvD",ellipsis:"ellipsis-tuOy5zvD",close:"close-tuOy5zvD"}},66230:e=>{e.exports={button:"button-h8C3IU2n","button-children":"button-children-h8C3IU2n",hiddenArrow:"hiddenArrow-h8C3IU2n",invisibleFocusHandler:"invisibleFocusHandler-h8C3IU2n"}},99171:e=>{e.exports={button:"button-1ARG85Og",disabled:"disabled-1ARG85Og",hidden:"hidden-1ARG85Og",icon:"icon-1ARG85Og",dropped:"dropped-1ARG85Og"}},79756:e=>{e.exports={placeholder:"placeholder-fKHYe1Lk"}},91626:e=>{e.exports={separator:"separator-jtAq6E4V"}},94720:(e,t,n)=>{"use strict";n.d(t,{Button:()=>C});var o=n(59496),r=n(97754),l=n(95604),s=n(9745),i=n(6539),a=n.n(i);function c(e){const{color:t="brand",size:n="medium",variant:o="primary",stretch:s=!1,icon:i,startIcon:c,endIcon:u,iconOnly:d=!1,className:p,isGrouped:h,cellState:m,disablePositionAdjustment:f=!1}=e,g=function(e){let t="";return 0!==e&&(1&e&&(t=r(t,a()["no-corner-top-left"])),2&e&&(t=r(t,a()["no-corner-top-right"])),4&e&&(t=r(t,a()["no-corner-bottom-right"])),8&e&&(t=r(t,a()["no-corner-bottom-left"]))),t}((0,l.getGroupCellRemoveRoundBorders)(m));return r(p,a().button,a()["size-"+n],a()["color-"+t],a()["variant-"+o],s&&a().stretch,(i||c)&&a()["with-start-icon"],u&&a()["with-end-icon"],d&&a()["icon-only"],g,h&&a().grouped,h&&!f&&a()["adjust-position"],h&&m.isTop&&a()["first-row"],h&&m.isLeft&&a()["first-col"])}function u(e){const{size:t,startIcon:n,icon:r,iconOnly:l,children:i,endIcon:c}=e,u=null!=n?n:r;return o.createElement(o.Fragment,null,u&&"xsmall"!==t&&o.createElement(s.Icon,{icon:u,className:a()["start-icon-wrap"]}),i&&o.createElement("span",{className:a().content},i),c&&!l&&"xsmall"!==t&&o.createElement(s.Icon,{icon:c,className:a()["end-icon-wrap"]}))}var d=n(86332),p=n(90186);function h(e){const{className:t,color:n,variant:o,size:r,stretch:l,animated:s,icon:i,iconOnly:a,startIcon:c,endIcon:u,...d}=e;return{...d,...(0,p.filterDataProps)(e),...(0,p.filterAriaProps)(e)}}function m(e){const{reference:t,...n}=e,{isGrouped:r,cellState:l,disablePositionAdjustment:s}=(0,o.useContext)(d.ControlGroupContext),i=c({...n,isGrouped:r,cellState:l,disablePositionAdjustment:s});return o.createElement("button",{...h(n),className:i,ref:t},o.createElement(u,{...n}))}function f(e="default"){switch(e){case"default":return"primary";case"stroke":return"secondary"}}function g(e="primary"){switch(e){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function b(e="m"){switch(e){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}function v(e){const{intent:t,size:n,appearance:o,useFullWidth:r,icon:l,...s}=e;return{...s,color:g(t),size:b(n),variant:f(o),stretch:r,startIcon:l}}function C(e){return o.createElement(m,{...v(e)})}},86332:(e,t,n)=>{"use strict";n.d(t,{ControlGroupContext:()=>o})
;const o=n(59496).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,isLeft:!0}})},95604:(e,t,n)=>{"use strict";function o(e){let t=0;return e.isTop&&e.isLeft||(t+=1),e.isTop&&e.isRight||(t+=2),e.isBottom&&e.isLeft||(t+=8),e.isBottom&&e.isRight||(t+=4),t}n.d(t,{getGroupCellRemoveRoundBorders:()=>o})},67029:(e,t,n)=>{"use strict";n.d(t,{ControlSkeleton:()=>v,InputClasses:()=>f});var o=n(59496),r=n(97754),l=n(88537),s=n(66092),i=n(90186),a=n(86332),c=n(95604);var u=n(21103),d=n.n(u);function p(e){let t="";return 0!==e&&(1&e&&(t=r(t,d()["no-corner-top-left"])),2&e&&(t=r(t,d()["no-corner-top-right"])),4&e&&(t=r(t,d()["no-corner-bottom-right"])),8&e&&(t=r(t,d()["no-corner-bottom-left"]))),t}function h(e,t,n,o){const{removeRoundBorder:l,className:s,intent:i="default",borderStyle:a="thin",size:u,highlight:h,disabled:m,readonly:f,stretch:g,noReadonlyStyles:b,isFocused:v}=e,C=p(null!=l?l:(0,c.getGroupCellRemoveRoundBorders)(n));return r(d().container,d()["intent-"+i],d()["border-"+a],u&&d()["size-"+u],C,h&&d()["with-highlight"],m&&d().disabled,f&&!b&&d().readonly,v&&d().focused,g&&d().stretch,t&&d().grouped,!o&&d()["adjust-position"],n.isTop&&d()["first-row"],n.isLeft&&d()["first-col"],s)}function m(e,t){const{highlight:n,highlightRemoveRoundBorder:o}=e;if(!n)return d().highlight;const l=p(null!=o?o:(0,c.getGroupCellRemoveRoundBorders)(t));return r(d().highlight,d().shown,l)}const f={FontSizeMedium:(0,l.ensureDefined)(d()["font-size-medium"]),FontSizeLarge:(0,l.ensureDefined)(d()["font-size-large"])},g={passive:!1};function b(e,t){const{id:n,role:r,onFocus:l,onBlur:c,onMouseOver:u,onMouseOut:d,onMouseDown:p,onMouseUp:f,onKeyDown:b,onClick:v,tabIndex:C,startSlot:w,middleSlot:S,endSlot:E,onWheel:x,onWheelNoPassive:y=null}=e,{isGrouped:k,cellState:N,disablePositionAdjustment:_=!1}=(0,o.useContext)(a.ControlGroupContext),A=function(e,t=null,n){const r=(0,o.useRef)(null),l=(0,o.useRef)(null),s=(0,o.useCallback)(()=>{if(null===r.current||null===l.current)return;const[e,t,n]=l.current;null!==t&&r.current.addEventListener(e,t,n)},[]),i=(0,o.useCallback)(()=>{if(null===r.current||null===l.current)return;const[e,t,n]=l.current;null!==t&&r.current.removeEventListener(e,t,n)},[]),a=(0,o.useCallback)(e=>{i(),r.current=e,s()},[]);return(0,o.useEffect)(()=>(l.current=[e,t,n],s(),i),[e,t,n]),a}("wheel",y,g);return o.createElement("span",{id:n,role:r,className:h(e,k,N,_),tabIndex:C,ref:(0,s.useMergedRefs)([t,A]),onFocus:l,onBlur:c,onMouseOver:u,onMouseOut:d,onMouseDown:p,onMouseUp:f,onKeyDown:b,onClick:v,onWheel:x,...(0,i.filterDataProps)(e),...(0,i.filterAriaProps)(e)},w,S,E,o.createElement("span",{className:m(e,N)}))}b.displayName="ControlSkeleton";const v=o.forwardRef(b)},78274:(e,t,n)=>{"use strict";n.d(t,{StartSlot:()=>i,MiddleSlot:()=>a,EndSlot:()=>c,AfterSlot:()=>u});var o=n(59496),r=n(97754),l=n(10306),s=n.n(l);function i(e){const{className:t,interactive:n=!0,icon:l=!1,children:i}=e;return o.createElement("span",{className:r(s()["inner-slot"],n&&s().interactive,l&&s().icon,t)},i)}function a(e){
const{className:t,children:n}=e;return o.createElement("span",{className:r(s()["inner-slot"],s()["inner-middle-slot"],t)},n)}function c(e){const{className:t,interactive:n=!0,icon:l=!1,children:i}=e;return o.createElement("span",{className:r(s()["inner-slot"],n&&s().interactive,l&&s().icon,t)},i)}function u(e){const{className:t,children:n}=e;return o.createElement("span",{className:r(s()["after-slot"],t)},n)}},31261:(e,t,n)=>{"use strict";n.d(t,{InputControl:()=>v});var o=n(59496),r=n(97754),l=n(90186),s=n(47201),i=n(48907),a=n(66092),c=n(48027),u=n(29202),d=n(45812),p=n(67029),h=n(78274),m=n(66579),f=n.n(m);function g(e){return!(0,l.isAriaAttribute)(e)&&!(0,l.isDataAttribute)(e)}function b(e){const{id:t,title:n,role:s,tabIndex:i,placeholder:a,name:c,type:u,value:d,defaultValue:m,draggable:b,autoComplete:v,autoFocus:C,maxLength:w,min:S,max:E,step:x,pattern:y,inputMode:k,onSelect:N,onFocus:_,onBlur:A,onKeyDown:O,onKeyUp:D,onKeyPress:R,onChange:j,onDragStart:I,size:M="medium",className:B,inputClassName:z,disabled:K,readonly:F,containerTabIndex:L,startSlot:V,endSlot:T,reference:H,containerReference:P,onContainerFocus:Y,...W}=e,G=(0,l.filterProps)(W,g),U={...(0,l.filterAriaProps)(W),...(0,l.filterDataProps)(W),id:t,title:n,role:s,tabIndex:i,placeholder:a,name:c,type:u,value:d,defaultValue:m,draggable:b,autoComplete:v,autoFocus:C,maxLength:w,min:S,max:E,step:x,pattern:y,inputMode:k,onSelect:N,onFocus:_,onBlur:A,onKeyDown:O,onKeyUp:D,onKeyPress:R,onChange:j,onDragStart:I};return o.createElement(p.ControlSkeleton,{...G,disabled:K,readonly:F,tabIndex:L,className:r(f().container,B),size:M,ref:P,onFocus:Y,startSlot:V,middleSlot:o.createElement(h.MiddleSlot,null,o.createElement("input",{...U,className:r(f().input,z,V&&f()["with-start-slot"],T&&f()["with-end-slot"]),disabled:K,readOnly:F,ref:H})),endSlot:T})}function v(e){e=(0,c.useControl)(e);const{disabled:t,autoSelectOnFocus:n,tabIndex:r=0,onFocus:l,onBlur:p,reference:h,containerReference:m=null}=e,f=(0,o.useRef)(null),g=(0,o.useRef)(null),[v,C]=(0,u.useFocus)(),w=t?void 0:v?-1:r,S=t?void 0:v?r:-1,{isMouseDown:E,handleMouseDown:x,handleMouseUp:y}=(0,d.useIsMouseDown)(),k=(0,s.createSafeMulticastEventHandler)(C.onFocus,(function(e){n&&!E.current&&(0,i.selectAllContent)(e.currentTarget)}),l),N=(0,s.createSafeMulticastEventHandler)(C.onBlur,p),_=(0,o.useCallback)(e=>{f.current=e,h&&("function"==typeof h&&h(e),"object"==typeof h&&(h.current=e))},[f,h]);return o.createElement(b,{...e,isFocused:v,containerTabIndex:w,tabIndex:S,onContainerFocus:function(e){g.current===e.target&&null!==f.current&&f.current.focus()},onFocus:k,onBlur:N,reference:_,containerReference:(0,a.useMergedRefs)([g,m]),onMouseDown:x,onMouseUp:y})}},48027:(e,t,n)=>{"use strict";n.d(t,{useControl:()=>l});var o=n(47201),r=n(29202);function l(e){const{onFocus:t,onBlur:n,intent:l,highlight:s,disabled:i}=e,[a,c]=(0,r.useFocus)(void 0,i),u=(0,o.createSafeMulticastEventHandler)(i?void 0:c.onFocus,t),d=(0,o.createSafeMulticastEventHandler)(i?void 0:c.onBlur,n);return{...e,intent:l||(a?"primary":"default"),
highlight:null!=s?s:a,onFocus:u,onBlur:d}}},29202:(e,t,n)=>{"use strict";n.d(t,{useFocus:()=>r});var o=n(59496);function r(e,t){const[n,r]=(0,o.useState)(!1);(0,o.useEffect)(()=>{t&&n&&r(!1)},[t,n]);const l={onFocus:(0,o.useCallback)((function(t){void 0!==e&&e.current!==t.target||r(!0)}),[e]),onBlur:(0,o.useCallback)((function(t){void 0!==e&&e.current!==t.target||r(!1)}),[e])};return[n,l]}},45812:(e,t,n)=>{"use strict";n.d(t,{useIsMouseDown:()=>r});var o=n(59496);function r(){const e=(0,o.useRef)(!1),t=(0,o.useCallback)(()=>{e.current=!0},[e]),n=(0,o.useCallback)(()=>{e.current=!1},[e]);return{isMouseDown:e,handleMouseDown:t,handleMouseUp:n}}},66092:(e,t,n)=>{"use strict";n.d(t,{useMergedRefs:()=>r});var o=n(59496);function r(e){return(0,o.useCallback)(function(e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}(e),e)}},22064:(e,t,n)=>{"use strict";n.d(t,{createDomId:()=>a,joinDomIds:()=>c});const o=/\s/g;function r(e){return"string"==typeof e}function l(e){switch(typeof e){case"string":return e;case"number":case"bigint":return e.toString(10);case"boolean":case"symbol":return e.toString();default:return null}}function s(e){return e.trim().length>0}function i(e){return e.replace(o,"-")}function a(...e){const t=e.map(l).filter(r).filter(s).map(i);return(t.length>0&&t[0].startsWith("id_")?t:["id",...t]).join("_")}function c(...e){return e.map(l).filter(r).filter(s).join(" ")}},48907:(e,t,n)=>{"use strict";function o(e){null!==e&&e.setSelectionRange(0,e.value.length)}n.d(t,{selectAllContent:()=>o})},47201:(e,t,n)=>{"use strict";function o(...e){return t=>{for(const n of e)void 0!==n&&n(t)}}n.d(t,{createSafeMulticastEventHandler:()=>o})},21317:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ToolWidgetIntervalsAddDialog:()=>h});var o=n(59496),r=n(28353),l=n(50182),s=n(45685),i=n(31261),a=n(59064),c=n(86656),u=n(53374),d=n(22169);const p=u.INTERVALS.map(e=>({value:e.name,content:e.label}));function h(e){const{onAdd:t,onClose:n,onUnmount:h}=e,[m,f]=(0,o.useState)(u.INTERVALS[0].name),[g,b]=(0,o.useState)("1");return(0,o.useEffect)(()=>()=>{h&&h()},[]),o.createElement(l.AdaptiveConfirmDialog,{dataName:"add-custom-interval-dialog",title:(0,r.t)("Add custom time interval"),isOpened:!0,onSubmit:function(){t(g,m),n()},onCancel:n,onClickOutside:n,onClose:n,render:()=>o.createElement(c.TouchScrollContainer,{className:d.scrollable,onScroll:C},o.createElement("div",{className:d.content},o.createElement("div",{className:d.row},o.createElement("div",{className:d.title},(0,r.t)("Type")),o.createElement(s.Select,{id:"metric-items",className:d.control,value:m,items:p,onChange:w})),o.createElement("div",{className:d.row},o.createElement("div",{className:d.title},(0,r.t)("Interval")),o.createElement(i.InputControl,{className:d.control,inputMode:"numeric",maxLength:6,value:g,onChange:v})))),defaultActionOnClose:"none",submitButtonText:(0,r.t)("Add"),submitOnEnterKey:!1,fullScreen:!0});function v(e){const{value:t}=e.currentTarget;/^[0-9]*$/.test(t)&&b(t)}function C(){a.globalCloseDelegate.fire()}function w(e){f(e)}}},
50182:(e,t,n)=>{"use strict";n.d(t,{AdaptiveConfirmDialog:()=>p});var o=n(59496),r=n(97754),l=n.n(r),s=n(94720),i=n(88537),a=n(28353),c=n(68335),u=n(85457),d=n(91131);class p extends o.PureComponent{constructor(){super(...arguments),this._dialogRef=o.createRef(),this._handleClose=()=>{const{defaultActionOnClose:e,onSubmit:t,onCancel:n,onClose:o}=this.props;switch(e){case"submit":t();break;case"cancel":n()}o()},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleKeyDown=e=>{const{onSubmit:t,submitButtonDisabled:n,submitOnEnterKey:o}=this.props;13===(0,c.hashFromEvent)(e)&&o&&(e.preventDefault(),n||t())}}render(){const{render:e,onClose:t,onSubmit:n,onCancel:r,footerLeftRenderer:l,submitButtonText:s,submitButtonDisabled:i,defaultActionOnClose:a,submitOnEnterKey:c,...d}=this.props;return o.createElement(u.AdaptivePopupDialog,{...d,ref:this._dialogRef,onKeyDown:this._handleKeyDown,render:this._renderChildren(),onClose:this._handleClose})}focus(){(0,i.ensureNotNull)(this._dialogRef.current).focus()}_renderChildren(){return e=>{const{render:t,footerLeftRenderer:n,additionalButtons:r,submitButtonText:i,submitButtonDisabled:c,onSubmit:u,cancelButtonText:p,showCancelButton:h=!0,submitButtonClassName:m,cancelButtonClassName:f,buttonsWrapperClassName:g}=this.props;return o.createElement(o.Fragment,null,t(e),o.createElement("div",{className:d.footer},n&&n(e.isSmallWidth),o.createElement("div",{className:l()(d.buttons,g)},r,h&&o.createElement(s.Button,{className:f,name:"cancel",appearance:"stroke",onClick:this._handleCancel},null!=p?p:(0,a.t)("Cancel")),o.createElement("span",{className:d.submitButton},o.createElement(s.Button,{className:m,disabled:c,name:"submit",onClick:u,"data-name":"submit-button"},null!=i?i:(0,a.t)("Ok"))))))}}}p.defaultProps={defaultActionOnClose:"submit",submitOnEnterKey:!0}},85457:(e,t,n)=>{"use strict";n.d(t,{AdaptivePopupDialog:()=>y});var o=n(59496),r=n(88537);var l=n(97754),s=n.n(l),i=n(68335),a=n(35749),c=n(63016),u=n(1109),d=n(24437),p=n(90692),h=n(95711),m=n(52092),f=n(76422),g=n(9745);const b=o.createContext({setHideClose:()=>{}});var v=n(37257),C=n(91441);function w(e){const{title:t,subtitle:n,showCloseIcon:r=!0,onClose:l,renderBefore:i,renderAfter:a,draggable:c,className:u,unsetAlign:d}=e,[p,h]=(0,o.useState)(!1);return o.createElement(b.Provider,{value:{setHideClose:h}},o.createElement("div",{className:s()(C.container,u,(n||d)&&C.unsetAlign)},i,o.createElement("div",{"data-dragg-area":c,className:C.title},o.createElement("div",{className:C.ellipsis},t),n&&o.createElement("div",{className:s()(C.ellipsis,C.subtitle)},n)),a,r&&!p&&o.createElement(g.Icon,{className:C.close,icon:v,onClick:l,"data-name":"close","data-role":"button"})))}var S=n(67179);const E={vertical:20},x={vertical:0};class y extends o.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._orientationMediaQuery=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t
})),this._handleReference=e=>this._reference=e,this._handleClose=()=>{this.props.onClose()},this._handleOpen=()=>{void 0!==this.props.onOpen&&this.props.isOpened&&this.props.onOpen(this.props.fullScreen||window.matchMedia(d.DialogBreakpoints.TabletSmall).matches)},this._handleKeyDown=e=>{var t;if(!e.defaultPrevented)switch(this.props.onKeyDown&&this.props.onKeyDown(e),(0,i.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return void this._handleClose();const{activeElement:n}=document,o=(0,r.ensureNotNull)(this._reference);if(null!==n){if(e.preventDefault(),"true"===(t=n).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();if((0,a.isTextEditingField)(n))return void o.focus();if(o.contains(n))return void this._handleClose()}}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()}}componentDidMount(){var e,t;f.subscribe(m.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),this._handleOpen(),void 0!==this.props.onOpen&&(this._orientationMediaQuery=window.matchMedia("(orientation: portrait)"),e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.addEventListener)?e.addEventListener("change",t):e.addListener(t))}componentWillUnmount(){var e,t;f.unsubscribe(m.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),null!==this._orientationMediaQuery&&(e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.removeEventListener)?e.removeEventListener("change",t):e.removeListener(t))}focus(){(0,r.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,n;return null!==(n=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==n&&n}render(){const{className:e,wrapperClassName:t,headerClassName:n,isOpened:r,title:l,dataName:i,onClickOutside:a,additionalElementPos:m,additionalHeaderElement:f,backdrop:g,shouldForceFocus:b=!0,showSeparator:v,subtitle:C,draggable:y=!0,fullScreen:k=!1,showCloseIcon:N=!0,rounded:_=!0,isAnimationEnabled:A,growPoint:O,dialogTooltip:D,unsetHeaderAlign:R,onDragStart:j,dataDialogName:I}=this.props,M="after"!==m?f:void 0,B="after"===m?f:void 0,z="string"==typeof l?l:I||"";return o.createElement(p.MatchMedia,{rule:d.DialogBreakpoints.SmallHeight},m=>o.createElement(p.MatchMedia,{rule:d.DialogBreakpoints.TabletSmall},d=>o.createElement(c.PopupDialog,{rounded:!(d||k)&&_,className:s()(S.dialog,e),isOpened:r,reference:this._handleReference,onKeyDown:this._handleKeyDown,onClickOutside:a,onClickBackdrop:a,fullscreen:d||k,guard:m?x:E,boundByScreen:d||k,shouldForceFocus:b,backdrop:g,draggable:y,isAnimationEnabled:A,growPoint:O,name:this.props.dataName,dialogTooltip:D,onDragStart:j},o.createElement("div",{className:s()(S.wrapper,t),"data-name":i,"data-dialog-name":z},void 0!==l&&o.createElement(w,{draggable:y&&!(d||k),onClose:this._handleClose,renderAfter:B,renderBefore:M,subtitle:C,title:l,showCloseIcon:N,
className:n,unsetAlign:R}),v&&o.createElement(u.Separator,{className:S.separator}),o.createElement(h.PopupContext.Consumer,null,e=>this._renderChildren(e,d||k))))))}}},46059:(e,t,n)=>{"use strict";n.d(t,{ControlDisclosureView:()=>S});var o=n(59496),r=n(97754),l=n.n(r),s=n(66092),i=n(67029),a=n(78274),c=n(50628),u=n(88537);function d(e,t){return(0,o.useCallback)(()=>function(e,t){const n=(0,u.ensureNotNull)(e).getBoundingClientRect(),o={x:n.left,y:n.top+n.height};return t&&(o.overrideWidth=n.width),o}(e.current,t),[e,t])}const p=JSON.parse('{"size-header-height":"64px"}'),h=parseInt(p["size-header-height"]);function m(e){const{button:t,popupChildren:n,buttonRef:r,listboxId:l,listboxClassName:s,listboxTabIndex:i,matchButtonAndListboxWidths:a,isOpened:u,scrollWrapReference:p,listboxReference:m,onClose:f,onOpen:g,onListboxFocus:b,onListboxBlur:v,onListboxKeyDown:C,listboxAria:w,repositionOnScroll:S=!0,closeOnHeaderOverlap:E=!1}=e,x=d(r,a),y=E?h:0;return o.createElement(o.Fragment,null,t,o.createElement(c.PopupMenu,{...w,id:l,className:s,tabIndex:i,isOpened:u,position:x,repositionOnScroll:S,onClose:f,onOpen:g,doNotCloseOn:r.current,reference:m,scrollWrapReference:p,onFocus:b,onBlur:v,onKeyDown:C,closeOnScrollOutsideOffset:y},n))}var f=n(9745),g=n(89974),b=n(99171);function v(e){const{isDropped:t}=e;return o.createElement(f.Icon,{className:l()(b.icon,t&&b.dropped),icon:g})}function C(e){const{className:t,disabled:n,isDropped:r}=e;return o.createElement("span",{className:l()(b.button,n&&b.disabled,t)},o.createElement(v,{isDropped:r}))}var w=n(66230);const S=o.forwardRef((e,t)=>{const{listboxId:n,className:r,listboxClassName:c,listboxTabIndex:u,hideArrowButton:d,matchButtonAndListboxWidths:p,disabled:h,isOpened:f,scrollWrapReference:g,repositionOnScroll:b,closeOnHeaderOverlap:v,listboxReference:S,size:E="medium",onClose:x,onOpen:y,onListboxFocus:k,onListboxBlur:N,onListboxKeyDown:_,buttonChildren:A,children:O,caretClassName:D,listboxAria:R,...j}=e,I=(0,o.useRef)(null),M=!d&&o.createElement(a.EndSlot,null,o.createElement(C,{isDropped:f,disabled:h,className:D}));return o.createElement(m,{buttonRef:I,listboxId:n,listboxClassName:c,listboxTabIndex:u,isOpened:f,onClose:x,onOpen:y,listboxReference:S,scrollWrapReference:g,onListboxFocus:k,onListboxBlur:N,onListboxKeyDown:_,listboxAria:R,matchButtonAndListboxWidths:p,button:o.createElement(i.ControlSkeleton,{...j,"data-role":"listbox",disabled:h,className:l()(w.button,r),size:E,ref:(0,s.useMergedRefs)([I,t]),middleSlot:o.createElement(a.MiddleSlot,null,o.createElement("span",{className:l()(w["button-children"],d&&w.hiddenArrow)},A)),endSlot:M}),popupChildren:O,repositionOnScroll:b,closeOnHeaderOverlap:v})});S.displayName="ControlDisclosureView"},68721:(e,t,n)=>{"use strict";n.d(t,{useControlDisclosure:()=>c});var o=n(59496),r=n(88537),l=n(29202),s=n(47201),i=n(22064),a=n(35749);function c(e){const{intent:t,highlight:n,...c}=e,{isFocused:u,...d}=function(e){const{id:t,disabled:n,buttonTabIndex:c=0,onFocus:u,onBlur:d,onClick:p}=e,[h,m]=(0,o.useState)(!1),[f,g]=(0,
l.useFocus)(),b=f||h,v=void 0!==t?(0,i.createDomId)(t,"listbox"):void 0,C=(0,o.useRef)(null),w=(0,o.useCallback)(e=>(0,r.ensureNotNull)(C.current).focus(e),[C]),S=(0,o.useRef)(null),E=(0,o.useCallback)(()=>(0,r.ensureNotNull)(S.current).focus(),[S]),x=(0,o.useCallback)(()=>m(!0),[m]),y=(0,o.useCallback)((e=!1)=>{m(!1);const{activeElement:t}=document;t&&(0,a.isTextEditingField)(t)||w({preventScroll:e})},[m,w]),k=(0,o.useCallback)(()=>{h?y():x()},[h,y,x]),N=n?[]:[u,g.onFocus],_=n?[]:[d,g.onBlur],A=n?[]:[p,k],O=(0,s.createSafeMulticastEventHandler)(...N),D=(0,s.createSafeMulticastEventHandler)(..._),R=(0,s.createSafeMulticastEventHandler)(...A);return{listboxId:v,isOpened:h,isFocused:b,buttonTabIndex:n?-1:c,listboxTabIndex:-1,open:x,close:y,toggle:k,onOpen:E,buttonFocusBindings:{onFocus:O,onBlur:D},onButtonClick:R,buttonRef:C,listboxRef:S,buttonAria:{"aria-controls":h?v:void 0,"aria-expanded":h,"aria-disabled":n}}}(c);return{...d,isFocused:u,highlight:null!=n?n:u,intent:null!=t?t:u?"primary":"default"}}},26597:(e,t,n)=>{"use strict";n.d(t,{useKeyboardActionHandler:()=>s,useComposedKeyboardActionHandlers:()=>i,useKeyboardEventHandler:()=>a,useKeyboardToggle:()=>c,useKeyboardClose:()=>u,useKeyboardOpen:()=>d});var o=n(59496),r=n(68335);const l=()=>!0;function s(e,t,n=l){return(0,o.useCallback)(o=>{const r=e.map(e=>"function"==typeof e?e():e);return!(!n()||!r.includes(o))&&(t(),!0)},[...e,t,n])}function i(...e){return(0,o.useCallback)(t=>{for(const n of e)if(n(t))return!0;return!1},[...e])}function a(...e){const t=i(...e);return(0,o.useCallback)(e=>{t((0,r.hashFromEvent)(e))&&e.preventDefault()},[t])}function c(e){return s([13,32],e)}function u(e,t){return s([9,(0,o.useCallback)(()=>r.Modifiers.Shift+9,[]),27],t,(0,o.useCallback)(()=>e,[e]))}function d(e,t){return s([40,38],t,(0,o.useCallback)(()=>!e,[e]))}},45685:(e,t,n)=>{"use strict";n.d(t,{Select:()=>_});var o=n(59496),r=n(22064),l=n(66092),s=n(88537),i=n(74991);const a={duration:200,additionalScroll:0},c={vertical:{scrollSize:"scrollHeight",clientSize:"clientHeight",start:"top",end:"bottom",size:"height"},horizontal:{scrollSize:"scrollWidth",clientSize:"clientWidth",start:"left",end:"right",size:"width"}};function u(e,t){const n=c[e];return t[n.scrollSize]>t[n.clientSize]}function d(e,t,n,o,r,l){const s=function(e,t,n,o=0){const r=c[e];return{start:-1*o,middle:-1*(Math.floor(n[r.size]/2)-Math.floor(t[r.size]/2)),end:-1*(n[r.size]-t[r.size])+o}}(e,o,r,l.additionalScroll);let a=0;if(function(e,t,n){const o=c[e];return t[o.start]<n[o.start]-n[o.size]/2||t[o.end]>n[o.end]+n[o.size]/2}(e,o,r))a=s.middle;else{const t=function(e){const{start:t,middle:n,end:o}=e,r=new Map([[Math.abs(t),{key:"start",value:Math.sign(t)}],[Math.abs(n),{key:"middle",value:Math.sign(n)}],[Math.abs(o),{key:"end",value:Math.sign(o)}]]),l=Math.min(...r.keys());return r.get(l)}(function(e,t,n,o=0){const r=c[e],l=t[r.start]+Math.floor(t[r.size]/2),s=n[r.start]+Math.floor(n[r.size]/2);return{start:t[r.start]-n[r.start]-o,middle:l-s,end:t[r.end]-n[r.end]+o}}(e,o,r,l.additionalScroll))
;a=void 0!==t?s[t.key]:0}return function(e){const{additionalScroll:t=0,duration:n=i.dur,func:o=i.easingFunc.easeInOutCubic,onScrollEnd:r,target:l,wrap:s,direction:a="vertical"}=e;let{targetRect:c,wrapRect:u}=e;c=null!=c?c:l.getBoundingClientRect(),u=null!=u?u:s.getBoundingClientRect();const d=("vertical"===a?c.top-u.top:c.left-u.left)+t,p="vertical"===a?"scrollTop":"scrollLeft",h=s?s[p]:0;let m,f=0;return f=window.requestAnimationFrame((function e(t){let l;if(m?l=t-m:(l=0,m=t),l>=n)return s[p]=h+d,void(r&&r());const i=h+d*o(l/n);s[p]=Math.floor(i),f=window.requestAnimationFrame(e)})),function(){window.cancelAnimationFrame(f),r&&r()}}({...l,target:t,targetRect:o,wrap:n,wrapRect:r,additionalScroll:a,direction:e})}class p{constructor(e=null){this._container=null,this._lastScrolledElement=null,this._stopVerticalScroll=null,this._stopHorizontalScroll=null,this._container=e}scrollTo(e,t=a){if(null!==this._container&&null!==e&&!function(e,t){const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return n.top>=o.top&&n.bottom<=o.bottom&&n.left>=o.left&&n.right<=o.right}(e,this._container)){const n=e.getBoundingClientRect(),o=this._container.getBoundingClientRect();this.stopScroll(),u("vertical",this._container)&&(this._stopVerticalScroll=d("vertical",e,this._container,n,o,this._modifyOptions("vertical",t))),u("horizontal",this._container)&&(this._stopHorizontalScroll=d("horizontal",e,this._container,n,o,this._modifyOptions("horizontal",t)))}this._lastScrolledElement=e}scrollToLastElement(e){this.scrollTo(this._lastScrolledElement,e)}stopScroll(){null!==this._stopVerticalScroll&&this._stopVerticalScroll(),null!==this._stopHorizontalScroll&&this._stopHorizontalScroll()}getContainer(){return this._container}setContainer(e){var t;this._container=e,(null===(t=this._container)||void 0===t?void 0:t.contains(this._lastScrolledElement))||(this._lastScrolledElement=null)}destroy(){this.stopScroll(),this._container=null,this._lastScrolledElement=null}_handleScrollEnd(e){"vertical"===e?this._stopVerticalScroll=null:this._stopHorizontalScroll=null}_modifyOptions(e,t){return Object.assign({},t,{onScrollEnd:()=>{this._handleScrollEnd(e),void 0!==t.onScrollEnd&&t.onScrollEnd()}})}}function h(e,t){const n=(0,o.useRef)(null),r=(0,o.useRef)(new WeakMap),l=function(e){const t=(0,o.useRef)(null);return(0,o.useEffect)(()=>(t.current=new p(e),()=>(0,s.ensureNotNull)(t.current).destroy()),[]),t}(n.current),i=(0,o.useCallback)(()=>{null!==l.current&&null!==n.current&&l.current.getContainer()!==n.current&&l.current.setContainer(n.current)},[l,n]),a=(0,o.useCallback)(e=>{n.current=e},[n]),c=(0,o.useCallback)((e,t)=>{r.current.set(e,t)},[r]),u=(0,o.useCallback)((e,t)=>{if(!e)return;const n=r.current.get(e);n&&(i(),(0,s.ensureNotNull)(l.current).scrollTo(n,t))},[r,l]);return(0,o.useEffect)(()=>u(e,t),[u,e]),[a,c,u]}var m=n(16396),f=n(4889),g=n(43370);var b=n(62820),v=n(26597);function C(e,t){return e>=0?e%t:(t-Math.abs(e)%t)%t}const w={next:[40,()=>(0,b.isRtl)()?37:39],previous:[38,()=>(0,b.isRtl)()?39:37],first:[33,36],last:[34,35]}
;var S=n(46059),E=n(68721),x=n(79756);function y(e){return!e.readonly}function k(e,t){var n;return null!==(n=null==t?void 0:t.id)&&void 0!==n?n:(0,r.createDomId)(e,"item",null==t?void 0:t.value)}function N(e){var t,n;const{selectedItem:r,placeholder:l}=e;if(!r)return o.createElement("span",{className:x.placeholder},l);const s=null!==(n=null!==(t=r.selectedContent)&&void 0!==t?t:r.content)&&void 0!==n?n:r.value;return o.createElement("span",null,s)}const _=o.forwardRef((e,t)=>{const{id:n,menuClassName:s,menuItemClassName:i,tabIndex:a,disabled:c,highlight:u,intent:d,hideArrowButton:p,placeholder:b,addPlaceholderToItems:x=!0,value:_,"aria-labelledby":A,onFocus:O,onBlur:D,onClick:R,onChange:j,repositionOnScroll:I=!0,...M}=e;let{items:B}=e;if(b&&x){B=[{value:void 0,content:b,id:(0,r.createDomId)(n,"placeholder")},...B]}const{listboxId:z,isOpened:K,isFocused:F,buttonTabIndex:L,listboxTabIndex:V,highlight:T,intent:H,open:P,onOpen:Y,close:W,toggle:G,buttonFocusBindings:U,onButtonClick:J,buttonRef:Q,listboxRef:q,buttonAria:$}=(0,E.useControlDisclosure)({id:n,disabled:c,buttonTabIndex:a,intent:d,highlight:u,onFocus:O,onBlur:D,onClick:R}),X=B.filter(y),Z=X.find(e=>e.value===_),[ee,te,ne]=h(Z),oe=(0,r.joinDomIds)(A,n),re=oe.length>0?oe:void 0,le=(0,o.useMemo)(()=>({role:"listbox","aria-labelledby":A,"aria-activedescendant":k(n,Z)}),[A,Z]),se=(0,o.useCallback)(e=>e.value===_,[_]),ie=(0,o.useCallback)(e=>j&&j(e.value),[j]),ae=function(e,t,n,r=!0,l={}){const s=(0,o.useCallback)(()=>{const o=e.findIndex(t);if(o===e.length-1&&!r)return;const l=C(o+1,e.length);n&&n(e[l])},[e,t,n,r]),i=(0,o.useCallback)(()=>{const o=e.findIndex(t);if(0===o&&!r)return;const l=C(o-1,e.length);n&&n(e[l])},[e,t,n,r]),a=(0,o.useCallback)(()=>{n&&n(e[0])},[n,e]),c=(0,o.useCallback)(()=>{n&&n(e[e.length-1])},[n,e]),{next:u=w.next,previous:d=w.previous,first:p=w.first,last:h=w.last}=l;return(0,v.useComposedKeyboardActionHandlers)((0,v.useKeyboardActionHandler)(u,s),(0,v.useKeyboardActionHandler)(d,i),(0,v.useKeyboardActionHandler)(p,a),(0,v.useKeyboardActionHandler)(h,c))}(X,se,ie,!1,{next:[40],previous:[38]}),ce=(0,v.useKeyboardToggle)(G),ue=(0,v.useKeyboardClose)(K,W),de=(0,v.useKeyboardOpen)(K,P),pe=(0,v.useKeyboardEventHandler)(ce,ue,de),he=(0,v.useKeyboardEventHandler)(ae,ce,ue),me=function(e){const t=(0,o.useRef)(""),n=(0,o.useMemo)(()=>(0,f.default)(()=>{t.current=""},500),[]),r=(0,o.useMemo)(()=>(0,g.default)(e,200),[e]);return(0,o.useCallback)(e=>{e.key.length>0&&e.key.length<3&&(t.current+=e.key,r(t.current,e),n())},[n,r])}((e,t)=>{const n=function(e,t){return e.find(e=>{var n;const o=t.toLowerCase();return!e.readonly&&(!e.readonly&&("string"==typeof e.content&&e.content.toLowerCase().startsWith(o)||String(null!==(n=e.value)&&void 0!==n?n:"").toLowerCase().startsWith(o)))})}(X,e);void 0!==n&&j&&(t.stopPropagation(),K||P(),j(n.value))});return o.createElement(S.ControlDisclosureView,{...M,...$,...U,id:n,role:"button",tabIndex:L,"aria-owns":$["aria-controls"],"aria-haspopup":"listbox","aria-labelledby":re,disabled:c,hideArrowButton:p,isFocused:F,
isOpened:K,highlight:T,intent:H,ref:(0,l.useMergedRefs)([Q,t]),onClick:J,onOpen:function(){ne(Z,{duration:0}),Y()},onClose:W,onKeyDown:function(e){pe(e),e.defaultPrevented||me(e)},listboxId:z,listboxTabIndex:V,listboxClassName:s,listboxAria:le,listboxReference:q,scrollWrapReference:ee,onListboxKeyDown:function(e){he(e),e.defaultPrevented||me(e)},buttonChildren:o.createElement(N,{selectedItem:Z,placeholder:b}),repositionOnScroll:I},B.map((e,t)=>{var r;if(e.readonly)return o.createElement(o.Fragment,{key:"readonly_item_"+t},e.content);const l=k(n,e);return o.createElement(m.PopupMenuItem,{key:l,id:l,className:i,role:"option","aria-selected":_===e.value,isActive:_===e.value,label:null!==(r=e.content)&&void 0!==r?r:e.value,onClick:fe,onClickArg:e.value,isDisabled:e.disabled,reference:t=>te(e,t)})}));function fe(e){j&&j(e)}});_.displayName="Select"},1109:(e,t,n)=>{"use strict";n.d(t,{Separator:()=>s});var o=n(59496),r=n(97754),l=n(91626);function s(e){return o.createElement("div",{className:r(l.separator,e.className)})}},86656:(e,t,n)=>{"use strict";n.d(t,{TouchScrollContainer:()=>i});var o=n(59496),r=n(59142),l=n(88537),s=n(49483);function i(e){const{reference:t,children:n,...l}=e,i=(0,o.useRef)(null),c=(0,o.useCallback)(e=>{t&&(t.current=e),s.CheckMobile.iOS()&&(null!==i.current&&(0,r.enableBodyScroll)(i.current),i.current=e,null!==i.current&&(0,r.disableBodyScroll)(i.current,{allowTouchMove:a(i)}))},[t]);return o.createElement("div",{ref:c,...l},n)}function a(e){return t=>{const n=(0,l.ensureNotNull)(e.current),o=document.activeElement;return!n.contains(t)||null!==o&&n.contains(o)&&o.contains(t)}}},89974:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 7" width="11" height="7" fill="none"><path stroke="currentColor" stroke-width="1.3" d="M.5 1.5l5 4 5-4"/></svg>'},37257:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" width="17" height="17" fill="currentColor"><path d="m.58 1.42.82-.82 15 15-.82.82z"/><path d="m.58 15.58 15-15 .82.82-15 15z"/></svg>'}}]);