0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.138.134.163


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/89.798fc9be.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[89],{1148:function(e,t,a){"use strict";a.r(t);var n=a(41),r=a.n(n),l=a(68),o=a(3),i=a(99),s=a(100),c=a(102),u=a(101),f=a(103),h=a(1),d=a.n(h),p=a(858),m=a(1139),g=a(1106),v=a(272),E=a(1098),w=a(1100),C=a(104),k=a(266),b=a(273),y=a.n(b),O=a(270),x=a(269),F=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,s=new Array(n),f=0;f<n;f++)s[f]=arguments[f];return(a=Object(c.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(s)))).state={fresdate:"",fcollfrm:"0000",fcollto:"ZZZZ",fregto:"ZZZZZ",fregfrm:"00000",fexam:"",fdeg:"",frvdate:"",frtdate:"",fcvdate:"",fpcdate:"",fridate:"",frvfee:"",frtfee:"",fcvfee:"",fpcfee:"",frifee:"",rvfee:"",rvfine:"",xrfee:"",ctfee:"",rtfee:"",rifee:"",mode:"",year:"",shwTbl:!1},a.handleChangedate=function(e,t){a.setState(Object(o.a)({},e.target.name,e.target.value))},a.handleChange=function(e,t){a.setState(Object(o.a)({},t.name,t.value))},a.getDegExmRng=Object(l.a)(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.props.getDegExmRng(a.state.fresdate);case 2:case"end":return e.stop()}},e)})),a.handleSave=Object(l.a)(r.a.mark(function e(){var t,n,l,o,i,s,c,u,f,h,d,p,m,g,v,E,w,C,k,b,y,O,x,F,D;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.state,t.fresdate,n=t.fdeg,l=t.fexam,o=t.fcollfrm,i=t.fcollto,s=t.fregfrm,c=t.fregto,u=t.frvfee,f=t.frtfee,h=t.fcvfee,d=t.fpcfee,p=t.frvdate,m=t.frtdate,g=t.fcvdate,v=t.fpcdate,E=t.fridate,w=t.frifee,C=t.rvfee,t.rvfine,k=t.xrfee,b=t.ctfee,y=t.rtfee,O=t.rifee,x=t.mode,F=t.year,l=l.join("','"),n=n.join("','"),D={fexam:l,fdeg:n,fcollfrm:o,fcollto:i,fregfrm:s,fregto:c,frvfee:u,frtfee:f,fcvfee:h,fpcfee:d,frvdate:p,frtdate:m,fcvdate:g,fpcdate:v,fridate:E,frifee:w,rvfee:C,xrfee:k,ctfee:b,rtfee:y,rifee:O,year:F,mode:x},e.next=6,a.props.updateRVRTFeeDet(D);case 6:a.handleCancel();case 7:case"end":return e.stop()}},e)})),a.handleCancel=function(){a.setState({fresdate:"",fcollfrm:"0000",fcollto:"ZZZZ",fregto:"ZZZZZ",fregfrm:"00000",fexam:"",fdeg:"",frvdate:"",frtdate:"",fcvdate:"",fpcdate:"",fridate:"",frvfee:"",frtfee:"",fcvfee:"",fpcfee:"",frifee:"",rvfee:"",rvfine:"",xrfee:"",ctfee:"",rtfee:"",rifee:"",mode:"",year:"",shwTbl:!1})},a}return Object(f.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=Object(l.a)(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.props.getDegExmRng(this.state.fresdate);case 2:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=void 0==this.props.DegExmRng.deg?[]:this.props.DegExmRng.deg,t=void 0==this.props.DegExmRng.exm?[]:this.props.DegExmRng.exm,a=(this.state.rvfee,{n:"[0-1]",m:"[0-9]",e:"[0-3]",d:"[0-9]",z:"[1-2]",y:"[0-9]"}),n=Object(O.i)();return d.a.createElement("div",null,d.a.createElement(m.a,{fluid:!0},d.a.createElement(m.a.Content,null,d.a.createElement(m.a.Header,{style:{display:"flex"}},d.a.createElement("h4",null," Fee / Date Update - RV / RT / PC"),d.a.createElement("div",{className:"ml-auto"},d.a.createElement(g.a,{basic:!0,color:"blue",content:"Save",onClick:this.handleSave,icon:"save"}),d.a.createElement(g.a,{basic:!0,onClick:this.handleCancel,color:"black",icon:"times circle",content:"Cancel"}),d.a.createElement(p.a,{to:"/dashboard"},d.a.createElement(g.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),d.a.createElement(v.a,null),d.a.createElement(m.a.Description,{style:{overflowY:"auto",height:"".concat(n,"px")}},d.a.createElement(E.a,null,d.a.createElement("div",{className:"row clearfix",style:{marginRight:"0px",marginLeft:"-5px"}},d.a.createElement("div",{className:"col-md-6"},d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16},d.a.createElement("label",null,"Degree Range"),d.a.createElement(w.a,{placeholder:"Degrees",search:!0,selection:!0,multiple:!0,name:"fdeg",value:this.state.fdeg,options:e.map(function(e,t){return{key:t,value:e.fdegree,text:"".concat(e.fdegree)}}),onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16},d.a.createElement("label",null,"Exam Range"),d.a.createElement(w.a,{placeholder:"Exam Range",search:!0,selection:!0,multiple:!0,id:"fexam",name:"fexam",value:this.state.fexam,options:t.map(function(e,t){return{key:t,value:e.fexamno,text:"".concat(e.fexamname)}}),onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{placeholder:"From",name:"fcollfrm",value:this.state.fcollfrm,onChange:this.handleChange,maxLength:"4",label:"College Range"})),d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{placeholder:"To",name:"fcollto",value:this.state.fcollto,onChange:this.handleChange,maxLength:"4",style:{marginTop:"1.6em"}}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{placeholder:"From",name:"fregfrm",value:this.state.fregfrm,onChange:this.handleChange,maxLength:"10",label:"Register No. Range"})),d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{placeholder:"To",name:"fregto",value:this.state.fregto,onChange:this.handleChange,maxLength:"10",style:{marginTop:"1.6em"}}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," Year "),d.a.createElement(E.a.Input,{type:"text",placeholder:"Year",name:"year",value:this.state.year,onChange:this.handleChange})),d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," Mode "),d.a.createElement(E.a.Input,{type:"text",placeholder:"Mode",name:"mode",value:this.state.mode,onChange:this.handleChange})))),d.a.createElement("div",{className:"col-md-6"},d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16},d.a.createElement("label",null,"Re-Valuation "))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null,"Last Date "),d.a.createElement(y.a,{type:"text",placeholder:"RV Last Date",name:"frvdate",mask:"ed/nm/zyyy",formatChars:a,value:this.state.frvdate,onChange:this.handleChangedate})),d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{label:"Fee",placeholder:"RV Fee",name:"frvfee",value:this.state.frvfee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16},d.a.createElement("label",null,"Re-Totalling "))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null,"Last Date "),d.a.createElement(y.a,{type:"text",label:"Fee",placeholder:"RT Last Date",name:"frtdate",mask:"ed/nm/zyyy",formatChars:a,value:this.state.frtdate,onChange:this.handleChangedate})),d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{label:"Fee",placeholder:"RT Fee",name:"frtfee",value:this.state.frtfee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16},d.a.createElement("label",null,"Photo Copy "))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," Last Date "),d.a.createElement(y.a,{type:"text",placeholder:"PC Last date",name:"fpcdate",mask:"ed/nm/zyyy",formatChars:a,value:this.state.fpcdate,onChange:this.handleChangedate})),d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{label:"Fee",placeholder:"PC Fee",name:"fpcfee",value:this.state.fpcfee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16},d.a.createElement("label",null,"Challenge Valuation "))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," Last Date "),d.a.createElement(y.a,{type:"text",placeholder:"CV Last Date",name:"fcvdate",mask:"ed/nm/zyyy",formatChars:a,value:this.state.fcvdate,onChange:this.handleChangedate})),d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{label:"Fee",placeholder:"CV Fee",name:"fcvfee",value:this.state.fcvfee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16},d.a.createElement("label",null,"Result Improvement "))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," Last Date "),d.a.createElement(y.a,{type:"text",placeholder:"RI Last Date",name:"fridate",mask:"ed/nm/zyyy",formatChars:a,value:this.state.fridate,onChange:this.handleChangedate})),d.a.createElement(E.a.Field,{width:8},d.a.createElement(E.a.Input,{label:"Fee",placeholder:"RI Fee",name:"frifee",value:this.state.frifee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16})),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," RV App fee "),d.a.createElement(E.a.Input,{type:"text",placeholder:"Fee",name:"rvfee",value:this.state.rvfee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16})),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," XR App fee "),d.a.createElement(E.a.Input,{type:"text",placeholder:"Fee",name:"xrfee",value:this.state.xrfee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16})),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," CT App fee "),d.a.createElement(E.a.Input,{type:"text",placeholder:"Fee",name:"ctfee",value:this.state.ctfee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16})),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," RT App fee "),d.a.createElement(E.a.Input,{type:"text",placeholder:"Fee",name:"rtfee",value:this.state.rtfee,onChange:this.handleChange}))),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:16})),d.a.createElement(E.a.Group,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null," RI App fee "),d.a.createElement(E.a.Input,{type:"text",placeholder:"Fee",name:"rifee",value:this.state.rifee,onChange:this.handleChange})))),d.a.createElement(v.a,{vertical:!0}," * ")))))))}}]),t}(h.Component);t.default=Object(C.b)(function(e){return{DegExmRng:e.getDegExmRng,FeeUpdateDet:e.shwFeeUpdateDet}},{showError:k.w,getDegExmRng:function(e){return function(){var t=Object(l.a)(r.a.mark(function t(a,n){var l,o,i,s;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return l=n(),t.next=3,x.a.get("/app.php",{params:{a:"getDegExmRng",univcode:l.univ.funivcode,fresdate:e,fdeggrp:l.user.fdeggrp}});case 3:"object"!==typeof(o=t.sent).data?(i={header:"Error",content:"Something went wrong"},a(Object(k.w)(i))):-1===o.data.error_code?(s={header:"Error",content:o.data.data.msg},a(Object(k.w)(s))):a({type:"LOAD_DEGEXM_RNG",payload:o.data});case 5:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},getFeeUpdateDet:function(e,t,a,n,o,i,s){return function(){var c=Object(l.a)(r.a.mark(function l(c,u){var f,h,d,p;return r.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return f=u(),c({type:"SET_LOADER"}),r.next=4,x.a.get("/app.php",{params:{a:"getFeeUpdateDet",univcode:f.univ.funivcode,fresdate:e,fdeggrp:f.user.fdeggrp,fexam:t,fdeg:a,fcollfrm:n,fcollto:o,fregfrm:i,fregto:s}});case 4:h=r.sent,console.log("ACTION",h),c({type:"UNSET_LOADER"}),"object"!==typeof h.data?(d={header:"Error",content:"Something went wrong"},c(Object(k.w)(d))):-1===h.data.error_code?(p={header:"Error",content:h.data.data.msg},c(Object(k.w)(p))):c({type:"SHW_FEE_DET",payload:h.data});case 8:case"end":return r.stop()}},l)}));return function(e,t){return c.apply(this,arguments)}}()},updateRVRTFeeDet:function(e,t,a,n,o,i,s,c,u,f,h,d,p,m,g,v,E){return console.log("DATA",e),function(){var t=Object(l.a)(r.a.mark(function t(a,n){var l,o,i,s,c;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return l=n(),t.next=3,x.a.post("app.php?a=updateRVRTFeeDet&univcode="+l.univ.funivcode,{data:e});case 3:o=t.sent,console.log("RVRTACTION",o),"object"!==typeof o.data?(i={header:"Error",content:"Something went wrong"},a(Object(k.w)(i))):-1===o.data.error_code?(s={header:"Error",content:o.data.data.msg},a(Object(k.w)(s))):(c={header:"Success",content:o.data.data.msg},a(Object(k.w)(c)));case 6:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()}})(F)},272:function(e,t,a){"use strict";var n=a(268),r=a.n(n),l=a(265),o=a.n(l),i=a(1),s=a.n(i),c=a(333),u=a(551),f=a(549),h=a(267);function d(e){var t=e.children,a=e.className,n=e.clearing,l=e.content,i=e.fitted,p=e.hidden,m=e.horizontal,g=e.inverted,v=e.section,E=e.vertical,w=o()("ui",Object(c.a)(n,"clearing"),Object(c.a)(i,"fitted"),Object(c.a)(p,"hidden"),Object(c.a)(m,"horizontal"),Object(c.a)(g,"inverted"),Object(c.a)(v,"section"),Object(c.a)(E,"vertical"),"divider",a),C=Object(u.a)(d,e),k=Object(f.a)(d,e);return s.a.createElement(k,r()({},C,{className:w}),h.a.isNil(t)?l:t)}d.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],d.propTypes={},t.a=d},273:function(e,t,a){e.exports=a(274)},274:function(e,t,a){"use strict";var n,r=(n=a(1))&&"object"==typeof n&&"default"in n?n.default:n,l=a(105);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),function(e,t){for(var a=Object.getOwnPropertyNames(t),n=0;n<a.length;n++){var r=a[n],l=Object.getOwnPropertyDescriptor(t,r);l&&l.configurable&&void 0===e[r]&&Object.defineProperty(e,r,l)}}(e.prototype.constructor=e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=function(e,t,a,n,r,l,o,i){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[a,n,r,l,o,i],u=0;(s=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}};function u(e,t,a){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=a;else{var n=e.createTextRange();n.collapse(!0),n.moveStart("character",t),n.moveEnd("character",a-t),n.select()}}var f={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},h="_";function d(e,t,a){var n="",r="",l=null,o=[];if(void 0===t&&(t=h),null==a&&(a=f),!e||"string"!=typeof e)return{maskChar:t,formatChars:a,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var i=!1;return e.split("").forEach(function(e){i=!i&&"\\"===e||(i||!a[e]?(o.push(n.length),n.length===o.length-1&&(r+=e)):l=n.length+1,n+=e,!1)}),{maskChar:t,formatChars:a,prefix:r,mask:n,lastEditablePosition:l,permanents:o}}function p(e,t){return-1!==e.permanents.indexOf(t)}function m(e,t,a){var n=e.mask,r=e.formatChars;if(!a)return!1;if(p(e,t))return n[t]===a;var l=r[n[t]];return new RegExp(l).test(a)}function g(e,t){return t.split("").every(function(t,a){return p(e,a)||!m(e,a,t)})}function v(e,t){var a=e.maskChar,n=e.prefix;if(!a){for(;t.length>n.length&&p(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var r=n.length,l=t.length;l>=n.length;l--){var o=t[l];if(!p(e,l)&&m(e,l,o)){r=l+1;break}}return r}function E(e,t){return v(e,t)===e.mask.length}function w(e,t){var a=e.maskChar,n=e.mask,r=e.prefix;if(!a){for((t=C(e,"",t,0)).length<r.length&&(t=r);t.length<n.length&&p(e,t.length);)t+=n[t.length];return t}if(t)return C(e,w(e,""),t,0);for(var l=0;l<n.length;l++)p(e,l)?t+=n[l]:t+=a;return t}function C(e,t,a,n){var r=e.mask,l=e.maskChar,o=e.prefix,i=a.split(""),s=E(e,t);return!l&&n>t.length&&(t+=r.slice(t.length,n)),i.every(function(a){for(;u=a,p(e,c=n)&&u!==r[c];){if(n>=t.length&&(t+=r[n]),i=a,l&&p(e,n)&&i===l)return!0;if(++n>=r.length)return!1}var i,c,u;return!m(e,n,a)&&a!==l||(n<t.length?t=l||s||n<o.length?t.slice(0,n)+a+t.slice(n+1):(t=t.slice(0,n)+a+t.slice(n),w(e,t)):l||(t+=a),++n<r.length)}),t}function k(e,t){for(var a=e.mask,n=t;n<a.length;++n)if(!p(e,n))return n;return null}function b(e){return e||0===e?e+"":""}function y(e,t,a,n,r){var l=e.mask,o=e.prefix,i=e.lastEditablePosition,s=t,c="",u=0,f=0,h=Math.min(r.start,a.start);return a.end>r.start?f=(u=function(e,t,a,n){var r=e.mask,l=e.maskChar,o=a.split(""),i=n;return o.every(function(t){for(;o=t,p(e,a=n)&&o!==r[a];)if(++n>=r.length)return!1;var a,o;return(m(e,n,t)||t===l)&&n++,n<r.length}),n-i}(e,0,c=s.slice(r.start,a.end),h))?r.length:0:s.length<n.length&&(f=n.length-s.length),s=n,f&&(1!==f||r.length||(h=r.start===a.start?k(e,a.start):function(e,t){for(var a=t;0<=a;--a)if(!p(e,a))return a;return null}(e,a.start)),s=function(e,t,a,n){var r=a+n,l=e.maskChar,o=e.mask,i=e.prefix,s=t.split("");if(l)return s.map(function(t,n){return n<a||r<=n?t:p(e,n)?o[n]:l}).join("");for(var c=r;c<s.length;c++)p(e,c)&&(s[c]="");return a=Math.max(i.length,a),s.splice(a,r-a),t=s.join(""),w(e,t)}(e,s,h,f)),s=C(e,s,c,h),(h+=u)>=l.length?h=l.length:h<o.length&&!u?h=o.length:h>=o.length&&h<i&&u&&(h=k(e,h)),c||(c=null),{value:s=w(e,s),enteredString:c,selection:{start:h,end:h}}}function O(e){return"function"==typeof e}function x(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function F(e){return(x()?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame:function(){return setTimeout(e,1e3/60)})(e)}function D(e){(x()||clearTimeout)(e)}var S=function(e){function t(t){var a=e.call(this,t)||this;a.focused=!1,a.mounted=!1,a.previousSelection=null,a.selectionDeferId=null,a.saveSelectionLoopDeferId=null,a.saveSelectionLoop=function(){a.previousSelection=a.getSelection(),a.saveSelectionLoopDeferId=F(a.saveSelectionLoop)},a.runSaveSelectionLoop=function(){null===a.saveSelectionLoopDeferId&&a.saveSelectionLoop()},a.stopSaveSelectionLoop=function(){null!==a.saveSelectionLoopDeferId&&(D(a.saveSelectionLoopDeferId),a.saveSelectionLoopDeferId=null,a.previousSelection=null)},a.getInputDOMNode=function(){if(!a.mounted)return null;var e=l.findDOMNode(s(s(a))),t="undefined"!=typeof window&&e instanceof window.Element;if(e&&!t)return null;if("INPUT"!==e.nodeName&&(e=e.querySelector("input")),!e)throw new Error("react-input-mask: inputComponent doesn't contain input node");return e},a.getInputValue=function(){var e=a.getInputDOMNode();return e?e.value:null},a.setInputValue=function(e){var t=a.getInputDOMNode();t&&(a.value=e,t.value=e)},a.setCursorToEnd=function(){var e=v(a.maskOptions,a.value),t=k(a.maskOptions,e);null!==t&&a.setCursorPosition(t)},a.setSelection=function(e,t,n){void 0===n&&(n={});var r=a.getInputDOMNode(),l=a.isFocused();r&&l&&(n.deferred||u(r,e,t),null!==a.selectionDeferId&&D(a.selectionDeferId),a.selectionDeferId=F(function(){a.selectionDeferId=null,u(r,e,t)}),a.previousSelection={start:e,end:t,length:Math.abs(t-e)})},a.getSelection=function(){return function(e){var t=0,a=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,a=e.selectionEnd;else{var n=document.selection.createRange();n.parentElement()===e&&(t=-n.moveStart("character",-e.value.length),a=-n.moveEnd("character",-e.value.length))}return{start:t,end:a,length:a-t}}(a.getInputDOMNode())},a.getCursorPosition=function(){return a.getSelection().start},a.setCursorPosition=function(e){a.setSelection(e,e)},a.isFocused=function(){return a.focused},a.getBeforeMaskedValueChangeConfig=function(){var e=a.maskOptions,t=e.mask,n=e.maskChar,r=e.permanents,l=e.formatChars;return{mask:t,maskChar:n,permanents:r,alwaysShowMask:!!a.props.alwaysShowMask,formatChars:l}},a.isInputAutofilled=function(e,t,n,r){var l=a.getInputDOMNode();try{if(l.matches(":-webkit-autofill"))return!0}catch(c){}return!a.focused||r.end<n.length&&t.end===e.length},a.onChange=function(e){var t=s(s(a)).beforePasteState,n=s(s(a)).previousSelection,r=a.props.beforeMaskedValueChange,l=a.getInputValue(),o=a.value,i=a.getSelection();a.isInputAutofilled(l,i,o,n)&&(o=w(a.maskOptions,""),n={start:0,end:0,length:0}),t&&(n=t.selection,o=t.value,i={start:n.start+l.length,end:n.start+l.length,length:0},l=o.slice(0,n.start)+l+o.slice(n.end),a.beforePasteState=null);var c=y(a.maskOptions,l,i,o,n),u=c.enteredString,f=c.selection,h=c.value;if(O(r)){var d=r({value:h,selection:f},{value:o,selection:n},u,a.getBeforeMaskedValueChangeConfig());h=d.value,f=d.selection}a.setInputValue(h),O(a.props.onChange)&&a.props.onChange(e),a.isWindowsPhoneBrowser?a.setSelection(f.start,f.end,{deferred:!0}):a.setSelection(f.start,f.end)},a.onFocus=function(e){var t=a.props.beforeMaskedValueChange,n=a.maskOptions,r=n.mask,l=n.prefix;if(a.focused=!0,a.mounted=!0,r){if(a.value)v(a.maskOptions,a.value)<a.maskOptions.mask.length&&a.setCursorToEnd();else{var o=w(a.maskOptions,l),i=w(a.maskOptions,o),s=v(a.maskOptions,i),c=k(a.maskOptions,s),u={start:c,end:c};if(O(t)){var f=t({value:i,selection:u},{value:a.value,selection:null},null,a.getBeforeMaskedValueChangeConfig());i=f.value,u=f.selection}var h=i!==a.getInputValue();h&&a.setInputValue(i),h&&O(a.props.onChange)&&a.props.onChange(e),a.setSelection(u.start,u.end)}a.runSaveSelectionLoop()}O(a.props.onFocus)&&a.props.onFocus(e)},a.onBlur=function(e){var t=a.props.beforeMaskedValueChange,n=a.maskOptions.mask;if(a.stopSaveSelectionLoop(),a.focused=!1,n&&!a.props.alwaysShowMask&&g(a.maskOptions,a.value)){var r="";O(t)&&(r=t({value:r,selection:null},{value:a.value,selection:a.previousSelection},null,a.getBeforeMaskedValueChangeConfig()).value);var l=r!==a.getInputValue();l&&a.setInputValue(r),l&&O(a.props.onChange)&&a.props.onChange(e)}O(a.props.onBlur)&&a.props.onBlur(e)},a.onMouseDown=function(e){if(!a.focused&&document.addEventListener){a.mouseDownX=e.clientX,a.mouseDownY=e.clientY,a.mouseDownTime=(new Date).getTime();document.addEventListener("mouseup",function e(t){if(document.removeEventListener("mouseup",e),a.focused){var n=Math.abs(t.clientX-a.mouseDownX),r=Math.abs(t.clientY-a.mouseDownY),l=Math.max(n,r),o=(new Date).getTime()-a.mouseDownTime;(l<=10&&o<=200||l<=5&&o<=300)&&a.setCursorToEnd()}})}O(a.props.onMouseDown)&&a.props.onMouseDown(e)},a.onPaste=function(e){O(a.props.onPaste)&&a.props.onPaste(e),e.defaultPrevented||(a.beforePasteState={value:a.getInputValue(),selection:a.getSelection()},a.setInputValue(""))},a.handleRef=function(e){null==a.props.children&&O(a.props.inputRef)&&a.props.inputRef(e)};var n=t.mask,r=t.maskChar,o=t.formatChars,i=t.alwaysShowMask,c=t.beforeMaskedValueChange,f=t.defaultValue,h=t.value;a.maskOptions=d(n,r,o),null==f&&(f=""),null==h&&(h=f);var p=b(h);if(a.maskOptions.mask&&(i||p)&&(p=w(a.maskOptions,p),O(c))){var m=t.value;null==t.value&&(m=f),p=c({value:p,selection:null},{value:m=b(m),selection:null},null,a.getBeforeMaskedValueChangeConfig()).value}return a.value=p,a}i(t,e);var a=t.prototype;return a.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=function(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),a=navigator.userAgent;return e.test(a)&&t.test(a)}(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},a.componentDidUpdate=function(){var e=this.previousSelection,t=this.props,a=t.beforeMaskedValueChange,n=t.alwaysShowMask,r=t.mask,l=t.maskChar,o=t.formatChars,i=this.maskOptions,s=n||this.isFocused(),c=null!=this.props.value,u=c?b(this.props.value):this.value,f=e?e.start:null;if(this.maskOptions=d(r,l,o),this.maskOptions.mask){!i.mask&&this.isFocused()&&this.runSaveSelectionLoop();var h=this.maskOptions.mask&&this.maskOptions.mask!==i.mask;if(i.mask||c||(u=this.getInputValue()),(h||this.maskOptions.mask&&(u||s))&&(u=w(this.maskOptions,u)),h){var p=v(this.maskOptions,u);(null===f||p<f)&&(f=E(this.maskOptions,u)?p:k(this.maskOptions,p))}!this.maskOptions.mask||!g(this.maskOptions,u)||s||c&&this.props.value||(u="");var m={start:f,end:f};if(O(a)){var C=a({value:u,selection:m},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());u=C.value,m=C.selection}this.value=u;var y=this.getInputValue()!==this.value;y?(this.setInputValue(this.value),this.forceUpdate()):h&&this.forceUpdate();var x=!1;null!=m.start&&null!=m.end&&(x=!e||e.start!==m.start||e.end!==m.end),(x||y)&&this.setSelection(m.start,m.end)}else i.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},a.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&D(this.selectionDeferId),this.stopSaveSelectionLoop()},a.render=function(){var e,t=this.props,a=(t.mask,t.alwaysShowMask,t.maskChar,t.formatChars,t.inputRef,t.beforeMaskedValueChange,t.children),n=function(e,t){if(null==e)return{};var a,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],0<=t.indexOf(a)||(r[a]=e[a]);return r}(t,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(a){O(a)||c(!1);var l=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],i=o({},n);l.forEach(function(e){return delete i[e]}),e=a(i),l.filter(function(t){return null!=e.props[t]&&e.props[t]!==n[t]}).length&&c(!1)}else e=r.createElement("input",o({ref:this.handleRef},n));var s={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(n.disabled||n.readOnly||(s.onChange=this.onChange,s.onPaste=this.onPaste,s.onMouseDown=this.onMouseDown),null!=n.value&&(s.value=this.value)),e=r.cloneElement(e,s)},t}(r.Component);e.exports=S}}]);
//# sourceMappingURL=89.798fc9be.chunk.js.map