PageSourceSearch

https://app.clickguard.com/static/js/872.c8c1f9d0.chunk.js

js clickguard.com collected 2026-09-24 11:12:16 UTC 27,438 bytes, 5 lines download raw bytes

1"use strict";
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="12915165-3b48-541b-9b78-14e491cd17ed")}catch(e){}}();
3(self.webpackChunkclickguard_platform=self.webpackChunkclickguard_platform||[]).push([[872],{77026:function(e,t,n){n.d(t,{o:function(){return d}});var s=n(74165),a=n(15861),r=n(48932),i=n(17256),o=n(8078),c=n(25850),l=n(90484),u=n(32007),d=function(){var e=(0,u.E)(),t=(0,r.c)((0,o.N)((function(e){return{setAccount:e.setAccount,setWantsToSeeDemoData:e.setWantsToSeeDemoData,getSubscriptionByAccountId:e.getSubscriptionByAccountId}}))),n=t.setAccount,d=t.setWantsToSeeDemoData,x=t.getSubscriptionByAccountId,f=(0,i.a)((0,o.N)((function(e){return{accountsWithAssets:e.accountsWithAssets,setAsset:e.setAsset,setAssetForId:e.setAssetForId,setDemoMode:e.setDemoMode}}))),p=f.accountsWithAssets,v=f.setAsset,h=f.setAssetForId,b=f.setDemoMode;return function(){var t=(0,a.Z)((0,s.Z)().mark((function t(a,r,i){var o,u,f,m,g,w,j,_,N,k,y,C,S,A;return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g=window.location.pathname.split("/"),w=g[5],j=g.includes("settings"),_=g.includes("workspace"),N=g.includes("asset"),k=g.includes("settings")&&g[g.length-1],n(a),(null===a||void 0===a||null===(o=a.billing)||void 0===o?void 0:o.subscription)&&x(a.id),y=p.find((function(e){return e.id===(null===a||void 0===a?void 0:a.id)})),C=a.id,S=null!==y&&void 0!==y&&null!==(u=y.assets)&&void 0!==u&&u.length?null===y||void 0===y||null===(f=y.assets[0])||void 0===f?void 0:f.id:"website-demo",A=null!==i&&void 0!==i?i:S,(0,c.ur)([{key:"selected_asset",value:A},{key:"selected_account",value:C}]),(0,l.tG)(),d(!1),e(j?"website-demo"===A&&N?"/settings/workspace/".concat(C,"/preferences"):"/settings".concat(_||N?"":"/user").concat(_?"/workspace/".concat(C):"").concat(N?"/asset/".concat(A):"","/").concat(k):"/workspace/".concat(C,"/asset/").concat(A,"/").concat(w||"")),null===r||void 0===r||r(),!i||"website-demo"===i){t.next=23;break}return b(!1),t.next=21,h(C,i);case 21:t.next=29;break;case 23:if(!y||"website-demo"!==A){t.next=28;break}return t.next=26,h(null===y||void 0===y?void 0:y.id,"website-demo");case 26:t.next=29;break;case 28:null!==y&&void 0!==y&&null!==(m=y.assets)&&void 0!==m&&m.length&&(b(!1),v(null===y||void 0===y?void 0:y.assets[0]));case 29:case"end":return t.stop()}}),t)})));return function(e,n,s){return t.apply(this,arguments)}}()}},18089:function(e,t,n){n.d(t,{v:function(){return r}});var s=n(61668),a=n(80184),r=function(e){var t=e.label,n=void 0===t?"View":t,r=e.leftIcon,i=e.showChevron,o=void 0===i||i,c=e.onClick;return(0,a.jsxs)("button",{type:"button",onClick:c,className:"inline-flex min-h-[32px] items-center justify-center gap-1.5 rounded-lg border border-t-card-border bg-white px-3 py-2 text-[14px] font-medium leading-[18px] text-t-base-blue hover:bg-[var(--lavender-fill-soft,#f7f6ff)]",children:[r,n,o&&(0,a.jsx)(s.Z,{className:"h-4 w-4"})]})}},97872:function(e,t,n){n.r(t),n.d(t,{WebsitesTab:function(){return De}});var s=n(1413),a=n(29439),r=n(72791),i=n(91933),o=n(43504),c=n(80772),l=n(87462),u=n(80184),d=function(e){return(0,u.jsx)("svg",(0,l.Z)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e,{children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2 12h20M2 12c0 5.5228 4.4772 10 10 10M2 12C2 6.4772 6.4772 2 12 2m10 10c0 5.5228-4.4772 10-10 10m10-10c0-5.5228-4.4772-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"})}))},x=n(95525),f=function(e){return(0,u.jsx)("svg",(0,l.Z)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e,{children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21H4.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C3 20.2401 3 19.9601 3 19.4V3m18 4-5.4343 5.4343c-.198.198-.297.297-.4112.3341a.5.5 0 0 1-.309 0c-.1142-.0371-.2132-.1361-.4112-.3341l-1.8686-1.8686c-.198-.198-.297-.297-.4112-.3341a.5.5 0 0 0-.309 0c-.1142.0371-.2132.1361-.4112.3341L7 15m14-8h-4m4 0v4"})}))},p=n(47573),v=n(94438),h=n(36357),b=n(7888),m=n(48932),g=n(97025),w=n(77026),j=n(34891),_=n(94197),N=n(63361),k=n(18089),y=300,C=120,S=170,A=200,I=200,Z=170,D=204,z=128,T=n(41971),E=n(91609),L=n(41578),M=n(19129),R=n(59157),O=[{key:"website",label:"Website",locked:!0},{key:"connections",label:"Connections"},{key:"ivt_7d",label:"Invalid Traffic Rate (7d)"},{key:"ivt_24h",label:"Invalid Traffic Rate (24h)"},{key:"last_blocked",label:"Last source blocked"}],P=function(e){var t=e.selectedColumns,n=e.setSelectedColumns,a=e.assetId,r=e.page,i=(0,R.m)().userStore,o=i.visualPreferences,l=i.updateVisualPreferences;return(0,u.jsxs)(T.fC,{modal:!1,onOpenChange:function(e){return!e&&function(){var e=Array.from(t),n=[];if(o){var i=(n=JSON.parse(o)).findIndex((function(e){return e.target_id===a&&e.page===r}));-1===i?n.push({target_id:a,page:r,columns:e}):n[i]=(0,s.Z)((0,s.Z)({},n[i]),{},{columns:e})}else n=[{target_id:a,page:r,columns:e}];l(JSON.stringify(n))}()},children:[(0,u.jsx)(T.xz,{asChild:!0,children:(0,u.jsx)(c.g,{variant:"secondary",roundness:"default",size:"sm",leftIcon:(0,u.jsx)(L.K60,{className:"h-4 w-4"}),rightIcon:(0,u.jsx)(M.gPZ,{className:"h-4 w-4"}),label:"Columns"})}
3),(0,u.jsx)(T.Uv,{children:(0,u.jsx)(T.VY,{sideOffset:5,align:"start",className:"z-[99999999] flex w-[240px] flex-col gap-0.5 rounded-2xl bg-popover p-1.5 shadow-dropShadow focus:outline-none",children:O.map((function(e){var s=e.locked||t.has(e.key);return(0,u.jsxs)("button",{type:"button",disabled:e.locked,onClick:function(){return t=e.key,n((function(e){var n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}));var t},className:"flex items-center justify-between gap-3 rounded-lg px-3 py-2 text-left hover:bg-popover-hover focus:outline-none disabled:cursor-default disabled:hover:bg-transparent",children:[(0,u.jsx)("span",{className:"text-[14px] text-[color:var(--text-primary)]",children:e.label}),s&&(0,u.jsx)(E.Z,{className:"h-4 w-4 shrink-0 text-brand"})]},e.key)}))})})]})},W=n(93433),F=n(63876),V=n(70711),B=n(61668),G=[{value:"GADS",label:"Google Ads"},{value:"FADS",label:"Meta Ads"},{value:"BADS",label:"Microsoft Ads"}],Q=[{value:"ACTIVE",label:"Active"},{value:"NO_ACCESS",label:"No access"}],U=[{value:"ENABLED",label:"Enabled"},{value:"PARTIAL",label:"Partial"},{value:"MONITORING_ONLY",label:"Monitoring only"},{value:"DISABLED",label:"Disabled"}],H=function(e){var t=e.n;return t>0?(0,u.jsx)("span",{className:"inline-flex items-center justify-center min-w-[20px] h-5 px-1 rounded-md bg-brand text-[12px] font-medium text-white",children:t}):null},J=function(e){var t=e.label,n=e.checked,s=e.onToggle;return(0,u.jsx)("button",{type:"button",onClick:s,className:"flex w-full items-center gap-2 px-3 py-2 rounded-md text-left hover:bg-popover-hover focus:outline-none",children:(0,u.jsx)(c.P,{size:"sm",checked:n,readOnly:!0,tabIndex:-1,className:"pointer-events-none",label:t})})},Y=function(e){var t=e.value,n=e.onChange,a=t.platforms,r=t.connectionStatuses,i=t.protectionStatuses,o=a.length+r.length+i.length,l=function(e,t,s,a){return(0,u.jsxs)(T.Tr,{children:[(0,u.jsxs)(T.fF,{className:"flex items-center justify-between px-3 py-2 rounded-md cursor-pointer hover:bg-popover-hover data-[state=open]:bg-popover-hover focus:outline-none text-[14px] text-[color:var(--text-primary)]",children:[e,(0,u.jsxs)("div",{className:"flex items-center gap-2 pl-3",children:[(0,u.jsx)(H,{n:s.length}),(0,u.jsx)(B.Z,{className:"h-4 w-4 text-[#80808a]"})]})]}),(0,u.jsx)(T.Uv,{children:(0,u.jsx)(T.tu,{sideOffset:4,className:"flex flex-col bg-popover rounded-2xl shadow-dropShadow p-1.5 w-[200px] max-h-[450px] overflow-y-auto focus:outline-none z-50",children:t.map((function(e){return(0,u.jsx)(J,{label:e.label,checked:s.includes(e.value),onToggle:function(){return n(a(function(e,t){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat((0,W.Z)(e),[t])}(s,e.value)))}},e.value)}))})})]})};return(0,u.jsxs)(T.fC,{modal:!1,children:[(0,u.jsx)(T.xz,{asChild:!0,children:(0,u.jsx)(c.g,{variant:"secondary",roundness:"default",size:"sm",leftIcon:(0,u.jsx)(F.Z,{className:"h-4 w-4"}),rightIcon:(0,u.jsx)(V.Z,{className:"h-4 w-4"}),label:o>0?"Filters (".concat(o,")"):"Filters"})}),(0,u.jsx)(T.Uv,{children:(0,u.jsxs)(T.VY,{sideOffset:5,align:"end",className:"flex flex-col bg-popover rounded-2xl shadow-dropShadow p-1.5 w-[220px] focus:outline-none z-50",children:[l("Ad platforms",G,a,(function(e){return(0,s.Z)((0,s.Z)({},t),{},{platforms:e})})),l("Connection status",Q,r,(function(e){return(0,s.Z)((0,s.Z)({},t),{},{connectionStatuses:e})})),l("Monitoring status",U,i,(function(e){return(0,s.Z)((0,s.Z)({},t),{},{protectionStatuses:e})})),(0,u.jsx)("div",{className:"my-1.5 h-px bg-t-traffic"}),(0,u.jsx)("button",{type:"button",className:"px-3 py-2 text-left text-[14px] text-[color:var(--text-primary)] hover:bg-popover-hover rounded-md disabled:opacity-40",disabled:0===o,onClick:function(){return n({platforms:[],connectionStatuses:[],protectionStatuses:[]})},children:"Clear filters"})]})})]})},K=n(74165),q=n(15861),X=n(86866),$=n(50198),ee=n(32007),te=n(77584),ne=n(57850),se=n(17555),ae=function(){return(0,u.jsx)(c.ai,{size:"sm",color:"gray",children:"None"})},re=function(){return(0,u.jsx)(c.ai,{size:"sm",color:"error",children:"Tracking code missing"})},ie=function(){return(0,u.jsx)(c.ai,{size:"sm",color:"warning",children:"Tracking issues"})},oe=function(){return(0,u.jsx)(c.ai,{size:"sm",color:"warning",children:"No access"})},ce=function(e){var t=e.count;return(0,u.jsxs)(c.ai,{size:"sm",color:"warning",className:"!pl-0.5",children:[(0,u.jsx)("span",{className:"mr-0.5 inline-flex h-4 min-w-[16px] items-center justify-center rounded-full bg-[#fde68a8c] px-1 text-[12px] font-semibold leading-4",children:t}),1===t?"Ad account issue":"Ad account issues"]})},le={GADS:"google-ads",FADS:"meta",BADS:"microsoft"},ue=function(e){var t=e.title,n=e.description;return(0,u.jsx)(c.bH,{content:t,description:n,portal:!0,children:(0,u.jsx)(p.Z,{className:"h-3 w-3 text-[#a0a0a8]"})})},de={name:{width:y,left:b.T.ds},issues:{width:D,right:z},view:{width:z,right:0}},xe=function(e){var t=e.children,n=e.info,s=e.className,a=void 0===s?"flex-1 min-w-0":s,r=e.style;return(0,u.jsxs)("div",{style:r,className:"flex h-11 items-center gap-1.5 border-b border-t-checkbox px-6 py-3 ".concat(a),children:[t&&(0,u.jsx)("span",{className:"whitespace-nowrap text-[12px] font-semibold leading-4 text-[color:var(--text-secondary)]",children:t}),n]})},fe=function(e){var t=e.children,n=e.className,s=void 0===n?"flex-1 min-w-0":n,a=e.style;return(0,u.jsx)("div",{style:a,className:(0,X.m)("flex h-full items-center gap-3 border-b border-t-checkbox px-6 py-4",s),children:t})},pe=function(e){var t=e.children;return(0,u.jsxs)("div",{className:"flex bg-table-band-subtle",children:[(0,u.jsx)("div",{className:"sticky left-0 z-30 w-[30px] shrink-0 bg-table-band-subtle"}),(0,u.jsx)("div",{className:"min-w-0 flex-1 overflow-clip rounded-t-lg",children:t})]})},ve=function(e){var t,n,o=e.assetId,l=e.workspaceId,d=e.canWrite,x=e.onProtectionChanged,f=(0,i.useQueryClient)(),p=(0,m.c)((function(e){return e.accounts})),v=(0,w.o)(),h=(0,ee.E)(),b=(0,r.useState)(0),g=(0,a.Z)(b,2),j=g[0],_=g[1],y=["ao-web
3site-ad-accounts",o,j],C=(0,i.useQuery)(y,(function(){return N.r.getWebsiteAdAccounts(o,{limit:5,skip:j})}),{keepPreviousData:!0}),S=C.data,A=C.isFetching,I=null!==(t=null===S||void 0===S?void 0:S.rows)&&void 0!==t?t:[],Z=null!==(n=null===S||void 0===S?void 0:S.total)&&void 0!==n?n:0,D=(0,r.useRef)(null),z=(0,se.x)((function(){var e,t;return null!==(e=null===(t=D.current)||void 0===t?void 0:t.closest(".ds-table-scroll"))&&void 0!==e?e:null}),[I.length]),T=!z.start,E=!z.end,L=(0,i.useMutation)((function(e){return $.f.updateSettingsAccountProtection(l,e.id,{active:!e.protection_enabled})}),{onMutate:function(){var e=(0,q.Z)((0,K.Z)().mark((function e(t){var n;return(0,K.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.cancelQueries(y);case 2:return n=f.getQueryData(y),f.setQueryData(y,(function(e){return e?(0,s.Z)((0,s.Z)({},e),{},{rows:e.rows.map((function(e){return e.id===t.id?(0,s.Z)((0,s.Z)({},e),{},{protection_enabled:!e.protection_enabled,tracking_issue:!1,no_access:!1}):e}))}):e})),e.abrupt("return",{previous:n});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),onError:function(e,t,n){null!==n&&void 0!==n&&n.previous&&f.setQueryData(y,n.previous)},onSettled:function(){f.invalidateQueries(y),x()}});if(A&&!I.length)return(0,u.jsx)(pe,{children:(0,u.jsx)("div",{className:"flex items-center justify-center bg-table-band-subtle py-8",children:(0,u.jsx)(c.al,{})})});if(!I.length)return(0,u.jsx)(pe,{children:(0,u.jsx)("div",{className:"bg-table-band-subtle px-6 py-5 text-[14px] text-[color:var(--text-secondary)]",children:"No ad accounts."})});var M=Math.floor(j/5)+1;return(0,u.jsxs)(pe,{children:[(0,u.jsxs)("div",{ref:D,className:"flex border-t border-t-checkbox bg-table-band",children:[(0,u.jsxs)(xe,{style:de.name,className:"sticky z-20 shrink-0 bg-table-band",children:[(0,u.jsx)(ne.x,{show:T,side:"right"}),"Ad Account"]}),(0,u.jsx)(xe,{children:"ID"}),(0,u.jsx)(xe,{info:(0,u.jsx)(ue,{title:"While click detection is on, the spend of this account counts towards your monthly usage.",description:""}),children:"Click detection"}),(0,u.jsxs)(xe,{style:de.issues,className:"sticky z-20 shrink-0 bg-table-band",children:[(0,u.jsx)(ne.x,{show:E}),"Issues"]}),(0,u.jsx)(xe,{style:de.view,className:"sticky z-20 shrink-0 bg-table-band"})]}),I.map((function(e){var t,n=e.tracking_issue||e.no_access;return(0,u.jsxs)("div",{className:"flex h-[52px] bg-table-band-subtle",children:[(0,u.jsxs)(fe,{style:de.name,className:"sticky z-20 shrink-0 bg-table-band-subtle",children:[(0,u.jsx)(ne.x,{show:T,side:"right"}),(0,u.jsx)(c.ah,{provider:le[e.platform],size:24,decorative:!0}),(0,u.jsx)("span",{className:"truncate text-[14px] leading-[18px] text-[color:var(--text-primary)]",children:e.name})]}),(0,u.jsx)(fe,{children:(0,u.jsx)("span",{className:"truncate text-[14px] leading-[18px] text-[color:var(--text-secondary)]",children:null!==(t=e.account_number)&&void 0!==t?t:"\u2013"})}),(0,u.jsxs)(fe,{children:[(0,u.jsx)(c.bG,{id:"ao-protect-".concat(e.id),size:"md",checked:e.protection_enabled,disabled:!d||L.isLoading,onChange:function(){return L.mutate(e)}}),(0,u.jsx)("span",{className:"text-[14px] leading-[18px] text-[color:var(--text-primary)]",children:e.protection_enabled?"On":"Off"})]}),(0,u.jsxs)(fe,{style:de.issues,className:"sticky z-20 shrink-0 gap-1.5 whitespace-nowrap bg-table-band-subtle",children:[(0,u.jsx)(ne.x,{show:E}),n?(0,u.jsxs)(u.Fragment,{children:[e.tracking_issue&&(0,u.jsx)(ie,{}),e.no_access&&(0,u.jsx)(oe,{})]}):(0,u.jsx)(ae,{})]}),(0,u.jsx)("div",{style:de.view,className:"sticky z-20 flex h-full shrink-0 items-center justify-end border-b border-t-checkbox bg-table-band-subtle px-6 py-4",children:(0,u.jsx)(k.v,{onClick:function(){return function(e){var t=p.find((function(e){return e.id===l}));t&&v(t,(function(){return h("/workspace/".concat(l,"/asset/").concat(o,"/ppc-accounts?ppcAccountId=").concat(e))}),o)}(e.id)}})})]},e.id)})),(0,u.jsx)(te.A,{variant:"ds",itemsCount:Z,pageSize:5,currentPage:M,pageListener:function(e){return _(e)},paginationClassName:"bg-table-band-subtle px-6"})]})},he="account_overview",be="account_overview_websites",me="PENDING_ISSUES",ge=["connections","ivt_7d","last_blocked"],we={GADS:"google-ads",FADS:"meta",BADS:"microsoft"},je=["GADS","FADS","BADS"],_e=function(e){return e?e.split(",").filter(
3Boolean):[]},Ne={pending_issues:"wb_pending_issues",ivt_24h:"wb_ivt_24h",ivt_7d:"wb_ivt_7d"},ke={ENABLED:{label:"Enabled",color:"success"},PARTIAL:{label:"Partial",color:"warning"},MONITORING_ONLY:{label:"Monitoring only",color:"brand"},DISABLED:{label:"Disabled",color:"gray"}},ye="Invalid Traffic Rate",Ce="Click to show websites with an Invalid Traffic Rate increase in the last 24 hours compared with the previous 7 days.",Se="Click to show websites with an Invalid Traffic Rate week-over-week increase.",Ae=function(e){if(!e)return"\u2013";var t=Date.now()-new Date(e).getTime();if(t<6e4)return"".concat(Math.max(1,Math.floor(t/1e3))," sec ago");var n=Math.floor(t/6e4);if(n<60)return"".concat(n," min ago");var s=Math.floor(n/60);if(s<24)return"".concat(s," ").concat(1===s?"hour":"hours"," ago");var a=Math.floor(s/24);return a<30?"".concat(a," ").concat(1===a?"day":"days"," ago"):new Date(e).toLocaleDateString()},Ie=function(e,t,n){if(null===e)return(0,u.jsx)("span",{className:"text-[#80808a]",children:"\u2013"});var s=null!==t&&0!==t;return(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsxs)("span",{className:"text-[14px] text-[color:var(--text-primary)]",children:[e.toFixed(1),"%"]}),s&&(0,u.jsx)(c.y,{type:"trend",size:"sm",trend:n?"negative":"positive",direction:n?"up":"down",value:"".concat(t.toFixed(1),"%")})]})},Ze=function(e){var t=e.title,n=e.description;return(0,u.jsx)(c.bH,{content:t,description:n,portal:!0,children:(0,u.jsx)(p.Z,{className:"h-3 w-3 text-[#a0a0a8]"})})},De=function(){var e,t,n,l,p,T,E,L=(0,i.useQueryClient)(),M=(0,m.c)((function(e){return e.accounts})),R=(0,g.L)((function(e){return e.user})),O=(0,g.L)((function(e){return e.visualPreferences})),W=(0,w.o)(),F=(0,j.I)(),V=(0,o.lr)(),B=(0,a.Z)(V,2),G=B[0],Q=B[1],U=null!==(e=G.get("search"))&&void 0!==e?e:"",H=_e(G.get("protection")),J=H.includes(me),K=J?H.filter((function(e){return e!==me})):H,q=J?"pending_issues":null!==(t=G.get("card"))&&void 0!==t?t:"all",X={platforms:_e(G.get("platforms")),connectionStatuses:_e(G.get("connections")),protectionStatuses:K},$=(0,r.useState)(0),ee=(0,a.Z)($,2),te=ee[0],ne=ee[1],se=(0,r.useState)(10),ie=(0,a.Z)(se,2),oe=ie[0],le=ie[1],ue=function(e){var t=new URLSearchParams(G);Object.entries(e).forEach((function(e){var n=(0,a.Z)(e,2),s=n[0],r=n[1];return r?t.set(s,r):t.delete(s)})),Q(t,{replace:!0})};(0,r.useEffect)((function(){J&&ue({protection:K.join(",")||null,card:"pending_issues"})}),[J]);var de=(0,r.useState)(U),xe=(0,a.Z)(de,2),fe=xe[0],pe=xe[1];(0,r.useEffect)((function(){var e=setTimeout((function(){fe!==U&&(ue({search:fe||null}),ne(0))}),400);return function(){return clearTimeout(e)}}),[fe]);var De=(0,r.useState)(new Set(ge)),ze=(0,a.Z)(De,2),Te=ze[0],Ee=ze[1];(0,r.useEffect)((function(){try{if(!O)return void Ee(new Set(ge));var e=JSON.parse(O).find((function(e){return e.target_id===he&&e.page===be}));Ee(null!==e&&void 0!==e&&e.columns?new Set(e.columns):new Set(ge))}catch(t){Ee(new Set(ge))}}),[O]);var Le=(0,i.useQuery)(["account-overview-websites",U,q,X,te,oe],(function(){return N.r.getWebsites({search:U,card:q,platforms:X.platforms,connectionStatuses:X.connectionStatuses,protectionStatuses:X.protectionStatuses,skip:te,limit:oe})}),{keepPreviousData:!0}),Me=Le.data,Re=Le.isFetching,Oe=Le.refetch,Pe=null!==(n=null===Me||void 0===Me?void 0:Me.rows)&&void 0!==n?n:[],We=null===Me||void 0===Me?void 0:Me.card_counts,Fe=function(e){var t,n,s=M.find((function(t){return t.id===e})),a=null===s||void 0===s||null===(t=s.user_access)||void 0===t||null===(n=t.find((function(e){return e.user_id===(null===R||void 0===R?void 0:R.id)})))||void 0===n?void 0:n.access_level;return"WRITE"===a||"OWNER"===a},Ve=function(){L.invalidateQueries(["account-overview-websites"])},Be=(0,r.useMemo)((function(){var e=[{label:"Website",path:"name",width:"".concat(y,"px"),freeze:!0,freezeLeftOffset:b.T.ds,freezeEdge:"right",className:"justify-start",parentClassName:"bg-table-band",render:function(e){var t;return(0,u.jsxs)("div",{className:"flex items-center gap-3",children:[(0,u.jsx)(c.l,{size:"xs",tone:e.avatar?"gray":"purple",className:e.avatar?"cg-bg-white":void 0,style:e.avatar?{boxShadow:"none"}:void 0,name:e.name,src:null!==(t=e.avatar)&&void 0!==t?t:void 0}),(0,u.jsxs)("div",{className:"flex min-w-0 max-w-[200px] flex-col",children:[(0,u.jsx)("span",{className:"truncate text-[14px] font-medium leading-[18px] text-[color:var(--text-primary)]",children:e.name}),(0,u.jsx)("span",{className:"truncate text-[14px] leading-[18px] text-[color:var(--text-secondary)]",children:e.workspace_name})]})]})}},{key:"connections",label:"Connections",width:"".concat(C,"px"),className:"justify-start",parentClassName:"bg-table-band",render:function(e){return t=e.platforms,(0,u.jsx)(c.bs,{iconSize:16,connections:je.map((function(e){return{provider:we[e],connected:t.some((function(t){return t.platform===e&&"ACTIVE"===t.connection_status}))}}))});var t}},{label:"Monitoring",width:"".concat(S,"px"),className:"justify-start",parentClassName:"bg-table-band",render:function(e){return(0,u.jsx)(c.ai,{size:"sm",color:ke[e.protection_status].color,children:ke[e.protection_status].label})}},{key:"ivt_7d",label:(0,u.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Invalid Traffic Rate (7d)",(0,u.jsx)(Ze,{title:ye,description:Se})]}),width:"".concat(A,"px"),className:"justify-start",parentClassName:"bg-table-band",render:function(e){return Ie(e.ivt_7d,e.ivt_7d_change,e.ivt_7d_trending_up)}},{key:"ivt_24h",label:(0,u.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Invalid Traffic Rate (24h)",(0,u.jsx)(Ze,{title:ye,description:Ce})]}),width:"".concat(I,"px"),className:"justify-start",parentClassName:"bg-table-band",render:function(e){return Ie(e.ivt_24h,e.ivt_24h_change,e.ivt_24h_trending_up)}},{key:"last_blocked",label:"Last source blocked",width:"".concat(Z,"px"),className:"justify-start",parentClassName:"bg-table-band",render:function(e){return(0,u.jsx)("span",{className:"text-[color:var(--text-secondary)]",children:Ae(e.last_blocked_at)})}},{label:"Issues",width:"".concat(D,"px"),freezeRight:!0,freezeRightOffset:z,freezeEdge:"left",className:"flex-col items-start justify-center gap-1.5",parentClassName:"bg-table-band",render:function(e){return e.tracking_code_missing||0!==e.ad_account_issue_count?(0,u.jsxs)(u.Fragment,{children:[e.tracking_code_missing&&(0,u.jsx)(re,{}),e.ad_account_issue_count>0&&(0,u.jsx)(ce,{count:e.ad_account_issue_count})]}):(0,u.jsx)(ae,{})}},{label:"",width:"".concat(z,"px"),freezeRight:!0,parentClassName:"bg-table-band",render:function(e){return(0,u.jsx)(k.v,{onClick:function(){return function(e,t){var n=M.find((function(t){return t.id===e}));n&&W(n,void 0,t)}(e.workspace_id,e.id)}})}}
3].filter((function(e){return!e.key||Te.has(e.key)})),t=e.reduce((function(e,t,n){return t.freeze||t.freezeRight?e:n}),-1);return e.map((function(e,n){return n===t?(0,s.Z)((0,s.Z)({},e),{},{stretch:!0}):e}))}),[Te,M,R]),Ge=function(e){ue({card:"all"===e?null:e}),ne(0);var t=Ne[e];t&&F(_.H.ACCOUNT_OVERVIEW_CLICK_CARD_FILTER,_.f.ACCOUNT_OVERVIEW,{filter:t})};return(0,u.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,u.jsxs)("div",{className:"flex flex-wrap gap-px overflow-hidden rounded-xl border border-t-traffic bg-t-traffic shadow-[0px_4px_16px_-2px_rgba(16,24,40,0.03),0px_1px_4px_-2px_rgba(16,24,40,0.02)]",children:[(0,u.jsx)(c.w,{className:"grow basis-[calc(50%_-_1px)] xl:basis-0",icon:(0,u.jsx)(d,{className:"h-3 w-3 text-[#80808a]"}),label:"All websites",value:null!==(l=null===We||void 0===We?void 0:We.all)&&void 0!==l?l:0,selected:"all"===q,onClick:function(){return Ge("all")}}),(0,u.jsx)(c.w,{className:"grow basis-[calc(50%_-_1px)] xl:basis-0",icon:(0,u.jsx)(x.Z,{className:"h-3 w-3 text-[#80808a]"}),label:"Pending issues",value:null!==(p=null===We||void 0===We?void 0:We.pending_issues)&&void 0!==p?p:0,selected:"pending_issues"===q,onClick:function(){return Ge("pending_issues")}}),(0,u.jsx)(c.w,{className:"grow basis-[calc(50%_-_1px)] xl:basis-0",icon:(0,u.jsx)(f,{className:"h-3 w-3 text-[#80808a]"}),label:"IVT trending up (24h)",value:null!==(T=null===We||void 0===We?void 0:We.ivt_24h)&&void 0!==T?T:0,selected:"ivt_24h"===q,onClick:function(){return Ge("ivt_24h")},info:(0,u.jsx)(Ze,{title:ye,description:Ce})}),(0,u.jsx)(c.w,{className:"grow basis-[calc(50%_-_1px)] xl:basis-0",icon:(0,u.jsx)(f,{className:"h-3 w-3 text-[#80808a]"}),label:"IVT trending up (7d)",value:null!==(E=null===We||void 0===We?void 0:We.ivt_7d)&&void 0!==E?E:0,selected:"ivt_7d"===q,onClick:function(){return Ge("ivt_7d")},info:(0,u.jsx)(Ze,{title:ye,description:Se})})]}),(0,u.jsxs)("div",{className:"flex flex-col gap-3 overflow-hidden rounded-xl border border-t-traffic bg-white p-3 shadow-[0px_4px_16px_-2px_rgba(16,24,40,0.03),0px_1px_4px_-2px_rgba(16,24,40,0.02)]",children:[(0,u.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,u.jsxs)("div",{className:"flex items-center gap-3",children:[(0,u.jsxs)("div",{className:"relative w-[240px]",children:[(0,u.jsx)(v.Z,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#80808a]"}),(0,u.jsx)("input",{className:"h-8 w-full rounded-lg border border-t-checkbox bg-transparent pl-9 pr-3 text-[14px] placeholder:text-[#9f9ea3] focus:outline-none",placeholder:"Search for websites...",value:fe,onChange:function(e){return pe(e.target.value)}})]}),(0,u.jsx)(P,{selectedColumns:Te,setSelectedColumns:Ee,assetId:he,page:be}),(0,u.jsx)(Y,{value:X,onChange:function(e){ue({platforms:e.platforms.join(",")||null,connections:e.connectionStatuses.join(",")||null,protection:e.protectionStatuses.join(",")||null}),ne(0)}}),(!(null===We||void 0===We||!We.pending_issues)||"pending_issues"===q)&&(0,u.jsx)(c.a9,{label:"Pending issues",count:null===We||void 0===We?void 0:We.pending_issues,pressed:"pending_issues"===q,onPressedChange:function(e){return Ge(e?"pending_issues":"all")}})]}),(0,u.jsx)(c.g,{variant:"secondary",size:"sm",label:"Refresh",leftIcon:(0,u.jsx)(h.Z,{className:"h-4 w-4"}),onClick:function(){return Oe()}})]}),(0,u.jsx)("div",{className:"overflow-hidden rounded-t-lg",children:(0,u.jsx)(b.J,{variant:"ds",containerClassName:"rounded-none bg-transparent",columns:Be,data:Pe,getRowId:function(e){return e.id},renderSubRow:function(e){return(0,u.jsx)(ve,{assetId:e.id,workspaceId:e.workspace_id,canWrite:Fe(e.workspace_id),onProtectionChanged:Ve})},totalCount:null===Me||void 0===Me?void 0:Me.total,pageSize:oe,changePageSize:le,pageListener:function(e){return ne(e)},isLoading:Re,showPagination:!0})})]})]})}},95525:function(e,t,n){var s=n(87462),a=(n(72791),n(80184));t.Z=function(e){return(0,a.jsx)("svg",(0,s.Z)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e,{children:(0,a.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10.5V7m0 7h.01M7 18v2.3355c0 .5329 0 .7993.1092.9361a.5.5 0 0 0 .3913.1881c.1751-.0002.3832-.1666.7993-.4995l2.3854-1.9084c.4873-.3898.731-.5847 1.0023-.7233a3 3 0 0 1 .7617-.2672C12.7477 18 13.0597 18 
313.6837 18H16.2c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 15.7202 21 14.8802 21 13.2V7.8c0-1.6802 0-2.5202-.327-3.162a3 3 0 0 0-1.311-1.311C18.7202 3 17.8802 3 16.2 3H7.8c-1.6802 0-2.5202 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.2798 3 6.1198 3 7.8V14c0 .93 0 1.395.1022 1.7765a3 3 0 0 0 2.1213 2.1213C5.605 18 6.07 18 7 18"})}))}}}]);
4//# sourceMappingURL=872.c8c1f9d0.chunk.js.map
5//# debugId=12915165-3b48-541b-9b78-14e491cd17ed

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