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 : 18.119.235.107
(window.webpackJsonp=window.webpackJsonp||[]).push([[101],{1198:function(e,t,n){"use strict";n.r(t);var r=n(68),o=n(0),a=n(100),i=n(101),l=n(103),s=n(102),c=n(104),u=n(2),f=n.n(u),h=n(941),p=n(1377),d=n(1343),m=n(272),v=n(1335),g=n(1338),y=n(105),w=n(274),k=n(267),E=n(275),b=n.n(E),S=n(273),C=n(287),x=n.n(C),O=n(532);function L(){L=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),l=new P(r||[]);return o(i,"_invoke",{value:O(e,n,l)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",p="suspendedYield",d="executing",m="completed",v={};function g(){}function y(){}function w(){}var k={};c(k,i,function(){return this});var E=Object.getPrototypeOf,b=E&&E(E(M([])));b&&b!==n&&r.call(b,i)&&(k=b);var S=w.prototype=g.prototype=Object.create(k);function C(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){function n(o,a,i,l){var s=f(e[o],e,a);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,i,l)},function(e){n("throw",e,i,l)}):t.resolve(u).then(function(e){c.value=e,i(c)},function(e){return n("throw",e,i,l)})}l(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return a=a?a.then(o,o):o()}})}function O(t,n,r){var o=h;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var s=D(l,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var c=f(t,n,r);if("normal"===c.type){if(o=r.done?m:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=m,r.method="throw",r.arg=c.arg)}}}function D(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,D(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function M(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:y,configurable:!0}),y.displayName=c(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(x.prototype),c(x.prototype,l,function(){return this}),t.AsyncIterator=x,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new x(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},C(S),c(S,s,"Generator"),c(S,i,function(){return this}),c(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}var D=function(e){function t(){var e,n;Object(a.a)(this,t);for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];return(n=Object(l.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(c)))).state={showtable:!1,frmDeggrp:"",reportType:"datewWiseValDet",frmSubmit:!1,rftype:"PDF",tcodefrom:"0000",tcodeto:"zzzz",vdatefrom:x()().subtract(7,"days").format("DD/MM/YYYY"),vdateto:x()().format("DD/MM/YYYY")},n.handleChange=function(e,t){switch(t.type){case"text":n.setState(Object(o.a)({},t.name,t.value));default:n.setState(Object(o.a)({},t.name,t.value))}n.setState({frmSubmit:!1})},n.handleSubmit=Object(r.a)(L().mark(function e(){var t,r;return L().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.props.user.fdeggrp,n.state.reportType,e.next=4,n.props.getWorkDone(n.state,n.props.user.fuserid,n.props.user.fcurtype);case 4:if(n.props.data2!=[]&&n.setState({showtable:!0}),""!==t){e.next=9;break}return r={header:"Error",content:"Select Degree Group"},n.props.showError(r),e.abrupt("return");case 9:n.setState({frmSubmit:!0});case 10:case"end":return e.stop()}},e)})),n.handleReport=function(){var e=n.props.user,t=e.fdeggrp,r=e.fcuruniv,o=n.state,a=(o.reportType,o.rftype,o.tcodefrom,o.tcodeto,o.vdatefrom),i=o.vdateto;if(""!==t)"600"==n.props.user.fcurtype?window.open(w.c+"teachWorkDone&univcode="+r+"°grp="+t+"&tcodefrom="+n.props.user.fuserid+"&tcodeto="+n.props.user.fuserid+"&vdatefrom="+a+"&vdateto="+i+"&format=PDF&fcollcode="+n.props.user.fcollcode,"_blank"):parseInt(n.props.user.fcurtype)>=500?window.open(w.c+"teachWorkDone&univcode="+r+"°grp="+t+"&tcodefrom=0000&tcodeto=ZZZZ&vdatefrom="+a+"&vdateto="+i+"&format=PDF&fcollcode="+n.props.user.fcollcode,"_blank"):window.open(w.c+"teachWorkDone&univcode="+r+"°grp="+t+"&tcodefrom=0000&tcodeto=ZZZZ&vdatefrom="+a+"&vdateto="+i+"&format=PDF","_blank");else{n.props.showError({header:"Error",content:"Select Degree Group"})}},n.handleChangedate=function(e){n.setState(Object(o.a)({},e.target.name,e.target.value))},n.handleCancel=function(){n.setState({reportType:"",reportFormat:"",frmDeggrp:""})},n.renderHeader=function(){return f.a.createElement(p.a.Header,{style:{display:"flex"}},f.a.createElement("h3",null,"Work Done Reports"),f.a.createElement("div",{className:"ml-auto"},f.a.createElement(d.a,{basic:!0,color:"blue",onClick:n.handleReport,content:"Report",icon:"file"}),f.a.createElement(d.a,{basic:!0,color:"black",icon:"ban",onClick:n.handleCancel,content:"Cancel"}),f.a.createElement(h.a,{to:"/dashboard"},f.a.createElement(d.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},n}return Object(c.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this,t=this.state,n=(t.frmSubmit,t.reportType,t.rftype,t.tcodefrom,t.tcodeto,t.vdatefrom),r=t.vdateto,o={n:"[0-1]",m:"[0-9]",e:"[0-3]",d:"[0-9]",z:"[1-2]",y:"[0-9]"},a=Object(S.i)();return f.a.createElement("div",{className:"animated fadeIn"},f.a.createElement(p.a,{fluid:!0},f.a.createElement(p.a.Content,null,this.renderHeader(),f.a.createElement(m.a,null),f.a.createElement(p.a.Description,{style:{overflowY:"auto",height:"".concat(a,"px")}},f.a.createElement("div",{className:"col-md-6"},f.a.createElement(v.a,null,f.a.createElement(v.a.Group,null,f.a.createElement(v.a.Field,{width:8},f.a.createElement("label",null," Date Range "),f.a.createElement(b.a,{formatChars:o,type:"text",value:n,mask:"ed/nm/zyyy",placeholder:"Date From",name:"vdatefrom",onChange:this.handleChangedate})),f.a.createElement(v.a.Field,{width:8},f.a.createElement(b.a,{formatChars:o,type:"text",value:r,mask:"ed/nm/zyyy",placeholder:"To",name:"vdateto",onChange:this.handleChangedate,style:{marginTop:"1.6em"}}))),f.a.createElement(d.a,{color:"blue",onClick:this.handleSubmit},"Submit"),f.a.createElement("br",null))),this.state.showtable&&f.a.createElement(g.a,{celled:!0,padded:!0,selectable:!0,size:"small",color:"olive",className:"tbl sticky1"},f.a.createElement(g.a.Header,{style:{backgroundColor:"bule !important"}},f.a.createElement(g.a.Row,null,f.a.createElement(g.a.HeaderCell,{style:{width:"5%"},singleLine:!0,textAlign:"center",rowSpan:"2"},"Sl. No."),f.a.createElement(g.a.HeaderCell,{style:{width:"5%"},textAlign:"center",rowSpan:"2"},"Date"),f.a.createElement(g.a.HeaderCell,{style:{width:"5%"},textAlign:"center",rowSpan:"2"},"Qp Code"),f.a.createElement(g.a.HeaderCell,{style:{width:"20%"},textAlign:"center",rowSpan:"2"},"Subject Name"),parseInt(this.props.user.fcurtype)<600&&f.a.createElement(f.a.Fragment,null,f.a.createElement(g.a.HeaderCell,{style:{width:"5%"},textAlign:"center",rowSpan:"2"},"Teacher Code"),f.a.createElement(g.a.HeaderCell,{style:{width:"20%"},textAlign:"center",rowSpan:"2"},"Teacher name")),f.a.createElement(g.a.HeaderCell,{textAlign:"center",colSpan:"2"},"Valuation"),f.a.createElement(g.a.HeaderCell,{textAlign:"center",colSpan:"2"},"Review"),f.a.createElement(g.a.HeaderCell,{textAlign:"center",rowSpan:"2"},"Packets Numbers")),f.a.createElement(g.a.Row,null,f.a.createElement(g.a.HeaderCell,{style:{width:"7%"},textAlign:"center"},"Pkts"),f.a.createElement(g.a.HeaderCell,{style:{width:"7%"},textAlign:"center"},"Scripts"),f.a.createElement(g.a.HeaderCell,{style:{width:"7%"},textAlign:"center"},"Pkts"),f.a.createElement(g.a.HeaderCell,{style:{width:"7%"},textAlign:"center"},"Scripts"))),f.a.createElement(g.a.Body,null,this.props.data2.valdet.map(function(t,n){return f.a.createElement(g.a.Row,{key:n,style:{overflow:"hidden",textAlign:"center"}},f.a.createElement(g.a.Cell,{textAlign:"center"},n+1),f.a.createElement(g.a.Cell,null,t.fdate),f.a.createElement(g.a.Cell,null,t.fqpcode),f.a.createElement(g.a.Cell,{style:{textAlign:"left"}},t.fsubname),parseInt(e.props.user.fcurtype)<600&&f.a.createElement(f.a.Fragment,null,f.a.createElement(g.a.Cell,null,t.fvalcode),f.a.createElement(g.a.Cell,{style:{textAlign:"left"}},t.fteachname)),f.a.createElement(g.a.Cell,null,t.fvpktcnt),f.a.createElement(g.a.Cell,null,t.fvscriptcnt),f.a.createElement(g.a.Cell,null,t.frvpktcnt),f.a.createElement(g.a.Cell,null,t.frscriptcnt),f.a.createElement(g.a.Cell,{style:{textAlign:"left"}},t.fpkts))})))))))}}]),t}(u.Component);t.default=Object(y.b)(function(e){return{user:e.user,data2:e.allworkDOneReport}},{showError:k.A,getWorkDone:O.a})(D)},275:function(e,t,n){e.exports=n(276)},276:function(e,t,n){"use strict";var r,o=(r=n(2))&&"object"==typeof r&&"default"in r?r.default:r,a=n(106);function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){e.prototype=Object.create(t.prototype),function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var o=n[r],a=Object.getOwnPropertyDescriptor(t,o);a&&a.configurable&&void 0===e[o]&&Object.defineProperty(e,o,a)}}(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,n,r,o,a,i,l){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=[n,r,o,a,i,l],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,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else{var r=e.createTextRange();r.collapse(!0),r.moveStart("character",t),r.moveEnd("character",n-t),r.select()}}var f={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},h="_";function p(e,t,n){var r="",o="",a=null,i=[];if(void 0===t&&(t=h),null==n&&(n=f),!e||"string"!=typeof e)return{maskChar:t,formatChars:n,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var l=!1;return e.split("").forEach(function(e){l=!l&&"\\"===e||(l||!n[e]?(i.push(r.length),r.length===i.length-1&&(o+=e)):a=r.length+1,r+=e,!1)}),{maskChar:t,formatChars:n,prefix:o,mask:r,lastEditablePosition:a,permanents:i}}function d(e,t){return-1!==e.permanents.indexOf(t)}function m(e,t,n){var r=e.mask,o=e.formatChars;if(!n)return!1;if(d(e,t))return r[t]===n;var a=o[r[t]];return new RegExp(a).test(n)}function v(e,t){return t.split("").every(function(t,n){return d(e,n)||!m(e,n,t)})}function g(e,t){var n=e.maskChar,r=e.prefix;if(!n){for(;t.length>r.length&&d(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var o=r.length,a=t.length;a>=r.length;a--){var i=t[a];if(!d(e,a)&&m(e,a,i)){o=a+1;break}}return o}function y(e,t){return g(e,t)===e.mask.length}function w(e,t){var n=e.maskChar,r=e.mask,o=e.prefix;if(!n){for((t=k(e,"",t,0)).length<o.length&&(t=o);t.length<r.length&&d(e,t.length);)t+=r[t.length];return t}if(t)return k(e,w(e,""),t,0);for(var a=0;a<r.length;a++)d(e,a)?t+=r[a]:t+=n;return t}function k(e,t,n,r){var o=e.mask,a=e.maskChar,i=e.prefix,l=n.split(""),s=y(e,t);return!a&&r>t.length&&(t+=o.slice(t.length,r)),l.every(function(n){for(;u=n,d(e,c=r)&&u!==o[c];){if(r>=t.length&&(t+=o[r]),l=n,a&&d(e,r)&&l===a)return!0;if(++r>=o.length)return!1}var l,c,u;return!m(e,r,n)&&n!==a||(r<t.length?t=a||s||r<i.length?t.slice(0,r)+n+t.slice(r+1):(t=t.slice(0,r)+n+t.slice(r),w(e,t)):a||(t+=n),++r<o.length)}),t}function E(e,t){for(var n=e.mask,r=t;r<n.length;++r)if(!d(e,r))return r;return null}function b(e){return e||0===e?e+"":""}function S(e,t,n,r,o){var a=e.mask,i=e.prefix,l=e.lastEditablePosition,s=t,c="",u=0,f=0,h=Math.min(o.start,n.start);return n.end>o.start?f=(u=function(e,t,n,r){var o=e.mask,a=e.maskChar,i=n.split(""),l=r;return i.every(function(t){for(;i=t,d(e,n=r)&&i!==o[n];)if(++r>=o.length)return!1;var n,i;return(m(e,r,t)||t===a)&&r++,r<o.length}),r-l}(e,0,c=s.slice(o.start,n.end),h))?o.length:0:s.length<r.length&&(f=r.length-s.length),s=r,f&&(1!==f||o.length||(h=o.start===n.start?E(e,n.start):function(e,t){for(var n=t;0<=n;--n)if(!d(e,n))return n;return null}(e,n.start)),s=function(e,t,n,r){var o=n+r,a=e.maskChar,i=e.mask,l=e.prefix,s=t.split("");if(a)return s.map(function(t,r){return r<n||o<=r?t:d(e,r)?i[r]:a}).join("");for(var c=o;c<s.length;c++)d(e,c)&&(s[c]="");return n=Math.max(l.length,n),s.splice(n,o-n),t=s.join(""),w(e,t)}(e,s,h,f)),s=k(e,s,c,h),(h+=u)>=a.length?h=a.length:h<i.length&&!u?h=i.length:h>=i.length&&h<l&&u&&(h=E(e,h)),c||(c=null),{value:s=w(e,s),enteredString:c,selection:{start:h,end:h}}}function C(e){return"function"==typeof e}function x(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function O(e){return(x()?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame:function(){return setTimeout(e,1e3/60)})(e)}function L(e){(x()||clearTimeout)(e)}var D=function(e){function t(t){var n=e.call(this,t)||this;n.focused=!1,n.mounted=!1,n.previousSelection=null,n.selectionDeferId=null,n.saveSelectionLoopDeferId=null,n.saveSelectionLoop=function(){n.previousSelection=n.getSelection(),n.saveSelectionLoopDeferId=O(n.saveSelectionLoop)},n.runSaveSelectionLoop=function(){null===n.saveSelectionLoopDeferId&&n.saveSelectionLoop()},n.stopSaveSelectionLoop=function(){null!==n.saveSelectionLoopDeferId&&(L(n.saveSelectionLoopDeferId),n.saveSelectionLoopDeferId=null,n.previousSelection=null)},n.getInputDOMNode=function(){if(!n.mounted)return null;var e=a.findDOMNode(s(s(n))),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},n.getInputValue=function(){var e=n.getInputDOMNode();return e?e.value:null},n.setInputValue=function(e){var t=n.getInputDOMNode();t&&(n.value=e,t.value=e)},n.setCursorToEnd=function(){var e=g(n.maskOptions,n.value),t=E(n.maskOptions,e);null!==t&&n.setCursorPosition(t)},n.setSelection=function(e,t,r){void 0===r&&(r={});var o=n.getInputDOMNode(),a=n.isFocused();o&&a&&(r.deferred||u(o,e,t),null!==n.selectionDeferId&&L(n.selectionDeferId),n.selectionDeferId=O(function(){n.selectionDeferId=null,u(o,e,t)}),n.previousSelection={start:e,end:t,length:Math.abs(t-e)})},n.getSelection=function(){return function(e){var t=0,n=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,n=e.selectionEnd;else{var r=document.selection.createRange();r.parentElement()===e&&(t=-r.moveStart("character",-e.value.length),n=-r.moveEnd("character",-e.value.length))}return{start:t,end:n,length:n-t}}(n.getInputDOMNode())},n.getCursorPosition=function(){return n.getSelection().start},n.setCursorPosition=function(e){n.setSelection(e,e)},n.isFocused=function(){return n.focused},n.getBeforeMaskedValueChangeConfig=function(){var e=n.maskOptions,t=e.mask,r=e.maskChar,o=e.permanents,a=e.formatChars;return{mask:t,maskChar:r,permanents:o,alwaysShowMask:!!n.props.alwaysShowMask,formatChars:a}},n.isInputAutofilled=function(e,t,r,o){var a=n.getInputDOMNode();try{if(a.matches(":-webkit-autofill"))return!0}catch(c){}return!n.focused||o.end<r.length&&t.end===e.length},n.onChange=function(e){var t=s(s(n)).beforePasteState,r=s(s(n)).previousSelection,o=n.props.beforeMaskedValueChange,a=n.getInputValue(),i=n.value,l=n.getSelection();n.isInputAutofilled(a,l,i,r)&&(i=w(n.maskOptions,""),r={start:0,end:0,length:0}),t&&(r=t.selection,i=t.value,l={start:r.start+a.length,end:r.start+a.length,length:0},a=i.slice(0,r.start)+a+i.slice(r.end),n.beforePasteState=null);var c=S(n.maskOptions,a,l,i,r),u=c.enteredString,f=c.selection,h=c.value;if(C(o)){var p=o({value:h,selection:f},{value:i,selection:r},u,n.getBeforeMaskedValueChangeConfig());h=p.value,f=p.selection}n.setInputValue(h),C(n.props.onChange)&&n.props.onChange(e),n.isWindowsPhoneBrowser?n.setSelection(f.start,f.end,{deferred:!0}):n.setSelection(f.start,f.end)},n.onFocus=function(e){var t=n.props.beforeMaskedValueChange,r=n.maskOptions,o=r.mask,a=r.prefix;if(n.focused=!0,n.mounted=!0,o){if(n.value)g(n.maskOptions,n.value)<n.maskOptions.mask.length&&n.setCursorToEnd();else{var i=w(n.maskOptions,a),l=w(n.maskOptions,i),s=g(n.maskOptions,l),c=E(n.maskOptions,s),u={start:c,end:c};if(C(t)){var f=t({value:l,selection:u},{value:n.value,selection:null},null,n.getBeforeMaskedValueChangeConfig());l=f.value,u=f.selection}var h=l!==n.getInputValue();h&&n.setInputValue(l),h&&C(n.props.onChange)&&n.props.onChange(e),n.setSelection(u.start,u.end)}n.runSaveSelectionLoop()}C(n.props.onFocus)&&n.props.onFocus(e)},n.onBlur=function(e){var t=n.props.beforeMaskedValueChange,r=n.maskOptions.mask;if(n.stopSaveSelectionLoop(),n.focused=!1,r&&!n.props.alwaysShowMask&&v(n.maskOptions,n.value)){var o="";C(t)&&(o=t({value:o,selection:null},{value:n.value,selection:n.previousSelection},null,n.getBeforeMaskedValueChangeConfig()).value);var a=o!==n.getInputValue();a&&n.setInputValue(o),a&&C(n.props.onChange)&&n.props.onChange(e)}C(n.props.onBlur)&&n.props.onBlur(e)},n.onMouseDown=function(e){if(!n.focused&&document.addEventListener){n.mouseDownX=e.clientX,n.mouseDownY=e.clientY,n.mouseDownTime=(new Date).getTime();document.addEventListener("mouseup",function e(t){if(document.removeEventListener("mouseup",e),n.focused){var r=Math.abs(t.clientX-n.mouseDownX),o=Math.abs(t.clientY-n.mouseDownY),a=Math.max(r,o),i=(new Date).getTime()-n.mouseDownTime;(a<=10&&i<=200||a<=5&&i<=300)&&n.setCursorToEnd()}})}C(n.props.onMouseDown)&&n.props.onMouseDown(e)},n.onPaste=function(e){C(n.props.onPaste)&&n.props.onPaste(e),e.defaultPrevented||(n.beforePasteState={value:n.getInputValue(),selection:n.getSelection()},n.setInputValue(""))},n.handleRef=function(e){null==n.props.children&&C(n.props.inputRef)&&n.props.inputRef(e)};var r=t.mask,o=t.maskChar,i=t.formatChars,l=t.alwaysShowMask,c=t.beforeMaskedValueChange,f=t.defaultValue,h=t.value;n.maskOptions=p(r,o,i),null==f&&(f=""),null==h&&(h=f);var d=b(h);if(n.maskOptions.mask&&(l||d)&&(d=w(n.maskOptions,d),C(c))){var m=t.value;null==t.value&&(m=f),d=c({value:d,selection:null},{value:m=b(m),selection:null},null,n.getBeforeMaskedValueChangeConfig()).value}return n.value=d,n}l(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=function(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),n=navigator.userAgent;return e.test(n)&&t.test(n)}(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},n.componentDidUpdate=function(){var e=this.previousSelection,t=this.props,n=t.beforeMaskedValueChange,r=t.alwaysShowMask,o=t.mask,a=t.maskChar,i=t.formatChars,l=this.maskOptions,s=r||this.isFocused(),c=null!=this.props.value,u=c?b(this.props.value):this.value,f=e?e.start:null;if(this.maskOptions=p(o,a,i),this.maskOptions.mask){!l.mask&&this.isFocused()&&this.runSaveSelectionLoop();var h=this.maskOptions.mask&&this.maskOptions.mask!==l.mask;if(l.mask||c||(u=this.getInputValue()),(h||this.maskOptions.mask&&(u||s))&&(u=w(this.maskOptions,u)),h){var d=g(this.maskOptions,u);(null===f||d<f)&&(f=y(this.maskOptions,u)?d:E(this.maskOptions,d))}!this.maskOptions.mask||!v(this.maskOptions,u)||s||c&&this.props.value||(u="");var m={start:f,end:f};if(C(n)){var k=n({value:u,selection:m},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());u=k.value,m=k.selection}this.value=u;var S=this.getInputValue()!==this.value;S?(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||S)&&this.setSelection(m.start,m.end)}else l.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},n.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&L(this.selectionDeferId),this.stopSaveSelectionLoop()},n.render=function(){var e,t=this.props,n=(t.mask,t.alwaysShowMask,t.maskChar,t.formatChars,t.inputRef,t.beforeMaskedValueChange,t.children),r=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(t,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){C(n)||c(!1);var a=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],l=i({},r);a.forEach(function(e){return delete l[e]}),e=n(l),a.filter(function(t){return null!=e.props[t]&&e.props[t]!==r[t]}).length&&c(!1)}else e=o.createElement("input",i({ref:this.handleRef},r));var s={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(r.disabled||r.readOnly||(s.onChange=this.onChange,s.onPaste=this.onPaste,s.onMouseDown=this.onMouseDown),null!=r.value&&(s.value=this.value)),e=o.cloneElement(e,s)},t}(o.Component);e.exports=D},532:function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(68),o=n(271),a=n(267);function i(){i=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),l=new P(r||[]);return o(i,"_invoke",{value:L(e,n,l)}),i}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",d="suspendedYield",m="executing",v="completed",g={};function y(){}function w(){}function k(){}var E={};u(E,l,function(){return this});var b=Object.getPrototypeOf,S=b&&b(b(M([])));S&&S!==n&&r.call(S,l)&&(E=S);var C=k.prototype=y.prototype=Object.create(E);function x(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function O(e,t){function n(o,a,i,l){var s=h(e[o],e,a);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then(function(e){n("next",e,i,l)},function(e){n("throw",e,i,l)}):t.resolve(u).then(function(e){c.value=e,i(c)},function(e){return n("throw",e,i,l)})}l(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=p;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var s=D(l,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var c=h(t,n,r);if("normal"===c.type){if(o=r.done?v:d,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=v,r.method="throw",r.arg=c.arg)}}}function D(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,D(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=h(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function M(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return w.prototype=k,o(C,"constructor",{value:k,configurable:!0}),o(k,"constructor",{value:w,configurable:!0}),w.displayName=u(k,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,u(e,c,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},x(O.prototype),u(O.prototype,s,function(){return this}),t.AsyncIterator=O,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new O(f(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then(function(e){return e.done?e.value:i.next()})},x(C),u(C,c,"Generator"),u(C,l,function(){return this}),u(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}var l=function(e,t,n){var l={};return function(){var s=Object(r.a)(i().mark(function r(s,c){var u,f;return i().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(u=c(),s({type:"SET_LOADER"}),"600"!=n){r.next=6;break}return r.next=5,o.a.get("/app.php?a=teachworkapi&univcode="+u.univ.funivcode+"°grp=UG&tcodefrom="+t+"&tcodeto="+t+"&vdatefrom="+e.vdatefrom+"&vdateto="+e.vdateto+"&format=PDF&fcollcode="+u.user.fcollcode);case 5:l=r.sent;case 6:if("500"!=n){r.next=12;break}return r.next=9,o.a.get("/app.php?a=teachworkapi&univcode="+u.univ.funivcode+"°grp=UG&tcodefrom=0000&tcodeto=zzzz&vdatefrom="+e.vdatefrom+"&vdateto="+e.vdateto+"&format=PDF&fcollcode="+u.user.fcollcode);case 9:l=r.sent,r.next=16;break;case 12:if("600"==n){r.next=16;break}return r.next=15,o.a.get("/app.php?a=teachworkapi&univcode="+u.univ.funivcode+"°grp=UG&tcodefrom="+e.tcodefrom+"&tcodeto="+e.tcodeto+"&vdatefrom="+e.vdatefrom+"&vdateto="+e.vdateto+"&format=PDF&user=");case 15:l=r.sent;case 16:s({type:"UNSET_LOADER"}),"object"!==typeof l.data?s({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):-1===l.data.error_code?(f={header:"Error",content:l.data.data.msg},s(Object(a.A)(f))):s({type:"WORK_DONE_REPORT",payload:l.data});case 18:case"end":return r.stop()}},r)}));return function(e,t){return s.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=101.ec5dc54e.chunk.js.map
|