PageSourceSearch

https://thecutline.ai/_next/static/chunks/8384-e611b84660f5f765.js

js thecutline.ai collected 2026-10-05 12:50:08 UTC 9,781 bytes, 7 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8384],{8384:(e,a,t)=>{t.d(a,{A:()=>h});var r=t(37876),l=t(62002),n=t(14232),s=t(88992),i=t(11629),d=t(82122),o=t(66428),c=t(50642),m=t(33715),u=t(84972),f=t(50625),p=t(56422);function x(){return{email:"",role:p.h.Member}}let h=({onSubmit:e,currentUserEmail:a,currentUserRole:t,SubmitButton:p})=>{let{t:h}=(0,l.Bd)("organization"),{register:b,handleSubmit:v,setValue:g,control:j,clearErrors:y,watch:w}=(0,s.mN)({defaultValues:{members:[x()]},shouldUseNativeValidation:!0,shouldFocusError:!0,shouldUnregister:!0}),{fields:N,append:k,remove:A}=(0,s.jz)({control:j,name:"members",shouldUnregister:!0}),C=w("members"),E=N.map((e,a)=>({...e,...C[a]}));return(0,r.jsxs)("form",{className:"flex flex-col space-y-8","data-cy":"invite-members-form",onSubmit:a=>{v(a=>{e(a.members)})(a)},children:[(0,r.jsxs)("div",{className:"flex flex-col space-y-2",children:[E.map((e,l)=>{let s=`members.${l}.email`,d=`members.${l}.role`,m=b(s,{required:!0,validate:e=>{var t;return(t=C,function(e,a){let r=t.map(e=>e.email).indexOf(e);return r>=0&&r!==a})(e,l)?h("duplicateInviteEmailError"):a!==e||h("invitingOwnAccountError")}});return b(d,{value:e.role}),(0,r.jsx)(n.Fragment,{children:(0,r.jsxs)("div",{className:"flex items-center space-x-0.5 md:space-x-2",children:[(0,r.jsx)("div",{className:"w-7/12",children:(0,r.jsx)(c.Ay.Input,{...m,"data-cy":"invite-email-input",placeholder:"[email protected]",type:"email",required:!0})}),(0,r.jsx)("div",{className:"w-4/12",children:(0,r.jsx)(f.A,{currentUserRole:t,value:e.role,onChange:e=>{g(d,e)}})}),(0,r.jsx)("div",{className:"w-[60px] flex justify-end",children:(0,r.jsxs)(o.m_,{className:"flex justify-center",children:[(0,r.jsx)(o.k$,{asChild:!0,children:(0,r.jsx)(u.A,{type:"button",disabled:N.length<=1,"data-cy":"remove-invite-button",label:h("removeInviteButtonLabel"),onClick:()=>{A(l),y(s)},children:(0,r.jsx)(i.A,{className:"h-4 lg:h-5"})})}),(0,r.jsx)(o.ZI,{children:h("removeInviteButtonLabel")})]})})]})},e.id)}),(0,r.jsx)("div",{children:(0,r.jsx)(m.A,{"data-cy":"append-new-invite-button",type:"button",variant:"ghost",size:"sm",onClick:()=>k(x()),children:(0,r.jsxs)("span",{className:"flex items-center space-x-2",children:[(0,r.jsx)(d.A,{className:"h-5"}),(0,r.jsx)("span",{children:(0,r.jsx)(l.x6,{i18nKey:"organization:addAnotherMemberButtonLabel"})})]})})})]}),p]})}},50625:(e,a,t)=>{t.d(a,{A:()=>d});var r=t(37876),l=t(62002),n=t(80851),s=t(74750),i=t(96327);let d=({value:e,onChange:a,currentUserRole:t})=>{let d=function(e){let a=s.A[2];return s.A.find(a=>a.value===e)??a}(e),o=s.A.filter(e=>void 0!==t&&(0,i.Vp)(t,e.value));return(0,r.jsxs)(n.l6,{value:d.value.toString(),onValueChange:e=>{a&&a(Number(e))},children:[(0,r.jsx)(n.bq,{"data-cy":"role-selector-trigger",children:(0,r.jsx)(n.yv,{})}),(0,r.jsx)(n.gC,{children:o.map(e=>(0,r.jsx)(n.eb,{"data-cy":`role-item-${e.value}`,value:e.value.toString(),children:(0,r.jsx)("span",{className:"text-sm",children:(0,r.jsx)(l.x6,{i18nKey:e.label})})},e.value))})]})}},50642:(e,a,t)=>{t.d(a,{Ay:()=>c,L4:()=>i,cm:()=>d});var r=t(37876),l=t(14232),n=t(69241),s=t(54635);let i=({children:e})=>(0,r.jsx)("span",{className:`block pl-1 text-xs
2        font-normal leading-tight text-gray-500 dark:text-gray-400`,children:e}),d=(0,l.forwardRef)(function({className:e,children:a,...t},l){return(0,r.jsx)("input",{...t,className:(0,n.A)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
2ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:l})}),o=({children:e,className:a})=>(0,r.jsx)("div",{className:(0,n.A)("flex flex-col space-y-1",a),children:e});o.Hint=i,o.Label=s.A,o.Input=d,o.Error=({error:e,...a})=>e?(0,r.jsx)(i,{children:(0,r.jsx)("span",{...a,className:"py-0.5 text-pink-600 dark:text-pink-400",children:e})}):null;let c=o},54635:(e,a,t)=>{t.d(a,{A:()=>n});var r=t(14232),l=t(69241);let n=({children:e,className:a,as:t,...n})=>(0,r.createElement)(t??"label",{className:(0,l.A)("w-full text-sm font-medium text-gray-500 dark:text-gray-400 [&>*]:mt-[0.35rem]",a),...n},e)},56422:(e,a,t)=>{t.d(a,{h:()=>r});var r=function(e){return e[e.Member=0]="Member",e[e.Admin=1]="Admin",e[e.Owner=2]="Owner",e}({})},66428:(e,a,t)=>{t.d(a,{ZI:()=>o,k$:()=>d,m_:()=>i});var r=t(37876),l=t(14232),n=t(69241),s=t(50717);let i=({delayDuration:e=0,...a})=>(0,r.jsx)(s.Kq,{delayDuration:e,children:(0,r.jsx)(s.bL,{...a})});i.displayName=s.m_.displayName;let d=s.l9,o=l.forwardRef(({className:e,sideOffset:a=4,children:t,...l},i)=>(0,r.jsxs)(s.UC,{ref:i,sideOffset:a,className:(0,n.A)(`animate-in fade-in-100 data-[side=bottom]:slide-in-from-top-1
3         data-[side=top]:slide-in-from-bottom-1
4         data-[side=left]:slide-in-from-right-1
5         data-[side=right]:slide-in-from-left-1 z-50 overflow-hidden
6         rounded-md bg-dark-900/80 px-3 py-1.5 text-xs text-gray-100
7         shadow-md dark:bg-dark-700/90`,e),...l,children:[t,(0,r.jsx)(s.i3,{className:"fill-dark-900/80 dark:fill-dark-700/90"})]}));o.displayName=s.UC.displayName},70619:(e,a,t)=>{t.d(a,{A:()=>l});var r=t(14232);let l=r.forwardRef(function({title:e,titleId:a,...t},l){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),e?r.createElement("title",{id:a},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))})},74750:(e,a,t)=>{t.d(a,{A:()=>s});var r=t(56422);let l={label:"common:roles.owner.label",description:"common:roles.owner.description",value:r.h.Owner},n={label:"common:roles.admin.label",description:"common:roles.admin.description",value:r.h.Admin},s=[l,n,{label:"common:roles.member.label",description:"common:roles.member.description",value:r.h.Member}]},80851:(e,a,t)=>{t.d(a,{B$:()=>h,TR:()=>p,bq:()=>u,eb:()=>x,gC:()=>f,l6:()=>o,mi:()=>b,s3:()=>c,yv:()=>m});var r=t(37876),l=t(14232),n=t(11390),s=t(50129),i=t(70619),d=t(96668);let o=n.bL,c=n.YJ,m=n.WT,u=l.forwardRef(({className:e,children:a,...t},l)=>(0,r.jsx)(n.l9,{ref:l,className:(0,s.cn)("flex h-10 w-full space-x-2 items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
7ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:t.asChild?a:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{children:a})," ",(0,r.jsx)(i.A,{className:"h-4"})]})}));u.displayName=n.l9.displayName;let f=l.forwardRef(({className:e,children:a,position:t="popper",...l},i)=>(0,r.jsx)(n.ZL,{children:(0,r.jsx)(n.UC,{ref:i,className:(0,s.cn)("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:shadow-primary/40 dark:shadow-2xl","popper"===t&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...l,children:(0,r.jsx)(n.LM,{className:(0,s.cn)("p-1","popper"===t&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a})})}));f.displayName=n.UC.displayName;let p=l.forwardRef(({className:e,...a},t)=>(0,r.jsx)(n.JU,{ref:t,className:(0,s.cn)("py-1.5 px-2 text-sm font-semibold",e),...a}));p.displayName=n.JU.displayName;let x=l.forwardRef(({className:e,children:a,...t},l)=>(0,r.jsxs)(n.q7,{ref:l,className:(0,s.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(n.VF,{children:(0,r.jsx)(d.A,{className:"h-4 w-4"})})}),(0,r.jsx)(n.p4,{children:a})]}));x.displayName=n.q7.displayName;let h=l.forwardRef(function({className:e,children:a,...t},l){return(0,r.jsx)("div",{ref:l,className:(0,s.cn)("relative cursor-pointer flex w-full select-none items-center rounded-sm py-1.5 px-2 text-sm outline-none focus:bg-accent hover:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:a})}),b=l.forwardRef(({className:e,...a},t)=>(0,r.jsx)(n.wv,{ref:t,className:(0,s.cn)("-mx-1 my-1 h-px bg-muted",e),...a}));b.displayName=n.wv.displayName},82122:(e,a,t)=>{t.d(a,{A:()=>l});var r=t(14232);let l=r.forwardRef(function({title:e,titleId:a,...t},l){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),e?r.createElement("title",{id:a},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))})},96327:(e,a,t)=>{t.d(a,{Pk:()=>l,Vp:()=>s,mA:()=>i});var r=t(56422);function l(e,a){return e>a}function n(e){return e>=r.h.Admin}function s(e,a){let t=n(e),l=e>=a,s=a!==r.h.Owner;return t&&l&&s}function i(e){return n(e)}}}]);

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.