forked from Romeo-Rosete/awesome
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path[runId]-65507b7b94c7e699.js.download
1 lines (1 loc) · 90.5 KB
/
[runId]-65507b7b94c7e699.js.download
1
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7346],{98007:function(e,t,r){"use strict";r.d(t,{Y:function(){return useDate}});var n=r(2784),i=n.createContext({}),useDate=function(){return n.useContext(i)}},27977:function(e,t,r){"use strict";var n=r(98007),i=r(89284),a=r(16861),o=r(52903);t.Z=function(e){var t=e.date,r=e.format,l=(0,n.Y)().timezone,s=(e.ignoreProfileTimezone?null:l)||(0,i.Z)()||"UTC",u=(0,a.Z)(t,r||"default",s),d=(0,a.Z)(t,"iso",s);return(0,o.tZ)("time",{dateTime:d,title:u,children:u})}},16861:function(e,t,r){"use strict";var n=r(82067),i=r(34476),a={default:"MMMM DD, YYYY",short:"MMM DD, YYYY",exhaustive:"YYYY-MM-DD HH:mm:ss",iso:"YYYY-MM-DD:mm:ssZ"};t.Z=function formatDateTime(e,t,r){var o=(0,i.Z)(e);if("iso"===t)return o.toISOString();try{return(0,n.default)(o,a[t]||t,r?{timezone:r}:void 0)}catch(n){try{return o.toLocaleDateString("en-US",r?{timeZone:r}:void 0)}catch(r){return formatDateTime(e,t)}}}},1791:function(e,t,r){"use strict";var n=r(95235),i=r(29426),a=r(17712),o=r(52903);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}t.Z=function(e){return(0,o.tZ)(i.x,_objectSpread(_objectSpread({},e),{},{href:(0,a.Sr)(e.href,{isBack:!0})}))}},73026:function(e,t,r){"use strict";var n=r(28165),i=r(52903),a={name:"11ojelr-List--rootStyle",styles:"list-style-type:none;margin:0px;margin-block-end:0px;margin-block-start:0px;padding:0px;padding-inline-start:0px;-webkit-margin-after:0px;-webkit-margin-before:0px;-webkit-padding-start:0px;label:List--rootStyle;"};function List(e){var t,r=e.items.map(function(t,r){return(0,i.tZ)("li",{children:e.itemRenderer(t,r)},e.getKey(t,r))});return(0,i.tZ)("ul",{css:[a,e.gap&&(t=e.gap,(0,n.iv)("display:grid;grid-gap:",t,"px;;label:List--rootWithGap;")),";label:List--List;"],id:e.id,children:r})}List.defaultProps={getKey:function(e,t){return t}},t.Z=List},32052:function(e,t,r){"use strict";r.d(t,{Z:function(){return global_Number_Number}});var n=["","k","M","B","T",""],Number_abbreviateNumber=function(e){if(!e||e<1&&e>-1)return"number"==typeof e?e.toString():null;var t=Math.floor(Math.log(Math.abs(e))/Math.log(1e3)),r=n[Math.min(t,n.length)],i=String(Math.abs(e)/Math.pow(1e3,t)).substring(0,3),a=i.endsWith(".")?i.slice(0,-1):i;return"".concat(e<0?"-":"").concat(a).concat(r)},Number_relativeRound=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;if(!e)return 0;var r=Math.floor(Math.log10(Math.abs(e)))-t;return parseFloat((Math[e<0?"floor":"ceil"](e/Math.pow(10,r))*Math.pow(10,r)).toPrecision(12))},i=r(52903),global_Number_Number=function(e){var t=e.children,r=e.infinityLabel,n=e.isAbbreviated,a=void 0!==n&&n,o=e.isFriendly,l=e.isNegativeOneInfinity,s=e.maxDecimals,u=e.minDecimals,d=e.nanLabel,c=t;return isNaN(c)||"number"!=typeof c?(0,i.tZ)("span",{children:void 0===d?"NaN":d}):!isFinite(c)||void 0!==l&&l&&-1===c?(0,i.tZ)("span",{children:void 0===r?"Infinity":r}):(void 0!==o&&o&&(c=Number_relativeRound(c)),c=a?Number_abbreviateNumber(c):c.toLocaleString(void 0,{maximumFractionDigits:void 0===s?2:s,minimumFractionDigits:void 0===u?0:u}),(0,i.tZ)("span",{title:a?t.toLocaleString():void 0,children:c}))}},7158:function(e,t,r){"use strict";r.d(t,{Z:function(){return ReplayModal}});var n=r(28952),i=r(66266),a=r(55414),o=r(20110),l=r(52903);function ReplayModal(e){return(0,l.tZ)(n.u,{ariaLabel:"Replay runs modal",onClosed:e.onClose,children:(0,l.tZ)(i.hz,{children:e.allowTaskReplay?(0,l.BX)("div",{style:{display:"grid",gridGap:"20px",justifyItems:"center"},id:"replay-modal",children:[(0,l.tZ)(a.x,{color:"neutral800",type:"paragraph1ShortBold",children:"Replay Zap runs"}),(0,l.tZ)(a.x,{color:"neutral700",tag:"p",type:"paragraph3",children:"Replaying only retries failed steps, not successful steps."}),(0,l.BX)("div",{style:{display:"grid",gridGap:"30px",gridAutoFlow:"column"},children:[(0,l.tZ)(o.z,{color:"secondary",onClick:e.onClose,size:"small",children:"Close"}),(0,l.tZ)(o.z,{onClick:e.onReplay,size:"small",children:"Replay"})]})]}):(0,l.BX)("div",{style:{display:"grid",gridGap:"20px"},id:"replay-modal",children:[(0,l.tZ)(a.x,{color:"neutral800",type:"sectionHeader3",children:"Manual Replay"}),(0,l.BX)(a.x,{color:"neutral700",tag:"p",type:"paragraph3",children:["The ",(0,l.tZ)("strong",{children:"Manual Replay"})," feature lets you replay failed tasks on demand - making it easy to recover from temporary service outages or other small interruptions between Zapier and external apps."]}),(0,l.tZ)(o.z,{href:"/app/billing/plans",children:"Upgrade to Starter"})]})})})}},63951:function(e,t,r){"use strict";var n=r(28165),i=r(23273),a=r(25760),o=r(52903);t.Z=function(e){var t,r=e.size,l=void 0===r?30:r,s=e.status,u=e.color;if(!s)return null;var d=a.Jb[s];return d?(0,o.tZ)("div",{css:[(t=u||d.color,(0,n.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)(i.J,{color:d.iconColor||"neutral100",name:d.icon,size:l/2+3+(d.iconSize||0)})}):null}},91588:function(e,t,r){"use strict";var n=r(95235),i=r(99029),a=r(11818),o=r(52903);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var l={borderRadius:"4px",fontSize:"8px",height:"14px",width:"14px"},s={borderRadius:"4px",fontSize:"12px",height:"18px",width:"18px"},u={borderRadius:"5px",fontSize:"12px",height:"20px",width:"20px"},d={borderRadius:"6px",fontSize:"14px",height:"24px",width:"24px"},c={borderRadius:"10px",fontSize:"18px",height:"35px",width:"35px"},p={borderRadius:"10px",fontSize:"18px",height:"40px",width:"40px"};t.Z=function(e){var t=e.emoji,r=e.size,h=e.className,g=e.color,m=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({alignItems:"center",backgroundColor:(0,a.Rz)(g),color:i.w.white,display:"flex",fontWeight:600,justifyContent:"center"},{large:d,medium:s,"medium-large":u,mega:p,small:l,"x-large":c}[r]);return(0,o.tZ)("div",{className:h,css:m,children:t})}},7423:function(e,t,r){"use strict";var n=r(95235),i=r(82269),a=r(2784),o=r(20110),l=r(22211),s=r(53939),u=r(52903),d=["isWorking"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var c={name:"for1a5-AsyncButton--rootStyle",styles:"display:flex;flex-direction:row;label:AsyncButton--rootStyle;"};t.Z=function(e){var t=e.isWorking,r=(0,i.Z)(e,d);return(0,u.tZ)(o.z,_objectSpread(_objectSpread({},r),{},{disabled:t||r.disabled,children:(0,u.BX)("span",{css:c,children:[t&&(0,u.BX)(a.Fragment,{children:[(0,u.tZ)(l.$,{}),(0,u.tZ)(s.L,{width:10})]}),r.children]})}))}},49544:function(e,t,r){"use strict";r.d(t,{J5:function(){return getVisiblePaths},KL:function(){return function getChildStepIds(e,t){return t.reduce(function(r,n){return n.parentId===e?[].concat((0,i.Z)(r),[n.id],(0,i.Z)(getChildStepIds(n.id,t))):r},[e])}},eG:function(){return getPathForStep},w3:function(){return getPaths}});var n=r(95235),i=r(12741),a=r(18738);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function getPaths(e){var t={},r={};return e.steps?e.steps.filter(function(e){return(0,a.ro)(e)||(0,a.vX)(e)}).map(function(n,i){if(i>0&&(0,a.ro)(n))return r[n.id]=n.parentId||"",null;var o,l,s=r[n.parentId||""]||n.parentId||"",u=(null!==(o=t[s])&&void 0!==o?o:-1)+1;return t[n.id]=u,_objectSpread(_objectSpread({},n),{},{level:u,meta:_objectSpread(_objectSpread({},n.meta),{},{stepTitle:0===i?null===(l=e.zap)||void 0===l?void 0:l.title:n.meta.stepTitle}),parentId:s})}).filter(Boolean):[]}function getVisiblePaths(e,t){return e.filter(function(e,r){return 0===r||t.includes(e.parentId||"none")})}function getPathForStep(e,t){var r,n=getPaths(e);if(0!==n.length){var i=new Map;if(n.forEach(function(e){return i.set(e.id,e)}),i.has(t))return i.get(t);var a=new Map;(null!==(r=e.steps)&&void 0!==r?r:[]).forEach(function(e){var t;return a.set(e.id,null!==(t=e.parentId)&&void 0!==t?t:void 0)});for(var o=a.get(t);o;){var l=i.get(o);if(l)return l;var s=a.get(o);if(s===o){console.error("Circular reference in step ".concat(t," of run ").concat(e.id,". ").concat(o," is its own parent?"));break}o=s}}}},11818:function(e,t,r){"use strict";r.d(t,{BN:function(){return a},Rz:function(){return getPathColorStyle},bp:function(){return getPathColor},fC:function(){return i}});var n=[{name:"Heroine Blue",value:[73,157,243]},{name:"Peru",value:[205,133,63]},{name:"Yellow Green",value:[154,205,50]},{name:"Dark Magenta",value:[139,0,139]},{name:"Dark Olive Green",value:[85,107,47]},{name:"Light Slate Gray",value:[119,136,153]},{name:"Dark Salmon",value:[233,150,122]},{name:"Dark Slate Gray",value:[47,79,79]},{name:"Dark Sea Green",value:[143,188,143]},{name:"Zapier Orange",value:[251,75,32]}];function getPathColorValue(e){return n.find(function(t){return t.name===e})||n[0]}var getPathColorStyle=function(e){var t=getPathColorValue(e);return"rgb(".concat(t.value.join(", "),")")};function getPathColor(e){var t;return null==e?void 0:null===(t=e.params)||void 0===t?void 0:t.color}var getBackground=function(e){return function(t){var r=getPathColorValue(t);return"rgba(".concat(r.value.join(", "),", ").concat(e,")")}},i=getBackground(.03),a=getBackground(.06);getBackground(.1)},18738:function(e,t,r){"use strict";r.d(t,{ro:function(){return isBranchStep},vX:function(){return isPathFilterStep}});var n=r(25760);function isBranchStep(e){return!!(e&&e.app===n.ET&&"write"===e.type&&"branch"===e.action)}function isPathFilterStep(e){return!!(e&&e.app===n.ET&&"filter"===e.type&&"filter"===e.action)}},89381:function(e,t,r){"use strict";r.d(t,{W:function(){return useDownloadRuns}});var n,i,a,o=r(81333),l=r(7328),s=r(2784),u=r(60138),d=r(33379),c=r(25760),p=r(61390),h=r(53861);(n=a||(a={}))[n.INITIAL=0]="INITIAL",n[n.SENDING=1]="SENDING",n[n.SENT_SUCCESS=2]="SENT_SUCCESS",n[n.SENT_FAILURE=3]="SENT_FAILURE";var g=(0,u.Ps)(i||(i=(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 t=(0,d.D)(g),r=(0,o.Z)(t,2),n=r[0],i=r[1],a=s.useCallback(function(t,r,i){var a,o,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p.tv.JSON;return n({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:r&&i?i:void 0,periodEnd:null==e?void 0:null===(a=e.filters.dateFilter)||void 0===a?void 0:a.to,periodStart:null==e?void 0:null===(o=e.filters.dateFilter)||void 0===o?void 0:o.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:r?null:t}})},[n,null==e?void 0:e.filters]);return{error:(0,h.e$)(i.error),isLoading:i.loading,onDownload:a}}},11606:function(e,t,r){"use strict";r.d(t,{t:function(){return useSize}});var n=r(95235),i=r(87865),a={desktop:"(min-width: 885px)",tablet:"(min-width: 660px) and (max-width: 885px)"},o={desktop:"(min-width: 1024px)",tablet:"(min-width: 660px) and (max-width: 1023px)"};function useSize(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.isEmbed,l=void 0!==r&&r?a:o;return(0,i.Oh)((e={all:{size:"small"}},(0,n.Z)(e,l.tablet,{size:"medium"}),(0,n.Z)(e,l.desktop,{size:"large"}),e)).size}},82145:function(e,t,r){"use strict";r.d(t,{R:function(){return getZapTitle}});var n=r(25760);function getZapTitle(e){return"string"==typeof(null==e?void 0:e.title)&&e.title.length>0?e.title:null!=e&&e.id?"".concat(n.E2," (#").concat(e.id,")"):n.E2}},18867:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return RunDetails}});var n,i,a,o,l,s,u,d=r(5632),c=r(2784),p=r(55414),h=r(26215),g=r(26404),m=r(1791),f=r(25522),v=r(28726),b=r(7158),y=r(75405),S=r(25760),x=r(63615),_=r(581),w=r(93273),Z=r(17712),R=r(28165),k=r(99029),I=r(20110),T=r(52903),P=(0,R.iv)("display:flex;border-radius:5px;background:",k.w.neutral200,";padding:20px 25px;flex-direction:column;align-items:inherit;;label:GetHelpCta--rootStyle;"),O={name:"1kv446n-GetHelpCta--rootMediumStyle",styles:"flex-direction:row;align-items:center;label:GetHelpCta--rootMediumStyle;"},C={name:"11xp55r-GetHelpCta--textContainerStyle",styles:"flex:1 0;margin:0 0 10px 0;label:GetHelpCta--textContainerStyle;"},L={name:"2nd0ws-GetHelpCta--textContainerMediumStyle",styles:"margin:0 30px 0 0;label:GetHelpCta--textContainerMediumStyle;"},E={headingText:"Get help from Zapier",bodyText:"Explore Zapier support options if you need help.",buttonText:"Get help"},D={headingText:"Contact support",bodyText:"Reach out to Zapier support if you need help.",buttonText:"Get help"},GetHelpCta_GetHelpCta=function(e){var t=e.size,r=e.onButtonClick,n=e.isEmailSupportEligible?D:E,i=n.headingText,a=n.bodyText,o=n.buttonText;return(0,T.BX)("aside",{css:[P,"small"!==t&&O,";label:GetHelpCta--GetHelpCta;"],children:[(0,T.BX)("div",{css:[C,"small"!==t&&L,";label:GetHelpCta--GetHelpCta;"],children:[(0,T.tZ)(p.x,{color:"neutral800",tag:"h2",type:"paragraph1Bold",children:i}),(0,T.tZ)(p.x,{color:"neutral800",tag:"p",type:"paragraph3",children:a})]}),(0,T.tZ)(I.z,{onClick:r,children:o})]})},j=r(7328),A=r(60138),z=r(40794),B=(0,A.Ps)(n||(n=(0,j.Z)(["\n query SupportEligibility {\n currentUser {\n id\n supportEligibility {\n isEmailSupportEligible\n isPremierSupportEligible\n }\n }\n }\n"]))),q="/app/get-help";function GetHelpCtaContainer(e){var t,r,n,i,a=e.size,o=e.zapId,l=(r=(t=(0,z.a)(B)).loading,n=t.data,i=t.error,{isLoading:r,eligibility:n&&n.currentUser&&n.currentUser.supportEligibility||{isEmailSupportEligible:void 0,isPremierSupportEligible:void 0},error:i}),s=l.isLoading,u=!1!==l.eligibility.isEmailSupportEligible,d=(0,c.useCallback)(function(){var e=o?"".concat(q,"/zap/").concat(o):q;window.open((0,Z.Au)(e,window.location.href),"_blank")},[o]);return s?null:(0,T.tZ)(GetHelpCta_GetHelpCta,{isEmailSupportEligible:u,onButtonClick:d,size:a})}var N=r(25237),H=r.n(N),X=r(96369),M=r(52522),V=r(7423),F=r(27977),G=r(66415),U=r(99942),K=r(75817),$=r(95283),Y=r(15030),J=r(40962),W=r(79502),Q=r(90341),ee=r(47043),et=r(32052),er=r(81333),en=r(44258),ei=r(87593),ea={name:"bhpt4m-CopiableText--buttonStyle",styles:"background:none;border:none;cursor:pointer;outline:none;label:CopiableText--buttonStyle;"},CopiableText_CopiableText=function(e){var t=e.children,r=e.value,n=(0,en.m)(r),i=(0,er.Z)(n,2),a=i[0],o=i[1];function handleCopy(e){e.preventDefault(),o()}return(0,T.tZ)(ei.p,{content:a?"Copied":"Copy to clipboard",children:function(e){var r=e.childProps;return(0,T.tZ)("button",{"aria-describedby":null==r?void 0:r.ariaDescribedBy,css:ea,onClick:handleCopy,children:t})}})},eo=r(82145),el=(0,M.uq)({tablet:{name:"p22hr5-components--tablet",styles:"display:flex;text-align:start;label:components--tablet;"},mobile:{name:"1rih64i-components--mobile",styles:"align-items:center;display:grid;grid-gap:10px;position:relative;text-align:center;label:components--mobile;"}}),es={name:"wrohgt-components--idCss",styles:"text-align:start;label:components--idCss;"};function CopiableRunID(){var e=(0,d.useRouter)(),t="string"==typeof e.query.runId,r=t?e.query.runId:"";return t&&r?(0,T.tZ)(CopiableText_CopiableText,{value:r,children:(0,T.tZ)("div",{css:es,children:(0,T.tZ)(p.x,{textAlign:"right",color:"neutral700",type:"smallPrint1",children:r})})}):null}function DetailsTable(e){var t,r,n,i,a,o,l=e.run;if(!l)return(0,T.tZ)(G.N,{lines:2,width:300});var s=(null==l?void 0:null===(t=l.zap)||void 0===t?void 0:t.kind)==="transfer",u=!isNaN(null==l?void 0:l.billableCount);return(0,T.BX)(U.i,{children:[(0,T.tZ)(K.R,{children:"Run details table"}),(0,T.tZ)($.s,{children:(0,T.BX)(Y.S,{children:[(0,T.tZ)(J.c,{children:(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:"Run ID"})}),!!l.zapVersionName&&(0,T.tZ)(J.c,{children:(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:"Version"})}),(null==l?void 0:l.startTime)&&(0,T.tZ)(J.c,{children:(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:"Date"})}),!s&&(0,T.tZ)(J.c,{children:(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:"Time zone"})}),(0,T.tZ)(J.c,{children:(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:"Run history"})}),(0,T.tZ)(J.c,{children:s?(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:"Transfer details"}):(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:"Zap details"})}),(0,T.tZ)(J.c,{children:(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:"Task count"})})]})}),(0,T.tZ)(W.R,{children:(0,T.BX)(Y.S,{children:[(0,T.tZ)(Q.g,{children:(0,T.tZ)(CopiableRunID,{})}),!!l.zapVersionName&&(0,T.tZ)(Q.g,{children:l.zapVersionId?(0,T.tZ)(h.r,{href:"/editor/".concat(null==l?void 0:null===(r=l.zap)||void 0===r?void 0:r.id,"/version/").concat(l.zapVersionId),children:(0,T.tZ)(p.x,{color:"blueJeans",type:"smallPrint1",children:null===(n=l.zapVersionName)||void 0===n?void 0:n.slice(0,100)})}):(0,T.tZ)(p.x,{type:"smallPrint1",children:null===(i=l.zapVersionName)||void 0===i?void 0:i.slice(0,100)})}),(null==l?void 0:l.startTime)&&(0,T.tZ)(Q.g,{children:(0,T.tZ)(p.x,{color:"neutral700",type:"smallPrint1",children:(0,T.tZ)(F.Z,{date:l.startTime,format:"exhaustive"})})}),!s&&(0,T.tZ)(Q.g,{children:(0,T.tZ)(p.x,{color:"neutral700",type:"smallPrint1",children:(null==l?void 0:l.timezone)||"UTC"})}),(0,T.tZ)(Q.g,{children:(0,T.tZ)(h.r,{href:"/app/history?root_id=".concat(null==l?void 0:null===(a=l.zap)||void 0===a?void 0:a.id),children:(0,T.tZ)(p.x,{color:"blueJeans",type:"smallPrint1",children:"View"})})}),(0,T.tZ)(Q.g,{children:s?(0,T.tZ)(h.r,{href:"/webintent/edit-zap/".concat(null==l?void 0:l.zap.id),children:(0,T.tZ)(p.x,{color:"blueJeans",type:"smallPrint1",children:"View"})}):(0,T.tZ)(h.r,{href:"/app/zap/".concat(null==l?void 0:null===(o=l.zap)||void 0===o?void 0:o.id),children:(0,T.tZ)(p.x,{color:"blueJeans",type:"smallPrint1",children:"View"})})}),(0,T.tZ)(Q.g,{children:(0,T.tZ)(p.x,{color:"neutral700",type:"smallPrint1",children:(0,T.tZ)("div",{"data-testid":"TaskCount",children:u?(0,T.tZ)(et.Z,{children:null==l?void 0:l.billableCount}):""})})})]})})]})}function Title(e){var t=e.run,r=e.stepId,n=t&&r?function(e,t){if(t!==e.zap.id){var r,n,i=e.steps.find(function(e){return e.id===t});if(i&&null!=i&&null!==(r=i.params)&&void 0!==r&&r.name)return null==i?void 0:null===(n=i.params)||void 0===n?void 0:n.name}return(0,eo.R)(e.zap)}(t,r):(0,T.tZ)(ee.q,{height:"1.25em",width:"70vw"});return(0,T.tZ)("div",{css:el,children:(0,T.tZ)(p.x,{color:"neutral800",type:"sectionHeader1",children:n})})}var eu=r(95235),ed=r(49544);function ErrorAlert_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ErrorAlert_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ErrorAlert_ownKeys(Object(r),!0).forEach(function(t){(0,eu.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ErrorAlert_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ec=(0,R.iv)("align-items:flex-start;border:1px solid ",k.w.neutral300,";border-radius:5px;margin:20px 0px;padding:10px 30px;position:relative;display:flex;flex-direction:column;grid-gap:10px;&::before{background-color:",k.w.error400,';content:"";display:block;position:absolute;top:0;left:0;bottom:0;border-top-left-radius:5px;border-bottom-left-radius:5px;width:10px;};label:ErrorAlert--rootStyle;'),ep={name:"82asu5-ErrorAlert--errorDetailsStyle",styles:"align-items:flex-start;padding:10px 0px;position:relative;display:flex;flex-direction:column;grid-gap:10px;label:ErrorAlert--errorDetailsStyle;"};function ErrorStepLink(e){var t,r,n,i,a,o,l,s,u,h=e.run,g=e.step,m=(0,ed.eG)(h,g.id),f=(t=(0,d.useRouter)(),r=c.useState(null),i=(n=(0,er.Z)(r,2))[0],a=n[1],c.useEffect(function(){a(document.querySelector('[data-id="'.concat(g.id,'"]')))},[g.id,t.query.stepId]),o=c.useCallback(function(){if(i){null==i||null===(r=i.scrollIntoView)||void 0===r||r.call(i,{behavior:"smooth"});return}var e,r,n=null!==(e=null==m?void 0:m.id)&&void 0!==e?e:g.id;t.push({pathname:t.pathname,query:ErrorAlert_objectSpread(ErrorAlert_objectSpread({},t.query),{},{stepId:n})})},[null==m?void 0:m.id,t,g.id,i]),{isOnErrorPath:!!i,onErrorLinkClick:o}),v=f.isOnErrorPath,b=f.onErrorLinkClick,y="string"==typeof(null==m?void 0:null===(l=m.meta)||void 0===l?void 0:l.stepTitle),S=y?m.meta.stepTitle:"path",x=y&&!v?m.meta.stepTitle+" - ":"",_="Step ".concat(g.order,". ").concat(x," ").concat(g.title),w="string"==typeof g.error?g.error:null!==(s=null===(u=g.error)||void 0===u?void 0:u.title)&&void 0!==s?s:"";return(0,T.BX)("div",{css:ep,children:[(0,T.tZ)(p.x,{tag:"p",type:"paragraph3Semibold",children:_}),(0,T.tZ)(p.x,{tag:"p",type:"smallPrint1",children:g.description}),(0,T.tZ)("div",{children:(0,T.BX)(p.x,{type:"smallPrint1",children:["Error message: ",w]})}),(0,T.tZ)(I.z,{color:"secondary",onClick:b,size:"small",children:v?"Go to error":"Go to ".concat(S)})]},g.id)}var ErrorAlert_ErrorAlert=function(e){var t,r=(null!==(t=e.run.steps)&&void 0!==t?t:[]).filter(function(e){return"error"===e.status});return 0===r.length?null:(0,T.BX)("article",{css:ec,children:[r.length>1&&(0,T.BX)(p.x,{tag:"p",type:"paragraph1Bold",children:["There are ",r.length," errors within this run."]}),r.map(function(t){return(0,T.tZ)(ErrorStepLink,{run:e.run,step:t},t.id)})]})},eh=r(63951),eg=r(61390),em=r(11606),ef=(0,M.uq)({tablet:{name:"ofwsu-Status--tablet",styles:"justify-content:flex-start;label:Status--tablet;"},mobile:{name:"1x318z5-Status--mobile",styles:"align-items:center;display:grid;grid-auto-flow:column;grid-gap:10px;justify-content:center;label:Status--mobile;"}});function Status(e){var t,r=e.run,n="small"===(0,em.t)(),i=(0,S.Dk)(null==r?void 0:r.status,null==r?void 0:r.heldReason,null==r?void 0:r.heldStaleAuth),a=r?i.label:(0,T.tZ)(ee.q,{height:"1.25em",width:300});return(0,T.BX)("div",{css:ef,children:[(0,T.tZ)(eh.Z,{status:null!==(t=null==r?void 0:r.status)&&void 0!==t?t:eg.VO.unknown,size:35}),(0,T.tZ)(p.x,{type:n?"subHeader1Semibold":"sectionHeader3Semibold",color:"neutral700",children:a}),i.subLabel&&(0,T.BX)(p.x,{color:"gray60",type:n?"paragraph3":"paragraph1Short",children:["(",i.subLabel,")"]})]})}var ev=H()(function(){return Promise.all([r.e(5196),r.e(8611)]).then(r.bind(r,28611)).then(function(e){return e.PathsMenu})},{loadableGenerated:{webpack:function(){return[28611]}}}),eb=H()(function(){return r.e(2482).then(r.bind(r,42482))},{loadableGenerated:{webpack:function(){return[42482]}}}),ey=(0,M.uq)({tablet:{name:"er9c95-RunHeader--tablet",styles:"display:flex;text-align:start;label:RunHeader--tablet;"},mobile:{name:"17jx63g-RunHeader--mobile",styles:"align-items:center;display:flex;grid-gap:20px;justify-content:center;position:relative;text-align:center;label:RunHeader--mobile;"}}),eS=(0,M.uq)({tablet:{name:"1f1k91u-RunHeader--tablet",styles:"grid-template-columns:1fr auto;label:RunHeader--tablet;"},mobile:{name:"t2pf42-RunHeader--mobile",styles:"align-items:center;display:grid;grid-gap:10px;label:RunHeader--mobile;"}}),ex={name:"16nh9yu-RunHeader--rootStyle",styles:"display:grid;grid-gap:15px;label:RunHeader--rootStyle;"},e_=(0,M.uq)({tablet:{name:"1v2vck1-RunHeader--tablet",styles:"display:flex;justify-content:space-between;text-align:start;label:RunHeader--tablet;"},mobile:{name:"1drcvoz-RunHeader--mobile",styles:"align-items:center;display:grid;grid-gap:10px;position:relative;text-align:center;label:RunHeader--mobile;"}}),RunHeader_RunHeader=function(e){var t,r,n=e.isReplaying,i=e.isTransfer,a=e.onReplay,o=e.run,l=e.stepId,s=e.url,u=(0,d.useRouter)(),p=(0,x.V)().flags,h=(null==o?void 0:null===(t=o.zap)||void 0===t?void 0:t.sourceUrl)&&/app.slack.com/.test(o.zap.sourceUrl),g=c.useCallback(function(e){var t=(0,Z.Hn)(s,["isBack","nodeId","pathId","stepId"]),r=(0,Z.aE)(t,{stepId:e});u.push(r)},[u,s]);return(0,T.BX)("div",{css:ex,children:[(0,T.tZ)("div",{css:e_,children:(0,T.tZ)(Status,{run:o})}),i&&(0,T.tZ)("div",{"data-testid":"transferTag",children:(0,T.tZ)(X.S,{children:"Transfer"})}),(0,T.BX)("div",{css:eS,children:[(0,T.tZ)(Title,{run:o,stepId:l}),(0,T.BX)("div",{css:ey,children:[(null==o?void 0:o.hasPaths)&&(0,T.tZ)(ev,{onSelectPath:g,run:o}),(null==o?void 0:o.canReplay)&&(0,T.tZ)(V.Z,{isWorking:n,onClick:a,children:n?"Replaying":"Replay ".concat(i?"Transfer":"Zap"," run")})]})]}),h&&(0,T.tZ)(eb,{logoClass:"SlackAPI",serviceName:"Slack",sourceUrl:null!==(r=null==o?void 0:o.zap.sourceUrl)&&void 0!==r?r:""}),(null==p?void 0:p.observe_run_details_error_alert)&&(null==o?void 0:o.status)==="error"&&(0,T.tZ)(ErrorAlert_ErrorAlert,{run:o}),(0,T.tZ)(DetailsTable,{run:o})]})},ew=r(12741),eZ=r(18738),eR=r(98007),ek=r(16861),eI=r(34476),eT=r(25155),eP=r(19928),eO=r.n(eP),utils_formatTimeSpan=function(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=(0,eI.Z)(e),i=(0,eI.Z)(t),a=Math.abs((0,eT.differenceInWeeks)(n,i));if(a>0&&a<4){var o=Math.abs((0,eT.differenceInDays)(n,i))%7<4?a:a+1,l=(0,eT.isAfter)(i,n),s=r&&l?"in ":"",u=r&&!l?" ago":"";return"".concat(s).concat(o," ").concat(eO()("week",o)).concat(u)}return(0,eT.distanceInWordsStrict)(n,i,{addSuffix:r})},eC=r(89284),RelativeTime_RelativeTime=function(e){var t=e.date,r=e.formatter,n=e.hasSuffix,i=(0,eR.Y)().timezone||(0,eC.Z)()||"UTC",a=(0,ek.Z)(t,"iso",i);return(0,T.tZ)("time",{dateTime:a,title:a,children:(void 0===r?utils_formatTimeSpan:r)(Date.now(),t,!1!==n)})},eL=r(99570),eE=r(31783),eD=r(11818),ej=r(3e3),eA=r(23273),ez=r(38716),eB=r(59712),eq=r(8736),createSafeStringifyReplacer=function(){var e=new WeakSet;return function(t,r){if("object"==typeof r&&null!==r){if(e.has(r))return"[Circular]";e.add(r)}return r}},safeStringify=function(e,t){try{return JSON.stringify(e,createSafeStringifyReplacer(),t)}catch(e){return}},eN=r(84133);function useTrackError_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function useTrackError_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?useTrackError_ownKeys(Object(r),!0).forEach(function(t){(0,eu.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):useTrackError_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var useErrorTrackingContext=function(){var e=(0,ez.X8)(),t=(0,eN.Z)("sessionId"),r=(0,er.Z)(t,2),n=r[0],i=r[1];return(0,c.useEffect)(function(){n||i(Math.floor(9007199254740991*Math.random()))},[n]),{accountId:e,sessionId:n}},maybeString=function(e){if("string"==typeof e)return e.trim()||void 0},maybeInt=function(e){var t=parseInt(e);if(!isNaN(t))return t},formatConstructor=function(e){var t,r;return e&&e.constructor?"string"==typeof e.constructor?String(e.constructor).replace(/\(\)$/,""):"function"==typeof e.constructor||"object"==typeof e.constructor?maybeString(e.constructor.name||(null===(t=e.constructor)||void 0===t?void 0:null===(r=t.prototype)||void 0===r?void 0:r.name)||""):void 0:void 0},errorToObject=function(e){var t={constructor:""};if(t.constructor=formatConstructor(e),"string"==typeof e)return t.message=e,t;t.message=maybeString((null==e?void 0:e.message)||"")||String(e),t.name=maybeString((null==e?void 0:e.name)||""),t.stack=maybeString((null==e?void 0:e.stack)||"");var r=Object.keys(e).reduce(function(r,n){return t[n]||"function"==typeof e[n]?r:useTrackError_objectSpread(useTrackError_objectSpread({},r),{},(0,eu.Z)({},n,e[n]))},{});return Object.keys(r).length&&(t.properties=r),t},createTrackingProps=function(e){var t=e.accountId,r=e.action,n=e.details,i=e.error,a=e.implementationId,o=e.nodeId,l=e.renderedDetails,s=e.renderedLocation,u=e.renderedText,d=e.sessionId,c=errorToObject(i||u);return{account_id:t,action:maybeString(r),details:maybeString(n),errorCode:c.properties&&c.properties.code,errorConstructor:c.constructor,errorId:c.properties&&c.properties.id,errorMessage:c.message,errorName:c.name,errorProperties:c.properties&&safeStringify(c.properties),errorStack:c.stack,errorStatus:c.properties&&c.properties.status,implementationId:maybeString(a),nodeId:maybeInt(o||c.properties&&c.properties.nodeId),renderedDetails:l,renderedLocation:s,renderedText:u.trim(),sessionId:d}},useTrackError=function(){var e=useErrorTrackingContext();return function(t){e.sessionId&&((0,eq.emit)(createTrackingProps(useTrackError_objectSpread(useTrackError_objectSpread({},t),e)),"renderedError"),(0,eB.kW)("event","Viewed Tracked Error"))}},useTrackErrorOnce=function(){var e=useTrackError(),t=(0,c.useRef)([]);return function(r){var n=!(arguments.length>1)||void 0===arguments[1]||arguments[1];t.current.includes(n)||(t.current.push(n),e(r))}},truncate=function(e,t){return e.length<=t?e:"".concat(e.slice(0,t),"...")},eH=r(82269),RunStepError_strToBin=function(e){for(var t,r=new Uint16Array(e.length),n=0;n<r.length;n++)r[n]=e.charCodeAt(n);return(t=String.fromCharCode,function(e){return t.apply(void 0,(0,ew.Z)(e))})(new Uint8Array(r.buffer))},RunStepError_encodeErrorBundle=function(e){var t={};return["id","title","code","status","step"].forEach(function(r){t[r]=e[r]}),t.title=truncate(t.title||"",250),btoa(RunStepError_strToBin(JSON.stringify(t)))},eX=["zap","error"];function buildGetHelpPath_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var eM="/app/get-help",buildGetHelpPath=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.zap,r=e.error,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?buildGetHelpPath_ownKeys(Object(r),!0).forEach(function(t){(0,eu.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):buildGetHelpPath_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},(0,eH.Z)(e,eX));r&&(n.error="string"==typeof r?r:RunStepError_encodeErrorBundle(r));var i=(0,Z.Sr)(t?"".concat(eM,"/zap/").concat(t):eM,n,!0);return(0,Z.Au)(i,window.location.href)},eV=r(3842),getRelatedCodesForError=function(e){var t=[];if(e&&"string"!=typeof e&&(e.code&&t.push(e.code),"number"==typeof e.status)){var r=String(e.status);t.push(r),3===r.length&&t.push("".concat(r[0],"xx"))}return t},eF={read:"trigger",write:"action",filter:"action",search:"search",search_or_write:"search"},useTroubleshooting_getTroubleshootingVariables=function(e,t){var r={};if(t){t.selected_api&&(r.app=t.selected_api);var n,i=(n=t.type_of)?eF[n]?eF[n]:Object.values(eF).includes(n)?n:void 0:n;i&&(r.actionType=i),t.selected_api&&(r.appAction=t.action)}if(e){var a=getRelatedCodesForError(e);0!==a.length&&(r.relatedCodes=a)}return r},eG=(0,A.Ps)(i||(i=(0,j.Z)(["\n query HelpDocsTroubleshooting(\n $actionType: HelpDocActionType\n $app: String\n $appAction: String\n $relatedCodes: [String!]\n ) {\n helpDocTroubleshooting(\n actionType: $actionType\n app: $app\n appAction: $appAction\n limit: 1\n relatedCodes: $relatedCodes\n ) {\n id\n canonicalPath\n }\n }\n"]))),eU=(0,A.Ps)(a||(a=(0,j.Z)(["\n query AITroubleshooting($runId: ID!, $stepIndex: Int!) {\n helpAITroubleshooting(runId: $runId, stepIndex: $stepIndex) {\n aiResponse\n aiRetrievedHelpDocUrl\n aiRetrievedHelpDocTitle\n aiPredictionId\n aiPrompt\n app\n errorMessageUsedInPrompt\n }\n }\n"]))),parseData=function(e){var t;return null==e?void 0:null===(t=e.helpDocTroubleshooting[0])||void 0===t?void 0:t.canonicalPath},eK=(0,M.uq)({tablet:{name:"pl0od9-RunStepError--tablet",styles:"grid-template-columns:1fr max-content;label:RunStepError--tablet;"},mobile:(0,R.iv)("align-items:center;border-top:1px solid ",k.w.neutral300,";display:grid;grid-gap:14px;grid-template-columns:1fr;padding:14px;position:relative;&::before{background-color:",k.w.error400,';content:"";display:block;position:absolute;top:0;left:0;bottom:0;border-top-left-radius:3px;border-bottom-left-radius:3px;width:10px;};label:RunStepError--mobile;')}),e$=(0,R.iv)("&::before{background-color:",k.w.warning400,";};label:RunStepError--softCss;"),eY={name:"1cv0jwn-RunStepError--buttonsCss",styles:"display:grid;grid-gap:20px;label:RunStepError--buttonsCss;"},eJ=(0,R.iv)(ej.ZT.paragraph3Bold," color:",k.w.neutral800,";word-break:break-all;;label:RunStepError--messageCss;"),eW={name:"3s2xpu-RunStepError--messageContainerCss",styles:"align-items:center;display:grid;grid-gap:14px;grid-template-columns:24px 1fr;padding:14px;position:relative;label:RunStepError--messageContainerCss;"},eQ={name:"1wtuan6-RunStepError--toggleDetailsCss",styles:"font-weight:700;text-decoration:underline;white-space:nowrap;label:RunStepError--toggleDetailsCss;"},RunStepError_RunStepError=function(e){var t,r,n,i,a,o,l,s=e.error,u=e.isSoft,d=e.runId,p=e.step,g=e.zapId,m=(0,c.useState)(!1),f=m[0],v=m[1],b=useTrackErrorOnce(),y=(0,_.i)().emitEvent,w=(0,x.V)().flags,Z="string"==typeof s?s:s.title,P="string"==typeof s?void 0:s,O=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=(t||"").trim().match(/.+[\n\r]*/g)||[],n=(r[0]||"").trim();return n.length>250?(e=t,n=truncate(n,250)):e=r.slice(1).join(""),n===(e=e.replace(/\r/g,"").replace(/^[ \t]+$/gm,"").replace(/[\n]{2,}/g,"\n\n").replace(/[ \t]+$/gm,"").replace(/^\n+|( *\n+)$/,""))&&(e=""),{details:e,message:n}}(Z),C=O.message,L=O.details,E=""!==C,D=(t={action:null!==(o=p.action)&&void 0!==o?o:void 0,selected_api:null!==(l=p.app)&&void 0!==l?l:void 0,type_of:p.type},r=(0,eV.t)(eG,{variables:useTroubleshooting_getTroubleshootingVariables(P,t)}),i=(n=(0,er.Z)(r,2))[0],{isLoading:(a=n[1]).loading,load:i,data:parseData(a.data)}),j=D.data,A=D.isLoading,z=D.load;(0,c.useEffect)(function(){j&&window.open(j)},[j]),b({action:p.action,details:L,error:s,implementationId:p.app,nodeId:p.id,renderedDetails:f,renderedLocation:"history-DetailStepError",renderedText:C,zapId:g},f),(0,c.useEffect)(function(){var e,t,r,n,i,a=errorToObject(s);y({eventName:"zap.history.ZapRenderErrorEvent",meta:{action_name:p.action,error_code:null===(e=a.properties)||void 0===e?void 0:e.code,error_constructor:a.constructor,error_id:null===(t=a.properties)||void 0===t?void 0:t.id,error_message:null===(r=a.properties)||void 0===r?void 0:r.message,error_name:a.name,error_properties:null===(n=a.properties)||void 0===n?void 0:n.title,error_status:null===(i=a.properties)||void 0===i?void 0:i.status,node_id:Number(p.id),node_zap_id:Number(g),rendered_detail_text:E?C:null,rendered_location_name:"history-DetailStepError",rendered_text:E?C:null,selected_api:p.app}})},[y,f]);var B=buildGetHelpPath({error:P,zap:g});return(0,T.BX)("div",{css:[eK,u&&e$,";label:RunStepError--RunStepError;"],children:[E&&(0,T.tZ)("div",{children:(0,T.BX)("div",{css:eW,children:[(0,T.tZ)(eA.J,{name:"alertInfo",size:24,color:u?"warning400":"error400"}),(0,T.BX)("p",{css:eJ,children:[C.split("\n").map(function(e,t){return(0,T.tZ)("p",{children:e},t)})," ",E&&!!L&&(0,T.tZ)(h.r,{color:"primary",css:eQ,href:"#",onClick:function(e){e.preventDefault(),v(!f)},children:f?"Hide details":"Show Details"})]})]})}),(0,T.BX)("div",{css:eY,children:[(0,T.tZ)(I.z,{disabled:A,onClick:function(){j?window.open(j):(y({eventName:S.rw,meta:{custom_tracking_fields:{node_id:Number(p.id),zap_id:g,zap_run_id:d},destination_url_address:j,event_action:"click",interaction_goal:"troubleshoot_zap_run",interaction_name:"zap_run_details_interaction",interaction_raw_text:null!=w&&w.monitor_ai_error_message?"Get help":"Troubleshoot Error",node_zap_id:Number(g),option_selected:"troubleshoot_error"}}),z())},size:"small",children:A?"Loading...":u||null!=w&&w.monitor_ai_error_message?"Get help":"Troubleshoot error"}),(0,T.tZ)(I.z,{color:"secondary",href:B,onClick:function(){y({eventName:S.rw,meta:{custom_tracking_fields:{node_id:Number(p.id),zap_id:g,zap_run_id:d},destination_url_address:B,event_action:"click",interaction_goal:"troubleshoot_zap_run",interaction_name:"zap_run_details_interaction",interaction_raw_text:null!=w&&w.monitor_ai_error_message?"Contact Support":"Get help",node_zap_id:Number(g),option_selected:"get_help"}})},size:"small",target:"_blank",children:null!=w&&w.monitor_ai_error_message?"Contact Support":"Get Help"})]}),f&&(0,T.tZ)("pre",{css:(0,R.iv)(ej.ZT.smallPrint1," border-top:1px solid ",u?k.w.warning400:k.w.error400,";color:",k.w.black,";margin-top:14px;overflow-x:scroll;padding-top:14px;white-space:pre;;label:RunStepError--detailsCss;"),children:L})]})},e0=r(73026),e1=(0,M.uq)({tablet:{name:"p7hipk-RunStepFilterResult--tablet",styles:"grid-template-columns:25px repeat(4, auto);label:RunStepFilterResult--tablet;"},mobile:(0,R.iv)("align-items:center;border-top:1px solid ",k.w.neutral400,";display:grid;font-family:Courier,monospace;font-size:14px;grid-gap:6px;justify-content:flex-start;padding:20px;;label:RunStepFilterResult--mobile;")}),partStyle=function(e){var t=e.bg,r=e.color;return(0,R.iv)("background-color:",k.w[t],";border-radius:3px;color:",k.w[r],";padding:5px;;label:RunStepFilterResult--partStyle;")},RunStepFilters_RunStepFilterResult=function(e){var t,r=e.index,n=e.isPath,i=e.result,a="success"===i.status,o="success"===(t=i.status)?{bg:"success100",color:"neutral800",icon:"success"}:"invalid"===t||n&&"success"!==t?{bg:"error100",color:"error500",icon:"error"}:{bg:"warning100",color:"neutral800",icon:"warning"};return(0,T.BX)("div",{css:e1,children:[(0,T.tZ)("div",{children:a?(0,T.tZ)(eh.Z,{size:25,status:eg.VO.success}):(0,T.tZ)(eh.Z,{color:k.w.warning500,size:25,status:eg.VO.halted})}),(0,T.BX)("span",{children:[r,"."]}),(0,T.tZ)("div",{css:partStyle(o),children:i.sample}),(0,T.tZ)("div",{css:partStyle(o),children:i.match}),i.value&&(0,T.tZ)("div",{css:partStyle(o),children:i.value})]})};function utils_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function utils_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?utils_ownKeys(Object(r),!0).forEach(function(t){(0,eu.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):utils_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var e2={boolean:"(Boolean) Is true",icontains:"(Text) Contains",idateequal:"(Date/time) Equals",idategreater:"(Date/time) After",idateless:"(Date/time) Before",iendswith:"(Text) Ends with",iexact:"(Text) Exactly matches",iexist:"Exists",igreater:"(Number) Greater than",iless:"(Number) Less than",ireversecontains:"(Text) Is in",istartswith:"(Text) Starts with","not-boolean":"(Boolean) Is false","not-icontains":"(Text) Does not contain","not-iendswith":"(Text) Does not end with","not-iexact":"(Text) Does not exactly match","not-iexist":"Does not exist","not-ireversecontains":"(Text) Is not in","not-istartswith":"(Text) Does not start with"},e5=/^not-/;function toUnnegatedMatch(e){return(e||"").replace(e5,"")}function findResult(e,t){return e.find(function(e){return e.id===t})}var RunStepFilters_RunStepFilters=function(e){var t,r,n=e.isPath,i=e.results,a=(t=e.rules||[],r=i||[],t.map(function(e){var t;return utils_objectSpread(utils_objectSpread({},e),{},{match:e2[e&&"stop"===e.action?(t=e.match,"".concat("not-").concat(toUnnegatedMatch(t))):toUnnegatedMatch(e.match)]||"(missing comparison)",sample:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,r=e;return Array.isArray(e)?r=e.map(function(e){return"string"==typeof e?e:JSON.stringify(e)}).join(", "):!!e===e&&(r=String(e)),truncate(new String(r).toString(),t)}((findResult(r,e.id)||{sample:void 0}).sample)||"(missing value)",status:(findResult(r,e.id)||{}).did_pass?"success":"fail"})}));return a.length>0?(0,T.tZ)(e0.Z,{itemRenderer:function(e,t){return(0,T.tZ)(RunStepFilters_RunStepFilterResult,{index:t+1,isPath:n,result:e})},items:a}):null},e3=r(91588),getPathName=function(e){var t;return(null==e?void 0:null===(t=e.meta)||void 0===t?void 0:t.stepTitle)||""},getPathEmoji=function(e){var t;return null==e?void 0:null===(t=e.params)||void 0===t?void 0:t.emoji},e7=(0,R.iv)("background-color:",k.w.neutral200,";border-radius:3px;align-items:center;display:grid;grid-gap:10px;grid-template-columns:24px 1fr 128px;padding:15px 20px;;label:PathLink--linkStyle;"),e4=(0,R.iv)("background-color:",k.w.neutral100,";border:1px solid ",k.w.neutral400,";border-radius:5px;padding:2px;;label:PathLink--iconStyle;");function PathLink(e){var t=e.path,r=e.url,n={color:(0,eD.bp)(t),emoji:getPathEmoji(t),name:getPathName(t)},i=n.color,a=n.emoji,o=n.name,l=t.frameId?(0,Z.aE)((0,Z.JI)(r).baseHref,{stepId:t.id}):void 0;return(0,T.BX)("div",{"data-testid":"".concat(o,"_path"),css:e7,children:[(0,T.tZ)("div",{css:e4,children:(0,T.tZ)(e3.Z,{color:i,emoji:a,size:"medium"})}),(0,T.BX)("span",{children:[(0,T.tZ)(p.x,{type:"paragraph3Semibold",children:o}),t.childrenHavePaths&&(0,T.BX)(p.x,{color:"neutral700",type:"smallPrint1",children:[" ","(paths inside)"]})]}),!!l&&(0,T.tZ)(I.z,{color:"secondary",size:"small",href:l,children:"See details"})]})}var e8=(0,R.iv)("border-top:1px solid ",k.w.neutral400,";display:grid;grid-gap:20px;padding:20px;;label:RunStepPaths--rootStyle;"),e6={name:"4ka7e6-RunStepPaths--groupStyle",styles:"display:grid;grid-gap:10px;label:RunStepPaths--groupStyle;"},e9={name:"10a4jm4-RunStepPaths--headerStyle",styles:"align-items:center;display:grid;grid-gap:10px;grid-template-columns:30px 1fr;label:RunStepPaths--headerStyle;"};function getHeader(e,t){return"".concat(e>1?"These":"This"," ").concat(eO()("path",e)," ").concat(t?"ran":"did not run",":")}var RunStepPaths_RunStepPaths=function(e){var t,r,n=e.childSteps,i=e.url,a=(t=[],r=[],n.forEach(function(e){"success"===e.status?t.push(e):r.push(e)}),{pathsThatDidNotRun:r,pathsThatRan:t}),o=a.pathsThatRan,l=a.pathsThatDidNotRun;return(0,T.BX)("div",{css:e8,children:[o.length>0&&(0,T.BX)("div",{css:e6,"data-testid":"PathGroup",children:[(0,T.BX)("span",{css:e9,children:[(0,T.tZ)(eA.J,{color:"success400",name:"formCheckCircle",size:30}),(0,T.tZ)(p.x,{type:"smallPrint1Semibold",children:getHeader(o.length,!0)})]}),(0,T.tZ)(e0.Z,{gap:5,itemRenderer:function(e){return(0,T.tZ)(PathLink,{path:e,url:i})},items:o})]},"run paths"),l.length>0&&(0,T.BX)("div",{css:e6,"data-testid":"PathGroup",children:[(0,T.BX)("span",{css:e9,children:[(0,T.tZ)(eh.Z,{size:30,status:eg.VO.halted}),(0,T.tZ)(p.x,{type:"smallPrint1Semibold",children:getHeader(l.length,!1)})]}),(0,T.tZ)(e0.Z,{gap:5,itemRenderer:function(e){return(0,T.tZ)(PathLink,{path:e,url:i})},items:l})]},"did not run paths")]})},te=r(87416),tt=r(53583),tr=r(33379),tn=(0,A.Ps)(o||(o=(0,j.Z)(["\n query AIUsageAgreement {\n currentUser {\n id\n aiAgreement {\n name\n date\n }\n }\n }\n"]))),ti=(0,A.Ps)(l||(l=(0,j.Z)(["\n mutation AcceptAIUsageAgreement {\n acceptAiAgreement\n }\n"]))),ta=r(87234),to=r(47436),tl=r(22211),ts=r(56119),tu=r(42126),td=r(53939),tc=(0,A.Ps)(s||(s=(0,j.Z)(["\n query ZapRunRequestLog(\n $accountId: ID!\n $invocationId: String!\n $runId: String!\n ) {\n zapRunRequestLog(\n accountId: $accountId\n invocationId: $invocationId\n runId: $runId\n ) {\n requestData\n requestDurationMs\n requestHeaders\n requestMethod\n requestParams\n requestUrl\n responseContent\n responseHeaders\n requestData\n responseStatusCode\n }\n }\n"]))),tp=r(79674),th=r.n(tp),tg=r(81692),isTypeOf=function(e,t){return typeof e===t},isObject=function(e){return e instanceof Object};function isIterable(e){return!!(isObject(e)&&!isTypeOf(e,"function")||Array.isArray(e))}function isObjectLike(e){return null!==e&&"object"==typeof e}var tm=(0,R.iv)("background-color:",k.w.peach,";;label:highlightMatches--highlightStyle;"),highlightMatches=function(e,t){var r=e.split(RegExp("(".concat(t,")"),"gi"));return(0,T.BX)("span",{children:[" ",r.map(function(e,r){return e.toLowerCase()===t.toLowerCase()?(0,T.tZ)("span",{css:tm,children:e},r):e})]})},tf={name:"1uf7lr6-sharedStyles--labelStyle",styles:"padding:0.3rem 0.6rem;border-radius:4px;font-family:monospace;width:30%;padding-left:10px;label:sharedStyles--labelStyle;"},valueStyle=function(e){return(0,R.iv)("background-color:",k.w.neutral200,";padding:0.3rem 0.6rem;border-radius:4px;font-family:monospace;width:",e?"100%":"70%",";overflow:auto;;label:sharedStyles--valueStyle;")},RequestLogField=function(e){var t=e.isFullWidth,r=void 0!==t&&t,n=e.label,i=e.query,a=e.value,o=i&&(n.toLowerCase().includes(i.toLowerCase())||a&&a.toString().toLowerCase().includes(i.toLowerCase()));return!i||o?(0,T.BX)("div",{css:(0,R.iv)("padding:5px 0;display:flex;flex-direction:",r?"column":"row",";;label:RequestLogField--requestLogFieldStyle;"),children:[(0,T.tZ)("div",{css:tf,children:(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:i?highlightMatches("".concat(e.label,": "),i):"".concat(e.label,": ")})}),(0,T.tZ)("div",{css:valueStyle(r),children:(0,T.tZ)(p.x,{type:"smallPrint1",children:(0,T.tZ)("code",{children:e.value?i?highlightMatches(e.value.toString(),i):e.value:"N/A"})})})]}):null},tv=r(95922),tb={name:"1qzs0t6-RequestLogHeaders--requestLogHeadersStyle",styles:"display:flex;flex-direction:column;margin-bottom:0rem;label:RequestLogHeaders--requestLogHeadersStyle;"},ty={name:"1nszg6z-RequestLogHeaders--toggleExpandContainerStyle",styles:"cursor:pointer;display:flex;flex-direction:row;padding-top:4px;label:RequestLogHeaders--toggleExpandContainerStyle;"},tS={name:"1kepce9-RequestLogHeaders--toggleExpandButtonStyle",styles:"display:flex;font-family:monospace;flex-direction:row;padding-top:0.2rem;margin-bottom:0.5rem;user-select:none;label:RequestLogHeaders--toggleExpandButtonStyle;"},tx={name:"rd1y4v-RequestLogHeaders--expandedHeadersStyle",styles:"display:flex;flex-direction:column;gap:0.5rem;overflow:auto;label:RequestLogHeaders--expandedHeadersStyle;"},t_={name:"kui6uj-RequestLogHeaders--headerValueItemStyle",styles:"display:flex;padding-left:2rem;label:RequestLogHeaders--headerValueItemStyle;"},tw={name:"1a4ikyf-RequestLogHeaders--toggleTextStyle",styles:"display:flex;padding-left:10px;padding-top:0.1rem;label:RequestLogHeaders--toggleTextStyle;"},RequestLogHeaders=function(e){var t=e.label,r=e.value,n=e.query,i=(0,c.useState)(!1),a=i[0],o=i[1],l=n&&(t.toLowerCase().includes(n.toLowerCase())||r&&r.toString().toLowerCase().includes(n.toLowerCase()));if(!r||n&&!l)return null;var s=String(r).split("\n").filter(function(e){return""!==e.trim()}).map(function(e){var t=e.split(":"),r=(0,tv.Z)(t),n=r[0],i=r.slice(1).join(":").trim();return{key:n.trim(),value:i}});return(0,T.BX)("div",{css:tb,children:[(0,T.tZ)("div",{css:ty,children:(0,T.BX)("div",{css:tS,onClick:function(){return o(!a)},onKeyDown:function(){return o(!a)},role:"button",tabIndex:0,children:[(0,T.tZ)("div",{css:tw,children:(0,T.tZ)(p.x,{type:"smallPrint1Bold",children:a?"Collapse Headers":"Expand ".concat(s.length," Headers")})}),(0,T.tZ)("div",{children:a?(0,T.tZ)(eA.J,{name:"arrowSmallDown",size:25}):(0,T.tZ)(eA.J,{name:"arrowSmallRight",size:25})})]})}),a&&(0,T.tZ)("div",{css:tx,children:s.map(function(e,t){return(0,T.BX)("div",{css:t_,children:[(0,T.tZ)("div",{css:tf,children:(0,T.tZ)(p.x,{type:"smallPrint1",children:(0,T.tZ)("code",{children:n?highlightMatches("".concat(e.key,": "),n):"".concat(e.key,": ")})})}),(0,T.tZ)("div",{css:valueStyle(!1),children:e.value&&(0,T.tZ)(p.x,{type:"smallPrint1",children:(0,T.tZ)("code",{children:n?highlightMatches("".concat(e.value,": "),n):"".concat(e.value,": ")})})})]},t)})})]})},tZ=(0,R.iv)("border-bottom:1px dashed ",k.w.neutral400,";width:100%;;label:RunRequestLogs--dashedLineStyle;"),tR={name:"hwdnhb-RunRequestLogs--loaderStyle",styles:"display:flex;padding:20px;flex-direction:column;align-items:center;label:RunRequestLogs--loaderStyle;"},tk=(0,R.iv)("background-color:",k.w.neutral200,";padding:30px;text-align:center;width:calc(100% - 45px);;label:RunRequestLogs--contentStyle;"),tI={name:"1uxd5xx-RunRequestLogs--wrapContentStyle",styles:"white-space:break-spaces;overflow-wrap:break-word;label:RunRequestLogs--wrapContentStyle;"},tT={name:"1p3mumm-RunRequestLogs--runRequestLogStyle",styles:"display:flex;padding:20px;flex-direction:column;label:RunRequestLogs--runRequestLogStyle;"},tP={name:"hi2w5u-RunRequestLogs--logListColumn",styles:"white-space:nowrap;overflow:hidden;text-overflow:ellipsis;label:RunRequestLogs--logListColumn;"},tO={name:"1kduqaz-RunRequestLogs--visibleLogDisplayColumn",styles:"padding:0 20px;label:RunRequestLogs--visibleLogDisplayColumn;"},tC={name:"1yl0xtn-RunRequestLogs--scrollableAreaStyle",styles:"max-height:700px;overflow:scroll;label:RunRequestLogs--scrollableAreaStyle;"},tL={name:"zx9uu6-RunRequestLogs--truncatedTextStyle",styles:"white-space:nowrap;overflow:hidden;text-overflow:ellipsis;label:RunRequestLogs--truncatedTextStyle;"},RunRequestLogs=function(e){var t,r,n,i,a,o,l,s,u,d=(0,c.useState)(""),h=d[0],g=d[1],m=(0,c.useState)(0),f=m[0],v=m[1],b=(t=e.invocationId,r=e.runId,i=(n=(0,ta.g)()).accountId,a=n.userId,l=(o=(0,z.a)(tc,{skip:!i||!a||!r,variables:{accountId:i,invocationId:t,runId:r}})).data,s=o.error,u=o.loading,{data:null==l?void 0:l.zapRunRequestLog,error:s,isLogsLoading:u}),y=b.data,S=b.error,x=b.isLogsLoading;if(S)return(0,T.tZ)("div",{css:tR,children:(0,T.tZ)("span",{css:tk,children:(0,T.tZ)(p.x,{type:"smallPrint1",children:"Logs not found. Please try again or contact Support."})})});if(x)return(0,T.BX)("div",{css:tR,children:[(0,T.tZ)("div",{children:(0,T.tZ)(tl.$,{size:"large"})}),(0,T.tZ)("div",{children:(0,T.tZ)(p.x,{type:"paragraph3",children:"Fetching logs..."})})]});var _=y?y[f]:null;return(0,T.tZ)("div",{css:tT,children:(0,T.BX)(ts.r,{columns:"30% 70%",children:[(0,T.tZ)("div",{css:tP,children:y&&y.map(function(e,t){var r,n,i;return(0,T.tZ)("div",{css:(r=f===t,(0,R.iv)("background-color:",r?k.w.blue100:k.w.neutral100,";border:1px solid ",k.w.neutral400,";border-radius:5px;cursor:pointer;padding:10px;margin-bottom:10px;;label:RunRequestLogs--summaryStyle;")),onClick:function(){return v(t)},onKeyDown:function(){},role:"button",tabIndex:t,children:(0,T.BX)(T.HY,{children:[(0,T.tZ)("div",{css:tL,children:(0,T.BX)(p.x,{type:"smallPrint1",children:[(0,T.BX)("span",{css:(i=(n=null==e?void 0:e.responseStatusCode)?n>=500?k.w.error500:n>=400?k.w.warning500:n>=300?k.w.blue600:k.w.success500:k.w.black,(0,R.iv)("color:",i,";font-weight:bold;;label:RunRequestLogs--statusCodeStyle;")),children:[null==e?void 0:e.responseStatusCode,":",(null==e?void 0:e.responseStatusCode)&&(0,to.BV)(null==e?void 0:e.responseStatusCode)]})," - ",null==e?void 0:e.requestMethod]})}),(0,T.tZ)("div",{css:tL,children:(0,T.tZ)(p.x,{type:"smallPrint1",children:null==e?void 0:e.requestUrl})})]})},t)})}),(0,T.BX)("div",{css:tO,children:[(0,T.tZ)("div",{children:(0,T.tZ)(tu.o,{ariaLabel:"Search sample",name:"search",onChange:function(e){return g(e.currentTarget.value)},placeholder:"Search",renderIconBefore:function(e){var t=e.iconSize;return(0,T.tZ)(eA.J,{name:"magnifyingGlass",size:t})},value:h})}),(0,T.tZ)(td.L,{height:20}),(0,T.BX)("div",{css:tC,children:[(0,T.tZ)(p.x,{type:"paragraph1ShortBold",children:"Request Information"}),(0,T.BX)("div",{css:[tI,tZ,";label:RunRequestLogs--RunRequestLogs;"],children:[(0,T.tZ)(RequestLogField,{label:"Method",query:h,value:null==_?void 0:_.requestMethod}),(0,T.tZ)(RequestLogField,{label:"URL/Path",query:h,value:null==_?void 0:_.requestUrl}),(0,T.tZ)(RequestLogHeaders,{label:"Headers",query:h,value:null==_?void 0:_.requestHeaders}),(0,T.tZ)(RequestLogField,{label:"Params",query:h,value:null==_?void 0:_.requestParams}),(0,T.tZ)(RequestLogField,{label:"Duration (milliseconds)",query:h,value:null==_?void 0:_.requestDurationMs}),(0,T.tZ)(RequestLogField,{isFullWidth:!0,label:"Data",query:h,value:formatJSON(null==_?void 0:_.requestData)}),(0,T.tZ)(td.L,{height:10}),(0,T.tZ)("div",{css:tZ}),(0,T.tZ)(td.L,{height:20}),(0,T.tZ)(p.x,{type:"paragraph1ShortBold",children:"Response Information"}),(0,T.tZ)(RequestLogField,{label:"Status code",query:h,value:null==_?void 0:_.responseStatusCode}),(0,T.tZ)(RequestLogHeaders,{label:"Headers",query:h,value:null==_?void 0:_.responseHeaders}),(0,T.tZ)(RequestLogField,{label:"URL/Path",query:h,value:null==_?void 0:_.requestUrl}),(0,T.tZ)(RequestLogField,{isFullWidth:!0,label:"Content",query:h,value:formatJSON(null==_?void 0:_.responseContent)}),(0,T.tZ)(td.L,{height:10})]})]})]})]})})};function formatJSON(e){try{var t=JSON.parse(e);return JSON.stringify(t,null,2)}catch(t){return e}}var tE={name:"14w1zq-RunStepSampleDetail--alignedValueCss",styles:"display:table-cell;vertical-align:baseline;label:RunStepSampleDetail--alignedValueCss;"},tD={name:"10sm7k-RunStepSampleDetail--fieldCss",styles:"margin-bottom:1em;label:RunStepSampleDetail--fieldCss;"},tj=(0,R.iv)("color:",k.w.error,";;label:RunStepSampleDetail--highlightedFieldsCss;"),tA={name:"6v45j2-RunStepSampleDetail--labelCss",styles:"font-weight:600;line-height:1.5em;label:RunStepSampleDetail--labelCss;"},tz={name:"1utz29l-RunStepSampleDetail--nestedKeyCss",styles:'display:table-cell;font-family:"Open Sans",Helvetica,arial,sans-serif;font-weight:600;vertical-align:baseline;label:RunStepSampleDetail--nestedKeyCss;'},tB={name:"lzkh3k-RunStepSampleDetail--preCss",styles:"display:table-cell;font-family:Courier,monospace;line-height:20px;margin:0 0 15px;overflow:auto;padding-left:0.5em;text-transform:none;vertical-align:baseline;white-space:pre;label:RunStepSampleDetail--preCss;"},tq={name:"t4v02l-RunStepSampleDetail--searchStyle",styles:"padding:22px 22px 0 22px;label:RunStepSampleDetail--searchStyle;"},tN={name:"1xmr0n6-RunStepSampleDetail--tableStyle",styles:"-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;font-size:14px;max-height:400px;overflow:auto;padding:20px;width:calc(100% - 45px);label:RunStepSampleDetail--tableStyle;"},tH={name:"169b1wm-RunStepSampleDetail--valueNestedStyle",styles:"margin:1em;label:RunStepSampleDetail--valueNestedStyle;"};function prettifyFieldWithNoValue(e){var t=!!e[1]===e[1]?String(e[1]):e[1];return(0,T.tZ)("div",{css:tz,children:t},e[0])}function prettifyPair(e){var t,r,n,i=!!e[1]===e[1]?String(e[1]):e[1],a=isObjectLike(e[1])||isIterable(null===(r=e[1])||void 0===r?void 0:null===(n=r.props)||void 0===n?void 0:n.children);return(0,T.BX)("div",{children:[(t="".concat(e[0],":"))?(0,T.tZ)("span",{css:tz,children:t}):"",a?(0,T.tZ)("div",{children:i}):(0,T.tZ)("pre",{css:tB,children:i})]})}function buildNestedElement(e,t){return(0,T.tZ)("div",{css:tH,children:e(t)},t[0])}function renderValue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Array.isArray(e);return Object.keys(e||{}).map(function(r){var n,i,a,o=t?parseInt(r):r,l=e[o],s=[];return isIterable(l)?"number"!=typeof o&&s.push((n="".concat(o,":"),(0,T.tZ)("div",{css:tA,children:String(n)},n))):s.push(t?buildNestedElement(prettifyPair,["number"==typeof o?o+1:o,l]):(i=[o,l],(0,T.tZ)("div",{css:tE,children:prettifyPair(i)},i[0]))),Array.isArray(l)?s=s.concat((a=[],l.forEach(function(e,t){var r=t+1;isIterable(e)?a.push(buildNestedElement(prettifyPair,[r,renderValue(e)])):a.push(buildNestedElement(prettifyPair,[r,e]))}),a)):isIterable(l)&&(s=s.concat(function renderNestedObject(e){return Object.entries(e).map(function(e){var t=(0,er.Z)(e,2),r=t[0],n=t[1];return buildNestedElement(prettifyPair,[r,isObjectLike(n)&&!Array.isArray(n)?renderNestedObject(n):Array.isArray(n)?renderValue(n):String(n)])})}(l))),(0,T.tZ)("div",{css:tD,children:s},o)})}function RunStepSampleDetail(e){var t=e.highlightKey,r=e.isSearchable,n=e.value,i=(0,c.useState)(""),a=i[0],o=i[1],l=function(e,t,r){var n,i,a,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l={},s=e,u=[];return o&&0!==(u=Object.keys(e||{}).map(function(t){var r=e[t];if(isObject(r)){if(0===Object.keys(r).length)return t}else{if(isTypeOf(r,"number")||!!r===r)return null;if(!r)return t}}).filter(Boolean)).length&&(s=(0,tg.C)(s,u)),r&&null!==r&&(n=s,i={},[r].forEach(function(e){n[e]&&(i[e]=n[e])}),l=i,s=(0,tg.C)(s,[r])),(a={emptyKeys:u,highlightedValue:l,newValue:s},t)?function deepSearch(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(Array.isArray(t)){var a=t.map(function(t){return deepSearch(e,t,i+1)}).filter(function(e){return void 0!==e});if(0===a.length&&i)return;return a}if(isObject(t)){var o=Object.entries(t).flatMap(function(t){var r=(0,er.Z)(t,2),n=r[0],a=r[1],o=deepSearch(e,n,i+1),l=deepSearch(e,a,i+1);return void 0===o&&void 0===l?[]:[[o||n,l||a]]});if(0===o.length&&i)return;return Object.fromEntries(o)}if(r=e,n=String(t),r=r.toLowerCase().replace(/ /g,""),n=n.toLowerCase(),th()(r,n))return t}(t,a):a}(n,a,t,!0),s=l.highlightedValue,u=l.newValue,d=l.emptyKeys,p=!s&&!u&&!d;return(0,T.BX)("div",{children:[(void 0===r||r)&&(0,T.tZ)("div",{css:tq,children:(0,T.tZ)(tu.o,{ariaLabel:"Search sample",name:"search",onChange:function(e){return o(e.currentTarget.value)},placeholder:"Search",renderIconBefore:function(e){var t=e.iconSize;return(0,T.tZ)(eA.J,{name:"magnifyingGlass",size:t})},value:a})}),(0,T.BX)("div",{css:tN,tabIndex:0,children:[p&&(0,T.tZ)("div",{children:"We couldn't find anything that matched your search"}),Object.keys(s||{}).length>0&&(0,T.tZ)("div",{css:tj,children:renderValue(s)}),renderValue(u),(null==d?void 0:d.length)>0&&(0,T.BX)("div",{css:tD,children:[(0,T.tZ)("div",{css:tA,children:"Fields with no value:"}),Object.entries(d).map(function(e){return buildNestedElement(prettifyFieldWithNoValue,e)})]})]})]})}var tX=r(20271),tM=r(79102),TermAgreement_SparkleIcon=function(e){var t=e.color;return(0,T.tZ)("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,T.tZ)("path",{d:"M10.1 15.075L11.352 12.352L14.075 11.1L11.352 9.84802L10.1 7.125L8.84802 9.84802L6.125 11.1L8.84802 12.352L10.1 15.075ZM10.1 18.7L7.725 13.475L2.5 11.1L7.725 8.725L10.1 3.5L12.475 8.725L17.7 11.1L12.475 13.475L10.1 18.7ZM18.7 21.5L17.525 18.875L14.9 17.7L17.525 16.5L18.7 13.9L19.9 16.5L22.5 17.7L19.9 18.875L18.7 21.5Z",fill:t})})},tV={name:"lteypg-AiTermAgreement--rootStyle",styles:"padding:16px;border-radius:10px;bottom:60px;display:flex;flex-direction:column;gap:10px;label:AiTermAgreement--rootStyle;"},tF={name:"1yrbw76-AiTermAgreement--headerStyle",styles:"display:flex;align-items:center;flex-direction:row;justify-content:space-between;label:AiTermAgreement--headerStyle;"},tG=(0,R.iv)("width:100%;border-color:transparent;margin:0;border-bottom:1px solid ",k.w.neutral300,";;label:AiTermAgreement--separatorStyle;"),tU={name:"s7mzk-AiTermAgreement--poweredByAiStyle",styles:"display:flex;flex-direction:row;gap:10px;align-items:center;label:AiTermAgreement--poweredByAiStyle;"},tK={name:"dtb7ff-AiTermAgreement--footerStyle",styles:"display:flex;align-items:center;flex-direction:row;justify-content:space-between;label:AiTermAgreement--footerStyle;"},TermAgreement_AiTermAgreement=function(e){return(0,T.tZ)(eL.T,{borderColor:"neutral800",children:(0,T.BX)("div",{css:tV,children:[(0,T.BX)("div",{css:tF,children:[(0,T.tZ)(p.x,{type:"paragraph1ShortBold",children:"AI Terms of Service"}),(0,T.tZ)(X.S,{children:"Beta"})]}),(0,T.tZ)(p.x,{type:"paragraph3",children:"Leverage AI within Zapier to further accelerate your work."}),(0,T.BX)(p.x,{type:"paragraph3",children:["Your use of all Zapier AI Beta features is subject to"," ",(0,T.tZ)(h.r,{href:"https://zapier.com/legal/ai-supplementary-terms",children:"additional AI terms"}),"."]}),(0,T.tZ)("hr",{css:tG}),(0,T.BX)("div",{css:tK,children:[(0,T.BX)("div",{css:tU,children:[(0,T.tZ)(TermAgreement_SparkleIcon,{color:k.w.neutral700}),(0,T.tZ)(p.x,{type:"smallPrint1Medium",children:"Powered by AI"})]}),(0,T.tZ)(I.z,{onClick:function(){e.onAcceptAiAgreement(),e.fetchAITroubleshooting(),e.setHideAiTermOfService(!0)},children:"Agree and continue"})]})]})})},t$=r(20406),tY=r(28526),tJ=r.n(tY);function getLanguage(e){return e.className.replace(/language-/,"")}function _doHighlight(){return(_doHighlight=(0,t$.Z)(tJ().mark(function _callee2(){var e,t,n,i,a;return tJ().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Promise.all([r.e(464),r.e(1607)]).then(r.bind(r,464));case 2:return t=(e=o.sent).getHighlighter,(0,e.setCDN)("https://unpkg.com/shiki/"),n=Array.from(document.querySelectorAll("pre code")),i=(0,ew.Z)(new Set(n.map(getLanguage).filter(Boolean))),o.next=10,t({langs:i,theme:"github-light"});case 10:a=o.sent,n.forEach(function(){var e=(0,t$.Z)(tJ().mark(function _callee(e){var t,r,n;return tJ().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:r=getLanguage(e),n=a.codeToHtml(null!==(t=e.textContent)&&void 0!==t?t:"",{lang:r}),e.innerHTML=n,e.childNodes.forEach(function(e){e.style.backgroundColor="transparent"});case 4:case"end":return i.stop()}},_callee)}));return function(t){return e.apply(this,arguments)}}());case 12:case"end":return o.stop()}},_callee2)}))).apply(this,arguments)}var RunStepTroubleshootDetail_SparkleIcon=function(e){var t=e.color;return(0,T.tZ)("svg",{width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,T.tZ)("path",{d:"M10.1 15.075L11.352 12.352L14.075 11.1L11.352 9.84802L10.1 7.125L8.84802 9.84802L6.125 11.1L8.84802 12.352L10.1 15.075ZM10.1 18.7L7.725 13.475L2.5 11.1L7.725 8.725L10.1 3.5L12.475 8.725L17.7 11.1L12.475 13.475L10.1 18.7ZM18.7 21.5L17.525 18.875L14.9 17.7L17.525 16.5L18.7 13.9L19.9 16.5L22.5 17.7L19.9 18.875L18.7 21.5Z",fill:t})})},tW={name:"5end8l-RunStepTroubleshootDetail--tableStyle",styles:"-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;font-size:14px;overflow:auto;padding:20px;width:calc(100% - 45px);label:RunStepTroubleshootDetail--tableStyle;"},tQ={name:"19xifdy-RunStepTroubleshootDetail--feedbackStyle",styles:"display:flex;padding:20px 0px;flex-direction:column;align-items:inherit;gap:5px;label:RunStepTroubleshootDetail--feedbackStyle;"},t0={name:"1u4wq85-RunStepTroubleshootDetail--feedbackActionStyle",styles:"display:flex;flex-direction:row;align-items:inherit;gap:5px;padding-top:20px;label:RunStepTroubleshootDetail--feedbackActionStyle;"},t1={name:"1r1pf1n-RunStepTroubleshootDetail--resultStyle",styles:"padding:20px 0px;align-items:inherit;gap:5px;label:RunStepTroubleshootDetail--resultStyle;"},t2={name:"1s8d3kh-RunStepTroubleshootDetail--errorAndLoadingStyle",styles:"align-items:center;display:flex;flex-direction:column;gap:20px;margin:20px;label:RunStepTroubleshootDetail--errorAndLoadingStyle;"},t5=(0,R.iv)("grid-column:1/-1;code,pre{border-radius:5px;white-space:pre-wrap;}p>a{color:",k.w.blueJeans,";}p>code{background-color:",k.w.neutral200,";color:",k.w.gray80,";padding:0.1em 0.2em;}pre{padding:0.5em;}li{display:list-item;}ol,ul{padding:1.25em;}ol{list-style-type:decimal;}ul{list-style-type:disc;};label:RunStepTroubleshootDetail--aiTroubleshootingCss;"),t3={name:"6nc2s0-RunStepTroubleshootDetail--linkCss",styles:"padding-top:20px;label:RunStepTroubleshootDetail--linkCss;"},t7={name:"1yy2mtt-RunStepTroubleshootDetail--aiTermStyle",styles:"width:396px;margin-top:20px;label:RunStepTroubleshootDetail--aiTermStyle;"},t4={name:"1b9y6wm-RunStepTroubleshootDetail--poweredByAiStyle",styles:"display:flex;flex-direction:row;gap:10px;align-items:center;label:RunStepTroubleshootDetail--poweredByAiStyle;"};function RunStepTroubleshootDetail(e){var t,r=e.acceptAiResults,n=e.aiExperimentName,i=e.aiIsAccepted,a=e.aiTroubleshootingError,o=e.app,l=e.errorMessageUsedInPrompt,s=e.fetchAITroubleshooting,u=e.helpDocUrl,d=e.helpDocTitle,g=e.isLoading,m=e.isLoadingAiAgreement,f=e.onAcceptAiAgreement,v=e.result,b=e.step,y=e.predictionId,w=e.prompt,Z=e.url,R=e.zapId,P=(0,ta.g)().userId,O=(0,_.i)().emitEvent,C=(0,x.V)().flags,L=(0,c.useState)(),E=L[0],D=L[1],j=(0,c.useState)(!0),A=j[0],z=j[1];(0,c.useEffect)(function(){v&&!g&&(O({eventName:S.pM,meta:{customuser_id:P,character_quantity:v.length+w.length||0,experiment_flag:!!(null==C?void 0:C.monitor_ai_error_message),experiment_name:n,model_provider_name:S.dN,model_name:S.XX,prediction_id:y,prediction_json_input:JSON.stringify({app:o,error_message:l,prompt:w}),prediction_json_output:JSON.stringify({doc_url:u,llm_response:v}),prediction_source:S.Y6,url_address:Z,zap_id:R}}),O({eventName:S.rw,meta:{event_action:"in_view",experiment_flag:!!(null==C?void 0:C.monitor_ai_error_message),experiment_name:n,interaction_goal:"troubleshoot_zap_run",interaction_name:"ai_error_message_guidance",interaction_raw_text:v,option_selected:n}}))},[v,g]),(0,tM.R)("ai-error-message-time-to-results-visible",g,{experimentName:n}),t=!g,(0,c.useEffect)(function(){t&&function(){_doHighlight.apply(this,arguments)}()},[t]);var handleFeedback=function(e){e?(O({eventName:S.rw,meta:{event_action:"click",experiment_flag:!!(null==C?void 0:C.monitor_ai_error_message),experiment_name:n,interaction_goal:"troubleshoot_zap_run",interaction_name:"ai_error_message_guidance",interaction_raw_text:"Was this helpful?",option_selected:"Yes"}}),O({eventName:S.nF,meta:{event_action:"click",experiment_flag:!!(null==C?void 0:C.monitor_ai_error_message),experiment_name:n,prediction_id:y,interaction_name:"ai_error_message_guidance",interaction_raw_text:"Was this helpful?",user_rating:S.wE.ExplicitGood}})):(O({eventName:S.rw,meta:{event_action:"click",experiment_flag:!!(null==C?void 0:C.monitor_ai_error_message),experiment_name:n,interaction_goal:"troubleshoot_zap_run",interaction_name:"ai_error_message_guidance",interaction_raw_text:"Was this helpful?",option_selected:"No"}}),O({eventName:S.nF,meta:{event_action:"click",experiment_flag:!!(null==C?void 0:C.monitor_ai_error_message),experiment_name:n,prediction_id:y,interaction_name:"ai_error_message_guidance",interaction_raw_text:"Was this helpful?",user_rating:S.wE.ExplicitBad}})),z(!1)};return(0,T.tZ)("div",{children:(0,T.tZ)("div",{css:tW,children:(i||E)&&!m?(0,T.BX)(T.HY,{children:[(0,T.tZ)(tX.b,{hasShadow:!1,children:"Zapier’s AI-powered troubleshooting searches for and summarizes content from our Help Center. It may add AI-generated context to results. This feature is in beta and may return incorrect results."}),(0,T.tZ)("div",{css:t1,children:g?(0,T.BX)("div",{css:t2,children:[(0,T.tZ)(tl.$,{size:"large"}),(0,T.tZ)(p.x,{type:"paragraph3",children:"AI is thinking..."}),(0,T.BX)(p.x,{type:"smallPrint1",children:[(0,T.tZ)(h.r,{href:"https://help.zapier.com/",children:"Get help"})," or"," ",(0,T.tZ)(h.r,{href:"https://zapier.com/app/get-help",children:"Contact Support"}),"."]})]}):(0,T.tZ)(T.HY,{children:a&&!g?(0,T.BX)("div",{css:t2,children:[(0,T.tZ)(eA.J,{name:"alertTriangleFill",size:30}),(0,T.tZ)(p.x,{type:"paragraph3",children:"We ran into an error."}),(0,T.tZ)(I.z,{color:"secondary",onClick:function(){return s()},children:"Try again"})]}):(0,T.BX)(T.HY,{children:[(0,T.BX)("div",{css:t5,children:[(0,T.tZ)(p.x,{type:"paragraph3",children:v&&(0,T.tZ)("div",{dangerouslySetInnerHTML:{__html:v}})}),u&&d&&(0,T.tZ)(c.Fragment,{children:(0,T.BX)(p.x,{margin:"10px 0",tag:"div",type:"paragraph3",children:["For more info check out ",(0,T.tZ)(h.r,{href:u,target:"_blank",children:d})]})}),(0,T.tZ)("div",{css:t3,children:(0,T.tZ)(h.r,{color:"primary",onClick:function(){O({eventName:S.rw,meta:{event_action:"click",experiment_flag:!!(null==C?void 0:C.monitor_ai_error_message),experiment_name:"monitor_ai_error_message",destination_url_address:"/editor/".concat(R,"/published/").concat(b.id),interaction_goal:"troubleshoot_zap_run",interaction_name:"ai_error_message_guidance",interaction_raw_text:"Edit this step",option_selected:"edit_this_step"}}),O({eventName:S.nF,meta:{event_action:"click",experiment_flag:!!(null==C?void 0:C.monitor_ai_error_message),prediction_id:y,experiment_name:"monitor_ai_error_message",interaction_name:"ai_error_message_guidance",interaction_raw_text:"Edit this step",user_rating:S.wE.ImplicitGood}})},weight:"bold",href:"/editor/".concat(R,"/published/").concat(b.id),children:"Edit this step"})})]}),(0,T.BX)("div",{css:tQ,children:[(0,T.tZ)(p.x,{type:"paragraph3",children:"Was this helpful?"}),(0,T.tZ)("div",{css:t0,children:A?(0,T.BX)(T.HY,{children:[(0,T.tZ)(I.z,{color:"secondary",onClick:function(){return handleFeedback(!0)},children:"Yes"}),(0,T.tZ)(I.z,{color:"secondary",onClick:function(){return handleFeedback(!1)},children:"No"})]}):(0,T.tZ)(tX.b,{layout:"box",hasShadow:!1,title:"Thank you for your feedback!",type:"success",children:"Your response will help us understand how effective our AI-powered troubleshooting is for our users and improve the accuracy of our responses."})})]})]})})}),(0,T.BX)("div",{css:t4,children:[(0,T.tZ)(RunStepTroubleshootDetail_SparkleIcon,{color:k.w.neutral700}),(0,T.tZ)(p.x,{type:"smallPrint1Medium",children:"Powered by AI"})]})]}):(0,T.BX)(T.HY,{children:[(0,T.tZ)(p.x,{children:"To generate troubleshooting results, please agree to our AI terms below."}),(0,T.tZ)("div",{css:t7,children:(0,T.tZ)(TermAgreement_AiTermAgreement,{acceptAiResults:r,fetchAITroubleshooting:s,onAcceptAiAgreement:f,setHideAiTermOfService:D})})]})})})}var t8=["CodeAPI","ZapierMailAPI","DelayAPI","ChatGPTCLIAPI"],t6=(0,R.iv)("border-top:1px solid ",k.w.gray40,";;label:RunStepSamples--rootStyle;"),t9={name:"1k7dun1-RunStepSamples--navStyle",styles:"padding:0 22px;label:RunStepSamples--navStyle;"},re={name:"1bgsw5a-RunStepSamples--tooltipCss",styles:"white-space:break-spaces;label:RunStepSamples--tooltipCss;"};function isStepOlderThanThreshold(e,t){var r=new Date(null==e?void 0:e.startTime),n=new Date;return n.setMinutes(n.getMinutes()-t),r<n}var RunStepSamples_RunStepSamples=function(e){var t=e.errorKey,r=e.input,n=e.number,i=e.output,a=e.runId,o=e.showTroubleshoot,l=e.step,s=e.tabState,u=e.url,d=e.zapId,p=(W=(0,z.a)(tn),Q=(0,tr.D)(ti),et=(ee=(0,er.Z)(Q,2))[0],en=ee[1],{isAccepted:!!(null===($=W.data)||void 0===$?void 0:null===(Y=$.currentUser)||void 0===Y?void 0:null===(J=Y.aiAgreement)||void 0===J?void 0:J.date),isLoading:W.loading,onAccept:function(){et()},updateResults:en}),h=p.isAccepted,g=p.isLoading,m=p.onAccept,f=p.updateResults,v=(0,_.i)().emitEvent,b=(0,x.V)().flags,w=(0,y.oA)().setDetails,R=(0,Z.JI)(u).baseHref,k=n-1,I=Object.keys(r||{}).length>0,P=Object.keys(i||{}).length>0,O=(0,c.useState)(s||P&&!I?"output":"input"),C=O[0],L=O[1],E=(0,ta.g)(),D="monitor_ai_error_message_gpt_3",j=(null==E?void 0:null===(eL=E.plan)||void 0===eL?void 0:eL.allowProfessional)&&(null==b?void 0:b.zap_run_request_logs)&&(null==l?void 0:l.invocationId),A=(eI=(0,eV.t)(eU,{variables:{runId:a,stepIndex:n-1}}),eP=(eT=(0,er.Z)(eI,2))[0],{app:null!==(ea=null===(eo=(eO=eT[1]).data)||void 0===eo?void 0:null===(el=eo.helpAITroubleshooting)||void 0===el?void 0:el.app)&&void 0!==ea?ea:"",isLoading:eO.loading,fetch:eP,data:null!==(es=null===(ed=eO.data)||void 0===ed?void 0:null===(ec=ed.helpAITroubleshooting)||void 0===ec?void 0:ec.aiResponse)&&void 0!==es?es:"",error:eO.error,errorMessageUsedInPrompt:null!==(ep=null===(eh=eO.data)||void 0===eh?void 0:null===(eg=eh.helpAITroubleshooting)||void 0===eg?void 0:eg.errorMessageUsedInPrompt)&&void 0!==ep?ep:"",helpDocUrl:null!==(em=null===(ef=eO.data)||void 0===ef?void 0:null===(ev=ef.helpAITroubleshooting)||void 0===ev?void 0:ev.aiRetrievedHelpDocUrl)&&void 0!==em?em:"",helpDocTitle:null!==(eb=null===(ey=eO.data)||void 0===ey?void 0:null===(eS=ey.helpAITroubleshooting)||void 0===eS?void 0:eS.aiRetrievedHelpDocTitle)&&void 0!==eb?eb:"",predictionId:null!==(ex=null===(e_=eO.data)||void 0===e_?void 0:null===(ew=e_.helpAITroubleshooting)||void 0===ew?void 0:ew.aiPredictionId)&&void 0!==ex?ex:"",prompt:null!==(eZ=null===(eR=eO.data)||void 0===eR?void 0:null===(ek=eR.helpAITroubleshooting)||void 0===ek?void 0:ek.aiPrompt)&&void 0!==eZ?eZ:""}),B=A.app,q=A.data,N=A.error,H=A.errorMessageUsedInPrompt,X=A.helpDocUrl,M=A.helpDocTitle,V=A.isLoading,F=A.predictionId,G=A.prompt,U=A.fetch;if((0,c.useEffect)(function(){s&&L(s),"troubleshoot"!==s||"error"!==l.status||0!==q.length||V||N||!h||g?null!=s&&s.includes("troubleshoot")&&q.length>0&&!V&&w({aiExperimentName:D,guidanceOpened:!0,predictionId:F}):(U(),v({eventName:S.rw,meta:{event_action:"enter",experiment_flag:!!(null==b?void 0:b.monitor_ai_error_message),experiment_name:D,interaction_goal:"troubleshoot_zap_run",interaction_name:"ai_error_message_guidance",interaction_raw_text:D,option_selected:D}}))},[h,N,q.length,v,U,null==b?void 0:b.monitor_ai_error_message,V,g,w,l.status,s,F]),!I&&!P&&!o)return null;var K=[];if(I&&K.push({href:(0,Z.NC)(R,(0,eu.Z)({},k,"input")),text:"Data in"}),P&&K.push({href:(0,Z.NC)(R,(0,eu.Z)({},k,"output")),text:"Data out"}),o&&K.push({href:(0,Z.NC)(R,(0,eu.Z)({},k,"troubleshoot")),text:(0,T.BX)("div",{children:["Troubleshoot ",(0,T.tZ)(te.C,{children:"Beta"})]})}),j){var $,Y,J,W,Q,ee,et,en,ea,eo,el,es,ed,ec,ep,eh,eg,em,ef,ev,eb,ey,eS,ex,e_,ew,eZ,eR,ek,eI,eT,eP,eO,eC,eL,eE,eD=(eC=l.app,t8.some(function(e){return e.includes(eC)})),ej=isStepOlderThanThreshold(l,10080),eA=isStepOlderThanThreshold(l,3),ez=!1;eD?(ez=!0,eE="Logs are not supported for this app. Contact support for help."):ej?(ez=!0,eE="Logs are available for seven days after a step runs. For failed steps, you can replay the Zap run to generate new logs."):eA||(ez=!0,eE="Logs may take up to three minutes to load."),K.push({disabled:ez,href:(0,Z.NC)(R,(0,eu.Z)({},k,"logs")),text:(0,T.tZ)("div",{children:(0,T.tZ)(ei.p,{allowMultilineTooltip:!0,content:eE&&(0,T.tZ)("div",{css:re,children:eE}),children:function(){return(0,T.BX)("span",{children:["Logs ",(0,T.tZ)(te.C,{children:"Beta"})]})}})})})}return(0,T.BX)("div",{css:t6,children:[(0,T.tZ)("div",{css:t9,children:(0,T.tZ)(tt.m,{ariaLabel:"Data in / Data out sample selector for run step ".concat(n),items:K,selectedItemHref:(0,Z.NC)(R,(0,eu.Z)({},k,C))})}),"logs"===C?(0,T.tZ)(RunRequestLogs,{invocationId:null==l?void 0:l.invocationId,runId:a}):"troubleshoot"===C&&"error"===l.status?(0,T.tZ)(RunStepTroubleshootDetail,{acceptAiResults:f,aiExperimentName:D,aiIsAccepted:h,aiTroubleshootingError:N,app:B,errorMessageUsedInPrompt:H,fetchAITroubleshooting:U,helpDocUrl:X,helpDocTitle:M,isLoading:V,isLoadingAiAgreement:g,onAcceptAiAgreement:m,predictionId:F,prompt:G,result:q,step:l,url:u,zapId:d}):(0,T.tZ)(RunStepSampleDetail,{highlightKey:t,isSearchable:!0,value:"output"===C?i:r})]})},rt={name:"1huje6b-RunStep--linkWrapper",styles:"font-size:14px;label:RunStep--linkWrapper;"},rr=(0,R.iv)("background-color:",k.w.neutral100,";border:1px solid ",k.w.gray20,";border-radius:5px;overflow:hidden;position:relative;width:calc(\n 100%-2px\n );;label:RunStep--rootStyle;"),rn=(0,M.uq)({tablet:{name:"fnuoom-RunStep--tablet",styles:"grid-template-columns:auto auto;grid-gap:43px;justify-content:start;label:RunStep--tablet;"},mobile:{name:"1cwf7nd-RunStep--mobile",styles:"align-items:center;display:grid;grid-gap:10px;padding:16px 20px;label:RunStep--mobile;"}}),ri={name:"qiqkfr-RunStep--headerIconStyle",styles:"display:grid;grid-gap:15px;grid-template-columns:40px auto;justify-content:space-between;label:RunStep--headerIconStyle;"},ra={name:"nlumc0-RunStep--headerTextStyle",styles:"display:grid;grid-gap:3px;label:RunStep--headerTextStyle;"},ro={name:"11rpa5c-RunStep--scheduleStyle",styles:"padding:20px 0 0 20px;label:RunStep--scheduleStyle;"},rl=(0,R.iv)("text-decoration:none;color:",k.w.neutral700,";;label:RunStep--skippedLinkStyle;"),rs={name:"vslo1m-RunStep--skippedIconStyle",styles:"filter:grayscale(100%);label:RunStep--skippedIconStyle;"},ru={name:"450p42-RunStep--statusStyle",styles:"align-items:center;display:flex;grid-gap:10px;justify-items:flex-start;label:RunStep--statusStyle;"},rd={name:"195j19b-RunStep--wrapperStyle",styles:"max-width:100%;overflow:hidden;label:RunStep--wrapperStyle;"},RunStep_RunStep=function(e){var t,r,n,i=e.childSteps,a=e.isTransfer,o=e.runId,l=e.sampleTabState,s=e.step,u=e.url,d=e.zapId,g=(0,x.V)().flags,m=(0,c.useRef)(null),f=s.app,v=s.status,b=(0,S.Dk)(v,null,null);(0,c.useEffect)(function(){m.current&&l&&m.current.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})},[m.current]);var y=(null==s?void 0:s.error)||"",_="string"==typeof y?y:y.title,w=y&&((t=s.status)===eg.VO.error||t===eg.VO.scheduled||t===eg.VO.halted||t===eg.VO.throttled),Z=w?function(e){if(e&&0===e.indexOf('Required field "')&&e.indexOf(") is missing.")>=16){var t=e.lastIndexOf('" (')+3,r=e.indexOf(") is missing.");return e.slice(t,r)}}(_):void 0,k=(0,eZ.vX)(s),I=(0,eZ.ro)(s),P=(0,eD.bp)(s.node),O=!k&&!I&&"filter"===s.type||k&&!w,C=(null==g?void 0:g.monitor_ai_error_message)&&s.status===eg.VO.error,L=Object.keys((null==s?void 0:s.input)||{}).length>0,E=Object.keys((null==s?void 0:s.output)||{}).length>0,D=!O&&!k&&!I&&(L||E)&&v!==eg.VO.skipped,j=s.status===eg.VO.scheduled&&(null==s?void 0:s.rescheduledTime)||void 0;return(0,T.tZ)("div",{css:rd,"data-id":null==s?void 0:s.id,"data-testid":"RunStep",children:(0,T.tZ)(eL.T,{borderColor:"transparent",children:(0,T.BX)("div",{css:rr,ref:m,children:[!!j&&(0,T.tZ)("div",{css:ro,children:(0,T.BX)(X.S,{color:"info",children:["Replaying ",(0,T.tZ)(RelativeTime_RelativeTime,{date:j||""})]})}),(0,T.BX)("div",{children:[(0,T.BX)("div",{css:[rn,k&&(0,R.iv)("background-color:",(0,eD.fC)(P),";border-color:",(0,eD.BN)(P),";;label:RunStep--pathHeaderStyle;"),";label:RunStep--RunStep;"],children:[(0,T.BX)("div",{css:ri,children:[(0,T.tZ)("span",{css:[v===eg.VO.skipped&&rs,";label:RunStep--RunStep;"],children:(0,T.tZ)(eE.A,{borderWidth:0,serviceName:f||"",size:40})}),(0,T.BX)("span",{css:ru,children:[(0,T.tZ)(eh.Z,{size:35,status:v}),(null==b?void 0:b.label)&&(0,T.tZ)(p.x,{type:"smallPrint1Semibold",color:"neutral700",children:b.label})]})]}),(0,T.BX)("div",{css:ra,children:[(0,T.BX)(p.x,{type:"paragraph3Semibold",color:v===eg.VO.skipped?"neutral700":"inherit",children:[s.order,". ",s.title]}),(0,T.tZ)(p.x,{type:"smallPrint1",color:v===eg.VO.skipped?"neutral700":"inherit",children:s.description}),(0,T.BX)("span",{children:[(s.startTime||v===eg.VO.pending)&&(0,T.tZ)(p.x,{color:"neutral700",type:"smallPrint1",children:s.startTime?(0,T.tZ)(F.Z,{date:s.startTime,format:"exhaustive"}):"pending"}),!a&&(0,T.BX)("span",{css:rt,children:[(s.startTime||v===eg.VO.pending)&&(0,T.tZ)("span",{children:" - "}),v===eg.VO.skipped?(0,T.tZ)(h.r,{href:"/editor/".concat(d,"/published/").concat(s.id),css:rl,children:"Edit this step"}):(0,T.tZ)(h.r,{href:"/editor/".concat(d,"/published/").concat(s.id),children:"Edit this step"})]})]})]})]}),I&&(0,T.tZ)(RunStepPaths_RunStepPaths,{childSteps:i,url:u}),O&&s.status!==eg.VO.skipped&&(0,T.tZ)(RunStepFilters_RunStepFilters,{isPath:k,results:null==s?void 0:null===(r=s.output)||void 0===r?void 0:r._zap_data_filter_meta,rules:null==s?void 0:null===(n=s.input)||void 0===n?void 0:n.filter_criteria}),(null==g?void 0:g.monitor_ai_error_message)&&w&&(0,T.tZ)(RunStepError_RunStepError,{error:y,isSoft:v===eg.VO.halted||v===eg.VO.throttled,runId:o,step:s,zapId:d}),D&&(0,T.tZ)(RunStepSamples_RunStepSamples,{errorKey:Z,input:null==s?void 0:s.input,number:s.order,output:null==s?void 0:s.output,runId:o,showTroubleshoot:C,step:s,tabState:l,url:u,zapId:d}),!(null!=g&&g.monitor_ai_error_message)&&w&&(0,T.tZ)(RunStepError_RunStepError,{error:y,isSoft:v===eg.VO.halted||v===eg.VO.throttled,runId:o,step:s,zapId:d})]})]})})})},rc=(0,R.iv)("position:absolute;stroke:",k.w.gray20,";;label:SubPathConnectingLine--rootStyle;");function SubPathConnectingLine(e){var t=e.height,r=e.width;return(0,T.tZ)("svg",{css:rc,height:t,width:r,children:(0,T.tZ)("path",{d:"M ".concat(r/2,",0 L ").concat(r/2,",").concat(r," Q ").concat(r/2,",").concat(t," ").concat(r,",").concat(t),fill:"none"})})}var rp=(0,R.iv)("background-color:",k.w.gray20,";bottom:1px;left:26px;position:absolute;top:1px;width:1px;z-index:0;;label:RunSteps--connectingLineStyle;"),rh={name:"1afkeyq-RunSteps--itemCss",styles:"overflow:hidden;label:RunSteps--itemCss;"},rg={name:"z5x9uf-RunSteps--listCss",styles:"display:grid;grid-gap:20px;list-style-type:none;margin-block-end:0;margin-block-start:0;margin:0;padding-inline-start:0;padding:0;label:RunSteps--listCss;"},rm={name:"ee344u-RunSteps--rootStyle",styles:"overflow:hidden;position:relative;label:RunSteps--rootStyle;"},rf={name:"73pz35-RunSteps--stepsStyle",styles:"position:relative;z-index:1;label:RunSteps--stepsStyle;"},rv=(0,M.uq)({tablet:{name:"16gtpt6-RunSteps--tablet",styles:"padding:30px 50px;label:RunSteps--tablet;"},mobile:(0,R.iv)("border-top:1px solid ",k.w.gray20,";padding:30px 0px;;label:RunSteps--mobile;")}),rb=(0,M.uq)({tablet:{name:"q1qir0-RunSteps--tablet",styles:"margin:30px 50px;label:RunSteps--tablet;"},mobile:{name:"v6sx8s-RunSteps--mobile",styles:"margin:30px 0px;label:RunSteps--mobile;"}}),RunSteps_RunSteps=function(e){var t=e.isOnSubPath,r=e.isTransfer,n=e.stepId,i=e.run,a=e.url,o=(0,d.useRouter)().asPath;if(!(null!=i&&i.steps))return(0,T.tZ)(ee.q,{borderRadius:5,height:420});var l=(0,Z.b0)(o),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t.find(function(t){return t.id===e}),n=t.find(function(t){return t.parentId===e});if(r&&n){var i=function getNonPathChildren(e,t){if(!(0,eZ.ro)(e)){var r=t.find(function(t){return t.parentId===e.id});if(r){var n=getNonPathChildren(r,t);return[r].concat((0,ew.Z)(n))}}return[]}(n,t);return[r,n].concat((0,ew.Z)(i))}return r?[r]:[]}(n,i.steps);return(0,T.BX)("div",{css:rm,children:[t&&(0,T.tZ)(SubPathConnectingLine,{height:75,width:50}),(0,T.tZ)("div",{css:[rp,t&&rb,";label:RunSteps--RunSteps;"]}),(0,T.tZ)("div",{css:[rf,t&&rv,";label:RunSteps--RunSteps;"],children:(0,T.tZ)("ul",{css:rg,"data-testid":"RunSteps",children:s.map(function(e){return(0,T.tZ)("li",{css:rh,children:(0,T.tZ)(RunStep_RunStep,{childSteps:i.steps.filter(function(t){return t.parentId===e.id}),isTransfer:r,runId:i.id,sampleTabState:l[(e.order||1)-1],step:e,url:a,zapId:i.zap.id})},e.id)})})})]})},ry=r(64368),rS=r(53861),rx=(0,A.Ps)(u||(u=(0,j.Z)(["\n query RunDetail($runId: ID!) {\n zapRun(id: $runId) {\n billableCount\n canReplay\n hasPaths\n heldReason\n heldStaleAuth\n id\n isRunning\n startTime\n status\n zapVersionName\n zapVersionId\n steps {\n action\n app\n childrenHavePaths\n dataTruncated\n description\n error {\n title\n }\n frameId\n id\n input\n invocationId\n meta\n order\n output\n params\n parentId\n rescheduledTime\n startTime\n status\n title\n type\n }\n timezone\n zap {\n id\n title\n sourceUrl\n kind\n }\n }\n }\n"]))),useRun_useRun=function(e){var t,r=(0,d.useRouter)().isReady,n=(0,z.a)(rx,{fetchPolicy:"cache-and-network",notifyOnNetworkStatusChange:!0,returnPartialData:!0,skip:!e,variables:{runId:e}});return{error:(0,rS.e$)(n.error),isLoading:n.networkStatus===ry.I.loading||!r,onRefetch:n.refetch,run:null===(t=n.data)||void 0===t?void 0:t.zapRun}},r_=r(89381),rw=r(92642),utils_get=function(e,t,r){for(var n=null,i=0,a=null==t?[]:Array.isArray(t)?t:[t];i<a.length&&null!=e;){var o=a[i];Array.isArray(o)?"function"==typeof e?(e=e.apply(n,o),n=null):e=void 0:null!=e&&(n=e,e=e[o]),i++}return null==e&&null!=r?r:e},rZ=["nodeId","pathId","runId","stepId"],rR={name:"1gmxju7-RunDetailsPage--rootStyle",styles:"display:grid;grid-gap:20px;label:RunDetailsPage--rootStyle;"},RunDetailsPage_RunDetailsPage=function(){var e,t,r,n,i,a,o,l,s,u,R,k,I,P,O,C,L,E,D,j,A,z,B,q,N,H=(0,c.useState)(!1),X=H[0],M=H[1],V=(0,x.V)().flags,F=(0,d.useRouter)(),G=(0,v.l)().createNotification,U=(0,y.oA)().details,K=(0,_.i)().emitEvent,$=F.query.stepId,Y=F.query.runId,J=useRun_useRun(Y),W=(0,w.MN)(),Q=(null==J?void 0:null===(k=J.run)||void 0===k?void 0:null===(I=k.zap)||void 0===I?void 0:I.title)!==void 0;(0,g.u)("run-details-time-to-zap-title-rendered",Q);var ee=Array.isArray(null==J?void 0:null===(P=J.run)||void 0===P?void 0:P.steps);(0,g.u)("run-details-time-to-steps-rendered",ee),e=null!==(O=null==J?void 0:null===(C=J.run)||void 0===C?void 0:C.steps)&&void 0!==O?O:[],r=(t=(0,v.l)()).createNotification,n=t.clearNotification,i=(0,r_.W)().onDownload,a=c.useState(!1),l=(o=(0,er.Z)(a,2))[0],s=o[1],c.useEffect(function(){var t,a,o=e.some(function(e){return e.dataTruncated}),u=(t=(0,t$.Z)(tJ().mark(function _callee(){return tJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n(a),i([Y],!1,1),s(!0);case 3:case"end":return e.stop()}},_callee)})),function(){return t.apply(this,arguments)});return o&&!l&&(a=r({message:(0,T.BX)(T.HY,{children:["This run contains too much data to display. To see all the input and output data, you can"," ",(0,T.tZ)(h.r,{onClick:function(){return u()},children:"export this run"}),"."]}),timeout:1/0,type:"warning"})),function(){a&&n(a)}},[n,r,l,i,Y,e]),c.useEffect(function(){l&&r({message:"It may take a few minutes to prepare your download. Once complete, we will email you a link.",type:"success"})},[r,l]),(0,c.useEffect)(function(){if(!W.isRunning){var e,t=function(e){if(e.message)for(var transform=function(e){return e.replace("1 run was","Run was")},t=0,r=[["body","0","message"],["text"],["title"]];t<r.length;t++){var n=r[t],i=utils_get(e.message,n,void 0);if(i){if("string"==typeof i)return transform(i);if(Array.isArray(i)&&"string"==typeof i[0])return transform(i[0]);rw.Tb(Error("An invalid message would have thrown an error on the site."),{extra:(0,eu.Z)({},"massAction.message",e.message)})}}}(W);!t||("Your account doesn't allow replaying this run."===t?M(!0):t.includes("Replaying")||t.includes("attempted")||X||G({message:t,type:(null===(e=W.message)||void 0===e?void 0:e.messageType)||"info"}))}},[W.isRunning,W.isLoading,null==W?void 0:null===(L=W.message)||void 0===L?void 0:L.id]);var et=(null==J?void 0:null===(E=J.run)||void 0===E?void 0:null===(D=E.zap)||void 0===D?void 0:D.kind)==="transfer",en=((u=F.query).nodeId,u.pathId,u.runId,u.stepId,R=(0,eH.Z)(u,rZ),(0,Z.aE)("/app/history",R)),ei=$&&(null==J?void 0:null===(j=J.run)||void 0===j?void 0:null===(A=j.steps)||void 0===A?void 0:A.find(function(e){return e.id===$})),ea=null==J?void 0:null===(z=J.run)||void 0===z?void 0:null===(B=z.zap)||void 0===B?void 0:B.id,eo=ei?$:ea,el=!!(J.run&&eo!==ea);return J.error&&"Not Found"!==J.error?(0,T.BX)("div",{css:rR,children:[(0,T.tZ)("span",{children:(0,T.tZ)(m.Z,{href:en,children:"Zap runs"})}),(0,T.tZ)(f.I,{hasError:!0,isFilterEmpty:!0,isOutOfRetentionPeriod:!1,size:"small"})]}):J.isLoading||J.run&&eo?(0,T.BX)("div",{css:rR,children:[(0,T.tZ)("span",{children:(0,T.tZ)(m.Z,{href:en,children:"Zap runs"})}),(0,T.tZ)(RunHeader_RunHeader,{isReplaying:W.isRunning||W.isLoading,isOnSubPath:el,isTransfer:et,onReplay:function(){var e,t,r;W.onMassAction("replay",{filters:{},runIds:[Y],zapId:(null===(e=J.run)||void 0===e?void 0:e.zap.id)||null},function(){J.onRefetch()}),K({eventName:S.rw,meta:{custom_tracking_fields:{zap_id:null===(t=J.run)||void 0===t?void 0:t.zap.id,zap_run_id:Y},event_action:"click",interaction_goal:"troubleshoot_zap_run",interaction_raw_text:"Replay Zap run",interaction_name:"zap_run_details_interaction",node_zap_id:Number(null===(r=J.run)||void 0===r?void 0:r.zap.id),option_selected:"replay"}}),U.guidanceOpened&&K({eventName:S.nF,meta:{event_action:"click",experiment_flag:!!(null==V?void 0:V.monitor_ai_error_message),experiment_name:U.aiExperimentName,prediction_id:U.predictionId,interaction_name:"ai_error_message_guidance",interaction_raw_text:"Zap Run replayed",user_rating:S.wE.ImplicitGood}})},run:null!==(q=J.run)&&void 0!==q?q:void 0,stepId:eo,url:F.asPath}),(0,T.tZ)(RunSteps_RunSteps,{isOnSubPath:el,isTransfer:et,run:null!==(N=J.run)&&void 0!==N?N:void 0,stepId:eo,url:F.asPath}),(0,T.tZ)(GetHelpCtaContainer,{size:"large",zapId:ea}),X&&(0,T.tZ)(b.Z,{allowTaskReplay:!1,onClose:function(){return M(!1)}})]}):(0,T.BX)("div",{css:rR,children:[(0,T.tZ)("span",{children:(0,T.tZ)(m.Z,{href:en,children:"Zap runs"})}),(0,T.tZ)(p.x,{type:"sectionHeader1",children:"Run not found"}),(0,T.tZ)(p.x,{tag:"p",children:"Unfortunately, all we know is that the code was 404. Please try again."}),(0,T.BX)(p.x,{tag:"p",children:["Please ",(0,T.tZ)(h.r,{href:"mailto:[email protected]",children:"contact support"})," ","if this persists."]})]})},rk=r(85665),rI=r(7656);function RunDetails(){return(0,T.tZ)(rk.D,{title:"Zap Run Details",children:(0,T.tZ)(rI.X,{children:(0,T.tZ)(RunDetailsPage_RunDetailsPage,{})})})}},79102:function(e,t,r){"use strict";r.d(t,{R:function(){return useClock}});var n=r(2784),i=r(23356);function useClock(e,t,r){var a=(0,n.useRef)();(0,n.useEffect)(function(){if((0,i.M)()){var n="".concat(e,"_start");if(t){window.performance.mark(n),a.current=!0;return}var o=window.performance.getEntriesByName(n,"mark").length>0;if(a.current&&o){var l=window.performance.measure(e,{detail:r,start:n});a.current=!1,console.debug("⏱️ ".concat(e," measured ").concat(l.duration,"ms"))}}},[e,t])}},26404:function(e,t,r){"use strict";r.d(t,{u:function(){return useTimeSinceNavigation}});var n=r(2784),i=r(23356);function useTimeSinceNavigation(e,t,r){var a=(0,n.useRef)(!1);(0,n.useEffect)(function(){if((0,i.M)()&&t&&!a.current){a.current=!0;var n,o=(n="routeChangeStart",window.performance.getEntriesByName(n,"mark").length>0?n:"navigationStart"),l=window.performance.measure(e,{detail:r,start:o});console.debug("⏱️ ".concat(e," measured ").concat(l.duration,"ms since navigationStart"))}},[e,t])}},23356:function(e,t,r){"use strict";r.d(t,{M:function(){return isPerformanceApiAvailable}});var n,isPerformanceApiAvailable=function(){if(void 0!==n)return n;try{performance.measure("isPerformanceApiAvailableTest",{detail:{foo:"bar"},start:"navigationStart"}),n=!0}catch(e){n=!1}return n}},24548:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/history/[runId]",function(){return r(18867)}])}},function(e){e.O(0,[9716,6314,9224,2291,7254,6409,776,407,7768,7202,310,2436,9774,2888,179],function(){return e(e.s=24548)}),_N_E=e.O()}]);