From 802e68a534dcd8964fb0b77120ea90419d141f8c Mon Sep 17 00:00:00 2001 From: Jagadeesh Branch <102190347+JagadeeshKaricherla-branch@users.noreply.github.com> Date: Mon, 11 Sep 2023 16:53:45 -0700 Subject: [PATCH] feat(core): receive and send session_referring_link_data (#930) feat(core): receive and send session_referring_link_data --- dist/build.js | 5 +++- dist/build.min.js | 74 +++++++++++++++++++++++----------------------- example.html | 2 +- src/2_resources.js | 3 +- src/6_branch.js | 3 ++ src/branch_view.js | 2 ++ 6 files changed, 49 insertions(+), 40 deletions(-) diff --git a/dist/build.js b/dist/build.js index d911b0392..ae5c23399 100644 --- a/dist/build.js +++ b/dist/build.js @@ -1706,7 +1706,7 @@ resources.logStandardEvent = {destination:config.api_endpoint, endpoint:"/v2/eve resources.logCustomEvent = {destination:config.api_endpoint, endpoint:"/v2/event/custom", method:utils.httpMethod.POST, params:{name:validator(!0, validationTypes.STRING), user_data:validator(!0, validationTypes.STRING), custom_data:validator(!1, validationTypes.STRING), event_data:validator(!1, validationTypes.STRING), content_items:validator(!1, validationTypes.STRING), customer_event_alias:validator(!1, validationTypes.STRING)}}; resources.pageview = {destination:config.api_endpoint, endpoint:"/v1/pageview", method:utils.httpMethod.POST, params:defaults({event:validator(!0, validationTypes.STRING), metadata:validator(!1, validationTypes.OBJECT), initial_referrer:validator(!1, validationTypes.STRING), tracking_disabled:validator(!1, validationTypes.BOOLEAN), branch_view_id:validator(!1, validationTypes.STRING), no_journeys:validator(!1, validationTypes.BOOLEAN), user_language:validator(!1, validationTypes.STRING), open_app:validator(!1, validationTypes.BOOLEAN), has_app_websdk:validator(!1, validationTypes.BOOLEAN), source:validator(!1, validationTypes.STRING), feature:validator(!1, validationTypes.STRING), is_iframe:validator(!1, validationTypes.BOOLEAN), data:validator(!1, validationTypes.OBJECT), callback_string:validator(!1, validationTypes.STRING), journey_displayed:validator(!1, validationTypes.BOOLEAN), audience_rule_id:validator(!1, validationTypes.STRING), journey_dismissals:validator(!1, validationTypes.OBJECT), identity_id:validator(!1, -validationTypes.STRING), identity:validator(!0, validationTypes.STRING), session_referring_link_data:validator(!1, validationTypes.STRING)})}; +validationTypes.STRING), identity:validator(!0, validationTypes.STRING), session_referring_link_data:validator(!1, validationTypes.STRING), session_link_click_id:validator(!1, validationTypes.STRING)})}; resources.dismiss = {destination:config.api_endpoint, endpoint:"/v1/dismiss", method:utils.httpMethod.POST, params:defaults({event:validator(!0, validationTypes.STRING), metadata:validator(!1, validationTypes.OBJECT), initial_referrer:validator(!1, validationTypes.STRING), tracking_disabled:validator(!1, validationTypes.BOOLEAN), branch_view_id:validator(!1, validationTypes.STRING), no_journeys:validator(!1, validationTypes.BOOLEAN), user_language:validator(!1, validationTypes.STRING), open_app:validator(!1, validationTypes.BOOLEAN), has_app_websdk:validator(!1, validationTypes.BOOLEAN), source:validator(!1, validationTypes.STRING), feature:validator(!1, validationTypes.STRING), is_iframe:validator(!1, validationTypes.BOOLEAN), data:validator(!1, validationTypes.OBJECT), callback_string:validator(!1, validationTypes.STRING), journey_displayed:validator(!1, validationTypes.BOOLEAN), audience_rule_id:validator(!1, validationTypes.STRING), journey_dismissals:validator(!1, validationTypes.OBJECT), dismissal_source:validator(!1, validationTypes.STRING)})}; @@ -2739,6 +2739,7 @@ branch_view._getPageviewRequestData = function(a, b, c, d) { journeys_utils.exitAnimationDisabled = b.disable_exit_animation || !1; var e = utils.merge({}, c._branchViewData), f = session.get(c._storage) || {}, g = f.hasOwnProperty("has_app") ? f.has_app : !1, h = f.hasOwnProperty("identity") ? f.identity : null, k = c._storage.get("journeyDismissals", !0), l = (b.user_language || utils.getBrowserLanguageCode() || "en").toLowerCase() || null, n = utils.getInitialReferrer(c._referringLink()), q = b.branch_view_id || utils.getParameterByName("_branch_view_id") || null; c = b.make_new_link ? null : utils.getClickIdAndSearchStringFromLink(c._referringLink(!0)); + var r = f.hasOwnProperty("session_link_click_id") ? f.session_link_click_id : null; e.event = d ? "dismiss" : "pageview"; e.metadata = a; e = utils.addPropertyIfNotNull(e, "initial_referrer", n); @@ -2747,6 +2748,7 @@ branch_view._getPageviewRequestData = function(a, b, c, d) { e = utils.addPropertyIfNotNull(e, "is_iframe", utils.isIframe()); e = utils.addPropertyIfNotNull(e, "journey_dismissals", k); e = utils.addPropertyIfNotNull(e, "identity", h); + e = utils.addPropertyIfNotNull(e, "session_link_click_id", r); e.user_language = l; e.open_app = b.open_app || !1; e.has_app_websdk = g; @@ -2865,6 +2867,7 @@ Branch.prototype.init = wrap(callback_params.CALLBACK_ERR_DATA, function(a, b, c d.identity_id = b && b.identity_id; var e = function(m) { m.link_click_id && (d.link_click_id = m.link_click_id.toString()); + m.session_link_click_id && (d.session_link_click_id = m.session_link_click_id.toString()); m.session_id && (d.session_id = m.session_id.toString()); m.identity_id && (d.identity_id = m.identity_id.toString()); m.identity && (d.identity = m.identity.toString()); diff --git a/dist/build.min.js b/dist/build.min.js index 7717b1981..2dab4a645 100644 --- a/dist/build.min.js +++ b/dist/build.min.js @@ -8,15 +8,15 @@ function da(a,b){if(b)a:{var c=ca;a=a.split(".");for(var d=0;d=(b||11))return!0}catch(c){}return!1} function E(){var a=navigator.userAgent;return a.match(/android/i)?"android":a.match(/ipad/i)||a&&Ma(a)&&a&&-1screen.width?"ipad":a.match(/i(os|p(hone|od))/i)?"ios":a.match(/\(BB[1-9][0-9]*;/i)?"blackberry":a.match(/Windows Phone/i)?"windows_phone":a.match(/Kindle/i)||a.match(/Silk/i)||a.match(/KFTT/i)||a.match(/KFOT/i)||a.match(/KFJWA/i)||a.match(/KFJWI/i)||a.match(/KFSOWI/i)||a.match(/KFTHWA/i)||a.match(/KFTHWI/i)||a.match(/KFAPWA/i)||a.match(/KFAPWI/i)? @@ -48,8 +48,8 @@ var sb={destination:"https://api2.branch.io",endpoint:"/v1/open",method:"POST",h 1)}},ub={destination:"https://api2.branch.io",endpoint:"/v1/url",method:"POST",sa:"obj",h:rb({alias:J(!1,1),campaign:J(!1,1),channel:J(!1,1),data:J(!1,1),feature:J(!1,1),identity_id:J(!0,1),stage:J(!1,1),tags:J(!1,3),type:J(!1,2),source:J(!1,1),instrumentation:J(!1,1)})},vb={destination:"https://api2.branch.io",endpoint:"/v1/qr-code",method:"POST",sa:"obj",h:rb({alias:J(!1,1),campaign:J(!1,1),channel:J(!1,1),data:J(!1,1),qr_code_settings:J(!1,1),feature:J(!1,1),identity_id:J(!0,1),stage:J(!1,1),tags:J(!1, 3),type:J(!1,2),source:J(!1,1)})},wb={destination:"https://api2.branch.io",endpoint:"/v1/deepview",R:!0,method:"POST",h:rb({campaign:J(!1,1),_t:J(!1,1),channel:J(!1,1),data:J(!0,1),feature:J(!1,1),link_click_id:J(!1,1),open_app:J(!1,4),append_deeplink_path:J(!1,4),stage:J(!1,1),tags:J(!1,3),deepview_type:J(!0,1),source:J(!0,1)})},xb={destination:"https://api2.branch.io",endpoint:"/v2/event/standard",method:"POST",h:{name:J(!0,1),user_data:J(!0,1),custom_data:J(!1,1),event_data:J(!1,1),content_items:J(!1, 1),customer_event_alias:J(!1,1)}},yb={destination:"https://api2.branch.io",endpoint:"/v2/event/custom",method:"POST",h:{name:J(!0,1),user_data:J(!0,1),custom_data:J(!1,1),event_data:J(!1,1),content_items:J(!1,1),customer_event_alias:J(!1,1)}},zb={destination:"https://api2.branch.io",endpoint:"/v1/pageview",method:"POST",h:rb({event:J(!0,1),metadata:J(!1,0),initial_referrer:J(!1,1),tracking_disabled:J(!1,4),branch_view_id:J(!1,1),no_journeys:J(!1,4),user_language:J(!1,1),open_app:J(!1,4),has_app_websdk:J(!1, -4),source:J(!1,1),feature:J(!1,1),is_iframe:J(!1,4),data:J(!1,0),callback_string:J(!1,1),journey_displayed:J(!1,4),audience_rule_id:J(!1,1),journey_dismissals:J(!1,0),identity_id:J(!1,1),identity:J(!0,1),session_referring_link_data:J(!1,1)})},Ab={destination:"https://api2.branch.io",endpoint:"/v1/dismiss",method:"POST",h:rb({event:J(!0,1),metadata:J(!1,0),initial_referrer:J(!1,1),tracking_disabled:J(!1,4),branch_view_id:J(!1,1),no_journeys:J(!1,4),user_language:J(!1,1),open_app:J(!1,4),has_app_websdk:J(!1, -4),source:J(!1,1),feature:J(!1,1),is_iframe:J(!1,4),data:J(!1,0),callback_string:J(!1,1),journey_displayed:J(!1,4),audience_rule_id:J(!1,1),journey_dismissals:J(!1,0),dismissal_source:J(!1,1)})},Bb={destination:"https://api2.branch.io",endpoint:"/v1/cpid",method:"POST",h:{user_data:J(!0,1)}},Cb={destination:"https://api2.branch.io",endpoint:"/v1/cpid/latd",method:"POST",h:{user_data:J(!0,1)}};function Db(){for(var a=["session","cookie","pojo"],b=0;ba.length?"function"===typeof b&&b():(a[0].appendChild(d),"function"===typeof b&&Wa(d,"error",b),"function"===typeof c&&Wa(d,"load",c))}; function Mb(a,b,c,d,e){var f=Date.now(),m=ua;0===a.l&&Oa()&&a.l++;var k="branch_callback__"+a.l++,g=0<=b.indexOf("branch.io")?"&data=":"&post_data=";c="POST"===d?encodeURIComponent(Ca(h(c))):"";var u=window.setTimeout(function(){window[k]=function(){};F(w,m,va(f));e(Error("Request timed out"),null,504)},qa);window[k]=function(l){window.clearTimeout(u);e(null,l)};a.createScript(b+(0>b.indexOf("?")?"?":"")+(c?g+c:"")+(0<=b.indexOf("/c/")?"&click=1":"")+"&callback="+k,function(){e(Error("Request blocked by client, probably adblock"), null)},function(){F(w,m,va(f));try{"function"===typeof this.remove?this.remove():this.parentNode.removeChild(this)}catch(l){}delete window[k]})} -function Nb(a,b,c,d,e,f,m,k){var g=Date.now(),u=ua,l=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");k&&(l.responseType=k);l.ontimeout=function(){F(w,u,va(g));f(Error("Request timed out"),null,504)};l.onerror=function(r){f(Error(r.error||"Error in API: "+l.status),null,l.status)};l.onreadystatechange=function(){if(4===l.readyState)if(F(w,u,va(g)),200===l.status){if("arraybuffer"===l.responseType)var r=l.response;else if(m)r=l.responseText;else try{r=q(l.responseText)}catch(t){r= -{}}f(null,r,l.status)}else if("4"===l.status.toString().substring(0,1)||"5"===l.status.toString().substring(0,1))l.responseURL&&l.responseURL.includes("v2/event")?f(l.responseText,null,l.status):f(Error("Error in API: "+l.status),null,l.status)};try{l.open(d,b,!0),l.timeout=qa,l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.send(c)}catch(r){e.set("use_jsonp",!0),Mb(a,b,c,d,f)}} -function Ob(a,b,c,d,e){function f(){d.get("use_jsonp")||b.R?Mb(a,l,c,b.method,m):Nb(a,l,u,b.method,d,m,V,n)}function m(p,G,D){"function"===typeof a.fa&&a.fa(l,b.method,r,p,D,G);p&&0=new Date(a):!a;var c=b.P;"number"===typeof c&&(c=!1);return!document.getElementById("branch-banner")&&!document.getElementById("branch-banner-iframe")&&(a||c)&&(b.U&&"android"===E()||b.ua&&"ipad"===E()||b.Y&&"ios"===E()||b.V&&"blackberry"===E()||b.X&&"windows_phone"===E()||b.W&&"kindle"===E())};function Vb(a,b){var c=".branch-banner-is-active { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\n#branch-banner { width:100%; z-index: 99999; font-family: Helvetica Neue, Sans-serif; -webkit-font-smoothing: antialiased; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\n#branch-banner .button{ border: 1px solid "+(a.buttonBorderColor||("dark"===a.theme?"transparent":"#ccc"))+"; background: "+ +function Ub(a,b){a=a.get("hideBanner",!0);if(b.ta&&navigator&&Number(navigator.doNotTrack))return!1;try{"string"===typeof a&&(a=r(a))}catch(d){a=!1}a="number"===typeof a?new Date>=new Date(a):!a;var c=b.P;"number"===typeof c&&(c=!1);return!document.getElementById("branch-banner")&&!document.getElementById("branch-banner-iframe")&&(a||c)&&(b.U&&"android"===E()||b.ua&&"ipad"===E()||b.Y&&"ios"===E()||b.V&&"blackberry"===E()||b.X&&"windows_phone"===E()||b.W&&"kindle"===E())};function Vb(a,b){var c=".branch-banner-is-active { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\n#branch-banner { width:100%; z-index: 99999; font-family: Helvetica Neue, Sans-serif; -webkit-font-smoothing: antialiased; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\n#branch-banner .button{ border: 1px solid "+(a.buttonBorderColor||("dark"===a.theme?"transparent":"#ccc"))+"; background: "+ (a.buttonBackgroundColor||"#fff")+"; color: "+(a.buttonFontColor||"#000")+"; cursor: pointer; margin-top: 0px; font-size: 14px; display: inline-block; margin-left: 5px; font-weight: 400; text-decoration: none; border-radius: 4px; padding: 6px 12px; transition: all .2s ease;}\n#branch-banner .button:hover { border: 1px solid "+(a.buttonBorderColorHover||("dark"===a.theme?"transparent":"#BABABA"))+"; background: "+(a.buttonBackgroundColorHover||"#E0E0E0")+"; color: "+(a.buttonFontColorHover||"#000")+ ";}\n#branch-banner .button:focus { outline: none; }\n#branch-banner * { margin-right: 4px; position: relative; line-height: 1.2em; }\n#branch-banner-close { font-weight: 400; cursor: pointer; float: left; z-index: 2;padding: 0 5px 0 5px; margin-right: 0; }\n#branch-banner .content { width:100%; overflow: hidden; height: 76px; background: rgba(255, 255, 255, 0.95); color: #333; "+("top"===a.position?"border-bottom":"border-top")+': 1px solid #ddd; }\n#branch-banner-close { color: #000; font-size: 24px; top: 14px; opacity: .5; transition: opacity .3s ease; }\n#branch-banner-close:hover { opacity: 1; }\n#branch-banner .title { font-size: 18px; font-weight:bold; color: #555; }\n#branch-banner .description { font-size: 12px; font-weight: normal; color: #777; max-height: 30px; overflow: hidden; }\n#branch-banner .icon { float: left; padding-bottom: 40px; margin-right: 10px; margin-left: 5px; }\n#branch-banner .icon img { width: 63px; height: 63px; margin-right: 0; }\n#branch-banner .reviews { font-size:13px; margin: 1px 0 3px 0; color: #777; }\n#branch-banner .reviews .star { display:inline-block; position: relative; margin-right:0; }\n#branch-banner .reviews .star span { display: inline-block; margin-right: 0; color: #555; position: absolute; top: 0; left: 0; }\n#branch-banner .reviews .review-count { font-size:10px; }\n#branch-banner .reviews .star .half { width: 50%; overflow: hidden; display: block; }\n#branch-banner .content .left { padding: 6px 5px 6px 5px; }\n#branch-banner .vertically-align-middle { top: 50%; transform: translateY(-50%); -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); }\n#branch-banner .details > * { display: block; }\n#branch-banner .content .left { height: 63px; }\n#branch-banner .content .right { float: right; height: 63px; margin-bottom: 50px; padding-top: 22px; z-index: 1; }\n#branch-banner .right > div { float: left; }\n#branch-banner-action { top: 17px; }\n#branch-banner .content:after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 1px; background: rgba(0, 0, 0, 0.2); }\n#branch-banner .theme-dark.content { background: rgba(51, 51, 51, 0.95); }\n#branch-banner .theme-dark #branch-banner-close{ color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }\n#branch-banner .theme-dark .details { text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }\n#branch-banner .theme-dark .title { color: #fff; }\n#branch-banner .theme-dark .description { color: #fff; }\n#branch-banner .theme-dark .reviews { color: #888; }\n#branch-banner .theme-dark .reviews .star span{ color: #fff; }\n#branch-banner .theme-dark .reviews .review-count{ color: #fff; }\n', d=E();"ios"!==d&&"ipad"!==d||!a.Y?"android"===d&&a.U?c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n#branch-banner #branch-banner-close,#branch-banner .theme-dark #branch-banner-close { height:17px; width: 17px; text-align: center; font-size: 15px; top: 24px; border-radius:14px; border:0; line-height:14px; color:#b1b1b3; background:#efefef; padding: 0; opacity: 1; }\n#branch-banner .button { top: 0; text-decoration:none; border-bottom: 3px solid #A4C639; padding: 0 10px; height: 24px; line-height: 24px; text-align: center; color: #fff; margin-top: 2px; font-weight: bold; background-color: #A4C639; border-radius: 5px; }\n#branch-banner .button:hover { border-bottom:3px solid #8c9c29; background-color: #c1d739; }\n": @@ -78,18 +78,18 @@ d=E();"ios"!==d&&"ipad"!==d||!a.Y?"android"===d&&a.U?c+="#branch-banner { positi "kindle"===d&&a.W&&(c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n"): c+="#branch-banner { position: absolute; }\n#branch-banner .content .left .details .title { font-size: 12px; }\n#branch-mobile-action { white-space: nowrap; }\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\n"; c+=a.la;a.L&&(c+="body { margin: 0; }\n",d=document.createElement("style"),d.type="text/css",d.id="branch-iframe-css",I(d),d.innerHTML="body { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\n#branch-banner-iframe { box-shadow: 0 0 5px rgba(0, 0, 0, .35); width: 1px; min-width:100%; left: 0; right: 0; border: 0; height: 76px; z-index: 99999; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\n#branch-banner-iframe { position: "+(("top"!==a.position||a.pa?"fixed": -"absolute")+"; }\n"),(document.head||document.getElementsByTagName("head")[0]).appendChild(d));d=document.createElement("style");d.type="text/css";d.id="branch-css";d.innerHTML=c;I(d);c=a.L?b.contentWindow.document:document;(c=c.head||c.getElementsByTagName("head")[0])&&"function"===typeof c.appendChild&&c.appendChild(d);"top"===a.position?b.style.top="-76px":"bottom"===a.position&&(b.style.bottom="-76px")};function M(a,b){try{var c=q(a.get(b?"branch_session_first":"branch_session",b))||null;return Va(c)}catch(d){return null}}function Ea(a,b,c){c&&b.referring_link&&xa&&(b.referringLinkExpiry=(new Date).getTime()+sa);b=Ua(b);a.set("branch_session",h(b));c&&a.set("branch_session_first",h(b),!0)}function Wb(a,b){if(b){var c=M(a)||{};b=h(Ua(C(c,b)));a.set("branch_session",b)}} -function Yb(a,b,c){function d(f,m){return Ua(C(q(f),m,c))}var e=a.get("branch_session",!1)||{};a.set("branch_session",h(d(e,b)));e=a.get("branch_session_first",!0)||{};a.set("branch_session_first",h(d(e,b)),!0)};function Zb(a,b,c){var d=document.createElement("iframe");d.src="about:blank";d.style.overflow="hidden";d.scrolling="no";d.id="branch-banner-iframe";d.className="branch-animation";I(d);d.onload=function(){var e=E(),f=d.contentDocument||d.contentWindow.document;f.head=f.createElement("head");f.body=f.createElement("body");f.body.className="ios"===e||"ipad"===e?"branch-banner-ios":"android"===e?"branch-banner-android":"branch-banner-other";$b(a,b,f);c(d)};document.body.appendChild(d)} +"absolute")+"; }\n"),(document.head||document.getElementsByTagName("head")[0]).appendChild(d));d=document.createElement("style");d.type="text/css";d.id="branch-css";d.innerHTML=c;I(d);c=a.L?b.contentWindow.document:document;(c=c.head||c.getElementsByTagName("head")[0])&&"function"===typeof c.appendChild&&c.appendChild(d);"top"===a.position?b.style.top="-76px":"bottom"===a.position&&(b.style.bottom="-76px")};function M(a,b){try{var c=r(a.get(b?"branch_session_first":"branch_session",b))||null;return Va(c)}catch(d){return null}}function Ea(a,b,c){c&&b.referring_link&&xa&&(b.referringLinkExpiry=(new Date).getTime()+sa);b=Ua(b);a.set("branch_session",h(b));c&&a.set("branch_session_first",h(b),!0)}function Wb(a,b){if(b){var c=M(a)||{};b=h(Ua(C(c,b)));a.set("branch_session",b)}} +function Yb(a,b,c){function d(f,m){return Ua(C(r(f),m,c))}var e=a.get("branch_session",!1)||{};a.set("branch_session",h(d(e,b)));e=a.get("branch_session_first",!0)||{};a.set("branch_session_first",h(d(e,b)),!0)};function Zb(a,b,c){var d=document.createElement("iframe");d.src="about:blank";d.style.overflow="hidden";d.scrolling="no";d.id="branch-banner-iframe";d.className="branch-animation";I(d);d.onload=function(){var e=E(),f=d.contentDocument||d.contentWindow.document;f.head=f.createElement("head");f.body=f.createElement("body");f.body.className="ios"===e||"ipad"===e?"branch-banner-ios":"android"===e?"branch-banner-android":"branch-banner-other";$b(a,b,f);c(d)};document.body.appendChild(d)} function $b(a,b,c){c=c||document;var d=c.createElement("div");d.id="branch-banner";d.className="branch-animation";if(a.H||a.S){if(a.H){var e="";for(var f=0;5>f;f++)e+='\u2606', a.H>f&&(e+=f+1>a.H&&a.H%1?'\u2605': '\u2605 '),e+="";e=''+e+""}else e="";e='
'+e+(a.S?''+a.S+"":"")+"
"}else e= "";d.innerHTML='
'+b+'
'+(a.ma?"":'
×
')+'
Application icon
'+a.title+"
"+e+'
'+a.description+"
";c.body.appendChild(d);return d} function ac(a,b,c){b='");a.L?Zb(a,b,c):(a=$b(a,b,document),c(a))};function bc(a,b,c,d){function e(g,u){"function"===typeof g&&(u=g,g={});g=g||{};"top"===b.position?f.style.top="-76px":"bottom"===b.position&&(f.style.bottom="-76px");"number"===typeof b.P?d.set("hideBanner",Rb(b.P),!0):d.set("hideBanner",!0,!0);g.ca?("top"===b.position?document.body.style.marginTop=m:"bottom"===b.position&&(document.body.style.marginBottom=k),Qb("branch-banner-is-active"),L(f),L(document.getElementById("branch-css")),u()):(setTimeout(function(){L(f);L(document.getElementById("branch-css")); u()},270),setTimeout(function(){"top"===b.position?document.body.style.marginTop=m:"bottom"===b.position&&(document.body.style.marginBottom=k);Qb("branch-banner-is-active")},20))}if(!Ub(d,b))return N(a,"willNotShowBanner"),null;N(a,"willShowBanner");var f,m=document.body.style.marginTop,k=document.body.style.marginBottom;ac(b,d,function(g){function u(){"top"===b.position?f.style.top="0":"bottom"===b.position&&(f.style.bottom="0");N(a,"didShowBanner")}f=g;Vb(b,f);c.channel=c.channel||"app banner"; -g=b.L?f.contentWindow.document:document;if(E()){b.open_app=b.ra;b.append_deeplink_path=b.ja;b.make_new_link=b.oa;b.deepview_type="banner";a.deepview(c,b);var l=g.getElementById("branch-mobile-action");l&&(l.onclick=function(t){t.preventDefault();a.deepviewCta()})}l=Sb("margin-top");var r=Sb("margin-bottom");Pb(document.body,"branch-banner-is-active");"top"===b.position?document.body.style.marginTop=Tb(l):"bottom"===b.position&&(document.body.style.marginBottom=Tb(r));if(l=g.getElementById("branch-banner-close"))l.onclick= -function(t){t.preventDefault();N(a,"willCloseBanner");e({},function(){N(a,"didCloseBanner")})};if(g=g.getElementById("branch-banner-modal-background"))g.onclick=function(t){t.preventDefault();N(a,"willCloseBanner");e({},function(){N(a,"didCloseBanner")})};b.ca?u():setTimeout(u,20)});return e};function cc(){function a(){if(b.length)b[0](function(){b.shift();a()})}var b=[];return function(c){b.push(c);1===b.length&&a()}};var dc={},O,ec,P,Q,fc,gc,hc=1;function ic(){O="top";ec="absolute";P="76px";fc=Q=!1}ic();var S=[],jc=!1,kc=window.innerHeight,lc=window.innerWidth;window.innerHeight((.|\s)*?)<\/script>/,qc=/