PageSourceSearch

https://console.mediasmart.io/_next/static/chunks/pages/resources/audience/[audience]-9f428c6cefc01a4f.js

js mediasmart.io collected 2026-09-24 09:31:12 UTC 11,035 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9267],{92502:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/resources/audience/[audience]",function(){return n(87495)}])},95645:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});var a=n(91039);let r={config:n(69517).s,url:"/audiences"},i=async(e,t)=>{let n=t?"/v2".concat(r.url):r.url;return a.ZP.get({...r,url:n,params:e})};t.Z=i},58570:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});var a=n(91039);let r={config:n(69517).s,url:"/v2/audiences/public"},i=async e=>a.ZP.get({...r,params:e});t.Z=i},22257:function(e,t,n){"use strict";n.d(t,{M:function(){return x}});var a=n(85893),r=n(79328),i=n(34530),u=n(89587),c=n(93692),s=n(62803),l=n(95639),o=n(34279),d=n(80483),E=n(77527),p=n(7276),f=n(42042),C=n(67294);let{ERROR:S}=r.C.SNACKBAR.TYPE,{VALIDATION_ERRORS:{ERROR_NAME:v,ERROR_LENGTH:A}}=r.T,Z=RegExp("[|@#$]"),m={noMarginBottom:!0,textvariant:"h5",sx:{wordBreak:"break-word",WebkitLineClamp:"2",textOverflow:"ellipsis",display:"-webkit-box",alignItems:"center",WebkitBoxOrient:"vertical"}},y=(0,E.ZP)(u.Z)(e=>{let{theme:t}=e;return{marginLeft:t.spacing(.5)}}),I={text:"test-title-text",input:"test-title-input",cancel:"test-title-cancel",save:"test-title-save",edit:"test-title-edit"};var x=e=>{let{name:t,onUpdateName:n,PrefixComponent:r,SuffixComponent:u,isEditable:E}=e,[x,P]=(0,C.useState)(!1),[g,_]=(0,C.useState)(t),O=(0,p.kP)(),R=null!=E?E:(0,i.J5)(O),N=(0,f.D)(),T=e=>{_(e)},h=async e=>{""===e.trim()?(N.error({message:A}),_(t)):Z.test(e)?(N.open({variant:S,message:v}),_(t)):(await n(e),P(!1),_(e))};return x?(0,a.jsxs)(a.Fragment,{children:[r&&r,(0,a.jsx)(c.II,{type:"text",value:g,onChange:e=>T(e.target.value),"data-testid":I.input}),u&&u,(0,a.jsx)(y,{onClick:()=>P(!1),color:"default","data-testid":I.cancel,children:(0,a.jsx)(l.Z,{})}),(0,a.jsx)(y,{onClick:()=>h(g),color:"default","data-testid":I.save,children:(0,a.jsx)(d.Z,{})})]}):(0,a.jsxs)(a.Fragment,{children:[r&&r,(0,a.jsx)(s.ZP,{...m,"data-testid":I.text,overflow:"hidden",children:t}),u&&u,R&&(0,a.jsx)(y,{onClick:()=>P(!0),color:"default","data-testid":I.edit,children:(0,a.jsx)(o.Z,{})})]})}},80483:function(e,t,n){"use strict";var a=n(64836);t.Z=void 0;var r=a(n(33651)),i=n(85893);t.Z=(0,r.default)((0,i.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")},87495:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ee}});var a=n(85893),r=n(11163),i=n.n(r),u=n(76258),c=n(15549),s=n(87792),l=n(79328),o=n(67294),d=n(58450),E=n(23410),p=n(42042),f=n(19738),C={AUDIENCE_PIXEL:"audience_pixel",PIXEL_CARD:"pixel_card",USERS_CARD:"users_card",USERS:{UPLOAD_USERS:"upload_users",UPLOAD_INFO:"Upload an identifier per line in .txt or .CSV"}},S=n(47108),v=n(13351),A=n(97365),Z=n(93692),m=n(40213);let{TYPE:{ERROR:y,INFO:I},GENERIC_ERROR:x}=u.default.SNACKBAR,{AUDIENCE_PIXEL:P}=C,g=[{value:"pixel_tag",label:"Pixel with Consent"},{value:"pixel_tag_eu",label:"Pixel without Consent"},{value:"beacon",label:"URL with Consent"},{value:"beacon_eu",label:"URL without Consent"}],{AUDIENCE_PIXEL:_}=C,O=[{name:_,type:f.FIELD_TYPES.CUSTOM,Component:()=>{let[e,t]=(0,o.useState)("pixel_tag"),{values:n}=(0,f.Gc)(),r=(0,p.D)(),i=(0,f.NA)(e,n),u=async()=>{try{await (0,S.Z)(i),r.open({variant:I,message:"Audience pixel has been copied"})}catch(e){r.open({variant:y,message:x})}};return(0,a.jsxs)(A.Z,{children:[(0,a.jsx)(A.Z,{display:"flex",alignItems:"center",pt:2,pb:2,children:(0,a.jsx)(v.Z,{row:!0,name:P,options:g,ariaLabel:"pixel-type-audience",onChange:e=>{t(e.target.value)},value:e})}),(0,a.jsx)(Z.II,{label:"Audience Pixel",disabled:!0,multiline:!0,fullWidth:!0,value:i}),(0,a.jsx)(m.Z,{sx:{marginTop:2},secondary:!0,onClick:u,children:"COPY"})]})},size:12}],{USERS:{UPLOAD_USERS:R,UPLOAD_INFO:N}}=C,T=[{name:R,type:f.FIELD_TYPES.UPLOAD_INPUT,description:N,text:"Upload",size:6,format:".csv"}],{PIXEL_CARD:h,USERS_CARD:U}=C,{PRIVATE_CONFIG_FORM:{CARD_PIXEL:D,CARD_USERS:w}}=l.T.AUDIENCE,L=[{type:f.FIELD_TYPES.CARD,name:U,label:w.LABEL,fields:T,infoDescription:w.INFO_DESCRIPTION,size:12,parser:{dependencies:[U],parse:(e,t)=>({...e,label:"".concat(w.LABEL,": ").concat((0,f.NA)("items",t)||0)})}}
1,{type:f.FIELD_TYPES.CARD,name:h,label:D.LABEL,description:D.DESCRIPTION,fields:O,size:12}],{SUCCESS_UPDATE:b}=l.T.AUDIENCE.PRIVATE_CONFIG_FORM.SNACKBARS,j=e=>(0,d.Z)(["id"],e);var k=e=>{let{audienceId:t}=e,n=(0,p.D)(),{data:r,mutate:i}=E.ZP.useAudience({id:t}),u=(0,o.useMemo)(()=>{if(r)return j(r)},[r]),c=async e=>{try{await E.ZP.update({id:t,...e}),i(),n.success({message:b})}catch(e){n.error({error:e})}};return r?(0,a.jsx)(f.ZP,{content:L,id:"private-audience-configuration-form",initialValues:u,onSubmit:c,submitOnlyUpdatedValues:!0,actionsToolbar:!0}):null},M=e=>{let{audienceId:t}=e;return(0,a.jsx)(k,{audienceId:t})},F=n(64842),B=n(19663),V=n(79440),Y=n(22257),z=n(68498),X=n(71105),G=n(10053);let{DELETE:H,EXPORT:K}=u.default.AUDIENCE.ACTIONS_HEADER,{SUCCESS_UPDATE:q,SUCCESS_REMOVE:W,SUCCESS_DOWNLOAD:$}=B.default.AUDIENCE.PRIVATE_CONFIG_FORM.SNACKBARS;var J=e=>{let{audienceId:t}=e,[n,r]=(0,o.useState)(!1),{data:l,mutate:d}=E.ZP.useAudience({id:t}),f=(0,p.D)();if(!l)return null;let C=[{text:u.default.RESOURCES.TITLE,href:c.default.RESOURCES.SECTION(u.default.RESOURCES.SECTIONS.AUDIENCES)},{text:u.default.RESOURCES.TABS_TITLE.AUDIENCES,href:c.default.RESOURCES.SECTION(u.default.RESOURCES.SECTIONS.AUDIENCES)},{text:"Private"},{text:(null==l?void 0:l.name)||""}],S=async()=>{try{E.ZP.download(l.id),f.success({message:$})}catch(e){f.error({error:e})}},v=async()=>{try{await E.ZP.remove(l.id),f.success({message:W}),i().push(c.default.RESOURCES.SECTION(u.default.RESOURCES.SECTIONS.AUDIENCES))}catch(e){f.error({error:e})}},A=async e=>{try{let t={id:l.id,name:e};await E.ZP.update(t),d(),f.success({message:q})}catch(e){f.error({error:e})}},Z=[{Component:X.c,propsComponent:{label:K,onClick:S,key:K}},{Component:X.c,propsComponent:{label:H,key:H,onClick:()=>{r(!0)}}}],m=[{Component:z.Z,propsComponent:{key:"dropdown",options:Z}}],y=(0,a.jsx)(Y.M,{onUpdateName:A,name:l.name,SuffixComponent:(0,a.jsx)(V.Z,{label:"Private",color:"secondary"})});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.NC,{title:y,breadcrumbs:C,actions:m,subtitle:"ID: ".concat(t)}),(0,a.jsx)(()=>(0,a.jsx)(G.Z,{title:B.default.AUDIENCE.ACTIONS.REMOVE_DIALOG_TITLE,onConfirm:v,onClose:()=>r(!1),open:n}),{})]})};let Q=e=>{let{audienceId:t}=e,{data:n,isLoading:r}=E.ZP.useAudience({id:t});return r?(0,a.jsx)(s.ZP,{children:(0,a.jsx)(F.Z,{})}):n?(0,a.jsxs)(s.ZP,{children:[(0,a.jsx)(J,{audienceId:t}),(0,a.jsx)(s.bU,{children:(0,a.jsx)(M,{audienceId:t})})]}):(i().push(c.default.RESOURCES.SECTION(u.default.RESOURCES.SECTIONS.AUDIENCES)),null)};Q.getInitialProps=async e=>{let{audience:t}=e.query||{},n=Array.isArray(t)?t[0]:t;return{audienceId:null!=n?n:""}};var ee=Q},23410:function(e,t,n){"use strict";n.d(t,{ZP:function(){return q}});var a={};n.r(a),n.d(a,{add:function(){return z},canAccessAudiences:function(){return M},download:function(){return w},get:function(){return h},getAudiencesSuscription:function(){return Y},list:function(){return U},listAll:function(){return D},mutateListAudiences:function(){return T},remove:function(){return L},removeMany:function(){return b},update:function(){return j},updateMany:function(){return k},useAudience:function(){return F},useListAudiences:function(){return B}});var r={};n.r(r),n.d(r,{isAdsquare:function(){return X.Z},isDigiseg:function(){return G.Z},isNavegg:function(){return H.Z},isThirdPartyAudience:function(){return K.Z}});var i=n(91039),u=n(69517);let c={config:u.s,url:"/audience"},s=async e=>i.ZP.multipart({...c,params:e}),l=async e=>{i.ZP.openUrl({url:"".concat("/audience","/").concat(e,"/download"),params:{id:e,download:!0}})};var o=n(95645);u.s;let d=async e=>i.ZP.del({url:"".concat("/audience","/").concat(e)}),E={url:"/v2/audiences"},p=async e=>i.ZP.del({...E,config:{data:{ids:e}}}),f={config:u.s,url:"/audience"},C=async e=>{let{id:t,...n}=e;return i.ZP.multipart({method:"put",url:"".concat(f.url,"/").concat(t),params:n})},S=async e=>i.ZP.put({url:"/v2/audiences",params:e}),v={config:u.s,url:"/audience"},A=async e=>i.ZP.get({...v,url:"".concat(v.url,"/").concat(e)});var Z=n(58570);let m={create:s,download:l,get:A,list:o.Z,listAll:Z.Z,remove:d,removeMany:p,update:C,updateMany:S};var y=n(79328),I=n(34530),x=n(72266),P=n(66310),g=n(93902);let _=["type[isnt]".concat(y.C.AUDIENCE.TYPES.TIME_BASED),"type[isnt]".concat(y.C.AUDIENCE.TYPES.DOOH)].join(","),O=e=>{let t=(0,g.Xf)(null==e?void 0:e.filter);return{...e,filter:t?"".concat(_,",").concat(t):_}},R=e=>(0,x.CA)(t=>t.url==="audience/".concat(e)),N=e=>
1e.forEach(e=>R(e)),T=()=>(0,x.CA)(e=>e.url.includes(o.i.url)),h=async e=>{let t=await m.get(e);return(0,g.LZ)(t)},U=async e=>{let t=await m.list(e);return(0,g.LZ)(t)},D=async e=>{let t=await m.listAll(e);return(0,g.LZ)(t)},w=async e=>m.download(e),L=async e=>{let t=await m.remove(e);return T(),(0,g.LZ)(t)},b=async e=>{let t=await m.removeMany(e);return N(e),T(),(0,g.LZ)(t)},j=async e=>{let t=await m.update(e);return R(e.id),T(),(0,g.LZ)(t)},k=async e=>{let t=await m.updateMany(e);return(0,g.LZ)(t)},M=e=>{var t;let n=null!==(t=null!=e?e:P.Z.getSession())&&void 0!==t?t:null;return(0,I.QO)({resource:"access_resources_audiences",session:n})},F=e=>(0,x.ZP)({url:"audience/".concat(e.id)}),B=e=>{let t=O(e),n=(0,g.rz)(t);return(0,x.ZP)({url:"/v2/audiences-all",params:n})},V=e=>({label:e.name,value:e.id}),Y=e=>({url:o.i.url,params:e,responseToOptions:e=>e.map(V)}),z=async e=>{let t=await m.create(e);return T(),(0,g.LZ)(t)};var X=n(2750),G=n(93929),H=n(67702),K=n(83755);n(12577);var q={...a,...r}},2750:function(e,t){"use strict";t.Z=e=>/adsquare/i.test(e.name)},93929:function(e,t){"use strict";t.Z=e=>/digiseg/i.test(e.name)},67702:function(e,t){"use strict";t.Z=e=>/navegg/i.test(e.name)},83755:function(e,t,n){"use strict";var a=n(38296);t.Z=e=>Object.values(a.third_party_data_providers).some(t=>RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i").test(e.name))},12577:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var a=n(72266),r=n(91039),i=n(69517);let u={config:i.s,url:"/sync-audience"},c=async e=>r.ZP.post({...u,params:e}),s={config:i.s,url:"/sync-audience"},l=async e=>{let{id:t,...n}=e;return r.ZP.put({...s,url:"".concat(s.url,"/").concat(t),params:n})},o={config:i.s,url:"/sync-audience"},d=async e=>r.ZP.del({...o,url:"".concat(o.url,"/").concat(e)});var E=n(95645),p=n(93902);let f=e=>(0,a.CA)(t=>t.url==="sync-audience/".concat(e)),C=()=>(0,a.CA)(e=>e.url.includes(E.i.url));var S={update:async e=>{let t=await l(e);return f(e.id),C(),(0,p.LZ)(t)},remove:async e=>{let t=await d(e);return C(),(0,p.LZ)(t)},add:async e=>{let t=await c(e);return C(),(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=92502)}),_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.