PageSourceSearch

https://app.branch.io/static/js/async/14360.27a3ff9013.js

js branch.io collected 2026-10-01 07:25:05 UTC 5,027 bytes, 4 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]="9a737d07-1d1e-5d08-b992-53f1d1648028")}catch(e){}}();
3(globalThis.rspackChunkcake_ui||=[]).push([[14360],{33963(e,a,s){var t=s(93248),n=s(25032),r=s(57058),l=s(60701),i=s(2779),c=s(75290);function d(e,a){return s=>{let{userPermissions:d,isPending:o,error:u}=(0,i.V)(),m=(0,c.r)();if(o)return(0,t.jsx)("div",{className:"flex h-screen w-full items-center justify-center",children:(0,t.jsx)(n.y,{size:"lg"})});if(u||!d||!a.evaluate(d)){let e=m.state.location.pathname,a=r.A5[e]||e;return(0,t.jsx)(l.D,{pageTitle:a})}return(0,t.jsx)(e,{...s})}}s.d(a,{x:()=>d})},875(e,a,s){s.r(a);var t=s(93248),n=s(76237),r=s(79024),l=s(88921),i=s(60117),c=s(6844),d=s(31553),o=s(85929),u=s(33963),m=s(57058),p=s(28403),x=s(57543),h=s(24241),g=s(79882),_=s(35086),v=s(72634),j=s(13164),f=s(6714),N=s(70260),T=s(2779),A=s(4023),S=s(10510),L=s(1773),E=s(75610),I=s(22372),R=s(52879),C=s(33212),D=s(98173),y=s(19594),P=s(59499),M=s(8380),w=s(89588),b=s(94127),k=s(18594);function U(){let{t:e}=(0,w.Bd)("partners"),{isEnabled:a,isProvisioned:s}=(0,E.g_)(),u=(0,I.Z)(),{page:U}=k.q.useSearch();(0,N.l)(o.q$,a(o.Gv.CHRYSALIS_AD_PARTNERS));let{userPermissions:G}=(0,T.V)(),K=s(o.Gv.LINK_HUB_AD_LINK_TEMPLATES)&&a(o.Gv.CHRYSALIS_ROLLOUT_AD_LINK_TEMPLATES)&&null!=G&&m.Lv.AD_LINK_TEMPLATES.evaluate(G),[O,$]=(0,M.useState)(""),[q]=(0,b.Q3)(O,300),[H,Y]=(0,M.useState)(!1),[z,B]=(0,M.useState)(!1),[F,V]=(0,M.useState)(null),{data:J,isLoading:Q,isError:Z}=(0,j.T)({queryData:{query:{pagination_page:U??1,pagination_size:24,search_string:q||void 0,enabled:!!H||void 0,custom:void 0}}}),{data:W,isPending:X}=(0,f.f)(),ee=W?.limit??0,ea=W?.count??0,es=a([o.Gv.CUSTOM_AD_PARTNERS_LIMITED,o.Gv.CUSTOM_AD_PARTNERS_UNLIMITED],{current:ea}),et=s([o.Gv.CUSTOM_AD_PARTNERS_LIMITED,o.Gv.CUSTOM_AD_PARTNERS_UNLIMITED]),en=(0,M.useMemo)(()=>-1===ee?`${ea}`:`${ea}/${ee}`,[ea,ee]),er=J?.data??[],el=J?.meta?.total??0,ei=(0,M.useRef)(null);(0,M.useEffect)(()=>{let e=q.trim();e&&ei.current!==e&&(ei.current=e,(0,L.A)(S.qd.AD_PARTNER_SEARCH,{search_text:e}))},[q]);let{createCustomPartner:ec,isCreating:ed}=(0,v.f)({onSuccess:e=>{B(!1),u({to:"/integrations/ad-partners/$partner",params:{partner:e.machine_name}})}});return(0,t.jsxs)("div",{children:[(0,t.jsx)(_.w,{}),(0,t.jsxs)("div",{className:"flex lg:items-center justify-between flex-col-reverse lg:flex-row",children:[(0,t.jsxs)("span",{className:"flex gap-3 mb-6",children:[(0,t.jsx)(l.p,{icon:R.default,type:"search",placeholder:e("Search partners"),className:"flex-1 min-w-64 xl:w-md",value:O,onChange:e=>{$(e.target.value),u({to:".",search:e=>({...e,page:void 0}),replace:!0})},maxLength:100}
3),(0,t.jsx)(i.Toggle,{pressed:H,onPressedChange:()=>{Y(e=>!e),u({to:".",search:e=>({...e,page:void 0}),replace:!0})},variant:"outline",className:(0,c.cn)({"ml-auto":!K}),children:e("My partners")})]}),(0,t.jsxs)("span",{className:"flex gap-3 mb-6",children:[K&&(0,t.jsxs)(n.$,{variant:"link",onClick:()=>{(0,L.A)(S.qd.AD_LINK_TEMPLATES_LINK_CLICKED),u({to:"/integrations/ad-partners/ad-link-templates"})},children:[(0,t.jsx)(C.default,{className:"h-4 w-4"}),e("Ad link templates")]}),(0,t.jsxs)(r.ms,{children:[(0,t.jsx)(r.uu,{asChild:!0,children:(0,t.jsxs)(n.$,{variant:"primary",className:"flex items-center gap-1",children:[e("Create new"),(0,t.jsx)(D.default,{className:"h-4 w-4"})]})}),(0,t.jsx)(r.pm,{align:"end",children:(0,t.jsxs)(r.tJ,{onClick:()=>B(!0),provisioned:!X&&es,provisioningTooltip:et?e("You have reached the maximum number of custom ad partners for your plan."):void 0,children:[(0,t.jsx)(y.default,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:e("Custom partner")}),et&&0!==ee&&(0,t.jsxs)("span",{className:"ml-auto text-muted-foreground text-xs pl-4",children:["(",en,")"]})]})})]})]})]}),!Z&&(0,t.jsx)(p.j,{}),(0,t.jsx)(g.Y,{isOpen:z,onClose:()=>B(!1),onSubmit:async e=>{await ec({body:{publisher_name:e}})},isLoading:ed,access:d.v.EDIT}),Q&&(0,t.jsx)("div",{className:"flex justify-center items-center py-12",children:(0,t.jsx)(P.default,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),Z&&(0,t.jsx)("div",{className:"text-center py-12 text-destructive",children:e("Failed to load partners. Please try again.")}),!Q&&!Z&&(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:er.map(e=>(0,t.jsx)(h.f,{partner:e,onLimitReached:V},e.machine_name))}),!Q&&!Z&&0===er.length&&(0,t.jsx)("div",{className:"text-center py-12 text-muted-foreground",children:e(H?"No enabled partners found.":"No partners found.")}),!Q&&!Z&&el>24&&(0,t.jsx)(A.d,{totalItems:el,pageSize:24,className:"mt-6 mb-3"}),(0,t.jsx)(x.F,{partnerName:F,onClose:()=>V(null)})]})}let G=(0,u.x)(U,m.Lv.AD_PARTNERS);s.d(a,{IntegrationsListPage:()=>U},{component:G})}}]);
4//# debugId=9a737d07-1d1e-5d08-b992-53f1d1648028

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.