// function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.HorizontalScroll=t()}}(function(){return function t(e,n,i){function r(o,a){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var h=n[o]={exports:{}};e[o][0].call(h.exports,function(t){var n=e[o][1][t];return r(n?n:t)},h,h.exports,t,e,n,i)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(t,e,n){"use strict";function i(t,e){return function(){return t.apply(e,arguments)}}var r=Object.prototype.toString,s=Object.prototype.hasOwnProperty;e.exports=function(t){if(!t)return console.warn("bindAll requires at least one argument.");var e=Array.prototype.slice.call(arguments,1);if(0===e.length)for(var n in t)s.call(t,n)&&"function"==typeof t[n]&&"[object Function]"==r.call(t[n])&&e.push(n);for(var o=0;o<e.length;o++){var a=e[o];t[a]=i(t[a],t)}}},{}],2:[function(t,e,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function s(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!s(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,n,i,s,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var h=new Error('Uncaught, unspecified "error" event. ('+e+")");throw h.context=e,h}if(n=this._events[t],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;i>l;l++)u[l].apply(this,s);return!0},i.prototype.addListener=function(t,e){var n;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(n=a(this._maxListeners)?i.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},i.prototype.removeListener=function(t,e){var n,i,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(a=s;a-->0;)if(n[a]===e||n[a].listener&&n[a].listener===e){i=a;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},{}],3:[function(t,e,n){(function(){var t;t="undefined"!=typeof n&&null!==n?n:this,t.Lethargy=function(){function t(t,e,n,i){this.stability=null!=t?Math.abs(t):8,this.sensitivity=null!=e?1+Math.abs(e):100,this.tolerance=null!=n?1+Math.abs(n):1.1,this.delay=null!=i?i:150,this.lastUpDeltas=function(){var t,e,n;for(n=[],t=1,e=2*this.stability;e>=1?e>=t:t>=e;e>=1?t++:t--)n.push(null);return n}.call(this),this.lastDownDeltas=function(){var t,e,n;for(n=[],t=1,e=2*this.stability;e>=1?e>=t:t>=e;e>=1?t++:t--)n.push(null);return n}.call(this),this.deltasTimestamp=function(){var t,e,n;for(n=[],t=1,e=2*this.stability;e>=1?e>=t:t>=e;e>=1?t++:t--)n.push(null);return n}.call(this)}return t.prototype.check=function(t){var e;return t=t.originalEvent||t,null!=t.wheelDelta?e=t.wheelDelta:null!=t.deltaY?e=-40*t.deltaY:(null!=t.detail||0===t.detail)&&(e=-40*t.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),e>0?(this.lastUpDeltas.push(e),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(e),this.lastDownDeltas.shift(),this.isInertia(-1))},t.prototype.isInertia=function(t){var e,n,i,r,s,o,a;return e=-1===t?this.lastDownDeltas:this.lastUpDeltas,null===e[0]?t:this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&e[0]===e[2*this.stability-1]?!1:(i=e.slice(0,this.stability),n=e.slice(this.stability,2*this.stability),a=i.reduce(function(t,e){return t+e}),s=n.reduce(function(t,e){return t+e}),o=a/i.length,r=s/n.length,Math.abs(o)<Math.abs(r*this.tolerance)&&this.sensitivity<Math.abs(r)?t:!1)},t.prototype.showLastUpDeltas=function(){return this.lastUpDeltas},t.prototype.showLastDownDeltas=function(){return this.lastDownDeltas},t}()}).call(this)},{}],4:[function(t,e,n){"use strict";function i(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;10>n;n++)e["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},r)).join("")?!1:!0}catch(s){return!1}}var s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(t,e){for(var n,r,l=i(t),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var h in n)o.call(n,h)&&(l[h]=n[h]);if(s){r=s(n);for(var c=0;c<r.length;c++)a.call(n,r[c])&&(l[r[c]]=n[r[c]])}}return l}},{}],5:[function(t,e,n){(function(t){(function(){var n,i,r;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-r)/1e6},i=t.hrtime,n=function(){var t;return t=i(),1e9*t[0]+t[1]},r=n()):Date.now?(e.exports=function(){return Date.now()-r},r=Date.now()):(e.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}).call(this,t("_process"))},{_process:7}],6:[function(t,e,n){function i(t){if(t=t.replace(/-([a-z])/g,function(t,e){return e.toUpperCase()}),void 0!==o[t])return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=a.length;n--;){var i=a[n]+e;if(void 0!==o[i])return i}return t}function r(t){return t in u?u[t]:u[t]=i(t)}function s(t){return t=i(t),l.test(t)&&(t="-"+t.replace(l,"-$1"),l.lastIndex=0),t.toLowerCase()}var o="undefined"!=typeof document?document.createElement("p").style:{},a=["O","ms","Moz","Webkit"],l=/([A-Z])/g,u={};e.exports=r,e.exports.dash=s},{}],7:[function(t,e,n){function i(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(t){if(c===setTimeout)return setTimeout(t,0);if((c===i||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){y&&v&&(y=!1,v.length?d=v.concat(d):m=-1,d.length&&l())}function l(){if(!y){var t=s(a);y=!0;for(var e=d.length;e;){for(v=d,d=[];++m<e;)v&&v[m].run();m=-1,e=d.length}v=null,y=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function h(){}var c,f,p=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:i}catch(t){c=i}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var v,d=[],y=!1,m=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new u(t,e)),1!==d.length||y||s(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=h,p.addListener=h,p.once=h,p.off=h,p.removeListener=h,p.removeAllListeners=h,p.emit=h,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],8:[function(t,e,n){(function(n){for(var i=t("performance-now"),r="undefined"==typeof window?n:window,s=["moz","webkit"],o="AnimationFrame",a=r["request"+o],l=r["cancel"+o]||r["cancelRequest"+o],u=0;!a&&u<s.length;u++)a=r[s[u]+"Request"+o],l=r[s[u]+"Cancel"+o]||r[s[u]+"CancelRequest"+o];if(!a||!l){var h=0,c=0,f=[],p=1e3/60;a=function(t){if(0===f.length){var e=i(),n=Math.max(0,p-(e-h));h=n+e,setTimeout(function(){var t=f.slice(0);f.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(h)}catch(n){setTimeout(function(){throw n},0)}},Math.round(n))}return f.push({handle:++c,callback:t,cancelled:!1}),c},l=function(t){for(var e=0;e<f.length;e++)f[e].handle===t&&(f[e].cancelled=!0)}}e.exports=function(t){return a.call(r,t)},e.exports.cancel=function(){l.apply(r,arguments)},e.exports.polyfill=function(){r.requestAnimationFrame=a,r.cancelAnimationFrame=l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":5}],9:[function(t,e,n){function i(){}i.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function i(){r.off(t,i),e.apply(n,arguments)}var r=this;return i._=e,this.on(t,i,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,r=n.length;for(i;r>i;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],r=[];if(i&&e)for(var s=0,o=i.length;o>s;s++)i[s].fn!==e&&i[s].fn._!==e&&r.push(i[s]);return r.length?n[t]=r:delete n[t],this}},e.exports=i},{}],10:[function(t,e,n){"use strict";e.exports=function(t){return JSON.parse(JSON.stringify(t))}},{}],11:[function(t,e,n){"use strict";function i(t){l(this,"_onWheel","_onMouseWheel","_onTouchStart","_onTouchMove","_onKeyDown"),this.el=window,t&&t.el&&(this.el=t.el,delete t.el),this.options=r({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",limitInertia:!1},t),this.options.limitInertia&&(this._lethargy=new o),this._emitter=new s,this._event={y:0,x:0,deltaX:0,deltaY:0},this.touchStartX=null,this.touchStartY=null,this.bodyTouchAction=null}var r=t("object-assign"),s=t("tiny-emitter"),o=t("lethargy").Lethargy,a=t("./support"),l=(t("./clone"),t("bindall-standalone")),u="virtualscroll";e.exports=i;var h={LEFT:37,UP:38,RIGHT:39,DOWN:40};i.prototype._notify=function(t){var e=this._event;e.x+=e.deltaX,e.y+=e.deltaY,this._emitter.emit(u,{x:e.x,y:e.y,deltaX:e.deltaX,deltaY:e.deltaY,originalEvent:t})},i.prototype._onWheel=function(t){var e=this.options;if(!this._lethargy||this._lethargy.check(t)!==!1){var n=this._event;n.deltaX=t.wheelDeltaX||-1*t.deltaX,n.deltaY=t.wheelDeltaY||-1*t.deltaY,a.isFirefox&&1==t.deltaMode&&(n.deltaX*=e.firefoxMultiplier,n.deltaY*=e.firefoxMultiplier),n.deltaX*=e.mouseMultiplier,n.deltaY*=e.mouseMultiplier,this._notify(t)}},i.prototype._onMouseWheel=function(t){if(!this.options.limitInertia||this._lethargy.check(t)!==!1){var e=this._event;e.deltaX=t.wheelDeltaX?t.wheelDeltaX:0,e.deltaY=t.wheelDeltaY?t.wheelDeltaY:t.wheelDelta,this._notify(t)}},i.prototype._onTouchStart=function(t){var e=t.targetTouches?t.targetTouches[0]:t;this.touchStartX=e.pageX,this.touchStartY=e.pageY},i.prototype._onTouchMove=function(t){var e=this.options;e.preventTouch&&!t.target.classList.contains(e.unpreventTouchClass)&&t.preventDefault();var n=this._event,i=t.targetTouches?t.targetTouches[0]:t;n.deltaX=(i.pageX-this.touchStartX)*e.touchMultiplier,n.deltaY=(i.pageY-this.touchStartY)*e.touchMultiplier,this.touchStartX=i.pageX,this.touchStartY=i.pageY,this._notify(t)},i.prototype._onKeyDown=function(t){var e=this._event;switch(e.deltaX=e.deltaY=0,t.keyCode){case h.LEFT:case h.UP:e.deltaY=this.options.keyStep;break;case h.RIGHT:case h.DOWN:e.deltaY=-this.options.keyStep;break;default:return}this._notify(t)},i.prototype._bind=function(){a.hasWheelEvent&&this.el.addEventListener("wheel",this._onWheel),a.hasMouseWheelEvent&&this.el.addEventListener("mousewheel",this._onMouseWheel),a.hasTouch&&(this.el.addEventListener("touchstart",this._onTouchStart),this.el.addEventListener("touchmove",this._onTouchMove)),a.hasPointer&&a.hasTouchWin&&(this.bodyTouchAction=document.body.style.msTouchAction,document.body.style.msTouchAction="none",this.el.addEventListener("MSPointerDown",this._onTouchStart,!0),this.el.addEventListener("MSPointerMove",this._onTouchMove,!0)),a.hasKeyDown&&document.addEventListener("keydown",this._onKeyDown)},i.prototype._unbind=function(){a.hasWheelEvent&&this.el.removeEventListener("wheel",this._onWheel),a.hasMouseWheelEvent&&this.el.removeEventListener("mousewheel",this._onMouseWheel),a.hasTouch&&(this.el.removeEventListener("touchstart",this._onTouchStart),this.el.removeEventListener("touchmove",this._onTouchMove)),a.hasPointer&&a.hasTouchWin&&(document.body.style.msTouchAction=this.bodyTouchAction,this.el.removeEventListener("MSPointerDown",this._onTouchStart,!0),this.el.removeEventListener("MSPointerMove",this._onTouchMove,!0)),a.hasKeyDown&&document.removeEventListener("keydown",this._onKeyDown)},i.prototype.on=function(t,e){this._emitter.on(u,t,e);var n=this._emitter.e;n&&n[u]&&1===n[u].length&&this._bind()},i.prototype.off=function(t,e){this._emitter.off(u,t,e);var n=this._emitter.e;(!n[u]||n[u].length<=0)&&this._unbind()},i.prototype.reset=function(){var t=this._event;t.x=0,t.y=0},i.prototype.destroy=function(){this._emitter.off(),this._unbind()}},{"./clone":10,"./support":12,"bindall-standalone":1,lethargy:3,"object-assign":4,"tiny-emitter":9}],12:[function(t,e,n){"use strict";e.exports=function(){return{hasWheelEvent:"onwheel"in document,hasMouseWheelEvent:"onmousewheel"in document,hasTouch:"ontouchstart"in document,hasTouchWin:navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1}}()},{}],13:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=("undefined"==typeof e?"undefined":a(e))&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":a(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),u=t("events"),h=t("virtual-scroll"),c=i(h),f=t("raf"),p=i(f),v=t("prefix"),d=i(v),y=function(t){function e(t){r(this,e);var n=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n._bind(),n.options=Object.assign({container:t.container,blocks:t.blocks,isAnimated:t.isAnimated||!1,spring:t.spring||.1,skewReducer:t.skewReducer||20,skewLimit:t.skewLimit||30},t),n.vars={scrollValue:0,oldScrollValue:0,scrollTarget:0,scrollLeft:0,scrollRight:0,spring:n.options.spring,direction:0,speed:0,speedTarget:0},n.wrapper=document.createElement("div"),n.wrapper.setAttribute("class","horizontal-scroll"),n.vs=new c["default"],n.transform=d["default"]("transform"),n.raf=p["default"],n._setUI(),n._addEvents(),n.onResize(),n}return o(e,t),l(e,[{key:"_bind",value:function(){this._update=this._update.bind(this),this.onResize=this.onResize.bind(this)}},{key:"_addEvents",value:function(){this.vs.on(this._onScroll,this),this.raf(this._update),window.addEventListener("resize",this.onResize)}},{key:"_removeEvents",value:function(){this.raf.cancel(this._update),this.raf(this._update),window.removeEventListener("resize",this.onResize)}},{key:"_setUI",value:function(){var t=this;Object.assign(this.wrapper.style,{position:"absolute",top:"0",left:"0","backface-visibility":"hidden","will-change":"transform"}),Object.assign(this.options.container[0].style,{"white-space":"nowrap",position:"relative"}),Array.prototype.forEach.call(this.options.blocks,function(e){e.style.display="inline-block",t.options.container[0].replaceChild(t.wrapper,e),t.wrapper.appendChild(e)}),this.options.container[0].appendChild(this.wrapper)}},{key:"_onScroll",value:function(t){t.deltaY>0?this.vars.direction=1:this.vars.direction=-1,this.vars.scrollTarget+=-1*t.deltaY,this.vars.scrollTarget=Math.round(Math.max(this.vars.scrollLeft,Math.min(this.vars.scrollTarget,this.vars.scrollRight)))}},{key:"_update",value:function(){this.vars.scrollValue+=(this.vars.scrollTarget-this.vars.scrollValue)*this.vars.spring;var t=this.vars.scrollTarget-this.vars.scrollValue,e=t/this.options.skewReducer;this.vars.speed=this._clamp(-e,-this.options.skewLimit,this.options.skewLimit),this.options.isAnimated?this.wrapper.style[this.transform]="translate3d(-"+this.vars.scrollValue+"px, 0 ,0) skewX("+this.vars.speed+"deg)":this.wrapper.style[this.transform]="translate3d(-"+this.vars.scrollValue+"px, 0 ,0)",this.vars.oldScrollValue=this.vars.scrollValue,this.raf(this._update)}},{key:"_clamp",value:function(t,e,n){return Math.min(Math.max(t,e),n)}},{key:"onResize",value:function(){this.vars.scrollLeft=0,this.vars.scrollRight=this.wrapper.getBoundingClientRect().width-window.innerWidth}},{key:"destroy",value:function(){this._removeEvents()}}]),e}(u.EventEmitter);n["default"]=y},{events:2,prefix:6,raf:8,"virtual-scroll":11}]},{},[13])(13)}); // #sourceMappingURL=index.js.map !function(n){"use strict";n.vungle=n.vungle||{}}(window);!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);r(1),r(2),r(3),r(4)},function(e,t){!function(e){"use strict";var t,r=e.vungle=e.vungle||{};r.error||((t=r.error=r.error||{}).bridgeError={BRG000:"Missing command in mraidBridge.executeSDKCommand method call!",BRG001:"Vungle SDK is not ready to process MRAID command!"},t.bridgeExtError={BRX000:"Cannot retrieve #dynamic container in Ad Unit!"},t.mraidError={MRD000:"Cannot add listener for unknown MRAID event!",MRD001:"Missing argument(s)! Both event and/or listener are required for method call!",MRD002:"Unable to find listener registered for event!",MRD003:"Missing MRAID event! Cannot remove event listener!",MRD004:"Missing object! An expand properties object is required for method call!",MRD005:"Missing object! An orientation properties object is required for method call!",MRD006:"Missing object! An resize properties object is required for method call!",MRD007:"Missing URL! A URL is required for method call!",MRD008:"Ad unit is hidden and cannot be closed!",MRD009:"Missing URL! A video/caption URL is required for method call!",MRD010:"Ad Unit is not viewable! Please make sure isViewAble is set to true!",MRD011:"Ad unit can only be expanded from the default or resized state!",MRD012:"Ad unit can only be resized from the default or resized state!",MRD013:"Missing URI! A valid URI is required for method call!",MRD015:"Invalid data/type detected when updating MRAID properties!",MRD016:"Missing app store id! An app store id is required for method call!"},t.mraidClientError={MRC000:"MRAID SDK error detected!",MRC001:"Missing MRAID object in window!",MRC002:"Missing video URL! mraidClient.playVideo cannot retrieve video URL from arguments!"},t.adTemplateError={ADT000:"Missing page template JavaScript!",ADT001:"Error encountered loading template configuration!"},t.gestureTrackingError={GET000:"Cannot serialize user interaction tracking event object!"})}(window)},function(e,t){!function(e){"use strict";var t=e.vungle=e.vungle||{},r=t.mraidCore=t.mraidCore||{},n=t.debugLog=t.debugLog||[];n&&n.push("vungle.mraidCore loaded."),r.consts={versions:{V1:"1.0",V2:"2.0"},states:{LOADING:"loading",DEFAULT:"default",RESIZED:"resized",EXPANDED:"expanded",HIDDEN:"hidden"},events:{INFO:"info",READY:"ready",ERROR:"error",STATE_CHANGE:"stateChange",ORIENTATION_CHANGE:"orientationChange",VIEWABLE_CHANGE:"viewableChange",SIZE_CHANGE:"sizeChange"},placements:{UNKNOWN:"unknown",INLINE:"inline",INTERSTITIAL:"interstitial"},orientations:{PORTRAIT:"portrait",LANDSCAPE:"landscape",NONE:"none"},closePositions:{CENTER:"center",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right"}},r.PropertiesValueObject=function(e){var t=function(e){var t;return e&&"object"==typeof e?(t={},Object.keys(e).forEach(function(r){t[r]=e[r]})):t=e,t};this.value=t(e),this.clone=function(){return t(this.value)},this.update=function(e){if(e&&"object"==typeof e){var t=this;Object.keys(e).forEach(function(r){t.value[r]=e[r]})}else this.value=e}},r.EventListeners=function(e){var t={};this.event=e,this.listenerCount=0,this.add=function(e){var r=String(e);return!t[r]&&(t[r]=e,this.listenerCount++,!0)},this.remove=function(e){var r=String(e);return!(!t.hasOwnProperty(r)||!t[r])&&(t[r]=null,delete t[r],this.listenerCount--,!0)},this.removeAll=function(){var e=this;Object.keys(t).forEach(function(r){e.remove(t[r])})},this.broadcast=function(e){var r=this;Object.keys(t).forEach(function(n){t[n].apply(r.mraid,e)})}};var o=new r.PropertiesValueObject(r.consts.versions.V1),i=new r.PropertiesValueObject({width:0,height:0}),a=new r.PropertiesValueObject({width:0,height:0}),s=new r.PropertiesValueObject({x:0,y:0,width:0,height:0}),c=new r.PropertiesValueObject({x:0,y:0,width:0,height:0}),d=new r.PropertiesValueObject({width:0,height:0,useCustomClose:!1,isModal:!0}),u=new r.PropertiesValueObject({width:0,height:0,offsetX:0,offsetY:0,customClosePosition:r.consts.closePositions.TOP_RIGHT,allowOffscreen:!0}),l=new r.PropertiesValueObject({allowOrientationChange:!0,forceOrientation:r.consts.orientations.NONE}),p=new r.PropertiesValueObject({sms:!1,tel:!1,calendar:!1,storePicture:!1,inlineVideo:!1}),m=new r.PropertiesValueObject(r.consts.states.LOADING),f=new r.PropertiesValueObject(r.consts.placements.UNKNOWN),E=new r.PropertiesValueObject(!1),g=new r.PropertiesValueObject(!1),v=new r.PropertiesValueObject(!1),y=new r.PropertiesValueObject(!1),R=new r.PropertiesValueObject(!1),h=new r.PropertiesValueObject(!1),O=new r.PropertiesValueObject(!1),S=new r.PropertiesValueObject(!1),C=new r.PropertiesValueObject(!1),x=new r.PropertiesValueObject(!1),b={},P=new r.PropertiesValueObject(""),B=new r.PropertiesValueObject(""),D=new r.PropertiesValueObject("");r.eventListeners=b,r.propertiesHandlers={os:{update:function(e){P.update(e)},clone:function(){return P.clone()}},osVersion:{update:function(e){B.update(e)},clone:function(){return B.clone()}},sdkVersion:{update:function(e){D.update(e)},clone:function(){return D.clone()}},incentivized:{update:function(e){g.update(e)},clone:function(){return g.clone()}},consentRequired:{update:function(e){v.update(e)},clone:function(){return v.clone()}},consentTitleText:{update:function(e){y.update(e)},clone:function(){return y.clone()}},consentBodyText:{update:function(e){R.update(e)},clone:function(){return R.clone()}},consentAcceptButtonText:{update:function(e){h.update(e)},clone:function(){return h.clone()}},consentDenyButtonText:{update:function(e){O.update(e)},clone:function(){return O.clone()}},version:{update:function(e){o.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting MRAID version to: "+String(e))},clone:function(){return o.clone()}},maxSize:{update:function(e){i.update(e),d.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting maxSize to: "+String(e))},clone:function(){return i.clone()}},screenSize:{update:function(e){var t;a.update(e),t=a.clone(),r.broadcastEvent(r.consts.events.INFO,"Setting screenSize to: "+String(e)),r.broadcastEvent(r.consts.events.SIZE_CHANGE,t.width,t.height)},clone:function(){return a.clone()}},defaultPosition:{update:function(e){s.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting defaultPosition to: "+String(e))},clone:function(){return s.clone()}},currentPosition:{update:function(e){c.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting currentPosition to: "+String(e))},clone:function(){return c.clone()}},expandProperties:{update:function(e){d.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting expandProperties to: "+String(e))},clone:function(){return d.clone()}},resizeProperties:{update:function(e){u.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting resizeProperties to: "+String(e))},clone:function(){return u.clone()}},orientationProperties:{update:function(e){l.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting orientationProperties to: "+String(e))},clone:function(){return l.clone()}},supports:{update:function(e){p.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting supports to: "+String(e))},clone:function(){return p.clone()}},state:{update:function(e){m.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting state to: "+String(e)),r.broadcastEvent(r.consts.events.STATE_CHANGE,m.clone()),m.clone()===r.consts.states.DEFAULT&&r.broadcastEvent(r.consts.events.READY)},clone:function(){return m.clone()}},placementType:{update:function(e){f.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting placementType to: "+String(e))},clone:function(){return f.clone()}},isViewable:{update:function(e){E.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting isViewable to: "+String(e)),r.broadcastEvent(r.consts.events.VIEWABLE_CHANGE,E.clone())},clone:function(){return E.clone()}},customClose:{update:function(e){S.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting useCustomClose to: "+String(e))},clone:function(){return S.clone()}},customPrivacy:{update:function(e){C.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting useCustomPrivacy to: "+String(e))},clone:function(){return C.clone()}},enableBackImmediately:{update:function(e){x.update(e),r.broadcastEvent(r.consts.events.INFO,"Setting enableBackImmediately to: "+String(e))},clone:function(){return x.clone()}}},r.propertiesValidator=function(e,r,n){var o=!0;return typeof e!=typeof r&&"useCustomClose"!==n?(o=!1,t.mraidBridgeExt&&t.mraidBridgeExt.notifyError(["MRD015",n,e].join(":"))):"object"==typeof e&&Object.keys(e).forEach(function(e){e in r||(o=!1,t.mraidBridgeExt&&t.mraidBridgeExt.notifyError(["MRD015",n,e].join(":")))}),o},r.broadcastEvent=function(){var e=Array.prototype.slice.call(arguments),t=e.shift(),r=b[t];r&&r.broadcast(e)},r.isValidMARIDEvent=function(e){for(var t in r.consts.events)if(r.consts.events[t]===e)return!0;return!1}}(window)},function(e,t){!function(e){"use strict";var t,r=e.vungle=e.vungle||{},n=r.mraidBridge=r.mraidBridge||{},o=r.mraidBridgeExt=r.mraidBridgeExt||{},i=r.debugLog=r.debugLog||[],a=!1,s=!1,c=[],d=!1,u=!1,l=!1,p=!1,m=r.mraidCore.broadcastEvent,f=r.mraidCore.consts.states,E=r.mraidCore.consts.events;i&&i.push("vungle.mraidBridge loaded."),n.notifyContainer=function(t){e.location=t},n.notifyPropertiesChange=function(e,t){i&&i.push("mraidBridge.notifyPropertiesChange:"+JSON.stringify(e)),Object.keys(e).forEach(function(t){r.mraidCore.propertiesHandlers[t]?r.mraidCore.propertiesHandlers[t].update(e[t]):n.notifyErrorEvent("notifyPropertiesChange","MRD015: Unhandled Property received - "+t+" - "+e[t])}),void 0!==t&&!0===t&&n.notifyContainer("mraid://propertiesChangeCompleted")},n.notifyCommandComplete=function(){i&&i.push("mraidBridge.notifyCommandComplete");var e="";c.length?(e=c.shift(),n.notifyContainer(e)):s=!1},n.notifyReadyEvent=function(e){i&&i.push("mraidBridge.notifyReadyEvent");var n=r.mraidCore.propertiesHandlers.state.clone();a=!0,void 0!==e?(d=!0,p=e.isInstalled,l=e.isDisplayIAP,u=e.isDirectDownload,t=e):r.mraidBridgeExt.notifySuccessfulViewAd(),n!==f.DEFAULT?r.mraidCore.propertiesHandlers.state.update(f.DEFAULT):m(E.READY)},n.notifyErrorEvent=function(e,t){i&&i.push("mraidBridge.notifyErrorEvent:"+e+":"+t),m(E.ERROR,e,t)},n.executeSDKCommand=function(){var e,t,o,d="";if(!a)throw n.notifyErrorEvent(d,r.error.bridgeError.BRG001),{name:"VungleMRAIDBridgeException",message:"BRG001"};if(!arguments)throw n.notifyErrorEvent(d,r.error.bridgeError.BRG000),{name:"VungleMRAIDBridgeException",message:"BRG000"};for(d+="mraid://"+arguments[0],o=1;o<arguments.length;o+=2)e=arguments[o],t=arguments[o+1],d+=(1===o?"?":"&")+encodeURIComponent(e),void 0!==t&&(d+="="+encodeURIComponent(t));s?c.push(d):(s=!0,n.notifyContainer(d)),i&&i.push("mraidBridge.executeSDKCommand: "+d)},o.getReplacementTokens=function(){return t},o.getIsVungleAd=function(){return d},o.getIsDirectDownload=function(){return u},o.getIsDisplayIAP=function(){return l},o.getIsInstalled=function(){return p},o.getEnableBackButtonImmediately=function(){return r.mraidCore.propertiesHandlers.enableBackImmediately.clone()},o.fireVideoCompleteEvent=function(){i&&i.push("mraidBridgeExt.fireVideoCompleteEvent");var t=e.document.querySelector("#dynamic"),r=new e.Event("vungle.events.video.ended");t?t.dispatchEvent(r):o.notifyError(e.vungle.error.bridgeExtError.BRX000)},o.notifyPrepareStoreViewSuccess=function(){i&&i.push("mraidBridgeExt.notifyPrepareStoreViewSuccess");var t=e.document.querySelector("#dynamic"),r=new e.Event("vungle.events.preparestore.success");t?t.dispatchEvent(r):o.notifyError(e.vungle.error.bridgeExtError.BRX000)},o.notifyPresentStoreViewFinished=function(){i&&i.push("mraidBridgeExt.notifyPresentStoreViewFinished");var t=e.document.querySelector("#dynamic"),r=new e.Event("vungle.events.preparestore.finished");t?t.dispatchEvent(r):o.notifyError(e.vungle.error.bridgeExtError.BRX000)},o.notifyPrepareStoreOverlayViewSuccess=function(){i&&i.push("mraidBridgeExt.notifyPrepareStoreOverlayViewSuccess");var t=e.document.querySelector("#dynamic"),r=new e.Event("vungle.events.storeoverlay.success");t?t.dispatchEvent(r):o.notifyError(e.vungle.error.bridgeExtError.BRX000)},o.notifyPresentStoreOverlayViewFinished=function(){i&&i.push("mraidBridgeExt.notifyPresentStoreOverlayViewFinished");var t=e.document.querySelector("#dynamic"),r=new e.Event("vungle.events.storeoverlay.finished");t?t.dispatchEvent(r):o.notifyError(e.vungle.error.bridgeExtError.BRX000)},o.notifyPresentStoreOverlayViewVisible=function(){i&&i.push("mraidBridgeExt.notifyPresentStoreOverlayViewVisible");var t=e.document.querySelector("#dynamic"),r=new e.Event("vungle.events.storeoverlay.visible");t?t.dispatchEvent(r):o.notifyError(e.vungle.error.bridgeExtError.BRX000)},o.notifyPresentStoreOverlayViewFailed=function(){i&&i.push("mraidBridgeExt.notifyPresentStoreOverlayViewFailed");var t=e.document.querySelector("#dynamic"),r=new e.Event("vungle.events.storeoverlay.failed");t?t.dispatchEvent(r):o.notifyError(e.vungle.error.bridgeExtError.BRX000)},o.notifyError=function(t){i&&i.push("mraidBridgeExt.notifyError:"+t);try{r.mraidBridge.executeSDKCommand("error","code",t)}catch(t){"VungleMRAIDBridgeException"===t.name?i&&i.push("%cVungleMRAIDBridgeException caught in mraidBridgeExt.notifyError! Message: %s","color: red; font-size: x-large",e.vungle.error.bridgeError[t.message]):i&&i.push("%cUnknown Exception caught in mraidBridgeExt.notifyError! Message: %s","color: red; font-size: x-large",t.message)}},o.notifyTPAT=function(e){i&&i.push("mraidBridgeExt.notifyTPATEvent:"+e);try{r.mraidBridge.executeSDKCommand("tpat","event",e)}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.notifyTPAT",e.message)}},o.consentAction=function(e){i&&i.push("mraidBridgeExt.consentActionEvent:"+e);try{r.mraidBridge.executeSDKCommand("consentAction","event",e)}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.consentActionEvent",e.message)}},o.notifyUserInteraction=function(e,t){i&&i.push("mraidBridgeExt.notifyUserInteraction");try{r.mraidBridge.executeSDKCommand("action",e,t)}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.notifyUserInteraction",e.message)}},o.notifyEventValuePairEvent=function(e,t){i&&i.push("mraidBridgeExt.notifyEventValuePairEvent");var n=e||"null",o=t||"null";try{r.mraidBridge.executeSDKCommand("actionWithValue","event",n,"value",o)}catch(n){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.notifyEventValuePairEvent",n.message)}},o.playHTML5Video=function(e){i&&i.push("mraidBridgeExt.playHTML5Video");try{r.mraidBridge.executeSDKCommand("playHTML5Video","selector",e)}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.playHTML5Video",e.message)}},o.openPrivacy=function(e){i&&i.push("mraidBridgeExt.openPrivacy");try{r.mraidBridge.executeSDKCommand("openPrivacy","url",e)}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.openPrivacy",e.message)}},o.requestMRAIDClose=function(){i&&i.push("mraidBridgeExt.requestMRAIDClose");try{var e,t="windows"===r.mraidExt.getOS()&&(0===r.mraidExt.getOSVersion().indexOf("WinPhone81")||0===r.mraidExt.getOSVersion().indexOf("Win81")),n="android"===r.mraidExt.getOS()&&parseInt(r.mraidExt.getOSVersion(),10)<=17;t||n?(e=document.createEvent("Event")).initEvent("vungle.events.request.close",!0,!0):e=new Event("vungle.events.request.close"),d?document.querySelector("#dynamic").dispatchEvent(e):r.mraidBridge.executeSDKCommand("close")}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.requestMRAIDClose", e.message)}},o.notifySuccessfulViewAd=function(){i&&i.push("mraidBridgeExt.notifySuccessfulViewAd");try{r.mraidBridge.executeSDKCommand("successfulView")}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.notifySuccessfulViewAd",e.message)}},o.openAppInDevice=function(){i&&i.push("mraidBridgeExt.openAppInDevice");try{r.mraidBridge.executeSDKCommand("openAppInDevice")}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.openAppInDevice",e.message)}},o.openStorePage=function(){i&&i.push("mraidBridgeExt.openStorePage");try{r.mraidBridge.executeSDKCommand("openStorePage")}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.openStorePage",e.message)}},o.cancelDownload=function(){i&&i.push("mraidBridgeExt.cancelDownload");try{r.mraidBridge.executeSDKCommand("cancelDownload")}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.cancelDownload",e.message)}},o.getInstallationStatus=function(t){i&&i.push("mraidBridgeExt.getInstallationStatus");var r=e.document.querySelector("#dynamic"),n=new e.CustomEvent("vungle.events.installationStatus.updated",{detail:t});r?r.dispatchEvent(n):o.notifyError(e.vungle.error.bridgeExtError.BRX000)},o.startDownloadAppOnDevice=function(){i&&i.push("mraidBridgeExt.startDownloadAppOnDevice");try{r.mraidBridge.executeSDKCommand("startDownloadAppOnDevice")}catch(e){r.mraidBridge.notifyErrorEvent("mraidBridgeExt.startDownloadAppOnDevice",e.message)}}}(window)},function(e,t){!function(e){"use strict";var t=e.vungle=e.vungle||{},r=e.mraid=t.mraid=t.mraid||{},n=t.mraidExt=t.mraidExt||{},o=t.debugLog=t.debugLog||[],i=t.mraidBridge.executeSDKCommand,a=t.mraidCore.broadcastEvent,s=t.mraidCore.propertiesHandlers,c=t.mraidCore.propertiesValidator,d=t.mraidCore.consts.states,u=t.mraidCore.consts.events,l=t.mraidCore.consts.placements;o&&o.push("vungle.mraid loaded."),r.addEventListener=function(e,r){e&&r?t.mraidCore.isValidMARIDEvent(e)?(t.mraidCore.eventListeners[e]||(t.mraidCore.eventListeners[e]=new t.mraidCore.EventListeners(e)),t.mraidCore.eventListeners[e].add(r)):a(u.ERROR,"mraid.addEventListener",t.error.mraidError.MRD000+":"+e):a(u.ERROR,"mraid.addEventListener",t.error.mraidError.MRD001)},r.removeEventListener=function(e,r){var n,o=!1;e?(n=t.mraidCore.eventListeners[e],r?(n&&(o=n.remove(r)),o||a(u.ERROR,"mraid.removeEventListener",t.error.mraidError.MRD002+":"+e)):n&&t.mraidCore.eventListeners.removeAll(),n&&0===n.count&&(t.mraidCore.eventListeners[e]=null,delete t.mraidCore.eventListeners[e])):a(u.ERROR,"mraid.removeEventListener",t.error.mraidError.MRD003)},r.getVersion=function(){return s.version.clone()},r.getMaxSize=function(){return s.maxSize.clone()},r.getScreenSize=function(){return s.screenSize.clone()},r.getDefaultPosition=function(){return s.defaultPosition.clone()},r.getCurrentPosition=function(){return s.currentPosition.clone()},r.getExpandProperties=function(){return s.expandProperties.clone()},r.getResizeProperties=function(){return s.resizeProperties.clone()},r.getState=function(){return s.state.clone()},r.getPlacementType=function(){return s.placementType.clone()},r.getOrientationProperties=function(){return s.orientationProperties.clone()},r.setOrientationProperties=function(e){var r;"object"==typeof e?(r=["setOrientationProperties","allowOrientationChange",e.allowOrientationChange,"forceOrientation",e.forceOrientation],c(e,s.orientationProperties.clone(),"orientationProperties")&&(s.orientationProperties.update(e),i.apply(null,r))):(a(u.ERROR,"mraid.setOrientationProperties",t.error.mraidError.MRD005),t.mraidBridgeExt&&t.mraidBridgeExt.notifyError("MRD005"))},r.setExpandProperties=function(e){var r={};"object"==typeof e?(Object.keys(e).forEach(function(t){"isModal"!==t&&(r[t]=e[t])}),c(r,s.expandProperties.clone(),"expandProperties")&&s.expandProperties.update(r)):(a(u.ERROR,"mraid.setExpandProperties",t.error.mraidError.MRD004),t.mraidBridgeExt&&t.mraidBridgeExt.notifyError("MRD004"))},r.setResizeProperties=function(e){"object"==typeof e?c(e,s.resizeProperties.clone(),"resizeProperties")&&s.resizeProperties.update(e):(a(u.ERROR,"mraid.setResizeProperties",t.error.mraidError.MRD006),t.mraidBridgeExt&&t.mraidBridgeExt.notifyError("MRD006"))},r.open=function(e){e?i("open","url",e):a(u.ERROR,"mraid.open",t.error.mraidError.MRD007)},r.close=function(){r.getState()!==d.HIDDEN?i("close"):a(u.ERROR,"mraid.close",t.error.mraidError.MRD008)},r.expand=function(e){var r=s.customClose.clone(),n=s.placementType.clone(),o=s.state.clone(),c=["expand","useCustomClose",r];n!==l.INLINE||o!==d.DEFAULT&&o!==d.RESIZED?a(u.ERROR,"mraid.expand",t.error.mraidError.MRD011):(e&&(arguments.push("url"),arguments.push(encodeURI(e))),i.apply(null,c))},r.resize=function(){var e=s.resize.clone(),n=["resize"],o=r.getState();o!==d.DEFAULT&&o!==d.RESIZED?(n.push("width"),n.push(e.width),n.push("height"),n.push(e.height),n.push("offsetX"),n.push(e.offsetX),n.push("offsetY"),n.push(e.offsetY),n.push("customClosePosition"),n.push(e.customClosePosition),n.push("allowOffscreen"),n.push(e.allowOffscreen),i.apply(null,n)):a(u.ERROR,"mraid.resize",t.error.mraidError.MRD012)},r.supports=function(e){return s.supports.clone()[e]},r.isViewable=function(){return s.isViewable.clone()},r.useCustomClose=function(e){c(e,s.customClose.clone(),"useCustomClose")&&c({useCustomClose:e},s.expandProperties.clone(),"expandProperties")&&(s.customClose.update(e),s.expandProperties.update({useCustomClose:e}),i("useCustomClose","sdkCloseButton",!0===e?"invisible":!1===e?"visible":void 0===e?"gone":""))},r.playVideo=function(){var e=arguments&&arguments[0]?arguments[0]:"",n=arguments&&arguments[1]?arguments[1]:"";r.isViewable()?e.length>0?i("playVideo","uri",e,"captionUrl",n):a(u.ERROR,"mraid.playVideo",t.error.mraidError.MRD009):a(u.ERROR,"mraid.playVideo",t.error.mraidError.MRD010)},r.createCalendarEvent=function(){},r.storePicture=function(e){r.isViewable()?e?a(u.ERROR,"mraid.storePicture",t.error.mraidError.MRD013):i("storePicture","uri",e):a(u.ERROR,"mraid.storePicture",t.error.mraidError.MRD010)},r.getViewable=r.isViewable,n.getConsentRequired=function(){return s.consentRequired.clone()},n.getConsentTitleText=function(){return s.consentTitleText.clone()},n.getConsentBodyText=function(){return s.consentBodyText.clone()},n.getConsentAcceptButtonText=function(){return s.consentAcceptButtonText.clone()},n.getConsentDenyButtonText=function(){return s.consentDenyButtonText.clone()},n.prepareStoreView=function(e){e?i("prepareStoreView","appStoreId",e):a(u.ERROR,"mraid.prepareStoreView",t.error.mraidError.MRD016)},n.presentStoreView=function(e){e?i("presentStoreView","appStoreId",e):a(u.ERROR,"mraid.presentStoreView",t.error.mraidError.MRD016)},n.prepareStoreOverlayView=function(e,r){if(e&&r){var n=["prepareStoreOverlayView"];n.push("appStoreId"),n.push(e),Object.keys(r).forEach(function(e){n.push(e),n.push(r[e])}),i.apply(null,n)}else a(u.ERROR,"mraid.prepareStoreOverlayView",t.error.mraidError.MRD016)},n.presentStoreOverlayView=function(e,r){if(e&&r){var n=["presentStoreOverlayView"];n.push("appStoreId"),n.push(e),Object.keys(r).forEach(function(e){n.push(e),n.push(r[e])}),i.apply(null,n)}else a(u.ERROR,"mraid.presentStoreOverlayView",t.error.mraidError.MRD016)},n.dismissStoreOverlayView=function(e){e?i("dismissStoreOverlayView","appStoreId",e):a(u.ERROR,"mraid.dismissStoreOverlayView",t.error.mraidError.MRD016)},n.getMraidVersion=function(){return"v4.5.0"},n.getOS=function(){return s.os.clone()},n.getOSVersion=function(){return s.osVersion.clone()},n.getSDKVersion=function(){return s.sdkVersion.clone()},n.getIncentivized=function(){return s.incentivized.clone()},n.useCustomPrivacy=function(e){c(e,s.customPrivacy.clone(),"useCustomPrivacy")&&(s.customPrivacy.update(e),i("useCustomPrivacy","useCustomPrivacy",e))},r.getConsentRequired=n.getConsentRequired,r.getConsentTitleText=n.getConsentTitleText,r.getConsentBodyText=n.getConsentBodyText,r.getConsentAcceptButtonText=n.getConsentAcceptButtonText,r.getConsentDenyButtonText=n.getConsentDenyButtonText}(window)}]);
Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for Javascript language. Getting started with the OneCompiler's Javascript editor is easy and fast. The editor shows sample boilerplate code when you choose language as Javascript and start coding.
Javascript(JS) is a object-oriented programming language which adhere to ECMA Script Standards. Javascript is required to design the behaviour of the web pages.
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
rl.on('line', function(line){
console.log("Hello, " + line);
});
Keyword | Description | Scope |
---|---|---|
var | Var is used to declare variables(old way of declaring variables) | Function or global scope |
let | let is also used to declare variables(new way) | Global or block Scope |
const | const is used to declare const values. Once the value is assigned, it can not be modified | Global or block Scope |
let greetings = `Hello ${name}`
const msg = `
hello
world!
`
An array is a collection of items or values.
let arrayName = [value1, value2,..etc];
// or
let arrayName = new Array("value1","value2",..etc);
let mobiles = ["iPhone", "Samsung", "Pixel"];
// accessing an array
console.log(mobiles[0]);
// changing an array element
mobiles[3] = "Nokia";
Arrow Functions helps developers to write code in concise way, it’s introduced in ES6.
Arrow functions can be written in multiple ways. Below are couple of ways to use arrow function but it can be written in many other ways as well.
() => expression
const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
const squaresOfEvenNumbers = numbers.filter(ele => ele % 2 == 0)
.map(ele => ele ** 2);
console.log(squaresOfEvenNumbers);
let [firstName, lastName] = ['Foo', 'Bar']
let {firstName, lastName} = {
firstName: 'Foo',
lastName: 'Bar'
}
const {
title,
firstName,
lastName,
...rest
} = record;
//Object spread
const post = {
...options,
type: "new"
}
//array spread
const users = [
...adminUsers,
...normalUsers
]
function greetings({ name = 'Foo' } = {}) { //Defaulting name to Foo
console.log(`Hello ${name}!`);
}
greet() // Hello Foo
greet({ name: 'Bar' }) // Hi Bar
IF is used to execute a block of code based on a condition.
if(condition){
// code
}
Else part is used to execute the block of code when the condition fails.
if(condition){
// code
} else {
// code
}
Switch is used to replace nested If-Else statements.
switch(condition){
case 'value1' :
//code
[break;]
case 'value2' :
//code
[break;]
.......
default :
//code
[break;]
}
For loop is used to iterate a set of statements based on a condition.
for(Initialization; Condition; Increment/decrement){
//code
}
While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.
while (condition) {
// code
}
Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.
do {
// code
} while (condition);
ES6 introduced classes along with OOPS concepts in JS. Class is similar to a function which you can think like kind of template which will get called when ever you initialize class.
class className {
constructor() { ... } //Mandatory Class method
method1() { ... }
method2() { ... }
...
}
class Mobile {
constructor(model) {
this.name = model;
}
}
mbl = new Mobile("iPhone");