UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

4 lines 733 kB
import{aD as kr,aE as Qr,_ as ut,aF as Ja,a as _,aG as Ae,j as t,r as d,aH as vr,b as ct,aI as nt,aJ as ye,aK as Cr,s as l,aL as ja,aM as ue,aN as T,aO as A,aP as Ba,Q as de,l as hr,m as xr,A as La,n as Za,o as Na,G as mr,u as Tr,h as Y,ao as w,aQ as Ue,aR as le,f as P,aS as It,aT as ne,aU as Ie,B as f,T as B,C as Z,w as Se,aV as Aa,aW as za,aX as Je,aY as qt,aZ as Ut,a_ as je,a$ as Ya,x as Ce,J as Ha,b0 as Kt,b1 as fr,b2 as Pa,b3 as jt,b4 as he,b5 as $,b6 as Fe,b7 as Or,b8 as ze,b9 as se,ba as br,bb as Ma,bc as Ye,bd as Ga,be as oe,bf as Re,bg as Xt,bh as Jr,bi as Da,z as wa,t as Rt,bj as _a,bk as $a,i as H,bl as it,bm as Be,bn as eV,bo as tV,bp as jr,bq as Ke,ak as rV,br as aV,bs as VV,bt as Et,bu as Wt,bv as Le,bw as nV,bx as qV,by as Bt,bz as iV,bA as dV,bB as oV,bC as He,bD as lV,bE as sV,bF as pV,bG as Br,bH as uV,bI as cV,bJ as IV,bK as UV,bL as Lr,bM as KV,bN as Zr,bO as XV,bP as RV,bQ as EV,bR as WV,bS as SV,bT as FV,bU as gV,bV as Nr,bW as yV,bX as kV,bY as Ar,bZ as QV,b_ as vV,b$ as CV,L as ee,c0 as zr,c1 as Yr,a0 as hV,c2 as xV,c3 as mV,c4 as TV,c5 as Hr,c6 as St,c7 as fV,c8 as OV,H as Pr,c9 as Mr,ca as bV,cb as JV,cc as dt,cd as jV,ce as Ze,cf as BV,cg as Qe,a7 as LV,a5 as Ge,a6 as Lt,ch as Zt,ci as ZV,cj as NV,ck as Gr,cl as AV,cm as zV,cn as YV,co as HV,cp as PV,cq as Dr,cr as MV,cs as GV,ct as DV,cu as wV,cv as _V,cw as wr,cx as $V,cy as _r,cz as en,cA as tn,cB as $r,cC as Xe,cD as ot,cE as rn,cF as an,cG as Vn,cH as Nt,aB as nn,cI as We,cJ as At,cK as Ft,cL as qn,cM as ea,cN as dn,D as ta,cO as on,cP as ln,cQ as sn,cR as pn,cS as un,K as gt,cT as ra,cU as cn,ai as aa,az as Pe,cV as In,cW as ke,aC as yt,at as zt,cX as Un,cY as Kn,v as Va,cZ as Xn,c_ as Yt,c$ as Rn,d0 as En,E as xe,F as me,d1 as Wn,d as Sn,d2 as Fn,d3 as gn,d4 as yn,d5 as kn,d6 as Qn,d7 as vn,d8 as Cn,d9 as hn,da as xn,db as Ht,ah as Ne,dc as mn,a9 as De,al as Tn,ab as fn,ac as On,ad as bn,ae as Jn,af as jn,ag as Bn,dd as ce,de as Ln,df as Zn,dg as Nn,dh as we,di as An,dj as zn,dk as Yn,dl as Hn,dm as Pn,dn as na,dp as Mn,dq as Gn,aA as Dn,dr as wn,ds as _n,dt as $n,du as eq,dv as tq,dw as rq,dx as aq,dy as Vq,dz as nq,dA as qq,dB as iq,dC as Pt,aq as dq}from"./index-Cikp5fMR.js";import{u as oq,a as lq,F as kt,M as qa}from"./MarkCompletedDialogue-C86IfCH-.js";import{F as Qt,a as lt,u as ia,b as sq,c as pq}from"./aggregateFeatureMetrics-CAg4DbsF.js";import{u as uq,a as cq,T as Iq,b as Uq,c as Kq,d as Xq,e as Rq,F as Eq,f as Wq,g as Mt,h as Sq}from"./FeatureStaleDialog-DmUpnOZe.js";import{P as Fq}from"./PercentageDonut-CC9h07JZ.js";import{u as da,C as gq,G as yq,a as oa}from"./GridLayoutWrapper-Dwn6EwoE.js";function kq(e){return kr("MuiPagination",e)}Qr("MuiPagination",["root","ul","outlined","text"]);const Qq=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function vq(e={}){const{boundaryCount:r=1,componentName:a="usePagination",count:V=1,defaultPage:n=1,disabled:q=!1,hideNextButton:i=!1,hidePrevButton:s=!1,onChange:o,page:u,showFirstButton:p=!1,showLastButton:c=!1,siblingCount:U=1}=e,I=ut(e,Qq),[X,R]=Ja({controlled:u,default:n,name:a,state:"page"}),K=(h,b)=>{u||R(b),o&&o(h,b)},E=(h,b)=>{const M=b-h+1;return Array.from({length:M},(ae,y)=>h+y)},F=E(1,Math.min(r,V)),W=E(Math.max(V-r+1,r+1),V),v=Math.max(Math.min(X-U,V-r-U*2-1),r+2),C=Math.min(Math.max(X+U,r+U*2+2),W.length>0?W[0]-2:V-1),J=[...p?["first"]:[],...s?[]:["previous"],...F,...v>r+2?["start-ellipsis"]:r+1<V-r?[r+1]:[],...E(v,C),...C<V-r-1?["end-ellipsis"]:V-r>r?[V-r]:[],...W,...i?[]:["next"],...c?["last"]:[]],Q=h=>{switch(h){case"first":return 1;case"previous":return X-1;case"next":return X+1;case"last":return V;default:return null}},S=J.map(h=>typeof h=="number"?{onClick:b=>{K(b,h)},type:"page",page:h,selected:h===X,disabled:q,"aria-current":h===X?"true":void 0}:{onClick:b=>{K(b,Q(h))},type:h,page:Q(h),selected:!1,disabled:q||h.indexOf("ellipsis")===-1&&(h==="next"||h==="last"?X>=V:X<=1)});return _({items:S},I)}function Cq(e){return kr("MuiPaginationItem",e)}const Ve=Qr("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon"]),Gt=Ae(t.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),Dt=Ae(t.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),wt=Ae(t.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),_t=Ae(t.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),hq=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],la=(e,r)=>{const{ownerState:a}=e;return[r.root,r[a.variant],r[`size${ye(a.size)}`],a.variant==="text"&&r[`text${ye(a.color)}`],a.variant==="outlined"&&r[`outlined${ye(a.color)}`],a.shape==="rounded"&&r.rounded,a.type==="page"&&r.page,(a.type==="start-ellipsis"||a.type==="end-ellipsis")&&r.ellipsis,(a.type==="previous"||a.type==="next")&&r.previousNext,(a.type==="first"||a.type==="last")&&r.firstLast]},xq=e=>{const{classes:r,color:a,disabled:V,selected:n,size:q,shape:i,type:s,variant:o}=e,u={root:["root",`size${ye(q)}`,o,i,a!=="standard"&&`${o}${ye(a)}`,V&&"disabled",n&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return Cr(u,Cq,r)},mq=l("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:la})(({theme:e,ownerState:r})=>_({},e.typography.body2,{borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Ve.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},r.size==="small"&&{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"},r.size==="large"&&{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)})),Tq=l(ja,{name:"MuiPaginationItem",slot:"Root",overridesResolver:la})(({theme:e,ownerState:r})=>_({},e.typography.body2,{borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Ve.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ve.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ve.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:ue(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Ve.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:ue(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Ve.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}}},r.size==="small"&&{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"},r.size==="large"&&{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)},r.shape==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius}),({theme:e,ownerState:r})=>_({},r.variant==="text"&&{[`&.${Ve.selected}`]:_({},r.color!=="standard"&&{color:(e.vars||e).palette[r.color].contrastText,backgroundColor:(e.vars||e).palette[r.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[r.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[r.color].main}},[`&.${Ve.focusVisible}`]:{backgroundColor:(e.vars||e).palette[r.color].dark}},{[`&.${Ve.disabled}`]:{color:(e.vars||e).palette.action.disabled}})},r.variant==="outlined"&&{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Ve.selected}`]:_({},r.color!=="standard"&&{color:(e.vars||e).palette[r.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[r.color].mainChannel} / 0.5)`:ue(e.palette[r.color].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[r.color].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:ue(e.palette[r.color].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[r.color].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:ue(e.palette[r.color].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ve.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[r.color].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:ue(e.palette[r.color].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}},{[`&.${Ve.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}})})),fq=l("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,r)=>r.icon})(({theme:e,ownerState:r})=>_({fontSize:e.typography.pxToRem(20),margin:"0 -8px"},r.size==="small"&&{fontSize:e.typography.pxToRem(18)},r.size==="large"&&{fontSize:e.typography.pxToRem(22)})),Oq=d.forwardRef(function(r,a){const V=vr({props:r,name:"MuiPaginationItem"}),{className:n,color:q="standard",component:i,components:s={},disabled:o=!1,page:u,selected:p=!1,shape:c="circular",size:U="medium",slots:I={},type:X="page",variant:R="text"}=V,K=ut(V,hq),E=_({},V,{color:q,disabled:o,selected:p,shape:c,size:U,type:X,variant:R}),F=ct(),W=xq(E),C=(F.direction==="rtl"?{previous:I.next||s.next||_t,next:I.previous||s.previous||wt,last:I.first||s.first||Gt,first:I.last||s.last||Dt}:{previous:I.previous||s.previous||wt,next:I.next||s.next||_t,first:I.first||s.first||Gt,last:I.last||s.last||Dt})[X];return X==="start-ellipsis"||X==="end-ellipsis"?t.jsx(mq,{ref:a,ownerState:E,className:nt(W.root,n),children:"…"}):t.jsxs(Tq,_({ref:a,ownerState:E,component:i,disabled:o,className:nt(W.root,n)},K,{children:[X==="page"&&u,C?t.jsx(fq,{as:C,ownerState:E,className:W.icon}):null]}))}),bq=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],Jq=e=>{const{classes:r,variant:a}=e;return Cr({root:["root",a],ul:["ul"]},kq,r)},jq=l("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:a}=e;return[r.root,r[a.variant]]}})({}),Bq=l("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,r)=>r.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function Lq(e,r,a){return e==="page"?`${a?"":"Go to "}page ${r}`:`Go to ${e} page`}const Zq=d.forwardRef(function(r,a){const V=vr({props:r,name:"MuiPagination"}),{boundaryCount:n=1,className:q,color:i="standard",count:s=1,defaultPage:o=1,disabled:u=!1,getItemAriaLabel:p=Lq,hideNextButton:c=!1,hidePrevButton:U=!1,renderItem:I=S=>t.jsx(Oq,_({},S)),shape:X="circular",showFirstButton:R=!1,showLastButton:K=!1,siblingCount:E=1,size:F="medium",variant:W="text"}=V,v=ut(V,bq),{items:C}=vq(_({},V,{componentName:"Pagination"})),J=_({},V,{boundaryCount:n,color:i,count:s,defaultPage:o,disabled:u,getItemAriaLabel:p,hideNextButton:c,hidePrevButton:U,renderItem:I,shape:X,showFirstButton:R,showLastButton:K,siblingCount:E,size:F,variant:W}),Q=Jq(J);return t.jsx(jq,_({"aria-label":"pagination navigation",className:nt(Q.root,q),ownerState:J,ref:a},v,{children:t.jsx(Bq,{className:Q.ul,ownerState:J,children:C.map((S,h)=>t.jsx("li",{children:I(_({},S,{color:i,"aria-label":p(S.type,S.page,S.selected),shape:X,size:F,variant:W}))},h))})}))}),Nq=()=>{const e=T("projectId"),r=T("featureId"),{feature:a}=A(e,r);return a.name?t.jsx(Ba,{title:"Event log",feature:r}):null},Aq=()=>t.jsxs(de,{severity:"warning",children:["Remember to update your Unleash client! Feature dependencies require new SDK versions. Read more about ",t.jsx(zq,{}),"."]}),zq=()=>t.jsx("a",{href:"https://docs.getunleash.io/concepts/feature-flags#feature-flag-dependencies",target:"_blank",rel:"noreferrer",children:"Client SDK support for feature dependencies"}),Yq=l(La)(({theme:e})=>({marginTop:e.spacing(2),marginBottom:e.spacing(1.5)})),Hq=({project:e,parent:r,onSelect:a,selectedValues:V})=>{const{parentVariantOptions:n}=oq(e,r),q=t.jsx(Na,{fontSize:"small"}),i=t.jsx(Za,{fontSize:"small"});return t.jsx(Yq,{multiple:!0,id:"parent-variant-options",options:n,disableCloseOnSelect:!0,renderOption:(s,o,{selected:u})=>t.jsxs("li",{...s,children:[t.jsx(xr,{icon:q,checkedIcon:i,style:{marginRight:8},checked:u}),o]}),renderInput:s=>t.jsx(hr,{...s,placeholder:"Select values"}),fullWidth:!0,value:V,onChange:(s,o)=>{a(o)}})},ie={key:"none (remove dependency)",label:"none (remove dependency)"},sa=l(mr)(({theme:e})=>({marginTop:e.spacing(2),marginBottom:e.spacing(1.5)})),Pq=({onSelect:e,parentValue:r})=>t.jsx(sa,{fullWidth:!0,options:[{key:"enabled",label:"enabled"},{key:"enabled_with_variants",label:"enabled with variants"},{key:"disabled",label:"disabled"}],value:r.status,onChange:e}),pa=e=>{const{makeRequest:r,createRequest:a,errors:V,loading:n}=Tr({propagateErrors:!0}),q=async(u,p)=>{const c=a(`/api/admin/projects/${e}/features/${u}/dependencies`,{method:"POST",body:JSON.stringify(p)});await r(c.caller,c.id)},i=async(u,p)=>{const c=a(`/api/admin/projects/${e}/features/${u}/dependencies/${p}`,{method:"DELETE"});await r(c.caller,c.id)},s=async u=>{const p=a(`/api/admin/projects/${e}/features/${u}/dependencies`,{method:"DELETE"});await r(p.caller,p.id)},o=[a,r,Y,e];return{addDependency:d.useCallback(q,o),removeDependency:d.useCallback(i,o),removeDependencies:d.useCallback(s,o),errors:V,loading:n}},Mq=(e,r,a,V,n)=>{const{trackEvent:q}=w(),{addChange:i}=Ue(),{refetch:s}=le(e),{setToastData:o,setToastApiError:u}=P(),{refetchFeature:p}=A(e,r),c=It(e)(),{isChangeRequestConfiguredInAnyEnv:U}=ne(e),{addDependency:I,removeDependencies:X}=pa(e),R=async K=>{if(!c){console.error("No change request environment");return}K==="addDependency"&&(await i(e,c,[{action:K,feature:r,payload:{feature:a,enabled:V.status!=="disabled",variants:V.status==="enabled_with_variants"?V.variants:[]}}]),q("dependent_features",{props:{eventType:"dependency added"}})),K==="deleteDependency"&&await i(e,c,[{action:K,feature:r,payload:void 0}]),s(),o({type:"success",text:"Change added to draft"})};return async()=>{try{if(U()){const K=a===ie.key?"deleteDependency":"addDependency";await R(K),q("dependent_features",{props:{eventType:K==="addDependency"?"add dependency added to change request":"delete dependency added to change request"}})}else a===ie.key?(await X(r),q("dependent_features",{props:{eventType:"dependency removed"}}),o({text:"Dependency removed",type:"success"})):(await I(r,{feature:a,enabled:V.status!=="disabled",variants:V.status==="enabled_with_variants"?V.variants:[]}),q("dependent_features",{props:{eventType:"dependency added"}}),o({text:"Dependency added",type:"success"}))}catch(K){u(Y(K))}p(),n()}},Gq=({project:e,featureId:r,parent:a,onSelect:V})=>{const{parentOptions:n}=lq(e,r),q=n?[ie,...n.map(i=>({key:i,label:i}))]:[ie];return t.jsx(sa,{fullWidth:!0,options:q,value:a,onChange:V})},Dq=({project:e,featureId:r,parentDependency:a,showDependencyDialogue:V,onClose:n})=>{const[q,i]=d.useState((a==null?void 0:a.feature)||ie.key),s=()=>{var E;return a?(E=a.variants)!=null&&E.length?{status:"enabled_with_variants",variants:a.variants}:a.enabled===!1?{status:"disabled"}:{status:"enabled"}:{status:"enabled"}},[o,u]=d.useState(s),p=()=>{i((a==null?void 0:a.feature)||ie.key),u(s())};d.useEffect(()=>{p()},[JSON.stringify(a)]);const c=Mq(e,r,q,o,n),{isChangeRequestConfiguredInAnyEnv:U}=ne(e),I=q!==ie.key,X=q!==ie.key&&o.status==="enabled_with_variants",R=E=>{(E==="enabled"||E==="disabled")&&u({status:E}),E==="enabled_with_variants"&&u({status:E,variants:[]})},K=E=>{u({status:"enabled_with_variants",variants:E})};return t.jsx(Ie,{open:V,title:"Add parent flag dependency",onClose:n,onClick:c,primaryButtonText:U()?"Add change to draft":q===ie.key?"Remove":"Add",secondaryButtonText:"Cancel",children:t.jsxs(f,{children:[t.jsx(Aq,{}),t.jsxs(f,{sx:{mt:2,mb:4},children:["Your feature will be evaluated only when the selected parent feature is"," ",t.jsx("b",{children:o.status==="disabled"?"disabled":"enabled"})," ","in the same environment."]}),t.jsxs(B,{children:["What ",t.jsx("b",{children:"feature"})," do you want to depend on?"]}),t.jsx(Z,{condition:V,show:t.jsx(Gq,{project:e,featureId:r,parent:q,onSelect:E=>{u({status:"enabled"}),i(E)}})}),t.jsx(Z,{condition:I,show:t.jsxs(f,{sx:{mt:2},children:[t.jsxs(B,{children:["What ",t.jsx("b",{children:"feature status"})," do you want to depend on?"]}),t.jsx(Pq,{parentValue:o,onSelect:R})]})}),t.jsx(Z,{condition:X,show:o.status==="enabled_with_variants"&&t.jsxs(f,{sx:{mt:2},children:[t.jsxs(B,{children:["What ",t.jsx("b",{children:"variant"})," do you want to depend on?"]}),t.jsx(Hq,{parent:q,project:e,selectedValues:o.variants,onSelect:K})]})})]})})},wq=l(Ce)(({theme:e})=>({height:e.spacing(3.5),width:e.spacing(3.5)})),_q=l(Ha)(({theme:e})=>({borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(1,1.5)})),ua=({capabilityId:e,feature:r,onEdit:a,onDelete:V})=>{const n=`${e}-${r}-actions`,q=`${n}-menu`,[i,s]=d.useState(null),o=!!i,u=c=>{s(c.currentTarget)},p=()=>{s(null)};return t.jsxs(f,{children:[t.jsx(Se,{title:"Dependency actions",arrow:!0,describeChild:!0,children:t.jsx(wq,{id:n,"aria-controls":o?q:void 0,"aria-haspopup":"true","aria-expanded":o?"true":void 0,onClick:u,type:"button",children:t.jsx(Aa,{})})}),t.jsx(_q,{id:q,anchorEl:i,open:o,onClose:p,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},disableScrollLock:!0,children:t.jsxs(za,{"aria-labelledby":n,children:[t.jsxs(Je,{onClick:()=>{a(),p()},children:[t.jsx(qt,{children:t.jsx(Ut,{})}),t.jsx(je,{children:t.jsx(B,{variant:"body2",children:"Edit"})})]}),t.jsxs(Je,{onClick:()=>{V(),p()},children:[t.jsx(qt,{children:t.jsx(Ya,{})}),t.jsx(je,{children:t.jsx(B,{variant:"body2",children:"Delete"})})]})]})})]})},$q=({childFeatures:e,project:r})=>t.jsx(Kt,{tooltip:t.jsx(t.Fragment,{children:e.map(a=>t.jsx(fr,{to:`/projects/${r}/features/${a}`,children:t.jsx("div",{children:a})},`${r}-${a}`))}),children:e.length===1?"1 feature":`${e.length} features`}),ei=({variants:e})=>e.length===1&&e[0].length<20?t.jsx("span",{children:e[0]}):t.jsx(Kt,{tooltip:t.jsx(t.Fragment,{children:e.map((r,a)=>t.jsx("div",{children:r},a))}),children:e.length===1?"1 variant":`${e.length} variants`}),ti=l($)(({theme:e})=>({fontSize:e.fontSizes.smallBody,lineHeight:e.typography.body1.lineHeight})),ri=(e,r)=>{const{trackEvent:a}=w(),{addChange:V}=Ue(),{refetch:n}=le(e),{setToastData:q,setToastApiError:i}=P(),{refetchFeature:s}=A(e,r),o=It(e)(),{isChangeRequestConfiguredInAnyEnv:u}=ne(e),{removeDependencies:p}=pa(e),c=async()=>{if(!o){console.error("No change request environment");return}await V(e,o,[{action:"deleteDependency",feature:r,payload:void 0}])};return async()=>{try{u()?(await c(),a("dependent_features",{props:{eventType:"delete dependency added to change request"}}),q({type:"success",text:"Change added to draft"}),await n()):(await p(r),a("dependent_features",{props:{eventType:"dependency removed"}}),q({text:"Dependency removed",type:"success"}),await s())}catch(I){i(Y(I))}}},ai=({feature:e})=>{var u,p,c,U,I,X,R;const[r,a]=d.useState(!1),V=!!e.project&&e.dependencies.length===0&&e.children.length===0,n=!!e.project&&e.dependencies.length>0,q=!!e.project&&e.children.length>0,i=It(e.project)(),s=Pa(e.project),o=ri(e.project,e.name);return t.jsxs(t.Fragment,{children:[V?t.jsxs(re,{children:[t.jsx(qe,{children:"Dependency:"}),t.jsx("div",{children:t.jsx(ti,{size:"small",permission:jt,projectId:e.project,variant:"text",onClick:()=>{a(!0)},children:"Add parent flag"})})]}):null,n?t.jsxs(re,{children:[t.jsx(qe,{children:"Dependency:"}),t.jsxs(pt,{children:[t.jsx(fr,{to:`/projects/${e.project}/features/${(u=e.dependencies[0])==null?void 0:u.feature}`,children:t.jsx(he,{title:(p=e.dependencies[0])==null?void 0:p.feature,children:(c=e.dependencies[0])==null?void 0:c.feature})}),s(jt,i)?t.jsx(ua,{capabilityId:"dependency",feature:e.name,onEdit:()=>a(!0),onDelete:o}):null]})]}):null,n&&!((U=e.dependencies[0])!=null&&U.enabled)?t.jsxs(re,{children:[t.jsx(qe,{children:"Dependency value:"}),t.jsx("span",{children:"disabled"})]}):null,n&&((X=(I=e.dependencies[0])==null?void 0:I.variants)!=null&&X.length)?t.jsxs(re,{children:[t.jsx(qe,{children:"Dependency value:"}),t.jsx(ei,{variants:((R=e.dependencies[0])==null?void 0:R.variants)||[]})]}):null,q?t.jsxs(re,{children:[t.jsx(qe,{children:"Children:"}),t.jsx($q,{childFeatures:e.children,project:e.project})]}):null,e.project?t.jsx(Dq,{project:e.project,featureId:e.name,parentDependency:e.dependencies[0],onClose:()=>a(!1),showDependencyDialogue:r}):null]})},Vi=(e,r={})=>{const a=Fe(`/api/admin/projects/${e}/dependencies`),{data:V,error:n}=Or(e,!1,a,ni,r);return{dependenciesExist:V,error:n,loading:!n&&!V}},ni=async e=>await(await fetch(e).then(ze("Dependencies exist check"))).json(),qi=e=>{const{dependenciesExist:r}=Vi(e),{isOss:a}=se();return!!e&&!!(!a()||r)},ca=(e,r={})=>{const a=async()=>{const u=Fe(`api/admin/features/${e}/tags`);return(await fetch(u,{method:"GET"}).then(ze("Tags"))).json()},V=`api/admin/features/${e}/tags`,{data:n,error:q}=Or(!!e,{tags:[]},V,a,r),[i,s]=d.useState(!q&&!n),o=()=>{br(V)};return d.useEffect(()=>{s(!q&&!n)},[n,q]),{tags:(n==null?void 0:n.tags)||[],error:q,loading:i,refetch:o}},ii=l("section")(({theme:e})=>({"& > *":{margin:e.spacing(1,0)}})),_e=e=>e.map(r=>({title:r.value})),$t=(e,r)=>e.map(a=>({value:a.title,type:r})),Ia=({open:e,setOpen:r})=>{const{tagTypes:a}=Ma(),V=T("featureId"),{createTag:n}=uq(),{updateFeatureTags:q,loading:i}=Ye(),{tags:s,refetch:o,loading:u}=ca(V),{setToastData:p}=P(),c=a&&a.length>0?a[0]:{name:"simple",description:"Simple tag to get you started",icon:""},[U,I]=d.useState(c),X=i||u,[R,K]=d.useState(0),{trackEvent:E}=w(),[F,W]=d.useState(_e(s.filter(k=>k.type===U.name))),{tags:v,refetch:C}=cq(U.name),J=d.useMemo(()=>_e(v),[v]);d.useEffect(()=>{s&&U&&W(_e(s.filter(k=>k.type===U.name)))},[JSON.stringify(s),U,e]);const Q=()=>{r(!1),W([])};function S(k,x){const L=k.filter(N=>N.type===U.name).filter(N=>!x.find(g=>N.value===g.value&&N.type===g.type)),z=x.filter(N=>N.type===U.name).filter(N=>!k.find(g=>N.value===g.value&&N.type===g.type));return K(L.length+z.length),{added:L,removed:z}}const h=k=>k.filter(x=>!x.title.startsWith("Create")),b=async(k,x)=>{try{await q(V,{addedTags:k,removedTags:x}),await o()}catch{p({type:"error",text:"Failed to add tag"})}},M=async k=>{k.preventDefault();const x=$t(h(F),U.name),{added:L,removed:z}=S(x,s);R>0&&(await b(L,z),R>1&&E("suggest_tags",{props:{eventType:"multiple_tags_added"}}),R>0&&p({type:"success",text:`Updated tag${L.length>1?"s":""} to flag`})),K(0),W([]),r(!1)},ae=(k,x)=>{x!=null&&typeof x!="string"&&(k.preventDefault(),I(x),W([]),K(0))},y=(k,x,L)=>{const z=Ga(x);L==="selectOption"&&x.forEach((g,O)=>{if(typeof g!="string"&&g.inputValue&&g.inputValue!==""){const G={value:g.inputValue,type:U.name};n(G).then(()=>{E("suggest_tags",{props:{eventType:"tag_created"}}),C()}),g.title=g.inputValue,g.inputValue="",z[O]=g}});const N=$t(h(z),U.name);S(N,s),W(z)},j="add-tag-form";return t.jsx(Ie,{open:e,secondaryButtonText:"Cancel",primaryButtonText:"Save tags",title:"Update feature flag tags",onClick:M,disabledPrimaryButton:X||R===0,onClose:Q,formId:j,children:t.jsxs(t.Fragment,{children:[t.jsx(B,{paragraph:!0,sx:{marginBottom:k=>k.spacing(2.5)},children:"Tags allow you to group features together"}),t.jsx("form",{id:j,onSubmit:M,children:t.jsxs(ii,{children:[t.jsx(Iq,{options:a,value:U,onChange:ae}),t.jsx(Uq,{options:J,existingTags:s,tagType:U,selectedOptions:F,onChange:y})]})})]})})},di=l($)(({theme:e})=>({lineHeight:e.typography.body1.lineHeight,borderRadius:e.shape.borderRadiusExtraLarge,background:e.palette.secondary.light,padding:e.spacing(.5,1),height:e.spacing(3.5)})),oi=l(Re)(({theme:e})=>({fontSize:e.typography.body2.fontSize})),er=({project:e,onClick:r})=>t.jsx(di,{size:"small",permission:oe,projectId:e,variant:"text",onClick:r,startIcon:t.jsx(oi,{}),"data-loading":!0,children:"Add tag"}),tr=l("span")(({theme:e})=>({marginTop:e.spacing(1),color:e.palette.text.secondary,marginRight:e.spacing(1)})),li=l("div")(({theme:e})=>({display:"flex",justifyContent:"space-between",flexWrap:"wrap",minHeight:e.spacing(4.5),fontSize:e.fontSizes.smallBody})),rr=l("div")(({theme:e})=>({display:"flex",overflow:"hidden",gap:e.spacing(1),flexWrap:"wrap",marginTop:e.spacing(.75)}));l(Rt)(({theme:e})=>({overflowWrap:"anywhere",lineHeight:e.typography.body1.lineHeight,backgroundColor:e.palette.neutral.light,color:e.palette.text.primary,padding:e.spacing(.25),height:e.spacing(3.5)}));l("span")(({theme:e})=>({color:e.palette.text.secondary}));const si=({feature:e})=>{const{tags:r,refetch:a}=ca(e.name),{deleteTagFromFeature:V}=Ye(),[n,q]=d.useState(!1),[i,s]=d.useState(!1),[o,u]=d.useState(),{setToastData:p,setToastApiError:c}=P(),{hasAccess:U}=d.useContext(Xt),I=U(oe,e.project),X=()=>{q(!0)},R=async()=>{if(o)try{await V(e.name,o.type,o.value),a(),p({type:"success",text:"Tag removed"})}catch(K){c(Y(K))}};return t.jsxs(t.Fragment,{children:[r.length?t.jsxs(li,{children:[t.jsx(tr,{children:"Tags:"}),t.jsxs(rr,{children:[r.map(K=>t.jsx(pi,{tag:K,canUpdateTags:I,onTagRemove:E=>{s(!0),u(E)}},Jr(K))),I?t.jsx(er,{project:e.project,onClick:X}):null]})]}):t.jsxs(re,{children:[t.jsx(tr,{children:"Tags:"}),t.jsx(rr,{children:t.jsx(er,{project:e.project,onClick:X})})]}),t.jsx(Ia,{open:n,setOpen:q}),t.jsxs(Ie,{open:i,primaryButtonText:"Remove tag",secondaryButtonText:"Cancel",onClose:()=>{s(!1),u(void 0),a()},onClick:()=>{s(!1),R(),u(void 0)},title:"Remove tag",children:["You are about to remove tag:"," ",t.jsxs("strong",{children:[o==null?void 0:o.type,":",o==null?void 0:o.value]})]})]})},pi=({tag:e,canUpdateTags:r,onTagRemove:a})=>{const V=Jr(e),n=V.length>25,q=r?()=>a(e):void 0,i=t.jsx(Se,{title:"Remove tag",arrow:!0,children:t.jsx(wa,{sx:{height:"20px",width:"20px"}})});return t.jsx(Se,{title:n?V:"",arrow:!0,children:t.jsx("span",{children:t.jsx(Da,{tag:e,onDelete:q,deleteIcon:i})})},V)},ui=l($a)(({theme:e})=>({width:e.spacing(2.5),height:e.spacing(2.5)})),ci=l(_a)({flexWrap:"nowrap"}),Ii=({collaborators:e})=>!e||e.length===0?null:t.jsx(ci,{users:e,avatarLimit:9,AvatarComponent:ui}),Ui="environment-visibility-button",ar="environment-visibility-menu",Ki=l("div")(({theme:e})=>({display:"flex",justifyContent:"center",paddingTop:e.spacing(4)})),Xi=({environments:e,hiddenEnvironments:r,onChange:a})=>{const[V,n]=d.useState(null),q=!!V,i=c=>{n(c.currentTarget)},s=()=>{n(null)},o=e.map(c=>c.name),u=new Set(o.filter(c=>!r.includes(c))),p=c=>{a(c)};return t.jsxs(Ki,{children:[t.jsx(H,{onClick:i,endIcon:q?t.jsx(it,{}):t.jsx(Be,{}),variant:"outlined",id:Ui,"aria-controls":ar,"aria-haspopup":"true","aria-expanded":q?"true":void 0,"data-loading":!0,children:"Hide/show environments"}),t.jsx(eV,{id:ar,open:!!V,anchorEl:V,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:t.jsx(tV,{multiselect:{selectedOptions:u},onChange:p,options:o.map(c=>({label:c,value:c})),search:{label:"Filter environments",placeholder:"Filter environments"}})})]})},Ua=(e,r)=>{const{makeRequest:a,createRequest:V,errors:n,loading:q}=Tr({propagateErrors:!0}),i=async p=>{const c=V(`/api/admin/projects/${e}/features/${r}/link`,{method:"POST",body:JSON.stringify(p)});await a(c.caller,c.id)},s=async(p,c)=>{const U=V(`/api/admin/projects/${e}/features/${r}/link/${p}`,{method:"PUT",body:JSON.stringify(c)});await a(U.caller,U.id)},o=async p=>{const c=V(`/api/admin/projects/${e}/features/${r}/link/${p}`,{method:"DELETE"});await a(c.caller,c.id)},u=[V,a,Y,e];return{addLink:d.useCallback(i,u),editLink:d.useCallback(s,u),deleteLink:d.useCallback(o,u),errors:n,loading:q}},Vr=l(hr)(({theme:e})=>({width:"100%",marginTop:e.spacing(1),marginBottom:e.spacing(1)})),Ka=({showDialogue:e,onClose:r,project:a,featureId:V,mode:n,link:q})=>{const[i,s]=d.useState(""),[o,u]=d.useState(""),[p,c]=d.useState(""),{addLink:U,editLink:I,loading:X}=Ua(a,V),{refetchFeature:R}=A(a,V),{setToastData:K,setToastApiError:E}=P(),F=n==="edit",W=F?"Edit link":"Add link",v=F?"Link updated":"Link added",{trackEvent:C}=w();d.useEffect(()=>{F&&q?(s(q.url||""),u(q.title||""),c(q.id||"")):F||(s(""),u(""),c(""))},[F,q]);const J=async()=>{try{F?(await I(p,{url:i,title:o||null}),C("feature-links",{props:{eventType:"edit-link"}})):(await U({url:i,title:o||null}),C("feature-links",{props:{eventType:"add-link"}})),K({text:v,type:"success"}),r(),R(),u(""),s("")}catch(S){E(Y(S))}},Q=F?q!==null:e;return t.jsx(Ie,{open:Q,title:W,onClose:r,disabledPrimaryButton:i.trim()===""||X,onClick:J,primaryButtonText:"Save",secondaryButtonText:"Cancel",children:t.jsxs(f,{children:[t.jsx(Vr,{label:"Link",placeholder:"https://",variant:"outlined",value:i,onChange:S=>s(S.target.value)}),t.jsx(Vr,{label:"Title (optional)",variant:"outlined",value:o,onChange:S=>u(S.target.value)})]})})},Ri=e=>t.jsx(Ka,{...e,mode:"add",link:null}),Ei=e=>t.jsx(Ka,{...e,mode:"edit",showDialogue:e.link!==null}),Xa=l("div")(({theme:e})=>({padding:e.spacing(3),borderRadius:e.shape.borderRadiusLarge,backgroundColor:e.palette.background.paper,display:"flex",flexDirection:"column",gap:e.spacing(2),width:"350px",border:`1px solid ${e.palette.divider}`,[e.breakpoints.down("md")]:{width:"100%"},marginBottom:e.spacing(2)})),st=l("h2")(({theme:e})=>({fontSize:e.typography.body1.fontSize,fontWeight:e.typography.fontWeightBold,marginBottom:e.spacing(.5)})),Wi=l("div")({display:"flex",flexDirection:"column"}),re=l("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",minHeight:e.spacing(4.5),fontSize:e.fontSizes.smallBody})),qe=l("span")(({theme:e})=>({color:e.palette.text.secondary,marginRight:e.spacing(1)})),Te=l("span")({overflowWrap:"anywhere"}),pt=l("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),Si=l(qt)(({theme:e})=>({minWidth:e.spacing(5)})),Fi=({links:e,project:r,feature:a})=>{const[V,n]=d.useState(!1),[q,i]=d.useState(null),{deleteLink:s}=Ua(r,a),{setToastData:o,setToastApiError:u}=P(),{refetchFeature:p}=A(r,a),c=t.jsx($,{size:"small",startIcon:t.jsx(Re,{}),permission:oe,disabled:e.length>=10,projectId:r,variant:"text",onClick:()=>n(!0),children:"Add link"}),U=()=>t.jsx(Wt,{children:e.map(R=>t.jsx(Le,{secondaryAction:t.jsx(ua,{capabilityId:"link",feature:a,onEdit:()=>{i(R)},onDelete:async()=>{try{await s(R.id),o({text:"Link removed",type:"success"}),p()}catch(K){u(Y(K))}}}),disablePadding:!0,dense:!0,children:t.jsxs(nV,{component:"a",href:R.url,target:"_blank",rel:"noopener noreferrer",disableGutters:!0,children:[t.jsx(Si,{children:t.jsx(qV,{color:"primary"})}),t.jsx(je,{primary:R.title,secondary:R.url,secondaryTypographyProps:{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"}}})]})},R.id))}),I=t.jsxs(t.Fragment,{children:[t.jsx(st,{children:"Add links"}),t.jsx(re,{children:"Gather relevant links for external resources such as issue trackers, code repositories or analytics tooling"}),t.jsx("div",{children:c})]}),X=t.jsxs(t.Fragment,{children:[t.jsx(st,{children:"Resources"}),U(),t.jsx("div",{children:c})]});return t.jsxs(t.Fragment,{children:[t.jsx(Xa,{children:e.length===0?I:X}),t.jsx(Ri,{project:r,featureId:a,showDialogue:V,onClose:()=>n(!1)}),t.jsx(Ei,{project:r,featureId:a,link:q,onClose:()=>i(null)})]})},gi=({hiddenEnvironments:e,onEnvironmentVisibilityChange:r,feature:a,onChange:V})=>{var X,R,K,E;const{locationSettings:n}=jr(),q=Ke(),[i,s]=d.useState(!1),[o,u]=d.useState(!1),{project:p,description:c,type:U}=a,I=qi(p);return t.jsxs(t.Fragment,{children:[t.jsx(Fi,{links:a.links||[],project:a.project,feature:a.name}),t.jsxs(Xa,{children:[t.jsxs("div",{children:[t.jsx(st,{children:"Flag details"}),c?t.jsx(re,{"data-loading":!0,children:t.jsx(Te,{children:t.jsx(he,{arrow:!0,lines:5,title:c,children:c})})}):null]}),t.jsxs(Wi,{children:[t.jsxs(re,{children:[t.jsx(qe,{children:"Flag type:"}),t.jsxs(Te,{"data-loading":!0,children:[rV(U||" ")," flag"]})]}),a.lifecycle?t.jsxs(re,{"data-loading":!0,children:[t.jsx(qe,{children:"Lifecycle:"}),t.jsx(aV,{feature:a,onArchive:()=>s(!0),onComplete:()=>u(!0),onUncomplete:V})]}):null,t.jsxs(re,{children:[t.jsx(qe,{children:"Created:"}),t.jsx(Te,{"data-loading":!0,children:VV(Et(a.createdAt),n.locale)})]}),a.createdBy?t.jsxs(re,{children:[t.jsx(qe,{children:"Created by:"}),t.jsx(pt,{children:t.jsx(Te,{"data-loading":!0,children:(X=a.createdBy)==null?void 0:X.name})})]}):null,(R=a.collaborators)!=null&&R.users&&((K=a.collaborators)==null?void 0:K.users.length)>0?t.jsxs(re,{children:[t.jsx(qe,{children:"Collaborators:"}),t.jsx(pt,{children:t.jsx(Ii,{collaborators:(E=a.collaborators)==null?void 0:E.users})})]}):null,I?t.jsx(ai,{feature:a}):null,t.jsx(si,{feature:a}),r?t.jsx(Xi,{environments:a.environments||[],hiddenEnvironments:e||[],onChange:r}):null]})]}),a.children.length>0?t.jsx(Qt,{features:a.children,project:a.project,isOpen:i,onClose:()=>s(!1)}):t.jsx(kt,{isOpen:i,onConfirm:()=>{q(`/projects/${a.project}`)},onClose:()=>s(!1),projectId:a.project,featureIds:[a.name]}),a.project?t.jsx(qa,{isOpen:o,setIsOpen:u,projectId:a.project,featureId:a.name,onComplete:V}):null]})},yi=e=>{var n;const{uiConfig:r}=se(),a=((n=r.resourceLimits)==null?void 0:n.featureEnvironmentStrategies)||100,V=e>=a;return{limit:a,limitReached:V}},ki=()=>{const e=T("projectId"),r=T("featureId"),a=Bt("environmentId"),V=Bt("strategyName"),{strategy:n,defaultStrategyFallback:q}=Kq(e,a),i=JSON.parse(iV().get("defaultStrategy")||"false"),[s,o]=d.useState({name:V}),{strategyDefinition:u}=dV(V),p=oV(),{addStrategyToFeature:c,loading:U}=He(),{addChange:I}=Ue(),{setToastData:X,setToastApiError:R}=P(),{uiConfig:K}=se(),{unleashUrl:E}=K,F=Ke(),{feature:W,refetchFeature:v}=A(e,r),C=W==null?void 0:W.environments.find(O=>O.name===a),J=(C==null?void 0:C.strategies.length)||0,{limit:Q,limitReached:S}=yi(J),h=d.useRef(W),{isChangeRequestConfigured:b}=ne(e),{refetch:M}=le(e),{trackEvent:ae}=w(),{data:y,staleDataNotification:j,forceRefreshCache:k}=lV({unleashGetter:A,params:[e,r],dataKey:"feature",refetchFunctionKey:"refetchFeature",options:{}},W,{afterSubmitAction:v},RV);d.useEffect(()=>{h.current.name===""&&W.name&&(k(W),h.current=W)},[W.name]),d.useEffect(()=>{var O,G;if(i){const te=n||q;((O=te.parameters)==null?void 0:O.groupId)===""&&r?o({...te,parameters:{...te.parameters,groupId:r}}):o(te)}else u&&o(sV(r,u,(G=q.parameters)==null?void 0:G.stickiness))},[r,JSON.stringify(u),JSON.stringify(n),i]);const x=async O=>{await c(e,r,a,O),X({text:"Strategy created",type:"success"})},L=async O=>{await I(e,a,{action:"addStrategy",feature:r,payload:O}),X({text:"Strategy added to draft",type:"success"}),M()},z=pV(s),N=async()=>{ae("strategyTitle",{props:{hasTitle:!!s.title,on:"create"}});try{b(a)?await L(z):await x(z),v(),F(Zr(e,r))}catch(O){R(Y(O))}};return!y||!y.project?null:t.jsxs(Br,{modal:!0,description:IV,documentationLink:cV,documentationLinkLabel:uV,disablePadding:!0,formatApiCode:()=>vi(e,r,a,z,E),children:[t.jsx(UV,{feature:y,strategy:s,setStrategy:o,environmentId:a,onSubmit:N,loading:U,permission:Lr,errors:p,changeRequestsEnabled:b(a),canRenamePreexistingVariants:!0,Limit:t.jsx(KV,{name:"strategies in this environment",shortName:"strategies",currentValue:J,limit:Q}),disabled:S}),j]})},Qi=(e,r,a,V,n=!1)=>{const q=new URLSearchParams({environmentId:a,strategyName:V,defaultStrategy:String(n)});return`/projects/${e}/features/${r}/strategies/create?${q}`},vi=(e,r,a,V,n)=>{if(!n)return"";const q=`${n}/api/admin/projects/${e}/features/${r}/environments/${a}/strategies`,i=JSON.stringify(V,XV,2);return`curl --location --request POST '${q}' \\ --header 'Authorization: INSERT_API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '${i}'`},nr=3,Ra=e=>Array.isArray(e)?e.filter(r=>r.featureId&&r.projectId):[],qr=e=>Ra(FV(e)||[]),Ci=()=>{const e=`${WV}:unleash-lastViewedFlags`,[r,a]=d.useState(()=>qr(e)),{emitEvent:V}=EV("lastViewedFlagsUpdated",d.useCallback(()=>{a(qr(e))},[e]));d.useEffect(()=>{r&&(SV(e,r),V())},[JSON.stringify(r),e,V]);const n=d.useCallback(q=>{if(!q.featureId||!q.projectId||r.find(s=>s.featureId===q.featureId))return;const i=Ra([...r,q]);a(i.length>nr?i.slice(-nr):i)},[JSON.stringify(r)]);return{lastViewed:r,setLastViewed:n}},hi=l(f)(({theme:e})=>({width:e.breakpoints.values.md,height:"100%",overflowY:"auto",display:"flex",flexDirection:"column"})),xi=l(f)(({theme:e})=>({padding:e.spacing(0,3,3,3)})),mi=l(yV)(({theme:e})=>({marginRight:e.spacing(1)})),Ti=l(kV)(({theme:e})=>({padding:e.spacing(2,4,4)})),fi=({template:e,projectId:r,featureName:a,environment:V,activeReleasePlan:n,crProtected:q,onConfirm:i,onBack:s})=>{var U;const{feature:o}=A(r,a),u=o==null?void 0:o.environments.find(({name:I})=>I===V),p=u==null?void 0:u.enabled,c=gV(e.id,a,V);return t.jsxs(t.Fragment,{children:[t.jsx(xi,{children:t.jsxs(H,{variant:"text",onClick:s,children:[t.jsx(mi,{}),"Go back"]})}),t.jsxs(hi,{children:[n&&t.jsx(f,{sx:{px:4,pb:2},children:t.jsxs(de,{severity:"warning",children:["This feature environment currently has"," ",t.jsx("strong",{children:n.name})," (",t.jsx("strong",{children:((U=n.milestones.find(({id:I})=>n.activeMilestoneId===I))==null?void 0:U.name)??n.milestones[0].name}),")",p?" running":" paused",". Adding a new release plan will replace the existing release plan."]})}),t.jsx(f,{sx:{px:2},children:t.jsx(Nr,{plan:c,readonly:!0})}),q&&t.jsx(f,{sx:{px:4,pt:1},children:t.jsxs(B,{children:[t.jsx("strong",{children:"Adding"})," release template"," ",t.jsx("strong",{children:e==null?void 0:e.name})," to"," ",t.jsx("strong",{children:a})," in"," ",t.jsx("strong",{children:V}),"."]})})]}),t.jsx(Ti,{children:t.jsx(H,{variant:"contained",color:"primary",onClick:i,children:q?"Add suggestion to draft":"Apply template"})})]})},Oi=l("div")(({theme:e})=>({display:"flex",alignItems:"center","& > svg":{width:e.spacing(6),height:e.spacing(6),fill:e.palette.primary.main}})),bi=l(he)(({theme:e})=>({fontWeight:e.typography.fontWeightBold})),Ji=l("div",{shouldForwardProp:e=>e!=="isDefault"})(({theme:e,isDefault:r})=>({display:"flex",alignItems:"center",height:e.spacing(10),padding:e.spacing(2),backgroundColor:e.palette.background.elevation1,color:"inherit",textDecoration:"inherit",lineHeight:1.25,borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.divider,borderRadius:e.spacing(1),textAlign:"left",overflow:"hidden",position:"relative",fontSize:e.typography.caption.fontSize,"&:hover .cardContent, &:focus-within .cardContent":{opacity:.4},"&:hover .cardActions, &:focus-within .cardActions":{opacity:1},...r&&{backgroundColor:e.palette.secondary.light,borderColor:e.palette.secondary.border},userSelect:"none"})),ji=l("div")(({theme:e})=>({display:"flex",transition:"opacity 0.2s ease-in-out",gap:e.spacing(2)})),Bi=l("div")(({theme:e})=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:e.spacing(.5)})),Li=l("div")(({theme:e})=>({position:"absolute",display:"flex",alignItems:"center",top:e.spacing(0),bottom:e.spacing(0),right:e.spacing(2),gap:e.spacing(1),opacity:0,transition:"opacity 0.1s ease-in-out"})),vt=({name:e,description:r,icon:a,isDefault:V,children:n})=>t.jsxs(Ji,{isDefault:V,children:[t.jsxs(ji,{className:"cardContent",children:[t.jsx(Oi,{children:a}),t.jsxs(Bi,{children:[t.jsx(bi,{lines:1,title:e,arrow:!0,children:e}),r&&t.jsx(he,{lines:2,title:r,arrow:!0,children:r})]})]}),t.jsx(Li,{className:"cardActions",children:n})]}),Ea=l(f)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(.5),marginBottom:e.spacing(.5),width:"100%",fontSize:e.typography.body2.fontSize})),Zi=l(f)(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(3, 1fr)",[e.breakpoints.down("md")]:{gridTemplateColumns:"repeat(2, 1fr)"},[e.breakpoints.down("sm")]:{gridTemplateColumns:"repeat(1, 1fr)"},gap:e.spacing(2),width:"100%"})),Ni=l(H)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",height:e.spacing(10),padding:e.spacing(2),border:`1px solid ${e.palette.divider}`,borderRadius:e.spacing(1)})),ge=({title:e,limit:r,viewMore:a,viewMoreLabel:V="View more strategies",children:n})=>{const q=Array.isArray(n)?n:[n],i=r?q.slice(0,r):q;return t.jsxs(f,{children:[e&&t.jsx(Ea,{children:e}),t.jsxs(Zi,{children:[i,a&&i.length<q.length&&t.jsx(Ni,{variant:"text",size:"small",onClick:a,children:V})]})]})},Ai=l("div")(({theme:e})=>({background:e.palette.background.paper})),ve=e=>t.jsx(Ai,{children:t.jsx(H,{variant:"outlined",size:"small",...e})}),zi=e=>d.createElement("svg",{width:51,height:13,viewBox:"0 0 51 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},d.createElement("path",{d:"M50.6455 0H0V12.3545H50.6455V0Z",fill:"#BEBBF3"}),d.createElement("g",{opacity:.8},d.createElement("mask",{id:"mask0_34708_31106",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:25,height:13},d.createElement("path",{d:"M24.2564 0V12.4173L0 12.2891V0H24.2564Z",fill:"white"})),d.createElement("g",{mask:"url(#mask0_34708_31106)"},d.createElement("rect",{width:171.349,height:237.041,transform:"matrix(-0.851658 0.524097 0.524097 0.851658 34.8125 -151.766)",fill:"url(#pattern0_34708_31106)"}))),d.createElement("defs",null,d.createElement("pattern",{id:"pattern0_34708_31106",patternContentUnits:"objectBoundingBox",width:1,height:1},d.createElement("use",{xlinkHref:"#image0_34708_31106",transform:"scale(0.00145773 0.00105374)"})),d.createElement("image",{id:"image0_34708_31106",width:686,height:949,preserveAspectRatio:"none",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAq4AAAO1CAYAAACvmWfqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3FpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDA2IDc5LjE2NDc1MywgMjAyMS8wMi8xNS0xMTo1MjoxMyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFs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