PageSourceSearch

https://app.branch.io/static/js/async/16347.162c265b39.js

js branch.io collected 2026-09-24 06:55:30 UTC 43,539 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]="1c89c12f-a0cf-5801-acaf-2f7bb4b85eb2")}catch(e){}}();
3(globalThis.rspackChunkcake_ui||=[]).push([[16347],{33963(e,s,a){var i=a(93248),l=a(25032),t=a(57058),r=a(60701),d=a(2779),n=a(75290);function o(e,s){return a=>{let{userPermissions:o,isPending:c,error:h}=(0,d.V)(),p=(0,n.r)();if(c)return(0,i.jsx)("div",{className:"flex h-screen w-full items-center justify-center",children:(0,i.jsx)(l.y,{size:"lg"})});if(h||!o||!s.evaluate(o)){let e=p.state.location.pathname,s=t.A5[e]||e;return(0,i.jsx)(r.D,{pageTitle:s})}return(0,i.jsx)(e,{...a})}}a.d(s,{x:()=>o})},86408(e,s,a){var i=a(93248),l=a(6844);let t=(0,a(8380).forwardRef)(function(e,s){let{children:a,sticky:t=!1}=e;return(0,i.jsx)("div",{ref:s,className:(0,l.cn)("right-0 bg-background -mt-14 flex justify-end",t?"sticky top-2 z-30 w-fit ml-auto mb-0":"absolute top-0"),"data-component":"floating-form-header",children:a})});a.d(s,{},{M:t})},2199(e,s,a){var i=a(8380);let l=(0,i.createContext)({});a.d(s,{},{a:()=>(0,i.useContext)(l),z:l})},11606(e,s,a){a.r(s),a.d(s,{component:()=>et});var i=a(93248),l=a(71284),t=a(76237),r=a(85929),d=a(33963),n=a(57058),o=a(86408),c=a(28437),h=a(81303),p=a(36758),m=a(94238),u=a(48290),x=a(71112),v=a(94319),g=a(86680),f=a(6964),j=a(11415);let b="www.amazon.com",w=`https://${b}/dp/`,y=["apps.apple.com","itunes.apple.com"];function A(e){let s=e.startsWith("id")?e:`id${e}`;return`https://apps.apple.com/app/${s}`}let F="play.google.com",U="/store/apps/details",k=`https://${F}${U}`;var N=a(75610),C=a(76150),I=a(89588),S=a(40058);let L=u.Z6.shape.iosTeamId,R=u.Z6.shape.iosBundleId,D=u.Z6.extend({androidUrlFormatted:S.YjP().url().or(S.euz("")).optional(),iosUrlFormatted:S.YjP().url().or(S.euz("")).optional(),fireUrlFormatted:S.YjP().url().or(S.euz("")).optional(),isCustomDesktopRedirect:S.zMY().optional(),sha256CertFingerprints:S.bzn(),iosAdditionalBundleIds:S.bzn(),iosBundleId:S.bzn(),iosTeamId:S.YjP().optional(),iosAdditionalBundleIdsForm:S.YOg(S.Ikc({id:S.YjP(),value:S.YjP().optional()})).optional(),sha256CertFingerprintsForm:S.YOg(S.Ikc({id:S.YjP(),value:u.P1})).optional()}),B=D.superRefine((e,s)=>{if(e.isCustomDesktopRedirect&&!e.defaultDesktopUrl&&s.addIssue({code:S.eqx.custom,message:"Desktop URL is required when Custom URL option is selected",path:["defaultDesktopUrl"]}),e.universalLinkingEnabled){if(e.iosTeamId&&""!==e.iosTeamId.trim()){let a=u.Z6.shape.iosTeamId.safeParse(e.iosTeamId);if(!a.success)for(let e of a.error.issues)s.addIssue({...e,path:["iosTeamId"]})}else s.addIssue({code:S.eqx.custom,message:"Apple App Prefix is required when Universal Links is enabled",path:["iosTeamId"]});if(e.iosAdditionalBundleIdsForm)for(let a=0;a<e.iosAdditionalBundleIdsForm.length;a++){let i=e.iosAdditionalBundleIdsForm[a];if(i?.value&&""!==i.value.trim()){let e=u.Z6.shape.iosBundleId.safeParse(i.value);if(!e.success)for(let i of e.error.issues)s.addIssue({...i,path:["iosAdditionalBundleIdsForm",a,"value"]})}}}}),M=(0,C.X)({defaultValues:{webUrl:void 0,redirectDomainsWhitelist:void 0,androidUriScheme:void 0,androidUrl:void 0,androidUrlFormatted:void 0,androidAppLinksEnabled:void 0,androidPackageName:void 0,sha256CertFingerprints:void 0,sha256CertFingerprintsForm:void 0,iosUrl:void 0,iosUrlFormatted:void 0,iosAppStoreId:void 0,universalLinkingEnabled:void 0,iosBundleId:void 0,iosAdditionalBundleIds:void 0,iosAdditionalBundleIdsForm:void 0,iosTeamId:void 0,iosUriScheme:void 0,deepviewConfigs:void 0,reservedAnalyticsToUtm:void 0,autoFetch:void 0,uriRedirectMode:void 0,matchType:void 0,clientLatd:void 0,defaultDesktopUrl:void 0,isCustomDesktopRedirect:void 0,macUriScheme:void 0,macStoreUrl:void 0,windowsUriScheme:void 0,windowsStoreUrl:void 0,windowsPackageFamilyName:void 0,fireUrl:void 0,fireUrlFormatted:void 0,ipadUrl:void 0,androidTabletUrl:void 0,wechatUrl:void 0}});var T=a(8380),P=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e,children:[(0,i.jsxs)("g",{clipPath:"url(#amazon_svg__a)",children:[(0,i.jsx)("path",{fill:"#F90",d:"M20.66 19.377C10.947 24 4.917 20.132 1.058 17.782c-.239-.148-.645.035-.293.44 1.286 1.558 5.5 5.316 11 5.316 5.505 0 8.779-3.003 9.189-3.527.406-.52.119-.806-.292-.634m2.73-1.507c-.262-.34-1.587-.403-2.421-.3-.836.099-2.09.61-1.98.916.055.115.17.063.743.011.576-.057 2.188-.26 2.524.179.338.442-.514 2.549-.67 2.888-.15.34.058.428.34.201.279-.226.783-.812 1.12-1.64.337-.834.542-1.997.343-2.255"}),(0,i.jsx)("path",{fill:"#000",fillRule:"evenodd",d:"M14.129 9.942c0 1.213.03 2.225-.583 3.302-.495.876-1.279 1.415-2.155 1.415-1.195 0-1.892-.911-1.892-2.256 0-2.654 2.378-3.136 4.63-3.136zm3.14 7.59a.65.65 0 0 1-.736.075c-1.034-.859-1.218-1.258-1.787-2.076-1.708 1.743-2.917 2.264-5.133 2.264-2.619 0-4.66-1.616-4.66-4.853 0-2.527 1.371-4.248 3.32-5.09 1.69-.744 4.051-.875 5.856-1.08v-.404c0-.74.056-1.616-.377-2.255-.381-.574-1.108-.81-1.748-.81-1.186 0-2.246.608-2.505 1.87-.052.28-.258.556-.538.569l-3.022-.324c-.254-.057-.535-.263-.465-.653C6.
3171 1.104 9.477 0 12.438 0c1.515 0 3.495.403 4.69 1.55C18.645 2.965 18.5 4.853 18.5 6.907v4.853c0 1.458.604 2.097 1.173 2.886.202.28.246.617-.008.827-.636.53-1.766 1.516-2.387 2.068z",clipRule:"evenodd"}),(0,i.jsx)("path",{fill:"#F90",d:"M20.66 19.377C10.947 24 4.917 20.132 1.058 17.782c-.239-.148-.645.035-.293.44 1.286 1.558 5.5 5.316 11 5.316 5.505 0 8.779-3.003 9.189-3.527.406-.52.119-.806-.292-.634m2.73-1.507c-.262-.34-1.587-.403-2.421-.3-.836.099-2.09.61-1.98.916.055.115.17.063.743.011.576-.057 2.188-.26 2.524.179.338.442-.514 2.549-.67 2.888-.15.34.058.428.34.201.279-.226.783-.812 1.12-1.64.337-.834.542-1.997.343-2.255"}),(0,i.jsx)("path",{fill:"#000",fillRule:"evenodd",d:"M14.129 9.942c0 1.213.03 2.225-.583 3.302-.495.876-1.279 1.415-2.155 1.415-1.195 0-1.892-.911-1.892-2.256 0-2.654 2.378-3.136 4.63-3.136zm3.14 7.59a.65.65 0 0 1-.736.075c-1.034-.859-1.218-1.258-1.787-2.076-1.708 1.743-2.917 2.264-5.133 2.264-2.619 0-4.66-1.616-4.66-4.853 0-2.527 1.371-4.248 3.32-5.09 1.69-.744 4.051-.875 5.856-1.08v-.404c0-.74.056-1.616-.377-2.255-.381-.574-1.108-.81-1.748-.81-1.186 0-2.246.608-2.505 1.87-.052.28-.258.556-.538.569l-3.022-.324c-.254-.057-.535-.263-.465-.653C6.171 1.104 9.477 0 12.438 0c1.515 0 3.495.403 4.69 1.55C18.645 2.965 18.5 4.853 18.5 6.907v4.853c0 1.458.604 2.097 1.173 2.886.202.28.246.617-.008.827-.636.53-1.766 1.516-2.387 2.068z",clipRule:"evenodd"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"amazon_svg__a",children:(0,i.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),_=e=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:36,height:36,fill:"none",viewBox:"0 0 36 36",...e,children:(0,i.jsx)("path",{fill:"#3DDC84",d:"M36 27.687H0c.576-6.102 4.064-11.314 9.214-14.105L6.227 8.41a.603.603 0 0 1 .22-.827.603.603 0 0 1 .827.22l3.025 5.24C12.607 11.987 15.206 11.4 18 11.4s5.393.587 7.7 1.642l3.026-5.24a.6.6 0 0 1 .823-.22.607.607 0 0 1 .22.827l-2.986 5.173c5.153 2.79 8.64 8.003 9.217 14.105m-9.739-5.056a1.51 1.51 0 1 0-.001-3.016 1.51 1.51 0 0 0 .001 3.016m-16.526 0a1.51 1.51 0 1 0-.001-3.016 1.51 1.51 0 0 0 0 3.016"})}),E=a(46881),z=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e,children:[(0,i.jsx)("path",{fill:"#51C332",d:"M16.5 7.516c.454 0 .898.038 1.336.092C17.045 4.13 13.392 1.5 9 1.5c-4.971 0-9 3.367-9 7.52 0 2.394 1.347 4.518 3.437 5.893l-1.187 2.38 3.232-1.389c.693.247 1.414.45 2.183.545a6.3 6.3 0 0 1-.165-1.413c0-4.146 4.036-7.52 9-7.52M12 4.884c.621 0 1.125.505 1.125 1.128S12.621 7.14 12 7.14a1.126 1.126 0 0 1-1.125-1.128c0-.623.504-1.128 1.125-1.128M6 7.14a1.126 1.126 0 0 1-1.125-1.128c0-.623.504-1.128 1.125-1.128s1.125.505 1.125 1.128S6.621 7.14 6 7.14"}),(0,i.jsx)("path",{fill:"#51C332",d:"M24 15.036c0-3.322-3.359-6.016-7.5-6.016-4.142 0-7.5 2.694-7.5 6.016s3.358 6.016 7.5 6.016a9 9 0 0 0 1.957-.232l4.043 1.736-1.398-2.801C22.854 18.653 24 16.96 24 15.036m-9.75-.376a1.127 1.127 0 0 1-1.125-1.128c0-.623.504-1.128 1.125-1.128s1.125.505 1.125 1.128-.504 1.128-1.125 1.128m4.5 0a1.126 1.126 0 0 1-1.125-1.128 1.126 1.126 0 1 1 2.25 0c0 .623-.504 1.128-1.125 1.128"})]});let V=(0,p.Jb)({...M,props:{customMessage:""},render:e=>{let{form:s,customMessage:a}=e,{t:l}=(0,I.Bd)();return(0,i.jsx)(s.AppField,{name:"androidPackageName",children:e=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground space-y-2",children:[(0,i.jsxs)("div",{children:[l("If blank, users will be redirected to your current Android default setting: ")," ",(0,i.jsx)("span",{className:"font-semibold",children:e.state.value})]}),(0,i.jsx)("div",{children:l(a)})]})})}}),W=(0,p.Jb)({...M,props:{access:{},isLoading:!1},render:e=>{let{form:s,access:a,isLoading:l}=e,{t}=(0,I.Bd)();return(0,i.jsxs)(h.Zp,{children:[(0,i.jsx)(h.aR,{children:(0,i.jsx)(h.ZB,{children:t("Advanced Mobile Redirects")})}),(0,i.jsxs)("div",{className:"space-y-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(P,{className:"w-5 h-5"}),(0,i.jsx)("div",{className:"text-sm",children:t("Amazon Fire Redirects")})]}),(0,i.jsx)(s.AppField,{name:"fireUrlFormatted",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.fireUrlFormatted},children:e=>(0,i.jsx)(e.InputField,{label:t("Optional Amazon Fire URL"),className:"w-96 mb-2",placeholder:"https://www.amazon.com/dp/B12390123",disabled:l,access:a,loading:!1,onChange:a=>{let i=a.target.value;e.handleChange(i);let l=function(e){try{let s=new URL(e);if(s.hostname!==b)return null;
3let a=s.pathname.split("/").filter(Boolean),i=a.indexOf("dp");if(-1!==i&&i<a.length-1)return a[i+1]||null}catch{}return null}(i);l?s.setFieldValue("fireUrl",l):s.setFieldValue("fireUrl",i)}})}),(0,i.jsx)(V,{form:s,customMessage:t("If you have a different package for the Amazon Store than the Play Store on Fire devices, please specify the Amazon Fire URL here using the p=package parameter.")}),(0,i.jsx)(m.w,{}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(E.A,{className:"w-5 h-5"}),(0,i.jsx)("div",{className:"text-sm",children:t("iPad Redirects")})]}),(0,i.jsx)(s.AppField,{name:"ipadUrl",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.ipadUrl},children:e=>(0,i.jsx)(e.InputField,{label:t("Optional iPad URL"),className:"w-96 mb-2",placeholder:"https://apps.apple.com/app/id123456789",disabled:l,access:a,loading:!1})}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:t("If you have a different App Store ID for your iPad app or would prefer to fallback to a different URL on iPad tablets, please specify either URL here.")}),(0,i.jsx)(m.w,{}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(_,{className:"w-5 h-5"}),(0,i.jsx)("div",{className:"text-sm",children:t("Android Tablet Redirects")})]}),(0,i.jsx)(s.AppField,{name:"androidTabletUrl",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.androidTabletUrl},children:e=>(0,i.jsx)(e.InputField,{label:t("Optional Android Tablet URL"),className:"w-96 mb-2",placeholder:"https://play.google.com/store/apps/details?id=com.company.app",disabled:l,access:a,loading:!1})}),(0,i.jsx)(V,{form:s,customMessage:t("If you have a different Play Store package for your tablet apps or would prefer to fallback to a different URL on Android tablets, please specify either URL here.")}),(0,i.jsx)(m.w,{}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(z,{className:"w-5 h-5"}),(0,i.jsx)("div",{className:"text-sm",children:t("WeChat Redirects")})]}),(0,i.jsx)(s.AppField,{name:"wechatUrl",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.wechatUrl},children:e=>(0,i.jsx)(e.InputField,{label:t("Optional WeChat URL"),className:"w-96 mb-2",placeholder:"https://example.com",disabled:l,access:a,loading:!1})}),(0,i.jsx)(s.AppField,{name:"webUrl",children:e=>(0,i.jsxs)("div",{className:"text-xs text-muted-foreground space-y-2",children:[(0,i.jsxs)("div",{children:[t("If blank, users will be redirected to the Default URL: "),e.state.value?(0,i.jsx)("a",{href:e.state.value,target:"_blank",rel:"noopener noreferrer",className:"underline",children:e.state.value}):(0,i.jsx)("span",{className:"italic",children:t("No default URL set")})]}),(0,i.jsx)("div",{children:t("WeChat does not support deep linking out of the app on iOS or Android. If you choose to fallback to a custom URL, you can enter it here.")})]})})]})]})}}),q=(0,p.Jb)({...M,props:{access:{},isLoading:!1},render:e=>{let{form:s,access:a,isLoading:l}=e,{t}=(0,I.Bd)();return(0,i.jsxs)(h.Zp,{children:[(0,i.jsxs)(h.aR,{children:[(0,i.jsx)(h.ZB,{children:t("Advanced Settings")}),(0,i.jsx)(h.BT,{children:t("These settings apply to both web and app links.")})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(s.AppField,{name:"uriRedirectMode",validators:{onChange:B.shape.uriRedirectMode},children:e=>(0,i.jsx)(e.SelectField,{className:"w-48",placeholder:t("Select"),disabled:l,access:a,value:e.state.value?.toString(),label:"URI Scheme Deep Link Mode",options:{0:t("Conservative"),1:t("Intelligent"),2:t("Aggressive")}})}),(0,i.jsxs)("div",{className:"description space-y-4",children:[(0,i.jsx)("div",{children:t("Recommended: Intelligent.")}),(0,i.jsxs)("div",{children:[t("This selector allows you to control how and when Branch uses URI schemes to open your app when Universal Links and Android App Links fail. See browser specifics in the docs")," ",(0,i.jsx)("a",{href:"https://help.branch.io/marketer-hub/docs/marketer-deep-link-reference#how-branch-links-work",target:"_blank",rel:"noopener noreferrer",className:"underline",children:t("here")}),"."]}),(0,i.jsxs)("div",{className:"space-y-1",children:[(0,i.jsx)("div",{children:t("+ Conservative mode will never use URI schemes if there is a risk of error messages.")}),(0,i.jsx)("div",{children:t("+ Intelligent mode is recommended, and uses Branch data to safely use URI schemes everywhere, with the slight risk of error messages in certain browsers if the app is uninstalled.")}),(0,i.jsx)("div",{children:t("+ Aggressive will force URI schemes everywhere, causing users without the app to see error messages in some browsers.")})]})]})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(s.AppField,{name:"matchType",validators:{onChange:B.shape.matchType},children:e=>(0,i.jsx)(e.SelectField,{className:"w-48",placeholder:t("Select"),disabled:l,access:a,value:e.state.value?.toString(),label:"Match Type",options:{0:t("Normal"),1:t("Unique")}})}),(0,i.jsxs)("div",{className:"description space-y-2",children:[(0,i.jsx)("div",{children:t("Recommended: Normal.")}),(0,i.jsx)("div",{children:t("Selecting Unique means that Branch will only make a deep link through install match if there is a single, unique outstanding footprint. For example, if you and your twin both have iPhone 5s with the same OS/version, etc and click different links for the same app, then open the app up at the same time, we won't deep link when Unique is selected. You probably don't want this as it's mostly for very special circumstances.")})]})]}),(0,i.jsx)(s.AppField,{name:"reservedAnalyticsToUtm",validators:{onChange:B.shape.reservedAnalyticsToUtm},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.CheckboxField,{label:t("Analytics mapping with UTM"),disabled:l,access:a,checked:e.state.value??!1}),(0,i.jsx)("div",{className:"description",children:t("When redirecting to a web URL, Branch automatically passes through any values from the following Branch link analytics tags as UTM parameters [~campaign -> utm_campaign, ~channel -> utm_source, ~feature -> utm_medium]. If these UTM parameters are already detected on the URLs being redirected to, Branch will not overwrite them.")})]})}),(0,i.jsx)(s.AppField,{name:"autoFetch",validators:{onChange:B.shape.autoFetch},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.CheckboxField,{label:t("Enable link scraping"),disabled:l,access:a,checked:e.state.value??!1}),(0,i.jsx)("div",{className:"description",children:t("Dynamic links will scrape from appended query parameters like $original_url, $fallback_url, and $desktop_url for meta tags")})]})}),(0,i.jsx)(s.AppField,{name:"clientLatd",validators:{onChange:B.shape.clientLatd},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.CheckboxField,{label:t("Retrieve Last Attributed Touch Data via SDKs"),disabled:l,access:a,checked:e.state.value??!1}),(0,i.jsx)("div",{className:"description",children:t("Allows the app to fetch link data through the SDK rather than persisting it locally.")})]})})]})}});var $=a(80641),O=e=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{stroke:"#27272A",strokeLinecap:"round",strokeLinejoin:"round",d:"m9 17 6.1-6.1a2 2 0 0 1 2.81.01L22 15m0 0V5a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2M8 21h8m-4-4v4M10 9a2 2 0 1 1-4 0 2 2 
30 0 1 4 0"})}),Z=e=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e,children:[(0,i.jsxs)("g",{clipPath:"url(#windows_svg__a)",children:[(0,i.jsx)("path",{fill:"#F15022",d:"M11.533 0H0v11.533h11.533z"}),(0,i.jsx)("path",{fill:"#02A4EF",d:"M11.533 12.468H0V24h11.533z"}),(0,i.jsx)("path",{fill:"#7FBA02",d:"M24 0H12.468v11.533H24z"}),(0,i.jsx)("path",{fill:"#FFB902",d:"M24 12.468H12.468V24H24z"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"windows_svg__a",children:(0,i.jsx)("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]});let Y=S.YjP().min(1,"Desktop URL is required when Custom URL option is selected"),H=(0,p.Jb)({...M,props:{access:{},isLoading:!1},render:e=>{let{form:s,access:a,isLoading:l}=e,{t}=(0,I.Bd)(),r=(0,T.useRef)(null),d=(0,j.k)(),{data:n}=(0,v.z)(),o=n?.id||"",{data:c,error:p}=function(e){let{appId:s,...a}=e,{deepviews:i}=(0,$.fI)();return i.getDefaultDesktopDeepview.useQuery({queryKey:[...g.DA5,s],...a,select:e=>e.body})}({appId:o,enabled:!!o});(0,T.useEffect)(()=>{p&&"status"in p&&404===p.status&&d({title:t("Failed to load preview"),variant:"destructive"})},[p,d,t]);let u=(0,T.useCallback)(()=>{let e=r.current;if(!e)return;let s=e.contentDocument||e.contentWindow?.document;if(!s)return;let a=()=>{let a=s.querySelector(".frame-container");if(a){let s=a.getBoundingClientRect();e.style.height=`${Math.ceil(s.height)+100}px`,e.style.width=`${Math.ceil(s.width)+100}px`,e.style.maxWidth="100%"}else e.style.height="580px",e.style.width="740px";s.body&&(s.body.style.overflow="hidden",s.documentElement.style.overflow="hidden")},i=Array.from(s.querySelectorAll("img"));i.length>0?Promise.all(i.map(e=>new Promise(s=>{e.complete?s(null):(e.addEventListener("load",()=>s(null)),e.addEventListener("error",()=>s(null)))}))).then(()=>{requestAnimationFrame(()=>{setTimeout(a,50)})}):requestAnimationFrame(()=>{setTimeout(a,50)})},[]);return(0,i.jsxs)(h.Zp,{id:"desktop-redirects",className:"target:ring-2 target:ring-primary target:ring-offset-2",children:[(0,i.jsx)(h.aR,{children:(0,i.jsx)(h.ZB,{className:"",children:t("Desktop Redirects")})}),(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(O,{className:"w-5 h-5"}),(0,i.jsx)("div",{className:"text-sm",children:t("Default Desktop")})]}),(0,i.jsx)(s.AppField,{name:"isCustomDesktopRedirect",children:e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex items-center gap-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("input",{type:"radio",name:"desktopRedirectType",value:"branch-qr",className:"w-4 h-4",id:"desktop-redirect-qr",checked:!e.state.value,onChange:()=>e.handleChange(!1)}),(0,i.jsx)("label",{className:"text-sm",htmlFor:"desktop-redirect-qr",children:t("Branch-Hosted QR Code Landing Page")})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("input",{type:"radio",name:"desktopRedirectType",value:"custom",className:"w-4 h-4",id:"desktop-redirect-custom",checked:e.state.value??!1,onChange:()=>{e.handleChange(!0),s.validateField("defaultDesktopUrl","blur")}}),(0,i.jsx)("label",{className:"text-sm",htmlFor:"desktop-redirect-custom",children:t("Custom Landing Page")})]})]}),!e.state.value&&c?.template&&(0,i.jsx)("div",{className:"mt-4",children:(0,i.jsx)("iframe",{ref:r,title:t("Branch QR Code Landing Page Preview"),className:"border-0",sandbox:"allow-same-origin",srcDoc:c.template,onLoad:u,style:{height:"580px",width:"740px",maxWidth:"100%"}})}),e.state.value&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.AppField,{name:"defaultDesktopUrl",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.defaultDesktopUrl,onBlur:Y},children:e=>(0,i.jsx)(e.InputField,{className:"w-96",placeholder:"https://example.com",disabled:l,access:a,loading:!1,label:"Desktop URL"})}),(0,i.jsxs)("div",{className:"text-xs text-muted-foreground",children:[t("Check out our")," ",(0,i.jsx)("a",{href:"https://help.branch.io/developer-hub/docs/web-sdk-overview",className:"underline",target:"_blank",rel:"noopener noreferrer",children:t("web SDK")})," ",t("to build an SMS-phone feature")]})]})]})})]}),(0,i.jsx)(m.w,{}),(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,i.jsx)(E.A,{className:"w-5 h-5"}),(0,i.jsx)("div",{className:"text-sm",children:t("Mac Desktop")})]}),(0,i.jsx)(s.AppField,{name:"macUriScheme",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.macUriScheme},children:e=>(0,i.jsx)(e.InputField,{className:"w-96",placeholder:"branchsters://",disabled:l,access:a,loading:!1,label:"Mac URI Scheme"})}),(0,i.jsx)(s.AppField,{name:"macStoreUrl",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.macStoreUrl},children:e=>(0,i.jsx)(e.InputField,{className:"w-96",placeholder:"https://branch.io/",disabled:l,access:a,loading:!1,label:"Mac App Store URL"})})]}),(0,i.jsx)(m.w,{}),(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,i.jsx)(Z,{className:"w-5 h-5"}),(0,i.jsx)("div",{className:"text-sm",children:t("Windows Desktop")})]}),(0,i.jsx)(s.AppField,{name:"windowsUriScheme",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.windowsUriScheme},children:e=>(0,i.jsx)(e.InputField,{className:"w-96",placeholder:"branchsters://",disabled:l,access:a,loading:!1,label:"Windows URI Scheme"})}),(0,i.jsx)(s.AppField,{name:"windowsStoreUrl",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.windowsStoreUrl},children:e=>(0,i.jsx)(e.InputField,{className:"w-96",placeholder:"https://branch.io/",disabled:l,access:a,loading:!1,label:"Windows Store URL"})}),(0,i.jsx)(s.AppField,{name:"windowsPackageFamilyName",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.windowsPackageFamilyName},children:e=>(0,i.jsx)(e.InputField,{className:"w-96",placeholder:"branchsters",disabled:l,access:a,loading:!1,label:"Windows Package Family Name"})})]})]})}});var K=a(52756),G=a(71436);let J=(0,p.Jb)({...M,props:{access:{},isLoading:!1},render:e=>{let{form:s,access:a,isLoading:l}=e,{t:r}=(0,I.Bd)();return(0,i.jsxs)("div",{className:"space-y-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(_,{className:"w-6 h-6"}),(0,i.jsx)("h3",{className:"text-sm font-normal",children:r("Android")})]}),(0,i.jsx)(s.AppField,{name:"androidUriScheme",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.androidUriScheme},children:e=>(0,i.jsxs)("div",{className:"space-y-2",id:"android-uri-scheme",children:[(0,i.jsx)(e.InputField,{label:r("Android URI Scheme"),className:"w-96",placeholder:"yourapp://",disabled:l,loading:!1,access:a}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:r("Where to send your user if they have the app.")})]})}),(0,i.jsx)(s.AppField,{name:"androidUrlFormatted",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.androidUrlFormatted},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.InputField,{label:r("Android URL"),className:"w-96",placeholder:"https://play.google.com/store/apps/details?id=com.company.app",disabled:l,access:a,loading:!1,onChange:a=>{let i=a.target.value;e.handleChange(i);let l=function(e){try{let s=new URL(e);if(s.hostname===F&&s.pathname===U)return s.searchParams.get("id")}catch{}return null}(i);l?(s.setFieldValue("androidUrl",l),s.setFieldValue("androidPackageName",l)):s.setFieldValue("androidUrl",i)}}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:r("Where to send users that do not have the app. It c
3an be the Play Store or a custom link.")})]})}),(0,i.jsx)(s.AppField,{name:"androidPackageName",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.androidPackageName},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.InputField,{label:r("Android Package Name"),className:"w-96",placeholder:"com.company.appname",disabled:l,access:a,loading:!1}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:r("Your app's package name from the Play Store.")})]})}),(0,i.jsx)(s.AppField,{name:"androidAppLinksEnabled",validators:{onChange:e=>{let{value:a}=e;if(!a)return void s.validateField("sha256CertFingerprintsForm","change");let i=s.getFieldValue("sha256CertFingerprintsForm");i&&0!==i.length||s.setFieldValue("sha256CertFingerprintsForm",[{id:crypto.randomUUID(),value:""}]),s.validateField("sha256CertFingerprintsForm","change")}},children:e=>(0,i.jsxs)("div",{className:"space-y-6 target:ring-2 target:ring-primary target:ring-offset-4 target:rounded-sm",id:"android-app-links",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.CheckboxField,{label:r("Enable App Links"),disabled:l,access:a,checked:e.state.value??!1}),(0,i.jsx)("div",{className:"description",children:r("App Links will open URLs directly into an app, rather than the usual Link -> Browser -> App handoff cycle. This requires some setup, but we do this for you. We need your sha256_cert_fingerprints.")})]}),e.state.value&&(0,i.jsx)(s.AppField,{name:"sha256CertFingerprintsForm",validators:{onChange:s=>{let{value:a}=s;if(e.state.value&&!a?.some(e=>e.value&&""!==e.value.trim()))return r("At least one SHA256 fingerprint is required when App Links is enabled")}},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("div",{className:"text-xs",children:r("SHA256 Certificate Fingerprints")}),(0,i.jsxs)("div",{className:"grid gap-3",children:[e.state.value?.map((d,n)=>(0,i.jsxs)("div",{className:"flex items-start gap-2",children:[(0,i.jsx)(s.AppField,{name:`sha256CertFingerprintsForm[${n}].value`,validators:{onChangeAsyncDebounceMs:300,onChangeAsync:u.P1,onChange:()=>{s.validateField("sha256CertFingerprintsForm","change")}},children:e=>(0,i.jsx)(e.InputField,{placeholder:r("e.g., ED:85:30:B6:A8:C2:F4:9D..."),className:"w-175",disabled:l,access:a,loading:!1})}),(0,i.jsx)(t.$,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10",onClick:()=>{e.removeValue(n)},disabled:l,children:(0,i.jsx)(K.default,{className:"h-5 w-5"})})]},d.id)),e.state.meta.errors.length>0&&(0,i.jsx)("div",{className:"text-xs text-destructive",children:"string"==typeof e.state.meta.errors[0]&&e.state.meta.errors[0]}),(0,i.jsxs)(t.$,{type:"button",variant:"secondary",className:"justify-self-start",onClick:()=>{e.pushValue({id:crypto.randomUUID(),value:""})},disabled:l,children:[(0,i.jsx)(G.default,{}),r("Add another SHA256 fingerprint")]})]}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:r("Required for Android App Links. These fingerprints verify your app's identity.")})]})})]})})]})}}),Q=(0,p.Jb)({...M,props:{access:{},isLoading:!1},render:e=>{let{form:s,access:a,isLoading:l}=e,r=(0,j.k)(),{t:d}=(0,I.Bd)("translation");return(0,i.jsxs)("div",{className:"space-y-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(E.A,{className:"w-5 h-5"}),(0,i.jsx)("h3",{className:"text-sm font-normal",children:d("iOS")})]}),(0,i.jsx)(s.AppField,{name:"iosUriScheme",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.iosUriScheme},children:e=>(0,i.jsxs)("div",{className:"space-y-2",id:"ios-uri-scheme",children:[(0,i.jsx)(e.InputField,{label:d("iOS URI Scheme"),className:"w-96",placeholder:"yourapp://",disabled:l,access:a,loading:!1}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:d("Where to send your user if they have the app.")})]})}),(0,i.jsx)(s.AppField,{name:"iosUrlFormatted",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.iosUrlFormatted},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.InputField,{label:d("iOS URL"),className:"w-96",placeholder:"https://apps.apple.com/app/id123456789",disabled:l,access:a,loading:!1,onChange:a=>{let i=a.target.value;e.handleChange(i);let l=function(e){try{let s=new URL(e);if(-1===y.indexOf(s.hostname))return null;let a=s.pathname.split("/").find(e=>e.startsWith("id"));if(!a)return null;let i=a.replace("id",""),l=parseInt(i,10);if(!Number.isNaN(l)&&i.length>0)return l}catch{}return null}(i);l?(s.setFieldValue("iosUrl",`id${l}`),s.setFieldValue("iosAppStoreId",l),A(l.toString(10))!==i&&(s.setFieldValue("iosUrlFormatted",A(l.toString(10))),r({t
3itle:d("Successfully formatted your iOS URL"),variant:"default"}))):s.setFieldValue("iosUrl",i)}}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:d("Where to send users that do not have the app. It can be the App Store or a custom link.")})]})}),(0,i.jsx)(s.AppField,{name:"iosAppStoreId",validators:{onChange:B.shape.iosAppStoreId},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.InputField,{label:d("App Store ID"),className:"w-96",placeholder:"123456789",disabled:l,access:a}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:d("Your app's ID from the App Store.")})]})}),(0,i.jsx)(s.AppField,{name:"universalLinkingEnabled",listeners:{onChange:e=>{let{value:a}=e;if(!a){let e=s.getFieldValue("iosAdditionalBundleIdsForm"),a=e=>({...e,errors:[]});if(s.setFieldMeta("iosAdditionalBundleIdsForm",a),s.setFieldMeta("iosTeamId",a),e)for(let i=0;i<e.length;i++)s.setFieldMeta(`iosAdditionalBundleIdsForm[${i}].value`,a)}s.validateField("iosAdditionalBundleIdsForm","change"),s.validateField("iosTeamId","change")}},validators:{onChange:e=>{let{value:a}=e;if(!a)return;let i=s.getFieldValue("iosAdditionalBundleIdsForm");i&&0!==i.length||s.setFieldValue("iosAdditionalBundleIdsForm",[{id:crypto.randomUUID(),value:""}]),s.validateField("iosAdditionalBundleIdsForm","change"),s.validateField("iosTeamId","change")}},children:e=>(0,i.jsxs)("div",{className:"space-y-6 target:ring-2 target:ring-primary target:ring-offset-4 target:rounded-sm",id:"ios-universal-links",children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.CheckboxField,{label:d("Enable Universal Links"),disabled:l,access:a,checked:e.state.value??!1}),(0,i.jsxs)("div",{className:"description",children:[(0,i.jsx)("a",{href:"https://help.branch.io/developer-hub/docs/ios-universal-links",target:"_blank",rel:"noopener noreferrer",className:"underline",children:d("Apple Universal Links")})," ",d("open URLs directly in your app, bypassing the usual Link > Safari > App handoff. To enable this, enter your Apple App Prefix and Bundle Identifier below.")]})]}),e.state.value&&(0,i.jsx)(s.AppField,{name:"iosAdditionalBundleIdsForm",validators:{onChange:e=>{let{value:a}=e;if(s.getFieldValue("universalLinkingEnabled")&&!a?.some(e=>e.value&&""!==e.value.trim()))return d("At least one Bundle ID is required when Universal Links is enabled")}},children:e=>(0,i.jsxs)("div",{className:"space-y-2",id:"ios-bundle-ids",children:[(0,i.jsx)("div",{className:"text-xs",children:d("Bundle Identifiers")}),(0,i.jsxs)("div",{className:"grid gap-3",children:[e.state.value?.map((r,n)=>(0,i.jsxs)("div",{className:"flex items-start gap-2",children:[(0,i.jsx)(s.AppField,{name:`iosAdditionalBundleIdsForm[${n}].value`,validators:{onBlur:e=>{let{value:a}=e;if(!s.getFieldValue("universalLinkingEnabled")||!a||""===a.trim())return;let i=R.safeParse(a);if(!i.success)return i.error.issues[0]?.message},onChange:()=>{s.getFieldValue("universalLinkingEnabled")&&s.validateField("iosAdditionalBundleIdsForm","change")}},children:e=>(0,i.jsx)(e.InputField,{placeholder:d("e.g., io.branch.Branchsters"),className:"w-96",disabled:l,access:a,loading:!1})}),(0,i.jsx)(t.$,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10",onClick:()=>{e.removeValue(n)},disabled:l,children:(0,i.jsx)(K.default,{className:"h-5 w-5"})})]},r.id)),e.state.meta.errors.length>0&&(0,i.jsx)("div",{className:"text-xs text-destructive",children:"string"==typeof e.state.meta.errors[0]&&e.state.meta.errors[0]}),(0,i.jsxs)(t.$,{type:"button",variant:"secondary",className:"justify-self-start",onClick:()=>{e.pushValue({id:crypto.randomUUID(),value:""})},disabled:l,children:[(0,i.jsx)(G.default,{}),d("Add another Bundle ID")]})]}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:d("Required for Universal Links. Your app's bundle identifiers from Xcode.")})]})}),e.state.value&&(0,i.jsx)(s.AppField,{name:"iosTeamId",validators:{onChange:e=>{let{value:a}=e;var i=!0===s.getFieldValue("universalLinkingEnabled"),l=d("Apple App Prefix is required when Universal Links is enabled");if(i){if(!a||"string"==typeof a&&0===a.trim().length||Array.isArray(a)&&0===a.length)return{message:l};try{L.parse(a)}catch(e){if(e instanceof S.GaX&&e.issues[0]?.message)return{message:e.issues[0].message};return{message:"Failed to validate field"}}}}},children:e=>(0,i.jsxs)("div",{className:"space-y-2",id:"ios-app-prefix",children:[(0,i.jsx)(e.InputField,{label:d("Apple App Prefix"),className:"w-96",placeholder:"ABCD123456",disabled:l,access:a,loading:!1}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:d("Required for Universal Links. Retrieve your Apple App Prefix from your Apple Developer account on the App IDs page. We only support one Apple App Prefix with multiple bundle IDs.")})]})}),(0,i.jsx)(s.AppField,{name:"deepviewConfigs",children:e=>{let t=e.state.value?.ios,r=t?.enabled||!1;return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(s.AppField,{name:"deepviewConfigs",children:e=>(0,i.jsx)(e.CheckboxField,{label:d("Enable NativeLink™"),checked:r,onCheckedChange:s=>{var a,i;let l=(a=!0===s,i=e.state.value?.ios?.deepviewAudienceId||0,a?a&&-1===i?0:i:-1);e.handleChange({ios:{enabled:!0===s,clipboardDeepview:"branch_clipboard_deepview",deepviewAudienceId:l}})},disabled:l,access:a})}),(0,i.jsxs)("div",{className:"ml-6 space-y-4",children:[(0,i.jsxs)("div",{className:"description space-y-2",children:[(0,i.jsxs)("div",{children:["Requires: 1)"," ",(0,i.jsx)("a",{href:"https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases/tag/1.39.4",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"iOS SDK 1.39.4 or higher"})," ","and 2) a"," ",(0,i.jsx)("a",{href:"https://help.branch.io/developer-hub/docs/ios-advanced-features#nativelink™-deferred-deep-linking",target:"_blank",rel:"noopener noreferrer",className:"underline",children:d("Pasteboard Check Method call")}),"."]}),(0,i.jsx)("div",{children:d("NativeLink™ uses the local device clipboard to provide guaranteed deferred deep linking(+match_guaranteed=true). Users will be presented with a landing page and CTA that copies the deep link to their clipboard. When the user installs the app, the app will automatically receive the deep link they copied.")})]}),r&&(0,i.jsx)(s.AppField,{name:"deepviewConfigs",children:e=>(0,i.jsx)(e.SelectField,{label:d("Audience Rule"),value:t?.deepviewAudienceId?.toString()||"0",onValueChange:s=>{let a={ios:{enabled:!0,clipboardDeepview:"branch_clipboard_deepview",deepviewAudienceId:parseInt(s,10)}};e.handleChange(a)},options:{0:"All iOS Traffic (All Browsers)",1:"All iOS 15+ Traffic (All Browsers)",2:"Only iOS Private Relay Traffic (Safari & In-App Safari Browsers)"},className:"w-96",disabled:l,access:a})})]})]})}})]})})]})}}),X=(0,p.Jb)({...M,props:{access:{},isLoading:!1},render:e=>{let{form:s,access:a,isLoading:l}=e,{t}=(0,I.Bd)();return(0,i.jsxs)(h.Zp,{children:[(0,i.jsxs)(h.aR,{children:[(0,i.jsx)(h.ZB,{children:t("Mobile Routing")}),(0,i.jsx)(h.BT,{children:t("Specify where to send mobile users.")})]}),(0,i.jsx)(J,{form:s,access:a,isLoading:l}),(0,i.jsx)(m.w,{}),(0,i.jsx)(Q,{form:s,access:a,isLoading:l})]})}});var ee=a(67237);let es=(0,p.Jb)({...M,props:{access:{},isLoading:!1},render:e=>{let{form:s,access:a,isLoading:l}=e,{t}=(0,I.Bd)();return(0,i.jsxs)(h.Zp,{children:[(0,i.jsxs)(h.aR,{children:[(0,i.jsx)(h.ZB,{children:t("Web Routing")}),(0,i.jsx)(h.BT,{children:t("Specify where to send users if they don't have your app installed.")})]}),(0,i.jsx)(s.AppField,{name:"webUrl",validators:{onChangeAsyncDebounceMs:300,onChangeAsync:B.shape.webUrl},children:e=>(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(e.InputField,{className:"w-96",placeholder:"https://www.example.com",disabled:l,loading:!1,access:a,label:t("Default URL")}),(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:t("Your default fallback URL for links that do not have a specific redirect")})]})}),(0,i.jsx)(m.w,{}),(0,i.jsx)(s.AppField,{name:"redirectDomainsWhitelist",validators:{onChange:B.shape.redirectDomainsWhitelist},children:e=>{let s=e.state.value&&e.state.value.length>0;return(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("div",{className:"text-xs",children:t("Redirect Allowlist")}),!s&&(0,i.jsx)(ee.Pq,{variant:"yellow",children:(0,i.jsx)(ee.wz,{children:t("When no redirect allowlist is specified, links may redirect to any destination.")})}),(0,i.jsx)(e.ComboboxMultiDropdownField,{options:e.state.value?.map(e=>({label:e,value:e}))??[],className:"w-157",placeholder:t("Type to add domains to Redirect Allowlist"),searchPlaceholder:t("Enter domain (e.g. example.com)"),allowCustomOptions:!0,disabled:l,access:a,showAllValues:!0}),(0,i.jsxs)("div",{className:"space-y-2 description",children:[(0,i.jsx)("div",{children:t("Limit link redirection to specific web domains or URI schemes across your Branch platform. List each of the domains you want to limit redirection to. We also support a “*” for wildcard subdomains.")}
3),(0,i.jsx)("div",{children:t("For example, if your allowlist includes “branch.io”, “*.branch.io”, and “myapp://”, your deep links can only redirect to domains like branch.io, dashboard.branch.io, or myapp://.")})]})]})}})]})}});var ea=a(2199),ei=a(2608),el=a(2779);let et=(0,d.x)(function(){let{t:e}=(0,I.Bd)("translation"),{setFormHeaderRef:s}=(0,ea.a)(),{form:a,isLoading:d}=function(){var e,s,a,i;let l,t,{t:d}=(0,I.Bd)("translation"),n=(0,j.k)(),o=(0,f.j)(),{appInfo:c}=(0,x.iK)(),{data:h,isLoading:m}=(0,v.z)(),{isEnabled:u}=(0,N.g_)(),b=u(r.Gv.DEEP_LINKING),y=c.updateLinkRouting.useMutation();return{form:(0,p.T3)({defaultValues:{webUrl:h?.webUrl??"",redirectDomainsWhitelist:h?.redirectDomainsWhitelist,androidUriScheme:h?.androidUriScheme??"",androidUrl:h?.androidUrl??"",androidUrlFormatted:h?.androidUrl&&(e=h.androidUrl,/^[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)+$/.test(e))?(s=h.androidUrl,`${k}?id=${s}`):h?.androidUrl??"",androidAppLinksEnabled:h?.androidAppLinksEnabled,androidPackageName:h?.androidPackageName??"",sha256CertFingerprints:h?.sha256CertFingerprints,sha256CertFingerprintsForm:h?.sha256CertFingerprints?.map(e=>({id:crypto.randomUUID(),value:e})),iosUrl:h?.iosUrl??"",iosUrlFormatted:h?.iosUrl&&function(e){if(!e.startsWith("id"))return!1;let s=e.slice(2);return/^\d+$/.test(s)&&s.length>=8&&s.length<=12}(h.iosUrl)?A(h.iosUrl):h?.iosUrl??"",iosAppStoreId:h?.iosAppStoreId,universalLinkingEnabled:h?.universalLinkingEnabled,iosBundleId:h?.iosBundleId??"",iosAdditionalBundleIds:h?.iosAdditionalBundleIds,iosAdditionalBundleIdsForm:(l=h?.iosAdditionalBundleIds||[],(t=h?.iosBundleId)&&!l.includes(t)?[t,...l].map(e=>({id:crypto.randomUUID(),value:e})):l.map(e=>({id:crypto.randomUUID(),value:e}))),iosTeamId:h?.iosTeamId??"",iosUriScheme:h?.iosUriScheme??"",deepviewConfigs:h?.deepviewConfigs,reservedAnalyticsToUtm:h?.reservedAnalyticsToUtm,autoFetch:h?.autoFetch,uriRedirectMode:h?.uriRedirectMode,matchType:h?.matchType??0,clientLatd:h?.clientLatd,defaultDesktopUrl:h?.defaultDesktopUrl??"",isCustomDesktopRedirect:!!h?.defaultDesktopUrl,macUriScheme:h?.macUriScheme??"",macStoreUrl:h?.macStoreUrl??"",windowsUriScheme:h?.windowsUriScheme??"",windowsStoreUrl:h?.windowsStoreUrl??"",windowsPackageFamilyName:h?.windowsPackageFamilyName??"",fireUrl:h?.fireUrl??"",fireUrlFormatted:h?.fireUrl&&(a=h.fireUrl,/^[A-Z0-9]{10}$/.test(a))?(i=h.fireUrl,`${w}${i}`):h?.fireUrl??"",ipadUrl:h?.ipadUrl??"",androidTabletUrl:h?.androidTabletUrl??"",wechatUrl:h?.wechatUrl??""},validators:{onSubmit:b?B:D},onSubmit:async e=>{let{value:s,formApi:a}=e;try{let{androidUrlFormatted:e,iosUrlFormatted:i,fireUrlFormatted:l,isCustomDesktopRedirect:t,iosAdditionalBundleIdsForm:r,sha256CertFingerprintsForm:c,...h}=s;if(h.universalLinkingEnabled&&r){let e=r.map(e=>e.value).filter(e=>!!(e&&""!==e.trim())),s=[...new Set(e)];s.length>0?(h.iosBundleId=s[0],h.iosAdditionalBundleIds=s):(h.iosBundleId=void 0,h.iosAdditionalBundleIds=[])}else h.universalLinkingEnabled||(h.iosAdditionalBundleIds=[],h.iosBundleId=void 0,h.iosTeamId="");if(c){let e=c.map(e=>e.value).filter(e=>!!(e&&""!==e.trim()));h.sha256CertFingerprints=[...new Set(e)]}b?t||(h.defaultDesktopUrl=""):delete h.defaultDesktopUrl,await y.mutateAsync({body:h}),a.reset(s),n({title:d("Settings updated successfully!"),variant:"default"}),await o(g.H0f)}catch{n({title:d("Failed to update settings"),variant:"destructive"})}}}),isLoading:m}}();!function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],{hash:s}=(0,ei.z)();(0,T.useEffect)(()=>{if(!s||!e)return;let a=s.replace(/^#/,""),i=requestAnimationFrame(()=>{document.getElementById(a)?.querySelector('input:not([type="radio"]):not([type="checkbox"])')?.focus({preventScroll:!0})});return()=>cancelAnimationFrame(i)},[s,e])}(!d);let n=(0,T.useRef)(null);(0,T.useEffect)(()=>{s&&n&&s(n)},[s]);let{userPermissions:h}=(0,el.V)(),{isEnabled:m}=(0,N.g_)(),u=m(r.Gv.DEEP_LINKING),b=l.Y6.oneOf([l.uL.build(l.gF.APP_LEVEL_SETTINGS,l.lx.READ)]),y=l.Y6.oneOf([l.uL.build(l.gF.APP_LEVEL_SETTINGS,l.lx.WRITE)]);return(0,i.jsx)(l.kx,{view:b,edit:y,permissions:h,children:s=>(0,i.jsxs)(a.AppForm,{children:[(0,i.jsx)(c.K,{form:a}),(0,i.jsxs)(a.FormContainer,{className:"space-y-6",children:[(0,i.jsx)(o.M,{ref:n,sticky:!0,children:(0,i.jsx)(a.Subscribe,{selector:e=>({canSubmit:e.canSubmit,isSubmitting:e.isSubmitting,isDefaultValue:e.isDefaultValue}),children:a=>{let{canSubmit:l,isSubmitting:r,isDefaultValue:d}=a;return(0,i.jsx)(t.$,{disabled:!l||r||d||"edit"!==s,loading:r,type:"submit",children:e("Save Changes")}
3)}})}),(0,i.jsx)(es,{form:a,access:s,isLoading:d}),u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(X,{form:a,access:s,isLoading:d}),(0,i.jsx)(q,{form:a,access:s,isLoading:d}),(0,i.jsx)(H,{form:a,access:s,isLoading:d}),(0,i.jsx)(W,{form:a,access:s,isLoading:d})]})]})]})})},n.Lv.CONFIG_LINK_CONTROLS)}}]);
4//# debugId=1c89c12f-a0cf-5801-acaf-2f7bb4b85eb2

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.