PageSourceSearch

https://edunet.vercel.app/_next/static/chunks/pages/create-group-ec186aa4a44393782855.js

js edunet.vercel.app collected 2026-10-03 06:51:27 UTC 12,880 bytes, 1 lines download raw bytes

1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[17],{"197s":function(e,t,a){var n,r,i;r=[e,t,a("q1tI"),a("17x9")],void 0===(i="function"===typeof(n=function(e,t,a,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(a);function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i(n);var l=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}();function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=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};function p(e,t){var a={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}function h(e){for(var t=[],a=0;a<e.length;a++)-1===t.indexOf(e[a])&&t.push(e[a]);return t}function f(e){return window.clipboardData?window.clipboardData.getData("Text"):e.clipboardData?e.clipboardData.getData("text/plain"):""}function g(e){var t=e.tag,a=e.key,n=e.disabled,i=e.onRemove,s=e.classNameRemove,o=e.getTagDisplayValue,l=p(e,["tag","key","disabled","onRemove","classNameRemove","getTagDisplayValue"]);return r.default.createElement("span",d({key:a},l),o(t),!n&&r.default.createElement("a",{className:s,onClick:function(e){return i(a)}}))}function m(e){e.addTag;var t=p(e,["addTag"]),a=t.onChange,n=t.value,i=p(t,["onChange","value"]);return r.default.createElement("input",d({type:"text",onChange:a,value:n},i))}function v(e,t){return r.default.createElement("span",null,e,t)}function b(e){return e.split(" ").map((function(e){return e.trim()}))}var j={className:"react-tagsinput-input",placeholder:"Add a tag"},y=function(e){function t(){o(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={tag:"",isFocused:!1},e.focus=e.focus.bind(e),e.blur=e.blur.bind(e),e}return c(t,e),l(t,[{key:"_getTagDisplayValue",value:function(e){var t=this.props.tagDisplayProp;return t?e[t]:e}},{key:"_makeTag",value:function(e){var t=this.props.tagDisplayProp;return t?s({},t,e):e}},{key:"_removeTag",value:function(e){var t=this.props.value.concat([]);if(e>-1&&e<t.length){var a=t.splice(e,1);this.props.onChange(t,a,[e])}}},{key:"_clearInput",value:function(){this.hasControlledInput()?this.props.onChangeInput(""):this.setState({tag:""})}},{key:"_tag",value:function(){return this.hasControlledInput()?this.props.inputValue:this.state.tag}},{key:"_addTags",value:function(e){var t=this,a=this.props,n=a.validationRegex,r=a.onChange,i=a.onValidationReject,s=a.onlyUnique,o=a.maxTags,l=a.value;s&&(e=(e=h(e)).filter((function(e){return l.every((function(a){return t._getTagDisplayValue(a)!==t._getTagDisplayValue(e)}))})));var u=e.filter((function(e){return!n.test(t._getTagDisplayValue(e))}));if(e=(e=e.filter((function(e){return n.test(t._getTagDisplayValue(e))}))).filter((function(e){var a=t._getTagDisplayValue(e);return"function"===typeof a.trim?a.trim().length>0:a})),o>=0){var c=Math.max(o-l.length,0);e=e.slice(0,c)}if(i&&u.length>0&&i(u),e.length>0){for(var d=l.concat(e),p=[],f=0;f<e.length;f++)p.push(l.length+f);return r(d,e,p),this._clearInput(),!0}return u.length>0||this._clearInput(),!1}},{key:"_shouldPreventDefaultEventOnAdd",value:function(e,t,a){return!!e||13===a&&(this.props.preventSubmit||!this.props.preventSubmit&&!t)}},{key:"focus",value:function(){this.input&&"function"===typeof this.input.focus&&this.input.focus(),this.handleOnFocus()}},{key:"blur",value:function(){this.input&&"function"===typeof this.input.blur&&this.input.blur(),this.handleOnBlur()}},{key:"accept",value:function(){var e=this._tag();return""!==e&&(e=this._makeTag(e),this._addTags([e]))}},{key:"addTag",value:function(e){return this._addTags([e])}},{key:"clearInput",value:function(){this._clearInput()}},{key:"handlePaste",value:function(e){var t=this,a=this.props,n=a.addOnPaste,r=a.pasteSplit;if(n){e.preventDefault();var i=r(f(e)).map((function(e){return t._makeTag(e)}));this._addTags(i)}}},{key:"handleKeyDown",value:function(e){if(!e.defaultPrevented){var t=this.props,a=t.value,n=t.removeKeys,r=t.addKeys,i=""===this._tag(),s=e.keyCode,o=e.key,l=-1!==r.indexOf(s)||-1!==r.indexOf(o),u=-1!==n.indexOf(s)||-1!==n.indexOf(o);if(l){var c=this.accept();this._shouldPreventDefaultEventOnAdd(c,i,s)&&e.preventDefault()}u&&a.length>
10&&i&&(e.preventDefault(),this._removeTag(a.length-1))}}},{key:"handleClick",value:function(e){e.target===this.div&&this.focus()}},{key:"handleChange",value:function(e){var t=this.props.onChangeInput,a=this.props.inputProps.onChange,n=e.target.value;a&&a(e),this.hasControlledInput()?t(n):this.setState({tag:n})}},{key:"handleOnFocus",value:function(e){var t=this.props.inputProps.onFocus;t&&t(e),this.setState({isFocused:!0})}},{key:"handleOnBlur",value:function(e){var t=this.props.inputProps.onBlur;if(this.setState({isFocused:!1}),null!=e&&(t&&t(e),this.props.addOnBlur)){var a=this._makeTag(e.target.value);this._addTags([a])}}},{key:"handleRemove",value:function(e){this._removeTag(e)}},{key:"inputProps",value:function(){var e=this.props.inputProps,t=(e.onChange,e.onFocus,e.onBlur,p(e,["onChange","onFocus","onBlur"])),a=d({},j,t);return this.props.disabled&&(a.disabled=!0),a}},{key:"inputValue",value:function(e){return e.currentValue||e.inputValue||""}},{key:"hasControlledInput",value:function(){var e=this.props,t=e.inputValue;return"function"===typeof e.onChangeInput&&"string"===typeof t}},{key:"componentDidMount",value:function(){this.hasControlledInput()||this.setState({tag:this.inputValue(this.props)})}},{key:"componentWillReceiveProps",value:function(e){this.hasControlledInput()||this.inputValue(e)&&this.setState({tag:this.inputValue(e)})}},{key:"render",value:function(){var e=this,t=this.props,a=t.value,n=(t.onChange,t.tagProps),i=t.renderLayout,s=t.renderTag,o=t.renderInput,l=(t.addKeys,t.removeKeys,t.className),u=t.focusedClassName,c=(t.addOnBlur,t.addOnPaste,t.inputProps,t.pasteSplit,t.onlyUnique,t.maxTags,t.validationRegex,t.disabled);t.tagDisplayProp,t.inputValue,t.onChangeInput,p(t,["value","onChange","tagProps","renderLayout","renderTag","renderInput","addKeys","removeKeys","className","focusedClassName","addOnBlur","addOnPaste","inputProps","pasteSplit","onlyUnique","maxTags","validationRegex","disabled","tagDisplayProp","inputValue","onChangeInput"]),this.state.isFocused&&(l+=" "+u);var h=a.map((function(t,a){return s(d({key:a,tag:t,onRemove:e.handleRemove.bind(e),disabled:c,getTagDisplayValue:e._getTagDisplayValue.bind(e)},n))})),f=o(d({ref:function(t){e.input=t},value:this._tag(),onPaste:this.handlePaste.bind(this),onKeyDown:this.handleKeyDown.bind(this),onChange:this.handleChange.bind(this),onFocus:this.handleOnFocus.bind(this),onBlur:this.handleOnBlur.bind(this),addTag:this.addTag.bind(this)},this.inputProps()));return r.default.createElement("div",{ref:function(t){e.div=t},onClick:this.handleClick.bind(this),className:l},i(h,f))}}]),t}(r.default.Component);y.defaultProps={className:"react-tagsinput",focusedClassName:"react-tagsinput--focused",addKeys:[9,13],addOnBlur:!1,addOnPaste:!1,inputProps:{},removeKeys:[8],renderInput:m,renderTag:g,renderLayout:v,pasteSplit:b,tagProps:{className:"react-tagsinput-tag",classNameRemove:"react-tagsinput-remove"},onlyUnique:!1,maxTags:-1,validationRegex:/.*/,disabled:!1,tagDisplayProp:null,preventSubmit:!0},t.default=y,e.exports=t.default})?n.apply(t,r):n)||(e.exports=i)},"4FQI":function(e,t,a){"use strict";a.r(t);var n=a("nKUr"),r=a("YFqc"),i=a.n(r),s=a("KYPV"),o=a("q1tI"),l=a("197s"),u=a.n(l),c=(a("oEMv"),a("UGp+")),d={groupName:"",groupSelect:"",groupDesc:"",groupAdmin:"",groupCourseSelect:"",groupMemberInvite:""},p=c.c().shape({groupName:c.d().required("Group name is required"),groupSelect:c.d().required("Group type is required"),groupDesc:c.d().required("Group description required"),groupAdmin:c.a().required("Minimum one admin is required"),groupCourseSelect:c.d().required("Please select a course"),groupMemberInvite:c.d().required("Minimum one invitation is required")});var h=function(){var e=Object(o.useState)(["Fiaz"]),t=e[0],a=e[1],r=Object(o.useState)(["Fiaz"]),i=r[0],l=r[1];return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)(s.d,{initialValues:d,validationSchema:p,onSubmit:function(e){alert("SUCCESS!! :-)\n\n"+JSON.stringify(e,null,4))},children:function(e){var r=e.errors,o=(e.status,e.touched);return Object(n.jsxs)(s.c,{children:[Object(n.jsxs)("div",{className:"row",children:[Object(n.jsxs)("div",{className:"col-xl-12 mb-15",children:[Object(n.jsx)("label",{className:"form-label",children:"Group Name"}),Object(n.jsx)(s.b,{name:"groupName",type:"text",className:"form-control"+(r.groupName&&o.groupName?" is-invalid":"")}),Object(n.jsx)(s.a,{name:"groupName",component:"div",className:"invalid-feedback"})]}),Object(n.jsxs)("div",{className:"col-xl-12 mb-15",children:[Object(n.jsxs)("div",{className:"form-group mb-10",children:[Object(n.jsx)(s.b,{name:"groupSelect",type:"radio",className:"form-check-inpu me-10"+(r.groupSelect&&o.groupSelect?" is-invalid":""),id:"inlineRadio1",value:"Private"}),Object(n.jsx)("label",{className:"form-check-label",for:"inlineRadio1",children:"Private Group"})]}),Object(n.jsxs)("div",{className:"form-group mb-10",children:[Object(n.jsx)(s.b,{name:"groupSelect",type:"radio",className:"form-check-inpu me-10"+(r.groupSelect&&o.groupSelect?" is-invalid":""),id:"inlineRadio2",value:"Public"}),Object(n.jsx)("label",{className:"form-check-label",for:"inlineRadio2",children:"Public Group"}),Object(n.jsx)(s.a,{name:"groupSelect",component:"div",className:"invalid-feedback"})]})]}),Object(n.jsxs)("div",{className:"col-xl-12 mb-15",children:[Object(n.jsx)("label",{className:"form-label",children:"Group Description"}),Object(n.jsx)(s.b,{name:"groupDesc",type:"text",className:"form-control"+(r.groupDesc&&o.groupDesc?" is-invalid":"")}),Object(n.jsx)(s.a,{name:"groupDesc",component:"div",className:"invalid-feedback"})]}),Object(n.jsxs)("div",{className:"col-xl-6 mb-15",children:[Object(n.jsx)("label",{className:"form-label",children:"Group Admin"}),Object(n.jsx)(u.a,{value:i,onChange:l,name:"groupAdmin",placeHolder:"Add Admin"})]}),Object(n.jsxs)("div",{className:"col-xl-6 mb-15",children:[Object(n.jsx)("label",{className:"form-label",children:"Select Course"}),Object(n.jsxs)(s.b,{name:"groupCourseSelect",as:"select",className:"form-control"+(r.groupCourseSelect&&o.groupCourseSelect?" is-invalid":""),children:[Object(n.jsx)("option",{selected:!0,children:"Select a Course"}),Object(n.jsx)("option",{value:"1",children:"Web Design"}
1),Object(n.jsx)("option",{value:"2",children:"App UX/UI Design"}),Object(n.jsx)("option",{value:"3",children:"Web Programming"})]}),Object(n.jsx)(s.a,{name:"groupCourseSelect",component:"div",className:"invalid-feedback"})]}),Object(n.jsxs)("div",{className:"col-xl-12 mb-15",children:[Object(n.jsx)("label",{className:"form-label",children:"Invite Member"}),Object(n.jsx)(u.a,{value:t,onChange:a,name:"groupMemberInvite",placeHolder:"Add Member"})]})]}),Object(n.jsx)("div",{className:"mt-16",children:Object(n.jsx)("button",{type:"submit",className:"btn btn-primary mr-2",children:"Save"})})]})}})})},f=a("80PL");t.default=function(){return Object(n.jsx)(n.Fragment,{children:Object(n.jsx)(f.a,{headTitle:"Create Group",pageTitle:"Create Group",pageTitleSub:"Welcome to Edunet Create Group page",pageClass:"dashboard",parent:"Home",child:"Create Group",children:Object(n.jsx)("div",{className:"row",children:Object(n.jsx)("div",{className:"col-12",children:Object(n.jsxs)("div",{className:"cc-card",children:[Object(n.jsxs)("div",{className:"cc-card-title d-flex justify-content-between align-items-center",children:[Object(n.jsx)("h5",{children:"Create Group"}),Object(n.jsx)(i.a,{href:"javascript:history.back()",children:Object(n.jsx)("a",{children:"Go Back"})})]}),Object(n.jsx)("hr",{}),Object(n.jsx)("div",{className:"cc-card-body",children:Object(n.jsx)(h,{})})]})})})})})}},dIwj:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/create-group",function(){return a("4FQI")}])},oEMv:function(e,t,a){}},[["dIwj",0,2,1,3,4,5]]]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.