unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
4 lines • 759 kB
JavaScript
import{n as e,s as t,t as n}from"./jsx-runtime-ButemYzH.js";import{n as r,t as i}from"./PercentageDonut-DxYx2sDT.js";import{a,d as o,l as s,m as c,o as l,u}from"./chart-BMc0j_v5.js";import{$d as d,$l as f,$o as p,$r as m,$u as h,Ac as g,Ad as _,Al as v,As as y,Au as b,B as x,Bc as S,Bl as C,Bs as w,Bt as T,Ca as E,Cd as D,Cl as O,Co as k,Cs as A,Dd as j,Di as ee,Dl as te,Dn as ne,Du as re,Ed as ie,Ei as ae,Et as oe,Eu as se,F as ce,Fa as le,Fc as ue,Fr as de,Fs as fe,G as pe,Gn as me,Go as M,Gr as he,Gu as ge,Ha as _e,Hi as ve,Hn as ye,Hr as be,Hs as xe,Ia as Se,Ii as Ce,In as we,Is as Te,Iu as Ee,J as De,Jc as Oe,Jd as ke,Ji as Ae,Jn as je,Jr as Me,Ka as Ne,Kd as Pe,Kn as Fe,Ks as Ie,L as Le,La as Re,Lr as ze,Ls as N,M as Be,Md as Ve,Ml as He,Ms as Ue,Mt as We,Mu as Ge,N as Ke,Na as P,Nd as qe,Ns as F,Nu as Je,O as Ye,Oc as Xe,Ol as Ze,Os as Qe,Ou as $e,Pc as et,Pl as tt,Ps as I,Ql as nt,Qr as rt,R as it,Ra as at,Ri as ot,Ro as st,Rr as ct,Ru as lt,Ss as ut,St as dt,Ta as ft,Tc as pt,Td as mt,Ts as ht,Tu as gt,U as _t,Ua as L,Ur as vt,Us as yt,V as bt,Vi as xt,Vn as St,Vo as Ct,Vs as wt,Vt as Tt,Vu as Et,W as Dt,Wa as Ot,Wd as kt,Wl as At,Wr as jt,Wt as Mt,Wu as Nt,Xd as R,Xn as Pt,Xo as Ft,Xr as It,Xs as Lt,Xu as z,Y as Rt,Yd as zt,Yi as Bt,Ys as Vt,Yt as Ht,Yu as B,Z as Ut,Zn as Wt,Zo as Gt,Zr as Kt,_c as qt,_d as V,_o as H,_u as Jt,ad as Yt,ar as Xt,ba as Zt,bc as Qt,bd as $t,bl as en,bo as tn,bu as nn,cd as rn,ci as an,co as on,cr as sn,cu as cn,d as ln,dd as un,do as dn,dr as fn,ds as pn,dt as mn,du as hn,ea as gn,ed as _n,ef as vn,fd as yn,fo as bn,ft as xn,fu as Sn,go as Cn,gs as wn,hi as Tn,hr as En,hs as Dn,ht as On,hu as kn,ic as An,id as U,ii as jn,io as Mn,ir as Nn,iu as Pn,j as Fn,ja as In,jd as Ln,ji as Rn,js as zn,ju as Bn,ka as Vn,kc as W,ks as Hn,kt as Un,ku as Wn,lc as Gn,ld as Kn,li as qn,lr as Jn,lt as Yn,md as Xn,mo as Zn,mr as Qn,nc as $n,nf as er,no as tr,nr,or as rr,pd as ir,pr as ar,ps as or,q as sr,qd as cr,qi as lr,qn as ur,qr as dr,qu as fr,ra as pr,rc as mr,rd as G,rr as hr,sd as gr,sr as _r,su as vr,tf as yr,ts as br,tu as xr,ud as Sr,ur as Cr,us as wr,ut as Tr,uu as Er,vc as Dr,vd as Or,vo as kr,wc as Ar,wd as jr,wl as Mr,wu as Nr,xa as Pr,xc as Fr,xd as K,xl as Ir,xo as Lr,xr as Rr,xs as zr,xu as Br,yd as Vr,yt as Hr,yu as q,zc as Ur,zi as Wr,zn as Gr,zs as Kr,zt as qr}from"./index-B0RbDPtk.js";import{t as Jr}from"./chartjs-plugin-annotation.esm-CII-nIyK.js";import{t as Yr}from"./daysOrHours-CWsdHL8Z.js";import{i as Xr,n as Zr,r as Qr,t as $r}from"./MarkCompletedDialogue-x4B5vgpn.js";import{i as ei,n as ti,r as ni,t as ri}from"./aggregateFeatureMetrics-B--WhUm6.js";import{_ as ii,a as ai,b as oi,c as si,d as ci,f as li,h as ui,i as di,m as fi,n as pi,p as mi,r as hi,t as gi,v as _i,x as vi,y as yi}from"./FeatureStaleDialog-BfIPQAKa.js";import{a as bi,n as xi,r as Si,t as Ci}from"./GridLayoutWrapper-CN2Zeusb.js";function wi(e){return Ve(`MuiPagination`,e)}Ln(`MuiPagination`,[`root`,`ul`,`outlined`,`text`]);function Ti(e={}){let{boundaryCount:t=1,componentName:n=`usePagination`,count:r=1,defaultPage:i=1,disabled:a=!1,hideNextButton:o=!1,hidePrevButton:s=!1,onChange:c,page:l,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:f=1,...p}=e,[m,h]=ie({controlled:l,default:i,name:n,state:`page`}),g=(e,t)=>{l||h(t),c&&c(e,t)},_=(e,t)=>{let n=t-e+1;return Array.from({length:n},(t,n)=>e+n)},v=_(1,Math.min(t,r)),y=_(Math.max(r-t+1,t+1),r),b=Math.max(Math.min(m-f,r-t-f*2-1),t+2),x=Math.min(Math.max(m+f,t+f*2+2),r-t-1),S=[...u?[`first`]:[],...s?[]:[`previous`],...v,...b>t+2?[`start-ellipsis`]:t+1<r-t?[t+1]:[],..._(b,x),...x<r-t-1?[`end-ellipsis`]:r-t>t?[r-t]:[],...y,...o?[]:[`next`],...d?[`last`]:[]],C=e=>{switch(e){case`first`:return 1;case`previous`:return m-1;case`next`:return m+1;case`last`:return r;default:return null}};return{items:S.map(e=>typeof e==`number`?{onClick:t=>{g(t,e)},type:`page`,page:e,selected:e===m,disabled:a,"aria-current":e===m?`page`:void 0}:{onClick:t=>{g(t,C(e))},type:e,page:C(e),selected:!1,disabled:a||!e.includes(`ellipsis`)&&(e===`next`||e===`last`?m>=r:m<=1)}),...p}}function Ei(e){return Ve(`MuiPaginationItem`,e)}var J=Ln(`MuiPaginationItem`,[`root`,`page`,`sizeSmall`,`sizeLarge`,`text`,`textPrimary`,`textSecondary`,`outlined`,`outlinedPrimary`,`outlinedSecondary`,`rounded`,`ellipsis`,`firstLast`,`previousNext`,`focusVisible`,`disabled`,`selected`,`icon`,`colorPrimary`,`colorSecondary`]),Y=t(e()),X=n(),Di=V((0,X.jsx)(`path`,{d:`M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z`}),`FirstPage`),Oi=V((0,X.jsx)(`path`,{d:`M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z`}),`LastPage`),ki=V((0,X.jsx)(`path`,{d:`M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z`}),`NavigateBefore`),Ai=V((0,X.jsx)(`path`,{d:`M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`NavigateNext`),ji=(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${$t(n.size)}`],n.variant===`text`&&t[`text${$t(n.color)}`],n.variant===`outlined`&&t[`outlined${$t(n.color)}`],n.shape===`rounded`&&t.rounded,n.type===`page`&&t.page,(n.type===`start-ellipsis`||n.type===`end-ellipsis`)&&t.ellipsis,(n.type===`previous`||n.type===`next`)&&t.previousNext,(n.type===`first`||n.type===`last`)&&t.firstLast]},Mi=e=>{let{classes:t,color:n,disabled:r,selected:i,size:a,shape:o,type:s,variant:c}=e;return mt({root:[`root`,`size${$t(a)}`,c,o,n!==`standard`&&`color${$t(n)}`,n!==`standard`&&`${c}${$t(n)}`,r&&`disabled`,i&&`selected`,{page:`page`,first:`firstLast`,last:`firstLast`,"start-ellipsis":`ellipsis`,"end-ellipsis":`ellipsis`,previous:`previousNext`,next:`previousNext`}[s]],icon:[`icon`]},Ei,t)},Ni=K(`div`,{name:`MuiPaginationItem`,slot:`Root`,overridesResolver:ji})(Vr(({theme:e})=>({...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`,[`&.${J.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:`small`},style:{minWidth:26,borderRadius:26/2,margin:`0 1px`,padding:`0 4px`}},{props:{size:`large`},style:{minWidth:40,borderRadius:40/2,padding:`0 10px`,fontSize:e.typography.pxToRem(15)}}]}))),Pi=K(Kn,{name:`MuiPaginationItem`,slot:`Root`,overridesResolver:ji})(Vr(({theme:e})=>({...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,[`&.${J.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${J.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`}},[`&.${J.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}))`:j(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${J.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:j(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${J.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:`small`},style:{minWidth:26,height:26,borderRadius:26/2,margin:`0 1px`,padding:`0 4px`}},{props:{size:`large`},style:{minWidth:40,height:40,borderRadius:40/2,padding:`0 10px`,fontSize:e.typography.pxToRem(15)}},{props:{shape:`rounded`},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:`outlined`},style:{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)`}`,[`&.${J.selected}`]:{[`&.${J.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:`text`},style:{[`&.${J.selected}`]:{[`&.${J.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(gr([`dark`,`contrastText`])).map(([t])=>({props:{variant:`text`,color:t},style:{[`&.${J.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${J.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${J.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(gr([`light`])).map(([t])=>({props:{variant:`outlined`,color:t},style:{[`&.${J.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:j(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:j(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:j(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${J.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:j(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),Fi=K(`div`,{name:`MuiPaginationItem`,slot:`Icon`,overridesResolver:(e,t)=>t.icon})(Vr(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:`0 -8px`,variants:[{props:{size:`small`},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{fontSize:e.typography.pxToRem(22)}}]}))),Ii=Y.forwardRef(function(e,t){let n=Or({props:e,name:`MuiPaginationItem`}),{className:r,color:i=`standard`,component:a,components:o={},disabled:s=!1,page:c,selected:l=!1,shape:u=`circular`,size:d=`medium`,slots:f={},slotProps:p={},type:m=`page`,variant:h=`text`,...g}=n,_={...n,color:i,disabled:s,selected:l,shape:u,size:d,type:m,variant:h},v=jr(),y=Mi(_),b={slots:{previous:f.previous??o.previous,next:f.next??o.next,first:f.first??o.first,last:f.last??o.last},slotProps:p},[x,S]=yn(`previous`,{elementType:ki,externalForwardedProps:b,ownerState:_}),[C,w]=yn(`next`,{elementType:Ai,externalForwardedProps:b,ownerState:_}),[T,E]=yn(`first`,{elementType:Di,externalForwardedProps:b,ownerState:_}),[D,O]=yn(`last`,{elementType:Oi,externalForwardedProps:b,ownerState:_}),k=v?{previous:`next`,next:`previous`,first:`last`,last:`first`}[m]:m,A={previous:x,next:C,first:T,last:D}[k],j={previous:S,next:w,first:E,last:O}[k];return m===`start-ellipsis`||m===`end-ellipsis`?(0,X.jsx)(Ni,{ref:t,ownerState:_,className:qe(y.root,r),children:`…`}):(0,X.jsxs)(Pi,{ref:t,ownerState:_,component:a,disabled:s,className:qe(y.root,r),...g,children:[m===`page`&&c,A?(0,X.jsx)(Fi,{...j,className:y.icon,as:A}):null]})}),Li=e=>{let{classes:t,variant:n}=e;return mt({root:[`root`,n],ul:[`ul`]},wi,t)},Ri=K(`nav`,{name:`MuiPagination`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),zi=K(`ul`,{name:`MuiPagination`,slot:`Ul`,overridesResolver:(e,t)=>t.ul})({display:`flex`,flexWrap:`wrap`,alignItems:`center`,padding:0,margin:0,listStyle:`none`});function Bi(e,t,n){return e===`page`?`${n?``:`Go to `}page ${t}`:`Go to ${e} page`}var Vi=Y.forwardRef(function(e,t){let n=Or({props:e,name:`MuiPagination`}),{boundaryCount:r=1,className:i,color:a=`standard`,count:o=1,defaultPage:s=1,disabled:c=!1,getItemAriaLabel:l=Bi,hideNextButton:u=!1,hidePrevButton:d=!1,onChange:f,page:p,renderItem:m=e=>(0,X.jsx)(Ii,{...e}),shape:h=`circular`,showFirstButton:g=!1,showLastButton:_=!1,siblingCount:v=1,size:y=`medium`,variant:b=`text`,...x}=n,{items:S}=Ti({...n,componentName:`Pagination`}),C={...n,boundaryCount:r,color:a,count:o,defaultPage:s,disabled:c,getItemAriaLabel:l,hideNextButton:u,hidePrevButton:d,renderItem:m,shape:h,showFirstButton:g,showLastButton:_,siblingCount:v,size:y,variant:b},w=Li(C);return(0,X.jsx)(Ri,{"aria-label":`pagination navigation`,className:qe(w.root,i),ownerState:C,ref:t,...x,children:(0,X.jsx)(zi,{className:w.ul,ownerState:C,children:S.map((e,t)=>(0,X.jsx)(`li`,{children:m({...e,color:a,"aria-label":l(e.type,e.page,e.selected),shape:h,size:y,variant:b})},t))})})}),Hi=()=>{let e=P(`projectId`),t=P(`featureId`),{feature:n}=L(e,t);return n.name?(0,X.jsx)(ye,{title:`Event log`,feature:t}):null},Ui=()=>(0,X.jsxs)(U,{severity:`warning`,children:[`Remember to update your Unleash client! Feature dependencies require new SDK versions. Read more about `,(0,X.jsx)(Wi,{}),`.`]}),Wi=()=>(0,X.jsx)(`a`,{href:`https://docs.getunleash.io/concepts/feature-flags#feature-flag-dependencies`,target:`_blank`,rel:`noreferrer`,children:`Client SDK support for feature dependencies`}),Gi=K(h)(({theme:e})=>({marginTop:e.spacing(2),marginBottom:e.spacing(1.5)})),Ki=({project:e,parent:t,onSelect:n,selectedValues:r})=>{let{parentVariantOptions:i}=Qr(e,t),a=(0,X.jsx)(ur,{fontSize:`small`}),o=(0,X.jsx)(Fe,{fontSize:`small`});return(0,X.jsx)(Gi,{multiple:!0,id:`parent-variant-options`,options:i,disableCloseOnSelect:!0,renderOption:(e,t,{selected:n})=>(0,X.jsxs)(`li`,{...e,children:[(0,X.jsx)(fr,{icon:a,checkedIcon:o,style:{marginRight:8},checked:n}),t]}),renderInput:e=>(0,X.jsx)(Er,{...e,placeholder:`Select values`}),fullWidth:!0,value:r,onChange:(e,t)=>{n(t)}})},Z={key:`none (remove dependency)`,label:`none (remove dependency)`},qi=K(A)(({theme:e})=>({marginTop:e.spacing(2),marginBottom:e.spacing(1.5)})),Ji=({onSelect:e,parentValue:t})=>(0,X.jsx)(qi,{fullWidth:!0,options:[{key:`enabled`,label:`enabled`},{key:`enabled_with_variants`,label:`enabled with variants`},{key:`disabled`,label:`disabled`}],value:t.status,onChange:e}),Yi=e=>{let{makeRequest:t,createRequest:n,errors:r,loading:i}=Ue({propagateErrors:!0}),a=async(r,i)=>{let a=n(`/api/admin/projects/${e}/features/${r}/dependencies`,{method:`POST`,body:JSON.stringify(i)});await t(a.caller,a.id)},o=async(r,i)=>{let a=n(`/api/admin/projects/${e}/features/${r}/dependencies/${i}`,{method:`DELETE`});await t(a.caller,a.id)},s=async r=>{let i=n(`/api/admin/projects/${e}/features/${r}/dependencies`,{method:`DELETE`});await t(i.caller,i.id)},c=[n,t,F,e];return{addDependency:(0,Y.useCallback)(a,c),removeDependency:(0,Y.useCallback)(o,c),removeDependencies:(0,Y.useCallback)(s,c),errors:r,loading:i}},Xi=(e,t,n,r,i)=>{let{trackEvent:a}=N(),{addChange:o}=he(),{refetch:s}=vt(e),{setToastData:c,setToastApiError:l}=I(),{refetchFeature:u}=L(e,t),d=we(e)(),{isChangeRequestConfiguredInAnyEnv:f}=M(e),{addDependency:p,removeDependencies:m}=Yi(e),h=async i=>{if(!d){console.error(`No change request environment`);return}i===`addDependency`&&(await o(e,d,[{action:i,feature:t,payload:{feature:n,enabled:r.status!==`disabled`,variants:r.status===`enabled_with_variants`?r.variants:[]}}]),a(`dependent_features`,{props:{eventType:`dependency added`}})),i===`deleteDependency`&&await o(e,d,[{action:i,feature:t,payload:void 0}]),s(),c({type:`success`,text:`Change added to draft`})};return async()=>{try{if(f()){let e=n===Z.key?`deleteDependency`:`addDependency`;await h(e),a(`dependent_features`,{props:{eventType:e===`addDependency`?`add dependency added to change request`:`delete dependency added to change request`}})}else n===Z.key?(await m(t),a(`dependent_features`,{props:{eventType:`dependency removed`}}),c({text:`Dependency removed`,type:`success`})):(await p(t,{feature:n,enabled:r.status!==`disabled`,variants:r.status===`enabled_with_variants`?r.variants:[]}),a(`dependent_features`,{props:{eventType:`dependency added`}}),c({text:`Dependency added`,type:`success`}))}catch(e){l(F(e))}u(),i()}},Zi=({project:e,featureId:t,parent:n,onSelect:r})=>{let{parentOptions:i}=Zr(e,t);return(0,X.jsx)(qi,{fullWidth:!0,options:i?[Z,...i.map(e=>({key:e,label:e}))]:[Z],value:n,onChange:r})},Qi=({project:e,featureId:t,parentDependency:n,showDependencyDialogue:r,onClose:i})=>{let[a,o]=(0,Y.useState)(n?.feature||Z.key),s=()=>n?n.variants?.length?{status:`enabled_with_variants`,variants:n.variants}:n.enabled===!1?{status:`disabled`}:{status:`enabled`}:{status:`enabled`},[c,l]=(0,Y.useState)(s),u=()=>{o(n?.feature||Z.key),l(s())};(0,Y.useEffect)(()=>{u()},[JSON.stringify(n)]);let d=Xi(e,t,a,c,i),{isChangeRequestConfiguredInAnyEnv:p}=M(e),m=a!==Z.key,h=a!==Z.key&&c.status===`enabled_with_variants`;return(0,X.jsx)(ht,{open:r,title:`Add parent flag dependency`,onClose:i,onClick:d,primaryButtonText:p()?`Add change to draft`:a===Z.key?`Remove`:`Add`,secondaryButtonText:`Cancel`,children:(0,X.jsxs)(z,{children:[(0,X.jsx)(Ui,{}),(0,X.jsxs)(z,{sx:{mt:2,mb:4},children:[`Your feature will be evaluated only when the selected parent feature is`,` `,(0,X.jsx)(`b`,{children:c.status===`disabled`?`disabled`:`enabled`}),` `,`in the same environment.`]}),(0,X.jsxs)(G,{children:[`What `,(0,X.jsx)(`b`,{children:`feature`}),` do you want to depend on?`]}),(0,X.jsx)(f,{condition:r,show:(0,X.jsx)(Zi,{project:e,featureId:t,parent:a,onSelect:e=>{l({status:`enabled`}),o(e)}})}),(0,X.jsx)(f,{condition:m,show:(0,X.jsxs)(z,{sx:{mt:2},children:[(0,X.jsxs)(G,{children:[`What `,(0,X.jsx)(`b`,{children:`feature status`}),` do you want to depend on?`]}),(0,X.jsx)(Ji,{parentValue:c,onSelect:e=>{(e===`enabled`||e===`disabled`)&&l({status:e}),e===`enabled_with_variants`&&l({status:e,variants:[]})}})]})}),(0,X.jsx)(f,{condition:h,show:c.status===`enabled_with_variants`&&(0,X.jsxs)(z,{sx:{mt:2},children:[(0,X.jsxs)(G,{children:[`What `,(0,X.jsx)(`b`,{children:`variant`}),` do you want to depend on?`]}),(0,X.jsx)(Ki,{parent:a,project:e,selectedValues:c.variants,onSelect:e=>{l({status:`enabled_with_variants`,variants:e})}})]})})]})})},$i=K(Yt)(({theme:e})=>({height:e.spacing(3.5),width:e.spacing(3.5)})),ea=K(se)(({theme:e})=>({borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(1,1.5)})),ta=({capabilityId:e,feature:t,onEdit:n,onDelete:r})=>{let i=`${e}-${t}-actions`,a=`${i}-menu`,[o,s]=(0,Y.useState)(null),c=!!o,l=e=>{s(e.currentTarget)},u=()=>{s(null)};return(0,X.jsxs)(z,{children:[(0,X.jsx)(q,{title:`Dependency actions`,arrow:!0,describeChild:!0,children:(0,X.jsx)($i,{id:i,"aria-controls":c?a:void 0,"aria-haspopup":`true`,"aria-expanded":c?`true`:void 0,onClick:l,type:`button`,children:(0,X.jsx)(pr,{})})}),(0,X.jsx)(ea,{id:a,anchorEl:o,open:c,onClose:u,transformOrigin:{horizontal:`right`,vertical:`top`},anchorOrigin:{horizontal:`right`,vertical:`bottom`},disableScrollLock:!0,children:(0,X.jsxs)(re,{"aria-labelledby":i,children:[(0,X.jsxs)(Nr,{onClick:()=>{n(),u()},children:[(0,X.jsx)(Wn,{children:(0,X.jsx)(le,{})}),(0,X.jsx)($e,{children:(0,X.jsx)(G,{variant:`body2`,children:`Edit`})})]}),(0,X.jsxs)(Nr,{onClick:()=>{r(),u()},children:[(0,X.jsx)(Wn,{children:(0,X.jsx)(ft,{})}),(0,X.jsx)($e,{children:(0,X.jsx)(G,{variant:`body2`,children:`Delete`})})]})]})})]})},na=({childFeatures:e,project:t})=>(0,X.jsx)(xt,{tooltip:(0,X.jsx)(X.Fragment,{children:e.map(e=>(0,X.jsx)(Dt,{to:`/projects/${t}/features/${e}`,children:(0,X.jsx)(`div`,{children:e})},`${t}-${e}`))}),children:e.length===1?`1 feature`:`${e.length} features`}),ra=({variants:e})=>e.length===1&&e[0].length<20?(0,X.jsx)(`span`,{children:e[0]}):(0,X.jsx)(xt,{tooltip:(0,X.jsx)(X.Fragment,{children:e.map((e,t)=>(0,X.jsx)(`div`,{children:e},t))}),children:e.length===1?`1 variant`:`${e.length} variants`}),ia=K(H)(({theme:e})=>({fontSize:e.fontSizes.smallBody,lineHeight:e.typography.body1.lineHeight})),aa=(e,t)=>{let{trackEvent:n}=N(),{addChange:r}=he(),{refetch:i}=vt(e),{setToastData:a,setToastApiError:o}=I(),{refetchFeature:s}=L(e,t),c=we(e)(),{isChangeRequestConfiguredInAnyEnv:l}=M(e),{removeDependencies:u}=Yi(e),d=async()=>{if(!c){console.error(`No change request environment`);return}await r(e,c,[{action:`deleteDependency`,feature:t,payload:void 0}])};return async()=>{try{l()?(await d(),n(`dependent_features`,{props:{eventType:`delete dependency added to change request`}}),a({type:`success`,text:`Change added to draft`}),await i()):(await u(t),n(`dependent_features`,{props:{eventType:`dependency removed`}}),a({text:`Dependency removed`,type:`success`}),await s())}catch(e){o(F(e))}}},oa=({feature:e})=>{let[t,n]=(0,Y.useState)(!1),r=!!e.project&&e.dependencies.length===0&&e.children.length===0,i=!!e.project&&e.dependencies.length>0,a=!!e.project&&e.children.length>0,o=we(e.project)(),s=kr(e.project),c=aa(e.project,e.name);return(0,X.jsxs)(X.Fragment,{children:[r?(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Dependency:`}),(0,X.jsx)(`div`,{children:(0,X.jsx)(ia,{size:`small`,permission:pn,projectId:e.project,variant:`text`,onClick:()=>{n(!0)},children:`Add parent flag`})})]}):null,i?(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Dependency:`}),(0,X.jsxs)(Ba,{children:[(0,X.jsx)(Dt,{to:`/projects/${e.project}/features/${e.dependencies[0]?.feature}`,children:(0,X.jsx)(Ie,{title:e.dependencies[0]?.feature,children:e.dependencies[0]?.feature})}),s(`UPDATE_FEATURE_DEPENDENCY`,o)?(0,X.jsx)(ta,{capabilityId:`dependency`,feature:e.name,onEdit:()=>n(!0),onDelete:c}):null]})]}):null,i&&!e.dependencies[0]?.enabled?(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Dependency value:`}),(0,X.jsx)(`span`,{children:`disabled`})]}):null,i&&e.dependencies[0]?.variants?.length?(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Dependency value:`}),(0,X.jsx)(ra,{variants:e.dependencies[0]?.variants||[]})]}):null,a?(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Children:`}),(0,X.jsx)(na,{childFeatures:e.children,project:e.project})]}):null,e.project?(0,X.jsx)(Qi,{project:e.project,featureId:e.name,parentDependency:e.dependencies[0],onClose:()=>n(!1),showDependencyDialogue:t}):null]})},sa=(e,t={})=>{let{data:n,error:r}=ut(e,!1,Ze(`/api/admin/projects/${e}/dependencies`),ca,t);return{dependenciesExist:n,error:r,loading:!r&&!n}},ca=async e=>await(await fetch(e).then(g(`Dependencies exist check`))).json(),la=e=>{let{dependenciesExist:t}=sa(e),{isOss:n}=W();return!!e&&!!(!n()||t)},ua=(e,t={})=>{let n=async()=>{let t=Ze(`api/admin/features/${e}/tags`);return(await fetch(t,{method:`GET`}).then(g(`Tags`))).json()},r=`api/admin/features/${e}/tags`,{data:i,error:a}=ut(!!e,{tags:[]},r,n,t),[o,s]=(0,Y.useState)(!a&&!i);return(0,Y.useEffect)(()=>{s(!a&&!i)},[i,a]),{tags:i?.tags||[],error:a,loading:o,refetch:()=>{He(r)}}},da=t(je(),1),fa=K(`section`)(({theme:e})=>({"& > *":{margin:e.spacing(1,0)}})),pa=e=>e.map(e=>({title:e.value})),ma=(e,t)=>e.map(e=>({value:e.title,type:t})),ha=({open:e,setOpen:t})=>{let{tagTypes:n}=Pr(),r=P(`featureId`),{createTag:i}=yi(),{updateFeatureTags:a,loading:o}=be(),{tags:s,refetch:c,loading:l}=ua(r),{setToastData:u}=I(),[d,f]=(0,Y.useState)(n&&n.length>0?n[0]:{name:`simple`,description:`Simple tag to get you started`,icon:``}),p=o||l,[m,h]=(0,Y.useState)(0),{trackEvent:g}=N(),[_,v]=(0,Y.useState)(pa(s.filter(e=>e.type===d.name))),{tags:y,refetch:b}=_i(d.name),x=(0,Y.useMemo)(()=>pa(y),[y]);(0,Y.useEffect)(()=>{s&&d&&v(pa(s.filter(e=>e.type===d.name)))},[JSON.stringify(s),d,e]);let S=()=>{t(!1),v([])};function C(e,t){let n=e.filter(e=>e.type===d.name).filter(e=>!t.find(t=>e.value===t.value&&e.type===t.type)),r=t.filter(e=>e.type===d.name).filter(t=>!e.find(e=>t.value===e.value&&t.type===e.type));return h(n.length+r.length),{added:n,removed:r}}let w=e=>e.filter(e=>!e.title.startsWith(`Create`)),T=async(e,t)=>{try{await a(r,{addedTags:e,removedTags:t}),await c()}catch{u({type:`error`,text:`Failed to add tag`})}},E=async e=>{e.preventDefault();let{added:n,removed:r}=C(ma(w(_),d.name),s);m>0&&(await T(n,r),m>1&&g(`suggest_tags`,{props:{eventType:`multiple_tags_added`}}),m>0&&u({type:`success`,text:`Updated tag${n.length>1?`s`:``} to flag`})),h(0),v([]),t(!1)},D=(e,t)=>{t!=null&&typeof t!=`string`&&(e.preventDefault(),f(t),v([]),h(0))},O=(e,t,n)=>{let r=(0,da.default)(t);n===`selectOption`&&t.forEach((e,t)=>{typeof e!=`string`&&e.inputValue&&e.inputValue!==``&&(i({value:e.inputValue,type:d.name}).then(()=>{g(`suggest_tags`,{props:{eventType:`tag_created`}}),b()}),e.title=e.inputValue,e.inputValue=``,r[t]=e)}),C(ma(w(r),d.name),s),v(r)},k=`add-tag-form`;return(0,X.jsx)(ht,{open:e,secondaryButtonText:`Cancel`,primaryButtonText:`Save tags`,title:`Update feature flag tags`,onClick:E,disabledPrimaryButton:p||m===0,onClose:S,formId:k,children:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(G,{paragraph:!0,sx:{marginBottom:e=>e.spacing(2.5)},children:`Tags allow you to group features together`}),(0,X.jsx)(`form`,{id:k,onSubmit:E,children:(0,X.jsxs)(fa,{children:[(0,X.jsx)(oi,{options:n,value:d,onChange:D}),(0,X.jsx)(vi,{options:x,existingTags:s,tagType:d,selectedOptions:_,onChange:O})]})})]})})},ga=K(H)(({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)})),_a=K(Re)(({theme:e})=>({fontSize:e.typography.body2.fontSize})),va=({project:e,onClick:t})=>(0,X.jsx)(ga,{size:`small`,permission:wr,projectId:e,variant:`text`,onClick:t,startIcon:(0,X.jsx)(_a,{}),"data-loading":!0,children:`Add tag`}),ya=K(`span`)(({theme:e})=>({marginTop:e.spacing(1),color:e.palette.text.secondary,marginRight:e.spacing(1)})),ba=K(`div`)(({theme:e})=>({display:`flex`,justifyContent:`space-between`,flexWrap:`wrap`,minHeight:e.spacing(4.5),fontSize:e.fontSizes.smallBody})),xa=K(`div`)(({theme:e})=>({display:`flex`,overflow:`hidden`,gap:e.spacing(1),flexWrap:`wrap`,marginTop:e.spacing(.75)}));K(_n)(({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)})),K(`span`)(({theme:e})=>({color:e.palette.text.secondary}));var Sa=({feature:e})=>{let{tags:t,refetch:n}=ua(e.name),{deleteTagFromFeature:r}=be(),[i,a]=(0,Y.useState)(!1),[o,s]=(0,Y.useState)(!1),[c,l]=(0,Y.useState)(),{setToastData:u,setToastApiError:d}=I(),{hasAccess:f}=(0,Y.useContext)(Dn),p=f(wr,e.project),m=()=>{a(!0)},h=async()=>{if(c)try{await r(e.name,c.type,c.value),n(),u({type:`success`,text:`Tag removed`})}catch(e){d(F(e))}};return(0,X.jsxs)(X.Fragment,{children:[t.length?(0,X.jsxs)(ba,{children:[(0,X.jsx)(ya,{children:`Tags:`}),(0,X.jsxs)(xa,{children:[t.map(e=>(0,X.jsx)(Ca,{tag:e,canUpdateTags:p,onTagRemove:e=>{s(!0),l(e)}},Mn(e))),p?(0,X.jsx)(va,{project:e.project,onClick:m}):null]})]}):(0,X.jsxs)(Q,{children:[(0,X.jsx)(ya,{children:`Tags:`}),(0,X.jsx)(xa,{children:(0,X.jsx)(va,{project:e.project,onClick:m})})]}),(0,X.jsx)(ha,{open:i,setOpen:a}),(0,X.jsxs)(ht,{open:o,primaryButtonText:`Remove tag`,secondaryButtonText:`Cancel`,onClose:()=>{s(!1),l(void 0),n()},onClick:()=>{s(!1),h(),l(void 0)},title:`Remove tag`,children:[`You are about to remove tag:`,` `,(0,X.jsxs)(`strong`,{children:[c?.type,`:`,c?.value]})]})]})},Ca=({tag:e,canUpdateTags:t,onTagRemove:n})=>{let r=Mn(e);return(0,X.jsx)(q,{title:r.length>25?r:``,arrow:!0,children:(0,X.jsx)(`span`,{children:(0,X.jsx)(_e,{tag:e,onDelete:t?()=>n(e):void 0,deleteIcon:(0,X.jsx)(q,{title:`Remove tag`,arrow:!0,children:(0,X.jsx)(Rr,{sx:{height:`20px`,width:`20px`}})})})})},r)},wa=K(ae)(({theme:e})=>({width:e.spacing(2.5),height:e.spacing(2.5)})),Ta=K(ee)({flexWrap:`nowrap`}),Ea=({collaborators:e})=>!e||e.length===0?null:(0,X.jsx)(Ta,{users:e,avatarLimit:9,AvatarComponent:wa}),Da=`environment-visibility-button`,Oa=`environment-visibility-menu`,ka=K(`div`)(({theme:e})=>({display:`flex`,justifyContent:`center`,paddingTop:e.spacing(4)})),Aa=({environments:e,hiddenEnvironments:t,onChange:n})=>{let[r,i]=(0,Y.useState)(null),a=!!r,o=e=>{i(e.currentTarget)},s=()=>{i(null)},c=e.map(e=>e.name),l=new Set(c.filter(e=>!t.includes(e)));return(0,X.jsxs)(ka,{children:[(0,X.jsx)(B,{onClick:o,endIcon:a?(0,X.jsx)(en,{}):(0,X.jsx)(Ir,{}),variant:`outlined`,id:Da,"aria-controls":Oa,"aria-haspopup":`true`,"aria-expanded":a?`true`:void 0,"data-loading":!0,children:`Hide/show environments`}),(0,X.jsx)(qn,{id:Oa,open:!!r,anchorEl:r,onClose:s,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},children:(0,X.jsx)(an,{multiselect:{selectedOptions:l},onChange:e=>{n(e)},options:c.map(e=>({label:e,value:e})),search:{label:`Filter environments`,placeholder:`Filter environments`}})})]})},ja=(e,t)=>{let{makeRequest:n,createRequest:r,errors:i,loading:a}=Ue({propagateErrors:!0}),o=async i=>{let a=r(`/api/admin/projects/${e}/features/${t}/link`,{method:`POST`,body:JSON.stringify(i)});await n(a.caller,a.id)},s=async(i,a)=>{let o=r(`/api/admin/projects/${e}/features/${t}/link/${i}`,{method:`PUT`,body:JSON.stringify(a)});await n(o.caller,o.id)},c=async i=>{let a=r(`/api/admin/projects/${e}/features/${t}/link/${i}`,{method:`DELETE`});await n(a.caller,a.id)},l=[r,n,F,e];return{addLink:(0,Y.useCallback)(o,l),editLink:(0,Y.useCallback)(s,l),deleteLink:(0,Y.useCallback)(c,l),errors:i,loading:a}},Ma=K(Er)(({theme:e})=>({width:`100%`,marginTop:e.spacing(1),marginBottom:e.spacing(1)})),Na=({showDialogue:e,onClose:t,project:n,featureId:r,mode:i,link:a})=>{let[o,s]=(0,Y.useState)(``),[c,l]=(0,Y.useState)(``),[u,d]=(0,Y.useState)(``),{addLink:f,editLink:p,loading:m}=ja(n,r),{refetchFeature:h}=L(n,r),{setToastData:g,setToastApiError:_}=I(),v=i===`edit`,y=v?`Edit link`:`Add link`,b=v?`Link updated`:`Link added`,{trackEvent:x}=N();return(0,Y.useEffect)(()=>{v&&a?(s(a.url||``),l(a.title||``),d(a.id||``)):v||(s(``),l(``),d(``))},[v,a]),(0,X.jsx)(ht,{open:v?a!==null:e,title:y,onClose:t,disabledPrimaryButton:o.trim()===``||m,onClick:async()=>{try{v?(await p(u,{url:o,title:c||null}),x(`feature-links`,{props:{eventType:`edit-link`}})):(await f({url:o,title:c||null}),x(`feature-links`,{props:{eventType:`add-link`}})),g({text:b,type:`success`}),t(),h(),l(``),s(``)}catch(e){_(F(e))}},primaryButtonText:`Save`,secondaryButtonText:`Cancel`,children:(0,X.jsxs)(z,{children:[(0,X.jsx)(Ma,{label:`Link`,placeholder:`https://`,variant:`outlined`,value:o,onChange:e=>s(e.target.value)}),(0,X.jsx)(Ma,{label:`Title (optional)`,variant:`outlined`,value:c,onChange:e=>l(e.target.value)})]})})},Pa=e=>(0,X.jsx)(Na,{...e,mode:`add`,link:null}),Fa=e=>(0,X.jsx)(Na,{...e,mode:`edit`,showDialogue:e.link!==null}),Ia=K(`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)})),La=K(`h2`)(({theme:e})=>({fontSize:e.typography.body1.fontSize,fontWeight:e.typography.fontWeightBold,marginBottom:e.spacing(.5)})),Ra=K(`div`)({display:`flex`,flexDirection:`column`}),Q=K(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,justifyContent:`space-between`,minHeight:e.spacing(4.5),fontSize:e.fontSizes.smallBody})),$=K(`span`)(({theme:e})=>({color:e.palette.text.secondary,marginRight:e.spacing(1)})),za=K(`span`)({overflowWrap:`anywhere`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}),Ba=K(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,gap:e.spacing(1),flex:1,minWidth:0,justifyContent:`flex-end`})),Va=K(Wn)(({theme:e})=>({minWidth:e.spacing(5)})),Ha=({links:e,project:t,feature:n})=>{let[r,i]=(0,Y.useState)(!1),[a,o]=(0,Y.useState)(null),{deleteLink:s}=ja(t,n),{setToastData:c,setToastApiError:l}=I(),{refetchFeature:u}=L(t,n),d=(0,X.jsx)(H,{size:`small`,startIcon:(0,X.jsx)(Re,{}),permission:wr,disabled:e.length>=10,projectId:t,variant:`text`,onClick:()=>i(!0),children:`Add link`}),f=()=>(0,X.jsx)(Ge,{children:e.map(e=>(0,X.jsx)(b,{secondaryAction:(0,X.jsx)(ta,{capabilityId:`link`,feature:n,onEdit:()=>{o(e)},onDelete:async()=>{try{await s(e.id),c({text:`Link removed`,type:`success`}),u()}catch(e){l(F(e))}}}),disablePadding:!0,dense:!0,children:(0,X.jsxs)(Bn,{component:`a`,href:e.url,target:`_blank`,rel:`noopener noreferrer`,disableGutters:!0,children:[(0,X.jsx)(Va,{children:(0,X.jsx)(Un,{color:`primary`})}),(0,X.jsx)($e,{primary:e.title,secondary:e.url,secondaryTypographyProps:{sx:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,display:`block`}}})]})},e.id))}),p=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(La,{children:`Add links`}),(0,X.jsx)(Q,{children:`Gather relevant links for external resources such as issue trackers, code repositories or analytics tooling`}),(0,X.jsx)(`div`,{children:d})]}),m=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(La,{children:`Resources`}),f(),(0,X.jsx)(`div`,{children:d})]});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ia,{children:e.length===0?p:m}),(0,X.jsx)(Pa,{project:t,featureId:n,showDialogue:r,onClose:()=>i(!1)}),(0,X.jsx)(Fa,{project:t,featureId:n,link:a,onClose:()=>o(null)})]})},Ua=({hiddenEnvironments:e,onEnvironmentVisibilityChange:t,feature:n,onChange:r})=>{let{locationSettings:i}=Lt(),a=er(),[o,s]=(0,Y.useState)(!1),[c,l]=(0,Y.useState)(!1),{project:u,description:d,type:f}=n,p=la(u);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ha,{links:n.links||[],project:n.project,feature:n.name}),(0,X.jsxs)(Ia,{children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(La,{children:`Flag details`}),d?(0,X.jsx)(Q,{"data-loading":!0,children:(0,X.jsx)(za,{children:(0,X.jsx)(Ie,{arrow:!0,lines:5,title:d,children:d})})}):null]}),(0,X.jsxs)(Ra,{children:[(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Flag type:`}),(0,X.jsxs)(za,{"data-loading":!0,children:[Zt(f||` `),` flag`]})]}),n.lifecycle?(0,X.jsxs)(Q,{"data-loading":!0,children:[(0,X.jsx)($,{children:`Lifecycle:`}),(0,X.jsx)(dn,{feature:n,onArchive:()=>s(!0),onComplete:()=>l(!0),onUncomplete:r})]}):null,(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Created:`}),(0,X.jsx)(za,{"data-loading":!0,children:Qt(tt(n.createdAt),i.locale)})]}),n.createdBy?(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Created by:`}),(0,X.jsx)(Ba,{children:(0,X.jsx)(q,{title:n.createdBy?.name||``,children:(0,X.jsx)(za,{"data-loading":!0,children:n.createdBy?.name})})})]}):null,n.collaborators?.users&&n.collaborators?.users.length>0?(0,X.jsxs)(Q,{children:[(0,X.jsx)($,{children:`Collaborators:`}),(0,X.jsx)(Ba,{children:(0,X.jsx)(Ea,{collaborators:n.collaborators?.users})})]}):null,p?(0,X.jsx)(oa,{feature:n}):null,(0,X.jsx)(Sa,{feature:n}),t?(0,X.jsx)(Aa,{environments:n.environments||[],hiddenEnvironments:e||[],onChange:t}):null]})]}),n.children.length>0?(0,X.jsx)(ei,{features:n.children,project:n.project,isOpen:o,onClose:()=>s(!1)}):(0,X.jsx)(Xr,{isOpen:o,onConfirm:()=>{a(`/projects/${n.project}`)},onClose:()=>s(!1),projectId:n.project,featureIds:[n.name]}),n.project?(0,X.jsx)($r,{isOpen:c,setIsOpen:l,projectId:n.project,featureId:n.name,onComplete:r}):null]})},Wa=e=>{let{uiConfig:t}=W(),n=t.resourceLimits?.featureEnvironmentStrategies||100;return{limit:n,limitReached:e>=n}},Ga=()=>{let e=P(`projectId`),t=P(`featureId`),n=m(`environmentId`),r=m(`strategyName`),{strategy:i,defaultStrategyFallback:a}=ii(e,n),o=JSON.parse(Ce().get(`defaultStrategy`)||`false`),[s,c]=(0,Y.useState)({name:r}),{strategyDefinition:l}=It(r),u=Kt(),{addStrategyToFeature:d,loading:f}=rt(),{addChange:p}=he(),{setToastData:h,setToastApiError:g}=I(),{uiConfig:_}=W(),{unleashUrl:v}=_,y=er(),{feature:b,refetchFeature:x}=L(e,t),S=(b?.environments.find(e=>e.name===n))?.strategies.length||0,{limit:C,limitReached:w}=Wa(S),T=(0,Y.useRef)(b),{isChangeRequestConfigured:E}=M(e),{refetch:D}=vt(e),{trackEvent:O}=N(),{data:k,staleDataNotification:A,forceRefreshCache:j}=Me({unleashGetter:L,params:[e,t],dataKey:`feature`,refetchFunctionKey:`refetchFeature`,options:{}},b,{afterSubmitAction:x},dr);(0,Y.useEffect)(()=>{T.current.name===``&&b.name&&(j(b),T.current=b)},[b.name]),(0,Y.useEffect)(()=>{if(o){let e=i||a;e.parameters?.groupId===``&&t?c({...e,parameters:{...e.parameters,groupId:t}}):c(e)}else l&&c(sn(t,l,a.parameters?.stickiness))},[t,JSON.stringify(l),JSON.stringify(i),o]);let ee=async r=>{await d(e,t,n,r),h({text:`Strategy created`,type:`success`})},te=async r=>{await p(e,n,{action:`addStrategy`,feature:t,payload:r}),h({text:`Strategy added to draft`,type:`success`}),D()},ne=hr(s);return!k||!k.project?null:(0,X.jsxs)(lr,{modal:!0,description:rr,documentationLink:Nn,documentationLinkLabel:Xt,disablePadding:!0,formatApiCode:()=>qa(e,t,n,ne,v),children:[(0,X.jsx)(fn,{feature:k,strategy:s,setStrategy:c,environmentId:n,onSubmit:async()=>{O(`strategyTitle`,{props:{hasTitle:!!s.title,on:`create`}});try{E(n)?await te(ne):await ee(ne),x(),y(_r(e,t))}catch(e){g(F(e))}},loading:f,permission:Gt,errors:u,changeRequestsEnabled:E(n),canRenamePreexistingVariants:!0,Limit:(0,X.jsx)(Tn,{name:`strategies in this environment`,shortName:`strategies`,currentValue:S,limit:C}),disabled:w}),A]})},Ka=(e,t,n,r,i=!1)=>`/projects/${e}/features/${t}/strategies/create?${new URLSearchParams({environmentId:n,strategyName:r,defaultStrategy:String(i)})}`,qa=(e,t,n,r,i)=>i?`curl --location --request POST '${`${i}/api/admin/projects/${e}/features/${t}/environments/${n}/strategies`}' \\
--header 'Authorization: INSERT_API_KEY' \\
--header 'Content-Type: application/json' \\
--data-raw '${JSON.stringify(r,Cr,2)}'`:``,Ja=3,Ya=e=>Array.isArray(e)?e.filter(e=>e.featureId&&e.projectId):[],Xa=e=>Ya(vr(e)||[]),Za=()=>{let e=`${te}:unleash-lastViewedFlags`,[t,n]=(0,Y.useState)(()=>Xa(e)),{emitEvent:r}=Ht(`lastViewedFlagsUpdated`,(0,Y.useCallback)(()=>{n(Xa(e))},[e]));return(0,Y.useEffect)(()=>{t&&(cn(e,t),r())},[JSON.stringify(t),e,r]),{lastViewed:t,setLastViewed:(0,Y.useCallback)(e=>{if(!e.featureId||!e.projectId||t.find(t=>t.featureId===e.featureId))return;let r=Ya([...t,e]);n(r.length>Ja?r.slice(-Ja):r)},[JSON.stringify(t)])}},Qa=K(z)(({theme:e})=>({width:e.breakpoints.values.md,height:`100%`,overflowY:`auto`,display:`flex`,flexDirection:`column`})),$a=K(z)(({theme:e})=>({padding:e.spacing(0,3,3,3)})),eo=K(Xe)(({theme:e})=>({marginRight:e.spacing(1)})),to=K(Nt)(({theme:e})=>({padding:e.spacing(2,4,4)})),no=({template:e,projectId:t,featureName:n,environment:r,activeReleasePlan:i,crProtected:a,onConfirm:o,onBack:s})=>{let{feature:c}=L(t,n),l=c?.environments.find(({name:e})=>e===r)?.enabled,u=Rt(e.id,n,r);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)($a,{children:(0,X.jsxs)(B,{variant:`text`,onClick:s,children:[(0,X.jsx)(eo,{}),`Go back`]})}),(0,X.jsxs)(Qa,{children:[i&&(0,X.jsx)(z,{sx:{px:4,pb:2},children:(0,X.jsxs)(U,{severity:`warning`,children:[`This feature environment currently has`,` `,(0,X.jsx)(`strong`,{children:i.name}),` (`,(0,X.jsx)(`strong`,{children:i.milestones.find(({id:e})=>i.activeMilestoneId===e)?.name??i.milestones[0].name}),`)`,l?` running`:` paused`,`. Adding a new release plan will replace the existing release plan.`]})}),(0,X.jsx)(z,{sx:{px:2},children:(0,X.jsx)(x,{plan:u,readonly:!0})}),a&&(0,X.jsx)(z,{sx:{px:4,pt:1},children:(0,X.jsxs)(G,{children:[(0,X.jsx)(`strong`,{children:`Adding`}),` release template`,` `,(0,X.jsx)(`strong`,{children:e?.name}),` to`,` `,(0,X.jsx)(`strong`,{children:n}),` in`,` `,(0,X.jsx)(`strong`,{children:r}),`.`]})})]}),(0,X.jsx)(to,{children:(0,X.jsx)(B,{variant:`contained`,color:`primary`,onClick:o,children:a?`Add suggestion to draft`:`Apply template`})})]})},ro=K(`div`)(({theme:e})=>({display:`flex`,alignItems:`center`,"& > svg":{width:e.spacing(6),height:e.spacing(6),fill:e.palette.primary.main}})),io=K(Ie)(({theme:e})=>({fontWeight:e.typography.fontWeightBold})),ao=K(`div`,{shouldForwardProp:e=>e!==`isDefault`})(({theme:e,isDefault:t})=>({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},...t&&{backgroundColor:e.palette.secondary.light,borderColor:e.palette.secondary.border},userSelect:`none`})),oo=K(`div`)(({theme:e})=>({display:`flex`,transition:`opacity 0.2s ease-in-out`,gap:e.spacing(2)})),so=K(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,justifyContent:`center`,gap:e.spacing(.5)})),co=K(`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`})),lo=({name:e,description:t,icon:n,isDefault:r,children:i})=>(0,X.jsxs)(ao,{isDefault:r,children:[(0,X.jsxs)(oo,{className:`cardContent`,children:[(0,X.jsx)(ro,{children:n}),(0,X.jsxs)(so,{children:[(0,X.jsx)(io,{lines:1,title:e,arrow:!0,children:e}),t&&(0,X.jsx)(Ie,{lines:2,title:t,arrow:!0,children:t})]})]}),(0,X.jsx)(co,{className:`cardActions`,children:i})]}),uo=K(z)(({theme:e})=>({display:`flex`,alignItems:`center`,gap:e.spacing(.5),marginBottom:e.spacing(.5),width:`100%`,fontSize:e.typography.body2.fontSize})),fo=K(z)(({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%`})),po=K(B)(({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)})),mo=({title:e,limit:t,viewMore:n,viewMoreLabel:r=`View more strategies`,children:i})=>{let a=Array.isArray(i)?i:[i],o=t?a.slice(0,t):a;return(0,X.jsxs)(z,{children:[e&&(0,X.jsx)(uo,{children:e}),(0,X.jsxs)(fo,{children:[o,n&&o.length<a.length&&(0,X.jsx)(po,{variant:`text`,size:`small`,onClick:n,children:r})]})]})},ho=K(`div`)(({theme:e})=>({background:e.palette.background.paper})),go=e=>(0,X.jsx)(ho,{children:(0,X.jsx)(B,{variant:`outlined`,size:`small`,...e})}),_o=e=>(0,X.jsxs)(`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,children:[(0,X.jsx)(`path`,{d:`M50.6455 0H0V12.3545H50.6455V0Z`,fill:`#BEBBF3`}),(0,X.jsxs)(`g`,{opacity:.8,children:[(0,X.jsx)(`mask`,{id:`mask0_34708_31106`,style:{maskType:`luminance`},maskUnits:`userSpaceOnUse`,x:0,y:0,width:25,height:13,children:(0,X.jsx)(`path`,{d:`M24.2564 0V12.4173L0 12.2891V0H24.2564Z`,fill:`white`})}),(0,X.jsx)(`g`,{mask:`url(#mask0_34708_31106)`,children:(0,X.jsx)(`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)`})})]}),(0,X.jsxs)(`defs`,{children:[(0,X.jsx)(`pattern`,{id:`pattern0_34708_31106`,patternContentUnits:`objectBoundingBox`,width:1,height:1,children:(0,X.jsx)(`use`,{xlinkHref:`#image0_34708_31106`,transform:`scale(0.00145773 0.00105374)`})}),(0,X.jsx)(`image`,{id:`image0_34708_31106`,width:686,height:949,preserveAspectRatio:`none`,xlinkHref:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAq4AAAO1CAYAAACvmWfqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3FpVFh0WE1MOmN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