forked from Romeo-Rosete/awesome
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
6504-7b1bf642b5d3924e.js.download
1 lines (1 loc) · 56.8 KB
/
6504-7b1bf642b5d3924e.js.download
1
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6504],{98007:function(e,n,t){t.d(n,{Y:function(){return useDate}});var r=t(2784),o=r.createContext({}),useDate=function(){return r.useContext(o)}},27977:function(e,n,t){var r=t(98007),o=t(89284),i=t(16861),a=t(52903);n.Z=function(e){var n=e.date,t=e.format,l=(0,r.Y)().timezone,s=(e.ignoreProfileTimezone?null:l)||(0,o.Z)()||"UTC",d=(0,i.Z)(n,t||"default",s),u=(0,i.Z)(n,"iso",s);return(0,a.tZ)("time",{dateTime:u,title:d,children:d})}},16861:function(e,n,t){var r=t(82067),o=t(34476),i={default:"MMMM DD, YYYY",short:"MMM DD, YYYY",exhaustive:"YYYY-MM-DD HH:mm:ss",iso:"YYYY-MM-DD:mm:ssZ"};n.Z=function formatDateTime(e,n,t){var a=(0,o.Z)(e);if("iso"===n)return a.toISOString();try{return(0,r.default)(a,i[n]||n,t?{timezone:t}:void 0)}catch(r){try{return a.toLocaleDateString("en-US",t?{timeZone:t}:void 0)}catch(t){return formatDateTime(e,n)}}}},25573:function(e,n,t){var r=t(95030),o=t(2357),i=t(24602),a=t(2784),l=t(81305),s=t(81692),d=t(52903);n.Z=function(e){var n,t=e.onChange,u=(0,a.useCallback)(function(e){var n=e.from,o=e.to,i=n?(0,r.Z)(n,"yyyy-MM-dd"):void 0,a=o?(0,r.Z)(o,"yyyy-MM-dd"):void 0;t((0,s.G)({from:i,hasChange:!0,to:a},function(e){return void 0===e}))},[t]),c=!(0,o.Z)(e.options[0].value.from||"",(0,i.Z)(e.value.from))||!(0,o.Z)(e.options[0].value.to||"",(0,i.Z)(e.value.to)),p=(0,a.useMemo)(function(){var n=e.value.from&&new Date(e.value.from),t=e.value.to&&new Date(e.value.to);return(0,s.G)({from:n,to:t},function(e){return void 0===e})},[e.value.from,e.value.to]);return(0,d.BX)(d.HY,{children:[(0,d.tZ)(l.D,{ariaLabel:"Date Filter",closeText:"Apply",id:e.id,menuAlign:e.menuAlign?e.menuAlign:"left",menuAriaLabel:"Choice of date ranges",onChange:u,options:e.options,placeholder:"Date range",size:e.size,value:e.hideValue?{}:p}),null===(n=e.children)||void 0===n?void 0:n.call(e,{from:e.value.from,hasValue:c,to:e.value.to})]})}},26243:function(e,n,t){t.d(n,{D:function(){return HistoryTabNavigation}});var r=t(5632),o=t(2784),i=t(55414),a=t(91451),l=t(25760),s=t(52903),d={name:"85pk7a-HistoryTabNavigation--navStyle",styles:"display:inline-block;label:HistoryTabNavigation--navStyle;"};function TabItem(e){return(0,s.tZ)(i.x,{type:"pageHeader9",children:e.children})}function HistoryTabNavigation(){var e=(0,r.useRouter)(),n=o.useMemo(function(){return[{href:l._j.log,text:(0,s.tZ)(TabItem,{children:"Zap runs"})},{href:l._j.usage,text:(0,s.tZ)(TabItem,{children:"Task usage"})}]},[]);return(0,s.tZ)("div",{css:d,children:(0,s.tZ)(a.I,{items:n,selectedItemHref:e.asPath,size:"medium"})})}},82792:function(e,n,t){t.d(n,{U:function(){return MassActionResults}});var r=t(2784),o=t(20271),i=t(55414),a=t(26215),l=t(52903),s={name:"sok4pb-MassActionResults--bodyItemStyle",styles:"display:list-item;margin-left:20px;label:MassActionResults--bodyItemStyle;"},d={name:"rok5jp-MassActionResults--rootStyle",styles:"margin-bottom:20px;label:MassActionResults--rootStyle;"};function MassActionResults(e){var n=e.message,t=(0,r.useState)(!1),u=t[0],c=t[1];return((0,r.useEffect)(function(){u&&c(!1)},[null==n?void 0:n.id,c]),!n||u)?null:(0,l.tZ)("div",{css:d,children:(0,l.BX)(o.b,{onDismiss:function(){c(!0)},type:(null==n?void 0:n.messageType)||"info",children:[(n.title||n.text)&&(0,l.BX)("span",{children:[(0,l.tZ)(i.x,{color:"neutral800",type:"paragraph1ShortSemibold",children:n.title}),n.text&&(0,l.BX)("span",{children:[" ",(0,l.tZ)(i.x,{color:"neutral700",type:"paragraph3",children:n.text}),n.link&&(0,l.BX)(l.HY,{children:[" ",(0,l.tZ)(a.r,{href:n.link.href,children:n.link.text})]})]})]}),n.body&&(0,l.tZ)("ul",{children:n.body.map(function(e,n){return(0,l.BX)("li",{css:s,children:[(0,l.tZ)(i.x,{color:"neutral800",type:"paragraph1Short",children:e.message}),e.link&&(0,l.BX)(l.HY,{children:[" ",(0,l.tZ)(a.r,{href:e.link.href,children:(0,l.tZ)(i.x,{color:"blueJeans",type:"paragraph1Short",children:e.link.text})})]})]},n)})})]})})}},48469:function(e,n,t){var r=t(28165),o=t(99029),i=t(47043),a=t(52903),l=(0,r.iv)("border-radius:1.5px;overflow:hidden;position:absolute;top:-23px;width:100%;div:before{background-color:",o.w.neutral200,";background:linear-gradient(\n 90deg,\n ",o.w.blueJeans,",\n rgba(255, 255, 255, 0.3),\n rgba(255, 255, 255, 0)\n )!important;};label:Reloader--reloaderStyle;");n.Z=function(){return(0,a.tZ)("div",{css:l,children:(0,a.tZ)(i.q,{height:3})})}},42075:function(e,n,t){var r,o=t(82269),i=t(7328),a=t(60138),l=t(64368),s=t(33252),d=t(53861),u=["data","error","loading","networkStatus","refetch"],c=(0,a.Ps)(r||(r=(0,i.Z)(["\n query ZapUsage(\n $accountId: ID!\n $apps: [String!]\n $billingPeriodEnd: String\n $billingPeriodStart: String\n $customuserIds: [ID!]\n $folderIds: [ID!]\n $getPeriodUsage: Boolean!\n $periodEnd: String\n $periodStart: String\n $timezone: String\n $zapIds: [ID!]\n ) {\n usageTrend(\n accountId: $accountId\n apps: $apps\n customuserIds: $customuserIds\n folderIds: $folderIds\n periodEnd: $periodEnd\n periodStart: $periodStart\n timezone: $timezone\n zapIds: $zapIds\n ) {\n interval\n tasksByStatus {\n billable\n error\n held\n }\n tasksByDate {\n date\n tasks {\n billable\n }\n }\n totalTasksCount\n }\n periodUsage: usageTrend(\n accountId: $accountId\n periodEnd: $billingPeriodEnd\n periodStart: $billingPeriodStart\n timezone: $timezone\n ) @include(if: $getPeriodUsage) {\n interval\n tasksByDate {\n date\n tasks {\n billable\n }\n }\n }\n zapUsage(\n accountId: $accountId\n apps: $apps\n customuserIds: $customuserIds\n folderIds: $folderIds\n periodEnd: $periodEnd\n periodStart: $periodStart\n timezone: $timezone\n zapIds: $zapIds\n ) {\n edges {\n apps\n lastRun\n tasks {\n billable\n error\n held\n }\n zap {\n id\n isEnabled\n kind\n sourceUrl\n title\n }\n zapId\n zapOwner {\n id\n imageUrl\n name\n }\n }\n totalCount\n }\n }\n"])));n.Z=function(e){var n,t,r,i,a,p,f,m=e.accountId,g=e.billingPeriod,v=e.filters,h=e.getPeriodUsage,y=e.skip,b=e.timezone,I={accountId:m,apps:v.apps,billingPeriodEnd:g.to,billingPeriodStart:g.from,customuserIds:v.ownerIds,folderIds:v.folderIds,getPeriodUsage:void 0!==h&&h,periodEnd:null===(n=v.dateFilter)||void 0===n?void 0:n.to,periodStart:null===(t=v.dateFilter)||void 0===t?void 0:t.from,skip:y,timezone:b,zapIds:v.nodeIds},S=(0,s.T)(c,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,skip:!m,variables:I}),Z=S.data,w=S.error,_=(S.loading,S.networkStatus),F=S.refetch,C=(0,o.Z)(S,u),P=_===l.I.setVariables&&!Z,O=(null==Z?void 0:null===(r=Z.zapUsage)||void 0===r?void 0:r.edges)||[],j=null==Z?void 0:Z.usageTrend;return{error:(0,d.e$)(w),interval:null==j?void 0:j.interval,isLoading:_===l.I.loading||P,isRefetching:_===l.I.refetch||_===l.I.setVariables,onRefetch:function(){m&&F()},periodUsage:null==Z?void 0:Z.periodUsage,stats:{issues:((null==j?void 0:null===(i=j.tasksByStatus)||void 0===i?void 0:i.error)||0)+((null==j?void 0:null===(a=j.tasksByStatus)||void 0===a?void 0:a.held)||0),runs:(null==j?void 0:j.totalTasksCount)||0,tasks:(null==j?void 0:null===(p=j.tasksByStatus)||void 0===p?void 0:p.billable)||0,zaps:null==Z?void 0:null===(f=Z.zapUsage)||void 0===f?void 0:f.totalCount},taskTrend:null==j?void 0:j.tasksByDate,usingCache:C.usingCache,zapUsage:O}}},27338:function(e,n,t){t.d(n,{t:function(){return UserFilter}});var r,o,i,a=t(23273),l=t(41273),s=t(23131),d=t(95235),u=t(12741),c=t(7328),p=t(60138),f=t(40794),m=t(64368),g=t(54073),v=t.n(g),h=t(2784),y=t(25760),b=t(33252);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach(function(n){(0,d.Z)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var I=(0,p.Ps)(r||(r=(0,c.Z)(["\n fragment Member on Member {\n email\n id\n imageUrl\n name\n recordId\n }\n"]))),S=(0,p.Ps)(o||(o=(0,c.Z)(["\n ","\n\n query AccountMember($accountId: ID!, $memberIds: [ID!]!) {\n account(id: $accountId) {\n id\n membersById(ids: $memberIds) {\n edges {\n ...Member\n }\n }\n }\n }\n"])),I),Z=(0,p.Ps)(i||(i=(0,c.Z)(["\n ","\n\n query AccountMembers(\n $accountId: ID!\n $limit: Int\n $offset: Int\n $search: String\n $userId: ID\n ) {\n account(id: $accountId) {\n id\n currentUser: member(id: $userId) {\n ...Member\n }\n members(limit: $limit, offset: $offset, search: $search) {\n edges {\n ...Member\n }\n totalCount\n }\n }\n }\n"])),I),w=t(52903);function UserFilter(e){var n,t,r,o,i,l,d,c,p,g,I,_,F,C,P,O,j,$,k,D,M,x,z,R,A,B,L,E,T,N=e.value||[],U=e.onChange,H=(p=(n={accountId:e.accountId,memberIds:N,userId:e.userId}).accountId,I=void 0===(g=n.memberIds)?[]:g,_=n.userId,C=(F=(0,h.useState)(""))[0],P=F[1],j=(O=(0,b.T)(Z,{notifyOnNetworkStatusChange:!0,skip:!p,variables:{accountId:p,limit:y.ZP,offset:0,search:C,userId:_}})).client,$=O.data,k=O.error,D=O.loading,M=O.fetchMore,x=O.networkStatus,z=(0,f.a)(S,{skip:!p||0===I.length,variables:{accountId:p,memberIds:I}}),R=null==$?void 0:null===(t=$.account)||void 0===t?void 0:t.currentUser,A=(null==$?void 0:null===(r=$.account)||void 0===r?void 0:null===(o=r.members)||void 0===o?void 0:o.edges)||[],B=z.loading?Object.values(j.cache.extract()).filter(function(e){return"Member"===e.__typename&&I.includes(String(e.recordId))}):(null===(i=z.data)||void 0===i?void 0:i.account.membersById.edges)||[],L=(0,h.useCallback)(v()(P,500),[]),E=0===C.length||(null==R?void 0:null===(l=R.name)||void 0===l?void 0:l.toLowerCase().includes(C.toLowerCase())),T=[!D&&E?_objectSpread(_objectSpread({},R),{},{name:null==R?void 0:R.name}):void 0].concat((0,u.Z)(A.filter(function(e){return e.recordId!==(null==R?void 0:R.recordId)}).sort(function(e,n){return(e.name||e.email).localeCompare(n.name||n.email)}).filter(Boolean))).filter(Boolean),{error:k,isLoading:D,isLoadingMore:x===m.I.fetchMore,members:T,onLoadMore:A.length<((null==$?void 0:null===(d=$.account)||void 0===d?void 0:null===(c=d.members)||void 0===c?void 0:c.totalCount)||0)?function(){M({updateQuery:function(e,n){var t,r,o,i,a,l=n.fetchMoreResult;return l?_objectSpread(_objectSpread({},l),{},{account:_objectSpread(_objectSpread({},l.account),{},{members:_objectSpread(_objectSpread({},null===(t=l.account)||void 0===t?void 0:t.members),{},{edges:[].concat((0,u.Z)((null===(r=e.account)||void 0===r?void 0:null===(o=r.members)||void 0===o?void 0:o.edges)||[]),(0,u.Z)((null===(i=l.account)||void 0===i?void 0:null===(a=i.members)||void 0===a?void 0:a.edges)||[]))})})}):e},variables:{accountId:p,limit:y.ZP,offset:A.length,search:C,userId:_}})}:void 0,onSearch:L,search:C,selectedMembers:B}),X=H.isLoading,q=H.isLoadingMore,Y=H.members,K=H.onLoadMore,Q=H.onSearch,W=H.selectedMembers,V=null==W?void 0:W[0];return(0,w.BX)(w.HY,{children:[(0,w.tZ)(s.p,{ariaLabel:e.ariaLabel,autoComplete:"off",floatingMenuProps:e.floatingMenuProps,getKeyForItem:function(e){return e.recordId},getLabelForItem:function(e){return(null==e?void 0:e.name)||(null==e?void 0:e.email)},inputId:e.id,isBusy:X,isLoadingMore:q,items:Y,menuAriaLabel:e.menuAriaLabel,onChange:function(e){return U(null==e?void 0:e.recordId)},onInputValueChange:function(e){return Q(e.inputValue||"")},onLoadMore:K,openOnFocus:!0,placeholder:e.placeholder||"All users",renderIcon:function(e,n,t){return e?(0,w.tZ)(UserIcon,{item:e,size:25}):t?(0,w.tZ)(a.J,{name:"magnifyingGlass",size:24}):(0,w.tZ)(a.J,{name:"personOne",size:24})},selectedItem:e.allowMultipleSelections?null:V||null,showErrorOnNoResults:!1,showLoadMore:!!K,size:"small"}),e.children&&e.children({memberIds:N,selectedMembers:W})]})}function UserIcon(e){var n=e.item,t=e.size;return n?(0,w.tZ)(l.q,{ariaHidden:!0,name:String(n.name),size:t,url:n.imageUrl}):null}},60352:function(e,n,t){t.d(n,{L:function(){return BetaToggle}});var r=t(81333),o=t(61446),i=t(55414),a=t(1795),l=t(581),s=t(9265),d=t(25760),u=t(52903);function BetaToggle(){var e=(0,l.i)().emitEvent,n=(0,s._)("use_beta_observe_dashboard",!1),t=(0,r.Z)(n,2),c=t[0],p=t[1],f="Try the new Zap runs";return(0,u.BX)(o.l,{children:[(0,u.tZ)(i.x,{type:"smallPrint1Semibold",children:f}),(0,u.tZ)(a.Z,{checked:c,onChange:function(n){p(n.currentTarget.checked),e({eventName:d.rw,meta:{event_action:"click",interaction_goal:d.X7,interaction_name:"zap_run_opt_in_toggle",interaction_raw_text:f,option_selected:n.currentTarget.checked?"on":"off"}})}})]})}},35281:function(e,n,t){t.d(n,{Z:function(){return AppFilter_AppFilter}});var r,o,i,a=t(23273),l=t(64476),s=t(23131),d=t(12741),u=t(95235),c=t(7328),p=t(60138),f=t(40794),m=t(64368),g=t(54073),v=t.n(g),h=t(2784),y=t(25760),b=t(33252);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach(function(n){(0,u.Z)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var I=(0,p.Ps)(r||(r=(0,c.Z)(["\n fragment AppResult on App {\n currentImplementation {\n id\n }\n id\n images {\n url16X16\n url32X32\n url64X64\n url128X128\n }\n name\n slug\n }\n"]))),S=(0,p.Ps)(o||(o=(0,c.Z)(["\n ","\n\n query AppsWithCurrentImplementationId($ids: [ID!]!) {\n appsByCurrentImplementationId(ids: $ids) {\n ...AppResult\n }\n }\n"])),I),Z=(0,p.Ps)(i||(i=(0,c.Z)(["\n ","\n\n query AppsByNameSearch(\n $excludeUpcoming: Boolean\n $limit: Int!\n $nameContains: String!\n $offset: Int\n ) {\n getAppsByNameContains(\n excludeUpcoming: $excludeUpcoming\n limit: $limit\n nameContains: $nameContains\n offset: $offset\n ) {\n edges {\n ...AppResult\n }\n totalCount\n }\n }\n"])),I),w=t(52903),_={name:"1c1rqyc-AppFilter--iconStyle",styles:"&[data-disabled]{opacity:0.6;};label:AppFilter--iconStyle;"};function TypeaheadIcon(e){var n=e.item;return n&&n.images?(0,w.tZ)("span",{css:_,children:(0,w.tZ)(l.A,{ariaHidden:!0,serviceName:n,size:30,src:n.images.url32X32})}):null}var AppFilter_AppFilter=function(e){var n,t,r,o,i,l,u,c,p,g,I,_,F,C,P,O,j=e.value||[],$=(u=(n={ids:j}).ids,c=n.limit,g=(p=(0,h.useState)(""))[0],I=p[1],_=(0,b.T)(Z,{notifyOnNetworkStatusChange:!0,variables:{excludeUpcoming:!0,limit:c||y.ZP,nameContains:g}}),F=(0,f.a)(S,{skip:0===u.length,variables:{ids:u}}),C=(0,h.useCallback)(v()(function(e){return I(e||"")},300),[]),P=(null==_?void 0:null===(t=_.data)||void 0===t?void 0:null===(r=t.getAppsByNameContains)||void 0===r?void 0:r.edges)||[],O=F.loading?Object.values(F.client.cache.extract()).map(function(e){var n,t,r,o=null===(n=e.currentImplementation)||void 0===n?void 0:null===(t=n.__ref)||void 0===t?void 0:null===(r=t.split(":"))||void 0===r?void 0:r[1];return"App"===e.__typename&&u.includes(o)?_objectSpread(_objectSpread({},e),{},{currentImplementation:_objectSpread(_objectSpread({},e.currentImplementation),{},{id:o})}):null}).filter(Boolean):(null===(o=F.data)||void 0===o?void 0:o.appsByCurrentImplementationId)||[],{apps:P,isAppLoading:F.loading,isLoadingMore:_.networkStatus===m.I.fetchMore,isSearchLoading:_.loading,onLoadMore:P.length<((null===(i=_.data)||void 0===i?void 0:null===(l=i.getAppsByNameContains)||void 0===l?void 0:l.totalCount)||0)?function(){_.fetchMore({updateQuery:function(e,n){var t,r,o,i,a=n.fetchMoreResult;return a?_objectSpread(_objectSpread({},a),{},{getAppsByNameContains:_objectSpread(_objectSpread({},null==a?void 0:a.getAppsByNameContains),{},{edges:[].concat((0,d.Z)((null===(t=e.getAppsByNameContains)||void 0===t?void 0:t.edges)||[]),(0,d.Z)((null==a?void 0:null===(r=a.getAppsByNameContains)||void 0===r?void 0:r.edges)||[])),totalCount:null!==(o=null==a?void 0:null===(i=a.getAppsByNameContains)||void 0===i?void 0:i.totalCount)&&void 0!==o?o:0})}):e},variables:{excludeUpcoming:!0,limit:c||y.ZP,offset:P.length,nameContains:g}})}:void 0,onSearch:C,selectedApps:O}),k=$.apps,D=$.isAppLoading,M=$.isLoadingMore,x=$.isSearchLoading,z=$.onSearch,R=$.onLoadMore,A=$.selectedApps,B=s.p;return(0,w.BX)(w.HY,{children:[(0,w.tZ)(B,{ariaLabel:"App Search",autoComplete:"off",floatingMenuProps:e.floatingMenuProps,getKeyForItem:function(e){return e.id},getLabelForItem:function(e){return e.name},inputId:e.id,isBusy:x||D,isLoadingMore:M,items:k,menuAriaLabel:"List of apps to filter by",onChange:function(n){var t;return e.onChange((null==n?void 0:null===(t=n.currentImplementation)||void 0===t?void 0:t.id)||void 0)},onInputValueChange:function(e){z(e.inputValue||"")},onLoadMore:R,openOnFocus:!0,placeholder:"Apps",renderIcon:function(e,n,t){return e?(0,w.tZ)(TypeaheadIcon,{item:e}):t?(0,w.tZ)(a.J,{name:"magnifyingGlass",size:24}):(0,w.tZ)(a.J,{name:"navApps",size:24})},selectedItem:null,showErrorOnNoResults:!1,showLoadMore:!!R,size:"small"}),e.children&&e.children({appIds:j,selectedApps:A})]})}},94485:function(e,n,t){t.d(n,{G:function(){return FilterChip}});var r=t(28165),o=t(3e3),i=t(99029),a=t(10391),l=t(53939),s=t(23273),d=t(2784),u=t(28316);function Portal(e){var n=e.children,t=e.portalName,r=e.type,o=d.useRef();return(d.useEffect(function(){o.current||(o.current=document.createElement("div"));var e=o.current,n=document.getElementById(t);return r&&o.current.setAttribute("data-type",r),null==n||n.append(e),function(){null==n||n.removeChild(e)}},[n,t,r]),o.current)?(0,u.createPortal)(n,o.current):null}var c=t(96506),p=t(52903),f={name:"1mg2jud-FilterChip--disabledCss",styles:"&:hover{box-shadow:none;};label:FilterChip--disabledCss;"},m={name:"1c7qwsj-FilterChip--dateFilterCss",styles:"max-width:24rem;label:FilterChip--dateFilterCss;"},g=(0,r.iv)(o.ZT.paragraph3," max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;;label:FilterChip--valueCss;"),v=(0,r.iv)("align-items:center;background-color:",i.w.neutral200,";border:1px ",i.w.neutral600," solid;border-radius:30px;display:grid;grid-auto-flow:column;height:44px;padding:9px 16px;&:hover{box-shadow:",a.f.elevation5,";.",g.name,"{font-weight:600;}};label:FilterChip--rootCss;"),h=(0,r.iv)(o.ZT.paragraph3Semibold,";;label:FilterChip--titleCss;");function FilterChip(e){var n=e.children,t=e.image,r=e.onClear,o=e.type,i=e.value,a="Filtered by ".concat(o,": ").concat(i,". Click to clear.");return r?(0,p.tZ)(Portal,{portalName:c.b,type:o,children:(0,p.BX)("button",{css:v,onClick:r,title:a,children:[t||(0,p.BX)("span",{css:h,children:[o,":"]}),(0,p.tZ)(l.L,{width:t?10:5}),(0,p.tZ)("span",{css:[g,o===c.$.dateRange&&m,";label:FilterChip--FilterChip;"],"data-value":i,children:null!=n?n:i}),(0,p.tZ)(l.L,{width:16}),(0,p.tZ)(s.J,{color:"neutral800",name:"formX",size:24})]})}):(0,p.tZ)(Portal,{portalName:c.b,type:o,children:(0,p.BX)("span",{css:[v,f,";label:FilterChip--FilterChip;"],children:[t||(0,p.BX)("span",{css:h,children:[o,":"]}),(0,p.tZ)(l.L,{width:5}),(0,p.tZ)("span",{css:[g,o===c.$.dateRange&&m,";label:FilterChip--FilterChip;"],"data-value":i,children:null!=n?n:i})]})})}},48751:function(e,n,t){var r=t(12741),o=t(28165),i=t(95030),a=t(24602),l=t(2784),s=t(3e3),d=t(99029),u=t(55414),c=t(53939),p=t(20110),f=t(23273),m=t(64476),g=t(41273),v=t(67762),h=t(26215),y=t(25573),b=t(27338),I=t(87234),S=t(11606),Z=t(52522),w=t(93332),_=t(35281),F=t(96506),C=t(94485),P=t(22345),O=t(39740),j=t(52903),$=(0,Z.uq)({desktop:{name:"d457tn-Filters--desktop",styles:"grid-template-rows:auto 1fr;label:Filters--desktop;"},mobile:{name:"1kc4vkm-Filters--mobile",styles:"display:grid;grid-gap:20px;label:Filters--mobile;"}}),k=(0,o.iv)('align-items:center;display:flex;flex-wrap:wrap;gap:10px;& [data-type="',F.$.dateRange,'"]{order:1;}& [data-type="',F.$.zap,'"]{order:2;}& [data-type="',F.$.app,'"]{order:3;}& [data-type="',F.$.folder,'"]{order:4;}& [data-type="',F.$.owner,'"]{order:5;}& [data-type="',F.$.clearAll,'"]{order:100;};label:Filters--badgeRow;'),D=(0,o.iv)(s.ZT.smallPrint1Bold," color:",d.w.blueJeans,";padding:0 10px;;label:Filters--clearStyle;"),M=(0,Z.uq)({desktop:{name:"uf0oee-Filters--desktop",styles:"grid-template-columns:minmax(200px, 1fr) repeat(4, minmax(100px, 1fr)) auto;grid-template-rows:1fr;label:Filters--desktop;"},tablet:{name:"u5v896-Filters--tablet",styles:"align-items:flex-end;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr;max-height:100vh;overflow:initial;label:Filters--tablet;"},mobile:{name:"1vno4fb-Filters--mobile",styles:"display:grid;grid-gap:10px;max-height:0px;overflow:hidden;transition:max-height 0.25s ease-in-out;label:Filters--mobile;"}}),x=(0,Z.uq)({desktop:{name:"1g5a88i-Filters--desktop",styles:"grid-template-columns:minmax(155px, 1fr) repeat(4, minmax(100px, 1fr)) auto;label:Filters--desktop;"}}),z=(0,Z.uq)({mobile:{name:"4kcf0-Filters--mobile",styles:"overflow:initial;max-height:100vh;label:Filters--mobile;"}}),R={large:{align:"right",maxWidth:"500%"},medium:{align:"left",maxWidth:"200%"},small:{align:"stretch"}},A={large:{align:"left",maxWidth:"300%",minWidth:"100%"},medium:{align:"right",maxWidth:"300%",minWidth:"100%"},small:{align:"stretch"}},B={large:{align:"right",maxWidth:"400%"},medium:{align:"right",maxWidth:"200%"},small:{align:"stretch"}},L={large:{align:"left",maxWidth:"500%"},medium:{align:"left",maxWidth:"200%"},small:{align:"stretch"}};n.Z=function(e){var n=e.filters,t=e.onClearFilters,o=e.onFilterChange,s=e.onRefreshData,d=(0,I.g)(),E=d.accountId,T=d.currentBillingPeriod,N=d.isTeam,U=d.userId,H=(0,l.useState)(!1),X=H[0],q=H[1],Y=(0,S.t)(),K=(0,l.useMemo)(function(){return(0,w.by)({from:null!=T&&T.from?new Date(null==T?void 0:T.from):void 0,to:null!=T&&T.to?new Date(null==T?void 0:T.to):void 0})},[T.from]);return(0,j.BX)("div",{children:[(0,j.BX)("div",{css:Z.CD,children:[(0,j.tZ)(u.x,{type:"smallPrint1Bold",children:"Filters"}),(0,j.tZ)(c.L,{height:"5px"})]}),(0,j.BX)("div",{css:$,children:[(0,j.BX)("div",{css:Z.CD,children:[(0,j.BX)(p.z,{color:"secondary",isFullWidth:!0,onClick:function(){return q(!X)},children:[X?"Hide":"Show"," Filters"]}),(0,j.tZ)(c.L,{height:"10px"})]}),(0,j.BX)("div",{css:[M,N&&x,X&&z,";label:Filters--Filters;"],children:[(0,j.tZ)(y.Z,{hideValue:!0,id:"HistoryDateFilter",onChange:function(e){return o("dateFilter",e)},options:K,size:Y,value:n.dateFilter,children:function(e){var n=e.from,t=e.hasValue,r=e.to,l=(0,w._)(n,r,K),s="large"===Y?"MM/dd/yyyy":"MMM d",d="".concat((0,i.Z)((0,a.Z)(n),s)," - ").concat((0,i.Z)((0,a.Z)(r),s));return(0,j.BX)(C.G,{image:(0,j.tZ)(f.J,{name:"actionCalendar",size:24}),onClear:t?function(){return o("dateFilter",{hasChange:!0})}:void 0,type:F.$.dateRange,value:d,children:[(0,j.tZ)(u.x,{type:"paragraph3Bold",children:l&&"".concat(l,": ")}),(0,j.tZ)(u.x,{type:"paragraph3",children:d})]})}}),(0,j.tZ)(O.Z,{accountId:E,floatingMenuProps:L[Y],id:"HistoryZapFilter",onChange:function(e){o("nodeIds",(0,r.Z)(new Set([].concat((0,r.Z)(n.nodeIds),[e]))))},value:n.nodeIds,children:function(e){var t=e.selectedZaps;return e.zapIds.map(function(e){var i=t.find(function(n){return String(n.id)===e});return(0,j.tZ)(C.G,{image:i?(0,j.tZ)(f.J,{name:(null==i?void 0:i.kind)==="transfer"?"arrowConnect":"miscBoltAlt",size:24}):void 0,onClear:function(){return o("nodeIds",(0,r.Z)(n.nodeIds||[]).filter(function(n){return n!==e}))},type:F.$.zap,value:null!=i&&i.id?i.title||"Name your zap":e},e)})}}),(0,j.tZ)(_.Z,{floatingMenuProps:R[Y],id:"HistoryAppFilter",onChange:function(e){return o("apps",(0,r.Z)(new Set([].concat((0,r.Z)(n.apps),[e]))))},value:n.apps,children:function(e){var t=e.appIds,i=e.selectedApps;return t.map(function(e){var t,a=i.find(function(n){var t;return(null===(t=n.currentImplementation)||void 0===t?void 0:t.id)===e});return(0,j.tZ)(C.G,{image:a?(0,j.tZ)(m.A,{ariaHidden:!0,serviceName:null==a?void 0:a.name,size:20,src:(null==a?void 0:null===(t=a.images)||void 0===t?void 0:t.url16X16)||""}):void 0,onClear:function(){return o("apps",(0,r.Z)(n.apps||[]).filter(function(n){return n!==e}))},type:F.$.app,value:(null==a?void 0:a.name)||e},e)})}}),(0,j.tZ)(P.Z,{accountId:E,floatingMenuProps:A[Y],id:"HistoryFolderFilter",onChange:function(e){return o("folderIds",(0,r.Z)(new Set([].concat((0,r.Z)(n.folderIds),[e]))))},value:n.folderIds,children:function(e){var t=e.folderIds,i=e.selectedFolders;return t.map(function(e){var t=i.find(function(n){return String(n.id)===e});return(0,j.tZ)(C.G,{image:t?(0,j.tZ)(f.J,{name:"navFolder",size:24}):void 0,onClear:function(){return o("folderIds",(0,r.Z)(n.folderIds||[]).filter(function(n){return String(n)!==String(e)}))},type:F.$.folder,value:(null==t?void 0:t.title)||e},e)})}}),N&&(0,j.tZ)(b.t,{accountId:E,allowMultipleSelections:!0,ariaLabel:"Zap Owner Search",floatingMenuProps:B[Y],id:"HistoryUserFilter",menuAriaLabel:"list of Zap owners",onChange:function(e){return o("ownerIds",(0,r.Z)(new Set([].concat((0,r.Z)(n.ownerIds),[String(e)]))))},placeholder:"Owners",userId:U,value:n.ownerIds,children:function(e){var t=e.memberIds,i=e.selectedMembers;return t.map(function(e){var t=i.find(function(n){return String(n.recordId)===e});return(0,j.tZ)(C.G,{image:t?(0,j.tZ)(g.q,{ariaHidden:!0,name:String(t.name),size:25,url:t.imageUrl}):void 0,onClear:function(){return o("ownerIds",(0,r.Z)(n.ownerIds||[]).filter(function(n){return String(n)!==String(e)}))},type:F.$.owner,value:(null==t?void 0:t.name)||e},e)})}}),(0,j.tZ)(v.h,{icon:"actionAutoRenew",label:"Refresh",onClick:s})]}),(0,j.tZ)("div",{css:k,id:F.b,children:(0,j.tZ)("div",{css:D,"data-type":"Clear All",children:(0,j.tZ)(h.r,{color:"inherit",onClick:t,children:"Clear all"})})})]})]})}},22345:function(e,n,t){t.d(n,{Z:function(){return FolderFilter_FolderFilter}});var r,o,i,a=t(23273),l=t(23131),s=t(95235),d=t(12741),u=t(7328),c=t(60138),p=t(40794),f=t(64368),m=t(54073),g=t.n(m),v=t(2784),h=t(25760),y=t(33252);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach(function(n){(0,s.Z)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var b=(0,c.Ps)(r||(r=(0,u.Z)(["\n fragment FolderResult on Folder {\n id\n title\n }\n"]))),I=(0,c.Ps)(o||(o=(0,u.Z)(["\n ","\n\n query FoldersByName(\n $accountId: ID!\n $limit: Int\n $offset: Int\n $title: String\n ) {\n account(id: $accountId) {\n id\n folders(limit: $limit, offset: $offset, title: $title) {\n edges {\n ...FolderResult\n }\n totalCount\n }\n }\n }\n"])),b),S=(0,c.Ps)(i||(i=(0,u.Z)(["\n ","\n\n query FoldersById($accountId: ID!, $ids: [ID!]!) {\n account(id: $accountId) {\n id\n folders(ids: $ids) {\n edges {\n ...FolderResult\n }\n }\n }\n }\n"])),b),Z={__typename:"Folder",id:"0",title:"Home"},useFolders_useFolders=function(e){var n,t,r,o,i,a,l,s=e.accountId,u=e.folderIds,c=void 0===u?[]:u,m=(0,v.useState)(""),b=m[0],w=m[1],_=(0,y.T)(I,{notifyOnNetworkStatusChange:!0,skip:!s,variables:{accountId:s,limit:h.ZP,offset:0,title:b}}),F=_.client,C=_.data,P=_.error,O=_.fetchMore,j=_.loading,$=_.networkStatus,k=c.filter(function(e){return e!==Z.id.toString()}),D=(0,p.a)(S,{skip:!s||0===k.length,variables:{accountId:s,ids:k}}),M=g()(function(e){return w((null==e?void 0:e.inputValue)||"")},300),x="home".includes((b||"").toLowerCase()),z=(null==C?void 0:null===(n=C.account)||void 0===n?void 0:null===(t=n.folders)||void 0===t?void 0:t.edges)||[],R=[x&&Z].concat((0,d.Z)(z)).filter(Boolean),A=D.loading?Object.values(F.cache.extract()).filter(function(e){return"Folder"===e.__typename&&c.includes(String(e.id))}):(null==D?void 0:null===(r=D.data)||void 0===r?void 0:null===(o=r.account)||void 0===o?void 0:null===(i=o.folders)||void 0===i?void 0:i.edges)||[];return c.includes(Z.id.toString())&&(A=[Z].concat((0,d.Z)(A))),{error:P,folders:R,isLoading:j,isLoadingMore:$===f.I.fetchMore,onLoadMore:z.length<((null==C?void 0:null===(a=C.account)||void 0===a?void 0:null===(l=a.folders)||void 0===l?void 0:l.totalCount)||0)?function(){O({updateQuery:function(e,n){var t,r,o,i,a,l=n.fetchMoreResult;return l?_objectSpread(_objectSpread({},l),{},{account:_objectSpread(_objectSpread({},l.account),{},{folders:_objectSpread(_objectSpread({},null==l?void 0:null===(t=l.account)||void 0===t?void 0:t.folders),{},{edges:[].concat((0,d.Z)((null===(r=e.account)||void 0===r?void 0:null===(o=r.folders)||void 0===o?void 0:o.edges)||[]),(0,d.Z)((null==l?void 0:null===(i=l.account)||void 0===i?void 0:null===(a=i.folders)||void 0===a?void 0:a.edges)||[]))})})}):e},variables:{accountId:s,limit:h.ZP,offset:z.length,title:b}})}:void 0,onSearch:M,selectedFolders:A}},w=t(52903),FolderFilter_FolderFilter=function(e){var n=e.value||[],t=e.accountId,r=e.onChange,o=useFolders_useFolders({accountId:t,folderIds:n}),i=o.folders,s=o.isLoading,d=o.isLoadingMore,u=o.onLoadMore,c=o.onSearch,p=o.selectedFolders,f=l.p;return(0,w.BX)(w.HY,{children:[(0,w.tZ)(f,{ariaLabel:"Folder search",autoComplete:"off",floatingMenuProps:e.floatingMenuProps,getKeyForItem:function(e){return e.id},getLabelForItem:function(e){return e.title},inputId:e.id,isBusy:s,isLoadingMore:d,items:i,menuAriaLabel:"list of folders",onChange:function(e){return r((null==e?void 0:e.id.toString())||void 0)},onInputValueChange:c,onLoadMore:u,openOnFocus:!0,placeholder:"Folders",renderIcon:function(e,n,t){return e||!t?(0,w.tZ)(a.J,{name:"navFolder",size:24}):(0,w.tZ)(a.J,{name:"magnifyingGlass",size:24})},selectedItem:null,showErrorOnNoResults:!0,showLoadMore:!!u,size:"small"}),e.children&&e.children({folderIds:n,selectedFolders:p})]})}},39740:function(e,n,t){var r=t(23273),o=t(23131),i=t(91416),a=t(52903);n.Z=function(e){var n=e.value||[],t=e.onChange,l=(0,i.mR)({accountId:e.accountId,zapIds:n}),s=l.isLoading,d=l.isLoadingMore,u=l.onLoadMore,c=l.onSearch,p=l.selectedZaps,f=l.zaps,m=o.p;return(0,a.BX)(a.HY,{children:[(0,a.tZ)(m,{ariaLabel:"Zap Search",autoComplete:"off",floatingMenuProps:e.floatingMenuProps,getKeyForItem:function(e){return e.id},getLabelForItem:function(e){return e.title||"Name your zap (#".concat(e.id,")")},inputId:e.id,isBusy:s,isLoadingMore:d,items:f,menuAriaLabel:"list of zaps",onChange:function(e){return t((null==e?void 0:e.id)||void 0)},onInputValueChange:c,onLoadMore:u,openOnFocus:!0,placeholder:"Zaps",renderIcon:function(e,n,t){return(null==e?void 0:e.kind)==="transfer"?(0,a.tZ)(r.J,{name:"arrowConnect",size:24}):(null==e?void 0:e.kind)!=="workflow"&&t?(0,a.tZ)(r.J,{name:"magnifyingGlass",size:24}):(0,a.tZ)(r.J,{name:"miscBoltAlt",size:24})},selectedItem:null,showErrorOnNoResults:!1,showLoadMore:!!u,size:"small"}),e.children&&e.children({selectedZaps:p,zapIds:n})]})}},96506:function(e,n,t){t.d(n,{$:function(){return o},b:function(){return i}});var r,o,i="badge-portal";(r=o||(o={})).action="Action",r.dateRange="Date range",r.search="Search",r.status="Status",r.app="App",r.zap="Zap",r.folder="Folder",r.owner="Owner",r.clearAll="Clear All",r.issuesZaps="My Zaps",r.issuesDateRange="Last 7 days"},21973:function(e,n,t){t.d(n,{kW:function(){return ExportErrorNotification},a3:function(){return N},nM:function(){return U}});var r=t(95235),o=t(20406),i=t(28526),a=t.n(i),l=t(25237),s=t.n(l),d=t(5632),u=t(2784),c=t(89284),p=t(26215),f=t(55414),m=t(20110),g=t(53939),v=t(82792),h=t(25760),y=t(11606),b=t(87234),I=t(93273),S=t(63615),Z=t(89381),w=t(581),_=t(52522),F=t(65626),C=t(26243),P=t(28726),O=t(16931),j=t(42075),$=t(60352),k=t(48751),D=t(32931),M=t(52903);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach(function(n){(0,r.Z)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var x=(0,_.uq)({tablet:{name:"1opyar6-HistoryPage--tablet",styles:"align-items:center;display:flex;justify-content:space-between;label:HistoryPage--tablet;"},mobile:{name:"1tigkjd-HistoryPage--mobile",styles:"display:grid;grid-gap:30px;label:HistoryPage--mobile;"}}),z=(0,_.uq)({tablet:{name:"1opyar6-HistoryPage--tablet",styles:"align-items:center;display:flex;justify-content:space-between;label:HistoryPage--tablet;"},mobile:{name:"f5gfc8-HistoryPage--mobile",styles:"margin-top:30px;display:grid;label:HistoryPage--mobile;"}}),R=(0,_.uq)({tablet:{name:"nyes8g-HistoryPage--tablet",styles:"display:flex;margin-top:40px;width:30%;label:HistoryPage--tablet;"},mobile:{name:"cb5ayi-HistoryPage--mobile",styles:"display:flex;margin-top:30px;width:100%;label:HistoryPage--mobile;"}}),A=s()(function(){return t.e(8517).then(t.bind(t,38517))},{loadableGenerated:{webpack:function(){return[38517]}}}),B=s()(function(){return t.e(1481).then(t.bind(t,27462))},{loadableGenerated:{webpack:function(){return[27462]}}}),L=s()(function(){return t.e(7707).then(t.bind(t,67707))},{loadableGenerated:{webpack:function(){return[67707]}}}),E=s()(function(){return t.e(9766).then(t.bind(t,19766))},{loadableGenerated:{webpack:function(){return[19766]}}}),T=s()(function(){return Promise.all([t.e(550),t.e(4447)]).then(t.bind(t,97036)).then(function(e){return e.UniversalFilter})},{loadableGenerated:{webpack:function(){return[97036]}}}),ExportErrorNotification=function(e){return{message:(0,M.BX)(M.HY,{children:["An issue occurred when preparing your export. Please try again or"," ",(0,M.tZ)(p.r,{href:"/app/get-help",children:"contact support"})," for assistance.",e&&(0,M.BX)("div",{children:["Error: ",(0,M.tZ)("em",{children:e})]})]}),type:"error"}},N={message:"Your export will be emailed to you shortly.",type:"success"},U=(0,u.memo)(function(e){var n,t,i=e.children,l=e.showFilters,s=(0,y.t)(),p=(0,d.useRouter)(),_=(0,b.g)(),U=_.accountId,H=_.currentBillingPeriod,X=_.isTeam,q=_.userId,Y=(0,I.MN)(),K=(0,S.V)().flags,Q=(0,c.Z)(),W=(0,P.l)().createNotification,V=(0,u.useMemo)(function(){return(0,F.Qn)(p.query,p.asPath)},[p]),G=p.pathname===h._j.log,J=p.pathname===h._j.audit,ee=p.pathname===h._j.usage,en=(0,Z.W)({filters:V}).onDownload,et=(0,u.useState)(new Date),er=et[0],eo=et[1],ei=(0,u.useState)({onDelete:function(){},show:!1}),ea=ei[0],el=ei[1],es=(0,u.useState)({show:!1}),ed=es[0],eu=es[1],ec=(0,u.useState)({onReplay:function(){},show:!1,allowTaskReplay:!1}),ep=ec[0],ef=ec[1],em=(0,u.useState)(!1),eg=em[0],ev=em[1],eh=(0,w.i)().emitEvent;(0,u.useEffect)(function(){ev(!!Y.actionError)},[Y.actionError]),(0,u.useEffect)(function(){if(q){var e;null===(e=window._kiq)||void 0===e||e.push(["identify",q])}},[q]);var ey=(0,u.useCallback)((n=(0,o.Z)(a().mark(function _callee(e,n,t){return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:eu({args:{actionableRunCount:e,isAllSelected:n,runIds:t},show:!0});case 1:case"end":return r.stop()}},_callee)})),function(e,t,r){return n.apply(this,arguments)}),[]),eb=(0,u.useCallback)(function(e,n){el({onDelete:e,show:n})},[]),eI=(0,u.useCallback)(function(e,n,t){ef({onReplay:e,show:n,allowTaskReplay:!!t})},[]),eS=(0,u.useCallback)(function(e,n){var t=_objectSpread(_objectSpread({},V),{},(0,r.Z)({},e,n));"page"!==e&&1!==V.page&&(t.page=1),Object.keys(t).length>0&&("search"===e&&n&&eh({eventName:h.rw,meta:{event_action:"select",experiment_flag:!!(null==K?void 0:K.monitor_unified_history_filter),experiment_name:"monitor_unified_history_filter",interaction_goal:"search_zap_history",interaction_name:"zap_history_search",interaction_raw_text:"Search Zap History",option_selected:"search"}}),p.push((0,F.lZ)(p.pathname,t,p.query)))},[eh,V,null==K?void 0:K.monitor_unified_history_filter,p]),eZ=(0,u.useCallback)(function(){p.push((0,F.lZ)(p.pathname,{},p.query))},[p]),ew=(0,u.useCallback)(function(){eo(new Date)},[]),e_=(0,u.useCallback)(function(e){(e||"")!==(V.search||"")&&p.push((0,F.lZ)(h._j.log,_objectSpread(_objectSpread({},V),{},{page:0,search:e}),p.query))},[V,p]);(0,u.useEffect)(function(){p.query.query&&eh({eventName:h.rw,meta:{event_action:"select",experiment_flag:!!(null==K?void 0:K.monitor_unified_history_filter),experiment_name:"monitor_unified_history_filter",interaction_goal:"search_zap_history",interaction_name:"zap_history_search",interaction_raw_text:"Search Zap History",option_selected:"search"}})},[eh,null==K?void 0:K.monitor_unified_history_filter,p]);var eF=(0,O.V)({accountId:U,filters:V,getAppImages:!0,onMassAction:Y.onMassAction,skip:!G}),eC=eF.actionableRunCount,eP=eF.error,eO=eF.isLoading,ej=eF.runCount,e$=eF.runs,ek=eF.getSelectedRuns,eD=eF.isRefetching,eM=eF.onDelete,ex=eF.onRefetch,ez=eF.onReplay,eR=(0,j.Z)({accountId:U,billingPeriod:H,getPeriodUsage:!!(null==K?void 0:K.monitor_predictive_task_graph),filters:V,timezone:Q,skip:!ee}),eA=eR.error,eB=eR.interval,eL=eR.isLoading,eE=eR.isRefetching,eT=eR.onRefetch,eN=eR.periodUsage,eU=eR.stats,eH=eR.taskTrend,eX=eR.usingCache,eq=eR.zapUsage;return(0,u.useEffect)(eT,[er]),(0,M.BX)("div",{children:[Y.message&&(0,M.tZ)(v.U,{message:Y.message}),(0,M.BX)("div",{css:x,children:[(0,M.tZ)(f.x,{type:"pageHeader5",children:"Zap history"}),(null==K?void 0:K.observe_run_history_v2)&&(0,M.tZ)($.L,{})]}),(0,M.BX)("div",{css:z,children:["small"===s&&(0,M.BX)(u.Fragment,{children:[(0,M.tZ)(m.z,{color:"secondary",size:"small",iconBefore:"navBell",href:"/app/notification-settings",children:"Error notifications"}),(0,M.tZ)(g.L,{height:20})]}),(0,M.tZ)(C.D,{}),"small"!==s&&(0,M.tZ)(m.z,{color:"secondary",size:"small",iconBefore:"navBell",href:"/app/notification-settings",children:"Error notifications"})]}),l&&(null!=K&&K.monitor_unified_history_filter?(0,M.tZ)(T,{activeFilters:{actions:J,apps:!0,dateFilter:!0,folderIds:!0,nodeIds:!0,ownerIds:!!X,search:G,status:G},filters:V,onClearFilters:eZ,onFilterChange:eS,onRefreshData:ew}):(0,M.BX)(M.HY,{children:[(0,M.tZ)("div",{css:R,children:(0,M.tZ)(D.Z,{isFullWidth:!0,isSearching:!1,onChange:e_,value:V.search})}),(0,M.tZ)(g.L,{height:"small"===s?10:20}),(0,M.tZ)(k.Z,{filters:V,onClearFilters:eZ,onFilterChange:eS,onRefreshData:ew})]})),(0,M.tZ)(g.L,{height:40}),i({actionableRunCount:eC,filters:V,getSelectedRuns:ek,handleFilterChange:eS,handleFilterReset:eZ,handleOpenDeleteModal:eb,handleOpenDownloadRunsModal:ey,handleOpenReplayModal:eI,hideStatusFilter:!!(null==K?void 0:K.monitor_unified_history_filter),isUsageLoading:eL,isUsageRefetching:eE,isUseRunsRefetching:eD,isUseRunsLoading:eO,interval:eB,lastDataFetch:er,onDelete:eM,onReplay:ez,onRunsRefetch:ex,periodUsage:eN,runCount:ej,runs:e$,usageUsingCache:eX,showZapDetails:!0,stats:eU,taskTrend:eH,usageError:eA,useRunsError:eP,zapUsage:eq}),ea.show&&(0,M.tZ)(A,{onClose:function(){return el(function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})},onDelete:ea.onDelete}),ed.show&&(0,M.tZ)(B,{onCanceled:function(){return eu({show:!1})},onConfirmed:(t=(0,o.Z)(a().mark(function _callee2(e){return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:ed.args&&en(ed.args.runIds,ed.args.isAllSelected,ed.args.actionableRunCount,e).then(function(){W(N)}).catch(function(e){W(ExportErrorNotification(null==e?void 0:e.message))}),eu({show:!1});case 2:case"end":return n.stop()}},_callee2)})),function(e){return t.apply(this,arguments)})}),ep.show&&(0,M.tZ)(E,{allowTaskReplay:!0,onClose:function(){return ef(function(e){return _objectSpread(_objectSpread({},e),{},{show:!1})})},onReplay:ep.onReplay}),eg&&(0,M.tZ)(L,{error:Y.actionError,onClose:function(){return ev(!1)}})]})})},32931:function(e,n,t){t.d(n,{Z:function(){return SearchInput_SearchInput}});var r=t(81333),o=t(2784),i=t(42126),a=t(22211),l=t(23273),s=t(52903),d={name:"1qebxer-ClearSelectionButton--clearSelectionButton",styles:"align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center;width:100%;background:transparent;label:ClearSelectionButton--clearSelectionButton;"},SearchInput_ClearSelectionButton=function(e){var n=e.clearSelection,t=e.isFocused,r=e.isHovered;return(0,s.tZ)("button",{css:d,onClick:n,title:"Clear Selection",children:(0,s.tZ)(l.J,{canAcceptPointerEvents:!1,color:t||r?void 0:"gray60",name:"x",size:20})})},useDebounce=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,t=(0,o.useState)(e),r=t[0],i=t[1];return(0,o.useEffect)(function(){var t=setTimeout(function(){i(e)},n);return function(){clearTimeout(t)}},[n,e]),r},SearchInput_SearchInput=function(e){var n=o.useState(e.value||""),t=(0,r.Z)(n,2),d=t[0],u=t[1],c=useDebounce(d,500);return o.useEffect(function(){e.value!==d&&u(e.value||"")},[e.value]),o.useEffect(function(){c!==e.value&&e.onChange(c)},[c]),(0,s.tZ)(i.o,{ariaLabel:"Task Search",autoComplete:"off",isFullWidth:e.isFullWidth,onChange:function(e){return u(e.currentTarget.value)},placeholder:"Search Zap runs",renderIconAfter:function(e){var n=e.isFocused,t=e.isHovered;return d.length>0&&(0,s.tZ)(SearchInput_ClearSelectionButton,{clearSelection:function(){return u("")},isFocused:n,isHovered:t})},renderIconBefore:function(n){var t=n.iconSize;return e.isSearching?(0,s.tZ)(a.$,{}):(0,s.tZ)(l.J,{name:"magnifyingGlass",size:t})},value:d})}},93332:function(e,n,t){t.d(n,{_:function(){return dateRangeLabel},by:function(){return getDateOptions}});var r,o,i=t(95030),a=new Date,l=a.getFullYear(),s=a.getMonth(),d=a.getDate();(r=o||(o={})).CurrentBillingPeriod="Current billing period",r.LastMonth="Last month",r.MonthToDate="This month",r.Past30Days="Past 30 days";var getDateOptions=function(e){return[{key:o.Past30Days,text:o.Past30Days,value:{from:new Date(l,s,d-29),to:a}},{key:o.CurrentBillingPeriod,text:o.CurrentBillingPeriod,value:e},{key:o.MonthToDate,text:o.MonthToDate,value:{from:new Date(l,s,1),to:a}},{key:o.LastMonth,text:o.LastMonth,value:{from:new Date(l,s-1,1),to:new Date(l,s,0)}}]};function getFormattedDate(e){if(e)return(0,i.Z)(new Date(e),"yyyy-MM-dd")}function dateRangeLabel(e,n,t){var r,o=getFormattedDate(e),i=getFormattedDate(n);if(!o||!i)return"";var a=t.find(function(e){return e.value.from&&getFormattedDate(e.value.from)===o&&e.value.to&&getFormattedDate(e.value.to)===i});return null!==(r=null==a?void 0:a.key)&&void 0!==r?r:""}},89381:function(e,n,t){t.d(n,{W:function(){return useDownloadRuns}});var r,o,i,a=t(81333),l=t(7328),s=t(2784),d=t(60138),u=t(33379),c=t(25760),p=t(61390),f=t(53861);(r=i||(i={}))[r.INITIAL=0]="INITIAL",r[r.SENDING=1]="SENDING",r[r.SENT_SUCCESS=2]="SENT_SUCCESS",r[r.SENT_FAILURE=3]="SENT_FAILURE";var m=(0,d.Ps)(o||(o=(0,l.Z)(["\n mutation DownloadRuns(\n $filters: RunFilter!\n $format: ZapHistoryExportFormat\n $runIds: [ID!]\n ) {\n downloadRuns(filters: $filters, format: $format, runIds: $runIds) {\n message\n }\n }\n"])));function useDownloadRuns(e){var n=(0,u.D)(m),t=(0,a.Z)(n,2),r=t[0],o=t[1],i=s.useCallback(function(n,t,o){var i,a,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p.tv.JSON;return r({variables:{filters:{apps:null==e?void 0:e.filters.apps,customuserIds:null==e?void 0:e.filters.ownerIds,folderIds:null==e?void 0:e.filters.folderIds,limit:t&&o?o:void 0,periodEnd:null==e?void 0:null===(i=e.filters.dateFilter)||void 0===i?void 0:i.to,periodStart:null==e?void 0:null===(a=e.filters.dateFilter)||void 0===a?void 0:a.from,query:null==e?void 0:e.filters.search,status:(0,c.a)(null==e?void 0:e.filters.status),zapIds:null==e?void 0:e.filters.nodeIds},format:l,runIds:t?null:n}})},[r,null==e?void 0:e.filters]);return{error:(0,f.e$)(o.error),isLoading:o.loading,onDownload:i}}},16931:function(e,n,t){t.d(n,{V:function(){return useRuns}});var r,o=t(95235),i=t(7328),a=t(60138),l=t(56675),s=t(40794),d=t(64368),u=t(2784),c=t(25760),p=t(61390),f=t(581),m=t(53861);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach(function(n){(0,o.Z)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var g=(0,a.Ps)(r||(r=(0,i.Z)(["\n fragment ZapRun on ZapRun {\n billableCount\n hasPaths\n heldReason\n heldStaleAuth\n id\n startTime\n status\n zap {\n id\n kind\n sourceUrl\n title\n folder @include(if: $getFolder) {\n id\n isShared\n title\n }\n }\n zapApps @include(if: $getAppImages) {\n id\n images {\n url32X32\n }\n name\n }\n zapOwner {\n id\n imageUrl\n name\n }\n }\n\n query ZapRuns(\n $accountId: ID!\n $apps: [String!]\n $channel: String\n $channelError: String\n $customuserIds: [ID!]\n $folderIds: [ID!]\n $getAppImages: Boolean!\n $getFolder: Boolean!\n $limit: Int\n $offset: Int\n $periodEnd: String\n $periodStart: String\n $query: String\n $sortBy: String\n $status: [String!]\n $zapIds: [ID!]\n ) {\n zapRuns(\n accountId: $accountId\n apps: $apps\n channel: $channel\n channelError: $channelError\n customuserIds: $customuserIds\n folderIds: $folderIds\n limit: $limit\n offset: $offset\n periodEnd: $periodEnd\n periodStart: $periodStart\n query: $query\n sortBy: $sortBy\n status: $status\n zapIds: $zapIds\n ) {\n edges {\n ...ZapRun\n }\n totalActionable\n totalCount\n }\n }\n"])));function useRuns(e){var n,t,r,o,i,a,v,h,y=e.accountId,b=e.filters,I=e.getAppImages,S=e.getFolder,Z=e.onMassAction,w=e.pageSize,_=void 0===w?10:w,F=e.skip,C=(0,u.useState)([]),P=C[0],O=C[1],j=(0,u.useState)([]),$=j[0],k=j[1],D=(0,l.x)(),M=(0,f.i)().emitEvent,x={apps:b.apps,channel:b.channel,channelError:b.channelError,customuserIds:b.ownerIds,folderIds:b.folderIds,periodEnd:null===(n=b.dateFilter)||void 0===n?void 0:n.to,periodStart:null===(t=b.dateFilter)||void 0===t?void 0:t.from,query:b.search,status:(0,c.a)(b.status),zapIds:b.nodeIds},z=_objectSpread({accountId:y,getAppImages:I,getFolder:void 0!==S&&S,limit:_,offset:b.page?(b.page-1)*_:0,sortBy:"-start_time"},x),R=(0,s.a)(g,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,skip:!y||F,variables:z}),A=null===(r=R.data)||void 0===r?void 0:null===(o=r.zapRuns)||void 0===o?void 0:o.totalActionable,B=(null===(i=R.data)||void 0===i?void 0:null===(a=i.zapRuns)||void 0===a?void 0:a.edges)||[],L=B.map(function(e){return P.includes(e.id)?_objectSpread(_objectSpread({},e),{},{status:p.VO.delete}):$.includes(e.id)?_objectSpread(_objectSpread({},e),{},{status:p.VO.replay}):e}),E=R.networkStatus===d.I.setVariables&&!R.data;return{actionableRunCount:A||0,error:(0,m.e$)(R.error),fetchMore:R.fetchMore,getSelectedRuns:function(e){return Object.values(D.cache.extract()).filter(function(n){return"ZapRun"===n.__typename&&e.includes(n.id)})},isLoading:R.networkStatus===d.I.loading||E,isRefetching:R.networkStatus===d.I.refetch||R.networkStatus===d.I.setVariables,networkStatus:R.networkStatus,onDelete:function(e,n){Z("delete",{filters:n&&A?_objectSpread(_objectSpread({},x),{},{limit:A,status:n?x.status:null}):x,runIds:n?null:e},function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];k([]),e&&R.refetch()}),O(n?B.map(function(e){return e.id}):e)},onRefetch:function(){y&&R.refetch()},onReplay:function(e,n){var t={filters:n&&A?_objectSpread(_objectSpread({},x),{},{limit:A,status:n?x.status:null}):x,runIds:n?null:e};M({eventName:c.rw,meta:{event_action:"click",interaction_goal:"troubleshoot_zap_run",interaction_name:"zap_runs_interaction",interaction_raw_text:"Replay ".concat(e.length),option_selected:"replay"}}),Z("replay",t,function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];k([]),e&&R.refetch()}),k(n?B.map(function(e){return e.id}):e)},runCount:(null===(v=R.data)||void 0===v?void 0:null===(h=v.zapRuns)||void 0===h?void 0:h.totalCount)||0,runs:L}}},91416:function(e,n,t){t.d(n,{mR:function(){return useZapListing}});var r,o,i,a=t(12741),l=t(95235),s=t(7328),d=t(60138),u=t(40794),c=t(64368),p=t(54073),f=t.n(p),m=t(2784),g=t(25760),v=t(33252);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach(function(n){(0,l.Z)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var h=(0,d.Ps)(r||(r=(0,s.Z)(["\n fragment ZapSearchResult on Zap {\n id\n folder @include(if: $includeFolder) {\n id\n title\n }\n kind\n owner @include(if: $includeOwner) {\n email\n id\n imageUrl\n isCurrentUser\n name\n }\n title\n }\n"]))),y=(0,d.Ps)(o||(o=(0,s.Z)(["\n ","\n\n query ZapSearch(\n $accountId: ID!\n $includeFolder: Boolean!\n $includeOwner: Boolean!\n $cursor: String\n $limit: Int\n $search: String\n ) {\n zaps(\n accountId: $accountId\n cursor: $cursor\n limit: $limit\n title: $search\n ) {\n cursor\n edges {\n ...ZapSearchResult\n }\n totalCount\n }\n }\n"])),h),b=(0,d.Ps)(i||(i=(0,s.Z)(["\n ","\n\n query ZapsById(\n $accountId: ID!\n $includeFolder: Boolean!\n $includeOwner: Boolean!\n $ids: [ID!]!\n ) {\n zaps(accountId: $accountId, ids: $ids) {\n edges {\n ...ZapSearchResult\n }\n }\n }\n"])),h);function useZapListing(e){var n,t,r,o,i,l,s=e.accountId,d=e.includeFolder,p=e.includeOwner,h=e.zapIds,I=void 0===h?[]:h,S=(0,m.useState)(""),Z=S[0],w=S[1],_=(0,v.T)(y,{notifyOnNetworkStatusChange:!0,skip:!s,variables:{accountId:null!==(n=null==s?void 0:s.toString())&&void 0!==n?n:"",includeFolder:null!=d&&d,includeOwner:null!=p&&p,limit:g.ZP,search:null!=Z&&Z.includes("Name your zap")?"":Z}}),F=_.client,C=_.data,P=_.error,O=_.fetchMore,j=_.loading,$=_.networkStatus,k=(0,u.a)(b,{skip:!s||0===I.length,variables:{accountId:null!==(t=null==s?void 0:s.toString())&&void 0!==t?t:"",ids:I,includeFolder:null!=d&&d,includeOwner:null!=p&&p}}),D=(0,m.useCallback)(f()(function(e){return w((null==e?void 0:e.inputValue)||"")},300),[]),M=(null==C?void 0:null===(r=C.zaps)||void 0===r?void 0:r.edges)||[],x=k.loading?Object.values(F.cache.extract()).filter(function(e){return"Zap"===e.__typename&&I.includes(String(e.id))}):(null===(o=k.data)||void 0===o?void 0:null===(i=o.zaps)||void 0===i?void 0:i.edges)||[];return{error:P,isLoading:j,isLoadingMore:$===c.I.fetchMore,onLoadMore:M.length<((null==C?void 0:null===(l=C.zaps)||void 0===l?void 0:l.totalCount)||0)?function(){var e;O({updateQuery:function(e,n){var t,r,o=n.fetchMoreResult;return o?_objectSpread(_objectSpread({},o),{},{zaps:_objectSpread(_objectSpread({},null==o?void 0:o.zaps),{},{edges:[].concat((0,a.Z)((null===(t=e.zaps)||void 0===t?void 0:t.edges)||[]),(0,a.Z)((null==o?void 0:null===(r=o.zaps)||void 0===r?void 0:r.edges)||[]))})}):e},variables:{accountId:s,cursor:(null==C?void 0:null===(e=C.zaps)||void 0===e?void 0:e.cursor)||void 0,limit:g.ZP,search:null!=Z&&Z.includes("Name your zap")?"":Z}})}:void 0,onSearch:D,zaps:M,selectedZaps:x}}},36218:function(e,n,t){t.d(n,{H:function(){return getDateRangeFromQuery}});var r=t(95030),o=t(83161),i=t(19652),a=t(71360),l=t(19579);function getDateRangeFromQuery(e){return{from:getDateWithTime(e.start_datetime,!1),hasChange:!1,to:getDateWithTime(e.end_datetime,!0)}}var s="yyyy-MM-dd'T'HH:mm:ss.SSSxxx";function getDateWithTime(e,n){var t=new Date,d=(0,r.Z)((0,o.Z)(t),s),u=(0,r.Z)((0,i.Z)((0,a.Z)(t,29)),s);if(void 0===e)return n?d:u;var c=e.includes("%")?decodeURIComponent(e):e;if(c.includes("T"))return c;var p=(0,l.Z)(c,"yyyy-MM-dd",t);return void 0===c||!(p instanceof Date)||isNaN(p.valueOf())?n?d:u:n?(0,r.Z)((0,o.Z)(p),s):(0,r.Z)((0,i.Z)(p),s)}},65626:function(e,n,t){t.d(n,{Qn:function(){return getFiltersFromParams},hl:function(){return getAlertFiltersFromParams},i8:function(){return getAlertsUrlFromParams},lZ:function(){return getUrlFromParams},sV:function(){return getParamFromQuery}});var r=t(95235),o=t(95030),i=t(24602),a=t(17712),l=t(31672),s=t(36218),d=t(61390);function ownKeys(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function _objectSpread(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(t),!0).forEach(function(n){(0,r.Z)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function getArrayParamFromQuery(e,n,t){var r,o=n[e]||(null===(r=t.match(new RegExp("[&?]".concat(e,"=([^&#]*)"))))||void 0===r?void 0:r[1]);return Array.isArray(o)?o:null!=o&&o.includes("|")?o.split("|"):null!=o&&o.includes("%7C")?o.split("%7C"):null!=o&&o.includes(",")?o.split(","):null!=o&&o.includes("%2C")?o.split("%2C"):o?[o]:[]}function getParamFromQuery(e,n,t){var r,o=n[e]||(null===(r=t.match(new RegExp("[&?]".concat(e,"=([^&#]*)"))))||void 0===r?void 0:r[1]);return Array.isArray(o)?o[0]:o||void 0}function getFiltersFromParams(e,n){return{actions:getArrayParamFromQuery("action",e,n).map(function(e){return l.Kx[e]}).filter(Boolean),apps:getArrayParamFromQuery("app",e,n),channel:getParamFromQuery("channel",e,n),channelError:getParamFromQuery("channelError",e,n),dateFilter:(0,s.H)({end_datetime:getParamFromQuery("end_datetime",e,n),start_datetime:getParamFromQuery("start_datetime",e,n)}),folderIds:getArrayParamFromQuery("folderId",e,n),nodeIds:getArrayParamFromQuery("root_id",e,n),ownerIds:getArrayParamFromQuery("owner",e,n),page:parseInt(getParamFromQuery("page",e,n)||"")||1,search:getParamFromQuery("query",e,n),status:getArrayParamFromQuery("status",e,n).map(function(e){return l.p5[e]}).filter(Boolean)}}function getAlertFiltersFromParams(e,n){return{dateFilter:(0,s.H)({end_datetime:getParamFromQuery("end_datetime",e,n),start_datetime:getParamFromQuery("start_datetime",e,n)}),page:parseInt(getParamFromQuery("page",e,n)||"")||1,alertTypes:getArrayParamFromQuery("alertTypes",e,n).map(function(e){return d.NK[e]}).filter(Boolean)}}function getUrlFromParams(e,n,t){var r,o,i,s,d,u,c,p,f,m,g=arguments.length>3&&void 0!==arguments[3]&&arguments[3],v=(0,a.aE)(e,_objectSpread(_objectSpread({},t),{},{action:null===(o=n.actions)||void 0===o?void 0:o.join(","),app:null===(i=n.apps)||void 0===i?void 0:i.join(","),channel:n.channel,channelError:n.channelError,end_datetime:getDateWithTime(null===(s=n.dateFilter)||void 0===s?void 0:s.to,null==t?void 0:t.end_datetime,(null==n?void 0:null===(d=n.dateFilter)||void 0===d?void 0:d.hasChange)||!1),folderId:null===(u=n.folderIds)||void 0===u?void 0:u.join(","),node_id:void 0,owner:null===(c=n.ownerIds)||void 0===c?void 0:c.join(","),page:1===n.page?void 0:n.page,query:n.search,root_id:Array.isArray(n.nodeIds)&&(null===(p=n.nodeIds)||void 0===p?void 0:p.join(",")),start_datetime:getDateWithTime(null===(f=n.dateFilter)||void 0===f?void 0:f.from,null==t?void 0:t.start_datetime,(null==n?void 0:null===(m=n.dateFilter)||void 0===m?void 0:m.hasChange)||!1),status:((r=n.status)?r.length===Object.keys(l.p5).length?[]:r:[]).join(","),zapId:void 0}));if(g){var h=v.indexOf("?");return h>=0?v.substring(h):""}return v}function getAlertsUrlFromParams(e,n,t){var r,o,i,l,s,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=(0,a.aE)(e,_objectSpread(_objectSpread({},t),{},{end_datetime:getDateWithTime(null===(o=n.dateFilter)||void 0===o?void 0:o.to,null==t?void 0:t.end_datetime,(null==n?void 0:null===(i=n.dateFilter)||void 0===i?void 0:i.hasChange)||!1),page:1===n.page?void 0:n.page,start_datetime:getDateWithTime(null===(l=n.dateFilter)||void 0===l?void 0:l.from,null==t?void 0:t.start_datetime,(null==n?void 0:null===(s=n.dateFilter)||void 0===s?void 0:s.hasChange)||!1),alertTypes:((r=n.alertTypes)?r.length===Object.keys(d.NK).length?[]:r:[]).join(",")}));if(u){var p=c.indexOf("?");return p>=0?c.substring(p):""}return c}function getDateWithTime(e,n,t){return t?e?(0,o.Z)((0,i.Z)(e),"yyyy-MM-dd"):void 0:n}}}]);