PageSourceSearch

https://console.mediasmart.io/_next/static/chunks/pages/resources/sync-audience/[audience]-0d75befcb8069518.js

js mediasmart.io collected 2026-09-24 09:31:16 UTC 8,004 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[56],{1130:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/resources/sync-audience/[audience]",function(){return n(11589)}])},95645:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var a=n(91039);let i={config:n(69517).s,url:"/audiences"},l=async(e,t)=>{let n=t?"/v2".concat(i.url):i.url;return a.ZP.get({...i,url:n,params:e})};t.Z=l},22257:function(e,t,n){"use strict";n.d(t,{M:function(){return Z}});var a=n(85893),i=n(79328),l=n(34530),s=n(89587),r=n(93692),c=n(62803),u=n(95639),o=n(34279),d=n(80483),E=n(77527),p=n(7276),x=n(42042),S=n(67294);let{ERROR:C}=i.C.SNACKBAR.TYPE,{VALIDATION_ERRORS:{ERROR_NAME:f,ERROR_LENGTH:y}}=i.T,I=RegExp("[|@#$]"),m={noMarginBottom:!0,textvariant:"h5",sx:{wordBreak:"break-word",WebkitLineClamp:"2",textOverflow:"ellipsis",display:"-webkit-box",alignItems:"center",WebkitBoxOrient:"vertical"}},h=(0,E.ZP)(s.Z)(e=>{let{theme:t}=e;return{marginLeft:t.spacing(.5)}}),T={text:"test-title-text",input:"test-title-input",cancel:"test-title-cancel",save:"test-title-save",edit:"test-title-edit"};var Z=e=>{let{name:t,onUpdateName:n,PrefixComponent:i,SuffixComponent:s,isEditable:E}=e,[Z,_]=(0,S.useState)(!1),[v,A]=(0,S.useState)(t),O=(0,p.kP)(),R=null!=E?E:(0,l.J5)(O),j=(0,x.D)(),N=e=>{A(e)},P=async e=>{""===e.trim()?(j.error({message:y}),A(t)):I.test(e)?(j.open({variant:C,message:f}),A(t)):(await n(e),_(!1),A(e))};return Z?(0,a.jsxs)(a.Fragment,{children:[i&&i,(0,a.jsx)(r.II,{type:"text",value:v,onChange:e=>N(e.target.value),"data-testid":T.input}),s&&s,(0,a.jsx)(h,{onClick:()=>_(!1),color:"default","data-testid":T.cancel,children:(0,a.jsx)(u.Z,{})}),(0,a.jsx)(h,{onClick:()=>P(v),color:"default","data-testid":T.save,children:(0,a.jsx)(d.Z,{})})]}):(0,a.jsxs)(a.Fragment,{children:[i&&i,(0,a.jsx)(c.ZP,{...m,"data-testid":T.text,overflow:"hidden",children:t}),s&&s,R&&(0,a.jsx)(h,{onClick:()=>_(!0),color:"default","data-testid":T.edit,children:(0,a.jsx)(o.Z,{})})]})}},80483:function(e,t,n){"use strict";var a=n(64836);t.Z=void 0;var i=a(n(33651)),l=n(85893);t.Z=(0,i.default)((0,l.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save")},11589:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return H}});var a=n(85893),i=n(11163),l=n.n(i),s=n(76258),r=n(15549),c=n(87792),u=n(79328),o=n(67294),d=n(58450),E=n(12577),p=n(42042),x=n(19738),S=n(66374),C=n(47108),f=n(97365),y=n(56819),I=n(13351),m=n(62803),h=n(11373),T=()=>{let[e,t]=(0,o.useState)(!1),n=(0,o.useRef)(),a=()=>{n.current&&clearTimeout(n.current)};return(0,o.useEffect)(()=>a,[]),{copied:e,markCopied:()=>{a(),t(!0),n.current=window.setTimeout(()=>{t(!1)},2e3)}}};let Z=[{value:"pixel",label:"Pixel"},{value:"url",label:"URL"}];var _=n(96899);let v={display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%",gap:.5},{FINISHED_AT:A,PIXEL_CARD:O,PIXEL_CUSTOM:R}={FINISHED_AT:"finished_at",PIXEL_CARD:"_pixel_card",PIXEL_CUSTOM:"_pixel_custom",sync_hits:"_sync_hits"},j=[{type:x.FIELD_TYPES.DATE_PICKER,label:"Finish date",name:A,required:!0,disablePast:!0,size:4},{type:x.FIELD_TYPES.CUSTOM,name:"_sync_hits",Component:()=>{var e;let{values:t}=(0,x.Gc)(),n=null!==(e=(0,x.NA)("items",t))&&void 0!==e?e:0;return(0,a.jsxs)(f.Z,{sx:v,children:[(0,a.jsx)(_.Z,{iconType:"outlined",tooltipTitle:u.T.AUDIENCES.SYNC_USERS_TOOLTIP,sx:{display:"block",color:e=>e.palette.grey[600]}}),(0,a.jsxs)(m.ZP,{textvariant:"subtitle1",noMarginBottom:!0,children:["Sync hits: ",n]})]})},size:8},{type:x.FIELD_TYPES.CARD,name:O,label:"Pixel code",description:"Copy this pixel and place it in the site or creative where you wish to capture IPs.",fields:[{name:R,type:x.FIELD_TYPES.CUSTOM,Component:()=>{var e,t;let[n,i]=(0,o.useState)("pixel"),{copied:l,markCopied:s}=T(),{values:r}=(0,x.Gc)(),c=null!==(e=(0,x.NA)("pixel_url",r))&&void 0!==e?e:"",u=null!==(t=(0,x.NA)("pixel_code",r))&&void 0!==t?t:"",d="pixel"===n?u:c;return(0,a.jsxs)(f.Z,{display:"flex",gap:4,alignItems:"flex-start",pt:1,children:[(0,a.jsx)(I.Z,{row:!0,labelGroup:"Type",name:"pixel-type",options:Z,ariaLabel:"pixel-type-sync-audience",onChange:e=>{i(e.target.value)},value:n}),(0,a.jsxs)(f.Z,{flexGrow:1,children:[(0,a.jsxs)(f.Z,{display:"flex",alignItems:"center",gap:.5,children:[(0,a.jsx)(m.ZP,{textvariant:"caption",color:"textSecondary",noMarginBottom:!0,children:"Code"}),(0,a.jsx)(y.Z,{tertiary:!0,tooltipTitle:l?"Pixel code copied!":"Copy pixel to clipboard",onClick:()=>{(0,C.Z)(d),s()},sx:{flexShrink:0},children:(0,a.jsx)(S.Z,{fontSize:"small"})})]}),(0,a.jsx)(h.Z,{rows:5,value:d,InputProps:{readOnly:!0,sx:{fontFamily:'"Ubuntu Mono", monospace'}}})]})]})},size:12}],size:12}],{SUCCESS_UPDATE:N}=u.T.AUDIENCE.PRIVATE_CONFIG_FORM.SNACKBARS,P=e=>(0,d.Z)(["id"],e);var g=e=>{let{audienceId:t}=e,n=(0,p.D)(),{data:i}=E.Z.useAudience({id:t}),l=(0,o.useMemo)(()=>
1{if(i)return P(i)},[i]),s=async e=>{try{await E.Z.update({id:t,...e}),n.success({message:N})}catch(e){n.error({error:e})}};return i?(0,a.jsx)(x.ZP,{content:j,id:"sync-audience-configuration-form",initialValues:l,onSubmit:s,submitOnlyUpdatedValues:!0,actionsToolbar:!0}):null},U=e=>{let{audienceId:t}=e;return(0,a.jsx)(g,{audienceId:t})},b=n(64842),w=n(19663),D=n(79440),k=n(22257),L=n(68498),F=n(71105),M=n(10053);let{DELETE:B}=s.default.AUDIENCE.ACTIONS_HEADER,{SUCCESS_UPDATE:V,SUCCESS_REMOVE:z}=w.default.AUDIENCE.PRIVATE_CONFIG_FORM.SNACKBARS;var G=e=>{let{audienceId:t}=e,[n,i]=(0,o.useState)(!1),{data:u}=E.Z.useAudience({id:t}),d=(0,p.D)();if(!u)return null;let x=[{text:s.default.RESOURCES.TITLE,href:r.default.RESOURCES.SECTION(s.default.RESOURCES.SECTIONS.AUDIENCES)},{text:s.default.RESOURCES.TABS_TITLE.AUDIENCES,href:r.default.RESOURCES.SECTION(s.default.RESOURCES.SECTIONS.AUDIENCES)},{text:"Sync"},{text:(null==u?void 0:u.name)||""}],S=async()=>{try{await E.Z.remove(u.id),d.success({message:z}),l().push(r.default.RESOURCES.SECTION(s.default.RESOURCES.SECTIONS.AUDIENCES))}catch(e){d.error({error:e})}},C=async e=>{try{let t={id:u.id,name:e};await E.Z.update(t),d.success({message:V})}catch(e){d.error({error:e})}},f=[{Component:F.c,propsComponent:{label:B,key:B,onClick:()=>{i(!0)}}}],y=[{Component:L.Z,propsComponent:{key:"dropdown",options:f}}],I=(0,a.jsx)(k.M,{onUpdateName:C,name:u.name,SuffixComponent:(0,a.jsx)(D.Z,{label:"Sync",color:"secondary"})});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.NC,{title:I,breadcrumbs:x,actions:y,subtitle:"ID: ".concat(t)}),(0,a.jsx)(()=>(0,a.jsx)(M.Z,{title:w.default.AUDIENCE.ACTIONS.REMOVE_DIALOG_TITLE,onConfirm:S,onClose:()=>i(!1),open:n}),{})]})};let Y=e=>{let{audienceId:t}=e,{data:n,isLoading:i}=E.Z.useAudience({id:t});return i?(0,a.jsx)(c.ZP,{children:(0,a.jsx)(b.Z,{})}):n?(0,a.jsxs)(c.ZP,{children:[(0,a.jsx)(G,{audienceId:t}),(0,a.jsx)(c.bU,{children:(0,a.jsx)(U,{audienceId:t})})]}):(l().push(r.default.RESOURCES.SECTION(s.default.RESOURCES.SECTIONS.AUDIENCES)),null)};Y.getInitialProps=async e=>{let{audience:t}=e.query||{},n=Array.isArray(t)?t[0]:t;return{audienceId:null!=n?n:""}};var H=Y},12577:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var a=n(72266),i=n(91039),l=n(69517);let s={config:l.s,url:"/sync-audience"},r=async e=>i.ZP.post({...s,params:e}),c={config:l.s,url:"/sync-audience"},u=async e=>{let{id:t,...n}=e;return i.ZP.put({...c,url:"".concat(c.url,"/").concat(t),params:n})},o={config:l.s,url:"/sync-audience"},d=async e=>i.ZP.del({...o,url:"".concat(o.url,"/").concat(e)});var E=n(95645),p=n(93902);let x=e=>(0,a.CA)(t=>t.url==="sync-audience/".concat(e)),S=()=>(0,a.CA)(e=>e.url.includes(E.i.url));var C={update:async e=>{let t=await u(e);return x(e.id),S(),(0,p.LZ)(t)},remove:async e=>{let t=await d(e);return S(),(0,p.LZ)(t)},add:async e=>{let t=await r(e);return S(),(0,p.LZ)(t)},useAudience:e=>(0,a.ZP)({url:"sync-audience/".concat(e.id)})}}},function(e){e.O(0,[5653,6235,4635,5042,2888,9774,179],function(){return e(e.s=1130)}),_N_E=e.O()}]);

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