(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{167:function(e,n,a){"use strict";var t=a(0),m=a.n(t),r=a(176),o=a(171),l=a(702),i=a(703),c=a(704),u=a(705),d=a(402),s=a(361),f=a(699);var N=function(e){var n=e.request,a=e.btn,t=e.category,r=e.values,o=r.name,l=r.newName,i=r.confirmName,c=e.errors,u=e.touched,N=e.handleChange,p=e.isValid,g=e.setFieldTouched,b=function(e,n){n.persist(),N(n),g(e,!0,!1)};return m.a.createElement(f.a,{container:!0,component:"form",spacing:1,onSubmit:function(e){e.preventDefault(),n({name:o,newName:l,confirmName:i})}},"add"===t?m.a.createElement(f.a,{component:d.a,item:!0,xs:12,id:"name",name:"name",label:"Name",onChange:b.bind(null,"name"),value:o,helperText:u.name?c.name:"",error:u.name&&Boolean(c.name)}):"delete"===t?m.a.createElement(f.a,{component:d.a,item:!0,xs:12,id:"confirmName",name:"confirmName",label:"Confirm Name",onChange:b.bind(null,"confirmName"),value:i,helperText:u.confirmName?c.confirmName:"",error:u.confirmName&&Boolean(c.confirmName)}):"rename"===t?m.a.createElement(m.a.Fragment,null,m.a.createElement(f.a,{component:d.a,item:!0,xs:12,id:"newName",name:"newName",label:"New Name",onChange:b.bind(null,"newName"),value:l,helperText:u.newName?c.newName:"",error:u.newName&&Boolean(c.newName)}),m.a.createElement(f.a,{component:d.a,item:!0,xs:12,id:"confirmName",name:"confirmName",label:"Confirm Name",onChange:b.bind(null,"confirmName"),value:i,helperText:u.confirmName?c.confirmName:"",error:u.confirmName&&Boolean(c.confirmName)})):null,m.a.createElement(f.a,{item:!0,xs:12,component:s.a,type:"submit",disabled:!p,size:"large"},a))},p=o.object({name:o.string().required("enter name").matches(/^[a-zA-Z0-9_]+$/,{message:"input letters, numbers, and underscore only",excludeEmptyString:!0}).min(1,"name too short").max(50,"name too long")}),g=o.object({name:o.string(),confirmName:o.string().required("re-enter name").matches(/^[a-z0-9_]*$/i,{message:"input letters, numbers, and underscore only",excludeEmptyString:!0}).oneOf([o.ref("name")],"Confirm Name does not match")}),b=o.object({name:o.string(),confirmName:o.string().required("re-enter name").oneOf([o.ref("name")],"Confirm Name does not match"),newName:o.string().required("enter new name").matches(/^[a-zA-Z0-9_]+$/,{message:"input letters, numbers, and underscore only",excludeEmptyString:!0}).min(1,"new name too short").max(50,"new name too long")}),h={name:""},E=function(e){return{name:e,confirmName:""}},w=function(e){return{name:e,confirmName:"",newName:""}};n.a=function(e){var n=e.title,a=e.content,t=e.targetName,o=e.category,d=e.dialogProps;return m.a.createElement(l.a,d,m.a.createElement(i.a,{id:"dialog-title"},n),m.a.createElement(c.a,null,"add"===o||"delete"===o||"rename"===o?m.a.createElement(m.a.Fragment,null,"delete"===o?m.a.createElement(m.a.Fragment,null,m.a.createElement(u.a,null,a),m.a.createElement(u.a,null,"Please type in the name of the target to confirm")):null,m.a.createElement(r.a,{validationSchema:"add"===o?p:"rename"===o?b:"delete"===o?g:{},initialValues:"add"===o?h:"rename"===o?w(t):"delete"===o?E(t):{},render:function(n){return m.a.createElement(N,Object.assign({},e,n))}})):"notification"===o?m.a.createElement(u.a,null,a):null))}},708:function(e,n,a){"use strict";a.r(n);var t=a(0),m=a.n(t),r=a(23),o=a(35),l=a(19),i=a(167),c=Object(t.lazy)(function(){return Promise.all([a.e(4),a.e(18)]).then(a.bind(null,647))}),u=Object(t.lazy)(function(){return Promise.all([a.e(4),a.e(19)]).then(a.bind(null,648))});n.default=function(e){var n=Object(o.c)(),a=Object(o.d)(function(e){return e.notification});return m.a.createElement(m.a.Fragment,null,m.a.createElement(i.a,{category:"notification",title:a.title,content:a.content,dialogProps:{open:""!==a.title&&""!==a.content,onClose:function(){return n(Object(l.d)())}}}),m.a.createElement(r.d,null,m.a.createElement(r.b,{path:"/:project/:entity/add",component:c}),m.a.createElement(r.b,{path:"/:project/:entity/:document",component:u})))}}}]);
//# sourceMappingURL=17.0e46726f.chunk.js.map