PageSourceSearch

https://www.maestro.io/static/js/chunks/2338.14affd2.js

js maestro.io collected 2026-10-02 04:12:53 UTC 44,097 bytes, 556 lines download raw bytes

1(function(){try{var J=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new J.Error().stack;U&&(J._sentryDebugIds=J._sentryDebugIds||{},J._sentryDebugIds[U]="760f98a2-ed79-435a-bfb2-890622c12f39",J._sentryDebugIdIdentifier="sentry-dbid-760f98a2-ed79-435a-bfb2-890622c12f39")}catch{}})();var _global=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};_global.SENTRY_RELEASE={id:"d0b2a86c2e49a10a9d9513a5bf665a7912e86753"},(self.webpackChunk_maestro_io_client=self.webpackChunk_maestro_io_client||[]).push([[2338],{708384:(J,U,a)=>{a.d(U,{_x:()=>Q,cc:()=>H});var e=a(886550),d=a(429195),E=a(935370),P=a(152544);const $=(0,e.Ay)(E.VJ)`
2  margin-top: 15px;
3  margin-bottom: 30px;
4  ${P.Ns}
5`,H=e.Ay.div`
6  display: flex;
7  flex-direction: column;
8  gap: 8px;
9`,B=e.Ay.label`
10  ${P.xu};
11  color: ${d.o0B};
12`,Q=e.Ay.label`
13  ${P.xu};
14  color: ${d.o0B};
15  margin-bottom: 15px;
16`},759386:(J,U,a)=>{a.d(U,{Oh:()=>G,pc:()=>D});var e=a(124659),d=a(990220),E=a(463302),P=a(224191),$=a.n(P),H=a(63696),B=a(438749),Q=Object.defineProperty,ne=Object.defineProperties,Z=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,j=(R,M,N)=>M in R?Q(R,M,{enumerable:!0,configurable:!0,writable:!0,value:N}):R[M]=N,b=(R,M)=>{for(var N in M||(M={}))se.call(M,N)&&j(R,N,M[N]);if(s)for(var N of s(M))W.call(M,N)&&j(R,N,M[N]);return R},k=(R,M)=>ne(R,Z(M));const V=8,r=4,D=({page:R,paginationEnabled:M=!0,refreshKey:N=null})=>{var q;const[le,ae]=(0,H.useState)(0),L=(0,P.useSelector)(E.mC),_=(0,H.useMemo)(()=>R*r,[R]),{data:g,error:w,loaded:me}=(0,e.A)(k(b({headers:{authorization:`Bearer ${L}
16`,"x-maestro-client-id":d.Cn},method:"GET",params:b({},M&&{limit:r,offset:_})},N!=null&&{refreshKey:N}),{url:`${d.xV}/custom`}));return(0,H.useEffect)(()=>{!w&&me&&g&&le!==g.totalCount&&ae(g.totalCount)},[g,w,me]),{data:(q=g?.themes)!=null?q:[],error:w,loaded:me,totalCount:le}},ce=({page:R,paginationEnabled:M=!0})=>{var N;const[q,le]=useState(0),ae=useSelector(getPrimaryToken),L=useMemo(()=>R*V,[R]),{data:_,error:g,loaded:w}=useAjax({headers:{authorization:`Bearer ${ae}`,"x-maestro-client-id":SITE_ID},method:"GET",params:b({},M&&{limit:V,offset:L}),url:`${THEMES_SERVICE_SERVICE_BASE_URL}/default`});return useEffect(()=>{!g&&w&&_&&q!==_.totalCount&&le(_.totalCount)},[_,g,w]),{data:(N=_?.themes)!=null?N:[],error:g,loaded:w,totalCount:q}},G=()=>({data:B.UE,error:null,loaded:!0,totalCount:B.UE.length})},829335:(J,U,a)=>{a.d(U,{A:()=>W});var e=a(63696),d=a(33149),E=a(283722),P=a(224348),$=a(825711),H=Object.defineProperty,B=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,Z=(j,b,k)=>b in j?H(j,b,{enumerable:!0,configurable:!0,writable:!0,value:k}):j[b]=k,s=(j,b)=>{for(var k in b||(b={}))Q.call(b,k)&&Z(j,k,b[k]);if(B)for(var k of B(b))ne.call(b,k)&&Z(j,k,b[k]);return j};const W=({cardBackground:j,className:b,isLoading:k=!1,isPending:V=!1,isSelected:r,menuActions:D,onSelect:ce,theme:G,unSelectedCircleBorderColor:R,unSelectedCircleColor:M})=>{const N=(0,e.useCallback)(L=>{L.stopPropagation(),ce(G)},[ce,G]),q=(0,e.useCallback)(L=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),N(L))},[N]),le=(0,e.useCallback)(L=>{L.stopPropagation()},[]),ae=(0,e.useCallback)(L=>_=>{_.stopPropagation(),L.handler(_)},[]);return e.createElement("div",{className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-[5px] gap-4 cursor-pointer","py-2.5 pl-3.5 pr-2",b),role:"button",tabIndex:0,style:{backgroundColor:j||G.colors.surface2},onClick:N,onKeyDown:q},e.createElement("div",{className:"flex items-center gap-[15px] min-w-0"},e.createElement("div",{className:"h-[18px] w-[18px] shrink-0 rounded-full flex items-center justify-center",style:s({backgroundColor:r||V?"var(--admin-accent-primary)":M||"var(--admin-surface-1)"},!(r||V)&&R&&{border:`1px solid ${R}`})},V&&e.createElement($.DxU,{className:"h-3 w-3 text-white",strokeWidth:2.5}),r&&!V&&e.createElement($.Jlk,{className:"h-3 w-3 text-white",strokeWidth:3})),e.createElement("span",{className:"text-xs font-medium max-w-[150px] truncate",style:{color:G.colors.text200}},G.name)),e.createElement("div",{className:"flex items-center gap-[15px]"},e.createElement("div",{className:"flex items-center gap-1","aria-hidden":"true"},e.createElement("div",{className:"h-[18px] w-[18px] rounded-full",style:{backgroundColor:G.colors.surface5}}),e.createElement("div",{className:"h-[18px] w-[18px] rounded-full",style:{backgroundColor:G.colors.highlightPrimary}}),e.createElement("div",{className:"h-[18px] w-[18px] rounded-full",style:{backgroundColor:G.colors.accentPrimary}})),!k&&D.length>0&&e.createElement(P.rI,null,e.createElement(P.ty,{asChild:!0,onClick:le},e.createElement("button",{className:"flex items-center justify-center outline-none","aria-label":"Theme options"},e.createElement($.GvN,{className:"h-4 w-4",style:{color:G.colors.highlightSecondary}}))),e.createElement(P.SQ,{side:"right",align:"start",alignOffset:-12,sideOffset:14},D.map(L=>e.createElement(P._2,{key:L.id,"data-testid":L.dataTestId,className:"cursor-pointer",onClick:ae(L)},e.createElement(E.Ay,{name:L.icon,color:"var(--admin-highlight-primary)",className:"!inline-flex h-6 w-6 items-center justify-center [&>svg]:!h-4 [&>svg]:!w-4"}),e.createElement("span",null,L.name)))))))}},132338:(J,U,a)=>{a.r(U),a.d(U,{default:()=>bl});var e=a(63696),d=a(224191),E=a(700412),P=a(464557),$=a(41989),H=a(579226),B=a(903583),Q=a.n(B),ne=a(732091),Z=a.n(ne),s=a(886550),se=a(333253),W=a(86138),j=a(619545),b=a(283722),k=a(312854),V=a(545290),r=a(429195),D=a(152544);const ce=(0,s.Ay)(j.A).attrs({plain:!0})`
17  && {
18    ${V.vE}
19    ${D.Ns}
20    height: 100%;
21    display: flex;
22    justify-content: center;
23    align-items: center;
24    position: relative;
25    text-align: center;
26    text-transform: capitalize;
27    color: ${r.zkP};
28    & svg > path {
29      fill: ${r.sRE}
30    }
31    &:hover svg > path  {
32      fill: ${r.S1G};
33    }
34    &.active {
35      border-bottom: 2px solid ${r.Qod};
36      background: linear-gradient(0deg, ${r.Qod} -66%, ${t=>(0,k.B3)((0,r.Qod)(t),0)} 67.9%);
37      color: ${r.o0B};
38      & svg > path {
39        fill: ${r.o0B};
40      }
41    }
42  }
43`,G=s.Ay.div`
44  position: absolute;
45  width: 0;
46  height: 0;
47  border-color: transparent;
48  border-bottom-color: ${r.Qod};
49  border-width: 0 6.5px 7px 6.5px;
50  border-style: solid;
51  bottom: 0;
52  pointer-events: none;
53`,R=(0,s.Ay)(b.Ay)`
54  margin-right: 10px;
55  & svg {
56    width: 18px;
57    height: 18px;
58    & > path {
59      fill: ${r.$6D};
60    }
61  }
62`;var M=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,le=(t,n)=>{var l={};for(var o in t)N.call(t,o)&&n.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&M)for(var o of M(t))n.indexOf(o)<0&&q.call(t,o)&&(l[o]=t[o]);return l};function ae(t){var n=t,{active:l,className:o,iconName:i,id:m,onTabClick:p,stringKey:A,variant:h="tail"}=n,T=le(n,["active","className","iconName","id","onTabClick","stringKey","variant"]);const u=(0,e.useMemo)(()=>p&&(()=>{p(m)}),[p]),v=(0,e.useMemo)(()=>h==="tail",[h]);return e.createElement(ce,{key:A,className:`${h} ${o} ${l?"active":""}`,"data-testid":T["data-testid"],onClick:u},i&&e.createElement(R,{name:i}),e.createElement(W.A,{stringKey:A}),l&&v&&e.createElement(G,null))}var L=a(79321);const _=s.Ay.div`
63  flex: 1;
64  display: flex;
65  flex-flow: column nowrap;
66`,g=(0,s.Ay)(se.iK)`
67  padding: 0;
68  background: ${r.YJk};
69`,w=(0,s.Ay)(ae)`
70  ${V.vE}
71  flex: 1 1 0;
72`,me=(0,s.Ay)(ae)`
73  ${D.p6}
74  text-transform: uppercase;
75  flex: 1 1 0;
76`,At=s.Ay.div`
77  ${V.EC}
78  flex: 1;
79  overflow: inherit;
80`,gt=s.Ay.div``,_t=s.Ay.div`
81  padding: 0 22px 20px 22px;
82  ${({center:t})=>!t&&`
83    display: fleX;
84    align-items: center;
85    & div {
86      flex: 1;
87    }
88  `}
89`,ht=s.Ay.div`
90  ${D.Ns};
91  color: ${r.zkP};
92  display: flex;
93  align-items: center;
94  margin-top: 20px;
95`,It=(0,s.Ay)(L.A)`
96  margin-top: 20px;
97`;var $e=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,xt=(t,n)=>{var l={};for(var o in t)Pt.call(t,o)&&n.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&$e)for(var o of $e(t))n.indexOf(o)<0&&Tt.call(t,o)&&(l[o]=t[o]);return l};function Ot(t){var n=t,{active:l=!1,children:o,className:i,headerHelperKey:m,onSearch:p,searchPlaceholderKey:A}=n,h=xt(n,["active","children","className","headerHelperKey","onSearch","searchPlaceholderKey"]);return e.createElement(gt,{className:i,"data-testid":h["data-testid"],hidden:!l},A&&e.createElement(_t,{center:!!m},m&&e.createElement(W.A,{component:ht,stringKey:m}),e.createElement(It,{onSearch:p,searchPlaceholderKey:A})),o)}var bt=Object.defineProperty,Ke=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,we=(t,n,l)=>n in t?bt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Mt=(t,n)=>{for(var l in n||(n={}))Ct.call(n,l)&&we(t,l,n[l]);if(Ke)for(var l of Ke(n))Dt.call(n,l)&&we(t,l,n[l]);return t};function Nt({activeIndex:t=null,bigTabs:n,children:l,className:o,initialActiveIndex:i=0,onTabChange:m,variant:p}){const[A,h]=(0,e.useState)(typeof t=="number"?t:i),T=c=>{m?.(c),h(c)},u=(0,e.useMemo)(()=>n?me:w,[n]),v=(0,e.useMemo)(()=>Q()(t)?A:t,[t,A]),O=(0,e.useMemo)(()=>{const c=[];return e.Children.forEach(l,I=>{(!I||typeof I=="string"||typeof I=="number")&&Z()(!1,"Expecting TabbedView children to be of type Tab"),c.push(I)}),c},[l]);return e.createElement(_,{className:o},e.createElement(g,null,O.map((c,I)=>{const K=c.props.id||I;return e.createElement(u,Mt({key:c.props.titleKey,active:K===v,iconName:c.props.iconName,id:K,onTabClick:T,stringKey:c.props.titleKey,variant:p},c.props))})),e.createElement(At,null,O.map((c,I)=>{const K=c.props.id||I;return e.createElement(e.Fragment,{key:c.props.titleKey},e.cloneElement(c,{active:K===v}))})))}var Ue=a(942695);const He=s.Ay.div`
98  background-color: ${r.k6P};
99  /* Flex column so the OverlayScrollbar child's flex-1/min-h-0 sizing actually
100     binds and tall tab content (e.g. the Connections form) scrolls INSIDE this
101     container. Without it the child sat in normal flow, content spilled past the
102     fixed height, and the admin shell's surface-4 bled through the padding
103     gutters below the container's painted background (NS-11629). */
104  display: flex;
105  flex-direction: column;
106  height: calc(100vh - 55px);
107  padding: 32px;
108  z-index: 1;
109
110  .automation-tabbed-view {
111    > div {
112      background: ${r.k6P};
113      border-top: none;
114
115      > a {
116        color: ${r.sRE};
117
118        > div {
119          display: none;
120        }
121
122        &.active {
123          background: none;
124        }
125      }
126    }
127  }
128`,Lt=s.Ay.div`
129  margin-bottom: 25px;
130
131  .data {
132    display: flex;
133    flex-direction: row;
134    align-items: center;
135    gap: 16px;
136  }
137
138  .title {
139    ${D.p6};
140  }
141
142  .description {
143    ${D.z6};
144    color: ${r.sRE};
145  }
146`,St=(0,Ue.A)(s.Ay.div`
147    ${D.z6};
148    color: ${r.o0B};
149  `,{admin:!0}
149),ke=(0,s.Ay)(b.Ay).attrs({name:"template"})`
150  background-color: ${({hasBg:t})=>t?r.dsC:"transparent"};
151  border-radius: 4px;
152  display: flex;
153  height: fit-content;
154  padding: ${({hasBg:t})=>t?"10px":0};
155  width: fit-content;
156
157  & svg {
158    width: 18px;
159    height: 18px;
160  }
161`,ue=s.Ay.div`
162  padding-top: 30px;
163`,Bt=s.Ay.div`
164  ${D.Ns};
165  align-items: center;
166  color: ${r.sRE};
167  display: flex;
168  flex-direction: column;
169  height: 100vh;
170  justify-content: center;
171
172  p {
173    margin: 0;
174  }
175`;var Rt=a(63382),$t=a(167020),Kt=a(592082),pe=a(154789);const wt=s.Ay.div`
176  display: flex;
177  flex-direction: row;
178  gap: 4px;
179
180  .input-container {
181    display: flex;
182    flex-direction: column;
183    gap: 4px;
184    width: 100%;
185
186    > div {
187      background-color: ${r.dsC};
188    }
189
190    > div:first-child {
191      padding: 9px 12px 9px 16px;
192
193      div {
194        color: ${r.sRE};
195      }
196    }
197  }
198`,be=s.Ay.div`
199  display: flex;
200  flex-direction: column;
201  gap: 30px;
202`,We=s.Ay.div`
203  display: flex;
204  flex-direction: column;
205  gap: 20px;
206  width: 100%;
207`,je=s.Ay.div`
208  display: flex;
209  flex-direction: column;
210  gap: 10px;
211`,Ve=s.Ay.span`
212  ${D.z6}
213  color: ${r._e_};
214`,Ce=s.Ay.span`
215  ${D.z6}
216  color: ${r.sRE};
217`,Hl=(0,s.Ay)(pe.Ay)`
218  ${D.Z1}
219  border-radius: 100px;
220  border: none;
221  height: 24px;
222  padding: 20px;
223  position: static;
224
225  &:disabled {
226    background: ${r.x2O} !important;
227    color: ${r._e_} !important;
228    opacity: 0.5;
229
230    & svg {
231      & path {
232        fill: ${r._e_} !important;
233      }
234    }
235  }
236`;var Ut=a(357396);const Ht=s.Ay.div`
237  display: flex;
238  flex-direction: column;
239  gap: 20px;
240  width: 100%;
241`,kt=s.Ay.div`
242  display: flex;
243  flex-direction: column;
244  align-items: flex-start;
245  justify-content: center;
246  gap: 10px;
247`,Wt=s.Ay.span`
248  ${D.z6}
249  color: ${r._e_};
250`,jt=s.Ay.div`
251  display: flex;
252  flex-direction: row;
253  width: 100%;
254  justify-content: flex-start;
255  align-items: center;
256  gap: 16px;
257`,Vt=s.Ay.span`
258  ${D.z6}
259  color: ${r.sRE};
260`,Ft=(0,s.Ay)(pe.Ay)`
261  margin-left: 10px;
262  display: flex;
263  height: 24px;
264  padding: 3px 12px 4px 8px;
265  justify-content: center;
266  align-items: center;
267  gap: 2px;
268
269  border-radius: 100px;
270  background: ${r.dHK};
271  color: ${r.Qod} !important;
272  ${D.Vg}
273
274  &:hover {
275    background: ${r.kjY};
276
277    & svg > path {
278      fill: ${r.Qod};
279    }
280  }
281`,zt=(0,s.Ay)(b.Ay)`
282  display: flex;
283  width: 16px;
284  height: 16px;
285
286  & svg > path {
287    fill: ${r.Qod};
288  }
289`;var Fe=a(717846),Gt=a(221196),oe=a.n(Gt),Yt=a(613568),Xt=a(412556),Jt=a(18631),ze=a(523868),Qt=Object.defineProperty,Zt=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,Ye=(t,n,l)=>n in t?Qt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Ee=(t,n)=>{for(var l in n||(n={}))en.call(n,l)&&Ye(t,l,n[l]);if(Ge)for(var l of Ge(n))tn.call(n,l)&&Ye(t,l,n[l]);return t},fe=(t,n)=>Zt(t,qt(n));const nn=s.Ay.div`
290  display: flex;
291  gap: 10px;
292  max-width: 700px;
293  min-width: 700px;
294`,ln=(0,s.Ay)(Jt.A)`
295  height: auto;
296`,an=s.Ay.div`
297  position: relative;
298  min-width: 420px;
299  max-width: 420px;
300`,on=s.Ay.div`
301  position: relative;
302  min-width: 200px;
303  max-width: 200px;
304`,Xe=(0,s.Ay)(Xt.Ay).attrs(t=>({styles:{control:(n,l)=>fe(Ee({},n),{background:"transparent",borderColor:l.selectProps.hasError?(0,r.__g)(t):(0,r.dmy)(t),height:"56px","&:hover":{borderColor:l.selectProps.hasError?(0,r.__g)(t):(0,r.dmy)(t)},"&:focus-within":{borderColor:l.selectProps.hasError?(0,r.__g)(t):(0,r.Qod)(t),boxShadow:"none"}}),clearIndicator:()=>({}),indicatorSeparator:()=>({}),valueContainer:n=>fe(Ee({},n),{paddingLeft:"16px"}),menu:n=>fe(Ee({},n),{background:(0,r.dHK)(t),margin:"0",zIndex:"2",minWidth:"100%",width:"max-content",maxWidth:"none",overflowX:"visible"}),option:n=>fe(Ee({},n),{padding:"0",margin:"0",width:"100%",whiteSpace:"normal",wordBreak:"break-word"}),input:n=>fe(Ee({},n),{color:(0,r.o0B)(t)})},maxMenuHeight:190,controlShouldRenderValue:!0,isMulti:!1,isSearchable:!0,createOptionPosition:"first"}))`
305  ${({isDisabled:t})=>t&&(0,s.AH)`opacity: 0.5;`};
306  width: 100%;
307  scrollbar-color: ${r.Qod} transparent;
308
309  & ::-webkit-scrollbar-thumb {
310    background: ${r.Qod} !important;
311  }
312`,rn=(0,s.Ay)(b.Ay).attrs(t=>({name:"removeIconOutline",color:(0,r.IO)(t)}))`
313  margin: auto;
314  cursor: pointer;
315`,sn=(0,Ue.A)(rn,{admin:!0,tooltipWrapperCss:(0,s.AH)`margin-top: 15px;`,tooltipCss:(0,s.AH)`margin-top: 0;`,tooltipArrowCss:(0,s.AH)`bottom: -8px; top: auto;`}),Ie=s.Ay.div`
316  ${D.EE}
317  color: ${r.zkP};
318`,Je=s.Ay.button`
319  width: 100%;
320  display: flex;
321  height: 48px;
322  padding-left: 10px;
323  align-items: center;
324  gap: 8px;
325  background: ${r.dsC};
326  cursor: pointer;
327
328  &:hover {
329    background: ${r.kjY};
330  }
331
332  & label {
333    cursor: pointer;
334  }
335`,Qe=(0,s.Ay)(ze.J).attrs(t=>({backgroundColor:(0,r.dmy)(t)}))`
336  cursor: pointer;
337  overflow: hidden;
338  text-overflow: ellipsis;
339  white-space: nowrap;
340  display: inline-block;
341  min-width: 0;
342`,cn=(0,s.Ay)(Qe)`
343  max-width: 18ch;
344`,dn=(0,s.Ay)(Qe)`
345  max-width: 50ch;
346`,Ze=(0,s.Ay)(ze.J).attrs(t=>({backgroundColor:(0,r.dmy)(t)}))`
347  cursor: pointer;
348`,qe=(0,s.Ay)(b.Ay).attrs(t=>({color:(0,r.Qod)(t),name:"successCheckmark"}))`
349  width: 32px;
350  height: 32px;
351
352  display: flex;
353  align-items: center;
354  justify-content: center;
355
356  & svg {
357    width: 17px;
358    height: 17px;
359  }
360`,un=(0,s.Ay)(pe.i8)`
361  color: ${r.IO};
362  background: transparent;
363  padding: 0;
364
365  & svg {
366    width: 20px;
367    height: 20px;
368    & path {
369      fill: ${r.IO};
370    }
371  }
372
373  &:hover {
374    background: transparent;
375    color: ${r.IO};
376    cursor: pointer;
377    & svg {
378      & path {
379        fill: ${r.IO};
380      }
381    }
382  }
383`;var pn=Object.defineProperty,mn=Object.defineProperties,En=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,fn=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,tt=(t,n,l)=>n in t?pn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Pe=(t,n)=>{for(var l in n||(n={}))fn.call(n,l)&&tt(t,l,n[l]);if(et)for(var l of et(n))vn.call(n,l)&&tt(t,l,n[l]);return t},Te=(t,n)=>mn(t,En(n));const yn=({identifier:t,onChange:n,onRemove:l,suggestedExternalIdentifiersKeys:o,suggestedExternalIdentifiersValues:i})=>{const{t:m}=(0,$._h)(),[p,A]=e.useState(!1),[h,T]=e.useState(!1),[u,v]=(0,Yt.A)(`${t.key}: ${t.value}`,{useStringKeys:!0}),O=e.useCallback(()=>{A(!0)},[]),c=e.useCallback(()=>{A(!1)},[]),I=e.useCallback(()=>{T(!0)},[]),K=e.useCallback(()=>{T(!1)},[]),Y=e.useCallback(x=>{n(Te(Pe({},t),{key:x,arrayId:oe().generate()}))},[n,t]),C=e.useCallback(x=>{n(Te(Pe({},t),{key:x.value,arrayId:oe().generate()}))},[n,t]),S=e.useCallback(x=>{n(Te(Pe({},t),{value:x,arrayId:oe().generate()}))},[n,t]),ie=e.useCallback(x=>{n(Te(Pe({},t),{value:x.value,arrayId:oe().generate()}))},[n,t]),te=e.useCallback(()=>{t.arrayId&&l(t.arrayId)},[t.arrayId,l]),xe=e.useCallback((x,X)=>{if(!x.value&&X.context==="value")return e.createElement(Ie,null,m("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_EMPTY_IDENTIFIER_KEY"));if(!x.value&&X.context==="menu")return null;if(X.context==="value"&&x.value)return p?e.createElement(Ie,null,m("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_EMPTY_IDENTIFIER_KEY")):e.createElement(cn,null,x.label);const he=()=>{Y(x.value)};return x.__isNew__?e.createElement(Fe.A,{isAdmin:!0,onClickTip:he,query:x.value}):e.createElement(Je,null,x.value===t.key&&e.createElement(qe,null),e.createElement(Ze,null,x.label))},[m,p,Y,t.key]),Oe=e.useCallback((x,X)=>{if(!x.value&&X.context==="value")return e.createElement(Ie,null,m("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_EMPTY_IDENTIFIER_VALUE"));if(!x.value&&X.context==="menu")return null;if(X.context==="value"&&x.value)return h?e.createElement(Ie,null,m("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_EMPTY_IDENTIFIER_VALUE")):e.createElement(dn,null,x.label);const he=()=>{S(x.value)};return x.__isNew__?e.createElement(Fe.A,{isAdmin:!0,onClickTip:he,query:x.value}):e.createElement(Je,null,x.value===t.value&&e.createElement(qe,null),e.createElement(Ze,null,x.label))},[m,h,S,t.value]);return e.createElement(nn,null,e.createElement(ln,null),e.createElement(on,null,e.createElement(Xe,{formatOptionLabel:xe,onBlur:c,onChange:C,onCreateOption:Y,onFocus:O,options:o,value:{label:t.key?t.key:m("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_EMPTY_IDENTIFIER_KEY"),value:t.key}})),e.createElement(an,null,e.createElement(Xe,{formatOptionLabel:Oe,isDisabled:!t.key,onBlur:K,onChange:ie,onCreateOption:S,onFocus:I,options:i,value:{label:t.value?t.value:m("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_EMPTY_IDENTIFIER_VALUE"),value:t.value}})),e.createElement(un,{"data-testid":"copyExternalIdentifierButton",onClick:u,tooltipKey:v,tooltipPosition:"top"}),e.createElement(sn,{onClick:te,tooltipKey:"REMOVE"}))};var An=Object.defineProperty,gn=Object.defineProperties,_n=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,In=Object.prototype.propertyIsEnumerable,lt=(t,n,l)=>n in t?An(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,Pn=(t,n)=>{for(var l in n||(n={}))hn.call(n,l)&&lt(t,l,n[l]);if(nt)for(var l of nt(n))In.call(n,l)&&lt(t,l,n[l]);return t},Tn=(t,n)=>gn(t,_n(n));const xn=({externalIdentifiers:t,onChange:n})=>{const l=(0,d.useSelector)(E.nu),o=e.useMemo(()=>l.map(c=>Tn(Pn({},c),{id:oe().generate()})),[l]),i=e.useCallback(c=>{const I=new Set,K=[];for(const Y of o)I.has(Y[c])||(I.add(Y[c]),K.push({label:Y[c],value:Y[c],id:oe().generate()}));return K},[o]),m=e.useMemo(()=>i("key"),[i]),p=e.useMemo(()=>i("value"),[i]),A=e.useMemo(()=>t.some(c=>
383c.key.trim()===""||c.value.trim()===""),[t]),h=e.useCallback(()=>{if(A)return;const c=[{key:"",value:"",arrayId:oe().generate()},...t];n(c)},[t,n]),T=e.useCallback(c=>I=>{if(!t)return;const K=[...t];K[c]=I,n(K)},[t,n]),u=e.useCallback(c=>{n(c)},[n]),v=e.useCallback(c=>{const I=t.filter(K=>K.arrayId!==c);n(I)},[t,n]),O=e.useMemo(()=>new Set(t.map(I=>I.key)).size!==t.length,[t]);return{handleAddNewIdentifier:h,handleChange:T,handleRemoveIdentifier:v,onReorderIdentifiers:u,siteExternalIdentifiers:o,suggestedExternalIdentifiersKeys:m,suggestedExternalIdentifiersValues:p,hasDuplicateKey:O,hasEmptyIdentifier:A}},On=({externalIdentifiers:t,onChange:n})=>{const{t:l}=(0,$._h)(),{handleAddNewIdentifier:o,handleChange:i,handleRemoveIdentifier:m,onReorderIdentifiers:p,suggestedExternalIdentifiersKeys:A,suggestedExternalIdentifiersValues:h,hasDuplicateKey:T,hasEmptyIdentifier:u}=xn({externalIdentifiers:t,onChange:n}),v=e.useCallback(()=>e.createElement(Ut.A,{direction:"vertical",droppableStyles:{overflow:"unset",padding:"0"},innerDivStyles:{display:"flex",flexDirection:"column",gap:"10px"},keyField:"arrayId",list:t,onDragEnd:p},(O,c)=>e.createElement(yn,{identifier:O,onChange:i(c),onRemove:m,suggestedExternalIdentifiersKeys:A,suggestedExternalIdentifiersValues:h})),[t,p,i,A,h]);return e.createElement(Ht,null,e.createElement(kt,null,e.createElement(jt,null,e.createElement(Wt,null,l("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_LABEL")),e.createElement(Ft,{disabled:T||u,onClick:o},e.createElement(zt,{name:"plus"}),l("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_ADD_LABEL"))),e.createElement(Vt,null,l("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_DESCRIPTION"))),v())},bn=t=>{const n=t.filter(o=>o.key).map(o=>o.key);return new Set(n).size!==n.length},Cn=({onInputChange:t,pendingSelectedTemplate:n})=>{var l;const{t:o}=(0,$._h)(),i=(0,d.useSelector)(E.CK),m=(0,d.useDispatch)(),p=(0,e.useCallback)(u=>v=>{t({[u]:v})},[t]),A=(0,e.useCallback)(u=>v=>{t({[u]:v})},[t]),h=(0,e.useCallback)(u=>{t({externalIdentifiers:u})},[t]),T=e.useCallback(()=>{const u=[""];return n?.title.trim()||u.push(`${o("ADMIN_LABEL_TITLE")} (${o("ADMIN_LABEL_REQUIRED")})`),bn(i)&&u.push(o("ADMIN_AUTOMATION_EXTERNAL_IDENTIFIERS_DUPLICATE_KEY")),u},[n?.title,i,o]);return e.useEffect(()=>{const u=T();for(const v of u)m((0,P.q1)(v))},[T,m]),e.createElement(be,null,e.createElement(wt,null,e.createElement(ke,{hasBg:!0}),e.createElement("div",{className:"input-container"},e.createElement(Rt.A,{error:n?.title.trim()==="",labelText:`${o("ADMIN_LABEL_TITLE")} (${o("ADMIN_LABEL_REQUIRED")})`,maxLength:100,onChange:p("title"),required:!0,value:n?.title||""}),e.createElement($t.A,{initialHeight:159,labelText:o("ADMIN_LABEL_DESCRIPTION"),maxLength:250,onChange:p("description"),value:n?.description||""}))),e.createElement(On,{externalIdentifiers:i,onChange:h}),e.createElement(We,null,e.createElement(je,null,e.createElement(Ve,null,o("ADMIN_LABEL_PRIORITY")),e.createElement(Ce,null,o("ADMIN_LABEL_PRIORITY_DESCRIPTION"))),e.createElement(Kt.A,{key:n?._id,labelText:o("ADMIN_LABEL_PRIORITY"),value:(l=n?.priority)!=null?l:0,onChange:A("priority"),min:0,placeholderText:"0"})))},Dn=e.memo(Cn);var at=a(40190);const Mn=(0,at.A)({loader:()=>a.e(5718).then(a.bind(a,225718)),name:"Rules"}),Nn=(0,at.A)({loader:()=>a.e(1363).then(a.bind(a,41363)),name:"Connections"});var Ln=a(42301);const Sn=(0,s.Ay)(pe.$n).attrs({isAdmin:!0})`
384 ${V.Jd};
385  border-radius: 100px;
386  display: flex;
387  padding: 0px 16px 0px 10px;
388  gap: 6px;
389  height: 40px;
390  align-items: center;
391  justify-content: center;
392`,Bn=(0,s.Ay)(b.Ay).attrs({name:"plus"})`
393  display: flex;
394  width: fit-content;
395  height: fit-content;
396
397  & svg {
398    width: 16px;
399    height: 16px;
400    & path {
401      fill: ${r.Yk7};
402    }
403  }
404`,Rn=s.Ay.div`
405  display: flex;
406  flex-direction: column;
407  gap: 16px;
408  width: 100%;
409  padding: 50px 0;
410  align-items: center;
411  justify-content: center;
412`,$n=s.Ay.span`
413  ${D.HU};
414  color: ${r.sRE};
415`;var De=a(708384),Me=a(829335),ot=a(759386),Kn=a(221574),rt=a(299500),Ne=a(711678),wn=a(777045),ve=a(467783),st=a(779407),Un=a(365179);const Hn=t=>{const{t:n}=(0,Kn._h)(),l=(0,d.useDispatch)(),o=(0,d.useSelector)(E.He),{data:i}=(0,ot.Oh)(),{data:m}=(0,ot.pc)({page:0,paginationEnabled:!1}),p=e.useMemo(()=>t.theme||"",[t]),A=e.useMemo(()=>i.find(C=>C._id===p)||m.find(C=>C._id===p),[m,p,i]),h=(0,d.useSelector)(Un.UJq),T=e.useCallback(C=>{C!==p&&l((0,P.iC)({theme:C}))},[l,p]),u=e.useCallback(C=>
415{h!==C&&(l((0,st.sn)({themeId:C})),l((0,ve.C0)()))},[l,h]),v=e.useCallback(()=>{l((0,ve.Bq)({actionKey:wn.aZ.design}))},[l]),O=e.useCallback(()=>{!o||!o._id||l((0,P.BK)(o,o))},[l,o]),c=e.useCallback((C,S)=>{l((0,st.$u)({theme:C,isCreating:S})),l((0,ve.Xo)(C)),v()},[l,v]),I=e.useCallback(()=>{const C=()=>{A?c(A,!0):v()};l((0,rt.to)({kind:Ne.V.saveLeaveConfirmation,data:{title:n("ADMIN_LABEL_LEAVE_TO_CREATE_THEME"),subtitle:n("ADMIN_LABEL_WANT_TO_PUBLISH_BEFORE_EXITING"),onLeave:C,onSave:O,btnOneText:n("ADMIN_LABEL_PUBLISH_AND_LEAVE"),btnTwoText:n("ADMIN_LABEL_LEAVE_WITHOUT_PUBLISHING")}}))},[n,l,A,O,v,c]),K=e.useCallback(C=>{const S=()=>{c(C)};l((0,rt.to)({kind:Ne.V.saveLeaveConfirmation,data:{title:n("ADMIN_LABEL_LEAVE_TO_CUSTOMIZE_THEME"),subtitle:n("ADMIN_LABEL_WANT_TO_PUBLISH_BEFORE_EXITING"),onLeave:S,onSave:O,btnOneText:n("ADMIN_LABEL_PUBLISH_AND_LEAVE"),btnTwoText:n("ADMIN_LABEL_LEAVE_WITHOUT_PUBLISHING")}}))},[n,l,O,c]),Y=e.useCallback((C,S)=>{const ie=i.find(te=>te._id===C)||m.find(te=>te._id===C);return[{id:"set-default",name:n("ADMIN_THEMES_SET_DEFAULT_SITE_THEME"),icon:"fortniteStar",dataTestId:`set-default-theme-${C}`,handler:te=>{te?.stopPropagation(),u(C),S?.()}},{id:"customize-theme",name:n("ADMIN_THEMES_CUSTOMIZE_THEME"),icon:"pencil",dataTestId:`customize-theme-${C}`,handler:()=>ie&&K(ie)}]},[n,i,m,K,u]);return{systemThemes:i,customThemes:m,selectedTheme:A,selectedThemeId:p,t:n,handleCreateTheme:I,getMenuActions:Y,handleThemeSelect:T}},kn=({selectedChannelTemplate:t})=>{const{t:n,selectedTheme:l,systemThemes:o,customThemes:i,handleCreateTheme:m,getMenuActions:p,selectedThemeId:A,handleThemeSelect:h}=Hn(t),T=(0,e.useCallback)(u=>h(u._id),[h]);return e.createElement("div",{className:"flex w-full flex-col gap-6"},e.createElement("div",{className:"flex flex-col"},e.createElement("div",{className:"flex items-center justify-between"},e.createElement(W.A,{component:De._x,stringKey:"ADMIN_SELECT_THEME"}),e.createElement(Sn,{onClick:m,"data-testid":"create-theme-button"},e.createElement(Bn,null),e.createElement("span",null,n("ADMIN_LABEL_CREATE_THEME")))),l&&e.createElement("div",{className:"grid grid-cols-2 gap-2 xl:grid-cols-4"},e.createElement(Me.A,{theme:l,isSelected:!0,menuActions:p(l._id||""),onSelect:T}))),e.createElement("div",{className:"flex flex-col"},e.createElement(W.A,{component:De._x,stringKey:"ADMIN_DESIGN_TAB_SYSTEM_THEMES"}),e.createElement("div",{className:"grid grid-cols-2 gap-2 xl:grid-cols-4"},o.map(u=>e.createElement(Me.A,{key:u._id,theme:u,isSelected:A===u._id,menuActions:p(u._id
415),onSelect:T})))),e.createElement("div",{className:"flex flex-col"},e.createElement(W.A,{component:De._x,stringKey:"ADMIN_DESIGN_TAB_CUSTOM_THEMES"}),i.length===0?e.createElement(Rn,null,e.createElement($n,null,n("ADMIN_AUTOMATION_NO_CUSTOM_THEMES"))):e.createElement("div",{className:"grid grid-cols-2 gap-2 xl:grid-cols-4"},i.map(u=>e.createElement(Me.A,{key:u._id,theme:u,isSelected:A===u._id,menuActions:p(u._id),onSelect:T})))))};var Wn=a(116552),jn=a(89649),Vn=a(413365);const Fn=s.Ay.div`
416  background-color: ${r.dHK};
417  border-bottom: 1px solid ${r.dmy};
418  display: flex;
419  flex-direction: row;
420  gap: 8px;
421  height: 54px;
422  justify-content: end;
423  padding: 16px;
424  z-index: 1;
425  align-items: center;
426`,zn=s.Ay.div`
427  & > *:first-child {
428    margin-top: 0;
429  }
430`,Gn=(0,s.Ay)(pe.$n)`
431  height: 24px;
432  min-width: 92px;
433  min-height: 24px;
434  border-radius: 100px;
435  padding: 0px 24px;
436`,Yn=(0,s.Ay)(pe.wl)`
437  min-width: 92px;
438  min-height: 24px;
439  border-radius: 100px;
440  padding: 0px 24px;
441  background-color: ${r.Y4I};
442  ${D.xW}
443  ${({isPublishing:t})=>t&&"pointer-events: pointer;"};
444  color: ${r.azv} !important;
445  &:hover {
446    color: ${r._e_} !important;
447    &:active, &:focus {
448      color: ${r._e_} !important;
449    }
450  }
451
452  &:active, &:focus {
453    color: ${r.azv} !important;
454  }
455  &:disabled {
456    background-color: ${r.Y4I} !important;
457    color: ${r.azv} !important;
458    opacity: 0.5;
459  }
460`,Xn=s.Ay.span`
461  ${D.Ns}
462  color: ${r.o0B};
463  margin-right: 5px;
464`,Jn=()=>{const t=(0,d.useSelector)(E.ut),n=(0,d.useSelector)(E.OZ),{t:l}=(0,$._h)(),o=(0,d.useDispatch)(),i=(0,d.useSelector)(E.He),m=e.useCallback(()=>{o((0,P.BK)(i,i))},[o,i]),p=e.useCallback(()=>{o(t?(0,jn.to)({kind:Ne.V.saveLeaveConfirmation,data:{title:l("ADMIN_LABEL_HAVE_UNPUBLISHED_CHANGES"),subtitle:l("ADMIN_LABEL_WANT_TO_PUBLISH_BEFORE_EXITING"),onLeave:()=>{o((0,ve.n0)(null))},onSave:m,btnOneText:l("ADMIN_LABEL_PUBLISH_AND_LEAVE"),btnTwoText:l("ADMIN_LABEL_LEAVE_WITHOUT_PUBLISHING")}}):(0,ve.n0)(null))},[o,t,m,l,i]),A=e.useCallback(()=>e.createElement(e.Fragment,null,e.createElement(zn,null,e.createElement(Wn.A,{errorMsg:n||"",hidden:!n})),e.createElement(Xn,{"data-testid":"automation-toolbar-status"},t&&e.createElement(Vn.A,null)),e.createElement(Yn,{"data-testid":"automation-toolbar-publish-button",disabled:!t||!!n,isPublishing:t,onClick:m},l("ADMIN_ACTION_PUBLISH"))),[t,m,l,n]);return e.createElement(Fn,{"data-testid":"automation-toolbar",id:"automation-toolbar"},A(),e.createElement(Gn,{"data-testid":"automation-toolbar-exit-button",onClick:p},l("ADMIN_ACTION_EXIT_AUTOMATION")))};var Qn=a(776637),it=a.n(Qn),Zn=a(1661),qn=a(366207),el=a(679706),tl=a(478158),nl=a(843984);const ll=s.Ay.div``,al=(0,s.Ay)(nl.A)`
465
466  .active-item {
467    background: ${r.kjY};
468  }
469
470  .available-item {
471    background: ${r.dHK};
472  }
473`,ol=s.Ay.div`
474  min-height: calc(100vh - 150px);
475  max-height: calc(100vh - 100px);
476`,rl=(0,s.Ay)(el.A)`
477  margin: 20px 0px;
478`,sl=(0,s.Ay)(tl.A)`
479  cursor: pointer;
480`;var f=a(256746),ee=a(393982),Le=a(460918),il=a(44427),Se=a(859607),cl=Object.defineProperty,dl=Object.defineProperties,ul=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,pl=Object.prototype.hasOwnProperty,ml=Object.prototype.propertyIsEnumerable,dt=(t,n,l)=>n in t?cl(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,ye=(t,n)=>{for(var l in n||(n={}))pl.call(n,l)&&dt(t,l,n[l]);if(ct)for(var l of ct(n))ml.call(n,l)&&dt(t,l,n[l]);return t},Ae=(t,n)=>dl(t,ul(n));const El=[f.SG,f.o1,f.hI,f.z4,f.Vg,f.Pb,f.DM,f.JO,f.jM,f.ae,f.Rz,f.DZ,f.x0,f.ZD],fl=new Set([f.SG,f.o1,f.hI,f.z4,f.Vg,f.Pb,f.DM,f.JO,f.jM,f.ae]),ut=t=>El.includes(t),de=t=>{var n,l;return((n=t.renderer)==null?void 0:n.panelType)||((l=t.data)==null?void 0:l.kind)||null},vl=t=>{var n;const l=(0,d.useDispatch)(),o=(0,il.A)(),i=(0,d.useSelector)(ee.si),m=(0,d.useSelector)(ee.aW),p=(0,d.useSelector)(ee.qy),A=(0,d.useSelector)(ee.B1),h=(0,d.useSelector)(ee.Kx),T=(0,d.useSelector)(ee.V2),u=(0,d.useSelector)(ee.Zd),v=(0,d.useSelector)(ee.Ps),O=(0,d.useSelector)(ee.yt),c=(0,d.useSelector)(Se.Em),I=(0,d.useSelector)(Se.tn),K=(0,d.useSelector)(Se.Un),[Y,C]=(0,e.useState)(null),[S,ie]=(0,e.useState)(null),te=(0,e.useMemo)(()=>({[f.o1]:i,[f.hI]:m,[f.z4]:p,[f.SG]:A,[f.Vg]:h,[f.DM]:T,[f.JO]:T,[f.jM]:T,[f.ae]:T,[f.Rz]:u,[f.DZ]:v,[f.x0]:v,[f.ZD]:O}),[i,m,p,A,h,T,u,v,O]),xe=I&&!K,Oe=(0,e.useMemo)(()=>new Set(c.map(y=>y.type)),[c]),x=(0,e.useCallback)(y=>xe&&fl.has(y)?Oe.has(y):te[y]===!0,[xe,Oe,te]),X=(0,e.useMemo)(()=>t?.panels?t.panels.filter(y=>{const F=de(y);return y.isActive&&!!F&&ut(F)&&x(F)}):[],[t?.panels,x]),he=(0,e.useMemo)(()=>(0,Le.kt)(X).map((y,F)=>{const z=de(y);return Ae(ye({},o[z]),{arrayId:oe().generate(),id:y._id,isACopy:!!y.numCopy,isActive:!0,kind
480Id:z,position:F+1})}),[X,o]),Et=(0,e.useMemo)(()=>new Set(X.map(y=>de(y)).filter(Boolean)),[X]),Cl=(0,e.useMemo)(()=>Object.entries(o).filter(([y])=>ut(y)&&x(y)&&!Et.has(y)).map(([y],F)=>Ae(ye({},o[y]),{arrayId:oe().generate(),id:y,isACopy:!1,isActive:!1,kindId:y,multiInstance:!1,position:F+1})),[Et,x,o]),Dl=(0,e.useCallback)((y,F)=>{l(F?(0,P.ft)(y):(0,P.PG)(y))},[l]),Ml=(0,e.useCallback)(y=>{const F=[];y.forEach(({id:z,kindId:wl},Ul)=>{var ft;const vt=(ft=t?.panels)==null?void 0:ft.find(Re=>{var yt;return z?Re._id===z||Re.id===z:((yt=Re.renderer)==null?void 0:yt.panelType)===wl});vt&&F.push(Ae(ye({},vt),{order:(Ul+1)*Le.Co}))}),l((0,P.iC)({panels:F}))},[t?.panels,l]),Nl=(0,e.useCallback)(y=>{X.some(z=>de(z)===y)&&ie(y)},[X]),Ll=(0,e.useCallback)(()=>{ie(null)},[]),re=(0,e.useMemo)(()=>!S||!t?.panels?null:t.panels.find(y=>de(y)===S)||null,[S,t?.panels]),Sl=re?.renderer||null,Bl=(n=re?.order)!=null?n:void 0,Rl=(0,e.useMemo)(()=>{if(!re||!t?.panels)return;const y=t.panels.indexOf(re);return y===-1?void 0:(0,Le.N$)(y)},[re,t?.panels]),$l=(0,e.useCallback)(y=>{if(!S||!t?.panels)return;const F=t.panels.map(z=>de(z)===S?Ae(ye({},z),{renderer:y}):z);l((0,P.iC)({panels:F}))},[S,t?.panels,l]),Kl=(0,e.useCallback)(y=>{if(!S||!t?.panels)return;const F=t.panels.map(z=>de(z)===S?Ae(ye({},z),{order:y}):z);l((0,P.iC)({panels:F}))},[S,t?.panels,l]);return(0,e.useEffect)(()=>{S&&!re&&ie(null)},[S,re]),{catalogActivePanels:Y||he,catalogAvailablePanels:Cl,currentEditingPanelKind:S,editingPanelOrder:Bl,editingPanelOrderFallback:Rl,editingPanelRenderer:Sl,onCloseEditPanel:Ll,onHandleOrderChange:Kl,onHandleReorder:Ml,onHandleRendererChange:$l,onHandleToggle:Dl,onOpenEditPanel:Nl}},yl=()=>{const t=(0,d.useSelector)(E.He),{catalogActivePanels:n,catalogAvailablePanels:l,currentEditingPanelKind:o,editingPanelOrder:i,editingPanelOrderFallback:m,editingPanelRenderer:p,onCloseEditPanel:A,onHandleOrderChange:h,onHandleToggle:T,onHandleReorder:u,onHandleRendererChange:v,onOpenEditPanel:O}=vl(t),c=(0,e.useMemo)(()=>({draggable:!0,items:n,testId:"activePanelsList",titleKey:"ADMIN_PANEL_V2_PANELS_SECTION_ACTIVE_PANELS"}),[it()(n)]),I=(0,e.useMemo)(()=>({items:l,testId:"availablePanelsList",titleKey:"ADMIN_PANEL_V2_PANELS_SECTION_AVAILABLE_PANELS"}),[it()(l)]);return o&&p?e.createElement(ol,null,e.createElement(sl,{onClick:A}),e.createElement(rl,null),e.createElement(qn.A,{key:o,fallbackOrder:m,onChange:h,order:i}),e.createElement(Zn.A,{kindId:o,onChange:v,panelType:o,renderer:p})):e.createElement(ll,null,e.createElement(al,{catalogLists:[c,I],hideHeader:!0,infoKey:"ADMIN_SIDEBAR_SECTION_PANELS_HELPER",onEdit:O,onReorder:u,onToggle:T,testId:"panelsCatalog",titleKey:"ADMIN_SIDEBAR_SECTION_PANELS"}))};var Al=a(697683),Be=a(575410);const gl={module_name:"whatJustHappenedModule",coupled_panel_type:f.Rz,display_text:"What Just Happened",visibility_duration_timer:12,suggested_x_y_position:[0,0],supported_platforms:{android:!0,androidTv:!0,bbd:!0,desktopWeb:!0,ios:!0,mobileWeb:!0,roku:!0,tvos:!0}};var _l=Object.defineProperty,hl=Object.defineProperties,Il=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,Pl=Object.prototype.hasOwnProperty,Tl=Object.prototype.propertyIsEnumerable,mt=(t,n,l)=>n in t?_l(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,ge=(t,n)=>{for(var l in n||(n={}))Pl.call(n,l)&&mt(t,l,n[l]);if(pt)for(var l of pt(n))Tl.call(n,l)&&mt(t,l,n[l]);return t},_e=(t,n)=>hl(t,Il(n));const xl=()=>{const t=(0,d.useDispatch)(),n=(0,d.useSelector)(E.He),l=(0,d.useSelector)(ee.Zd),o=n?.modules||[],i=(0,e.useMemo)(()=>o.find(u=>u.coupled_panel_type===f.Rz),[o]),m=!!i,p=(0,e.useCallback)(u=>{t((0,P.iC)({modules:u}))},[t]),A=(0,e.useCallback)(u=>{p(u?[...o,gl]:o.filter(v=>v.coupled_panel_type!==f.Rz))},[o,p]),h=(0,e.useCallback)((u,v)=>{if(!i)return;let O;if(u.startsWith("supportedPlatforms.")){const c=u.replace("supportedPlatforms.","");O=_e(ge({},i),{supported_platforms:_e(ge({},i.supported_platforms),{[c]:v})})}else if(u==="required_time_in_session")O=_e(ge({},i),{required_time_in_session:Math.max(0,v)});else if(u==="suggested_x"||u==="suggested_y"){const[c,I]=i.suggested_x_y_position||[0,0];O=_e(ge({},i),{suggested_x_y_position:u==="suggested_x"?[v,I]:[c,v]})}else O=_e(ge({},i),{[u]:v});p(o.map(c=>
480c.coupled_panel_type===f.Rz?O:c))},[i,o,p]),T=(0,e.useMemo)(()=>{var u,v,O,c,I;return i?[{key:"display_text",type:"text",labelKey:"ADMIN_LABEL_DISPLAY_TEXT",value:i.display_text},{key:"visibility_duration_timer",type:"number",labelKey:"ADMIN_LABEL_VISIBILITY_DURATION_TIMER",value:i.visibility_duration_timer},{key:"required_time_in_session",type:"number",labelKey:"ADMIN_LABEL_REQUIRED_TIME_IN_SESSION",value:(u=i.required_time_in_session)!=null?u:0},{key:"suggested_x",type:"number",labelKey:"ADMIN_LABEL_SUGGESTED_X_POSITION",value:(O=(v=i.suggested_x_y_position)==null?void 0:v[0])!=null?O:0},{key:"suggested_y",type:"number",labelKey:"ADMIN_LABEL_SUGGESTED_Y_POSITION",value:(I=(c=i.suggested_x_y_position)==null?void 0:c[1])!=null?I:0},...(0,Be.xD)(i.supported_platforms)]:[]},[i?.display_text,i?.visibility_duration_timer,i?.required_time_in_session,i?.suggested_x_y_position,...(0,Be.Ai)(i?.supported_platforms)]);return l?e.createElement(be,null,e.createElement(We,null,e.createElement("div",{className:"flex items-center justify-between w-full"},e.createElement(je,null,e.createElement(Ve,null,e.createElement(W.A,{stringKey:"ADMIN_LABEL_WHAT_JUST_HAPPENED"})),e.createElement(Ce,null,e.createElement(W.A,{stringKey:"ADMIN_MODULE_WHAT_JUST_HAPPENED_INFO"}))),e.createElement(Al.A,{checked:m,"data-testid":"moduleToggleWhatJustHappened",onChange:A})),m&&e.createElement(Be.Ay,{fields:T,onChange:h}))):e.createElement(be,null,e.createElement(Ce,null,e.createElement(W.A,{stringKey:"ADMIN_LABEL_NO_MODULES_AVAILABLE"})))},Ol=()=>{const{t,currentLocale:n}=(0,$._h)(),l=(0,d.useDispatch)(),o=(0,d.useSelector)(E.wk),i=(0,d.useSelector)(E.He),m=(0,d.useSelector)(ee.FC),[p,A]=(0,e.useState)(0),h=(0,e.useCallback)((c=0)=>{A(c)},[]),T=(0,e.useCallback)(c=>{l((0,P.iC)(c))},[l,i]),u=(0,e.useMemo)(()=>{const c=[{titleKey:"ADMIN_LABEL_GENERAL",content:e.createElement(ue,null,p===0&&e.createElement(Dn,{onInputChange:T,pendingSelectedTemplate:i}))},{titleKey:"ADMIN_LABEL_PANELS",content:e.createElement(ue,null,p===1&&e.createElement(yl,null))},{titleKey:"ADMIN_LABEL_RULES",content:e.createElement(ue,null,p===2&&e.createElement(Mn,null))},{titleKey:"ADMIN_LABEL_CONNECTIONS",content:e.createElement(ue,null,p===3&&e.createElement(Nn,null))},{titleKey:"ADMIN_LABEL_THEME",content:e.createElement(ue,null,p===4&&e.createElement(kn,{selectedChannelTemplate:i}))}];return m&&c.push({titleKey:"ADMIN_LABEL_MODULES",content:e.createElement(ue,null,p===5&&e.createElement(xl,null))}),c},[t,T,i,p,m]),v=e.useCallback(()=>{if(!o?.created)return null;const{timestamp:c,timestampLabel:I}=o.created===o.modified?{timestamp:o.created,timestampLabel:"ADMIN_LABEL_CREATED_TIME_AGO"}:{timestamp:o.modified,timestampLabel:"ADMIN_LABEL_MODIFIED_TIME_AGO"},{formatted:K,tooltip:Y}=(0,Ln.Y)({currentLocale:n,timestamp:c}),C=t(I,{timeAgo:K});return e.createElement(St,{tooltip:Y},C)},[n,o?.created,o?.modified,t]),O=e.useCallback(()=>o?e.createElement(He,null,e.createElement(H.A,{variant:"admin",className:"flex-1 min-h-0"},e.createElement(Lt,null,e.createElement("div",{className:"data"},e.createElement(ke,null),e.createElement("div",{className:"title"},o?.title),v()),o?.description&&e.createElement("p",{className:"description"},o.description)),e.createElement(Nt,{activeIndex:p,className:"automation-tabbed-view",onTabChange:h},u.map(({titleKey:c,content:I})=>e.createElement(Ot,{key:c,titleKey:c},I))))):e.createElement(He,null,e.createElement(H.A,{variant:"admin",className:"flex-1 min-h-0"},e.createElement(Bt,null,e.createElement("p",null,t("ADMIN_LABEL_NO_CHANNEL_TEMPLATES")),e.createElement("p",null,t("ADMIN_LABEL_CLICK_CREATE_TEMPLATE"))))),[o,v,h,t,u,p,h]);return e.createElement(e.Fragment,null,e.createElement(Jn,null),O())},bl=e.memo(Ol)},42301:(J,U,a)=>{a.d(U,{Y:()=>P});var e=a(242689),d=a.n(e);function E($){return typeof $=="number"&&!Number.isNaN($)}function P({currentLocale:$,timestamp:H}){d().locale($);const B=E(H)?d()(H):d()();return{formatted:d()().diff(B,"months")>=12?B.format("ll"):B.fromNow(),tooltip:B.format("lll")}}},717846:(J,U,a)=>{a.d(U,{A:()=>ne});var e=a(63696),d=a(41989),E=a(789069),P=a(224191),$=a.n(P),H=a(455464),B=a(498910);const ne=({onClickTip:Z,query:s,isAdmin:se=!1})=>{const{t:W}=(0,d._h)(),j=(0,P.useSelector)(E.WO),b=(0,P.useSelector)(E.AV);return e.createElement(B._p,{onClick:Z},e.createElement(B.$t,null,e.createElement(B.S7,null,W("ADMIN_LABEL_CREATE")),e.createElement(H.uK,{backgroundColor:se?j:b},s)),e.createElement(B.m$,null,W("ADMIN_LABEL_OR_HIT_ENTER")))}},498910:(J,U,a)=>{a.d(U,{$t:()=>$,S7:()=>H,Y7:()=>Q,_p:()=>P,m$:()=>B});var e=a(429195),d=a(152544),E=a(886550);const P=E.Ay.button`
481  width: 100%;
482  display: flex;
483  padding: 10px 16px;
484  justify-content: space-between;
485  align-items: center;
486  align-self: stretch;
487  cursor: pointer;
488  background-color: ${e.YJk};
489`,$=E.Ay.div`
490  display: flex;
491  align-items: center;
492  gap: 6px;
493`,H=E.Ay.div`
494  ${d.Vg}
495  color: ${e.sRE};
496`,B=E.Ay.span`
497  ${d.qm}
498  color: ${e.sRE};
499`,Q=E.Ay.button`
500  width: 100%;
501  display: flex;
502  height: 48px;
503  padding: 8px;
504  align-items: center;
505  gap: 8px;
506  background: ${e.dHK};
507  cursor: pointer;
508
509  &:hover {
510    background: ${e.kjY};
511  }
512
513  & label {
514    cursor: pointer;
515  }
516`},455464:(J,U,a)=>{a.d(U,{Iu:()=>N,Kd:()=>ae,Sr:()=>G,VA:()=>le,YP:()=>M,mO:()=>D,oi:()=>ce,uK:()=>q,yi:()=>L});var e=a(283722),d=a(429195),E=a(886550),P=a(18631),$=a(942695),H=a(412556),B=a(152544),Q=a(950957),ne=a(523868),Z=Object.defineProperty,s=Object.defineProperties,se=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,k=(_,g,w)=>g in _?Z(_,g,{enumerable:!0,configurable:!0,writable:!0,value:w}):_[g]=w,V=(_,g)=>{for(var w in g||(g={}))j.call(g,w)&&k(_,w,g[w]);if(W)for(var w of W(g))b.call(g,w)&&k(_,w,g[w]);return _},r=(_,g)=>s(_,se(g));const D=E.Ay.div`
517  display: flex;
518  gap: 10px;
519`,ce=E.Ay.div`
520  position: relative;
521  width: 100%;
522`,G=(0,E.Ay)(e.Ay).attrs(_=>({color:(0,d.Qod)(_),name:"successCheckmark"}))`
523  width: 32px;
524  height: 32px;
525
526  display: flex;
527  align-items: center;
528  justify-content: center;
529
530  & svg {
531    width: 17px;
532    height: 17px;
533  }
534`,R=(0,E.Ay)(e.Ay).attrs(_=>({name:"removeIconOutline",color:(0,d.IO)(_)}))`
535  margin: auto;
536  cursor: pointer;
537`,M=(0,$.A)(R,{admin:!0,tooltipWrapperCss:(0,E.AH)`margin-top: 15px;`,tooltipCss:(0,E.AH)`margin-right: 70px;`,tooltipArrowCss:(0,E.AH)`left: 82%`}),N=(0,E.Ay)(H.Ay).attrs(_=>({styles:{control:g=>r(V({},g),{background:"transparent",borderColor:(0,d.dmy)(_),height:"56px","&:hover":{borderColor:(0,d.dmy)(_)},"&:focus-within":{borderColor:(0,d.Qod)(_),boxShadow:"none"}}),clearIndicator:()=>({}),indicatorSeparator:()=>({}),valueContainer:g=>r(V({},g),{paddingLeft:"16px"}),menu:g=>r(V({},g),{background:(0,d.dHK)(_),margin:"0",zIndex:"2"}),option:g=>r(V({},g),{padding:"0",margin:"0"}),input:g=>r(V({},g),{color:(0,d.o0B)(_)})},maxMenuHeight:100,controlShouldRenderValue:!0,isMulti:!1,isSearchable:!0,createOptionPosition:"first"}))`
538  ${({isDisabled:_})=>_&&(0,E.AH)`opacity: 0.5;`};
539  scrollbar-color: ${d.Qod} ${d.Qod};
540
541  & ::-webkit-scrollbar-thumb {
542    background: ${d.Qod} !important;
543  }
544`,q=(0,E.Ay)(ne.J)`
545  cursor: pointer;
546`,le=(0,E.Ay)(P.A)`
547  height: auto;
548`,ae=E.Ay.div`
549  ${B.EE}
550  color: ${d.zkP};
551`,L=(0,E.Ay)(Q.A)`
552  position: absolute;
553  z-index: 1;
554  right: 40px;
555  top: 12px;
556`}}]);

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.