10 lines
30 KiB
JavaScript
10 lines
30 KiB
JavaScript
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[8178],{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"}},37593:e=>{e.exports={wrapper:"wrapper-5Xd5conM",input:"input-5Xd5conM",box:"box-5Xd5conM",icon:"icon-5Xd5conM",noOutline:"noOutline-5Xd5conM","intent-danger":"intent-danger-5Xd5conM",check:"check-5Xd5conM",dot:"dot-5Xd5conM"}},96670:e=>{e.exports={checkbox:"checkbox-GxG6nBa7",reverse:"reverse-GxG6nBa7",label:"label-GxG6nBa7",baseline:"baseline-GxG6nBa7"}},15994:e=>{e.exports={radio:"radio-vpA3AYsc",input:"input-vpA3AYsc",box:"box-vpA3AYsc",reverse:"reverse-vpA3AYsc",label:"label-vpA3AYsc",wrapper:"wrapper-vpA3AYsc",noOutline:"noOutline-vpA3AYsc"}},66875:e=>{e.exports={errors:"errors-Cv6NxnRZ",show:"show-Cv6NxnRZ",error:"error-Cv6NxnRZ"}},93314:e=>{e.exports={"error-icon":"error-icon-llFIA0b4","intent-danger":"intent-danger-llFIA0b4","intent-warning":"intent-warning-llFIA0b4"}},52965:e=>{e.exports={"static-messages":"static-messages-Yp0dNSLN",errors:"errors-Yp0dNSLN",warnings:"warnings-Yp0dNSLN",message:"message-Yp0dNSLN"}},16059:e=>{e.exports={menuWrap:"menuWrap-8MKeZifP",isMeasuring:"isMeasuring-8MKeZifP",scrollWrap:"scrollWrap-8MKeZifP",momentumBased:"momentumBased-8MKeZifP",menuBox:"menuBox-8MKeZifP",isHidden:"isHidden-8MKeZifP"}},23576:e=>{e.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",item:"item-4TFSfyGO",hovered:"hovered-4TFSfyGO",isDisabled:"isDisabled-4TFSfyGO",isActive:"isActive-4TFSfyGO",shortcut:"shortcut-4TFSfyGO",toolbox:"toolbox-4TFSfyGO",withIcon:"withIcon-4TFSfyGO",icon:"icon-4TFSfyGO",labelRow:"labelRow-4TFSfyGO",label:"label-4TFSfyGO",showOnHover:"showOnHover-4TFSfyGO"}},97737:(e,t,n)=>{"use strict";n.d(t,{AnchorButton:()=>u,Button:()=>c});var r=n(59496),o=n(71036);function s(e="default"){switch(e){case"default":return"primary";case"stroke":return"secondary"}}function i(e="primary"){switch(e){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}
|
|
function a(e="m"){switch(e){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}function l(e){const{intent:t,size:n,appearance:r,useFullWidth:o,icon:l,...c}=e;return{...c,color:i(t),size:a(n),variant:s(r),stretch:o,startIcon:l}}function c(e){return r.createElement(o.SquareButton,{...l(e)})}function h(e){const{intent:t,size:n,appearance:r,useFullWidth:o,icon:l,...c}=e;return{...c,color:i(t),size:a(n),variant:s(r),stretch:o,startIcon:l}}function u(e){return r.createElement(o.SquareAnchorButton,{...h(e)})}},71036:(e,t,n)=>{"use strict";n.d(t,{SquareAnchorButton:()=>f,SquareButton:()=>m});var r=n(59496),o=n(97754),s=n(95604),i=n(9745),a=n(6539),l=n.n(a);function c(e){const{color:t="brand",size:n="medium",variant:r="primary",stretch:i=!1,icon:a,startIcon:c,endIcon:h,iconOnly:u=!1,className:d,isGrouped:p,cellState:m,disablePositionAdjustment:g=!1}=e,f=function(e){let t="";return 0!==e&&(1&e&&(t=o(t,l()["no-corner-top-left"])),2&e&&(t=o(t,l()["no-corner-top-right"])),4&e&&(t=o(t,l()["no-corner-bottom-right"])),8&e&&(t=o(t,l()["no-corner-bottom-left"]))),t}((0,s.getGroupCellRemoveRoundBorders)(m));return o(d,l().button,l()["size-"+n],l()["color-"+t],l()["variant-"+r],i&&l().stretch,(a||c)&&l()["with-start-icon"],h&&l()["with-end-icon"],u&&l()["icon-only"],f,p&&l().grouped,p&&!g&&l()["adjust-position"],p&&m.isTop&&l()["first-row"],p&&m.isLeft&&l()["first-col"])}function h(e){const{size:t,startIcon:n,icon:o,iconOnly:s,children:a,endIcon:c}=e,h=null!=n?n:o;return r.createElement(r.Fragment,null,h&&"xsmall"!==t&&r.createElement(i.Icon,{icon:h,className:l()["start-icon-wrap"]}),a&&r.createElement("span",{className:l().content},a),c&&!s&&"xsmall"!==t&&r.createElement(i.Icon,{icon:c,className:l()["end-icon-wrap"]}))}var u=n(86332),d=n(90186);function p(e){const{className:t,color:n,variant:r,size:o,stretch:s,animated:i,icon:a,iconOnly:l,startIcon:c,endIcon:h,...u}=e;return{...u,...(0,d.filterDataProps)(e),...(0,d.filterAriaProps)(e)}}function m(e){const{reference:t,...n}=e,{isGrouped:o,cellState:s,disablePositionAdjustment:i}=(0,r.useContext)(u.ControlGroupContext),a=c({...n,isGrouped:o,cellState:s,disablePositionAdjustment:i});return r.createElement("button",{...p(n),className:a,ref:t},r.createElement(h,{...n}))}function g(e){const{className:t,color:n,variant:r,size:o,stretch:s,animated:i,icon:a,iconOnly:l,startIcon:c,endIcon:h,...u}=e;return{...u,...(0,d.filterDataProps)(e),...(0,d.filterAriaProps)(e)}}function f(e){const{reference:t}=e,{isGrouped:n,cellState:o,disablePositionAdjustment:s}=(0,r.useContext)(u.ControlGroupContext),i=c({...e,isGrouped:n,cellState:o,disablePositionAdjustment:s});return r.createElement("a",{...g(e),className:i,ref:t},r.createElement(h,{...e}))}},84413:(e,t,n)=>{"use strict";n.d(t,{CheckboxInput:()=>c});var r=n(59496),o=n(97754),s=n(9745),i=n(49154),a=n(37593),l=n.n(a);function c(e){const t=o(l().box,l()["intent-"+e.intent],{[l().check]:!Boolean(e.indeterminate),[l().dot]:Boolean(e.indeterminate),[l().noOutline]:-1===e.tabIndex}),n=o(l().wrapper,e.className)
|
|
;return r.createElement("span",{className:n,title:e.title},r.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:l().input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference}),r.createElement("span",{className:t},r.createElement(s.Icon,{icon:i,className:l().icon})))}},15294:(e,t,n)=>{"use strict";n.d(t,{Checkbox:()=>c,GroupedCheckbox:()=>h});var r=n(59496),o=n(97754),s=n(54349),i=n(84413),a=n(96670),l=n.n(a);class c extends r.PureComponent{render(){const{inputClassName:e,labelClassName:t,...n}=this.props,s=o(this.props.className,l().checkbox,{[l().reverse]:Boolean(this.props.labelPositionReverse),[l().baseline]:Boolean(this.props.labelAlignBaseline)}),a=o(l().label,t,{[l().disabled]:this.props.disabled});let c=null;return this.props.label&&(c=r.createElement("span",{className:a,title:this.props.title},this.props.label)),r.createElement("label",{className:s},r.createElement(i.CheckboxInput,{...n,className:e}),c)}}c.defaultProps={value:"on"};const h=(0,s.makeSwitchGroupItem)(c)},45631:(e,t,n)=>{"use strict";n.d(t,{RadioButton:()=>c});var r,o=n(59496),s=n(97754),i=n(54349),a=n(15994),l=n.n(a);const c=(0,i.makeSwitchGroupItem)(((r=class extends o.PureComponent{constructor(){super(...arguments),this._onChange=()=>{this.props.onChange&&this.props.onChange(this.props.value)}}render(){const e=s(this.props.className,l().radio,{[l().reverse]:Boolean(this.props.labelPositionReverse)}),t=s(l().label,{[l().disabled]:this.props.disabled}),n=s(l().box,{[l().noOutline]:-1===this.props.tabIndex});let r=null;return this.props.label&&(r=o.createElement("span",{className:t},this.props.label)),o.createElement("label",{className:e},o.createElement("span",{className:l().wrapper,title:this.props.title},o.createElement("input",{id:this.props.id,tabIndex:this.props.tabIndex,autoFocus:this.props.autoFocus,role:this.props.role,className:l().input,type:"radio",name:this.props.name,checked:this.props.checked,disabled:this.props.disabled,value:this.props.value,onChange:this._onChange,ref:this.props.reference}),o.createElement("span",{className:n})),r)}}).defaultProps={value:"on"},r))},54349:(e,t,n)=>{"use strict";n.d(t,{SwitchGroup:()=>s,makeSwitchGroupItem:()=>i});var r=n(59496),o=n(19036);class s extends r.PureComponent{constructor(){super(...arguments),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)}}getChildContext(){return{switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return this.props.children}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach(t=>t(e))}_getUpdates(e,t){
|
|
return[...t,...e].filter(n=>t.includes(n)?!e.includes(n):e.includes(n))}}function i(e){var t;return(t=class extends r.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.switchGroupContext.getOnChange()(e)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}componentDidMount(){this.context.switchGroupContext.subscribe(this._onUpdate)}render(){return r.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.switchGroupContext.unsubscribe(this._onUpdate)}_getName(){return this.context.switchGroupContext.getName()}_isChecked(){return this.context.switchGroupContext.getValues().includes(this.props.value)}}).contextTypes={switchGroupContext:o.any.isRequired},t}s.childContextTypes={switchGroupContext:o.any.isRequired}},1405:(e,t,n)=>{"use strict";n.d(t,{anchors:()=>r});n(59496);const r={bottom:{attachment:{horizontal:"left",vertical:"top"},targetAttachment:{horizontal:"left",vertical:"bottom"}},top:{attachment:{horizontal:"left",vertical:"bottom"},targetAttachment:{horizontal:"left",vertical:"top"}},topRight:{attachment:{horizontal:"right",vertical:"bottom"},targetAttachment:{horizontal:"right",vertical:"top"}},bottomRight:{attachment:{horizontal:"right",vertical:"top"},targetAttachment:{horizontal:"right",vertical:"bottom"}}}},70412:(e,t,n)=>{"use strict";n.d(t,{hoverMouseEventFilter:()=>s,useAccurateHover:()=>i,useHover:()=>o});var r=n(59496);function o(){const[e,t]=(0,r.useState)(!1);return[e,{onMouseOver:function(e){s(e)&&t(!0)},onMouseOut:function(e){s(e)&&t(!1)}}]}function s(e){return!e.currentTarget.contains(e.relatedTarget)}function i(e){const[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const t=t=>{if(null===e.current)return;const r=e.current.contains(t.target);n(r)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)},[]),t}},10959:(e,t,n)=>{"use strict";n.d(t,{ErrorIcon:()=>l});var r=n(59496),o=n(97754),s=n(9745),i=n(83546),a=n(93314);function l(e){const{intent:t="danger"}=e;return r.createElement(s.Icon,{icon:i,className:o(a["error-icon"],a["intent-"+t])})}},86623:(e,t,n)=>{"use strict";n.d(t,{FormInput:()=>c});var r=n(59496),o=n(31261),s=n(86629),i=n(78274),a=n(47201),l=n(66092);function c(e){var t;const{intent:n,onFocus:c,onBlur:h,onMouseOver:u,onMouseOut:d,containerReference:p=null,endSlot:m,hasErrors:g,hasWarnings:f,errors:v,warnings:b,alwaysShowAttachedErrors:w,iconHidden:C,messagesPosition:_,messagesAttachment:x,customErrorsAttachment:E,messagesRoot:M,inheritMessagesWidthFromTarget:S,disableMessagesRtlStyles:y,...k}=e,O=(0,s.useControlValidationLayout)({hasErrors:g,hasWarnings:f,errors:v,warnings:b,alwaysShowAttachedErrors:w,iconHidden:C,messagesPosition:_,messagesAttachment:x,customErrorsAttachment:E,messagesRoot:M,inheritMessagesWidthFromTarget:S,disableMessagesRtlStyles:y}),N=(0,a.createSafeMulticastEventHandler)(c,O.onFocus),A=(0,a.createSafeMulticastEventHandler)(h,O.onBlur),R=(0,
|
|
a.createSafeMulticastEventHandler)(u,O.onMouseOver),P=(0,a.createSafeMulticastEventHandler)(d,O.onMouseOut);return r.createElement(r.Fragment,null,r.createElement(o.InputControl,{...k,intent:null!==(t=O.intent)&&void 0!==t?t:n,onFocus:N,onBlur:A,onMouseOver:R,onMouseOut:P,containerReference:(0,l.useMergedRefs)([p,O.containerReference]),endSlot:r.createElement(r.Fragment,null,O.icon&&r.createElement(i.EndSlot,{icon:!0},O.icon),m)}),O.renderedErrors)}},86629:(e,t,n)=>{"use strict";n.d(t,{MessagesPosition:()=>v,useControlValidationLayout:()=>k});var r=n(59496),o=n(97754),s=n(29202),i=n(70412),a=n(78274),l=n(1405),c=n(86431),h=n(87995);var u=n(66875),d=n(62820);class p extends r.PureComponent{render(){const{children:e=[],show:t=!1,customErrorClass:n,disableRtlStyles:s}=this.props,i=o(u.errors,{[u.show]:t},n),a=e.map((e,t)=>r.createElement("div",{className:u.error,key:t},e));let l={position:"absolute",top:this.props.top,width:this.props.width,height:this.props.height,bottom:void 0!==this.props.bottom?this.props.bottom:"100%",right:void 0!==this.props.right?this.props.right:0,left:this.props.left,zIndex:this.props.zIndex,maxWidth:this.props.maxWidth};if((0,d.isRtl)()&&!s){const{left:e,right:t}=l;l={...l,left:t,right:e}}return r.createElement("div",{style:l,className:i},a)}}const m=(0,c.makeOverlapable)((g=p,(f=class extends r.PureComponent{constructor(e){super(e),this._getComponentInstance=e=>{this._instance=e},this._throttleCalcProps=()=>{requestAnimationFrame(()=>this.setState(this._calcProps(this.props)))},this.state=this._getStateFromProps()}componentDidMount(){this._instanceElem=h.findDOMNode(this._instance),this.props.attachOnce||this._subscribe(),this.setState(this._calcProps(this.props))}componentDidUpdate(e){e.children===this.props.children&&e.top===this.props.top&&e.left===this.props.left&&e.width===this.props.width||this.setState(this._getStateFromProps(),()=>this.setState(this._calcProps(this.props)))}render(){return r.createElement("div",{style:{position:"absolute",width:"100%",top:0,left:0}},r.createElement(g,{...this.props,ref:this._getComponentInstance,top:this.state.top,bottom:void 0!==this.state.bottom?this.state.bottom:"auto",right:void 0!==this.state.right?this.state.right:"auto",left:this.state.left,width:this.state.width,maxWidth:this.state.maxWidth},this.props.children))}componentWillUnmount(){this._unsubsribe()}_getStateFromProps(){return{bottom:this.props.bottom,left:this.props.left,right:this.props.right,top:void 0!==this.props.top?this.props.top:-1e4,width:this.props.inheritWidthFromTarget?this.props.target&&this.props.target.getBoundingClientRect().width:this.props.width,maxWidth:this.props.inheritMaxWidthFromTarget&&this.props.target&&this.props.target.getBoundingClientRect().width}}_calcProps(e){if(e.target&&e.attachment&&e.targetAttachment){const t=this._calcTargetProps(e.target,e.attachment,e.targetAttachment);if(null===t)return{};const{width:n,inheritWidthFromTarget:r=!0,inheritMaxWidthFromTarget:o=!1}=this.props,s={width:r?t.width:n,maxWidth:o?t.width:void 0};switch(e.attachment.vertical){
|
|
case"bottom":case"middle":s.top=t.y;break;default:s[e.attachment.vertical]=t.y}switch(e.attachment.horizontal){case"right":case"center":s.left=t.x;break;default:s[e.attachment.horizontal]=t.x}return s}return{}}_calcTargetProps(e,t,n){const r=e.getBoundingClientRect(),o=this._instanceElem.getBoundingClientRect(),s="parent"===this.props.root?this._getCoordsRelToParentEl(e,r):this._getCoordsRelToDocument(r);if(null===s)return null;const i=this._getDimensions(o),a=this._getDimensions(r).width;let l=0,c=0;switch(t.vertical){case"top":c=s[n.vertical];break;case"bottom":c=s[n.vertical]-i.height;break;case"middle":c=s[n.vertical]-i.height/2}switch(t.horizontal){case"left":l=s[n.horizontal];break;case"right":l=s[n.horizontal]-i.width;break;case"center":l=s[n.horizontal]-i.width/2}return"number"==typeof this.props.attachmentOffsetY&&(c+=this.props.attachmentOffsetY),"number"==typeof this.props.attachmentOffsetX&&(l+=this.props.attachmentOffsetX),{x:l,y:c,width:a}}_getCoordsRelToDocument(e){const t=pageYOffset,n=pageXOffset,r=e.top+t,o=e.bottom+t,s=e.left+n;return{top:r,bottom:o,left:s,right:e.right+n,middle:(r+e.height)/2,center:s+e.width/2}}_getCoordsRelToParentEl(e,t){const n=e.offsetParent;if(null===n)return null;const r=n.scrollTop,o=n.scrollLeft,s=e.offsetTop+r,i=e.offsetLeft+o,a=t.width+i;return{top:s,bottom:t.height+s,left:i,right:a,middle:(s+t.height)/2,center:(i+t.width)/2}}_getDimensions(e){return{height:e.height,width:e.width}}_subscribe(){"document"===this.props.root&&(window.addEventListener("scroll",this._throttleCalcProps,!0),window.addEventListener("resize",this._throttleCalcProps))}_unsubsribe(){window.removeEventListener("scroll",this._throttleCalcProps,!0),window.removeEventListener("resize",this._throttleCalcProps)}}).displayName="Attachable Component",f));var g,f,v,b,w=n(10959),C=n(52965);!function(e){e[e.Attached=0]="Attached",e[e.Static=1]="Static",e[e.Hidden=2]="Hidden"}(v||(v={})),function(e){e.Top="top",e.Bottom="bottom"}(b||(b={}));const _={top:{attachment:l.anchors.topRight.attachment,targetAttachment:l.anchors.topRight.targetAttachment,attachmentOffsetY:-4},bottom:{attachment:l.anchors.bottomRight.attachment,targetAttachment:l.anchors.bottomRight.targetAttachment,attachmentOffsetY:4}};function x(e){const{isOpened:t,target:n,errorAttachment:o=b.Top,customErrorsAttachment:s,root:i="parent",inheritWidthFromTarget:a=!1,disableRtlStyles:l,children:c}=e,{attachment:h,targetAttachment:u,attachmentOffsetY:d}=null!=s?s:_[o];return r.createElement(m,{isOpened:t,target:n,root:i,inheritWidthFromTarget:a,attachment:h,targetAttachment:u,attachmentOffsetY:d,disableRtlStyles:l,inheritMaxWidthFromTarget:!0,show:!0},c)}function E(e,t){return Boolean(e)&&void 0!==t&&t.length>0}function M(e,t,n){return e===v.Attached&&E(t,n)}function S(e,t,n){return e===v.Static&&E(t,n)}function y(e,t,n){const{hasErrors:r,hasWarnings:o,alwaysShowAttachedErrors:s,iconHidden:i,errors:a,warnings:l,messagesPosition:c=v.Static}=e,h=M(c,r,a),u=M(c,o,l),d=h&&(t||n||Boolean(s)),p=!d&&u&&(t||n),m=S(c,r,a),g=!m&&S(c,o,l),f=!i&&Boolean(r)
|
|
;return{hasAttachedErrorMessages:h,hasAttachedWarningMessages:u,showAttachedErrorMessages:d,showAttachedWarningMessages:p,showStaticErrorMessages:m,showStaticWarningMessages:g,showErrorIcon:f,showWarningIcon:!i&&!f&&Boolean(o),intent:function(e,t){return Boolean(e)?"danger":Boolean(t)?"warning":void 0}(r,o)}}function k(e){var t,n;const{errors:l,warnings:c,messagesAttachment:h,customErrorsAttachment:u,messagesRoot:d,inheritMessagesWidthFromTarget:p,disableMessagesRtlStyles:m}=e,[g,f]=(0,s.useFocus)(),[v,b]=(0,i.useHover)(),_=(0,r.useRef)(null),{hasAttachedErrorMessages:E,hasAttachedWarningMessages:M,showAttachedErrorMessages:S,showAttachedWarningMessages:k,showStaticErrorMessages:O,showStaticWarningMessages:N,showErrorIcon:A,showWarningIcon:R,intent:P}=y(e,g,v),W=A||R?r.createElement(w.ErrorIcon,{intent:A?"danger":"warning"}):void 0,T=E?r.createElement(x,{errorAttachment:h,customErrorsAttachment:u,isOpened:S,target:_.current,root:d,inheritWidthFromTarget:p,disableRtlStyles:m,children:l}):void 0,F=M?r.createElement(x,{errorAttachment:h,isOpened:k,target:_.current,root:d,inheritWidthFromTarget:p,disableRtlStyles:m,children:c}):void 0,z=O?r.createElement(a.AfterSlot,{className:o(C["static-messages"],C.errors)},null==l?void 0:l.map((e,t)=>r.createElement("p",{key:t,className:C.message},e))):void 0,I=N?r.createElement(a.AfterSlot,{className:o(C["static-messages"],C.warnings)},null==c?void 0:c.map((e,t)=>r.createElement("p",{key:t,className:C.message},e))):void 0;return{icon:W,renderedErrors:null!==(n=null!==(t=null!=T?T:F)&&void 0!==t?t:z)&&void 0!==n?n:I,containerReference:_,intent:P,...f,...b}}},64706:(e,t,n)=>{"use strict";n.d(t,{MenuContext:()=>r});const r=n(59496).createContext(null)},27317:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_MENU_THEME:()=>f,Menu:()=>v});var r=n(59496),o=n(97754),s=n.n(o),i=n(88537),a=n(64514),l=n(54475),c=n(50655),h=n(59064),u=n(88216),d=n(25760),p=n(14758),m=n(64706),g=n(16059);const f=g;class v extends r.PureComponent{constructor(e){super(e),this._containerRef=null,this._scrollWrapRef=null,this._raf=null,this._scrollRaf=null,this._scrollTimeout=void 0,this._manager=new u.OverlapManager,this._hotkeys=null,this._scroll=0,this._handleContainerRef=e=>{this._containerRef=e,this.props.reference&&("function"==typeof this.props.reference&&this.props.reference(e),"object"==typeof this.props.reference&&(this.props.reference.current=e))},this._handleScrollWrapRef=e=>{this._scrollWrapRef=e,"function"==typeof this.props.scrollWrapReference&&this.props.scrollWrapReference(e),"object"==typeof this.props.scrollWrapReference&&(this.props.scrollWrapReference.current=e)},this._handleMeasure=({callback:e,forceRecalcPosition:t}={})=>{var n,r,o,s;if(this.state.isMeasureValid&&!t)return;const{position:l}=this.props,c=(0,i.ensureNotNull)(this._containerRef);let h=c.getBoundingClientRect();const u=document.documentElement.clientHeight,d=document.documentElement.clientWidth,p=null!==(n=this.props.closeOnScrollOutsideOffset)&&void 0!==n?n:0;let m=u-0-p;const g=h.height>m;if(g){(0,
|
|
i.ensureNotNull)(this._scrollWrapRef).style.overflowY="scroll",h=c.getBoundingClientRect()}const{width:f,height:v}=h,b="function"==typeof l?l(f,v,u):l,w=d-(null!==(r=b.overrideWidth)&&void 0!==r?r:f)-0,C=(0,a.clamp)(b.x,0,Math.max(0,w)),_=0+p,x=u-(null!==(o=b.overrideHeight)&&void 0!==o?o:v)-0;let E=(0,a.clamp)(b.y,_,Math.max(_,x));if(b.forbidCorrectYCoord&&E<b.y&&(m-=b.y-E,E=b.y),t&&void 0!==this.props.closeOnScrollOutsideOffset&&b.y<=this.props.closeOnScrollOutsideOffset)return void this._handleGlobalClose(!0);const M=null!==(s=b.overrideHeight)&&void 0!==s?s:g?m:void 0;this.setState({appearingMenuHeight:t?this.state.appearingMenuHeight:M,appearingMenuWidth:t?this.state.appearingMenuWidth:b.overrideWidth,appearingPosition:{x:C,y:E},isMeasureValid:!0},()=>{this._restoreScrollPosition(),e&&e()})},this._restoreScrollPosition=()=>{const e=document.activeElement,t=(0,i.ensureNotNull)(this._containerRef);if(null!==e&&t.contains(e))try{e.scrollIntoView()}catch(e){}else(0,i.ensureNotNull)(this._scrollWrapRef).scrollTop=this._scroll},this._resizeForced=()=>{this.setState({appearingMenuHeight:void 0,appearingMenuWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0})},this._resize=()=>{null===this._raf&&(this._raf=requestAnimationFrame(()=>{this.setState({appearingMenuHeight:void 0,appearingMenuWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0}),this._raf=null}))},this._handleGlobalClose=e=>{this.props.onClose(e)},this._handleSlot=e=>{this._manager.setContainer(e)},this._handleScroll=()=>{this._scroll=(0,i.ensureNotNull)(this._scrollWrapRef).scrollTop},this._handleScrollOutsideEnd=()=>{clearTimeout(this._scrollTimeout),this._scrollTimeout=setTimeout(()=>{this._handleMeasure({forceRecalcPosition:!0})},80)},this._handleScrollOutside=e=>{e.target!==this._scrollWrapRef&&(this._handleScrollOutsideEnd(),null===this._scrollRaf&&(this._scrollRaf=requestAnimationFrame(()=>{this._handleMeasure({forceRecalcPosition:!0}),this._scrollRaf=null})))},this.state={}}componentDidMount(){this._handleMeasure({callback:this.props.onOpen});const{customCloseDelegate:e=h.globalCloseDelegate}=this.props;e.subscribe(this,this._handleGlobalClose),window.addEventListener("resize",this._resize);const t=null!==this.context;this._hotkeys||t||(this._hotkeys=d.createGroup({desc:"Popup menu"}),this._hotkeys.add({desc:"Close",hotkey:27,handler:()=>this._handleGlobalClose()})),this.props.repositionOnScroll&&window.addEventListener("scroll",this._handleScrollOutside,{capture:!0})}componentDidUpdate(){this._handleMeasure()}componentWillUnmount(){const{customCloseDelegate:e=h.globalCloseDelegate}=this.props;e.unsubscribe(this,this._handleGlobalClose),window.removeEventListener("resize",this._resize),window.removeEventListener("scroll",this._handleScrollOutside,{capture:!0}),this._hotkeys&&(this._hotkeys.destroy(),this._hotkeys=null),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null),null!==this._scrollRaf&&(cancelAnimationFrame(this._scrollRaf),this._scrollRaf=null),this._scrollTimeout&&clearTimeout(this._scrollTimeout)}render(){
|
|
const{id:e,role:t,"aria-labelledby":n,"aria-activedescendant":o,children:i,minWidth:a,theme:h=g,className:u,maxHeight:d,onMouseOver:f,onMouseOut:v,onKeyDown:w,onFocus:C,onBlur:_}=this.props,{appearingMenuHeight:x,appearingMenuWidth:E,appearingPosition:M,isMeasureValid:S}=this.state;return r.createElement(m.MenuContext.Provider,{value:this},r.createElement(p.SubmenuHandler,null,r.createElement(c.SlotContext.Provider,{value:this._manager},r.createElement("div",{id:e,role:t,"aria-labelledby":n,"aria-activedescendant":o,className:s()(u,h.menuWrap,!S&&h.isMeasuring),style:{height:x,left:M&&M.x,minWidth:a,position:"fixed",top:M&&M.y,width:E},"data-name":this.props["data-name"],ref:this._handleContainerRef,onScrollCapture:this.props.onScroll,onContextMenu:l.preventDefaultForContextMenu,tabIndex:this.props.tabIndex,onMouseOver:f,onMouseOut:v,onKeyDown:w,onFocus:C,onBlur:_},r.createElement("div",{className:s()(h.scrollWrap,!this.props.noMomentumBasedScroll&&h.momentumBased),style:{overflowY:void 0!==x?"scroll":"auto",maxHeight:d},onScrollCapture:this._handleScroll,ref:this._handleScrollWrapRef},r.createElement(b,{className:h.menuBox},i)))),r.createElement(c.Slot,{reference:this._handleSlot})))}update(e){e?this._resizeForced():this._resize()}}function b(e){const t=(0,i.ensureNotNull)((0,r.useContext)(p.SubmenuContext)),n=r.useRef(null);return r.createElement("div",{ref:n,className:e.className,onMouseOver:function(e){if(!(null!==t.current&&e.target instanceof Node&&(r=e.target,null===(o=n.current)||void 0===o?void 0:o.contains(r))))return;var r,o;t.isSubmenuNode(e.target)||t.setCurrent(null)},"data-name":"menu-inner"},e.children)}v.contextType=p.SubmenuContext},16396:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_POPUP_MENU_ITEM_THEME:()=>c,PopupMenuItem:()=>d});var r=n(59496),o=n(97754),s=n(59064),i=n(51768),a=n(90186),l=n(23576);const c=l;function h(e){const{reference:t,...n}=e,o={...n,ref:t};return r.createElement(e.href?"a":"div",o)}function u(e){e.stopPropagation()}function d(e){const{id:t,role:n,"aria-selected":c,className:d,title:p,labelRowClassName:m,labelClassName:g,shortcut:f,forceShowShortcuts:v,icon:b,isActive:w,isDisabled:C,isHovered:_,appearAsDisabled:x,label:E,link:M,showToolboxOnHover:S,target:y,rel:k,toolbox:O,reference:N,onMouseOut:A,onMouseOver:R,suppressToolboxClick:P=!0,theme:W=l}=e,T=(0,a.filterDataProps)(e),F=(0,r.useRef)(null);return r.createElement(h,{...T,id:t,role:n,"aria-selected":c,className:o(d,W.item,b&&W.withIcon,{[W.isActive]:w,[W.isDisabled]:C||x,[W.hovered]:_}),title:p,href:M,target:y,rel:k,reference:function(e){F.current=e,"function"==typeof N&&N(e);"object"==typeof N&&(N.current=e)},onClick:function(t){const{dontClosePopup:n,onClick:r,onClickArg:o,trackEventObject:a}=e;if(C)return;a&&(0,i.trackEvent)(a.category,a.event,a.label);r&&r(o,t);n||(0,s.globalCloseMenu)()},onContextMenu:function(t){const{trackEventObject:n,trackRightClick:r}=e;n&&r&&(0,i.trackEvent)(n.category,n.event,n.label+"_rightClick")},onMouseUp:function(t){const{trackEventObject:n,trackMouseWheelClick:r}=e;if(1===t.button&&M&&n){
|
|
let e=n.label;r&&(e+="_mouseWheelClick"),(0,i.trackEvent)(n.category,n.event,e)}},onMouseOver:R,onMouseOut:A},void 0!==b&&r.createElement("div",{className:W.icon,dangerouslySetInnerHTML:{__html:b}}),r.createElement("div",{className:o(W.labelRow,m)},r.createElement("div",{className:o(W.label,g)},E)),(void 0!==f||v)&&r.createElement("div",{className:W.shortcut},(z=f)&&z.split("+").join(" + ")),void 0!==O&&r.createElement("div",{onClick:P?u:void 0,className:o(W.toolbox,{[W.showOnHover]:S})},O));var z}},29197:(e,t,n)=>{"use strict";n.d(t,{CloseDelegateContext:()=>s});var r=n(59496),o=n(59064);const s=r.createContext(o.globalCloseDelegate)},50628:(e,t,n)=>{"use strict";n.d(t,{PopupMenu:()=>c});var r=n(59496),o=n(87995),s=n(65718),i=n(27317),a=n(29197),l=n(58095);function c(e){const{controller:t,children:n,isOpened:c,closeOnClickOutside:h=!0,doNotCloseOn:u,onClickOutside:d,onClose:p,...m}=e,g=(0,r.useContext)(a.CloseDelegateContext),f=(0,l.useOutsideEvent)({handler:function(e){d&&d(e);if(!h)return;if(u&&e.target instanceof Node){const t=o.findDOMNode(u);if(t instanceof Node&&t.contains(e.target))return}p()},mouseDown:!0,touchStart:!0});return c?r.createElement(s.Portal,{top:"0",left:"0",right:"0",bottom:"0",pointerEvents:"none"},r.createElement("span",{ref:f,style:{pointerEvents:"auto"}},r.createElement(i.Menu,{...m,onClose:p,onScroll:function(t){const{onScroll:n}=e;n&&n(t)},customCloseDelegate:g,ref:t},n))):null}},14758:(e,t,n)=>{"use strict";n.d(t,{SubmenuContext:()=>o,SubmenuHandler:()=>s});var r=n(59496);const o=r.createContext(null);function s(e){const[t,n]=(0,r.useState)(null),s=(0,r.useRef)(null),i=(0,r.useRef)(new Map);return(0,r.useEffect)(()=>()=>{null!==s.current&&clearTimeout(s.current)},[]),r.createElement(o.Provider,{value:{current:t,setCurrent:function(e){null!==s.current&&(clearTimeout(s.current),s.current=null);null===t?n(e):s.current=setTimeout(()=>{s.current=null,n(e)},100)},registerSubmenu:function(e,t){return i.current.set(e,t),()=>{i.current.delete(e)}},isSubmenuNode:function(e){return Array.from(i.current.values()).some(t=>t(e))}}},e.children)}},49154:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},83546:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M8 15c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm0 1c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm-1-12c0-.552.448-1 1-1s1 .448 1 1v4c0 .552-.448 1-1 1s-1-.448-1-1v-4zm1 7c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1z"/></svg>'}}]); |