1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[501],{17888:function(e){var t;t=function(){"use strict";var e="millisecond",t="second",n="minute",r="hour",s="week",i="month",a="quarter",c="year",u="date",l="Invalid Date",o=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},f="en",m={};m[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||"th")+"]"}};var x="$isDayjsObject",v=function(e){return e instanceof p||!(!e||!e[x])},$=function e(t,n,r){var s;if(!t)return f;if("string"==typeof t){var i=t.toLowerCase();m[i]&&(s=i),n&&(m[i]=n,s=i);var a=t.split("-");if(!s&&a.length>1)return e(a[0])}else{var c=t.name;m[c]=t,s=c}return!r&&s&&(f=s),s||!r&&f},g=function(e,t){if(v(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new p(n)},j={s:h,z:function(e){var t=-e.utcOffset(),n=Math.abs(t);return(t<=0?"+":"-")+h(Math.floor(n/60),2,"0")+":"+h(n%60,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),s=t.clone().add(r,i),a=n-s<0,c=t.clone().add(r+(a?-1:1),i);return+(-(r+(n-s)/(a?s-c:c-s))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(l){return({M:i,y:c,w:s,d:"day",D:u,h:r,m:n,s:t,ms:e,Q:a})[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};j.l=$,j.i=v,j.w=function(e,t){return g(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var p=function(){function h(e){this.$L=$(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var f=h.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(o);if(r){var s=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return j},f.isValid=function(){return this.$d.toString()!==l},f.isSame=function(e,t){var n=g(e);return this.startOf(t)<=n&&n<=this.endOf(t)},f.isAfter=function(e,t){return g(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<g(e)},f.$g=function(e,t,n){return j.u(e)?this[t]:this.set(n,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,a){var l=this,o=!!j.u(a)||a,d=j.p(e),h=function(e,t){var n=j.w(l.$u?Date.UTC(l.$y,t,e):new Date(l.$y,t,e),l);return o?n:n.endOf("day")},f=function(e,t){return j.w(l.toDate()[e].apply(l.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),l)},m=this.$W,x=this.$M,v=this.$D,$="set"+(this.$u?"UTC":"");switch(d){case c:return o?h(1,0):h(31,11);case i:return o?h(1,x):h(0,x+1);case s:var g=this.$locale().weekStart||0,p=(m<g?m+7:m)-g;return h(o?v-p:v+(6-p),x);case"day":case u:return f($+"Hours",0);case r:return f($+"Minutes",1);case n:return f($+"Seconds",2);case t:return f($+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(s,a){var l,o=j.p(s),d="set"+(this.$u?"UTC":""),h=((l={}).day=d+"Date",l[u]=d+"Date",l[i]=d+"Month",l[c]=d+"FullYear",l[r]=d+"Hours",l[n]=d+"Minutes",l[t]=d+"Seconds",l[e]=d+"Milliseconds",l)[o],f="day"===o?this.$D+(a-this.$W):a;if(o===i||o===c){var m=this.clone().set(u,1);m.$d[h](f),m.init(),this.$d=m.set(u,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[j.p(e)]()},f.add=function(e,a){var u,l=this;e=Number(e);var o=j.p(a),d=function(t){var n=g(l);return j.w(n.date(n.date()+Math.round(t*e)),l)};if(o===i)return this.set(i,this.$M+e);if(o===c)return this.set(c,this.$y+e);if("day"===o)return d(1);if(o===s)return d(7);var h=((u={})[n]=6e4,u[r]=36e5,u[t]=1e3,u)[o]||1,f=this.$d.getTime()+e*h;return j.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=e||"YYYY-MM-DDTHH:mm:ssZ",s=j.z(this),i=this.$H,a=this.$m,c=this.$M,u=n.weekdays,o=n.months,h=n.meridiem,f=function(e,n,s,i){return e&&(e[
1n]||e(t,r))||s[n].slice(0,i)},m=function(e){return j.s(i%12||12,e,"0")},x=h||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(d,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return c+1;case"MM":return j.s(c+1,2,"0");case"MMM":return f(n.monthsShort,c,o,3);case"MMMM":return f(o,c);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,u,2);case"ddd":return f(n.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return m(1);case"hh":return m(2);case"a":return x(i,a,!0);case"A":return x(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return s}return null}(e)||s.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(e,u,l){var o,d=this,h=j.p(u),f=g(e),m=(f.utcOffset()-this.utcOffset())*6e4,x=this-f,v=function(){return j.m(d,f)};switch(h){case c:o=v()/12;break;case i:o=v();break;case a:o=v()/3;break;case s:o=(x-m)/6048e5;break;case"day":o=(x-m)/864e5;break;case r:o=x/36e5;break;case n:o=x/6e4;break;case t:o=x/1e3;break;default:o=x}return l?o:j.a(o)},f.daysInMonth=function(){return this.endOf(i).$D},f.$locale=function(){return m[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=$(e,t,!0);return r&&(n.$L=r),n},f.clone=function(){return j.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},h}(),b=p.prototype;return g.prototype=b,[["$ms",e],["$s",t],["$m",n],["$H",r],["$W","day"],["$M",i],["$y",c],["$D",u]].forEach(function(e){b[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),g.extend=function(e,t){return e.$i||(e(t,p,g),e.$i=!0),g},g.locale=$,g.isDayjs=v,g.unix=function(e){return g(1e3*e)},g.en=m[f],g.Ls=m,g.p={},g},e.exports=t()},19610:function(e){var t;t=function(){return function(e,t,n){t.prototype.isBetween=function(e,t,r,s){var i=n(e),a=n(t),c="("===(s=s||"()")[0],u=")"===s[1];return(c?this.isAfter(i,r):!this.isBefore(i,r))&&(u?this.isBefore(a,r):!this.isAfter(a,r))||(c?this.isBefore(i,r):!this.isAfter(i,r))&&(u?this.isAfter(a,r):!this.isBefore(a,r))}}},e.exports=t()},7933:function(e){var t;t=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,s){var i,a=function(e,n,r){void 0===r&&(r={});var s,i,a,c,u=new Date(e);return(void 0===(s=r)&&(s={}),(c=t[a=n+"|"+(i=s.timeZoneName||"short")])||(c=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}
1),t[a]=c),c).formatToParts(u)},c=function(t,n){for(var r=a(t,n),i=[],c=0;c<r.length;c+=1){var u=r[c],l=u.type,o=u.value,d=e[l];d>=0&&(i[d]=parseInt(o,10))}var h=i[3],f=i[0]+"-"+i[1]+"-"+i[2]+" "+(24===h?0:h)+":"+i[4]+":"+i[5]+":000",m=+t;return(s.utc(f).valueOf()-(m-=m%1e3))/6e4},u=r.prototype;u.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),a=this.toDate(),c=a.toLocaleString("en-US",{timeZone:e}),u=Math.round((a-new Date(c))/1e3/60),l=-(15*Math.round(a.getTimezoneOffset()/15))-u;if(Number(l)){if(n=s(c,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var o=n.utcOffset();n=n.add(r-o,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},u.offsetName=function(e){var t=this.$x.$timezone||s.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var l=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},s.tz=function(e,t,n){var r=n&&t,a=n||t||i,u=c(+s(),a);if("string"!=typeof e)return s(e).tz(a);var l=function(e,t,n){var r=e-60*t*1e3,s=c(r,n);if(t===s)return[r,t];var i=c(r-=60*(s-t)*1e3,n);return s===i?[r,s]:[e-60*Math.min(s,i)*1e3,Math.max(s,i)]}(s.utc(e,r).valueOf(),u,a),o=l[0],d=l[1],h=s(o).utcOffset(d);return h.$x.$timezone=a,h},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(e){i=e}}},e.exports=t()},49605:function(e){var t;t=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,s,i){var a=s.prototype;i.utc=function(e){var t={date:e,utc:!0,args:arguments};return new s(t)},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var c=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),c.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var l=a.utcOffset;a.utcOffset=function(r,s){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var s=(""+r[0]).match(n)||["-",0,0],i=s[0],a=60*+s[1]+ +s[2];return 0===a?0:"+"===i?a:-a}(r)))return this;var a=16>=Math.abs(r)?60*r:r;if(0===a)return this.utc(s);var c=this.clone();if(s)return c.$offset=a,c.$u=!1,c;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(c=this.local().add(a+u,e)).$offset=a,c.$x.$localOffset=u,c};var o=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return o.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),s=i(e).local();return h.call(r,s,t,n)}}},e.exports=t()},43294:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/users",function(){return n(20841)}])},8679:function(e,t,n){"use strict";n.d(t,{S:function(){return $}});var r=n(11527),s=n(34986),i=n.n(s),a=n(50959),c=n(71396),u=n(48976),l=n(6129),o=n(48581),d=n(18732),h=n(95399),f=n(99894),m=n(31457),x=n(65161);let v=e=>{let{handleOnSubmit:t,handleOnClose:n}=e,{t:s}=(0,o.$G)();return(0,r.jsx)("div",{className:"z-[1000] sm:h-screen flex justify-center items-center sm:max-w-2xl sm:mx-auto",children:(0,r.jsxs)("div",{className:"flex flex-col bg-white shadow-sm rounded-xl",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center py-3 px-4 border-b",children:[(0,r.jsx)(d.Z,{variant:"h3",children:s("title:users.remove")}),(0,r.jsxs)(u.z,{color:"neutral",appearance:"Soft",rounded:!0,size:"square",onClick:n,children:[(0,r.jsx)("span",{className:"sr-only",children:"Close"}),(0,r.jsx)(c.PZ,{})]})]}),(0,r.jsx)("div",{className:"p-4 overflow-y-auto",children:(0,r.jsx)(d.Z,{variant:"text",children:s("text:users.remove")})}),(0,r.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-x-2 py-3 px-4",children:[(0,r.jsx)(u.z,{wide:"w-full",size:"sm",color:"gray",appearance:"White",type:"button",onClick:n,children:s("button:users.remove.cancel")}),(0,r.jsx)(u.z,{wide:"w-full",size:"sm",color:"blue",onClick:t,children:s("button:users.remove.remove")})]})]})})},$=e=>{let{id:t,type:n}=e,{t:s}=(0,o.$G)(),[c,u]=(0,a.useState)(!1),[$]=(0,h.H5l)(),[g]=(0,h.KfC)(),j=(0,m.useRouter)(),p=e=>{e.preventDefault(),u(!0)},b=async()=>{try{"account"===n?(await $({variables:{id:t}}),u(!1),await j.push(l.k.dashboard.users).then(()=>{(0,f.B)("success",s("message:success.user.remove"),s("title:users.update"),!0)})):"invite"===n&&(await g({variables:{id:t}}),u(!1),await j.push(l.k.dashboard.users).then(()=>{(0,f.B)("success",s("message:success.user.remove"),s("title:users.update"),!0)}))}catch(e){(0,f.B)("error",s("message:error.user.alert"),s("title:users.update"),!0)}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.u,{open:c,children:(0,r.jsx)(v,{handleOnSubmit:b,handleOnClose:()=>{u(!1)}})}),(0,r.jsx)(i(),{className:"",href:"#",onClick:e=>p(e),children:"invite"===n?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(d.Z,{className:"text-red-400",children:s("label:users.remove.button")})}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(d.Z,{className:"text-blue-400",children:s("label:users.remove.text")})})})]})}},65161:function(e,t,n){"use strict";n.d(t,{u:function(){return a}});var r=n(11527),s=n(50959),i=n(33133);let a=e=>{let{open:t,children:n}=e,{setOverlay:a}=(0,i.Ir)();return(0,s.useEffect)(()=>{!0===t?a(n):a(void 0)},[t]),(0,r.jsx)(r.Fragment,{})}},49060:function(e,t,n){"use strict";n.d(t,{Ot:function(){return h},Td:function(){return d},Th:function(){return o},Tr:function(){return l},hr:function(){return c},iA:function(){return a},p3:function(){return u}});var r=n(11527),s=n(82187),i=n.n(s);let a=e=>{let{children:t,...n}=e,s="min-w-full divide-y divide-gray-200 ",a=i()(void 0!==n.className?s+n.className:s);return(0,r.jsx)("table",{...n,className:a,children:t})},c=e=>{let{children:t,...n}=e,s=i()(void 0!==n.className?" "+n.className:" ");return(0,r.jsx)("thead",{...n,className:s,children:t})},u=e=>{let{children:t,...n}=e,s=i()(void 0!==n.className?""+n.className:"");return(0,r.jsx)("tbody",{...n,className:s,children:t})},l=e=>{let{children:t,...n}=e,s=i()(void 0!==n.className?" "+n.className:" ");return(0,r.jsx)("tr",{...n,className:s,children:t})},o=e=>{let{children:t,...n}=e,s="px-6 py-3 text-left text-xs font-medium text-center text-neutral-400 font-medium leading-none tracking-wide ",a=i()(void 0!==n.className?s+n.className:s);return(0,r.jsx)("th",{...n,className:a,children:t})},d=e=>{let{children:t,...n}=e,s="px-6 py-4 whitespace-nowrap text-sm text-gray-800 ",a=i()(void 0===n.className?s+n.className:s);return(0,r.jsx)("td",{...n,className:a,children:t})},h=e=>{let{children:t,...n}=e;return(0,r.jsx)("td",{...n,children:t})}},95315:function(e,t,n){"use strict";n.d(t,{x:function(){return s}});var r=n(11527);let s=e=>{let{html:t=!1,className:n,text:s}=e;return(0,r.jsx)(r.Fragment,{children:!0===t?(0,r.jsx)("span",{className:"".concat(void 0!==n?n:""),dangerouslySetInnerHTML:{__html:s}}):(0,r.jsx)("span",{className:"".concat(void 0!==n?n:""),children:s})})}},18732:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(11527);let s=e=>{let{variant:t,className:n="",children:s}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(()=>void 0!==t?"h1"===t?(0,r.jsx)("h1",{className:"block text-3xl font-bold text-gray-800 ".concat(n),children:s}):"h2"===t?(0,r.jsx)("h3",{className:"block text-xl font-bold sm:text-2xl tracking-wide ".concat(n),children:s}):"h3"===t?(0,r.jsx)("h3",{className:"black text-base font-semibold tracking-wide ".concat(n),children:s}):"h4"===t?(0,r.jsx)("h3",{className:"black text-sm font-semibold tracking-wide ".concat(n),children:s}):"text"===t?(0,r.jsx)("h3",{className:"black text text-neutral-600 font-medium leading-5 tracking-wide ".concat(n),children:s}):"neutral"===t?(0,r.jsx)("h3",{className:"black block text text-neutral-500 font-medium leading-none tracking-wide ".concat(n),children:s}):"caption"===t?(0,r.jsx)("h3",{className:"black text-xs text-neutral-400 font-medium leading-none tracking-wide leading-normal ".concat(n),children:s}):(0,r.jsx)(r.Fragment,{children:s}):(0,r.jsx)("h3",{className:n,children:s}),{})})}},2201:function(e,t,n){"use strict";n.d(t,{M5:function(){return m},OE:function(){return h},YO:function(){return l},aS:function(){return f},kV:function(){return d},p6:function(){return o}});var r=n(17888),s=n.n(r),i=n(7933),a=n.n(i),c=n(49605),u=n.n(c);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15,t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",r=n.length;for(let s=0;s<e;s++)t+=n.charAt(Math.floor(Math.random()*r));return t}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Asia/Tokyo";return s().extend(u()),s().extend(a()),s().tz.setDefault(n),s()(e).tz().format(t)}function d(e){return e>=1048576?e>=1073741824?"".concat((Math.floor(e/1024/1024/1024*10)/10).toString()," GB"):"".concat((Math.floor(e/1024/1024*10)/10).toString()," MB"):e<1024?"1 KB":"".concat((Math.floor(e/1024*10)/10).toString()," KB")}function h(e){return null===e||!(new Date>new Date(e))}function f(e,t){return e?e.length<=t?e:e.slice(0,t)+" ...":""}function m(e){if(e.includes("%"))try{return decodeURIComponent(e)}catch(e){}return e}},20841:function(e,t,n){"use strict";n.r(t),n.d(t,{UserContainer:function(){return D},default:function(){return M}});var r=n(11527),s=n(72747),i=n(48976),a=n(18732),c=n(95315),u=n(48581),l=n(49060),o=n(85571),d=n(34986),h=n.n(d),f=n(6129),m=n(95399),x=n(62191),v=n(82187),$=n.n(v),g=n(99894),j=n(2201),p=n(8679),b=n(60560);let y=e=>{let{session:t,accountInfo:n,customer_account_list:s,reInvite:i,drive:c}=e,{t:d}=(0,u.$G)(),m=$()("px-6 py-4 whitespace-nowrap text-sm font-medium");return(0,r.jsx)("div",{className:"flex flex-col",children:(0,r.jsx)("div",{className:"-m-1.5 overflow-x-auto",children:(0,r.jsx)("div",{className:"p-1.5 min-w-full inline-block align-middle",children:(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsxs)(l.iA,{children:[(0,r.jsx)(l.hr,{children:(0,r.jsxs)(l.Tr,{children:[(0,r.jsx)(l.Th,{children:d("label:users.table.nameName")}
1),(0,r.jsx)(l.Th,{children:d("label:users.table.email")}),(0,r.jsx)(l.Th,{children:d("label:users.table.role")}),(0,r.jsx)(l.Th,{children:d("label:users.table.status")}),(0,r.jsx)(l.Th,{children:d("label:users.table.action")})]})}),(0,r.jsxs)(l.p3,{children:[(0,r.jsxs)(l.Tr,{className:"bg-blue-50 hover:bg-gray-100",children:[(0,r.jsx)(l.Ot,{className:"".concat(m," text-gray-800"),children:null==n?void 0:n.user_name}),(0,r.jsxs)(l.Ot,{className:"".concat(m," text-gray-800"),children:[null==n?void 0:n.email_address,(0,r.jsx)(a.Z,{className:"pt-1",variant:"caption",children:d("label:users.loginUser")})]}),(0,r.jsxs)(l.Ot,{className:"".concat(m," text-center"),children:[d("select:user.role.".concat(null==t?void 0:t.user.role)),(null==c?void 0:c.account_id)===(null==n?void 0:n.id)&&(0,r.jsx)(a.Z,{className:"pt-1",variant:"caption",children:d("label:users.adminUser")})]}),(0,r.jsx)(l.Ot,{className:"".concat(m," text-center"),children:(0,r.jsx)(o.C,{color:"green",children:d("select:user.valid.enabled")})}),(0,r.jsx)(l.Ot,{className:"".concat(m," text-center"),children:(0,r.jsx)(h(),{className:"text-blue-500 hover:text-blue-700",href:"".concat(f.k.dashboard.account),children:d("label:users.table.edit")})})]}),(null==t?void 0:t.user.role)==="root"&&s&&s.length>0&&(0,r.jsx)(r.Fragment,{children:s.map((e,n)=>{var s;return(null==t?void 0:t.user.id)!==e.account_id&&(0,r.jsxs)(l.Tr,{className:"hover:bg-gray-100",children:[null!==e.user_name?(0,r.jsx)(l.Ot,{className:"".concat(m," text-gray-800"),children:e.user_name}):(0,r.jsx)(l.Ot,{className:"".concat(m," italic text-gray-400 "),children:"---"}),(0,r.jsx)(l.Ot,{className:"".concat(m," text-gray-800"),children:e.email_address}),(0,r.jsxs)(l.Ot,{className:"".concat(m," text-center"),children:[d("select:user.role.".concat(e.role)),(null==c?void 0:c.account_id)===e.account_id&&(0,r.jsx)(a.Z,{className:"pt-1",variant:"caption",children:d("label:users.adminUser")}),null!==e.expire&&(0,r.jsxs)(a.Z,{className:"pt-1",variant:"caption",children:[d("label:users.expire"),": ",(0,j.p6)(e.expire,"YYYY-MM-DD HH:mm:ss")]})]}),(0,r.jsx)(l.Ot,{className:"".concat(m," text-center"),children:!1===(0,j.OE)(e.expire)?(0,r.jsx)(o.C,{color:"red",children:d("select:user.valid.expired")}):(0,r.jsx)(r.Fragment,{children:!0===e.is_invite?!0===e.valid?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.C,{color:"green",children:d("select:user.valid.enabled")})}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.C,{color:"red",children:d("select:user.valid.disabled")})}):(0,r.jsx)(o.C,{children:d("select:user.valid.invite")})})}),(0,r.jsx)(l.Ot,{className:"".concat(m," text-center"),children:e.account_id?(null==c?void 0:c.account_id)===e.account_id?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(a.Z,{className:"opacity-60",variant:"neutral",children:d("label:users.accsessDeny")})}):(0,r.jsx)(h(),{className:"text-blue-500 hover:text-blue-700",href:"".concat(f.k.dashboard.user,"/").concat(e.account_id),children:d("label:users.table.edit")}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex gap-x-2",children:[(0,r.jsx)(h(),{className:"text-blue-500 hover:text-blue-700",href:"#",onClick:()=>i({userName:null==e?void 0:e.user_name,email_address:e.email_address,role:e.role,extension_time:e.extension_time}),children:d("label:users.table.invite")}),(0,r.jsx)(p.S,{id:null===(s=e.invite)||void 0===s?void 0:s.id,type:"invite"})]})})})]},n)})})]})]})})})})})},N=()=>{let{t:e}=(0,u.$G)(),[t]=(0,m.X$G)(),{data:n}=(0,x.useSession)(),{drive:s}=(0,b.y)(),{data:i}=(0,m.dSi)({skip:(null==n?void 0:n.user.role)!=="root",variables:{order_by:{created:m.Lqo.Desc}}}),{data:a}=(0,m.Der)(),c=async n=>{let{userName:r,email_address:s,role:i,extension_time:a}=n;try{await t({variables:{userName:r,email_address:s,role:i,extension_time:a}}),(0,g.B)("success",e("message:success.user.reinvite"),e("title:users.title"),!0)}catch(t){(0,g.B)("error",e("message:error.user.alert"),e("title:account.title"),!0)}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(y,{session:n,accountInfo:null==a?void 0:a.account[0],drive:s,customer_account_list:null==i?void 0:i.customer_account_list,reInvite:c})})};var w=n(75418);let D=()=>{let{t:e}=(0,u.$G)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(a.Z,{variant:"h1",children:e("title:users.title")}),(0,r.jsx)(h(),{href:f.k.dashboard.userCreate,passHref:!0,children:(0,r.jsx)(i.z,{appearance:"Outline",color:"blue",type:"button",children:e("button:users.create")})})]}),(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(a.Z,{variant:"caption",children:(0,r.jsx)(c.x,{html:!0,text:e("text:users.guestDescription")})})}),(0,r.jsx)("div",{className:"mt-8",children:(0,r.jsx)(N,{})})]})};var M=()=>{let{t:e}=(0,u.$G)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.I,{title:e("title:users.title")}),(0,r.jsx)(s.y,{children:(0,r.jsx)(b.o,{children:(0,r.jsx)(D,{})})})]})}},60560:function(e,t,n){"use strict";n.d(t,{o:function(){return c},y:function(){return u}});var r=n(11527),s=n(50959);let i=(0,s.createContext)(void 0);var a=n(95399);let c=e=>{let{children:t}
1=e,[n,c]=(0,s.useState)(!1),[u,l]=(0,s.useState)(null),[o,d]=(0,s.useState)(!0),[h,f]=(0,s.useState)(null),{data:m}=(0,a.XpP)(),{data:x}=(0,a.ORP)();return((0,s.useEffect)(()=>{m&&l(m&&m.customer_drive_setting.length>0?m.customer_drive_setting[0]:null),x&&f(x&&x.customer_status.length>0?x.customer_status[0]:null),m&&x&&(d(!1),c(!0))},[m,x]),!1===n)?null:(0,r.jsx)(i.Provider,{value:{loading:o,payment:h,drive:u},children:t})},u=()=>{let e=(0,s.useContext)(i);if(void 0===e)throw Error("useSetting must be used within a SettingProvider");return e}}},function(e){e.O(0,[4986,2446,9708,4088,1099,5620,2747,2888,9774,179],function(){return e(e.s=43294)}),_N_E=e.O()}]);
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.