/* * @overview underscore - JavaScript's utility _ belt * @copyright Copyright (c) 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * @license Licensed under MIT license * See https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE * @version 1.8.0 */(function(){var H=(function y(x,k,c){function u(e,t){if(!k[e]){if(!x[e]){var o=typeof H=="function"&&H;if(!t&&o)return o(e,!0);if(r)return r(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var s=k[e]={exports:{}};x[e][0].call(s.exports,function(l){var d=x[e][1][l];return u(d||l)},s,s.exports,y,x,k,c)}return k[e].exports}for(var r=typeof H=="function"&&H,n=0;n"u")return t({type:"error"}),!1;s=new XDomainRequest,s.open(l,e),s.onload=function(){t&&t(JSON.parse(s.responseText))},s.onerror=function(){t({type:"error"})},s.onprogress=function(){}}s.send(i||null)},n.API=function(e){this.init(e)},n.API.prototype.init=function(e){c.isString(e)?this.key=e:c.isNone(e)||(this.key=e.key),this.key=this.key?this.key:r.EMB_API_KEY,this.protocol=window.location.protocol==="http:"?"http:":"https:"},n.API.prototype._buildUrl=function(e,t){if(c.isNone(this.key))return null;var o=this.protocol+"//api-cdn.embed.ly/"+e;return t=t||{},t.key||(t.key=this.key),o+"?"+n.safeCreateQuery(t)},n.API.prototype._data=function(e,t,o,i){if(u.console.log(e,t,o,i),c.isNone(i)&&c.isFunction(o)&&(i=o,o={}),c.isNone(i))return!1;if(c.isString(t)){o.url=t;var s=this._buildUrl(e,o);return n.ajax(s,function(p){p.url=t,i(p)}),!0}if(c.isArray(t)){if(t.length===0)return!1;var l=new n.Keeper(t,i),d=c.batch(t,10),f=function(p,v){return function(a){c.each(v,function(h,w){var m=a[w];m.original_url=h,p.each(m)})}};return c.each(d,function(p){o.urls=c.map(p,function(a){return encodeURIComponent(a)}).join(",");var v=this._buildUrl(e,o);n.ajax(v,f(l,p))},this),!0}return i({type:"error"}),!1},n.API.prototype.oembed=function(e,t,o){return this._data("1/oembed",e,t,o)},n.API.prototype.extract=function(e,t,o){return this._data("1/extract",e,t,o)},n.API.prototype.card=function(e,t,o){return this._data("1/card-details",e,t,o)},n.API.prototype.event=function(e,t){var o="api-"+n.random(10)+".embed.ly",i=this.protocol+"//"+o+"/1/e",s=i+"?"+n.safeCreateQuery(e);n.ajax(s,t)},n.Display=function(){},n.Display.prototype._buildUrl=function(e,t,o){var i={key:r.EMB_API_KEY,url:t},s=c.extend(i,c.isNone(o)?{}:o),l="://i-cdn.embed.ly/1/display"+(e==="display"?"":"/"+e);return(r.EMB_HTTPS?"https":"http")+l+"?"+n.safeCreateQuery(s)},n.Display.prototype.display=function(e,t){return this._buildUrl("display",e,t)},n.Display.prototype.crop=function(e,t){return this._buildUrl("crop",e,t)},n.Display.prototype.resize=function(e,t){return this._buildUrl("resize",e,t)},n.api=function(e){return new n.API(e)},n.display=function(){return new n.Display},x.exports=n},{"./browser.js":4,"./utils.js":29,conf:"conf"}],3:[function(y,x,k){var c=y("./utils"),u=y("./urlparse.js"),r={disallowed:["1kd60cb"]};r.allowed=function(n){if(!n)return!0;var e=u.getDomain(n);if(!e)return!0;var t=c.fullHash(e);return r.disallowed.indexOf(t)===-1},x.exports=r},{"./urlparse.js":28,"./utils":29}],4:[function(y,x,k){var c=y("./utils.js"),u=y("./dom.js"),r=y("./urlparse.js"),n=y("conf"),e={};e.supports={_test:function(t){var o=["Webkit","Moz","O","ms","Khtml"],i=document.createElement("div"),s=t.charAt(0).toUpperCase()+t.substr(1),l=[t];c.each(o,function(f){l.push(f+s)});for(var d=0;d"u"&&typeof window.msMatchMedia>"u")},rgba:function(){var t=document.createElement("div"),o=t.style.color;try{t.style.color="rgba(1,5,13,0.44)"}catch{}return t.style.color!==o},cors:function(){if(typeof XMLHttpRequest>"u")return!1;var t=new XMLHttpRequest;return"withCredentials"in t?!0:typeof XDomainRequest<"u"},flash:function(){if(typeof navigator.plugins<"u"&&navigator.plugins.length!==0)return!!navigator.plugins["Shockwave Flash"];try{return!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch{return!1}},canvas:function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))}},e.detect=function(){var t=function(o,i){i?u.addClass(document.body,o):u.addClass(document.body,"no-"+o)};t("touch",e.supports.touch()),t("boxshadow",e.supports.boxShadow()),t("borderradius",e.supports.borderRadius()),t("rgba",e.supports.rgba()),t("mediaquery",e.supports.mediaQuery())},e.console={_log:function(t,o){if((n.EMB_DEBUG||window.EMB_DEBUG)&&!c.isNone(window.console)&&window.console&&window.console[t])if(window.console[t].apply)window.console[t].apply(window.console,o);else{var i=Array.prototype.join.call(o,", ");window.console[t](i)}},log:function(){this._log("log",arguments)},error:function(){this._log("error",arguments)}},e.open=function(t,o,i,s,l,d){if(c.isNone(l)||c.isNone(d)){var f=e.window.center(i,s);l=f.top,d=f.left}var p=window.open(t,o,"scrollbars=no, resizable=1, width="+i+", height="+s+", top="+l+", left="+d);window.focus&&p.focus()},e.cookie={set:function(t,o,i,s){var l="";if(i){var d=new Date;d.setTime(d.getTime()+24*i*60*60*1e3),l="; expires="+d.toGMTString()}document.cookie=t+"="+o+l+"; path=/"+(s?"; secure":"")},get:function(t){for(var o=t+"=",i=document.cookie.split(";"),s=0;st};0>v&&(a=function(w){return t>w});var h=function(){clearInterval(i),e.console.log("duration",new Date().getTime()-f),u.detachEvent("scroll",s)};i=setInterval(function(){return l+=v,a(l)?(h(),!1):(window.scrollTo(0,l),void(p=!0))},10),s=function(){p&&l!==e.window.scrollY()&&h()},u.addEvent("scroll",s)},e.isSandboxIframe=function(){if(window.parent===window)return!1;try{var t=window.frameElement;return!t.src}catch{return!1}return!1},x.exports=e},{"./dom.js":7,"./urlparse.js":28,"./utils.js":29,conf:"conf"}],5:[function(y,x,k){var c=!1,u=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/,r=function(){};r.extend=function(n){function e(){!c&&this.init&&this.init.apply(this,arguments)}var t=this.prototype;c=!0;var o=new this;c=!1;for(var i in n)o[i]=typeof n[i]=="function"&&typeof t[i]=="function"&&u.test(n[i])?(function(s,l){return function(){var d=this._super;this._super=t[s];var f=l.apply(this,arguments);return this._super=d,f}})(i,n[i]):n[i];return e.prototype=o,e.prototype.constructor=e,e.extend=arguments.callee,e},x.exports=r},{}],6:[function(y,x,k){var c=y("./iframes/comms.js").one,u=y("./utils.js"),r={started:!1,instance:null};r.EVENTS=["xcomm.options.access","xcomm.media.recommend","xcomm.card.recommend","xcomm.log.event","xcomm.page.progress"],r.clear=function(){r.instance&&(r.instance.remove(),r.instance=null),r.started=!1},r.connect=function(n,e){if(!n||r.started)return!1;r.started=!0;var t=c(n,e);return r.instance=t,u.each(r.EVENTS,function(o){t.on(o,function(i){var s=o;i.listener&&(s={event:o,listener:i.listener}),n.notify(s,i)}),n.on(o,function(i){t.send(o,i)})}),t.on("xcomm.ready",function(o){n.notify("xcomm.ready",o)}),t},x.exports=r},{"./iframes/comms.js":13,"./utils.js":29}],7:[function(y,x,k){var c=y("./utils.js"),u=y("conf"),r={};r.toArray=function(n){return c.map(n,function(e){return e})},r.all=function(n){var e=[];return document.querySelectorAll?r.toArray(document.querySelectorAll(n)):e},r.one=function(n,e){var t=r.all(n,e);return t.length===0?null:t[0]},r.create=function(n,e,t,o){if(!n||!c.isString(n))return null;c.isString(e)&&c.isNone(t)&&(t=e,e={});var i;return i=o?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n),c.each(e,function(s,l){i.setAttribute(l,s)}),t&&r.text(i,t),i},r.set=function(n,e,t){if(!n||!c.isString(n))return null;c.isString(e)&&c.isNone(t)&&(t=e,e={});var o=r.one(n);return o?(c.each(e,function(i,s){o.setAttribute(s,i)}),c.isNone(t)||r.text(o,t),o):null},r.replace=function(n,e){c.assert(c.isElement(n),"replace requires an element to be replaced"),c.assert(c.isElement(e),"replace requires an element to replace with."),n.parentNode.replaceChild(e,n)},r.remove=function(n){return c.isElement(n)&&c.isElement(n.parentNode)?void n.parentNode.removeChild(n):!1},r.hide=function(n){return c.isString(n)&&(n=r.one(n)),c.isElement(n)&&(n.style.display="none"),n},r.show=function(n,e){return c.isString(n)&&(n=r.one(n)),c.isElement(n)&&(n.style.display=e?"inline-block":"block"),n},r.svg=function(n,e,t){return r.create(n,e,t,"http://www.w3.org/2000/svg")},r.children=function(n,e){return c.isElement(n)?c.reduce(n.childNodes,function(t,o){if(c.isElement(o)){if(!c.isNone(e)){if(o.namespaceURI&&o.namespaceURI==="http://www.w3.org/2000/svg"){if(o.nodeName!==e)return t}else if(e.toUpperCase()!==o.nodeName)return t}t.push(o)}return t},[]):[]},r.child=function(n,e){var t=r.children(n,e);return t.length!==0?t[0]:null},r.text=function(n,e){if(c.isString(n)&&(n=r.one(n)),!n||!c.isElement(n))return null;if(c.isNone(e))return n.innerText||n.textContent;var t=n.textContent===void 0?"innerText":"textContent";n[t]=e},r.hasClass=function(n,e){if(c.isString(n)&&(n=r.one(n)),!c.isElement(n)||!c.isString(e)||!e)return!1;var t=n.getAttribute("class");return c.isNone(t)?!1:(" "+t+" ").indexOf(" "+e+" ")>-1},r.addClass=function(n,e){if(c.isString(n)&&(n=r.one(n)),!c.isElement(n)||!c.isString(e)||!e||r.hasClass(n,e))return!1;var t=n.getAttribute("class");if(c.isNone(t))return n.setAttribute("class",e),!0;var o=t.split(" "),i=[];return c.map(o,function(s){var l=c.trim(s);l!==""&&i.push(l)}),i.push(e),n.setAttribute("class",i.join(" ")),!0},r.removeClass=function(n,e){if(c.isString(n)&&(n=r.one(n)),!c.isElement(n)||!c.isString(e)||!e)return!1;var t=n.getAttribute("class");if(c.isNone(t))return!1;var o=!1,i=c.reduce(t.split(" "),function(s,l){var d=c.trim(l);return d?d===e?(o=!0,s):(s.push(d),s):s},[]);return n.setAttribute("class",i.join(" ")),o},r.data=function(n,e,t){c.assert(n&&c.isElement(n),"dom.data needs an element."),c.assert(e&&c.isString(e),"dom.data needs an attr.");var o=c.camelCase(e,1);return c.isNone(t)?c.isNone(n.dataset)?n.getAttribute("data-"+e):c.isNone(n.dataset[o])?null:n.dataset[o]:void(c.isNone(n.dataset)?n.setAttribute("data-"+e,t):n.dataset[o]=t)},r.attrize=function(n){return n&&c.isObject(n)?c.map(n,function(e,t){return t+'="'+e+'"'}).sort().join(" "):""},r.event=function(n){var e=c.extend({},n||window.event);return e.target||(e.target=e.srcElement||document),e.target.nodeType===3&&(e.target=e.target.parentNode),!n.metaKey&&n.ctrlKey&&(e.metaKey=e.ctrlKey),e.stop=function(){n.preventDefault?n.preventDefault():n.returnValue=!1},e.pageX||e.pageY||!e.clientX&&!e.clientY||(e.pageX=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,e.pageY=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),e},r.addEvent=function(n,e,t){c.isNone(n)||(n.addEventListener?n.addEventListener(e,t,!1):n.attachEvent?n.attachEvent("on"+e,t):n["on"+e]=t)},r.detachEvent=function(n,e,t){c.isNone(n)||(n.removeEventListener?n.removeEventListener(e,t,!1):n.detachEvent?n.detachEvent("on"+e,t):n["on"+e]=null)},r.trigger=function(n,e){c.assert(c.contains(["click"],e),"Not a valid event");var t;n.dispatchEvent?(t=document.createEvent("MouseEvents"),t.initEvent(e,!0,!0),n.dispatchEvent(t,!0)):(t=document.createEventObject(),n.fireEvent("on"+e,t))},r.rect=function(n){try{return n.getBoundingClientRect()}catch{}return!1},r.onResize=function(n){var e;r.addEvent(window,"resize",function(){clearTimeout(e),e=setTimeout(n,100)})},u.EMB_DEBUG===!0&&(window.dom=r),x.exports=r},{"./utils.js":29,conf:"conf"}],8:[function(y,x,k){var c=y("./utils.js"),u=y("./swap.js"),r=y("./dom.js"),n=y("./mutations.js"),e={timeout:null,hub:null,selectors:{cards:[{selector:".embedly-card"},{selector:".reddit-card"}],button:[".embedly-button"],slideshow:[".embedly-slideshow"]},analytics:null,_queue:[]};e.add={},e.add.cards=function(t){if(c.isString(t)){if(t===".embedly-card")return!1;e.selectors.cards.push({selector:t})}else if(!c.isElement(t)&&c.isObject(t)){if(!t.selector&&!t.types)return!1;var o={};if(c.isArray(t.types)&&t.types.length>0&&(o.types=t.types),t.selector)o.selector=t.selector,e.selectors.cards.push(o);else{var i=e.selectors.cards.reduce(function(s,l){return l.selector===".embedly-card"?l:s},{});if(!i)return!1;i.types=o.types}}e.look()},e.add.button=function(t){c.isString(t)&&(e.selectors.button.push(t),e.look())},e.select=function(t,o){return t.substr(0,1)==="."?!!r.hasClass(o,t.substr(1)):!!c.contains(r.all(t),o)},e.each=function(t){var o,i;if(t.nodeName==="A"||t.nodeName==="BLOCKQUOTE"){for(o=0;o0){if(a=h[0],!a||!a.href)return!1;p.url=a.href}}else if(m){if(h=f.getElementsByTagName("a"),h.length===0)return!1;a=h[h.length-1],p.url=a.getAttribute("href")}}else a=r.child(w,"a"),p.url=a.getAttribute("href"),p.title=r.text(a),u.isNone(m)?p.description="0":p.description=r.text(m)}else f.nodeName==="A"&&(p.url=f.getAttribute("href"));u.each(["url","image","embed"],function(S){p.hasOwnProperty(S)&&(p[S]=n.sanitize(p[S]))});var E,j,_;if(u.each(document.getElementsByTagName("meta"),function(S){_=[S.getAttribute("name"),S.getAttribute("property")],u.contains(_,"twitter:site")?j=S.getAttribute("content"):u.contains(_,"twitter:creator")&&(E=S.getAttribute("content"))}),E?p.twitter_via=E:j&&(p.twitter_via=j),!p.url)return null;var b=n.parse(p.url);return b.valid()?(p.url=b.url,p.sandbox=l.sandbox(p.url),p.referrer||(p.referrer=document.URL),p.width&&(p.width=l.cleanWidth(p.width)),/thescore\.com/.test(p.referrer)&&(p.key="900b122ee8ee43f79b2240c831f24429"),p):null};var d=function(f,p,v,a){this.init(f,p,v,a)};d.prototype.init=function(f,p,v,a){if(this.elem=p,this.options=v,!v.url)return this.error=!0,this.frame=null,!1;this.error=!1,this.frame=l.build(p,v,f),this._done=a;var h=new t,w=h.callback();this.frame.one("card.load",function(_,b){w({iframe:_,doc:b})}),this._extract=h.callback(),this.extract=u.bind(function(_){return this.extracted?!1:(this.extracted=!0,void this._extract(_))},this),v.embed&&(this.media=h.callback());var m=p.parentNode;m&&m.offsetWidth&&(m.offsetWidth>600?this.frame.elem.style.width="600px":this.frame.elem.style.width=m.offsetWidth+"px");var E=r.create("div",{class:"embedly-card"}),j=r.create("div",{class:"embedly-card-hug"});E.appendChild(j),j.appendChild(this.frame.elem),m.insertBefore(E,p),this.frame.__appended(),h.wait(this.done,this)},d.prototype.done=function(f){var p=f[0].iframe,v=f[0].doc,a=f[1],h={};if(f.length===3&&(h=f[2].media),!this.frame.elem.parentNode)return!1;if(this.options.sandbox===!1)this.frame.ready(),this.frame.send("card.create",{options:this.options,extract:a,media:h});else{var w=function(E,j,_,b){return function(S){b.__tunnel=new s.Tunnel(b.__hub),S.create(v.body,{options:j,extract:_,media:h,tunnel:b.__tunnel})}},m=w(p,this.options,a,this.frame);p.contentWindow.cards?m(p.contentWindow.cards):p.contentWindow.onCardsReady=m}this.frame.options=this.options,this.frame.extract=a,this._done(this.frame)},l.fetch=function(f,p,v,a){v=u.extend({},v||{}),v.protocol=window.location.protocol,v=u.map(p,function(b){return v.override===!0?u.extend({},l.options(b),v):u.extend({},v,l.options(b))});var h=new t,w=[];v=u.reduce(v,function(b,S,I){var z=new d(f,p[I],S,h.callback());return l.extractless.test(S.url)?z.extract({}):z.error||b.push(S),w.push(z),b},[]);var m=u.reduce(v,function(b,S){return b.push(S.url),S.embed&&b.push(S.embed),b},[]);if(!m.length)return u.isFunction(a)&&a(u.map(w,function(b){return b.frame})),u.map(w,function(b){return b.frame});var E={card:1,v:"MTcyMDEw",youtube_showinfo:0,native:!0},j=u.reduce(v,function(b,S){return S.key&&!b?S.key:b},null);j&&(E.key=j);var _=window.location.protocol;return v.protocol&&(_=v.protocol),_=_.split(":")[0],u.contains(["http","https"],_)||(_="https"),E.scheme=_,c.api().card(m,E,function(b){u.each(b,function(S){u.each(w,function(I){I.options.url===S.original_url?I.extract(S):I.options.embed===S.original_url&&I.media(S)})})}),h.wait(function(b){a(b)}),u.map(w,function(b){return b.frame})},l.build=function(f,p,v){var a=o.create("card",v,p,l.attrs,l.styles);return e.isFirefox()&&(a.elem.style.visibility="visible",a.elem.style.height="1px"),a.on("card.repeat",function(h){var w={url:h.url,via:document.location.toString()};u.each(["image","embed","title","description","lang"],function(m){h.hasOwnProperty(m)&&(w[m]=h[m])}),v.notify("modal.create",w)}),a.on("card.ready",function(){a.ready()}),a.on("card.rendered",function(h){if(a.url=h.url,a.type=h.type,h.name==="error")return a.__hub.notify("card.error",f),a.remove(),!1;if(f._em_opts){var w=u.extend({},f._em_opts);if(delete f._em_opts,u.isArray(w.types)&&w.types.length>0&&!u.contains(w.types,h.type))return a.__hub.notify("card.error",f),a.remove(),!1}a.rendered=!0,!a.options.twitter_via&&h.defaultTwitterVia&&(a.options.twitter_via=h.defaultTwitterVia);var m=a.elem.parentNode;a.elem.style.display="block",a.elem.style.margin="0",a.elem.style.padding="0",a.elem.style.visibility="visible",a.elem.style.position="relative",h.height?a.elem.height=h.height:a.elem.height="300",h.width?l.isPercent(h.width)?(m.style.width=h.width,a.elem.width="100%"):(a.elem.width=h.width,m.style.maxWidth=h.width+"px"):(a.elem.width="600",m.style.maxWidth="600px"),m.style.padding="0",m.style.position="relative",m.style.minWidth="200px",h.align==="left"?m.style.margin="5px 0":h.align==="right"?m.style.margin="5px 0 5px auto":m.style.margin="5px auto",a.elem.style.width=null,a.elem.style.height=null,a.elem.style.maxWidth="100%",a.elem.style.minWidth="200px",r.remove(f),h.type!=="error"&&(v.notify("card.rendered",a.elem,a),h.controls&&i.card(a))}),a.one("card.error",function(h){v.notify("card.error",h)}),a.on("resize",function(){v.notify("card.resize",a.elem,a)}),a.on("log.event",function(h){v.notify("log.event",h)}),a.on("pinterest.log",function(){v.notify("pinterest.log")}),a.on("card.player.ready",function(){v.notify("card.player.ready",a)}),a.on("card.recommend.shown",function(h){v.notify("recommend.shown",a.elem,h)}),a},l.multi=function(f,p,v,a){return f=u.reduce(f,function(h,w){return o.rendering(w)||h.push(w),h},[]),l.fetch(v,f,p,function(h){u.isFunction(a)&&a(h)})},l.one=function(f,p,v,a){if(o.rendering(f))return null;var h=l.fetch(v,[f],p,function(w){u.isFunction(a)&&a(w[0])});return h[0]},x.exports=l},{"../api.js":2,"../browser.js":4,"../dom.js":7,"../keeper.js":17,"../share.js":25,"../tunnels.js":27,"../urlparse.js":28,"../utils.js":29,"./base.js":10}],13:[function(y,x,k){var c=y("../utils.js"),u=y("../dom.js"),r=y("../urlparse.js"),n=y("./base.js"),e=y("conf"),t={attrs:{frameborder:"0",allowtransparency:"true"},styles:{border:"none",position:"absolute",top:"-9999em",width:"10px",height:"10px"}};t.one=function(o,i){var s=c.getUUID();c.assert(i.name),i=c.extend({sid:s},i||{});var l=c.extend({},t.attrs);l.id="emb_xcomm",l.class="embedly-xcomm",l.src=e.EMB_SECURE_FRAME_SRC+"xcomm.html#"+r.createQuery(i);var d=u.create("iframe",l);c.each(t.styles,function(p,v){d.style[v]=p});var f=n.connect(s,d,o);return f.on("xcomm.ready",function(){f.ready()}),document.body.appendChild(d),f},x.exports=t},{"../dom.js":7,"../urlparse.js":28,"../utils.js":29,"./base.js":10,conf:"conf"}],14:[function(y,x,k){var c=y("../utils.js"),u=y("../browser.js"),r=y("./base.js"),n=y("../tunnels.js"),e={name:"modal",attrs:{frameborder:"0",allowtransparency:"true"},styles:{border:"none",position:"fixed",top:"0",left:"0",bottom:"0",right:"0",width:"100%",height:"100%",zIndex:"2147483647"}};e.one=function(t,o){if(c.isNone(t)&&(t={url:document.location.toString()}),c.isNone(t.url)&&(t.url=document.location.toString()),t.protocol=window.location.protocol,t.target==="window")return u.open("http://cdn.embedly.com/widgets/embed?url="+encodeURIComponent(t.url),"Embed Code",635,500),!1;t.t="card";var i=r.create("modal",o,t,e.attrs,e.styles);return i.on("modal.load",function(s){var l=function(f,p){return function(v){f.__tunnel=new n.Tunnel(f.__hub),v.create(p,f.__tunnel)}},d=l(i,t);s.contentWindow.modals?d(s.contentWindow.modals):s.contentWindow.onModalsReady=d}),i.resize=function(){},i.on("modal.close",function(){document.body.style.overflow="inherit",document.body.removeChild(i.elem)}),i.on("modal.ready",function(){i.ready()}),i.one("modal.copy",function(){o.notify("modal.copy",t)}),document.body.appendChild(i.elem),document.body.style.overflow="hidden",i.__appended(),i},x.exports=e},{"../browser.js":4,"../tunnels.js":27,"../utils.js":29,"./base.js":10}],15:[function(y,x,k){var c=y("../utils.js"),u=y("../api.js"),r=y("../dom.js"),n=y("../keeper.js"),e=y("./base.js"),t=y("../tunnels.js"),o={name:"slideshow",attrs:{frameborder:"0",scrolling:"no",allowtransparency:"true",allowfullscreen:"true"},styles:{width:"1px",height:"0px",border:"none",position:"absolute",visibility:"hidden"},opts:["schema","lang","width","align"]};o.options=function(i,s){if(!c.isElement(i)||!c.isElement(i.parentNode))return null;var l=c.reduce(o.opts,function(d,f){return s.hasOwnProperty(f)&&(d[f]=s[f]),d},s.options?s.options:{});return c.reduce(o.opts,function(d,f){var p=r.data(i,"slideshow-"+f);return c.isNone(p)||(d[f]=p),d},l)},o.urls=function(i,s){return c.isArray(s.urls)&&s.urls.length>0?s.urls:c.reduce(r.children(i,"blockquote"),function(l,d){if(d.nodeName==="BLOCKQUOTE"){var f=r.child(d,"h4");if(!c.isNone(f)){var p=r.child(f,"a");c.isNone(p)||l.push(p.href)}}return l},[])},o.fetch=function(i,s){var l={card:1,v:1};u.api().extract(i,l,function(d){s(d)})},o.build=function(i,s,l){var d=s[0].iframe,f=s[0].doc,p=s[1],v=function(h,w,m){return function(E){h.__tunnel=new t.Tunnel(h.__hub),E.create(f.body,{options:w,extract:m,tunnel:h.__tunnel})}},a=v(l,i,p);d.contentWindow.slideshows?a(d.contentWindow.slideshows):d.contentWindow.onSlideshowsReady=a},o.one=function(i,s,l){if(!c.isElement(i)||(s=s||{},e.rendering(i)))return null;var d=o.options(i,s),f=o.urls(i,s);if(d===null||f.length===0)return null;var p=e.create("slideshow",l,d,o.attrs,o.styles),v=new n,a=v.callback(),h=v.callback();return v.wait(function(w){o.build(d,w,p)}),p.on("slideshow.load",function(w,m){a({iframe:w,doc:m})}),o.fetch(f,h),i.parentNode.insertBefore(p.elem,i),p.on("slideshow.ready",function(){p.ready()}),p.on("slideshow.rendered",function(w){return p.ready(),w.name==="error"?(p.remove(),p.__hub.notify("slideshow.error",i),!1):(p.rendered=!0,p.elem.style.display="block",p.elem.style.margin="10px auto",p.elem.style.visibility="visible",p.elem.style.position="relative",p.elem.width="700",w.height?p.elem.height=w.height:p.elem.height="500",w.width?p.elem.width=w.width:p.elem.width="700",p.elem.style.width=null,p.elem.style.height=null,p.elem.style.maxWidth="99%",p.elem.style.minWidth="300px",void r.remove(i))}),p.on("log.event",function(w){l.notify("log.event",w)}),p.__appended(),p},x.exports=o},{"../api.js":2,"../dom.js":7,"../keeper.js":17,"../tunnels.js":27,"../utils.js":29,"./base.js":10}],16:[function(y,x,k){var c=y("./utils.js"),u=y("./class.js"),r={senders:[],integrations:["google","kissmetrics","mixpanel","segment","heap","intercom"]};r.Sender=u.extend({init:function(){this.sent=[]},event:function(n,e,t){var o=c.reduce([n,e,t],function(i,s){return s&&(i+=s),i},"");return c.contains(this.sent,o)?!1:(this.sent.push(o),void this.send(n,e,t))},send:function(){}}),r.GoogleAnalytics=r.Sender.extend({isValid:function(){return window.ga&&c.isFunction(window.ga)},send:function(n,e,t){window.ga("send","event","Embedly > "+n,e,t)}}),r.KissMetrics=r.Sender.extend({isValid:function(){return window._kmq&&c.isFunction(window._kmq.push)},send:function(n,e,t){window._kmq.push(["record","Embedly > "+n+" > "+e,{url:t}])}}),r.Mixpanel=r.Sender.extend({isValid:function(){return window.mixpanel&&c.isFunction(window.mixpanel.push)},send:function(n,e,t){window.mixpanel.push(["track","Embedly > "+n+" > "+e,{url:t}])}}),r.Segment=r.Sender.extend({isValid:function(){return window.analytics&&c.isFunction(window.analytics.track)},send:function(n,e,t){window.analytics.track("Embedly > "+n+" > "+e,{url:t})}}),r.Heap=r.Sender.extend({isValid:function(){return window.heap&&c.isFunction(window.heap.track)},send:function(n,e,t){window.heap.track("Embedly > "+n+" > "+e,{url:t})}}),r.Intercom=r.Sender.extend({isValid:function(){return window.Intercom&&c.isFunction(window.Intercom)},send:function(n,e,t){window.Intercom("trackEvent","Embedly > "+n+" > "+e,{url:t})}}),r._integrations={google:r.GoogleAnalytics,kissmetrics:r.KissMetrics,mixpanel:r.Mixpanel,segment:r.Segment,heap:r.Heap,intercom:r.Intercom},r.send=function(n,e,t){c.each(r.senders,function(o){o.isValid()&&o.event(n,e,t)}),r.hub&&r.hub.notify("analytics.event",n,e,t)},r.player=function(n){n.on("play",function(){r.send("Video","Play",n.url)}),n.on("timeupdate",function(e){if(e.seconds&&e.duration&&c.isNumber(e.seconds)&&c.isNumber(e.duration)){var t=parseInt(e.seconds/e.duration*4,10);t&&t>0&&5>t&&r.send("Video",c.fmt("{n}% Watched",{n:(25*t).toString()}),n.url)}}),n.on("ended",function(){r.send("Video","100% Watched",n.url)})},r.event=function(n,e,t){return n&&e&&t&&e==="click"?(c.contains(["facebook","twitter","pinterest","repeat"],n)&&(e=n,n="social"),n==="article-full"&&(n="article"),c.contains(["video","image","rich","article","product","social","recommend"],n)?(n=c.capitalize(n),e=c.capitalize(e),void r.send(n,e,t)):!1):!1},r.configure=function(n){n&&c.isArray(n)||(n=[]),r.senders=[],c.each(n,function(e){if(c.isString(e)){if(r._integrations.hasOwnProperty(e)){var t=r._integrations[e];r.senders.push(new t)}}else if(c.isFunction(e)){var o=r.Sender.extend({isValid:function(){return!0},send:e});r.senders.push(new o)}})},r.connect=function(n){n.on("media.player",r.player),c.each(r.integrations,function(e){if(r._integrations.hasOwnProperty(e)){var t=r._integrations[e];r.senders.push(new t)}}),r.hub=n,n.on("log.event",function(e){if(e&&e.a&&e.a==="click")if(e.c==="recommend"&&e.l){var t=e.l.split("|");t.length===3&&r.event(e.c,e.a,t.slice(1).join(" "))}else r.event(e.c,e.a,e.u)})},x.exports=r},{"./class.js":5,"./utils.js":29}],17:[function(y,x,k){var c=y("./utils.js"),u=function(){this.init()};u.prototype.init=function(){this.len=0,this.count=0,this.results={},this.finished=!1,this.started=!1},u.prototype.callback=function(){var r=this.len;return this.len++,c.bind(function(n){this.each(r,n)},this)},u.prototype.done=function(){if(!this.started)return!1;if(this.finished)return!0;if(this.count===this.len){this.finished=!0;for(var r=[],n=0;n0,"Get methods require a callback."),o.unshift(t)):(/^set/.test(e)&&(u.assert(o.length!==0,"Set methods require a value."),t.value=o[0]),o=[t]),this.send.apply(this,o)}}var u=y("./utils.js"),r=y("./browser.js"),n={};n.CONTEXT="player.js",n.VERSION="0.0.11",n.bound=function(e,t){return function(o){e.call(t||window,o.value)}},n.Player=function(e){return this instanceof n.Player?void this.init(e):new n.Player(e)},n.EVENTS={READY:"ready",PLAY:"play",PAUSE:"pause",ENDED:"ended",TIMEUPDATE:"timeupdate",PROGRESS:"progress",ERROR:"error"},n.EVENTS.all=function(){return u.map(n.EVENTS,function(e){return e})},n.METHODS={PLAY:"play",PAUSE:"pause",GETPAUSED:"getPaused",MUTE:"mute",UNMUTE:"unmute",GETMUTED:"getMuted",SETVOLUME:"setVolume",GETVOLUME:"getVolume",GETDURATION:"getDuration",SETCURRENTTIME:"setCurrentTime",GETCURRENTTIME:"getCurrentTime",SETLOOP:"setLoop",GETLOOP:"getLoop",REMOVEEVENTLISTENER:"removeEventListener",ADDEVENTLISTENER:"addEventListener"},n.METHODS.all=function(){return u.map(n.METHODS,function(e){return e})},n.READIED=[],n.Player.prototype.init=function(e){this.frame=e,this.url=e.url,this.events=n.EVENTS.all(),this.methods=n.METHODS.all()},n.Player.prototype.send=function(e,t,o){return e.context=n.CONTEXT,e.version=n.VERSION,t?(e.listener="l"+u.getUUID(),this.frame.one({event:e.method,listener:e.listener},n.bound(t,o),o)):this.frame.on(e.method,t,o),this.frame.send(e.method,e),!0},n.Player.prototype.on=function(e,t,o){var i=u.getUUID(),s={event:e,listener:i};return e==="ready"?this.frame.one(s,n.bound(t,o),o):this.frame.on(s,n.bound(t,o),o),this.frame.send("addEventListener",{event:"addEventListener",value:e,listener:i,context:n.CONTEXT,version:n.VERSION}),!0},n.Player.prototype.off=function(e){var t=this.frame.__hub.listeners(e);if(r.console.log("Player.off",t),t.length>0)for(var o in t)this.send({method:"removeEventListener",value:e,listener:t[o]}),this.frame.__hub.off([e,t[o]].join("."));return!1},n.Player.prototype.supports=function(e,t){u.assert(u.indexOf(["method","event"],e)>-1,'evtOrMethod needs to be either "event" or "method" got '+e),t=u.isArray(t)?t:[t];for(var o=e==="event"?this.events:this.methods,i=0;iv?o.style.paddingTop=f:o.style.paddingBottom=f}else e.style.maxHeight="none",e.height=t.height,e.style.height=t.height.toString()+"px"})},x.exports=r},{"../urlparse.js":28,"../utils.js":29}],25:[function(y,x,k){var c=y("./utils.js"),u=y("./dom.js"),r=y("./ready.js"),n=y("./urlparse.js"),e=y("./log/front.js"),t=y("conf"),o={_css:!1,hub:null};o.connect=function(i){o.hub=i},o.log=function(i,s){o.hub.notify("log.event",{u:i,g:"card",a:"click",c:s,l:c.hash(e.sid)})},o.url=function(i){var s=["e",c.hash(i),c.hash(e.sid)].join(".");return n.addHash(document.URL,s)},o.buttons=function(i){var s,l=u.create("div",{class:"embdscl0"});return c.each(["facebook","twitter","pinterest","linkedin","card"],function(d){s=u.create("a",{class:"embd-"+d}),s.innerHTML="",o.buttons[d].call(window,s,i)===!0&&l.appendChild(s)}),l},o.buttons.twitter=function(i,s){var l=s.options.url,d=s.extract.title,f=s.options.twitter_via,p={url:o.url(l)};return d&&(p.text=c.truncate(d,100)),f?p.via=f.substr(0,1)==="@"?f.substr(1):f:p.via="embedly",i.href="https://twitter.com/intent/tweet?"+n.createQuery(p),u.addEvent(i,"click",function(v){var a=u.event(v);a.stop(),window.open(i.href,"_blank","width=550,height=410,top=150,left=150"),o.log(s.options.url,"twitter")}),!0},o.buttons.facebook=function(i,s){var l={u:o.url(s.options.url)};return i.href="https://www.facebook.com/sharer/sharer.php?"+n.createQuery(l),u.addEvent(i,"click",function(d){var f=u.event(d);f.stop(),window.open(i.href,"_blank","width=700,height=425,top=150,left=150"),o.log(s.options.url,"facebook")}),!0},o.buttons.pinterest=function(i,s){var l,d="https://www.pinterest.com/pin/create/button/";if(s.options.image)l=s.options.image;else if(s.extract.media&&s.extract.media.type==="photo")l=s.extract.media.url;else{if(!(s.extract.images&&s.extract.images.length>0))return!1;l=s.extract.images[0].url}return i.href=n.appendQuery(d,{url:o.url(s.options.url),media:l,description:s.extract.title}),u.addEvent(i,"click",function(f){var p=u.event(f);p.stop(),window.open(i.href,"_blank","width=700,height=425,top=150,left=150"),o.log(s.options.url,"pinterest")}),!0},o.buttons.card=function(i,s){return u.addEvent(i,"click",function(l){var d=u.event(l);d.stop();var f={url:s.options.url};c.each(["image","embed","title","description","lang"],function(p){s.options.hasOwnProperty(p)&&(f[p]=s.options[p])}),s.__hub.notify("card.repeat",f),o.log(s.options.url,"repeat")}),!0},o.buttons.linkedin=function(i,s){var l={url:o.url(s.options.url),mini:"true"};return i.href="https://www.linkedin.com/shareArticle?"+n.createQuery(l),u.addEvent(i,"click",function(d){var f=u.event(d);f.stop(),window.open(i.href,"_blank","width=700,height=425,top=150,left=150"),o.log(s.options.url,"linkedin")}),!0},o.buttons.embedly=function(i,s){var l={utm_source:n.getDomain(document.URL),utm_medium:"referral",utm_campaign:"cards"};return i.href=n.appendQuery("http://embed.ly/cards",l),i.target="_blank",u.addEvent(i,"click",function(){o.log(s.options.url,"whats-this")}),!0},o.css=function(i){if(!o._css){o._css=!0;var s=t.EMB_ORIGIN_BASE+"css/social."+t.EMB_ASSET_VERSION+".css";return r.css(s,i),!1}i()},o.card=function(i){var s=i.elem.parentNode;return!c.isElement(s)||s.nodeName!=="DIV"&&!u.hasClass(s,"embedly-card")?!1:void o.css(function(){var l=o.buttons(i);u.addEvent(s,"mouseenter",function(){u.addClass(l,"embd-active")}),u.addEvent(s,"mouseleave",function(){u.removeClass(l,"embd-active")}),s.appendChild(l),i.__hub.notify("card.share.init")})},x.exports=o},{"./dom.js":7,"./log/front.js":19,"./ready.js":23,"./urlparse.js":28,"./utils.js":29,conf:"conf"}],26:[function(y,x,k){var c=y("./utils.js"),u=y("./urlparse.js"),r=y("conf"),n={};n.youtube={schema:"youtube",re:/youtube\.com\/embed\/([^\/?#]+)/i,url:function(e){var t=n.youtube.re.exec(e);return t.length!==2?e:"http://www.youtube.com/watch?v="+t[1]}},n.vimeo={schema:"vimeo",re:/player\.vimeo\.com\/video\/([^\/?#]+)/i,url:function(e){var t=n.vimeo.re.exec(e);return t.length!==2?e:"http://vimeo.com/"+t[1]}},n.soundcloud={schema:"soundcloud",re:/w\.soundcloud\.com\/player\/\?/,url:function(e){var t=u.getQuery(e);if(t.url){var o=/api\.soundcloud\.com\/tracks\/([^\/?#]+)/.exec(t.url);if(o.length===2)return"https://soundcloud.com/track/"+o[1]}return e}},n.providers=[n.youtube,n.vimeo,n.soundcloud],n.provider=function(e){return c.reduce(n.providers,function(t,o){return o.re.test(e)?o:t},null)},n.replace=function(e,t){if(c.isNone(e)||!c.isElement(e)||e.nodeName!=="IFRAME"||!e.src||!c.isString(e.src))return null;if(!t.key)return!1;var o=e.src;o=o.replace(/&/g,"&");var i=n.provider(o);if(i===null)return null;var s=window.location.protocol==="https:"?"https:":"http:";o.substr(0,7)==="file://"&&(o=o.substr(5)),o.substr(0,2)==="//"&&(o=s+o);var l=c.extend({},t,{url:i.url(o),src:o,schema:i.schema,type:"text/html"}),d=s+"//cdn.embedly.com/widgets/";r.EMB_DEBUG&&(d=r.EMB_FRAME_SRC);var f=d+"media.html?"+u.createQuery(l);return e.src=f,e},x.exports=n},{"./urlparse.js":28,"./utils.js":29,conf:"conf"}],27:[function(y,x,k){var c=y("./utils.js"),u={};u.Tunnel=function(r){this.init(r)},u.Tunnel.prototype.init=function(r){this.parent=r,this.child=null,this.ready=!1,this.queue=[]},u.Tunnel.prototype.connect=function(r){this.child=r,this.child.on("receiver.send",c.bind(function(n,e){c.isNone(e)&&(e={}),e.method=n,setTimeout(c.bind(function(){this.parent.notify("message",e)},this),1)},this)),this.ready=!0,this.release()},u.Tunnel.prototype.release=function(){for(var r=0;r2?u.parseQuery(n.slice(1).join("?")):{}},u.appendQuery=function(r,n){if(!r||!c.isString(r))return null;var e=r.split("?"),t=e[0];if(!n||!c.isObject(n)||c.isEmptyObject(n))return r;var o=u.getQuery(r);return o=c.extend(o,n),c.isEmptyObject(o)?r:[t,u.createQuery(o)].join("?")},u.removeQuery=function(r,n){if(!r||!c.isString(r))return null;var e=r.split("?"),t=e[0],o=u.getQuery(r);return o.hasOwnProperty(n)&&delete o[n],c.isEmptyObject(o)?t:[t,u.createQuery(o)].join("?")},u.getOrigin=function(r){if(!r||!c.isString(r)||!/^https?:\/\//.test(r))return null;var n=r.split("/").slice(0,3).join("/");return n.indexOf(".")===-1&&n.indexOf(":")===-1?null:n},u.getDomain=function(r){var n=u.getOrigin(r);return n?n.replace(/^https?:\/\//,""):null},u.param=function(r){return c.map(r,function(n,e){return encodeURIComponent(e)+"="+encodeURIComponent(n)}).join("&")},u.Parsed=function(r,n){this.init(r,n)},u.Parsed.prototype.init=function(r,n){this.original=r,this.url=n,this._valid=!1,this.url=n},u.Parsed.prototype.valid=function(r){return(r===!0||r===!1)&&(this._valid=r),this._valid},u.parse=function(r){var n=r,e=window.location.protocol==="https:"?"https:":"http:";r=r&&c.trim(r);var t=new u.Parsed(n,r);return r?/^https?:\/\/[^\/]+\.[^\/]/i.test(r)?(t.valid(!0),t):/^\w+:/i.test(r)||r[0]==="#"?t:/^\/\/[^\/]+\.[^\/]/i.test(r)?(t.valid(!0),t.url=e+r,t):/^\/([^\/]+|$)/i.test(r)?(t.valid(!0),t.url=u.getOrigin(window.location.toString())+r,t):(/^[^\/]+\.[^\/]/i.test(r)&&(t.valid(!0),t.url="http://"+r),t):t},u.addHash=function(r,n){return r.indexOf("#")===-1?r+"#"+n:r+"&"+n},u.sanitize=function(r){return r&&(r=r.replace(/#x\d\d;/,""),r.replace(/[^-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)]/g,""))},x.exports=u},{"./utils.js":29}],29:[function(y,x,k){var c=y("conf"),u={},r={},n=Array.prototype,e=Object.prototype,t=Function.prototype,o=n.slice,i=e.toString,s=n.forEach,l=n.reduce,d=n.every,f=n.indexOf,p=t.bind;u.identity=function(a){return a},u.each=function(a,h,w){if(a!=null){if(s&&a.forEach===s)a.forEach(h,w);else if(a.length===+a.length){for(var m=0,E=a.length;E>m;m++)if(m in a&&h.call(w,a[m],m,a)===r)return}else for(var j in a)if(e.hasOwnProperty.call(a,j)&&h.call(w,a[j],j,a)===r)return}},u.map=function(a,h,w){var m=[];return a==null?m:Array.prototype.map&&a.map===Array.prototype.map?a.map(h,w):(u.each(a,function(E,j,_){m[m.length]=h.call(w,E,j,_)}),m)},u.reduce=function(a,h,w,m){var E=arguments.length>2;if(a==null&&(a=[]),l&&a.reduce===l)return m&&(h=u.bind(h,m)),E?a.reduce(h,w):a.reduce(h);if(u.each(a,function(j,_,b){E?w=h.call(m,w,j,_,b):(w=j,E=!0)}),!E)throw new TypeError("Reduce of empty array with no initial value");return w},u.zip=function(a){return u.map(a[0],function(h,w){return h.map(a,function(m){return m[w]})})},u.extend=function(a){return u.each(Array.prototype.slice.call(arguments,1),function(h){for(var w in h)h[w]!==void 0&&(a[w]=h[w])}),a},u.contains=function(a,h){if(!f){for(var w=0,m=a.length;m>w;w++)if(a[w]===h)return!0;return!1}return a.indexOf(h)>-1},u.every=function(a,h,w){h||(h=u.identity);var m=!0;return a==null?m:d&&a.every===d?a.every(h,w):(u.each(a,function(E,j,_){return(m=m&&h.call(w,E,j,_))?void 0:r}),!!m)},u.indexOf=function(a,h){if(a==null)return-1;var w=0,m=a.length;if(f&&a.indexOf===f)return a.indexOf(h);for(;m>w;w++)if(a[w]===h)return w;return-1},u.batch=function(a,h){var w=[],m=[];return u.each(a,function(E){m.push(E),m.length===h&&(w.push(m),m=[])}),m.length!==0&&w.push(m),w};var v=function(){};u.bind=function(a,h){var w,m;if(p&&a.bind===p)return p.apply(a,o.call(arguments,1));if(!u.isFunction(a))throw new TypeError;return w=o.call(arguments,2),m=function(){if(!(this instanceof m))return a.apply(h,w.concat(o.call(arguments)));v.prototype=a.prototype;var E=new v;v.prototype=null;var j=a.apply(E,w.concat(o.call(arguments)));return Object(j)===j?j:E}},u.get=function(a,h,w){if(w=u.isNone(w)?null:w,u.isNone(h)||!u.isString(h)||!a)return w;if(h==="")return a;var m=h.split("."),E=m.splice(0,1)[0];return a.hasOwnProperty(E)?u.get(a[E],m.join("."),w):w},u.isFunction=function(a){try{return/^\s*\bfunction\b/.test(a)}catch{return!1}},u.isNone=function(a){return a===null||typeof a>"u"},u.isString=function(a){return i.call(a)==="[object String]"},u.isNumber=function(a){return i.call(a)==="[object Number]"},u.isDate=function(a){return i.call(a)==="[object Date]"},u.isObject=function(a){return i.call(a)==="[object Object]"},u.isArray=function(a){return i.call(a)==="[object Array]"},u.isElement=function(a){return!u.isNone(a)&&!u.isNone(a.nodeType)&&a.nodeType===1},u.isEmptyObject=function(a){if(u.isObject(a)){for(var h in a)if(e.hasOwnProperty.call(a,h))return!1;return!0}return!1},u.bool=function(a){return u.isNone(a)?null:a==="true"||a==="yes"||a==="1"||a===1||a===!0?!0:a==="false"||a==="no"||a==="0"||a===0||a===!1?!1:null},u.assert=function(a,h){if(!a)throw h||"Assertion Failed"},u.getUUID=function(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var h=16*Math.random()|0,w=a==="x"?h:3&h|8;return w.toString(16)})},u.getTimestamp=function(){var a=new Date;return a.getTime()},u.trim=function(a){return a.replace(/^\s+|\s+$/g,"")},u.spaceless=function(a){return a.replace(/\s+/g,"")},u.capitalize=function(a){return a.charAt(0).toUpperCase()+a.substr(1)},u.camelCase=function(a,h){var w=a.split("-");return h=h||w.length,w.length>1&&(a=w.splice(0,1)[0],a+=u.map(w.splice(0,h),function(m){return m[0].toUpperCase()+m.substr(1)}).join(""),w.length>0&&(a+="-"+w.join("-"))),a},u.truncate=function(a,h){return a?(h=h||50,a.lengthh;h++)w=a.charCodeAt(h),E=(E<<5)-E+w,E|=0;return Math.abs(E).toString(32)},u.hash=function(a){var h="0000000"+u.fullHash(a);return h.substr(h.length-6)},u.rgbToHex=function(a,h,w){return"#"+(16777216+(a<<16)+(h<<8)+w).toString(16).slice(1)},c.EMB_DEBUG===!0&&(window._=u),x.exports=u},{conf:"conf"}],30:[function(y,x,k){var c=y("./utils.js"),u=y("./dom.js"),r=y("./browser.js"),n=function(){this.init()};n.prototype.init=function(){this._elements=[],this._listening=!1},n.prototype.viewable=function(e){if(!e.getBoundingClientRect)return!0;var t;try{t=e.getBoundingClientRect()}catch{return!1}return t.bottom>=0&&t.right>=0&&t.top<=(window.innerHeight||document.documentElement.clientHeight)&&t.left<=(window.innerWidth||document.documentElement.clientWidth)},n.prototype.check=function(){this.freeze=!0;var e=[];c.each(this._elements,c.bind(function(t,o){if(this.viewable(t.elem)){try{t.func.call(this)}catch(i){r.console.log(i)}e.push(o)}},this)),c.each(e,function(t){this._elements.splice(t,1)},this),this._elements.length===0&&this.stop(),this.freeze=!1},n.prototype.stop=function(){try{u.detachEvent(window,"DOMContentLoaded",this.handler),u.detachEvent(window,"load",this.handler),u.detachEvent(window,"resize",this.handler),u.detachEvent(window,"scroll",this.handler)}catch{}this.handler=null,this._listening=!1},n.prototype.listen=function(){return this._listening?!1:(this._listening=!0,this.handler=c.bind(function(){!this.freeze&&this._elements.length&&this.check()},this),u.addEvent(window,"DOMContentLoaded",this.handler),u.addEvent(window,"load",this.handler),u.addEvent(window,"resize",this.handler),void u.addEvent(window,"scroll",this.handler))},n.prototype.on=function(e,t,o){e==="viewable"&&(this._elements.push({elem:t,func:o}),this.listen(),this.check())},x.exports=n},{"./browser.js":4,"./dom.js":7,"./utils.js":29}],31:[function(y,x,k){if(window.embedly&&window.embedly.look)return window.embedly.look(),!1;var c=y("./common/iframes/all.js"),u=y("./common/browser.js"),r=y("./common/utils.js"),n=y("./common/a.js"),e=y("./common/dom.js"),t=y("./common/ready.js"),o=y("./common/viewport.js"),i=y("./common/page.js"),s=y("./common/urlparse.js"),l=y("./common/found.js"),d=y("./common/share.js"),f=y("./common/log/front.js"),p=y("./common/recommend/front.js"),v=y("./common/players.js"),a=y("./common/integrate.js"),h=y("./common/blacklist.js"),w=y("./common/libring.js"),m=new n,E=new o;p.connect(m),d.connect(m),w.addReddit(),v.connect(m),a.connect(m),f.connect(m,"platform");var j=function(){var g=/emb_(\d+)/.exec(u.location.hash());return g?g[1]:null},_={analytics:null,recommend:!1,shared:j(),defaults:{cards:{}}},b={media:[]},S=function(g){var N;try{N=JSON.parse(g.data)}catch(M){return u.console.error(M),!1}m.notify("window.message",g,N)};e.addEvent(window,"message",S);var I=function(g,N,M){var R;if(r.isFunction(N)&&(M=N,N={}),r.isString(g)||!r.isElement(g)&&r.isObject(g))return l.add.cards(g),!0;if(r.isElement(g)&&(g.nodeName.toLowerCase()==="a"||g.nodeName.toLowerCase()==="blockquote")){var J=r.extend({},_.defaults.cards,N);R=c.cards.one(g,J,m,function(G){r.isFunction(M)&&M.call(G,G)})}return R},z=function(g){var N;return r.isString(g)?(l.add.button(g),!0):(r.isElement(g)&&g.nodeName.toLowerCase()==="a"&&(N=c.button.one(g,m)),N&&N.on("button.rendered",function(){m.notify("button.rendered",N.elem,N)}),N)},C=function(g,N){var M;M=r.isString(g)?{url:g}:g;var R=c.modal.one(M,m);return r.isFunction(N)&&N.call(R,R),R},B=function(g,N,M){var R=c.slideshow.one(g,N,m);return r.isFunction(M)&&M.call(R,R),R},K=function(g){if(e.data(g,"connected")==="1")return!1;e.data(g,"connected","1");var N=c.connect(null,g,m);N.one("media.ready",function(M){N.url=M.url,N.ready(),E.on("viewable",N.elem,function(){N.send("media.view")}),m.notify("media.recommend.add",N),b.media.push(N),M.controllable&&m.notify("media.player.init",N),m.notify("media.ready",N)}),N.on("media.recommend.resize",function(M){m.notify("media.recommend.resize",g,M)}),N.on("iframe.resize",function(M){M.height&&(N.elem.height=M.height),m.notify("media.resize",N)}),N.send("media.ready",{},!0)},Q=function(g){return g&&g.key?(l.analytics=g,void l.look()):!1},re=function(g,N){if(!r.isElement(g))return!1;if(r.isString(N)){var M=!1;r.each(b.media,function(R){R.elem===g&&(M=!0,m.notify("media.recommend."+N,R,R.elem))}),M||m.notify("media.recommend."+N,null,g)}else r.isObject(N)&&m.notify("media.recommend.options",g,N,b.media);l.look()},Y=function(g){return r.isString(g)&&g==="reset"?(_.defaults.cards={},!1):r.isObject(g)?(g.hasOwnProperty("cards")&&r.isObject(g.cards)&&(_.defaults.cards=r.extend({},_.defaults.cards,g.cards)),g.hasOwnProperty("recommend")&&(m.notify("media.recommend.options",null,g.recommend,b.media),r.each(b.media,function(N){m.notify("media.recommend.add",N)})),void(g.hasOwnProperty("integrations")&&a.configure(g.integrations))):!1},oe=function(g,N){r.isFunction(g)&&(N=g,g=null),v.get(m,g,N)};m.on("found",function(g){g.cards&&g.cards.length&&c.cards.multi(g.cards,_.defaults.cards,m),g.buttons&&g.buttons.length&&r.each(g.buttons,function(N){z(N)}),g.slideshows&&g.slideshows.length&&r.each(g.slideshows,function(N){B(N)}),g.iframes&&g.iframes.length&&r.each(g.iframes,function(N){K(N)})}),m.on("modal.create",function(g){C(g)}),m.on("card.rendered",function(g,N){E.on("viewable",g,r.bind(function(){this.send("card.view")},N))}),m.on("card.rendered",function(g,N){if(!_.shared||!N.query||!N.query.url)return!1;var M=r.hash(N.query.url);return M!==_.shared?!1:(_.shared=null,void setTimeout(function(){var R=e.rect(N.elem);return R&&R.top?void u.animateScroll(R.top-5,500):!1},500))});var Z=!1;m.on("pinterest.log",function(){if(Z)return!1;Z=!0;var g={type:"pidget",partner:"embedly",via:document.URL,callback:r.getUUID()};t.script("https://log.pinterest.com/?"+s.createQuery(g),function(){e.remove(e.one("#pinLog"))},this,{id:"pinLog"})});var X=function(g,N){m.on(g,N)},ee=function(g,N){m.off(g,N)},ie=function(){e.detachEvent(window,"message",S),l.stop(),m.clear(),e.remove(e.one("#emb_xcomm")),window.embedly=null},te=function(){var g=Array.prototype.slice.call(arguments,0);if(g.length===0)return null;var N=g.splice(0,1)[0];switch(N){case"card":return I.apply(window,g);case"button":return z.apply(window,g);case"modal":return C.apply(window,g);case"slideshow":return B.apply(window,g);case"look":return l.look.apply(window,g);case"on":return X.apply(window,g);case"off":return ee.apply(window,g);case"kill":return ie.apply(window,g);case"analytics":return Q.apply(window,g);case"player":return oe.apply(window,g);case"recommend":return re.apply(window,g);case"defaults":return Y.apply(window,g)}return null},se=function(){var g=[];window.embedly&&r.isFunction(window.embedly)&&r.isArray(window.embedly.q)&&(g=window.embedly.q),window.embedly=function(){return te.apply(window,arguments)},window.embedly.card=function(){return I.apply(window,arguments)},window.embedly.button=function(){return z.apply(window,arguments)},window.embedly.modal=function(){return C.apply(window,arguments)},window.embedly.slideshow=function(){return B.apply(window,arguments)},window.embedly.look=function(){return l.look()},window.embedly.defaults=function(){return Y.apply(window,arguments)},r.each(g,function(N){window.embedly.apply(window,N)}),i.connect(m),l.connect(m),t.bind(l.look),r.isFunction(window.onEmbedlyReady)&&window.onEmbedlyReady.apply(this,[window.embedly])};h.allowed(window.location.toString())?se():(window.embedly=function(){},r.each(["card","button","modal","slideshow","look","defaults"],function(g){window.embedly[g]=function(){}}))},{"./common/a.js":1,"./common/blacklist.js":3,"./common/browser.js":4,"./common/dom.js":7,"./common/found.js":8,"./common/iframes/all.js":9,"./common/integrate.js":16,"./common/libring.js":18,"./common/log/front.js":19,"./common/page.js":21,"./common/players.js":22,"./common/ready.js":23,"./common/recommend/front.js":24,"./common/share.js":25,"./common/urlparse.js":28,"./common/utils.js":29,"./common/viewport.js":30}],conf:[function(y,x,k){(function(c){c.EMB_DEBUG=!1,c.EMB_HTTPS=window.location.protocol!=="http:",c.EMB_ORIGIN=(c.EMB_HTTPS?"https":"http")+"://cdn.embedly.com",c.EMB_ORIGIN_BASE=c.EMB_ORIGIN+"/",c.EMB_ASSET_VERSION="3e3f0dc1",c.EMB_FRAME_SRC=c.EMB_ORIGIN+"/widgets/",c.EMB_SECURE_FRAME_SRC="https://cdn.embedly.com/widgets/",c.EMB_POST_MESSAGE=!!window.postMessage,c.EMB_PROGRESS=!0,c.EMB_APP_API="https://app.embed.ly",c.EMB_API_KEY="fd92ebbc52fc43fb98f69e50e7893c13";var u=window.location.pathname.split(".")[0].split("/");c.EMB_GROUP=u[u.length-1].toLowerCase(),c.PAGE_PROGRESS_DOMAINS=[]})(typeof x>"u"?this.conf={}:x.exports)},{}]},{},[31])})(),(function(){var H=this,y=this.nativePerformanceNow?nativePerformanceNow():Date.now(),x=!1,k=this.process||{};k.env=k.env||{},k.env.NODE_ENV=k.env.NODE_ENV||"production",(function(u){"use strict";function r(){return f=Object.create(null)}function n(j){const _=j,b=f[_];return b&&b.isInitialized?b.publicModule.exports:o(_,b)}function e(j){const _=j;if(f[_]&&f[_].importedDefault!==p)return f[_].importedDefault;const b=n(_),S=b&&b.__esModule?b.default:b;return f[_].importedDefault=S}function t(j){const _=j;if(f[_]&&f[_].importedAll!==p)return f[_].importedAll;const b=n(_);let S;if(b&&b.__esModule)S=b;else{if(S={},b)for(const I in b)v.call(b,I)&&(S[I]=b[I]);S.default=b}return f[_].importedAll=S}function o(j,_){if(!a&&u.ErrorUtils){a=!0;let b;try{b=s(j,_)}catch(S){u.ErrorUtils.reportFatalError(S)}return a=!1,b}return s(j,_)}function i(j){return{segmentId:j>>>h,localId:j&w}}function s(j,_){if(!_&&E.length>0){const C=i(j),B=C.segmentId,K=C.localId,Q=E[B];Q!=null&&(Q(K),_=f[j])}const b=u.nativeRequire;if(!_&&b){const C=i(j),B=C.segmentId;b(C.localId,B),_=f[j]}if(!_)throw l(j);if(_.hasError)throw d(j,_.error);_.isInitialized=!0;const S=_,I=S.factory,z=S.dependencyMap;try{const C=_.publicModule;if(C.id=j,m.length>0)for(let B=0;B{for(let b=0;b=0;P--){const U=A[P];if(U.contentWindow===O.source){T=U;break}}return T}function p(O){const A=O.clientWidth,T=window.devicePixelRatio;return A&&T?parseInt(A*T,10):0}function v(O){const A=O.match(se);return A?A[1].replace(/^https?:\/\/(www.)?/,"https://www.")+"/":null}function a(O){if(O.hasAttribute(te))return O.getAttribute(te);const A=O.getElementsByTagName("a");for(let T=A.length-1;T>=0;T--){const P=v(A[T].href);if(P)return P}return null}function h(O){"performance"in window&&window.performance!=null&&typeof window.performance=="object"&&typeof window.performance.now=="function"&&O(window.performance.now())}function w(O){if("performance"in window&&window.performance!=null&&typeof window.performance=="object"&&typeof window.performance.getEntries=="function"){const A=window.performance.getEntries().filter(T=>T.name.match(N));A&&A.length&&"fetchStart"in A[0]&&"responseEnd"in A[0]&&O(A[0].fetchStart,A[0].responseEnd)}}function m(O,A){const T=ue++,P=I+T,U={};O.id||(O.id=ie+T);let q=A.replace(Q,"$1/");if(q+="embed/",O.hasAttribute(S)&&(q+="captioned/"),q+="?cr=1",O.hasAttribute(M)){const F=parseInt(O.getAttribute(M),10);s(F)&&(q+="&v="+F)}const V=p(O);V&&(q+="&wp="+V.toString()),q+="&rd="+encodeURIComponent(window.location.origin);const L=window.location.pathname;if(L){const F=L+(window.location.search||"");q+="&rp="+encodeURIComponent(F.substring(0,200))}q=q.replace(B,K),U.ci=T,h(function(F){U.os=F}),w(function(F,le){U.ls=F,U.le=le});const W=encodeURIComponent(JSON.stringify(U)),D=document.createElement("iframe");D.className=O.className,D.id=P,D.src=q+"#"+W,D.setAttribute("allowTransparency","true"),D.setAttribute("allowfullscreen","true");const ne=O.style.position;ne&&D.setAttribute(g,ne),D.setAttribute("frameBorder","0"),D.setAttribute("height","0"),D.setAttribute(ee,O.id),D.setAttribute("scrolling","no"),D.setAttribute("style",O.style.cssText+";"+C),D.style.position="absolute",O.parentNode.insertBefore(D,O),l(O,oe),d(O,Y),G[P]=!0,h(function(F){$[P]={frameLoading:F}}),setTimeout(function(){E(P)},z)}function E(O){Object.prototype.hasOwnProperty.call(G,O)&&(delete G[O],_())}function j(O){if(!X.test(O.origin))return;const A=f(O);if(!A)return;const T=A.id;let P;try{P=JSON.parse(O.data)}catch{}if(typeof P!="object"||typeof P.type!="string"||typeof P.details!="object")return;const{details:U,type:q}=P;let V=null;switch(q){case n(i[0]).MOUNTED:{const L=document.getElementById(A.getAttribute(ee));if(L||n(i[1])(0),V=L.clientHeight,A.style.position=A.hasAttribute(g)?A.getAttribute(g):"",typeof U.styles=="object"&&U.styles.length)try{for(let W=0;W=re);A++){const T=O[A];if(T.tagName==="BLOCKQUOTE"){const P=a(T);P&&m(T,P)}}}function b(){if(!J){if(ce)return;ce=!0}n(i[2])(()=>{_(),J||(n(i[3]).add(window,"message",j.bind(this)),J=!0)})}const S="data-instgrm-captioned",I="instagram-embed-",z=1e4,C=` background-color: white; border-radius: 3px; border: 1px solid #dbdbdb; box-shadow: none; display: block; margin: 0; min-width: 326px; padding: 0; `,B=/^https?:\/\//,K="https://",Q=/^(.*?)\/?(\?.*|#|$)/,re=3,Y="instagram-media",oe="instagram-media-registered",Z="instagram-media-rendered",X=new RegExp("^https?://([\\w-]+\\.)*("+["instagram\\.com","instagr\\.am"].join("|")+")$"),ee="data-instgrm-payload-id",ie="instagram-media-payload-",te="data-instgrm-permalink",se=new RegExp("^("+X.source.replace(/^\^/,"").replace(/\$$/,"")+"/p/[^/]+)"),g="data-instgrm-preserve-position",N=new RegExp("^("+X.source.replace(/^\^/,"").replace(/\$$/,"")+"/embed\\.js)"),M="data-instgrm-version",R={};let J=!1;const G={};let ue=0,ce=!1;const $={};r(i[4]).getGlobalContext().process||(b(),r(i[4]).getGlobalContext().process=b)},0,[1,2,3,4,5]),c(function(u,r,n,e,t,o,i){t.exports={MOUNTED:"MOUNTED",LOADING:"LOADING",UNMOUNTING:"UNMOUNTING",MEASURE:"MEASURE"}},1,[]),c(function(u,r,n,e,t,o,i){"use strict";r(i[0]),t.exports=function(s,l,...d){if(!s){if(l===void 0){const f=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");throw f.framesToPop=1,f}{const f=new Error(l);throw f.name="Invariant Violation",f.messageFormat=l,f.messageParams=d.map(p=>String(p)),f.stack,f.framesToPop=1,f}}}},2,[6]),c(function(u,r,n,e,t,o,i){var s=function(...l){return(l=l.map(d=>String(d)))[0].split("%s").length!==l.length?s("ex args number mismatch: %s",JSON.stringify(l)):s._prefix+JSON.stringify(l)+s._suffix};s._prefix="",t.exports=s},6,[]),c(function(u,r,n,e,t,o,i){"use strict";function s(){if(!l)return;let d;for(;d=l.shift();)d();l=null}Object.defineProperty(o,"__esModule",{value:!0});let l=null;r(i[0]).canUseDOM&&(("readyState"in document?document.readyState==="complete"||document.readyState!=="loading":document.body)||(l=[],n(i[1]).add(document,"DOMContentLoaded",s),n(i[1]).add(window,"load",s))),o.default=function(d){l?l.push(d):d()}},3,[7,4]),c(function(u,r,n,e,t,o,i){"use strict";const s=!(typeof window>"u"||!window.document||!window.document.createElement||window._ssr),l={canUseDOM:s,canUseWorkers:typeof Worker<"u",canUseEventListeners:s&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:s&&!!window.screen,isInWorker:!s};t.exports=l},7,[]),c(function(u,r,n,e,t,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0});let s=!1;const l=n(i[0])(()=>{try{const p=Object.defineProperty({},"passive",{get:function(){s=!0}});r(i[1]).canUseDOM&&(window.addEventListener("test",null,p),window.removeEventListener("test",null,p))}catch{}return s}),d={capture:!1};class f{constructor(v){this.$EventListenerHelper1=null,this.$EventListenerHelper1=v}static add(v,a,h,w=d){let m=w;return l()||(m=typeof w!="boolean"&&!!w.capture),v.addEventListener(a,h,m),new f(()=>{v.removeEventListener(a,h,m)})}remove(){this.$EventListenerHelper1&&(this.$EventListenerHelper1(),this.$EventListenerHelper1=null)}}o.default=f},4,[8,7]),c(function(u,r,n,e,t,o,i){function s(d,f){if(typeof d!="function"||f!=null&&typeof f!="function")throw new TypeError(l);var p=function(){var v=arguments,a=f?f.apply(this,v):v[0],h=p.cache;if(h.has(a))return h.get(a);var w=d.apply(this,v);return p.cache=h.set(a,w)||h,w};return p.cache=new(s.Cache||r(i[0])),p}var l="Expected a function";s.Cache=r(i[0]),t.exports=s},8,[9]),c(function(u,r,n,e,t,o,i){function s(l){var d=-1,f=l==null?0:l.length;for(this.clear();++d-1}},41,[43]),c(function(u,r,n,e,t,o,i){t.exports=function(s,l){var d=this.__data__,f=r(i[0])(d,s);return f<0?(++this.size,d.push([s,l])):d[f][1]=l,this}},42,[43]),c(function(u,r,n,e,t,o,i){t.exports=function(s){var l=r(i[0])(this,s).delete(s);return this.size-=l?1:0,l}},11,[45]),c(function(u,r,n,e,t,o,i){t.exports=function(s,l){var d=s.__data__;return r(i[0])(l)?d[typeof l=="string"?"string":"hash"]:d.map}},45,[46]),c(function(u,r,n,e,t,o,i){t.exports=function(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}},46,[]),c(function(u,r,n,e,t,o,i){t.exports=function(s){return r(i[0])(this,s).get(s)}},12,[45]),c(function(u,r,n,e,t,o,i){t.exports=function(s){return r(i[0])(this,s).has(s)}},13,[45]),c(function(u,r,n,e,t,o,i){t.exports=function(s,l){var d=r(i[0])(this,s),f=d.size;return d.set(s,l),this.size+=d.size==f?0:1,this}},14,[45]),c(function(u,r,n,e,t,o,i){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),window.instgrm||(window.instgrm={Embeds:{}}),o.getGlobalContext=function(){return window.instgrm.Embeds}},5,[]),H.__r(0)}).call({}),automizy_form_mzwvlhgezjlltkg0y93f_7ua2awOnSubmit=function(H){var y=document.getElementById("automizy-form-e3gpvsjjl6dbtrel4arnz3yex3k-form"),x=document.getElementById("automizy-form-e3gpvsjjl6dbtrel4arnz3yex3k-submit"),k=document.getElementById("automizy-form-e3gpvsjjl6dbtrel4arnz3yex3k-captcha-submit");x.style.display="block",k.style.display="none",setTimeout(function(){x.click()},100)};