Files
ai/charting_library/static/bundles/go-to-date-dialog-impl.e670480d15868ede4779.js
ejukovskiy 261fc36962 VERSION 16 @ 2020-07-17 13:08:09.461606
Volume transparency bars #5076
widget.changeTheme should not record an Undo entry in the Undo/Redo stack #4982
Event when source price scale is changed #4884
Time value in shape creating #4878
Price axis icons don't change after applyOverrides #4865
Cannot disable bottom toolbar timezone menu via "timezone_menu" property #4836
Showleftaxis is not valid on the mobile #4828
Fix TypeScript typings for onVisibleRangeChanged method #4802
Invalid on Mobile: 'paneProperties.legendProperties.showBarChange': false,  #4797
API to attach an indicator to a particular price scale #4788
saveLoadAdapter is stringified #4776
Changing price scale of the study via changePriceScale method doesn't applies immediately #4774
Broker Config Order Market not visible #4765
[Bug] In the trading mask changing price doesn't update pips #4761
Maximize chart button #4744
Custom study plot color has no effect #4740
Moving average on seconds (createStudy) #4730
[Bug] BUY button get enable after clicking on both pips fields #4718
Overrides are not applied when defaults button is pressed #4706
Trading Terminal passes parentOrderId object while modifying the order #4705
Watermark settings are not saved to LocalStorage #4681
tvWidget.activeChart().resolution() return randomly "D" or "1D" for the daily time-frame #4630
cannot override default background color #4621
Bring to front operation is unavailable in 1.16 #4611
New style of pane buttons #4608
New mobile friendly style of the legend #4607
Centered Zoom with Ctrl #4606
TERMINAL: Apply Date Range to all charts in layout if Sync Interval is enabled #4605
Updated style of the measure tool #4604
New style of indicator loading status #4603
New measure styles #4602
Adaptive drawings dialogs #4600
Allow createStudy use undo #4590
Crosshair only on long press on mobile #4574
saveChartToServer does not call the callbacks if  !autoSaveNeeded #4573
How to get current theme? #4534
getAllShapes returns trend_line instead of 'extended' #4507
hideMarksOnBar in v1.15 #4506
Trend_angle is not returned via getAllShapes #4498
 How to disable vertical scrolling on the mobile side #4483
Add support for holidays and exchange working days in session spec #4467
closePopupsAndDialogs : The screenshot popup is not being closed #4438
Redirect on TV homepage after mouse click release #4423
setBodyFont of position line tool doesn't work correctly #4353
subscribe('drawing_event') click is not working #4302
"Eraser" and "dot" cursors doesn't work on IE11 #4238
zOrder for shapes with saved layout #4219
Errors/warning in console after load chart #4196
Main series API #4169
Scrolling to the top - href=“#”  #4136
Tracking mode #4111
Order line drag with middle mouse button doesn't trigger onMove #4084
There are no values or na ​​in the legend of the additional symbol (compare/add) until hover the cursor on the chart #4058
closePopupsAndDialogs doesn't work for new indicators dialog #4051
toolbar_bg doesn't affect top toolbar #3998
Check if symbol sync is enabled #3997
DOM bottom buttons are missing tooltips #3979
Question about D or 1D resolution #3861
Twitter intent button Android app #3732
Avoid chart appending storage version and "study_templates or charts" to chartStorageAPI #3702
unexpected study id by assigning studies_access option #3630
Drawing shape on indicator/study #3408
Top header in fullscreen? #2610
Allow to modify end date of long/short position tool #2381
Chart can scroll with mouse movement but no button pressed down #1908
Adaptive design for Properties dialog #862
2020-07-17 16:08:28 +03:00

11 lines
32 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["go-to-date-dialog-impl"],{"2sPR":function(e,t,n){e.exports={calendar:"calendar-H-c9lyXG",header:"header-29jmPJB_",title:"title-3BLccpWI",titleDay:"titleDay-3Mp9czBi",switchBtn:"switchBtn-p718bDyp",prev:"prev-1vUszsRH",next:"next-Xxv3BCz0",month:"month-14xTSVpQ",weekdays:"weekdays-p5haX_xf",weeks:"weeks-1LCs6d3o",week:"week-49DNXkE3",day:"day-3x8ZipuB",disabled:"disabled-34cO1Z8u",selected:"selected-qmTqaBK3",currentDay:"currentDay-3sTNH-Yi",otherMonth:"otherMonth-1WMn4XfI"}},"77yN":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M4 0c-.6 0-1 .4-1 1v1H1c-.6 0-1 .4-1 1v12c0 .6.4 1 1 1h14c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1h-2V1c0-.6-.4-1-1-1h-1c-.6 0-1 .4-1 1v1H6V1c0-.6-.4-1-1-1H4zM2 5h12v9H2V5zm5 2v2h2V7H7zm3 0v2h2V7h-2zm-6 3v2h2v-2H4zm3 0v2h2v-2H7zm3 0v2h2v-2h-2z"/></svg>'},CjI0:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"><g fill="none" stroke="currentColor" stroke-width="2"><path d="M9 10V4"/><circle cx="9" cy="9" r="8"/><path d="M9 14v-2"/></g></svg>'},FoU0:function(e,t,n){e.exports={textInput:"textInput-3SndIvsX",inputWrapper:"inputWrapper-u_TvMxrq"}},Hrlb:function(e,t,n){e.exports={pickerInput:"pickerInput-3XGDmslV",inputIcon:"inputIcon-1N28V7pi",disabled:"disabled-aKY-xwhe","inputIcon--large":"inputIcon--large-91Ho2uuh","inputIcon--small":"inputIcon--small-93KX0qGd","inputIcon--xsmall":"inputIcon--xsmall-1GLk5pdh",picker:"picker-HQJc7fVy",fixed:"fixed-QBCsU0Gi",absolute:"absolute-2hW9cE-c",nativePicker:"nativePicker-1F6noucK"}},Oehf:function(e,t,n){e.exports={clock:"clock-3pqBsiNm",header:"header-pTWMGSpm",number:"number-9PC9lvyt",active:"active-1sonmMLV",body:"body-2Q-g3GDd",clockFace:"clockFace-eHYbqh-S",face:"face-2iCoBAOV",inner:"inner-1mVlhYbe",hand:"hand-2ZG8pJQb",knob:"knob-31dEppHa",centerDot:"centerDot-210Fo0oV"}},UX0N:function(e,t,n){e.exports={field:"field-3OP1xeZc",errorIcon:"errorIcon-AjhrEkSc",warningIcon:"warningIcon-309b7fMg"}},eFBE:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14px" height="14px"><path fill-rule="evenodd" d="M7 0C3.15 0 0 3.15 0 7s3.15 7 7 7 7-3.15 7-7-3.15-7-7-7zm0 12.25c-2.888 0-5.25-2.363-5.25-5.25 0-2.888 2.362-5.25 5.25-5.25 2.887 0 5.25 2.362 5.25 5.25 0 2.887-2.363 5.25-5.25 5.25zm.25-8H6V8h3.75V6.75h-2.5v-2.5z"/></svg>'},hn2c:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 16" width="10" height="16"><path d="M.6 1.4l1.4-1.4 8 8-8 8-1.4-1.4 6.389-6.532-6.389-6.668z"/></svg>'},ilgf:function(e,t,n){e.exports={dialog:"dialog-1oXvxbfL",formRow:"formRow-28Ldm-ki",cell:"cell-m5Uv3CRU",input:"input-2rGFhmey",btn:"btn-1wL_hi5U",button:"button-1xrfeyEj"}},nPPD:function(e,t,n){"use strict";function o(e,t,n){var o,s,r,i,a;for(void 0===n&&(n={}),o=Object.assign({},t),s=0,r=Object.keys(t);s<r.length;s++)(a=n[i=r[s]]||i)in e&&(o[i]=[e[a],t[i]].join(" "));return o}function s(e,t,n){return void 0===n&&(n={}),Object.assign({},e,o(e,t,n))}
n.d(t,"b",function(){return o}),n.d(t,"a",function(){return s})},pAWa:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 16" width="10" height="16"><path d="M9.4 1.4l-1.4-1.4-8 8 8 8 1.4-1.4-6.389-6.532 6.389-6.668z"/></svg>'},pBZQ:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="none" d="M0 0h16v16H0z"/><path d="M8 .034l-1.41 1.41 5.58 5.59H0v2h12.17l-5.58 5.59L8 16.034l8-8z"/></svg>'},"pk/F":function(e,t,n){e.exports={field:"field-1YbeVGCL",errorIcon:"errorIcon-3nKBmNTE",warningIcon:"warningIcon-2FTdXbRt","errorIcon--large":"errorIcon--large-1UBncQuh","warningIcon--large":"warningIcon--large-2-nZYwjj","errorIcon--small":"errorIcon--small-3eBcxlqP","warningIcon--small":"warningIcon--small-60SRfITp","errorIcon--xsmall":"errorIcon--xsmall-8a2JUSk7","warningIcon--xsmall":"warningIcon--xsmall-2rOz7ig5"}},srFJ:function(e,t,n){e.exports={calendar:"calendar-Q5DuQzKD"}},"uUY/":function(e,t,n){"use strict";function o(e){return{x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}}function s(e){return{x:e.touches[0].pageX-window.scrollX,y:e.touches[0].pageY-window.scrollY}}function r(e,t,n,o){var s=function(e,t,n,o){return 180*(Math.atan2(o-t,n-e)+Math.PI/2)/Math.PI}(e,t,n,o);return s<0?360+s:s}function i(e,t,n){var o,s,r;for(void 0===n&&(n=1),o=Math.max(Math.ceil((t-e)/n),0),s=Array(o),r=0;r<o;r++)s[r]=e,e+=n;return s}function a(e){return("0"+e).slice(-2)}function c(e){p({isOpened:!1}),p({isOpened:!0,onClose:function(){p({isOpened:!1}),ye=null},dateOnly:e.model().mainSeries().isDWM(),onGoToDate:function(t){!function(e,t){if(void 0===e.model().timeScale().tickMarks().minIndex)return;p({isOpened:!0,processing:!0}),e.model().gotoTime(t).done(function(t){var n=e.model().mainSeries();void 0===t?n.clearGotoDateResult():n.setGotoDateResult(t)}).always(function(){p({isOpened:!1,processing:!1})})}(e,t)}})}function p(e){ye||(ye=document.createElement("div"),document.body.appendChild(ye)),h.render(l.createElement(ge,e),ye)}var l,h,u,d,m,f,_,v,g,y,w,E,M,b,D,O,S,k,x,C,I,T,P,N,H,z,j,F,R,B,W,A,V,Y,L,G,U,K,X,Q,q,Z,J,$,ee,te,ne,oe,se,re,ie,ae,ce,pe,le,he,ue,de,me,fe,_e,ve,ge,ye,we,Ee,Me;n.r(t),l=n("q1tI"),h=n("i8i4"),u=n("mrSG"),n("YFKU"),d=n("WXjp"),m=n("AVTG"),n("bf9a"),f=n("2sPR"),_=n("TSYQ"),v=n("ldgD"),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onClick=function(){t.props.onClick&&!t.props.isDisabled&&t.props.onClick(t.props.day.clone())},t}return Object(u.__extends)(t,e),t.prototype.render=function(){var e,t=_(f.day,((e={})[f.selected]=this.props.isSelected,e[f.disabled]=this.props.isDisabled,e[f.currentDay]=v(new Date).isSame(this.props.day,"day"),e[f.otherMonth]=this.props.isOtherMonth,e));return l.createElement("span",{className:t,onClick:this._onClick,"data-day":this.props.day.format("YYYY-MM-DD")},l.createElement("span",null,this.props.day.date()))},t}(l.PureComponent),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(u.__extends)(t,e),
t.prototype.render=function(){return l.createElement("div",{className:f.month},l.createElement("div",{className:f.weekdays},this._renderWeekdays()),l.createElement("div",{className:f.weeks},this._renderWeeks()))},t.prototype._renderWeekdays=function(){var e,t,n=[];for(e=1;e<8;e++)t=v().day(e).format("dd"),n.push(l.createElement("span",{key:e},t));return n},t.prototype._renderWeeks=function(){var e,t=[],n=this.props.viewDate.clone().startOf("month").startOf("isoWeek");for(e=0;e<6;e++)t.push(this._renderWeek(n)),n=n.clone().add(1,"weeks");return t},t.prototype._renderWeek=function(e){var t,n,o=[];for(t=0;t<7;t++)n=e.clone().add(t,"days"),o.push(l.createElement(g,{key:t,day:n,isDisabled:this._isDayDisabled(n),isSelected:n.isSame(this.props.selectedDate,"day"),isOtherMonth:!n.isSame(this.props.viewDate,"month"),onClick:this.props.onClickDay}));return l.createElement("div",{className:f.week,key:e.week()},o)},t.prototype._isDayDisabled=function(e){var t=!this._isInRange(e);return!t&&this.props.disableWeekends&&(t=[5,6].includes(e.weekday())),t},t.prototype._isInRange=function(e){return(!this.props.maxDate||this.props.maxDate.startOf("day").diff(e.startOf("day"),"days")>=0)&&(!this.props.minDate||this.props.minDate.startOf("day").diff(e.startOf("day"),"days")<=0)},t}(l.PureComponent),w=n("jjrI"),E=n("pAWa"),M=n("hn2c"),b=function(e){function t(t){var n=e.call(this,t)||this;return n._prevMonth=function(){n.setState({viewDate:n.state.viewDate.clone().subtract(1,"months")})},n._nextMonth=function(){n.setState({viewDate:n.state.viewDate.clone().add(1,"months")})},n._onClickDay=function(e){var t=e.clone();n.setState({viewDate:t}),n.props.onSelect&&n.props.onSelect(t.clone())},n.state={viewDate:t.selectedDate},n}return Object(u.__extends)(t,e),t.prototype.render=function(){return l.createElement("div",{className:_(f.calendar,this.props.className)},l.createElement("div",{className:f.header},l.createElement(w.a,{icon:E,onClick:this._prevMonth,className:_(f.switchBtn,f.prev)}),l.createElement("div",{className:f.title},l.createElement("span",{className:f.titleDay},this.state.viewDate.format("DD"))," "+this.state.viewDate.format("MMM")+" '"+this.state.viewDate.format("YY")),l.createElement(w.a,{icon:M,onClick:this._nextMonth,className:_(f.switchBtn,f.next)})),l.createElement(y,{viewDate:this.state.viewDate,selectedDate:this.props.selectedDate,maxDate:this.props.maxDate,minDate:this.props.minDate,onClickDay:this._onClickDay,disableWeekends:this.props.disableWeekends}))},t}(l.PureComponent),D=n("77yN"),O=n("srFJ"),S=n("L0Sj"),k=n("pk/F"),x=n("kSQs"),C=n("CjI0"),I={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"}}},function(e){e.Top="top",
e.Bottom="bottom"}(T||(T={})),P={top:{attachment:I.topRight.attachment,targetAttachment:I.topRight.targetAttachment,attachmentOffsetY:-4},bottom:{attachment:I.bottomRight.attachment,targetAttachment:I.bottomRight.targetAttachment,attachmentOffsetY:4}},we=S.a,Ee=!0,void 0===(Me=!0)&&(Me=!1),N=function(e){function t(t){var n=e.call(this,t)||this;return n._onMouseOverWarning=function(e){n.setState({showWarning:!0})},n._onMouseOutWarning=function(e){n.setState({showWarning:!1})},n._mouseOver=function(e){n.state.invalid&&n.setState({showError:!0}),n.props.onMouseOver&&n.props.onMouseOver(e)},n._mouseOut=function(e){n.setState({showError:!1}),n.props.onMouseOut&&n.props.onMouseOut(e)},n._focus=function(e){n.setState({focused:!0,mouseOut:void 0,mouseOver:void 0}),n.state.invalid&&n.setState({showError:!0}),n.props.onFocus&&n.props.onFocus(e)},n._blur=function(e){n.setState({focused:!1,mouseOut:n._mouseOut,mouseOver:n._mouseOver,showError:!1}),n.props.onBlur&&n.props.onBlur(e)},n.state={invalid:Boolean(n.props.errors&&n.props.errors.length),hasWarning:Boolean(n.props.warnings&&n.props.warnings.length),mouseOut:n._mouseOut,mouseOver:n._mouseOver,showError:!1,showWarning:!1},n._fieldElem=l.createRef(),n}return Object(u.__extends)(t,e),t.prototype.componentWillReceiveProps=function(e){e.errors!==this.props.errors&&this.setState({invalid:Boolean(e.errors&&e.errors.length),showError:this.state.focused&&Boolean(e.errors&&e.errors.length),hasWarning:Boolean(e.warnings&&e.warnings.length)})},t.prototype.render=function(){var e,t=this.props.fieldTheme||k,n=_(t.field,((e={})[this.props.className]=Boolean(this.props.className),e)),o=_(t.errorIcon,this.props.fieldSize&&t["errorIcon--"+this.props.fieldSize]),s=_(t.warningIcon,this.props.fieldSize&&t["warningIcon--"+this.props.fieldSize]);return l.createElement(l.Fragment,null,l.createElement("div",{className:n,onMouseOver:this.state.mouseOver,onMouseOut:this.state.mouseOut,ref:this._fieldElem},this._createField(),this.state.invalid&&l.createElement(w.a,{className:o,icon:C}),!this.state.invalid&&this.state.hasWarning&&l.createElement("span",{onMouseOver:this._onMouseOverWarning,onMouseOut:this._onMouseOutWarning},l.createElement(w.a,{className:s,icon:C}))),Ee&&!this.props.noErrorMessages&&this._createErrorsBox(),Me&&this._createWarningsBox())},t.prototype._createField=function(){var e=Object.assign({},this.props,{error:this.state.invalid,onBlur:this._blur,onFocus:this._focus}),t=e,n=(t.errors,t.children),o=(t.alwaysShowError,t.fieldSize,t.noErrorMessages,t.fieldTheme,t.errorAttachment,Object(u.__rest)(t,["errors","children","alwaysShowError","fieldSize","noErrorMessages","fieldTheme","errorAttachment"])),s=we;return l.createElement(s,Object(u.__assign)({},o),n)},t.prototype._createErrorsBox=function(){var e=this.props.errorAttachment,t=void 0===e?T.Top:e,n=P[t],o=n.attachment,s=n.targetAttachment,r=n.attachmentOffsetY;return l.createElement(x.a,{isOpened:this.state.showError||this.props.alwaysShowError,target:this._fieldElem.current,root:"parent",inheritWidthFromTarget:!1,attachment:o,
targetAttachment:s,attachmentOffsetY:r,inheritMaxWidthFromTarget:!0,show:!0},this.props.errors)},t.prototype._createWarningsBox=function(){var e=this.props.errorAttachment,t=void 0===e?T.Top:e,n=P[t],o=n.attachment,s=n.targetAttachment,r=n.attachmentOffsetY;return l.createElement(x.a,{isOpened:this.state.showWarning,target:this._fieldElem.current,root:"parent",inheritWidthFromTarget:!1,attachment:o,targetAttachment:s,attachmentOffsetY:r,inheritMaxWidthFromTarget:!0,show:!0},this.props.warnings)},t}(l.PureComponent),H=n("RgaO"),z=n("Eyy1"),j=n("nPPD"),F=n("D/i5"),R=n("FoU0"),B=n("UX0N"),W=n("Hrlb"),A=Object(u.__assign)(Object(u.__assign)({},F),Object(j.b)(F,R)),V=Object(u.__assign)(Object(u.__assign)({},k),Object(j.b)(k,B)),Y=function(e){function t(t){var n=e.call(this,t)||this;return n._input=null,n._handleFocus=function(){n.props.showOnFocus&&n.props.onShowPicker()},n._handleInputRef=function(e){n._input=e,n.props.dateInputDOMReference&&n.props.dateInputDOMReference(n._input)},n._onShowPicker=function(e){if(e){var t=e.getBoundingClientRect();t.width&&t.right>window.innerWidth?e.style.right="0":e.style.right="auto"}},n._onChange=function(){var e=Object(z.ensureNotNull)(n._input).value;n.setState({value:e}),n.props.onType(e)},n._onKeyDown=function(e){n.props.onHidePicker()},n._onKeyPress=function(e){if(e.charCode){var t=String.fromCharCode(e.charCode);n.props.inputRegex.test(t)||e.preventDefault()}},n._onKeyUp=function(e){var t,o;8!==e.keyCode&&(t=Object(z.ensureNotNull)(n._input).value,(o=n.props.fixValue(t))!==t&&n.setState({value:o}))},n.state={value:t.value},n}return Object(u.__extends)(t,e),t.prototype.componentWillReceiveProps=function(e){e.value!==this.props.value&&this.setState({value:e.value})},t.prototype.render=function(){var e,t=this,n=this.props.position,o=void 0===n?"fixed":n,s=_(W.inputIcon,W["inputIcon--"+this.props.size],((e={})[W.disabled]=this.props.disabled,e));return l.createElement("div",{className:W.pickerInput},l.createElement(N,{value:this.state.value,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onChange:this._onChange,onFocus:this._handleFocus,onClick:this.props.onShowPicker,reference:this._handleInputRef,rightComponent:this.props.errors&&this.props.errors.length?void 0:l.createElement(w.a,{icon:this.props.icon,className:s,onClick:this.props.disabled||this.props.readonly?void 0:this.props.onShowPicker}),theme:A,fieldTheme:V,sizeMode:this.props.size,disabled:this.props.disabled,errors:this.props.errors,noErrorMessages:!this.props.showErrorMessages,fieldSize:this.props.size,name:this.props.name,readOnly:this.props.readonly}),this.props.showPicker&&!this.props.readonly?l.createElement(H.a,{mouseDown:!0,handler:this.props.onHidePicker},function(e){return l.createElement("span",{ref:e},l.createElement("div",{className:_(W.picker,W[o]),key:"0",ref:t._onShowPicker},t.props.children))}):null)},t.defaultProps={showOnFocus:!0},t}(l.PureComponent),L=Object(u.__assign)(Object(u.__assign)({},F),Object(j.b)(F,R)),
G=Object(u.__assign)(Object(u.__assign)({},k),Object(j.b)(k,B)),U=function(e){function t(t){var n=e.call(this,t)||this;return n._onChange=function(e){n.setState({value:e.target.value}),n.props.onChange(e.target.value)},n.state={value:t.value},n}return Object(u.__extends)(t,e),t.prototype.render=function(){var e,t=_(W.inputIcon,this.props.size&&W["inputIcon--"+this.props.size],((e={})[W.disabled]=this.props.disabled,e)),n=!this.props.readonly&&!this.props.disabled;return l.createElement("div",{className:W.pickerInput},l.createElement(N,{value:this.state.value,readOnly:!0,rightComponent:this.props.errors&&this.props.errors.length?void 0:l.createElement(w.a,{icon:this.props.icon,className:t}),theme:L,fieldTheme:G,sizeMode:this.props.size,disabled:this.props.disabled,errors:this.props.errors,fieldSize:this.props.size,alwaysShowError:!0,noErrorMessages:!this.props.showErrorMessages,name:n?void 0:this.props.name}),n&&l.createElement("input",{type:this.props.type,className:W.nativePicker,onChange:this._onChange,onInput:this._onChange,value:this.props.value,min:this.props.min,max:this.props.max,name:this.props.name}))},t}(l.PureComponent),K=function(e){function t(t){var n=e.call(this,t)||this;return n._format="YYYY-MM-DD",n._fixValue=function(e){return(e=(e=e.substr(0,10)).replace(/\-+/g,"-")).endsWith(".")||4!==e.length&&7!==e.length||(e+="-"),e},n._isValid=function(e){if(/^[0-9]{4}(\-[0-9]{2}){2}/.test(e)){var t=v(e,n._format);return t.isValid()&&(n.props.noRangeValidation||n._isInRange(t))}return!1},n._onType=function(e){var t=n._isValid(e)?v(e,n._format):null;t?n.setState({date:t,isInvalid:!1}):n.setState({isInvalid:!0}),n.props.onPick(t)},n._onSelect=function(e){n.setState({date:e,showCalendar:!1,isInvalid:!1}),n.props.onPick(e)},n._showCalendar=function(){n.setState({showCalendar:!0})},n._hideCalendar=function(){n.setState({showCalendar:!1})},n._getErrors=function(){var e=n.props.errors?Object(u.__spreadArrays)(n.props.errors):[];return n.state.isInvalid&&e.push(window.t("Please enter the right date format yyyy-mm-dd")),e},n.state={date:t.initial,showCalendar:!1,isInvalid:!n._isValid(t.initial.format(n._format))},n}return Object(u.__extends)(t,e),t.prototype.render=function(){var e=this.props.position,t=void 0===e?"fixed":e;return Modernizr.mobiletouch?l.createElement(U,{value:this.state.date.format(this._format),type:"date",onChange:this._onType,icon:D,disabled:this.props.disabled,size:this.props.size,min:this.props.minDate&&this.props.minDate.format(this._format),max:this.props.maxDate&&this.props.maxDate.format(this._format),errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly}):l.createElement(Y,{value:this.state.date.format(this._format),inputRegex:/[0-9\.]/,fixValue:this._fixValue,onType:this._onType,onShowPicker:this._showCalendar,onHidePicker:this._hideCalendar,showPicker:this.state.showCalendar,showOnFocus:this.props.showOnFocus,icon:D,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),
showErrorMessages:this.props.showErrorMessages,name:this.props.name,dateInputDOMReference:this.props.dateInputDOMReference,readonly:this.props.readonly,position:t},l.createElement(b,{selectedDate:this.state.date,maxDate:this.props.maxDate,minDate:this.props.minDate,onSelect:this._onSelect,className:O.calendar}))},t.prototype.componentWillReceiveProps=function(e){this.props.initial!==e.initial&&this.setState({date:e.initial})},t.prototype._isInRange=function(e){return(!this.props.maxDate||this.props.maxDate.startOf("day").diff(e.startOf("day"),"days")>=0)&&(!this.props.minDate||this.props.minDate.startOf("day").diff(e.startOf("day"),"days")<=0)},t}(l.PureComponent),X=n("Oehf"),Q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._renderNumber=function(e,n){var o,s=_(X.number,((o={})[X.active]=e===t.props.activeNumber,o[X.inner]=t.props.isInner,o)),r=t.props.format?t.props.format(e):e.toString();return l.createElement("span",{key:e,className:s,style:t._numberStyle(t.props.radius-t.props.spacing,n),"data-value":r},l.createElement("span",null,r))},t}return Object(u.__extends)(t,e),t.prototype.render=function(){return l.createElement("div",{className:X.face,style:this._faceStyle(),onMouseDown:this.props.onMouseDown,onTouchStart:this.props.onTouchStart},this.props.numbers.map(this._renderNumber))},t.prototype._faceStyle=function(){return{height:2*this.props.radius,width:2*this.props.radius}},t.prototype._numberStyle=function(e,t){var n=Math.PI/180*360/12*t;return{left:e+e*Math.sin(n)+this.props.spacing,top:e-e*Math.cos(n)+this.props.spacing}},t}(l.PureComponent),q=function(e){function t(t){var n=e.call(this,t)||this;return n._onMouseMove=function(e){n._move(o(e))},n._onTouchMove=function(e){n._move(s(e))},n._onMouseUp=function(){document.removeEventListener("mousemove",n._onMouseMove),document.removeEventListener("mouseup",n._onMouseUp),n._endMove()},n._onTouchEnd=function(e){document.removeEventListener("touchmove",n._onTouchMove),document.removeEventListener("touchend",n._onTouchEnd),n._endMove(e)},n}return Object(u.__extends)(t,e),t.prototype.componentWillUnmount=function(){document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("touchmove",this._onTouchMove),document.removeEventListener("touchend",this._onTouchEnd)},t.prototype.render=function(){var e={height:this.props.length,transform:"rotate("+this.props.angle+"deg)"};return l.createElement("div",{className:X.hand,style:e},l.createElement("span",{className:X.knob}))},t.prototype.mouseStart=function(e){document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp),this._move(o(e.nativeEvent))},t.prototype.touchStart=function(e){document.addEventListener("touchmove",this._onTouchMove),document.addEventListener("touchend",this._onTouchEnd),this._move(s(e.nativeEvent)),e.stopPropagation()},t.prototype._endMove=function(e){this.props.onMoveEnd&&this.props.onMoveEnd(e)},t.prototype._move=function(e){
var t=this._trimAngleToValue(this._positionToAngle(e)),n=this._getPositionRadius(e);!this.props.onMove||isNaN(t)||isNaN(n)||this.props.onMove(360===t?0:t,n)},t.prototype._trimAngleToValue=function(e){return this.props.step*Math.round(e/this.props.step)},t.prototype._positionToAngle=function(e){return r(this.props.center.x,this.props.center.y,e.x,e.y)},t.prototype._getPositionRadius=function(e){var t=this.props.center.x-e.x,n=this.props.center.y-e.y;return Math.sqrt(t*t+n*n)},t}(l.PureComponent),Z=Object(u.__spreadArrays)([0],i(13,24)),J=Object(u.__spreadArrays)([12],i(1,12)),$=30,ee=.46,te=function(e){function t(t){var n=e.call(this,t)||this;return n._onMouseDown=function(e){n._hand.mouseStart(e)},n._onTouchStart=function(e){n._hand.touchStart(e)},n._onHandMove=function(e,t){var o=t<n.props.radius-n.props.spacing;n.state.isInner!==o?n.setState({isInner:o},function(){n.props.onChange(n._valueFromDegrees(e))}):n.props.onChange(n._valueFromDegrees(e))},n._onHandMoveEnd=function(){n.props.onSelect&&n.props.onSelect()},n.state={isInner:n.props.selected>0&&n.props.selected<=12},n}return Object(u.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.center,o=t.radius,s=t.spacing,r=t.selected;return l.createElement("div",null,l.createElement(Q,{radius:o,spacing:s,numbers:Z,activeNumber:r,format:a,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart}),this._renderInnerFace(o*ee),l.createElement(q,{ref:function(t){return e._hand=t},length:o-(this.state.isInner?o*ee:s)-this.props.numberRadius,angle:r*$,step:$,center:n,onMove:this._onHandMove,onMoveEnd:this._onHandMoveEnd}))},t.prototype._renderInnerFace=function(e){return l.createElement(Q,{radius:this.props.radius,spacing:e,numbers:J,activeNumber:this.props.selected,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart,isInner:!0})},t.prototype._valueFromDegrees=function(e){return this.state.isInner?J[e/$]:Z[e/$]},t}(l.PureComponent),ne=i(0,60,5),oe=6,se=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onMouseDown=function(e){t._hand.mouseStart(e)},t._onTouchStart=function(e){t._hand.touchStart(e)},t._onHandMove=function(e){t.props.onChange(e/oe)},t._onHandMoveEnd=function(e){t.props.onSelect&&t.props.onSelect(e)},t}return Object(u.__extends)(t,e),t.prototype.render=function(){var e=this;return l.createElement("div",null,l.createElement(Q,{radius:this.props.radius,spacing:this.props.spacing,numbers:ne,activeNumber:this.props.selected,format:a,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart}),l.createElement(q,{ref:function(t){return e._hand=t},length:this.props.radius-this.props.spacing-this.props.numberRadius,angle:this.props.selected*oe,step:oe,center:this.props.center,onMove:this._onHandMove,onMoveEnd:this._onHandMoveEnd}))},t}(l.PureComponent),re=.18,ie=13,function(e){e[e.Hours=0]="Hours",e[e.Minutes=1]="Minutes"}(ae||(ae={})),ce=function(e){function t(t){var n=e.call(this,t)||this;return n._clockFace=null,n._raf=null,n._recalculateTimeout=null,
n._calculateShapeBinded=n._calculateShape.bind(n),n._onChangeHours=function(e){n.state.time.hours()!==e&&n._onChange(n.state.time.clone().hours(e))},n._onChangeMinutes=function(e){n.state.time.minutes()!==e&&n._onChange(n.state.time.clone().minutes(e))},n._onSelectHours=function(){n._displayMinutes()},n._onSelectMinutes=function(e){e&&e.target instanceof Node&&n._clockFace&&n._clockFace.contains(e.target)&&e.preventDefault(),n.props.onSelect&&n.props.onSelect(n.state.time.clone())},n._displayHours=function(){n.setState({faceType:ae.Hours})},n._displayMinutes=function(){n.setState({faceType:ae.Minutes})},n._setClockFace=function(e){n._clockFace=e},n.state={center:{x:0,y:0},radius:0,time:n.props.selectedTime,faceType:ae.Hours},n}return Object(u.__extends)(t,e),t.prototype.render=function(){var e,t;return l.createElement("div",{className:_(X.clock,this.props.className)},l.createElement("div",{className:X.header},l.createElement("span",{className:_(X.number,(e={},e[X.active]=this.state.faceType===ae.Hours,e)),onClick:this._displayHours},this.state.time.format("HH")),l.createElement("span",null,":"),l.createElement("span",{className:_(X.number,(t={},t[X.active]=this.state.faceType===ae.Minutes,t)),onClick:this._displayMinutes},this.state.time.format("mm"))),l.createElement("div",{className:X.body},l.createElement("div",{className:X.clockFace,ref:this._setClockFace},this.state.faceType===ae.Hours?this._renderHours():null,this.state.faceType===ae.Minutes?this._renderMinutes():null,l.createElement("span",{className:X.centerDot}))))},t.prototype.componentDidMount=function(){this._calculateShape(),this._recalculateTimeout=setTimeout(this._calculateShapeBinded,1),window.addEventListener("resize",this._calculateShapeBinded),window.addEventListener("scroll",this._calculateShapeBinded,!0)},t.prototype.componentWillUnmount=function(){this._clearTimeout(),window.removeEventListener("resize",this._calculateShapeBinded),window.removeEventListener("scroll",this._calculateShapeBinded,!0),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null)},t.prototype._clearTimeout=function(){null!==this._recalculateTimeout&&(clearTimeout(this._recalculateTimeout),this._recalculateTimeout=null)},t.prototype._renderHours=function(){return l.createElement(te,{center:this.state.center,radius:this.state.radius,spacing:this.state.radius*re,selected:this.state.time.hours(),numberRadius:ie,onChange:this._onChangeHours,onSelect:this._onSelectHours})},t.prototype._renderMinutes=function(){return l.createElement(se,{center:this.state.center,radius:this.state.radius,spacing:this.state.radius*re,selected:this.state.time.minutes(),numberRadius:ie,onChange:this._onChangeMinutes,onSelect:this._onSelectMinutes})},t.prototype._onChange=function(e){this.setState({time:e}),this.props.onChange&&this.props.onChange(e.clone())},t.prototype._calculateShape=function(){var e=this;null===this._raf&&(this._raf=requestAnimationFrame(function(){var t=Object(z.ensureNotNull)(e._clockFace).getBoundingClientRect(),n=t.left,o=t.top,s=t.width;e.setState({center:{x:n+s/2,
y:o+s/2},radius:s/2}),e._raf=null}))},t}(l.PureComponent),pe=n("eFBE"),le=function(e){function t(t){var n=e.call(this,t)||this;return n._format="HH:mm",n._fixValue=function(e){return(e=(e=e.substr(0,5)).replace(/:+/g,":")).endsWith(":")||2!==e.length||(e+=":"),e},n._isValid=function(e){return/^[0-9]{2}:[0-9]{2}/.test(e)&&v(e,n._format).isValid()},n._onType=function(e){var t=n._isValid(e)?v(e,n._format):null;t?n.setState({time:t,isInvalid:!1}):n.setState({isInvalid:!0}),n.props.onPick(t)},n._onSelect=function(e){n.setState({time:e,showClock:!1,isInvalid:!1}),n.props.onPick(e)},n._showClock=function(){n.setState({showClock:!0})},n._hideClock=function(){n.setState({showClock:!1})},n._getErrors=function(){var e=n.props.errors?Object(u.__spreadArrays)(n.props.errors):[];return n.state.isInvalid&&e.push(window.t("Please enter the right time format hh:mm")),e},n.state={time:t.initial,showClock:!1,isInvalid:!n._isValid(t.initial.format(n._format))},n}return Object(u.__extends)(t,e),t.prototype.render=function(){return Modernizr.mobiletouch?l.createElement(U,{value:this.state.time.format(this._format),type:"time",onChange:this._onType,icon:pe,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly}):l.createElement(Y,{value:this.state.time.format(this._format),inputRegex:/[0-9:]/,fixValue:this._fixValue,onType:this._onType,onShowPicker:this._showClock,onHidePicker:this._hideClock,showPicker:this.state.showClock,icon:pe,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly},l.createElement(ce,{selectedTime:this.state.time,onSelect:this._onSelect}))},t.prototype.componentWillReceiveProps=function(e){this.props.initial!==e.initial&&this.setState({time:e.initial,isInvalid:!this._isValid(e.initial.format(this._format))})},t}(l.PureComponent),he=n("FQhm"),ue=n("ZjKI"),de=n("oj21"),me=n("ycI/"),fe=n("pBZQ"),_e=n("ilgf"),ve=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._todayMidnight=v("00:00","HH:mm"),t._dateInputDOMElement=null,t._dateInputDOMReference=function(e){t._dateInputDOMElement=e},t}return Object(u.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;setTimeout(function(){null!==e._dateInputDOMElement&&e._dateInputDOMElement.focus()},0)},t.prototype.render=function(){return l.createElement(l.Fragment,null,l.createElement(m.b,{onClose:this.props.onClose},window.t("Go to")),l.createElement(m.a,null,l.createElement(me.a,{keyCode:27,handler:this.props.onEscape}),l.createElement(me.a,{keyCode:13,handler:this.props.onGoToDateHandler}),l.createElement("div",{className:_e.formRow},l.createElement("div",{className:_(_e.cell,_e.input)},l.createElement(K,{initial:this.props.date||this._todayMidnight,onPick:this.props.onDatePick,maxDate:this._todayMidnight,disabled:this.props.processing,dateInputDOMReference:this._dateInputDOMReference,showOnFocus:!1
})),l.createElement("div",{className:_(_e.cell,_e.input)},l.createElement(le,{initial:this.props.time||this._todayMidnight,onPick:this.props.onTimePick,disabled:this.props.processing||this.props.dateOnly||!this.props.date})),l.createElement("div",{className:_(_e.cell,_e.btn)},l.createElement(de.a,{type:"primary",disabled:!this.props.date||!this.props.time||this.props.processing,onClick:this.props.onGoToDateHandler,className:_e.button},l.createElement(w.a,{icon:fe}))))))},t}(l.PureComponent),ge=function(e){function t(t){var n=e.call(this,t)||this;return n._onDatePick=function(e){n.setState({date:e})},n._onTimePick=function(e){n.setState({time:e})},n._onGoToDate=function(){var e,t;n.props.onGoToDate&&n.state.date&&n.state.time&&((e=n.state.date.clone()).hours(n.state.time.hours()),e.minutes(n.state.time.minutes()),t=new Date(e.format("YYYY-MM-DD[T]HH:mm[:00Z]")).valueOf(),n.props.onGoToDate(t))},n._onEscape=function(){n.props.onClose&&n.props.onClose()},n.state={date:v(),time:v("00:00","HH:mm")},n}return Object(u.__extends)(t,e),t.prototype.componentDidMount=function(){he.subscribe(ue.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._onEscape,null)},t.prototype.componentWillUnmount=function(){he.unsubscribe(ue.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._onEscape,null)},t.prototype.render=function(){return l.createElement(d.a,{isOpened:this.props.isOpened,onClickOutside:this.props.onClose,className:_e.dialog,"data-dialog-type":"go-to-date-dialog"},l.createElement(ve,Object(u.__assign)({onDatePick:this._onDatePick,onTimePick:this._onTimePick,onGoToDateHandler:this._onGoToDate,onEscape:this._onEscape},this.props,this.state)))},t}(l.PureComponent),n.d(t,"showGoToDateDialog",function(){return c})}}]);