diff --git a/examples/amp-ad/smartadserver.amp.safeframe.html b/examples/amp-ad/smartadserver.amp.safeframe.html new file mode 100644 index 000000000000..a0e78a4478cf --- /dev/null +++ b/examples/amp-ad/smartadserver.amp.safeframe.html @@ -0,0 +1,45 @@ + + + + + Smartadserver Examples + + + + + + + + + + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + + + + + + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + Lorem ipsum dolor sit amet consectetur, adipisicing elit. Explicabo dolores laborum obcaecati nostrum vitae consectetur illo eligendi et. Fuga repellat necessitatibus consequatur harum asperiores esse deleniti expedita possimus nulla nihil. + + + diff --git a/extensions/amp-ad-network-smartadserver-impl/0.1/amp-ad-network-smartadserver-impl.js b/extensions/amp-ad-network-smartadserver-impl/0.1/amp-ad-network-smartadserver-impl.js index 3c9e69bd931a..90ba73e752c7 100644 --- a/extensions/amp-ad-network-smartadserver-impl/0.1/amp-ad-network-smartadserver-impl.js +++ b/extensions/amp-ad-network-smartadserver-impl/0.1/amp-ad-network-smartadserver-impl.js @@ -16,13 +16,17 @@ import {buildUrl} from '#ads/google/a4a/shared/url-builder'; +import {tryResolve} from '#core/data-structures/promise'; import {getPageLayoutBoxBlocking} from '#core/dom/layout/page-layout-box'; import {tryParseJson} from '#core/types/object/json'; +import {utf8Decode} from '#core/types/string/bytes'; import {Services} from '#service'; import {dev} from '#utils/log'; +import './base_host'; + import {getOrCreateAdCid} from '../../../src/ad-cid'; import {getConsentPolicyInfo} from '../../../src/consent'; import {AmpA4A, XORIGIN_MODE} from '../../amp-a4a/0.1/amp-a4a'; @@ -49,6 +53,15 @@ export class AmpAdNetworkSmartadserverImpl extends AmpA4A { */ constructor(element) { super(element); + + this.useSafeframe = false; + if ( + 'useSafeframe' in this.element.dataset && + this.element.dataset['useSafeframe'] === 'true' + ) { + this.useSafeframe = true; + } + this.addListener(); } @@ -107,11 +120,43 @@ export class AmpAdNetworkSmartadserverImpl extends AmpA4A { }); } + /** @override */ + renderViaNameAttrOfXOriginIframe_(creativeBody) { + tryResolve(() => utf8Decode(creativeBody)).then((creative) => { + const newChildEl = document.createElement('div'); + newChildEl.id = `ampAdId-${this.sentinel}`; + this.element.appendChild(newChildEl); + + new window.$sf.host.Config({ + renderFile: + 'https://demo.smartadserver.com/shared/Smart/dodziomek/sf/frame.html', + }); + new window.$sf.host.PosConfig({ + id: newChildEl.id, + w: this.getCreativeSize().width, + h: this.getCreativeSize().height, + dest: newChildEl.id, + }); + window.$sf.host.render( + new window.$sf.host.Position(newChildEl.id, creative) + ); + }); + + return super.renderViaNameAttrOfXOriginIframe_(creativeBody); + } + + /** @override */ + iframeRenderHelper_() {} + /** @override */ getNonAmpCreativeRenderingMethod(headerValue) { - return Services.platformFor(this.win).isIos() - ? XORIGIN_MODE.IFRAME_GET - : super.getNonAmpCreativeRenderingMethod(headerValue); + if (this.useSafeframe) { + return XORIGIN_MODE.SAFEFRAME; + } else { + return Services.platformFor(this.win).isIos() + ? XORIGIN_MODE.IFRAME_GET + : super.getNonAmpCreativeRenderingMethod(headerValue); + } } /** @override */ @@ -168,7 +213,7 @@ export class AmpAdNetworkSmartadserverImpl extends AmpA4A { /** @override */ isXhrAllowed() { - return false; + return this.useSafeframe ? true : false; } /** diff --git a/extensions/amp-ad-network-smartadserver-impl/0.1/base_host.js b/extensions/amp-ad-network-smartadserver-impl/0.1/base_host.js new file mode 100644 index 000000000000..1809f9a17762 --- /dev/null +++ b/extensions/amp-ad-network-smartadserver-impl/0.1/base_host.js @@ -0,0 +1 @@ +!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";(function(e){if(window.$sf)try{t.ver="1-1-1",t.specVersion="1.1"}catch(e){}else var t={ver:"1-1-1",specVersion:"1.1"};!function(t){var n,o,r,i,l,c="?",s="object",a="function",u="replace",f="length",d=t&&t.Number,p=t&&t.Math,h=t&&t.document,m=t&&t.navigator,g=m&&m.userAgent||"",v="toLowerCase",b="getAttribute",y="setAttribute",w="removeAttribute",x="getElementsByTagName",k=t&&t.String,T=k.fromCharCode(92),_=T+T,P=k.fromCharCode(34),O=T+P,S=k.fromCharCode(43),E="scr"+P+S+P+"ipt",L="CollectGarbage",C="",I=M,M=!1,N={preventDefault:0,stopImmediatePropagation:0,stopPropagation:0,preventBubble:0},A=d&&d.MAX_VALUE,R=-1*A,D=(t&&t.escape,t&&t.unescape,!(!window.ActiveXObject&&"ActiveXObject"in window)&&t&&"ActiveXObject"in t),$=0,j=M,H=0,F=null,W=0,z=null,B=0,X=0,G=0,V={},U="",Y="",J=null,K=null;!function(){var e;function i(e){var t=typeof e;return"string"==t?e:"number"!=t||e?t==s&&e&&e.join?e.join(""):!1===e?"false":!0===e?"true":e?k(e):"":"0"}function l(e,t,n,o){if("number"!=typeof e)try{e=e?parseFloat(e):d.NaN}catch(t){e=d.NaN}return null==o&&(o=A),null==n&&(n=R),(isNaN(e)||eo)&&null!=t?t:e}function h(e){try{e=e&&typeof e==a&&e.toString()&&new e.constructor?e:null}catch(t){e=null}return!!e}function m(e,t,n,o,r){var i,l,c;if(!t||!e)return e;for(l in t)c=typeof(i=t[l]),n&&!t.hasOwnProperty(l)||r&&l in e||o&&c==a||(c==s&&i&&(i=i.slice?m([],i):m({},i)),e[l]=i);return e}function g(){return(new Date).getTime()}function v(){return p.round(100*p.random())}function b(e){var t=i(e);return t&&t[u](/^\s\s*/,"")[u](/\s\s*$/,"")}function y(e,n,o,r){var l,c,a=o&&typeof o==s?o:t,u=0,d=null;if(e)if(e=i(e),n=n&&typeof n==s?n:null,e.indexOf("."))for(l=e.split(".");c=l[u++];)c=b(c),d=u==l[f]?a[c]&&n?a[c]=m(a[c],n,M,null,r):r&&c in a?a[c]:a[c]=a[c]||n||{}:r&&c in a?a[c]:a[c]=a[c]||{},a=a[c];else d=a[e]&&n?a[e]=m(a[e],n,M,null,r):a[e]=a[e]||n||{};return d}function w(){return _}function x(){return O}function T(){return"\\r"}function S(){return"\\n"}function L(e,t,n){return i(["<",t,E,n,">"])}function C(e){return escape(e)}function I(e){return unescape(e)}function N(e,t,n){return n?e.lastIndexOf(t):e.indexOf(t)}function j(e,t,n,o,r){var l,a,u,d,p,h,g,v,b,y,w,x,k,T,_=this,P=M;if(!(_ instanceof j))return new j(e,t,n,o,r);if(!arguments[f])return _;if(e&&typeof e==s)return m(new j("",t,n,o,r),e);if(e=i(e),t=i(t)||"&",n=i(n)||"=",!e)return _;for(t!=c&&n!=c&&e.charAt(0)==c&&(e=e.substring(1)),e.charAt(0)==t&&(e=e.substring(1)),w=(g=e.split(t))[f],l=0;w--;)if(d=g[l++],y=M,P=M,d){if((k=(v=d.split(n))[f])>2){if(b=I(v[0]),v.shift(),r)if(a=N(e,p=b+n),k=p[f],h=e.substring(a+k),T=(p=t+t)[f],-1!=(u=N(h,p))){for(h in x=new j(h=e.substr(a+k,u+T),t,n,o,r),h="",k=0,x)k++;k>0&&(l+=k-1),d=x}else d=I(v.join(n));else d=I(v.join(n));P=!0}else 2==k&&(b=I(v[0]),d=I(v[1]),P=!0);P&&(o&&b in _||(_[b]=d,y=!0),r&&y&&b&&d&&typeof d!=s&&(N(d,t)>=0||N(d,n)>=0)&&(_[b]=new j(d,t,n,o,r)))}}(e=j.prototype).toString=e.valueOf=function e(t,n,o,r){var l,c,u,d=[];for(l in t=t||"&",n=n||"=",this)c=typeof(u=this[l]),u&&c==a||(u&&c==s&&(u=u.tagName||u.nodeType?"#node":e.apply(u,[t,n,o,r])),o&&(l=C(l)),r||(u=C(u)),d.push(l,n,u,t));return d[f]&&(d[d[f]-1]=""),i(d)},r=y("$sf.lib.lang",{ParamHash:j,cstr:i,cnum:l,cbool:function(e){return!(!e||"0"==e||"false"==e||"no"==e||"undefined"==e||"null"==e)||M},noop:function(){},trim:b,callable:h,guid:function(e){return i([e||"","_",g(),"_",v(),"_",$++])},mix:m,time:g,rand:v,def:y,ns:function(e,n){var o,r,l,c=/\[(('|")?)((\s|.)*?)(('|")?)\]/gm,s=/\./gm,a=0,f="",d=!0;if(o=n=n||t,e)if(e=i(e))if(r=(e=b(e)).match(/(\[(.{1,})\])|(\.\w+)/gm))for(f=e[u](/(\[.*)|(\..*)/g,""),r.unshift(f);l=r[a++];){if(!o[l=l[u](c,"$3")[u](s,"")]){d=M;break}o=o[l]}else o=o[l=e];else d=M;else d=M;return d&&o||M},jssafe_html:function(e){var t=i(e);return t&&(t=(t=(t=(t=(t=(t=(t=t.replace(/(]*>)(\s*?|.*?)(<\/noscript>)/gim,"")).replace(/\\/g,w)).replace(/\"/g,x)).replace(/\n/g,S)).replace(/\r/g,T)).replace(/<(\/)*script([^>]*)>/gi,L)).replace(/\t/gi," "),t=i([P,t,P]),t=P+t+P),t},isArray:function(e){return null!=e&&("string"!=typeof e&&(null!=e[f]&&e.constructor==Array))}}),y("$sf.env",{isIE:D}),n=i,l,o=h}(),function(){function t(e){var t=0;return parseFloat(e.replace(/\./g,(function(){return 1==t++?"":"."})))}function o(e,t,n){var o=e&&e.match(t);return null==n?o:o&&o[n]||null}function i(e,t){return e.test(t)}function l(r){var l,c={},a=new Date;if(!r&&K)return K;c.ie=c.opera=c.gecko=c.webkit=c.safari=c.chrome=c.air=c.ipod=c.ipad=c.iphone=c.android=c.webos=c.silk=c.nodejs=c.phantomjs=0,c.mobile=c.ios=c.os=null,c.accel=!1,c.caja=m&&m.cajaVersion,c.cks=M,(r=r||g||"")&&(i(/windows|win32/i,r)?c.os="windows":i(/macintosh|mac_powerpc/i,r)?c.os="macintosh":i(/android/i,r)?c.os="android":i(/symbos/i,r)?c.os="symbos":i(/linux/i,r)?c.os="linux":i(/rhino/i,r)&&(c.os="rhino"),i(/KHTML/,r)&&(c.webkit=1),i(/IEMobile|XBLWP7/,r)&&(c.mobile="windows"),i(/Fennec/,r)&&(c.mobile="gecko"),(l=o(r,/AppleWebKit\/([^\s]*)/,1))&&(c.webkit=t(l),c.safari=c.webkit,i(/PhantomJS/,r)&&(l=o(r,/PhantomJS\/([^\s]*)/,1))&&(c.phantomjs=t(l)),i(/ Mobile\//,r)||i(/iPad|iPod|iPhone/,r)?(c.mobile="Apple",l=(l=o(r,/OS ([^\s]*)/,1))&&t(l.replace("_",".")),c.ios=l,c.ipad=c.ipod=c.iphone=0,(l=o(r,/iPad|iPod|iPhone/,0))&&(c[l[v]()]=c.ios)):((l=o(r,/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/,0))&&(c.mobile=l),i(/webOS/,r)&&(c.mobile="WebOS",(l=o(r,/webOS\/([^\s]*);/,1))&&(c.webos=t(l))),i(/ Android/,r)&&(c.mobile="Android",(l=o(r,/Android ([^\s]*);/,1))&&(c.android=t(l))),i(/Silk/,r)&&((l=o(r,/Silk\/([^\s]*)\)/,1))&&(c.silk=t(l)),c.android||(c.android=2.34,c.os="Android"),i(/Accelerated=true/,r)&&(c.accel=!0))),(l=r.match(/(Chrome|CrMo)\/([^\s]*)/))&&l[1]&&l[2]?(c.chrome=t(l[2]),c.safari=0,"CrMo"===l[1]&&(c.mobile="chrome")):(l=o(r,/AdobeAIR\/([^\s]*)/))&&(c.air=l[0])),c.webkit||((l=o(r,/Opera[\s\/]([^\s]*)/,1))?(c.opera=t(l),(l=o(r,/Opera Mini[^;]*/,0))&&(c.mobile=l)):(l=o(r,/MSIE\s([^;]*)/,1))?c.ie=t(l):(l=o(r,/Gecko\/([^\s]*)/))&&(c.gecko=1,(l=o(r,/rv:([^\s\)]*)/,1))&&(c.gecko=t(l)))));try{a.setTime(a.getTime()+1e3),h.cookie=n(["sf_ck_tst=test; expires=",a.toGMTString(),"; path=/"]),-1!=h.cookie.indexOf("sf_ck_tst")&&(c.cks=!0)}catch(e){c.cks=M}try{typeof e==s&&e.versions&&e.versions.node&&(c.os=e.platform,c.nodejs=numberify(e.versions.node))}catch(e){c.nodejs=0}return c}(K=l()).parse=l,r.def("$sf.env.ua",K,null,!0)}(),function(){function e(){X&&(clearTimeout(X),X=0)}function c(e){K(t,"load",c),K(t,"DOMContentLoaded",c),F=!0}function s(){var t,n,o,r;if(e(),B>=300&&(z=null,F=!0),null===F){try{o=(n=(t=h&&h.body)&&_("*",t))&&n[f],r=t&&t.lastChild}catch(e){W=0,z=null}W&&o==W&&r==z?(z=null,F=!0):(W=o,z=r,B+=1,X=setTimeout(s,50))}else z=null}function a(e){var t,n=O(e,"id");(t=n&&V[n])&&(K(e,"load",t),V[n]=null,delete V[n])}function u(e){return e&&"string"==typeof e&&g(e)||e}function d(e,n,o,r){try{J||(J=i.msghost)}catch(e){J=null}if(t==top)return e&&J&&J[e]&&J[e](n,o,r)}function p(e){var t=null;try{e&&(t=9==e.nodeType?e:e.document||e.ownerDocument||null)}catch(e){t=null}return t}function m(e){var t,n=null;try{e&&((n=e.parentWindow||e.defaultView||null)||(n=(t=p(e))&&(t.parentWindow||t.defaultView)||null))}catch(e){n=null}return n}function g(e){var t,n=arguments,o=n[f];return(t=o>1?p(n[1]):h)&&t.getElementById(e)||null}function T(e){return e&&1==e.nodeType&&e.tagName[v]()||""}function _(e,t){var n=[];try{n=t&&t[x]?t[x](e)||n:h[x](e)||n}catch(e){n=[]}return n}function P(e){return e&&(e.parentNode||e.parentElement)}function O(e,t,o){try{arguments[f]>2?null===o?j?e[w](t,0):e[w](t):(o=n(o),"class"==t[v]()?e.className=o:j?e[y](t,o,0):e[y](t,o)):o=n(j?e[b](t,0):e[b](t))}catch(e){o=""}return o}function S(e,t){var o;try{o=e.style,arguments[f]>1?o.cssText=n(t):t=o.cssText}catch(e){t=""}return t}function E(e,t){return(arguments[f]>1&&p(t)||h).createElement(e)}function A(e,t){var n=M;try{e&&(n=e.appendChild(t))}catch(e){n=M}return n}function R(e){var t,n=M,o="iframe"==T(e);o&&(d("detach",e),a(e),D||O(e,"src","about:blank"));try{(t=P(e))&&(t.removeChild(e),n=!0,D&&o&&l())}catch(e){}return e=t=null,n}function $(e,t,n){try{I?e[C]("on"+t,n):e[C](t,n,M)}catch(e){}e=n=null}function K(e,t,n){try{I?e.detachEvent("on"+t,n):e.removeEventListener(t,n,M)}catch(e){}e=n=null}function q(){var t;return e(),F?(z=null,!0):((t=h.readyState)&&(z=null,F="loaded"==t||"complete"==t||M),z=null,B=W=0,s(),!!F)}function Q(e){var t;if(q())try{r.callable(e)&&e()}catch(t){t=null}else setTimeout((function(){Q(e),e=null}),51)}function Z(e){var n="";if(e=e||t.event){try{e.returnValue=M}catch(e){}try{e.cancelBubble=!0}catch(e){}try{e.stopped=!0}catch(e){}for(n in N)if(N[n])try{e[n]()}catch(e){}}return M}function ee(e){var n=null;try{n=(e=e||t.event)?e[U]||e[Y]:null}catch(e){n=null}return n}function te(e,t,n,o,r){return ne(e,t,n,o,r)}function ne(e,t,r,i,l,c){var s,p,h,m,g,v=["<","iframe"," "],b="";if(c)h=e;else{if("iframe"!=T(e=u(e)))return null;h=e.cloneNode(M)}for(s in"src"in(t=t||{})?O(h,"src",null):t.src=O(e,"src")||"about:blank","name"in t?O(h,"name",null):t.name=O(e,"name"),t.src||(t.src="about:blank"),b=l&&d("prep",t),c||(O(h,"width",null),O(h,"height",null)),r&&((p=S(h))&&";"!=p.charAt(p[f]-1)&&(p+=";"),S(h,[p,n(r)])),A(p=E("div"),h),g=p.innerHTML.replace(/(.*?)<\/iframe>/gim,"$1"),v.push('name="',t.name,'" ',g,">"),delete t.name,p.innerHTML=n(v),m=p.firstChild,t)O(m,s,t[s]);return O(m,"id")||(O(m,"id","sf_iframe_"+G),G++),O(m,"FRAMEBORDER","no"),O(m,"SCROLLING","no"),O(m,"ALLOWTRANSPARENCY",!0),O(m,"HIDEFOCUS",!0),O(m,"TABINDEX",-1),O(m,"MARGINWIDTH",0),O(m,"MARGINHEIGHT",0),function(e,t){var n,r;o(t)&&(n=function(o){var i=ee(o);if(a(i),i&&t)try{t.call(i,o)}catch(e){}i=e=t=n=r=null},r=O(e,"id"),a(e),r&&(V[r]=n),$(e,"load",n)),n=null}(m,i),b&&d("attach",m,b,l),b=l=h=i=e=p=null,m}function oe(e,t,n,o){return ne(E("iframe"),e,t,n,o,!0)}!function(){var e,n;D?(U="srcElement",Y="target",O(e=E("iframe"),"SCROLLING","no"),j="no"!=O(e,"SCROLLING"),l=L in t?function(){H&&clearTimeout(H),H=setTimeout((function(){try{t[L]()}catch(e){}}),3e3)}:_lang.noop):(U="target",Y="currentTarget"),t.addEventListener&&!D?(C="addEventListener","removeEventListener"):D&&(I=!0,C="attachEvent","detachEvent"),e=null;try{e=h.createEvent("UIEvent")}catch(t){e=null}if(!e)try{e=h.createEvent("UIEvents")}catch(t){e=null}if(e)for(n in N)e[n]&&(N[n]=1);e=null,$(t,"load",c),$(t,"DOMContentLoaded",c),i=r.def("$sf.lib.dom",{doc:p,view:m,elt:g,tagName:T,tags:_,par:P,make:E,css:S,attr:O,gc:l,append:A,purge:R,attach:$,detach:K,ready:q,wait:Q,evtCncl:Z,evtTgt:ee},null,!0)}(),r.def("$sf.lib.dom.iframes",{make:oe,clone:te,replace:function(e,t,o,r,i){var l,c,s,f,p,m;c=(p=T(c=(f=(e=e||{}).id)&&u(f)))?c:null,(s="iframe"==p?c:null)?(d("detach",s),a(s),m=P(s),O(l=te(s,e,t,r,i),"onload",null),O(l,"onreadystatechange",null)):(o&&T(o=u(o))&&(m=o),!m&&c&&(m=P(c)),l=oe(e,t=n(t)||S(c)||"",r,i));try{m?s?m.replaceChild(l,s):c?m.replaceChild(l,c):A(m,l):A(h.body,l)}catch(e){}return l=c=e=s=m=r=null,g(f)},view:function(e){var t,n,o,r,i,l,c=0;try{if(!(t=e.contentWindow||null))for(r=(n=(o=p(e))&&m(o))&&n.frames||[];i=r[c++];){try{l=i.frameElement}catch(e){l=null}if(l&&l==e){t=i;break}}}catch(e){t=null}return t}},null,!0),r.def("$sf.lib.logger",{log:function(e){t.console&&console.log&&console.log(e)},error:function(e){t.console&&console.error?console.error(e):t.console&&console.log&&console.log(e)}},null,!0),r.def("$sf.info",{errs:[],list:[]},null,!0),k.prototype.trim||(k.prototype.trim=r.trim)}()}(window)}).call(this,n(1))},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:l}catch(e){o=l}}();var s,a=[],u=!1,f=-1;function d(){u&&s&&(u=!1,s.length?a=s.concat(a):f=-1,a.length&&p())}function p(){if(!u){var e=c(d);u=!0;for(var t=a.length;t;){for(s=a,a=[];++f1)for(var n=1;n0){var t=navigator.mimeTypes;t&&t[w]&&t[w].enabledPlugin&&t[w].enabledPlugin.description&&((e=t[w].enabledPlugin).version?me=e.version:e.description&&(me=e.description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]))}else if(x.env.isIE){var n,o,r;for(n=0;n-1?o.substr(r+1).replace(/,/gi,"."):o.replace(/,/gi,".");break}catch(e){null,me=0;continue}}else me=0;return me}function _e(){var e=!!navigator.cookieEnabled;return void 0!==navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!=document.cookie.indexOf("testcookie"),navigator&&(navigator.cookieEnabled=e)),e}function Pe(e){var t=e&&H(e)||J,n=t.compatMode,o=t[p];return n&&!ee&&"CSS1Compat"!=n&&(o=t.body),o}function Oe(e){var t=null;try{e&&(t=9==Le(e)?e:e[h]||e.ownerDocument||null)}catch(e){t=null}return t}function Se(e){return e&&(e.parentNode||e.parentElement)}function Ee(e){return 1===Le(e)}function Le(e){return C(e&&e.nodeType,-1)}function Ce(e){return 1===Le(e)&&e.tagName.toLowerCase()||""}function Ie(e){return!(!(e=I(e))||-1!=e.search(/\D+/g))||(!(!e||-1==e.search(/px/gi))||void 0)}function Me(e){var t,n,o,r,i=[-1,-1,-1,-1],c=["clipTop","clipRight","clipBottom","clipLeft"],s=0;if(!e)return i;if(q)for(;n=c[s];)Ie(t=e[n])&&(t=C(t,-1))>=0&&(i[s]=t),s++;else if((t=e.clip)&&-1!=t.search(/\d+/g))for(r=(i=(i=(t=t.replace(/\w+\(([^\)]*?)\)/g,"$1")).split(" "))[l]<=1?i.split(","):i)[l],s=0;r--;)Ie(o=i[s])?i[s]=C(o,-1):i[s]=-1,s++;return i}function Ne(e,t,n){var o=0,r=0;return(n=n||je(e))&&(o=st.borderTopWidth,r=st.borderLeftWidth,o=Ie(o)?C(o,0):0,r=Ie(r)?C(r,0):0,Z&&/^t(?:able|d|h|r|head|foot)$/i.test(F(e))&&(o=r=0)),(t=t||{t:0,l:0}).t+=o,t.l+=r,t}function Ae(e){var t,n,o,r,i={x:0,y:0,w:0,h:0},l={scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0},c=0,s=0;return n=(t=H(e)||J)[p]||l,r=t.body||l,(o=t.defaultView)&&(c=C(o.pageXOffset,0),s=C(o.pageYOffset,0)),i.x=G(n.scrollLeft,r.scrollLeft,c),i.y=G(n.scrollTop,r.scrollTop,s),i.w=G(n.scrollWidth,r.scrollWidth,0),i.h=G(n.scrollHeight,r.scrollHeight,0),i}function Re(t){var n,o,r,i,l,c,s,a,d,p,m={t:0,l:0,r:0,b:0,w:0,h:0,z:0},v="getBoundingClientRect",y=0,w=0,x=0,k=0,T=!1,P=Oe(t)||e[h],O=P.compatMode,S=P.documentMode||0;if(Ee(t))try{if(l=je(t),n=Pe(t),o=Ae(t),m.l=t.offsetLeft||0,m.t=t.offsetTop||0,r=t,i=null,T=Z||Q>519,!(t===n)&&t[v])K&&(!S||S>0&&S<8||"BackCompat"===O)&&(s=n.clientLeft,a=n.clientTop),d=t[v](),m.t=d.top,m.l=d.left,(s||a)&&(m.l-=s,m.t-=a),(o.y||o.x)&&(!_.ios||_.ios>=4.2)&&(m.l+=o.x,m.t+=o.y);else{for(;(r=r.offsetParent)&&Ee(r)&&i!==r;)s=r.offsetLeft,a=r.offsetTop,m.t+=a,m.l+=s,T&&(m=Ne(r,m)),i=r;if("fixed"!=l.position){for(r=t,i=null;(r=r.parentNode)&&Ee(r)&&i!==r&&r!=n;)y=r.scrollTop,w=r.scrollLeft,Z&&"visible"!=(c=je(r))[g]&&(m=Ne(r,m,c)),(y||w)&&(m.l-=w,m.t-=y),i=r;m.l+=o.x,m.t+=o.y}else m.l+=o.x,m.t+=o.y}t==n?(k=t[f],x=t[u]):(k=t.offsetHeight,x=t.offsetWidth),m.b=m.t+k,m.r=m.l+x,m.w=G(x,0),m.h=G(k,0),m.z=l.zIndex}catch(p){p&&p[b]||(p={message:"null exception"}),ke("sf Exception in rect calculation tag - "+Ce(t)+" : "+p[b],!0),m={t:0,l:0,r:0,b:0,w:0,h:0,z:0}}return m}function De(e){var t=Pe(e),n=0,o=0;return t&&(n=t.scrollWidth||0,o=t.scrollHeight||0),{t:0,l:0,b:o,r:n,w:n,h:o}}function $e(e,t){var n=!1,o=e&&e.nodeType||-1,r=t&&t.nodeType||-1;if(1==o&&-1!=r)if(e.contains)if(ee||1==r)n=e.contains(t);else for(;t;){if(e===t){n=!0;break}if((t=t.parentNode)==J[p])break}else e.compareDocumentPosition&&(n=e===t||!!(16&e.compareDocumentPosition(t)));return n}function je(e,t){var n="",o=!(!arguments[l]||!t),r="getComputedStyle";if(o)if(q)try{n=e.currentStyle[t]}catch(e){n=""}else try{n=W(e)[r](e,null)[t]}catch(e){n=""}else if(q)try{n=e.currentStyle}catch(e){n=null}else try{n=W(e)[r](e,null)}catch(e){n=null}return n}function He(e,t,n){var o,r,i,l,c,s,a,u,f,d,p,h,m,g,v,b,y=Re(e),w=Oe(e),x=Pe(w),k=y.t,T=y.l,_=[],P=0;if(_.on=0,t=C(t,0,0),n=C(n,0,0),k&&!y.h&&n&&(y.h=n,y.b=k+n),T&&!y.w&&t&&(y.w=t,elrect.r=T+t),o=y.w,r=y.h,c=i=U(o/10),s=l=U(r/10),o<=1||r<=1||i<1||l<1)return _;if(v=(b=Ae()).y,g=b.x,h=T+o,m=k+r,w&&x&&w.elementFromPoint){for(;c-1?te.href.substr(0,t):te.href).indexOf("?"))>-1&&(e=e.substr(0,t)),escape(e)}();return e&&(t=e.name,n=Y(t),r=0!=(r=(o=I(e.src))&&o.substring(0,o.indexOf("/",9))).search(/http/gi)?"":r,(l=Y(n)).id=e.id||"iframe_"+A(),l.src=o,l.srcHost=r,l[y]=l[y]||A(),l.host=ne,l.loc=c,l.proxyID="",Be()?(l.html5=1,l.proxyPath=""):(i=Fe("prep",l))&&(l=i),e.name=l),l}function Ge(t,n,o){var r;"iframe"==F(t)&&(r=j(t,"id"))&&n&&n instanceof Y&&r==n.id&&(Be()?(re[r]=n,n._xmsgcb=o,ae||(S.attach(e,b,We),ae=!0)):Fe("attach",t,n,o))}function Ve(t){var n=j(t,"id"),o=n&&re[n],r=!0;if(o){for(n in o&&(o._xmsgcb=re[n]=null,o=null,delete re[n]),n="",re)if((o=re[n])&&o[y]){r=!1;break}r&&Be()&&ae&&(ae=!1,S.detach(e,b,We)),t=o=null}else Fe("detach",t)}function Ue(e){var t,n,o=[],r=arguments,i=r[l],c=0,s=!1;if(ge&&(t=ge[e])){for(;i--;)(n=r[c++])!=e&&o.push(n);try{s=t.apply(null,o)}catch(e){s=!1}}return s}function Ye(e){var n=e&&ie[e];n&&(clearTimeout(n),mt(e),Ue(t,"render-timeout",e)),at()||(pe="")}function Je(){fe&&(clearTimeout(fe),fe=0)}function Ke(){de&&(clearTimeout(de),de=0)}function qe(e){Ke(),de=setTimeout((function(){!function(e){var n,o,r,i,l;for(n in oe)o=oe[n],i=o&&o.dest,i&&D(i)&&o&&(r=Y(),l=Y(),r.pos=n,r.cmd=l.cmd="focus-change",r.value=e,Ue(t,n,"focus-change",e),ut(o,r));Ke()}(e)}),2)}function Qe(e){Je(),fe=e?setTimeout(tt,750):setTimeout(et,750)}function Ze(e){var n,o,r,i,l,c;for(n in oe)e&&n in ce||(l=(i=(o=oe[n])&&o.dest)&&D(i))&&o&&(c=pt(n,l,!0),(r=Y()).pos=n,r.cmd="geom-update",r.geom=B(c),Ue(t,n,"geom-update",c),ut(o,r));Je()}function et(){Ze()}function tt(){Ze(!0)}function nt(e){qe(!0)}function ot(t){qe(e[h].hasFocus())}function rt(e){Qe(1)}function it(e){Qe()}function lt(t){var n,o;Je();try{for(n in S.detach(e,a,rt),S.detach(e,"resize",it),S.detach(e,"unload",lt),S.detach(e,"focus",nt),S.detach(e,"blur",ot),ce)(o=ce[n])&&(o.tID&&clearTimeout(o.tID),S.detach(ce[n],a,o.onscroll),o.onscroll=o.node=null),ce[n]=null,delete ce[n];ue=!1}catch(e){}}function ct(e){var n,o,r=!1;if((n=Y(e,null,null,!0,!0))&&n.pos&&(o=oe[n.pos]))switch(n.cmd){case"exp-push":ht(n,!0),r=!0;break;case"exp-ovr":ht(n),r=!0;break;case"collapse":!function(e,n,o){var r,l=e&&e.pos,a=l&&oe[l],u=a&&a.conf,f=u&&u.dest,d=f&&D(f),p=d&&D("sf_pos_rel_el_"+l),h=d&&d[i],m=p&&p[i];if(!(l&&a&&d&&p))return;if(!a.expanded)return;(r=ce[l])&&r.tID&&clearTimeout(r.tID);if(Je(),!o&&Ue("onBeforePosMsg",l,"collapse",0,0))return;h.left=h.top="0px",m[c]=h[c]=u.w+s,m.height=h.height=u.h+s,h.zIndex=a.dx=a.dy=0,dt(f),o||(Ue(t,l,"collapse",0,0),e.cmd=n?"collapsed":"collapse",e.geom=B(pt(l,d,!0)),ut(a,e));d=h=p=m=a=e=null}(n),r=!0;break;case"msg":!function(e,n){var o=e&&e.pos,r=o&&oe[o],l=r&&r.conf,c=l&&l.dest,s=c&&D(c),a=s&&D("sf_pos_rel_el_"+o);s&&s[i],a&&a[i];Ue(t,e.pos,"msg",e.msg),n||(e.cmd="msg",e.geom=B(pt(o,s,!0)),ut(r,e))}(n),r=!0;break;case"error":!function(e){var n=e&&e.pos,o=n&&oe[n],r=o&&o.conf,l=r&&r.dest,c=l&&D(l),s=c&&D("sf_pos_rel_el_"+n);c&&c[i],s&&s[i];x&&x.info&&x.info.errs&&x.info.errs.push(e);Ue(t,n,"error",e)}(n),r=!0;break;case"geom-update":x.lib.logger.log("Geom update complete: "+n.pos),r=!0;break;case"read-cookie":o.conf&&o.conf.supports&&o.conf.supports[n.cmd]&&"0"!=o.conf.supports[n.cmd]?(!function(e,n){var o,r,i=e&&e.pos,l=i&&oe[i],c=l&&l.conf,s=c&&c.dest,a=s&&D(s),u="read-cookie";if(!c.supports||!c.supports[u]||"0"==c.supports[u])return;if(!i||!l||!a)return;if(!(o=e.cookie))return;r=function(){var e,t,n,o={};for(e=document.cookie.split("; "),t=e.length-1;t>=0;t--)n=e[t].split("="),o[n[0]]=n[1];return o}(),Ue(t,u,i,0,0),e.cmd=u,e.geom=B(pt(i,a,!0)),e.value=r[o],ut(l,e),a=l=e=null}(n),r=!0):r=!1;break;case"write-cookie":o.conf&&o.conf.supports&&o.conf.supports[n.cmd]&&"0"!=o.conf.supports[n.cmd]?(!function(e,n){var o,r,i=e&&e.pos,l=i&&oe[i],c=l&&l.conf,s=c&&c.dest,a=s&&D(s),u="write-cookie";if(!c.supports||!c.supports[u]||"0"==c.supports[u])return;if(!i||!l||!a)return;if(!(o=e.cookie))return;r=escape(e.value);var f=new Date;f.setDate(f.getDate()+1);var d=r+"; expires="+f.toUTCString();document.cookie=o+"="+d,Ue(t,u,i,0,0),e.cmd=u,e.geom=B(pt(i,a,!0)),e.info=r,e.value="",ut(l,e),a=l=e=null}(n),r=!0):r=!1}return r}function at(){var e,t=!0;for(e in ie){t=!1;break}return t}function ut(e,t){pe="sending-msg-down-"+t.cmd,setTimeout((function(){var n=e&&e.dest;n&&t&&ze(n,t.toString()),pe="",t=n=e=null}),1)}function ft(){var e=this,t=j(e,"_pos_id");ie[t]&&(clearTimeout(ie[t]),delete ie[t],le[t]=t,j(e,"_pos_id",null),j(e,"name",null),e[i].visibility="inherit",e[i].display="block",Ue("onEndPosRender",t)),at()||(pe="")}function dt(e,t,n,o,r){if(K){var l=D(e),a="shm_"+e,u=D(a);if(t){if(u)return void(u[i].visibility="visible");u=E.clone(l,{id:a,src:"",name:a},[c,":",n,s,";position:absolute;","height",":",o,s,";z-index:",r-1,";filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0)"]),S.append($(l),u)}else!t&&u&&(u[i].visibility="hidden")}}function pt(e,n,o){var r,i,l,c,s,u=Y(),f={};try{S.bounds(n,f,!0),o||f.isRoot||!f.canScroll||((l=f.expRect).xs||l.ys)&&(r=ce[e],i=f.refNode,r&&r.node!=i&&(r.tID&&clearTimeout(r.tID),S.detach(void 0,a,r.onscroll),r.node=r.onscroll=null,ce[e]=null,delete ce[e]),ce[e]||((r={}).node=i,r.onscroll=function(n){!function(e,n,o){var r=ce[n];r&&(r.tID&&(clearTimeout(r.tID),delete r.tID),r.tID=setTimeout((function(){var e,o,i=oe[n],l=i&&i.dest,c=l&&D(l);c&&i&&(e=pt(n,c,!0),(o=Y()).pos=n,o.cmd="geom-update",o.geom=B(e),Ue(t,n,"geom-update",e),ut(i,o)),delete r.tID}),750))}(0,e)},ce[e]=r,S.attach(i,a,r.onscroll)))}catch(s){u=null,ke("Exception in build_geom: "+(s&&s[b]||"NULL"),!0)}try{u&&(u.win=Y(S.winRect()),u.par=Y(f.clipRect),l=Y(f.expRect),(c=Y(f.rect)).iv=l.iv,c.xiv=l.xiv,c.yiv=l.yiv,delete l.iv,delete l.xiv,delete l.yiv,u.exp=l,u.self=c)}catch(s){u=null,ke("build_geom info error: "+(s&&s[b]||"NULL"),!0)}return u}function ht(e,n){var o,r,l,a,u,f,d,p,h,m,g,v,b,y,w,x,k,T,_,P,O=!1,S=!1,E=e&&e.pos;E&&(r=(o=oe[E])&&o.conf,o&&r&&(b=o.dest,l=D(b),a=D("sf_pos_rel_el_"+E),l&&a&&(u=l[i],f=a[i],u&&((P=ce[E])&&P.tID&&clearTimeout(P.tID),Je(),T=e.exp_obj,d=r.w,p=r.h,T?(y=C(T.t,0,0),w=C(T.l,0,0),x=C(T.r,0,0),k=C(T.b,0,0),g=C(d+w+x,0,0),v=C(p+y+k,0,0),y?(m=-1*y,S=!0):m=0,w?(h=-1*w,O=!0):h=0):(g=(O=(h=o.dx=C(e.dx))<0)?d+-1*h:d+h,v=(S=(m=o.dy=C(e.dy))<0)?p+-1*m:p+m),g<=d&&v<=p||Ue("onBeforePosMsg",E,"exp-ovr",h,m)||(u[c]=g+s,u.height=v+s,O&&(u.left=h+s),S&&(u.top=m+s),(_=C(o.z,0))||(_=3e3),u.zIndex=_,dt(b,!0,g,v,_-1),n?(f[c]=g+s,f.height=v+s):(f[c]=d+s,f.height=p+s),o.expanded=!0,e.dx=h,e.dy=m,e.w=g,e.h=v,e.cmd="expand",e.geom=B(pt(E,l,!0)),Ue(t,E,"exp-ovr",h,m),ut(o,e),u=a=l=o=e=null)))))}function mt(){var e,t,n,o,r,i,c,s,a=0,u=!0,f=arguments;if(!f[l]||"*"==f[a])for(e in f=[],oe)f.push(e);for(;e=f[a++];)if(t=oe[e]){e in ie&&(clearTimeout(ie[e]),delete ie[e]),e in le&&delete le[e],i=(o=(n=t.dest)&&D(n))&&$(o),-1!=S.attr(i,"id").indexOf("sf_pos_rel_el")&&(i=$(r=i)),S.purge(o),r&&S.purge(r);for(s=$sf.info.list.length-1;s>=0;s--)if((c=$sf.info.list[s])&&c.id===e){$sf.info.list.splice(s,1);break}oe[e]=null,delete oe[e],o=S.make("div"),S.attr(o,"id",n),S.append(i,o)}for(e in e="",oe){u=!1;break}u&&(pe="",lt())}O&&e==top&&(O.def("dom",{rect:Re,currentStyle:je,contains:$e,docRect:De,winRect:function(t){var n=t&&W(t)||e,o=n.innerHeight||0,r=n.innerWidth||0,i=n.screenY||n.screenTop||0,l=o+i,c=n.screenX||n.screenLeft||0,s=r+c,a=Pe(t);return o||r||!a||(o=a.clientHeight||0,s=c+(r=a.clientWidth||0),l=i+o),{t:i,l:c,b:l,r:s,w:r,h:o}},bounds:function(t,n,o,r,i){var c,s,d,p,h,b,y,w,x,k,T,_,P,O,S,E,L,I,M,N,A,R,D,$,j,H,F,W,z,B,X,U,Y,J,K,q=t&&Se(t),Q=Pe(t),Z=Re(t),ee=Re(Q),te=Ae(Q),ne=De(t),oe={t:0,l:0,r:0,b:0,w:0,h:0},re={t:0,l:0,r:0,b:0,xs:0,ys:0,xiv:0,yiv:0,iv:0,w:0,h:0},ie=[],le=!1,ce={left:null,right:null,top:null,bottom:null};if(n=n&&"object"==typeof n?n:{},r=C(r,0,0),i=C(i,0,0),!Z.h&&i&&(Z.h=i,Z.b=Z.t+i),!Z.w&&r&&(Z.w=r,Z.r=Z.l+r),q)for(c=ee.t,s=ee.l,d=ee.r,p=ee.b;(y=je(q))&&("block"!=y.display&&"absolute"!=y.position&&"none"==y.float&&"none"==y.clear||(le=q==Q,k=(J=Re(q)).t,T=J.l,_=J.r,P=J.b,N=y[g+"X"],A=y[g+"Y"],R=y[g],D=le?[-1,-1,-1,-1]:Me(y),K=!1,le?(O=te.w,L=te.h):(O=q.scrollWidth,L=q.scrollHeight),S=q.offsetWidth,I=q.offsetHeight,E=q[u],M=q[f],!b&&S>E&&(b=S-E),!h&&I>M&&(h=I-M),le?(O>E&&((T=0)>s&&(s=T),(_=(e.innerWidth||S)+te.x)M&&((k=0)>c&&(c=k),(P=(e.innerHeight||I)+te.y)s&&(s=T,ce.left=q),_E)&&(ie.push(q),K=!0)),D[3]>0&&(W=T+D[3])>s&&(s=W,ce.left=q),D[1]>0&&(z=_+D[1])c&&(c=k,ce.top=q),PM)&&(ie.push(q),K=!0)),D[0]>0&&(H=k+D[0])>c&&(c=H,ce.top=q),D[2]>0&&(F=J.t+D[2])x?x:j,$=($=($=V(_,z)-G(T,W))<0?0:$)>w?w:$,re.t=HP?P<=H?0:G(F-P,0):0,re.l=W_?_<=W||F<=k?0:G(z-_,0):0,re.w=G(re.r-re.l,0),re.h=G(re.b-re.t,0),re.xiv=w>0?C(($/w)[v](2)):0,re.yiv=x>0?C((j/x)[v](2)):0,re.iv=w>0||x>0?C(($*j/(w*x))[v](2)):0,re.civ=0,o&&re.iv>.49&&(B=(Y=He(t,r,i))[l],(X=C(Y.on,0))&&(U=1-C((X/B)[v](2),0),re.civ=re.iv=U)),n.rect=Z,n.clipRect=oe,n.docRect=ne,ie[l]?(n.isRoot=!1,n.canScroll=!0,re.xs=!!h,re.ys=!!b):ee.b>=oe.b||ee.r>=oe.r?(n.isRoot=!0,re.xs=!!(ne.w>ee.w&&h),re.ys=!!(ne.h>ee.h&&b),n.canScroll=ne.w>ee.w||ne.h>ee.h):re.ys=re.xs=n.isRoot=n.canScroll=!1,n.scrollNodes=ie,n.clipNodes=ce,n.expRect=re,re},overlaps:He},P,!0),O&&(O.def("msghost",{prep:Xe,attach:Ge,detach:Ve,usingHTML5:Be,send:ze},S,!0),"xdm-html5-init-"+A(),ne=0==ne.indexOf("file")?ne="file":ne,function(t){var n;if(!("onmessage"in e))return n=function(){},S.attach(e,b,n),"function"==typeof e.onmessage?(se=!0,void S.detach(e,b,n)):void(se=!1);se=!0}()),O.def("$sf.host",{Config:ye,PosConfig:we,PosMeta:xe,Position:function e(t,n,r,i){var l,c=this,s=t&&typeof t;return c instanceof e?null==ge?ke("Publisher Config not initialized - abort",!0):(s==o?R(c,t):l=c.id=I(t)||A("sf_pos"),n?(c.html=n,c.src=""):c.src?c.html=function(e){if(e){if(e.indexOf("${sf_ver}")>-1&&(e=e.replace(/\${sf_ver}/gi,$sf.ver)),e.indexOf("${ck_on}")>-1){var t=_e()?"1":"0";e=e.replace(/\${ck_on}/gi,t)}if(e.indexOf("${flash_ver}")>-1){var n=Te();e=e.replace(/\${flash_ver}/gi,n)}}return I([""])}(c.src):(c.html=c.html||"",c.src=""),c.html||(c.html=""),null==r||r instanceof xe||(r=new xe(r)),c.meta=r||c.meta||new xe,c.conf=i||c.conf||{},void(l&&(ge&&ge.positions[l]?c.conf=ge.positions[l]:i&&(i.id=l,c.conf=new we(i))))):new e(t,n,r,i)},nuke:mt,get:function(e){var t=oe[e];return t?R({},t):null},render:function t(){var n,o,r,u,f,d,p,h,m,g,v,b,y,w,x,k,T=0,_=arguments,P="relative",L="absolute",C="top:0px;left:0px;visibility:hidden;display:none;max-width:none;max-height:none;";if(!ge)return!1;if(!S.ready())return S.wait((function(){t.apply(null,_),_=null})),null;for(_[0]instanceof Array&&1==_[l]&&(_=_[0]);n=_[T++];)if((r=(o=n.id)?ge.positions[o]:null)&&(u=(m=r.dest)&&D(m))){if(b=r.w,y=r.h,!b){try{b=u.offsetWidth}catch(e){b=0}b&&(r.w=b)}if(!y){try{y=u.offsetHeight}catch(e){y=0}y&&(r.h=y)}if(b&&y){h=new Y,d=D(g="sf_pos_rel_el_"+o),p=$(u),d&&p==d&&(p=$(d)),dt(m),(x=ie[o])&&clearTimeout(x),(x=le[o])&&delete le[o],ie[o]=setTimeout((function(){Ye(o)}),ge.to),pe="rendering",Ue("onStartPosRender",o,r,n),v=["position:","",";z-index:0;",c,":",b,s,";","height",":",y,s,";","visibility:inherit;"],d?((w=d[i]).width=b+s,w.height=y+s,(w=u&&u[i]).width=b+s,w.height=y+s):(v[1]=P,(d=S.make("div")).id=g,d.className="iab_sf",f=u.cloneNode(!1),S.css(f,v),d.appendChild(f),S.css(d,v),p.replaceChild(d,u),u=D(m)),h.id=o,h.dest=m,h.conf=Y(r),h.meta=n.meta.toString(),h.html=B(n.html),h.geom=B(pt(o,u)),h.src=ge.renderFile,h.has_focus=O.cstr(document.hasFocus()),v[1]=L,v[13]=C,ue||(S.attach(e,a,rt),S.attach(e,"resize",it),S.attach(e,"unload",lt),S.attach(e,"focus",nt),S.attach(e,"blur",ot),ue=!0);var I="allow-forms allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation";E.replace({id:m,name:h,src:ge.renderFile,_pos_id:o,sandbox:I},v,d,ft,ct),oe[o]=h,delete(k=$sf.lib.lang.mix({},h,!1,!0)).geom,delete k.has_focus,$sf.info.list.push(k)}}},status:function(){return pe}},null,!0))}(window)}]); \ No newline at end of file