forked from sindresorhus/awesome
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
9455-9455bd3e78c76f53.js.download
1 lines (1 loc) · 30.8 KB
/
9455-9455bd3e78c76f53.js.download
1
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9455],{23360:function(e,t,n){n.d(t,{Z:function(){return AutoReplaySwitch_AutoReplaySwitch}});var a,r,i=n(2784),o=n(55414),l=n(26215),s=n(87593),c=n(1795),u=n(28952),d=n(66266),p=n(20110),h=n(38716),m=n(25760),g=n(44546),f=n(581),b=n(52522),y=n(81333),w=n(7328),R=n(60138),v=n(40794),x=n(33379),Z=["admin","owner","super_admin"],S=n(53861),k=(0,R.Ps)(a||(a=(0,w.Z)(["\n query AutoReplay($accountId: ID!) {\n account(id: $accountId) {\n currentUserRole\n id\n isAutoReplayEnabled\n isUnlimited\n plan {\n id\n hasAutoReplay\n }\n }\n }\n"]))),A=(0,R.Ps)(r||(r=(0,w.Z)(["\n mutation UpdateAutoReplay($accountId: ID!, $isAutoReplayEnabled: Boolean!) {\n updateAccountAutoReplay(\n id: $accountId\n isAutoReplayEnabled: $isAutoReplayEnabled\n ) {\n id\n isAutoReplayEnabled\n }\n }\n"]))),useAutoReplay_useAutoReplay=function(e){var t,n,a,r=e.accountId,i=(0,v.a)(k,{skip:!r,variables:{accountId:r}}),o=(0,x.D)(A),l=(0,y.Z)(o,2),s=l[0],c=l[1],u=null===(n=i.data)||void 0===n?void 0:n.account;return{canAutoReplay:(null==u?void 0:u.isUnlimited)||(null==u?void 0:null===(a=u.plan)||void 0===a?void 0:a.hasAutoReplay)||!1,canChangeAutoReplay:!!((t=null==u?void 0:u.currentUserRole)&&Z.includes(t)),error:(0,S.e$)(i.error||c.error),isAutoReplayEnabled:(null==u?void 0:u.isAutoReplayEnabled)||!1,isBusy:c.loading,isLoading:i.loading,onChange:function(e){s({variables:{isAutoReplayEnabled:e,accountId:r}})}}},L=n(52903),_={name:"1v4ilmy-AutoReplaySwitch--modalStyle",styles:"display:grid;grid-gap:20px;label:AutoReplaySwitch--modalStyle;"},D={name:"1w15ujc-AutoReplaySwitch--rootStyle",styles:"align-items:center;display:grid;grid-auto-flow:column;grid-gap:10px;justify-content:flex-end;label:AutoReplaySwitch--rootStyle;"},O=(0,b.uq)({desktop:{name:"1rd3h4y-AutoReplaySwitch--desktop",styles:"width:230px;label:AutoReplaySwitch--desktop;"},mobile:{name:"12tmk5m-AutoReplaySwitch--mobile",styles:"display:grid;grid-gap:5px;label:AutoReplaySwitch--mobile;"}}),AutoReplaySwitch_AutoReplaySwitch=function(){var e=(0,i.useState)(!1),t=e[0],n=e[1],a=(0,h.X8)(),r=(0,g.a)(),b=useAutoReplay_useAutoReplay({accountId:a}),y=b.canAutoReplay,w=b.canChangeAutoReplay,R=b.error,v=b.isAutoReplayEnabled,x=b.isBusy,Z=b.isLoading,S=b.onChange,k=(0,f.i)().emitEvent;if(R)return(0,L.tZ)(o.x,{color:"error",type:"smallPrint3",children:R});function handleChange(e){w&&(y||v?(S(e.currentTarget.checked),k({eventName:m.rw,meta:{event_action:"click",interaction_goal:"manage_autoplay_setting",interaction_name:"zap_runs_interaction",interaction_raw_text:"Autoreplay ".concat(v?"Off":"On"),option_selected:v?"off":"on"}})):n(!0))}var A=(0,L.BX)("div",{css:O,children:[(0,L.tZ)("p",{children:v?"Enabled":"Disabled"}),(0,L.BX)(o.x,{color:"neutral100",type:"smallPrint1",children:[(0,L.tZ)("p",{children:w?"Press to toggle Autoreplay ".concat(v?"off":"on"):"Only account admins can change Autoreplay"}),(0,L.tZ)("br",{}),(0,L.BX)("p",{children:[(0,L.tZ)("strong",{children:"New!"})," You can now override Autoreplay settings per Zap."]})]}),(0,L.tZ)(l.r,{color:"secondary",href:"/help/manage/tasks/replay-failed-tasks-in-zaps",children:"Learn more"})]});return(0,L.BX)(i.Fragment,{children:[(0,L.tZ)(s.p,{allowMultilineTooltip:!0,content:A,isTooltipInteractive:!0,children:function(e){var t=e.childProps;return(0,L.BX)("div",{"aria-describedby":t.ariaDescribedBy,css:D,children:[(0,L.tZ)(o.x,{color:"neutral800",type:"smallPrint1Semibold",children:"Autoreplay"}),(0,L.tZ)(c.Z,{ariaLabel:"Autoreplay ".concat(v?"enabled":"disabled"),checked:v,disabled:!w||x,id:"autoreplay",isLoading:Z||!r,onChange:handleChange})]})}}),t&&(0,L.tZ)(u.u,{onClosed:function(){return n(!1)},children:(0,L.tZ)(d.hz,{children:(0,L.BX)("div",{css:_,children:[(0,L.tZ)(o.x,{tag:"h1",type:"sectionHeader1",children:"Autoreplay"}),(0,L.tZ)(o.x,{tag:"h2",type:"paragraph3Bold",children:"Upgrade to Activate"}),(0,L.BX)(o.x,{tag:"p",type:"smallPrint1",children:["Occasionally, your Zaps may fail due to unexpected API outages or accidental changes. When ",(0,L.tZ)("strong",{children:"Autoreplay"})," is turned on, Zapier will re-run failed tasks in the background so you don’t have to worry."]}),(0,L.tZ)(p.z,{href:"/app/billing/plans",children:"Upgrade"})]})})})]})}},93716:function(e,t,n){var a=n(26215),r=n(31783),i=n(52903),o={root:{name:"11vg012-ExternalEditLink--root",styles:"display:grid;align-items:center;font-weight:bold;grid-auto-flow:column;grid-gap:5px;justify-content:flex-start;label:ExternalEditLink--root;"}},stopPropagation=function(e){return e.stopPropagation(),!1};t.Z=function(e){return(0,i.BX)("div",{css:o.root,children:[(0,i.tZ)(r.A,{serviceName:e.logoClass,size:20},e.logoClass),(0,i.BX)(a.r,{href:e.sourceUrl||void 0,onClick:stopPropagation,target:"_blank",children:["Edit in ",e.serviceName]})]})}},29455:function(e,t,n){n.d(t,{y:function(){return RunLog}});var a,r=n(12741),i=n(95235),o=n(82269),l=n(5632),s=n(2784),c=n(79102),u=n(26404),d=n(17712),p=n(48469),h=n(87234),m=n(44546),g=n(11606),f=n(81055),b=n(53092),y=n(52522),w=n(44779),R=n(25522),v=n(23360),x=n(95030),Z=n(81305),S=n(93332),k=n(81692),A=n(52903),EmbedDateFilter=function(e){var t,n,a=e.onChange,r=(0,h.g)().currentBillingPeriod,i=(0,s.useMemo)(function(){return(0,S.by)({from:null!=r&&r.from?new Date(null==r?void 0:r.from):void 0,to:null!=r&&r.to?new Date(null==r?void 0:r.to):void 0})},[r.from]),o=(0,s.useCallback)(function(e){var t=e.from,n=e.to,r=t?(0,x.Z)(t,"yyyy-MM-dd"):void 0,i=n?(0,x.Z)(n,"yyyy-MM-dd"):void 0;a((0,k.G)({from:r,to:i,hasChange:!0},function(e){return void 0===e}))},[a]),l=null===(t=e.value)||void 0===t?void 0:t.from,c=null===(n=e.value)||void 0===n?void 0:n.to,u=(0,s.useMemo)(function(){var e=l&&new Date(l),t=c&&new Date(c);return(0,k.G)({from:e,to:t},function(e){return void 0===e})},[l,c]);return(0,A.tZ)(Z.D,{ariaLabel:"Date Filter",closeText:"Apply",id:e.id,menuAriaLabel:"Choice of date ranges",onChange:o,options:i,placeholder:"Past 30 days",size:e.size,value:u})},L=n(81901),_=n(23273),D=n(35080),O=n(25760);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,i.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ListSelectionDropdown_ListSelectionDropdown=function(e){var t=(0,s.useState)(0),n=t[0],a=t[1];(0,s.useEffect)(function(){a(n+1)},[e.value]);var r=[{color:"blueJeans",icon:"formDashSquare",id:"shown",label:"Select shown"},{color:"blueJeans",icon:"formCheckSquare",id:"all",label:"Select all (".concat(O.LS," at a time)")}],i={color:"neutral600",icon:"formBlank",id:"none",label:"Deselect all"};return e.passSelection&&r.push(i),(0,A.tZ)(L.L,{initialSelectedItem:r.find(function(t){return t.id===e.value})||i,items:r,menuAriaLabel:"List of selection options",onSelect:function(t){return e.onSelect(t.id)},renderButtonForItem:function(e){return(0,A.tZ)(_.J,{color:e.color,name:e.icon||"formBlank",size:24})},renderFloatingMenu:function(e){return(0,A.tZ)(D.A,_objectSpread(_objectSpread({},e),{},{align:"left"}))}},n)},E=n(20110),j=n(52968),z=n(59712),P=(0,y.uq)({desktop:{name:"j81ynn-RunActions--desktop",styles:"align-items:center;justify-content:flex-start;label:RunActions--desktop;"},tablet:{name:"1mm0xw2-RunActions--tablet",styles:"grid-auto-flow:column;label:RunActions--tablet;"},mobile:{name:"1wdol5r-RunActions--mobile",styles:"display:grid;grid-gap:10px;label:RunActions--mobile;"}}),RunActions_RunActions=function(e){var t=e.getCachedRuns(),n=t.find(function(e){return"success"!==e.status});return(0,A.BX)("div",{css:P,children:[(0,A.BX)(E.z,{color:"primary-alt",disabled:e.isDisabled,iconBefore:"actionPlay",onClick:function(){e.onReplay(),(0,z.kW)("event","massRunReplay",{itemCount:t.length.toString()})},size:"small",children:[n?"Play":"Replay"," ",e.count]}),(0,A.BX)(E.z,{color:"secondary",disabled:e.isDisabled,iconBefore:"actionTrash",onClick:function(){e.onDelete(),(0,z.kW)("event","massRunDelete",{itemCount:t.length.toString()})},size:"small",children:["Delete ",e.count]}),(0,A.BX)(j.N,{color:"primary",iconBefore:"arrowBigDown",onClick:function(){e.onDownload(),(0,z.kW)("event","downloadRuns",{itemCount:t.length.toString()})},size:"small",children:["Download ",e.count]})]})},I=n(47043),C=n(90982),B=n(73026),X=n(28165),M=n(27977),T=n(99029),F=n(96963),q=n(55414),U=n(96369),H=n(32945),N=n(12687),$=n(92975),K=n(93716),J=n(31783),W=n(87593);function Arrow_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function Arrow_objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Arrow_ownKeys(Object(n),!0).forEach(function(t){(0,i.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Arrow_ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Y=(0,X.iv)("align-items:center;border:1px transparent solid;border-radius:3px;display:grid;grid-auto-flow:column;padding:6px;transition:background-color 0.5s ease,border 0.5s ease;&:hover{background-color:",T.w.blue200,";border:1px ",T.w.blue300," solid;color:",T.w.blue600,";};label:Arrow--arrowStyle;"),Arrow_Arrow=function(){return(0,A.tZ)(W.p,{content:(0,A.tZ)("span",{children:"View run details"}),isTooltipInteractive:!0,position:"southeast",children:function(e){return(0,A.tZ)("div",{css:Y,children:(0,A.tZ)(_.J,Arrow_objectSpread(Arrow_objectSpread({},e),{},{color:"currentColor",name:"arrowBigRight",size:26}))})}})},V=n(37365),G=(0,X.iv)("background-color:",T.w.lava10,";border:1px solid ",T.w.neutral800,";border-radius:30px;padding:5px 10px;width:16px;height:16px;;label:PathIndicator--rootStyle;"),PathIndicator_PathIndicator=function(){return(0,A.tZ)("div",{css:G,children:(0,A.tZ)(V.E,{alt:"Branching API",borderRadius:0,height:16,src:"https://zapier.com/generated/BranchingAPI/64",width:16})})},Q=n(3e3),ee=n(63951),et=n(76128),en=n(26215),ea=n(61390),er=n(7328),ei=n(60138),eo=n(40794),el=n(38716),es=(0,ei.Ps)(a||(a=(0,er.Z)(["\n query HeldRunApp($accountId: ID!, $taskId: ID!) {\n runHeldApp(accountId: $accountId, id: $taskId) {\n id\n name\n }\n }\n"]))),HeldStatusTip_useHeldApp=function(e){var t=e.skip,n=e.taskId,a=(0,el.X8)(),r=(0,eo.a)(es,{skip:t,variables:{accountId:a,taskId:n}}),i=r.data,o=r.loading;return{app:null==i?void 0:i.runHeldApp,isLoading:o}},ec=(0,X.iv)("width:250px;color:",T.w.neutral200,";;label:HeldStatusTip--rootStyle;"),HeldStatusTip_HeldStatusTip=function(e){var t,n=(t=e.reason,[ea.hE.access_blacklisted_app,ea.hE.blacklisted_app,ea.hE.stale_auth].includes(t)),a=HeldStatusTip_useHeldApp({skip:!n,taskId:e.taskId}),r=a.app,i=a.isLoading;if(n&&i)return(0,A.tZ)(et.g,{children:(0,A.tZ)(I.q,{height:"22px",width:"250px"})});switch(e.reason){case ea.hE.access_blacklisted_app:return(0,A.BX)("div",{css:ec,children:[(null==r?void 0:r.name)||"App"," is restricted by an admin."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/help/account/companies/manage-access-to-apps-in-zapier",children:"More info."})]});case ea.hE.blacklisted_app:return(0,A.BX)("div",{css:ec,children:[(null==r?void 0:r.name)||"App"," is a premium app."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/help/account/billing-pricing/understand-premium-apps",children:"More info."})]});case ea.hE.dedupe_change:return(0,A.tZ)("div",{css:ec,children:"Held because deduplication key changed"});case ea.hE.paymentIssue:return(0,A.BX)("div",{css:ec,children:["Update your payment information."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/app/settings/billing",children:"More info."})]});case ea.hE.stale_auth:return(0,A.BX)("div",{css:ec,children:["Reconnect your ",(null==r?void 0:r.name)||"App"," account to Zapier."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/app/connections",children:"More info."})]});case ea.hE.step_limit:return(0,A.BX)("div",{css:ec,children:["Zap has too many steps."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/help/create/basics/learn-key-concepts-in-zapier#step-14",children:"More info."})]});case ea.hE.task_limit:return(0,A.BX)("div",{css:ec,children:["Task limit reached for current billing cycle."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/help/manage/tasks/learn-about-tasks-in-zapier#step-2",children:"More info."})]});case ea.hE.throttled:return(0,A.BX)("div",{css:ec,children:["A Zap is automating too many tasks."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/help/troubleshoot/behavior/rate-limits-and-throttling-in-zapier#step-1",children:"More info."})]});case ea.hE.too_many:return(0,A.BX)("div",{css:ec,children:["Zap trigger returned too much data."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/help/troubleshoot/behavior/rate-limits-and-throttling-in-zapier#step-3",children:"More info."})]});case ea.hE.unknown:return(0,A.BX)("div",{css:ec,children:["Contact support for help."," ",(0,A.tZ)(en.r,{color:"white",href:"https://zapier.com/app/get-help",children:"More info."})]})}return null},eu={info:{name:"1pqt682-RunStatus--info",styles:"display:grid;grid-gap:2px;label:RunStatus--info;"},root:{name:"1ijz1tw-RunStatus--root",styles:"align-items:center;display:grid;grid-gap:10px;grid-template-columns:35px 1fr;label:RunStatus--root;"},title:(0,X.iv)(Q.ZT.smallPrint1Bold," color:",T.w.neutral700,";text-transform:none;;label:RunStatus--title;")},RunStatus_RunStatus=function(e){var t=(0,O.Dk)(e.status,e.heldReason,e.heldStaleAuth),n=e.status===ea.VO.held;return(0,A.tZ)(W.p,{allowMultilineTooltip:n,content:n?(0,A.tZ)(HeldStatusTip_HeldStatusTip,{reason:e.heldReason||ea.hE.unknown,taskId:e.id}):"".concat(t.label).concat(t.subLabel?" - ".concat(t.subLabel):""),isTooltipInteractive:n,position:"southwest",children:function(n){var a=n.childProps;return(0,A.BX)("div",{"aria-describedby":a.ariaDescribedBy,css:eu.root,children:[(0,A.tZ)(ee.Z,{size:35,status:e.status}),(0,A.BX)("div",{css:eu.info,children:[(0,A.tZ)("span",{css:eu.title,children:t.label}),t.subLabel&&(0,A.tZ)(q.x,{color:"gray80",type:"smallPrint3",children:t.subLabel})]})]})}})},ed=n(19928),ep=n.n(ed),TasksUsed_TasksUsed=function(e){return(0,A.BX)("div",{children:[(0,A.tZ)(q.x,{color:"neutral700",tag:"div",textAlign:"center",type:"paragraph3Medium",children:e.used}),(0,A.tZ)(q.x,{color:"neutral700",tag:"div",textAlign:"center",type:"smallPrint1Medium",children:ep()("task",e.used)})]})};function gridArea(e){return(0,X.iv)("grid-area:",e,";;label:RunRow--gridArea;")}var eh={mobile:"@media (min-width: 0)",tablet:"@media (min-width: 660px)",desktop:"@media (min-width: 800px)"},em=(0,y.uq)({mobile:{display:"none",visibility:"hidden"},tablet:{display:"none",visibility:"hidden"},desktop:{display:"inherit",visibility:"visible"}},eh),eg={name:"qprtuo-RunRow--checkStyle",styles:"align-items:center;display:flex;grid-area:select;height:calc(100% + 30px);justify-content:center;margin-left:-19px;width:51px;label:RunRow--checkStyle;"},ef={name:"t16dfd-RunRow--infoStyle",styles:"display:grid;grid-area:info;grid-gap:0px;label:RunRow--infoStyle;"},eb=(0,X.iv)("align-items:center;color:",T.w.neutral800,";display:grid;grid-gap:15px;position:relative;padding:4px;;label:RunRow--rootBaseStyle;"),ey=(0,y.uq)({desktop:{name:"13k9z2v-RunRow--desktop",styles:"align-items:center;flex-direction:row;label:RunRow--desktop;"},mobile:{name:"f6rwe9-RunRow--mobile",styles:"align-items:flex-start;display:flex;flex-direction:column;gap:8px;label:RunRow--mobile;"}},y.w5),ew={name:"1r8b5jb-RunRow--mobile",styles:'grid-template-areas:"select info info" ". status path";grid-template-columns:18px 1fr 40px;grid-template-rows:1fr 40px;label:RunRow--mobile;'},eR={name:"v77foz-RunRow--tablet",styles:'grid-template-areas:"select info path" ". status tasks";grid-template-columns:18px 1fr 40px;grid-template-rows:1fr 40px;label:RunRow--tablet;'},ev={name:"10jcwi7-RunRow--desktop",styles:'grid-template-areas:"select status info path tasks arrow";grid-template-columns:18px 160px 1fr 40px 80px 40px;grid-template-rows:1fr;label:RunRow--desktop;'},ex={name:"1smp7ez-RunRow--mobile",styles:'grid-template-areas:"select apps apps" ". info info" ". status path";grid-template-columns:18px 1fr 40px;grid-template-rows:40px 1fr 40px;label:RunRow--mobile;'},eZ={name:"de5wsz-RunRow--tablet",styles:'grid-template-areas:"select apps apps" ". info path" ". status tasks";grid-template-columns:18px 1fr 40px;grid-template-rows:40px 1fr 40px;label:RunRow--tablet;'},eS={name:"1rlsbpx-RunRow--desktop",styles:'grid-template-areas:"select status apps info path tasks arrow";grid-template-columns:18px 160px 140px 1fr 40px 80px 30px;grid-template-rows:1fr;label:RunRow--desktop;'},ek={name:"10cj41b-RunRow--mobile",styles:'grid-template-areas:"select . avatar" ". info info" ". status path";grid-template-columns:18px 1fr 40px;grid-template-rows:40px 1fr 40px;label:RunRow--mobile;'},eA={name:"13rblwj-RunRow--tablet",styles:'grid-template-areas:"select . avatar" ". info path" ". status tasks";grid-template-columns:18px 1fr 40px;grid-template-rows:40px 1fr 40px;label:RunRow--tablet;'},eL={name:"jswwnc-RunRow--desktop",styles:'grid-template-areas:"select status info path tasks arrow";grid-template-columns:18px 160px 1fr 40px 80px 30px;grid-template-rows:1fr;label:RunRow--desktop;'},e_={name:"1njjxyn-RunRow--mobile",styles:'grid-template-areas:"select apps avatar" ". info info" ". status path";grid-template-columns:18px 1fr 40px;grid-template-rows:40px 1fr 40px;label:RunRow--mobile;'},eD={name:"nbh1jd-RunRow--tablet",styles:'grid-template-areas:"select apps avatar" ". info path" ". status tasks";grid-template-columns:18px 1fr 40px;grid-template-rows:40px 1fr 40px;label:RunRow--tablet;'},eO={name:"1c0n1jn-RunRow--desktop",styles:'grid-template-areas:"select status apps info path tasks avatar arrow";grid-template-columns:18px 160px 140px 1fr 40px 40px 40px 30px;grid-template-rows:1fr;label:RunRow--desktop;'},RunRow_RunRow=function(e){var t,n,a,r,i,o,l="delete"===e.run.status,s=window.location.search,c=e.run.zap.sourceUrl&&/app.slack.com/.exec(e.run.zap.sourceUrl);return(0,A.tZ)($.Z,{href:(0,d.Hn)("/app/history/".concat(e.run.id).concat(s),["isBack"]),isReadOnly:l,isSelected:e.isSelected,onSelect:function(){e.onSelect(e.run.id,!e.isSelected)},target:e.isEmbed?"_top":void 0,children:(0,A.BX)("div",{css:[eb,(t=e.showOwner,n=e.showZapDetails,a=e.isEmbed?eh:y.w5,t&&n?(0,y.uq)({desktop:eO,tablet:eD,mobile:e_},a):t?(0,y.uq)({desktop:eL,tablet:eA,mobile:ek},a):n?(0,y.uq)({desktop:eS,tablet:eZ,mobile:ex},a):(0,y.uq)({desktop:ev,tablet:eR,mobile:ew},a)),";label:RunRow--RunRow;"],"data-testid":"TaskRow",children:[(0,A.tZ)("label",{css:eg,htmlFor:e.run.id+"select",onClick:function(e){return e.stopPropagation(),!1},children:(0,A.tZ)(F.X,{ariaLabel:"Select run",checked:e.isSelected,id:e.run.id+"select",onChange:function(t){t.stopPropagation(),t.preventDefault();var n=t.target,a=n.value,r=n.checked;e.onSelect(a,r)},tabIndex:-1,value:e.run.id})}),(0,A.tZ)("div",{css:gridArea("status"),children:(0,A.tZ)(RunStatus_RunStatus,{heldReason:e.run.heldReason,heldStaleAuth:e.run.heldStaleAuth,id:e.run.id,status:e.run.status})}),(0,A.BX)("div",{css:ef,children:[e.showZapDetails&&(0,A.BX)("span",{css:ey,children:[(0,A.tZ)(q.x,{color:"neutral800",type:"paragraph3Bold",children:e.run.zap.title||O.E2}),"transfer"===e.run.zap.kind&&(0,A.tZ)(U.S,{color:"gray",size:"small",children:"Transfer"})]}),(0,A.tZ)(q.x,{color:"neutral700",type:"smallPrint1",children:(0,A.tZ)(M.Z,{date:e.run.startTime,format:"MMM DD, YYYY hh:mm:ss a"})}),c&&(0,A.tZ)(K.Z,{logoClass:"SlackAPI",serviceName:"Slack",sourceUrl:e.run.zap.sourceUrl})]}),e.showZapDetails&&(0,A.tZ)("div",{css:gridArea("apps"),children:(0,A.tZ)(H.r,{maxServices:3,renderServiceIcon:function(e){return(0,A.tZ)(J.A,{isInGroup:!0,serviceName:e.name,size:40,src:e.images.url32X32})},services:null!==(r=e.run.zapApps)&&void 0!==r?r:[],size:40})}),(0,A.tZ)("div",{css:[gridArea("tasks"),y.pI,";label:RunRow--RunRow;"],children:(0,A.tZ)(TasksUsed_TasksUsed,{used:e.run.billableCount||0})}),(0,A.tZ)("div",{css:gridArea("path"),children:e.run.hasPaths&&(0,A.tZ)(PathIndicator_PathIndicator,{})}),e.showOwner&&(0,A.tZ)("div",{css:gridArea("avatar"),children:(0,A.tZ)(N.O,{name:(null===(i=e.run.zapOwner)||void 0===i?void 0:i.name)||"",size:40,url:null===(o=e.run.zapOwner)||void 0===o?void 0:o.imageUrl})}),(0,A.tZ)("div",{css:[gridArea("arrow"),e.isEmbed?em:y.eI,";label:RunRow--RunRow;"],children:(0,A.tZ)(Arrow_Arrow,{})})]})})},eE={name:"8xnviz-RunList--pageStyle",styles:"display:flex;justify-content:center;label:RunList--pageStyle;"},ej=(0,y.uq)({tablet:{name:"1pw8dq9-RunList--tablet",styles:"grid-gap:20px;overflow:unset;label:RunList--tablet;"},mobile:{name:"qyhhgx-RunList--mobile",styles:"display:grid;grid-gap:10px;overflow:hidden;label:RunList--mobile;"}});function Loader(){return(0,A.tZ)("div",{css:ej,children:Array.from({length:10},function(e,t){return(0,A.tZ)(I.q,{height:"72px",width:"100%"},t)})})}var RunList_RunList=function(e){var t=e.selectedAll,n=!e.isLoading&&e.runCount>10,a=e.isLoading?1:Math.ceil(e.runCount/10),r=(0,s.useMemo)(function(){return Array.from({length:a},function(t,n){return(0,d.aE)(e.url,{page:n+1})})},[a,e.url]);return(0,A.tZ)("div",{css:ej,"data-testid":"TaskList",children:e.isLoading?(0,A.tZ)(Loader,{}):(0,A.BX)(s.Fragment,{children:[(0,A.tZ)(B.Z,{gap:20,id:"TaskList_List",itemRenderer:function(n,a){return(0,A.tZ)(RunRow_RunRow,{isSelected:e.selectedIds.includes(n.id)||t&&10*e.page+a<O.LS,onSelect:e.onSelect,run:n,showOwner:e.showOwner,showZapDetails:e.showZapDetails,isEmbed:e.isEmbed})},items:e.runs}),n&&(0,A.tZ)("div",{css:eE,children:(0,A.tZ)(C.D,{currentPageIndex:e.page-1,isCentered:"small"===e.size,onPaginate:function(t,n){n.preventDefault(),e.onPageChange(t.pageIndex+1)},pageUrls:r})})]})})},ez=n(13441),eP=["page"];function RunLog_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function RunLog_objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RunLog_ownKeys(Object(n),!0).forEach(function(t){(0,i.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RunLog_ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var eI={name:"j7gs68-RunLog--actionsStyle",styles:"grid-area:actions;label:RunLog--actionsStyle;"},eC=(0,y.uq)({desktop:{name:"8pxyfe-RunLog--desktop",styles:"grid-auto-flow:column;label:RunLog--desktop;"},mobile:{name:"19lvdpm-RunLog--mobile",styles:"display:grid;grid-gap:10px;label:RunLog--mobile;"}}),eB=(0,y.uq)({desktop:{name:"16ph093-RunLog--desktop",styles:'align-items:flex-end;grid-template-areas:"select actions replay";grid-template-columns:100px 1fr auto;grid-template-rows:1fr;label:RunLog--desktop;'},mobile:{name:"l8kq33-RunLog--mobile",styles:'align-items:center;display:grid;grid-gap:10px;grid-template-areas:"select replay" "actions actions";grid-template-columns:100px 1fr;grid-template-rows:40px 1fr;label:RunLog--mobile;'}}),eX=(0,y.uq)({desktop:{name:"ro2238-RunLog--desktop",styles:'grid-template-areas:"select actions replay";grid-template-columns:100px 1fr auto;grid-template-rows:1fr;label:RunLog--desktop;'},mobile:{name:"fqz1ur-RunLog--mobile",styles:'grid-template-areas:"select replay" "actions actions";grid-template-columns:100px 1fr;grid-template-rows:40px 1fr;label:RunLog--mobile;'}}),eM={name:"1xhugv1-RunLog--replayStyle",styles:"align-items:center;display:flex;height:40px;label:RunLog--replayStyle;"},eT={name:"1vv0a3l-RunLog--rightComponentStyle",styles:"grid-area:replay;justify-self:flex-end;label:RunLog--rightComponentStyle;"},eF={name:"a9ir78-RunLog--rootStyle",styles:"display:grid;grid-gap:20px;position:relative;label:RunLog--rootStyle;"},eq={name:"10enov2-RunLog--selectStyle",styles:"grid-area:select;label:RunLog--selectStyle;"};function RunLog(e){var t=e.actionableRunCount,n=e.filters,a=e.getSelectedRuns,i=e.handleFilterChange,y=e.handleFilterReset,x=e.handleOpenDeleteModal,Z=e.handleOpenReplayModal,S=e.handleOpenDownloadRunsModal,k=e.hideStatusFilter,L=e.isEmbed,_=void 0!==L&&L,D=e.isUseRunsLoading,O=e.isUseRunsRefetching,E=e.lastDataFetch,j=e.navigateParentWindow,z=e.onDelete,P=e.onReplay,I=e.onRunsRefetch,C=e.rightComponent,B=e.runCount,X=e.runs,M=e.showOwner,T=e.showZapDetails,F=e.useRunsError,q=(0,l.useRouter)(),U=q.asPath,H=q.query,N=q.pathname,$=(0,h.g)(),K=$.allowTaskReplay,J=$.isTeam,W=(0,m.a)(),Y=(0,g.t)({isEmbed:_});(0,f.p)();var V=D||!W,G=(0,s.useState)([]),Q=G[0],ee=G[1],et=(0,s.useState)("all"===H.selected),en=et[0],ea=et[1],er=new Date(H.end_datetime)<new Date(new Date().setDate(new Date().getDate()-60));function clearSelection(){ee([]),ea("all"===H.selected)}(0,s.useEffect)(function(){I(),clearSelection()},[E]);var ei=(0,w.v)(n),eo=D||O;(0,c.R)("zap-runs-actual-search-time",eo,{activeFilters:ei}),(0,c.R)("zap-runs-time-to-results",D,{activeFilters:ei}),(0,u.u)("zap-runs-time-to-first-results",!D,{activeFilters:ei}),n.page;var el=(0,o.Z)(n,eP);function handleDelete(){z(Q,en),clearSelection(),x(handleDelete,!1)}function handleReplay(){P(Q,en),clearSelection(),Z(handleReplay,!1,K)}(0,b.t)(function(){clearSelection()},[el]);var es=(0,w.g)(n);return(0,A.BX)("div",{css:eF,children:[O&&(0,A.tZ)(p.Z,{}),(0,A.BX)("div",{css:[eB,eX,";label:RunLog--RunLog;"],children:[(0,A.tZ)("span",{css:eq,children:(0,A.tZ)(ListSelectionDropdown_ListSelectionDropdown,{onSelect:function(e){H.selected&&j((0,d.aE)(N,RunLog_objectSpread(RunLog_objectSpread({},H),{},{selected:void 0}))),"all"===e?(ea(!0),ee(X.map(function(e){return e.id}))):"shown"===e?(ee((0,r.Z)(new Set([].concat((0,r.Z)(Q),(0,r.Z)(X.map(function(e){return e.id})))))),ea(!1)):"none"===e&&(ea(!1),ee([]))},value:en?"all":Q.length>0?"shown":"none",passSelection:Q.length>0})}),(0,A.tZ)("span",{css:eI,children:Q.length>0||en&&B>0?(0,A.tZ)(RunActions_RunActions,{count:en?t:Q.length,getCachedRuns:function(){return a(Q)},isDisabled:!1,onDelete:function(){x(handleDelete,!0)},onDownload:function(){S(t,en,Q)},onReplay:function(){Z(handleReplay,!0,K)},size:Y}):(0,A.BX)("div",{css:eC,children:[void 0!==k&&k?(0,A.tZ)("div",{}):(0,A.tZ)(ez.Z,{onChange:function(e){return i("status",e)},size:Y,value:n.status||[]}),_&&(0,A.tZ)(EmbedDateFilter,{id:"EmbedDateFilter",onChange:function(e){return i("dateFilter",e)},size:"large"===Y?"medium":Y,value:n.dateFilter})]})}),(0,A.tZ)("span",{css:eT,children:C||(0,A.tZ)("div",{css:eM,children:(0,A.tZ)(v.Z,{})})})]}),(0,A.tZ)(RunList_RunList,{isLoading:V,onPageChange:function(e){i("page",e)},onSelect:function(e,t){en?(H.selected&&j((0,d.aE)(N,RunLog_objectSpread(RunLog_objectSpread({},H),{},{selected:void 0}))),ea(!1),ee([])):t?ee([].concat((0,r.Z)(Q),[e])):ee(Q.filter(function(t){return t!==e}))},page:n.page||1,selectedAll:en,selectedIds:Q,showOwner:void 0!==M?M:!!J,showZapDetails:T,size:Y,runCount:B,runs:X,url:U,isEmbed:_}),!V&&0===B&&(0,A.tZ)(R.I,{handleFilterReset:y,hasError:!!F,isFilterEmpty:es,isOutOfRetentionPeriod:er,size:Y})]})}},13441:function(e,t,n){var a=n(90550),r=n(25760),i=n(63615),o=n(63951),l=n(52903);t.Z=function(e){var t=(0,i.V)().flags,n=null!=t&&t.editor_custom_error_handling_phase_1?r.wv:r.HJ;return(0,l.tZ)(a.Z,{ariaLabel:"Run Status Filter",getKeyForItem:function(e){return e.value},inputId:e.id,items:n,menuAlign:e.menuAlign,menuAriaLabel:"Status options",onChange:function(t){return e.onChange((t||[]).map(function(e){return e.value}))},placeholder:e.placeholder||"All statuses",renderIcon:function(e){return(0,l.tZ)(o.Z,{status:e.status[0],size:24})},selectedItems:n.filter(function(t){return e.value.includes(t.value)}),visibleItems:n.length})}},63951:function(e,t,n){var a=n(28165),r=n(23273),i=n(25760),o=n(52903);t.Z=function(e){var t,n=e.size,l=void 0===n?30:n,s=e.status,c=e.color;if(!s)return null;var u=i.Jb[s];return u?(0,o.tZ)("div",{css:[(t=c||u.color,(0,a.iv)("align-items:center;background-color:",t,";border-radius:50%;display:flex;height:",l,"px;justify-content:center;width:",l,"px;;label:RunStatusIcon--root;")),";label:RunStatusIcon--RunStatusIcon;"],children:(0,o.tZ)(r.J,{color:u.iconColor||"neutral100",name:u.icon,size:l/2+3+(u.iconSize||0)})}):null}},53092:function(e,t,n){n.d(t,{t:function(){return useDeepEqualEffect}});var a=n(2784),r=n(18149),i=n.n(r),useDeepEqualCompareMemoize=function(e){var t=(0,a.useRef)();return i()(e,t.current)||(t.current=e),t.current},useDeepEqualEffect=function(e,t){(0,a.useEffect)(e,useDeepEqualCompareMemoize(t))}},81055:function(e,t,n){n.d(t,{p:function(){return useIFrameResize}});var a=n(2784),r=n(79411);function useIFrameResize(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,a.useEffect)(function(){var t=document.documentElement.scrollHeight;window.parent.postMessage({height:"".concat(t+e,"px"),type:r.Vm.sizeChange},"*")})}},44779:function(e,t,n){function areFiltersEmpty(e){var t=["app","folderId","nodeId","ownerId"];return Object.keys(e).filter(function(e){return t.includes(e)}).every(function(t){return void 0===e[t]})&&""===e.search&&0===Object.keys(e.dateFilter||{}).length&&0===Object.keys(e.status||[]).length}function getActiveFilterNames(e){return Object.keys(e).filter(function(t){var n=e[t];return"dateFilter"!==t&&"page"!==t&&(Array.isArray(n)?n.length>0:!!n)}).sort(function(e,t){return e.localeCompare(t)}).join(",")}n.d(t,{g:function(){return areFiltersEmpty},v:function(){return getActiveFilterNames}})},79102:function(e,t,n){n.d(t,{R:function(){return useClock}});var a=n(2784),r=n(23356);function useClock(e,t,n){var i=(0,a.useRef)();(0,a.useEffect)(function(){if((0,r.M)()){var a="".concat(e,"_start");if(t){window.performance.mark(a),i.current=!0;return}var o=window.performance.getEntriesByName(a,"mark").length>0;if(i.current&&o){var l=window.performance.measure(e,{detail:n,start:a});i.current=!1,console.debug("⏱️ ".concat(e," measured ").concat(l.duration,"ms"))}}},[e,t])}},26404:function(e,t,n){n.d(t,{u:function(){return useTimeSinceNavigation}});var a=n(2784),r=n(23356);function useTimeSinceNavigation(e,t,n){var i=(0,a.useRef)(!1);(0,a.useEffect)(function(){if((0,r.M)()&&t&&!i.current){i.current=!0;var a,o=(a="routeChangeStart",window.performance.getEntriesByName(a,"mark").length>0?a:"navigationStart"),l=window.performance.measure(e,{detail:n,start:o});console.debug("⏱️ ".concat(e," measured ").concat(l.duration,"ms since navigationStart"))}},[e,t])}},23356:function(e,t,n){n.d(t,{M:function(){return isPerformanceApiAvailable}});var a,isPerformanceApiAvailable=function(){if(void 0!==a)return a;try{performance.measure("isPerformanceApiAvailableTest",{detail:{foo:"bar"},start:"navigationStart"}),a=!0}catch(e){a=!1}return a}}}]);