PageSourceSearch

https://interactor.ai/_next/static/chunks/pages/admin/interactors-266ba8ea3039b7bd.js

js interactor.ai collected 2026-10-05 12:25:04 UTC 24,962 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c52a619d-e423-43ef-8d1f-5cb8fa00c88f",e._sentryDebugIdIdentifier="sentry-dbid-c52a619d-e423-43ef-8d1f-5cb8fa00c88f")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3689,6532],{64063:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/interactors",function(){return r(16877)}])},75966:function(e,t,r){"use strict";r.d(t,{T:function(){return n}});let{createInteractorQuery:n}=(0,r(94241).e)("query","interactor")},36223:function(e,t,r){"use strict";r.d(t,{L:function(){return s}});var n=r(31171),o=r(2784),i=r(8780),a=r(36027);let s=()=>{let e=(0,n.b5)(),{isEnabled:t}=(0,i.A)(),[r,s]=(0,o.useState)(e.getLanguage()||a.Q.EN);return(0,o.useEffect)(()=>{let t=e.on("language",e=>{let{value:t}=e;return s(t)});return()=>{t.unsubscribe()}},[]),{language:t?r:a.Q.EN}}},99017:function(e,t,r){"use strict";r.d(t,{T:function(){return a}});var n=r(52322),o=r(30813),i=r(87494);let a=()=>(0,n.jsx)(o.G7,{ai:"center",jc:"center",w:"100%",h:"100%",children:(0,n.jsx)(i.$,{})})},80601:function(e,t,r){"use strict";r.d(t,{t:function(){return u}});var n=r(52322),o=r(2784),i=r(36728),a=r(85853),s=r(32748);let l=()=>{let{push:e}=(0,i.c)(),{identity:t,isLoading:r,isAllowed:n,shouldShowSkeleton:l}=(0,s.x)();return(0,o.useEffect)(()=>{!r&&n&&((null==t?void 0:t.isSuperAdmin)||e(a.x.Root.notFound()))},[t,r,n]),{identity:t,isLoading:r,shouldShowSkeleton:l||!(null==t?void 0:t.isSuperAdmin)}};var c=r(99017);let u=e=>{let{Skeleton:t=c.T,children:r}=e,{shouldShowSkeleton:o}=l();return o?(0,n.jsx)(t,{isLoading:!0}):r}},32748:function(e,t,r){"use strict";r.d(t,{x:function(){return s}});var n=r(2784),o=r(27758),i=r(36728),a=r(85853);let s=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{isDisabled:s,redirectUrl:l=a.x.Root.auth()}=r,{getIdentity:c}=(0,o.j)({skip:s}),{push:u}=(0,i.c)(),d=!!(c.loading||r.isLoading),f=null===(e=c.data)||void 0===e?void 0:e.identity,m=null===(t=null==f?void 0:f.isAnonym)||void 0===t||t,g=!!(s||f&&!m);return(0,n.useEffect)(()=>{d||g||u(l)},[g,d,u]),{identity:f,isLoading:d,isAllowed:g,shouldShowSkeleton:d||!g}}},24883:function(e,t,r){"use strict";r.d(t,{X:function(){return s}});var n=r(52322),o=r(89828),i=r(36728),a=r(16872);let s=e=>{let{onPress:t,...r}=e,{back:s}=(0,i.c)();return(0,n.jsx)(a.$,{p:0,onPress:e=>{if(t){t(e);return}s()},backgroundColor:"transparent",...r,children:(0,n.jsx)(o.w,{size:24})})}},86999:function(e,t,r){"use strict";r.d(t,{W:function(){return m}});var n=r(52322),o=r(28031),i=r(63955),a=r(37288),s=r(40175),l=r(78501),c=r(41198),u=r(69876),d=r(3884),f=r(54017);let m=e=>{let{name:t,label:r,placeholder:m,labelTooltip:g,...h}=e,{fieldState:p}=(0,i.bc)({name:t}),{error:v}=p;return(0,n.jsxs)(a.FA,{gap:6,children:[(0,n.jsx)(f._,{isHidden:!r,children:(0,n.jsxs)(a.sL,{gap:8,ai:"center",children:[(0,n.jsx)(d.M,{text:null!=r?r:""}),(0,n.jsx)(f._,{isHidden:!g,children:(0,n.jsxs)(s.u,{children:[(0,n.jsx)(s.u.Trigger,{cur:"pointer",children:(0,n.jsx)(o.k,{size:12,color:"$textMuted"})}
1),(0,n.jsx)(s.u.Content,{bg:"$interactorSystemMessageBackground",children:(0,n.jsx)(c.x,{children:g})})]})})]})}),(0,n.jsx)(l.t,{type:u.EB.Text,name:t,placeholder:m,...h}),(0,n.jsx)(f._,{isHidden:!(null==v?void 0:v.message),children:(0,n.jsx)(c.x,{fos:16,col:"$danger",children:null==v?void 0:v.message})})]})}},78759:function(e,t,r){"use strict";r.d(t,{o:function(){return s}});var n=r(52322),o=r(11811),i=r(87494),a=r(30428);let s=e=>{let{pressHandler:t,isLoading:r}=e,s=r?(0,n.jsx)(i.$,{size:"small"}):(0,n.jsx)(a.T,{size:24});return(0,n.jsx)(o.z,{variant:"link",onPress:t,disabled:r,icon:s,size:24,py:0})}},61076:function(e,t,r){"use strict";r.d(t,{M:function(){return m}});var n=r(52322),o=r(2784),i=r(47246),a=r(92552),s=r(30813);let l=(0,a.z)(s.G7,{pos:"absolute",zi:1,animation:"instantly",variants:{isHorizontal:{false:{h:3,left:0,right:0},true:{w:3,top:0,bottom:0}}}});var c=r(36383),u=r(58629);let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{isHorizontal:r}=t,[n,i]=(0,o.useState)(!0),[a,s]=(0,o.useState)(!0),l=(0,o.useCallback)(()=>{let t=e.current;if(!t)return;let n=r?t.scrollLeft:t.scrollTop,o=r?t.clientWidth:t.clientHeight,a=r?t.scrollWidth:t.scrollHeight;i(n<=1),s(n+o>=a-1)},[]);return(0,c.yU)({ref:e,onResize:l}),(0,o.useEffect)(()=>{let t=e.current;if(!t){u.kg.warn("Did you correctly provide ref to scroll component?");return}return t.addEventListener("scroll",l),l(),()=>{t.removeEventListener("scroll",l)}},[e]),{isTopCreaseHidden:n,isBottomCreaseHidden:a}},f=e=>{let{children:t,scrollRef:r,topCrease:o,bottomCrease:a,crease:s,isHorizontal:c,maxOpacity:u=1,creaseSize:f=3}=e,{topCreaseGradient:m,bottomCreaseGradient:g,leftCreaseGradient:h,rightCreaseGradient:p}=(0,i.Fg)(),{isTopCreaseHidden:v,isBottomCreaseHidden:E}=d(r,{isHorizontal:c}),I=c?h:m,x=c?p:g;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l,{...s,...o,isHorizontal:!!c,opacity:v?0:u,...c?{left:0}:{top:0},style:{background:I.get(),...null==o?void 0:o.style},h:c?void 0:f,w:c?f:void 0}),t,(0,n.jsx)(l,{...s,...a,isHorizontal:!!c,opacity:E?0:u,...c?{right:0}:{bottom:0},style:{background:x.get(),...null==a?void 0:a.style},h:c?void 0:f,w:c?f:void 0})]})},m=e=>{let{isDisabled:t,children:r,...o}=e;return t?r:(0,n.jsx)(f,{...o,children:r})}},51744:function(e,t,r){"use strict";r.d(t,{d:function(){return E},y:function(){return I}});var n=r(52322),o=r(2784),i=r(47246),a=r(46094),s=r(96496),l=r(62750),c=r(29171),u=r(49216),d=r(52279),f=r(43224),m=r(29577),g=r(55321);let h=e=>{let{frameMarginHorizontal:t=l.Wd}=e;return{frameId:(0,o.useId)(),frameMarginHorizontal:t}};var p=r(22936);let v=e=>{let{open:t,frameAnchorId:r=f.D$}=e,n=(0,o.useId)();return(0,p.v)({anchor:r,target:n,shouldBeCenteredVertically:!1,shouldBeCenteredHorizontally:!0},[t]),{frameId:n}},E="quick",I=e=>{let{children:t,backgroundColor:r="$mainBackground",snapPointsMode:p="percent",snapPoints:I=[100],open:x,withMask:y,onClose:T,onOpenChange:j,isFrameAnchorDisabled:_,frameAnchorId:b=f.D$,frameMarginHorizontal:R=l.Wd,onOpenAnimationFinished:O,onCloseAnimationFinished:C,hasBlur:S=!1,zIndex:L=u.y$,...M}=e,A=(0,i.Fg)(),k=(0,a.d)().width,w=(0,o.useMemo)(()=>{let e=document.querySelector("#".concat(b));return e?e.getBoundingClientRect().width:l.jk},[b,k]),D=e=>{e||null==T||T(),null==j||j(e)},{frameId:N}=(_?h:v)(e),{isInitialRender:F}=(0,d.c)();(0,o.useEffect)(()=>!x&&F?void 0:x?(0,g.L)(()=>null==O?void 0:O(),m.n[E]):(0,g.L)(()=>null==C?void 0:C(),m.n[E]),[x]);let P={style:{height:"100%"}};return(0,n.jsx)(s.yo,{forceRemoveScrollEnabled:!c.s&&void 0,snapPoints:"fit"===p?void 0:I,snapPointsMode:p,dismissOnSnapToBottom:!0,modal:!0,zIndex:L,animation:E,portalProps:y?{enterStyle:{backgroundColor:"$backdropClosed"},exitStyle:{backgroundColor:"$backdropClosed"},style:{...P.style,transition:"all .3s ease-in",backdropFilter:x&&S?A.backdropBlurFilter.get():"none",WebkitBackdropFilter:x&&S?A.backdropBlurFilter.get():"none"},backgroundColor:x?"$backdrop":"$backdropClosed",pointerEvents:x?"auto":"none",onPress:e=>{e.stopPropagation(),null==D||D(!1)}}:P,disableDrag:!0,open:x,onOpenChange:D,...M,children:(0,n.jsx)(s.yo.Frame,{id:N,$gtSm:{w:w-2*R,mx:"auto"},backgroundColor:r,onPress:e=>{e.stopPropagation()},children:t})})}},1616:function(e,t,r){"use strict";r.d(t,{F:function(){return i}});var n=r(27022),o=r(21777);let i=e=>()=>new Promise((t,r)=>{let{accept:i,type:a}=e,s=document.createElement("input");s.type=a,s.accept=i,s.onerror=()=>r(Error("File upload failed")),s.onabort=()=>r(Error("File upload aborted")),s.oncancel=()=>r(Error("File upload canceled")),s.onchange=()=>{var e;let n=null===(e=s.files)||void 0===e?void 0:e.item(0);if(!n)return r(Error("No file selected"));t(n)},(0,n.j)(document.body,s),s.click(),(0,o.r)([s])})},52279:function(e,t,r){"use strict";r.d(t,{c:function(){return o}});var n=r(2784);let o=()=>{let e=(0,n.useRef)(!0);return(0,n.useEffect)(()=>{e.current=!1},[]),{isInitialRender:e.current}}},26683:function(e,t,r){"use strict";r.d(t,{O:function(){return s}});var n=r(2784),o=r(34626),i=r(36728);let a=new Set,s=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{prefetch:r}=(0,i.c)(),s=e.filter(Boolean).sort().join("|"),l=(0,o.J)(e);(0,n.useEffect)(()=>
1{t&&l.current.forEach(e=>{!e||a.has(e)||(a.add(e),r(e))})},[s,t])}},36743:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=r(72857).r},30428:function(e,t,r){"use strict";r.d(t,{T:function(){return n}});let n=r(23427).P},33189:function(e,t,r){"use strict";r.d(t,{C:function(){return o}});var n=r(48601);let o=e=>n.Z_().test("is-schema-json-valid",(t,r)=>{let{createError:n}=r;try{if(!t)return!0;let r=JSON.parse(t);return e(r,n)}catch(t){let{message:e}=t;return n({message:e})}})},3884:function(e,t,r){"use strict";r.d(t,{M:function(){return l}});var n=r(52322),o=r(30813),i=r(92552),a=r(41198);let s=(0,i.z)(a.x,{color:"$textMuted",fontSize:14}),l=e=>{let{text:t,rightElement:r,textProps:i,...a}=e;return(0,n.jsxs)(o.G7,{fd:"row",jc:"space-between",ai:"center",ml:10,...a,children:[(0,n.jsx)(s,{textTransform:"uppercase",...i,children:t}),r]})}},39484:function(e,t,r){"use strict";r.d(t,{j:function(){return y},o:function(){return T}});var n=r(2784),o=r(50128),i=r(34626),a=r(49287),s=r(52279),l=r(74609),c=r(69876),u=r(58629),d=r(75747),f=r(12911);let m=e=>{let{delayMs:t,isLoading:r}=e,[o,i]=(0,n.useState)(!1),a=!r&&!o;return(0,n.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{i(!0)},t);return()=>{clearTimeout(e)}},[t,a]),o};var g=r(56675),h=r(84659);let p=(e,t)=>e.query({query:h.Q,fetchPolicy:"network-only",variables:{input:t}}),v=e=>{let{input:t,isInitialLoadingSettled:r,isLoading:o,response:i,shouldPrefetchNextPage:a}=e,s=(0,g.x)(),l=r&&!o&&a&&(null==i?void 0:i.hasNextPage)&&i.edges.length<=t.offset+t.limit,c=(0,n.useMemo)(()=>{if(l)return{...t,offset:t.offset+t.limit}},[t,l]);(0,n.useEffect)(()=>{c&&(async()=>{try{await p(s,c)}catch(e){u.kg.error("Failed to prefetch next page of interactors chats"),u.kg.error(e)}})()},[s,c])};var E=r(7679);let I=(e,t,r)=>{e.cache.updateQuery({query:h.Q,variables:{input:t}},e=>{var t;let n=null!==(t=null==e?void 0:e.response)&&void 0!==t?t:{edges:[],endCursor:null,hasNextPage:!1};return{response:{...n,edges:(0,E.L)([...r,...n.edges],"cursor")}}})},x=[c.Bi.Unread],y=(0,l.g)(h.B,h.Q),T=e=>{var t;let{initialOffset:r=0,limit:l=f.F,search:g,userId:p,shouldPrefetchNextPage:E=!0,filter:T,interactorId:j,shouldExcludeAnonymous:_,showAttentionRequiredOnly:b,shouldShowEmptyChats:R,onOffsetChange:O}=e,C={filter:T,interactorId:j,limit:l,search:g,shouldExcludeAnonymous:_,showAttentionRequiredOnly:b,shouldShowEmptyChats:R,userId:p},S=(0,i.J)(C),L=e=>{null==O||O(e,S.current)}
1,[M,A]=(0,n.useState)(()=>{let e={[c.Bi.All]:0,[c.Bi.Unread]:0,[c.Bi.Owned]:0,[c.Bi.Customers]:0,[c.Bi.InteractorOwnersChats]:0};return e[T]=r,e}),k=(0,n.useRef)(j);(0,n.useEffect)(()=>{k.current!==j&&(k.current=j,A({[c.Bi.All]:0,[c.Bi.Unread]:0,[c.Bi.Owned]:0,[c.Bi.Customers]:0,[c.Bi.InteractorOwnersChats]:0}))},[j]);let w=k.current===j?M[T]:0,D=(0,n.useCallback)(e=>{A(t=>({...t,[T]:e})),L(e)},[T]),N=(0,i.J)(w),F=(0,a.f)({search:g,userId:p,limit:l,offset:w,filter:T,interactorId:j,shouldShowEmptyChats:R,shouldExcludeAnonymous:_,showAttentionRequiredOnly:b}),P=(0,i.J)(F),[B,z]=(0,n.useState)(!1),G=0===w,$=!x.includes(T),H=(0,n.useRef)(),W=y({variables:{input:P.current},returnPartialData:!0,pollIntervalOnWsDisconnected:2e3,customPoll:async()=>{var e;return null===(e=H.current)||void 0===e?void 0:e.call(H)},fetchPolicy:G&&!$?"network-only":"cache-and-network",refetchWritePolicy:"merge"}),q=(0,i.J)(W),U=(0,i.J)(null===(t=W.getInteractorsChats.data)||void 0===t?void 0:t.hasNextPage),J=m({delayMs:f.u,isLoading:W.getInteractorsChats.loading});v({input:F,isInitialLoadingSettled:J,isLoading:W.getInteractorsChats.loading,response:W.getInteractorsChats.data,shouldPrefetchNextPage:E});let Q=(0,n.useRef)(!0),X=(0,o.N)(),V=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=q.current.getInteractorsChats,r={...P.current,...e};z(!0);try{let e=await t.client.query({query:h.Q,fetchPolicy:"network-only",variables:{input:{...r,offset:0,limit:r.offset+r.limit}}});if(e.error||e.errors){var n,o,i,a;let t=null!==(a=null===(n=e.error)||void 0===n?void 0:n.message)&&void 0!==a?a:null===(i=e.errors)||void 0===i?void 0:null===(o=i.find(e=>e.message))||void 0===o?void 0:o.message;u.kg.error("Failed to refetch query"),t&&u.kg.error(t);return}if(!e.data)return;let{response:s}=e.data;I(t.client,r,s.edges)}finally{z(!1)}};H.current=V;let{isInitialRender:Z}=(0,s.c)();return(0,n.useEffect)(()=>{W.getInteractorsChats.loading||(Q.current=!1,X())},[W.getInteractorsChats.loading]),(0,n.useEffect)(()=>{Z||D(0)},Object.values((0,d.C)(C,["filter"]))),{getInteractorsChats:{...W.getInteractorsChats,isRefetching:B,isFetchingNextPage:Q.current,isInitialLoadingSettled:J,fetchMore:()=>{!Q.current&&U.current&&(Q.current=!0,X(),D(N.current+P.current.limit))},refetch:V}}}},83522:function(e,t,r){"use strict";r.d(t,{X:function(){return c}});var n=r(18137),o=r(36223),i=r(11165),a=r(15698);let s=(e,t)=>{let r=(0,a.$)(t);return i.Z.toWeekdayShortDate(e,{locale:r})},l=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),c=()=>{let{t:e,isLoading:t,isNamespaceLoading:r}=(0,n.$)("common"),{language:i}=(0,o.L)();return{isLoading:t||r,convertDateToLabel:t=>{let r=new Date,n=new Date;return(n.setDate(r.getDate()-1),l(t,r))?e("today"):l(t,n)?e("yesterday"):7>Math.floor((r.getTime()-t.getTime())/864e5)?e("day_of_week.".concat(t.getDay())):s(t,i)}}}},11590:function(e,t,r){"use strict";r.d(t,{F:function(){return a}});var n=r(18137),o=r(75966);let i=(0,r(74609).g)("interactor",(0,o.T)({interactor:{id:!0,reference:!0,name:!0}})),a=e=>{var t,r;let{getInteractor:o}=i({variables:{input:e}}),{t:a}=(0,n.$)("interactor"),s=null===(r=o.data)||void 0===r?void 0:null===(t=r.interactor)||void 0===t?void 0:t.name;return[s||a("new_interactor"),s]}},46768:function(e,t,r){"use strict";r.d(t,{r:function(){return m}});var n=r(52322),o=r(2784),i=r(30813),a=r(65457),s=r(37288),l=r(58367),c=r(24883),u=r(96826),d=r(61076),f=r(41198);let m=e=>{let{children:t,body:r,backAction:m,background:g="$goBackLayoutDefaultBackground",action:h=null,pb:p=16,onScroll:v,scrollEventThrottle:E,scrollViewId:I,scrollRef:x,isScrollEnabled:y,onLayout:T,gap:j=10,isWithoutScroll:_=!1,...b}=e,R=(0,o.useRef)(null);return(0,n.jsx)(u.d,{leftAction:m||(0,n.jsx)(c.X,{}),rightAction:h,background:g,...b,children:_?(0,n.jsxs)(i.G7,{f:1,children:[void 0!==r&&(0,n.jsx)(f.x,{marginBottom:6,children:r}),t]}):(0,n.jsx)(d.M,{scrollRef:R,crease:{mx:-16},isDisabled:!0,children:(0,n.jsx)(a.p,{scrollEnabled:y,mx:-16,pb:p,onScroll:v,scrollEventThrottle:E,id:I,ref:e=>{(0,l.k)(R,e),(0,l.k)(x,e)},onLayout:T,children:(0,n.jsxs)(s.FA,{p:16,gap:j,children:[void 0!==r&&(0,n.jsx)(f.x,{marginBottom:6,children:r}),t]})})})})}},87483:function(e,t,r){"use strict";r.d(t,{B:function(){return n}});let n=(0,r(12294).Ue)((e,t,r)=>{let{getInitialState:n}=r;return{search:"",isSearchFocused:!1,setIsSearchFocused:t=>e({isSearchFocused:t}),setSearch:t=>e({search:t}),reset:()=>e(n())}})},16877:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eI}});var n,o,i=r(52322),a=r(30813),s=r(24609),l=r(36743);let c=r(1517).I;var u=r(80627),d=r(78759),f=r(94241);let{createGenerateMissedImagesForInteractorTemplatesMutation:m}=(0,f.e)("mutation","generateMissedImagesForInteractorTemplates",!0);var g=r(314);let h=(0,g._)("generateMissedImagesForInteractorTemplates",m({isSuccess:!0})),p=()=>{let{generateMissedImagesForInteractorTemplates:e}=h();return{pressHandler:()=>{e.request({})},isLoading:e.loading}},v=()=>{let{pressHandler:e,isLoading:t}=p();return(0,i.jsx)(d.o,{pressHandler:e,isLoading:t})};var E=r(62750),I=r(24883),x=r(51744),y=r(46768),T=r(63955),j=r(11811),_=r(86999),b=r(54017),R=r(69876),O=r(6812),C=r(1616),S=r(48601),L=r(60641);let M=(0,r(33189).C)((0,L.j)(!0)),A=S.Ry({serializedInteractor:M.required("Schema is required")});var k=r(58629);let w=e=>{try{let t=JSON.parse(e);if(!Array.isArray(t))return[e];return t.map(e=>JSON.stringify(e))}catch(e){k.kg.error("[normalizeSerializedInteractor]"),k.kg.error(e)}},D=e=>{let{isFileUpload:t,submit:r}=e,n=t?r:void 0,o=t?void 0:r,i=(0,T.cI)({resolver:(0,O.X)(A),defaultValues:{serializedInteractor:""}}),a=(0,C.F)({accept:".json",type:"file"}),s=async()=>{let e=await a();await (null==n?void 0:n(e))},l=i.handleSubmit(async e=>{let{serializedInteractor:t}=e,r=w(t);(null==r?void 0:r.length)&&(await (null==o?void 0:o(r)),i.reset())});return{methods:i,submit:l,importFileHandler:s}
1},N=e=>{let{isLoading:t,isFileUpload:r,fieldLabel:n,fieldPlaceholder:o="",fieldTooltip:a}=e,{methods:s,submit:l,importFileHandler:c}=D(e);return(0,i.jsxs)(T.RV,{...s,children:[(0,i.jsx)(b._,{isHidden:!r,children:(0,i.jsx)(j.z,{variant:"primary",isLoading:t,disabled:t,onPress:c,loadingAnimation:"spinning",children:"Import file"})}),(0,i.jsxs)(b._,{isHidden:r,children:[(0,i.jsx)(_.W,{name:"serializedInteractor",type:R.EB.Textarea,label:n,placeholder:o,labelTooltip:a}),(0,i.jsx)(j.z,{variant:"primary",isLoading:t,disabled:t,onPress:l,loadingAnimation:"spinning",children:"Import"})]})]})},F=e=>{let{open:t,onClose:r,...n}=e;return(0,i.jsx)(x.y,{open:t,onClose:r,children:(0,i.jsx)(a.G7,{px:E.D4,pt:E.Bg,f:1,children:(0,i.jsx)(y.r,{title:"Import interactors",backAction:(0,i.jsx)(I.X,{onPress:r}),children:(0,i.jsx)(N,{...n})})})})};(n=o||(o={}))[n.IMPORT_DOWNLOADED_INTERACTORS=0]="IMPORT_DOWNLOADED_INTERACTORS",n[n.IMPORT_DOWNLOADED_INTERACTORS_FROM_FILE=1]="IMPORT_DOWNLOADED_INTERACTORS_FROM_FILE",n[n.IMPORT_LLM_GENERATED_INTERACTORS=2]="IMPORT_LLM_GENERATED_INTERACTORS",n[n.GENERATE_MISSED_IMAGES_FOR_INTERACTOR_TEMPLATES=3]="GENERATE_MISSED_IMAGES_FOR_INTERACTOR_TEMPLATES";var P=r(41637),B=r(2784);let{createImportInteractorsFromFileMutation:z}=(0,f.e)("mutation","importInteractorsFromFile"),G=(0,g._)("importInteractorsFromFile",z({interactors:{id:!0,reference:!0,name:!0,avatarUrl:!0,isAvatarResized:!0,anonymousVisitMode:!0,isClaimed:!0,ownInteractor:!0,state:!0,createdAt:!0,menu:{id:!0,title:!0,prompt:!0,order:!0}}}),{context:{isUploadLink:!0}});var $=r(74609);let{createAdminInteractorsQuery:H}=(0,f.e)("query","adminInteractors"),W=H({edges:{cursor:!0,node:{id:!0,name:!0,reference:!0,avatarUrl:!0,isAvatarResized:!0,state:!0,ownInteractor:!0}},hasNextPage:!0,endCursor:!0}),q=(0,$.g)("adminInteractors",W,{fetchPolicy:"cache-and-network"});var U=r(39484);let J=()=>{let[e,t]=(0,B.useState)(!1),{importInteractorsFromFile:r}=G({refetchQueries:[q.document,U.j.document]}),{loading:n}=r;return{isLoading:n,isModalOpened:e,submit:async e=>{await r.request({input:{files:[e]}})},onModalClose:()=>{t(!1)},importInteractorsFromFileOptionHandler:()=>{t(!0)}}},{createImportInteractorsMutation:Q}=(0,f.e)("mutation","importInteractors"),X=(0,g._)("importInteractors",Q({interactors:{id:!0,reference:!0,name:!0,avatarUrl:!0,isAvatarResized:!0,anonymousVisitMode:!0,isClaimed:!0,ownInteractor:!0,state:!0,createdAt:!0,menu:{id:!0,title:!0,prompt:!0,order:!0}}})),V=()=>{let[e,t]=(0,B.useState)(!1),{importInteractors:r}=X({refetchQueries:[q.document,U.j.document]}),{loading:n}=r;return{isLoading:n,isModalOpened:e,submit:async e=>{await r.request({input:{serializedInteractors:e}})},onModalClose:()=>{t(!1)},importInteractorsOptionHandler:()=>{t(!0)}}},{createImportLlmGeneratedInteractorsMutation:Z}=(0,f.e)("mutation","importLlmGeneratedInteractors"),Y=(0,g._)("importLlmGeneratedInteractors",Z({interactors:{id:!0,reference:!0,name:!0,avatarUrl:!0,isAvatarResized:!0,anonymousVisitMode:!0,isClaimed:!0,ownInteractor:!0,state:!0,createdAt:!0,menu:{id:!0,title:!0,prompt:!0,order:!0}}})),K=()=>{let[e,t]=(0,B.useState)(!1),{importLlmGeneratedInteractors:r}=Y({refetchQueries:[q.document,U.j.document]}),{loading:n}=r;return{isLoading:n,isModalOpened:e,submit:async e=>{await r.request({input:{serializedInteractors:e}})},onModalClose:()=>{t(!1)},importLlmGeneratedInteractorsOptionHandler:()=>{t(!0)}}},ee=()=>{let{importInteractorsFromFileOptionHandler:e,...t}=J(),{importInteractorsOptionHandler:r,...n}=V(),{importLlmGeneratedInteractorsOptionHandler:i,...a}=K(),s={[o.IMPORT_DOWNLOADED_INTERACTORS]:r,[o.IMPORT_LLM_GENERATED_INTERACTORS]:i,[o.IMPORT_DOWNLOADED_INTERACTORS_FROM_FILE]:e,[o.GENERATE_MISSED_IMAGES_FOR_INTERACTOR_TEMPLATES]:P.Z};return{optionPressHandler:e=>{(0,s[e.id])()},importInteractorsOption:n,importInteractorsFromFileOption:t,importLlmGeneratedInteractorsOption:a}},et=()=>{let{optionPressHandler:e,importInteractorsOption:t,importInteractorsFromFileOption:r,importLlmGeneratedInteractorsOption:n}=ee();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.M,{onItemPress:e,items:[{id:o.IMPORT_DOW
1NLOADED_INTERACTORS,title:"Import downloaded interactors",titleLeftIcon:(0,i.jsx)(u.r,{size:22,color:"$text"})},{id:o.IMPORT_LLM_GENERATED_INTERACTORS,title:"Import LLM generated interactors",titleLeftIcon:(0,i.jsx)(l.Z,{size:22,color:"$text"})},{id:o.IMPORT_DOWNLOADED_INTERACTORS_FROM_FILE,title:"Import downloaded interactors from file",titleLeftIcon:(0,i.jsx)(c,{size:22,color:"$text"})},{id:o.GENERATE_MISSED_IMAGES_FOR_INTERACTOR_TEMPLATES,title:"Generate missed avatars and headers for market's interactors",ActionIconComponent:v,isPressable:!1}]}),(0,i.jsx)(F,{open:t.isModalOpened,isLoading:t.isLoading,submit:t.submit,onClose:t.onModalClose,fieldLabel:"Downloaded serialized interactor (json)",fieldPlaceholder:"Enter the json of the downloaded serialized interactor here.",fieldTooltip:"To import several interactors at once, combine the JSONs into an array: [{ ... }, { ... }]."}),(0,i.jsx)(F,{open:n.isModalOpened,isLoading:n.isLoading,submit:n.submit,onClose:n.onModalClose,fieldLabel:"Llm generated schema",fieldPlaceholder:"Enter the json of the llm generated interactor here.",fieldTooltip:"To import several interactors at once, combine the JSONs into an array: [{ ... }, { ... }]."}),(0,i.jsx)(F,{isFileUpload:!0,open:r.isModalOpened,isLoading:r.isLoading,submit:r.submit,onClose:r.onModalClose})]})};var er=r(96826),en=r(80601),eo=r(29354),ei=r(97977),ea=r(72046),es=r(26683),el=r(20580),ec=r(11590),eu=r(36728),ed=r(85853);let ef=e=>{let{interactor:t}=e,{id:r,shortDescription:n}=t,[o]=(0,ec.F)({id:r}),i=(0,eu.c)(),a=ed.x.Admin.interactor(r);(0,es.O)([a]);let{thumbnailAvatarUrl:s}=(0,el.M)(t);return{id:r,name:o,shortDescription:n,pressHandler:()=>{i.push(a)},thumbnail:s}},em=e=>{let{interactor:t}=e,{name:r,thumbnail:n,pressHandler:o}=ef({interactor:t});return(0,i.jsx)(ea.I,{title:r,avatarUrl:n,onPress:o})};var eg=r(64368),eh=r(95211),ep=r(87483);let ev=()=>{var e,t;let r=(0,ep.B)(e=>e.search),n=(0,ep.B)(e=>e.setSearch),o=(0,ep.B)(e=>e.isSearchFocused),i=(0,ep.B)(e=>e.setIsSearchFocused),a=(0,eh.nj)(r,500),{getAdminInteractors:s}=q({variables:{input:{limit:50,offset:0,search:a}},notifyOnNetworkStatusChange:!0}),l=(0,B.useMemo)(()=>{var e,t;return null!==(t=null===(e=s.data)||void 0===e?void 0:e.edges.map(e=>e.node))&&void 0!==t?t:[]},[s.data]),c=null!==(t=null===(e=s.data)||void 0===e?void 0:e.hasNextPage)&&void 0!==t&&t,u=s.networkStatus===eg.Ie.fetchMore,d=s.loading&&!u,f=(0,B.useCallback)(()=>{!c||d||u||s.fetchMore({input:{limit:50,offset:l.length,search:a}})},[c,d,u,s,l.length,a]);return{interactors:l,isLoading:d,loadMore:f,hasNextPage:c,isSearchFocused:o,setIsSearchFocused:i,searchText:r,setSearchText:n}},eE=()=>{let{interactors:e,isLoading:t,isSearchFocused:r,setIsSearchFocused:n,searchText:o,setSearchText:s,loadMore:l}=ev(),c=(0,B.useCallback)(e=>(0,i.jsx)(em,{interactor:e}),[]),u=(0,B.useCallback)(e=>e.id,[]);return(0,i.jsx)(a.G7,{f:1,mx:-16,children:(0,i.jsx)(eo.f,{renderItem:c,extractItemId:u,items:e,loadingList:{itemSkeleton:(0,i.jsx)(ei.w,{})},isLoading:t,onEndReached:l,search:{isFocused:r,onChange:s,onFocusChange:n,value:o}})})},eI=()=>(0,i.jsx)(en.t,{children:(0,i.jsxs)(er.d,{title:"Admin › Interactors",leftAction:(0,i.jsx)(I.X,{}),children:[(0,i.jsx)(a.G7,{py:24,children:(0,i.jsx)(et,{})}),(0,i.jsx)(eE,{})]})})},56778:function(e,t,r){"use strict";r.d(t,{L:function(){return o}});var n=r(2784);let o=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];(0,n.useEffect)(()=>{let r=setTimeout(e,t);return()=>{clearTimeout(r)}},r)}},27022:function(e,t,r){"use strict";r.d(t,{j:function(){return n}});let n=(e,t)=>{e.appendChild(t)}},21777:function(e,t,r){"use strict";r.d(t,{r:function(){return n}});let n=e=>{e.forEach(e=>{e&&e.parentNode&&e.parentNode.removeChild(e)})}}},function(e){e.O(0,[6425,4403,8753,7455,1800,5029,4232,8981,5281,1129,9771,9334,4208,9138,9344,6577,783,244,9362,8501,4609,4143,2888,9774,179],function(){return e(e.s=64063)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.