diff --git a/CHANGELOG.md b/CHANGELOG.md index c8b2653..dd827b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.5.0-beta.0] - 2023-12-08 + ## [1.4.0-beta.2] - 2023-12-01 ### Added - Added ability to provide custom options for each banner. Options can be passed via data attributes `data-amp-option-=""` and can be retrieved in event handlers. @@ -94,7 +96,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Added missing getter `Banner.resources`. -[Unreleased]: https://gitlab.com/68publishers/projects/amp/amp-client-js/compare/v1.4.0-beta.2...HEAD +[Unreleased]: https://gitlab.com/68publishers/projects/amp/amp-client-js/compare/v1.5.0-beta.0...HEAD +[1.5.0-beta.0]: https://gitlab.com/68publishers/projects/amp/amp-client-js/compare/v1.4.0-beta.2...v1.5.0-beta.0 [1.4.0-beta.2]: https://gitlab.com/68publishers/projects/amp/amp-client-js/compare/v1.4.0-beta.1...v1.4.0-beta.2 [1.4.0-beta.1]: https://gitlab.com/68publishers/projects/amp/amp-client-js/compare/v1.3.1...v1.4.0-beta.1 [1.3.1]: https://gitlab.com/68publishers/projects/amp/amp-client-js/compare/v1.3.0...v1.3.1 diff --git a/dist/amp-client.embed.min.js b/dist/amp-client.embed.min.js new file mode 100644 index 0000000..31f93c3 --- /dev/null +++ b/dist/amp-client.embed.min.js @@ -0,0 +1 @@ +var AMPClientFactory;(()=>{var t={1989:(t,e,n)=>{var r=n(1789),o=n(401),i=n(7667),a=n(1327),u=n(1866);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(7040),o=n(4125),i=n(2117),a=n(7518),u=n(4705);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),o=n(1285),i=n(6e3),a=n(9916),u=n(5265);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(8407),o=n(7465),i=n(3779),a=n(7599),u=n(4758),c=n(4309);function l(t){var e=this.__data__=new r(t);this.size=e.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=c,t.exports=l},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},6874:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},4636:(t,e,n)=>{var r=n(2545),o=n(5694),i=n(1469),a=n(4144),u=n(5776),c=n(6719),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),s=!n&&!f&&a(t),p=!n&&!f&&!s&&c(t),y=n||f||s||p,v=y?r(t.length,String):[],b=v.length;for(var h in t)!e&&!l.call(t,h)||y&&("length"==h||s&&("offset"==h||"parent"==h)||p&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||u(h,b))||v.push(h);return v}},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n{var r=n(9465),o=n(7813);t.exports=function(t,e,n){(void 0!==n&&!o(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},4865:(t,e,n)=>{var r=n(9465),o=n(7813),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},9465:(t,e,n)=>{var r=n(8777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},3118:(t,e,n)=>{var r=n(3218),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},8483:(t,e,n)=>{var r=n(5063)();t.exports=r},4239:(t,e,n)=>{var r=n(2705),o=n(9607),i=n(2333),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},9454:(t,e,n)=>{var r=n(4239),o=n(7005);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},8458:(t,e,n)=>{var r=n(3560),o=n(5346),i=n(3218),a=n(346),u=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,f=c.toString,s=l.hasOwnProperty,p=RegExp("^"+f.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:u).test(a(t))}},8749:(t,e,n)=>{var r=n(4239),o=n(1780),i=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},280:(t,e,n)=>{var r=n(5726),o=n(6916),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},313:(t,e,n)=>{var r=n(3218),o=n(5726),i=n(3498),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&n.push(u);return n}},2980:(t,e,n)=>{var r=n(6384),o=n(6556),i=n(8483),a=n(9783),u=n(3218),c=n(1704),l=n(6390);t.exports=function t(e,n,f,s,p){e!==n&&i(n,(function(i,c){if(p||(p=new r),u(i))a(e,n,c,f,t,s,p);else{var y=s?s(l(e,c),i,c+"",e,n,p):void 0;void 0===y&&(y=i),o(e,c,y)}}),c)}},9783:(t,e,n)=>{var r=n(6556),o=n(4626),i=n(7133),a=n(278),u=n(8517),c=n(5694),l=n(1469),f=n(9246),s=n(4144),p=n(3560),y=n(3218),v=n(8630),b=n(6719),h=n(6390),d=n(9881);t.exports=function(t,e,n,m,g,w,S){var E=h(t,n),j=h(e,n),O=S.get(j);if(O)r(t,n,O);else{var _=w?w(E,j,n+"",t,e,S):void 0,T=void 0===_;if(T){var k=l(j),P=!k&&s(j),N=!k&&!P&&b(j);_=j,k||P||N?l(E)?_=E:f(E)?_=a(E):P?(T=!1,_=o(j,!0)):N?(T=!1,_=i(j,!0)):_=[]:v(j)||c(j)?(_=E,c(E)?_=d(E):y(E)&&!p(E)||(_=u(j))):T=!1}T&&(S.set(j,_),g(_,j,m,w,S),S.delete(j)),r(t,n,_)}}},8674:t=>{t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},5976:(t,e,n)=>{var r=n(6557),o=n(5357),i=n(61);t.exports=function(t,e){return i(o(t,e,r),t+"")}},6560:(t,e,n)=>{var r=n(5703),o=n(8777),i=n(6557),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=a},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n{var r=n(2705),o=n(9932),i=n(1469),a=n(3448),u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},4318:(t,e,n)=>{var r=n(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},4626:(t,e,n)=>{t=n.nmd(t);var r=n(5639),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}},7133:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},278:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n{var r=n(4865),o=n(9465);t.exports=function(t,e,n,i){var a=!n;n||(n={});for(var u=-1,c=e.length;++u{var r=n(5639)["__core-js_shared__"];t.exports=r},1463:(t,e,n)=>{var r=n(5976),o=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++r{t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===n(i[c],c,i))break}return e}}},3833:(t,e,n)=>{var r=n(7813),o=Object.prototype,i=o.hasOwnProperty;t.exports=function(t,e,n,a){return void 0===t||r(t,o[n])&&!i.call(a,n)?e:t}},8777:(t,e,n)=>{var r=n(852),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},9464:(t,e,n)=>{var r=n(8674)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=r},1994:t=>{var e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(t){return"\\"+e[t]}},1957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},852:(t,e,n)=>{var r=n(8458),o=n(7801);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},5924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r},9607:(t,e,n)=>{var r=n(2705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},8517:(t,e,n)=>{var r=n(3118),o=n(5924),i=n(5726);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t{var r=n(7813),o=n(8612),i=n(5776),a=n(3218);t.exports=function(t,e,n){if(!a(n))return!1;var u=typeof e;return!!("number"==u?o(n)&&i(e,n.length):"string"==u&&e in n)&&r(n[e],t)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,o=n(4429),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),o=n(8407),i=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5357:(t,e,n)=>{var r=n(6874),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a{t.exports=/<%-([\s\S]+?)%>/g},6051:t=>{t.exports=/<%([\s\S]+?)%>/g},5712:t=>{t.exports=/<%=([\s\S]+?)%>/g},5639:(t,e,n)=>{var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},61:(t,e,n)=>{var r=n(6560),o=n(1275)(r);t.exports=o},1275:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),o=n(7071),i=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},9018:(t,e,n)=>{var r=n(8363),o=n(1463),i=n(1704),a=o((function(t,e,n,o){r(e,i(e),t,o)}));t.exports=a},9591:(t,e,n)=>{var r=n(6874),o=n(5976),i=n(4647),a=o((function(t,e){try{return r(t,void 0,e)}catch(t){return i(t)?t:new Error(t)}}));t.exports=a},5703:t=>{t.exports=function(t){return function(){return t}}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},7187:(t,e,n)=>{var r=n(9464),o=n(9833),i=/[&<>"']/g,a=RegExp(i.source);t.exports=function(t){return(t=o(t))&&a.test(t)?t.replace(i,r):t}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),o=n(1780);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},9246:(t,e,n)=>{var r=n(8612),o=n(7005);t.exports=function(t){return o(t)&&r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),o=n(5062),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,u=a&&a.exports===i?r.Buffer:void 0,c=(u?u.isBuffer:void 0)||o;t.exports=c},4647:(t,e,n)=>{var r=n(4239),o=n(7005),i=n(8630);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!i(t)}},3560:(t,e,n)=>{var r=n(4239),o=n(3218);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,n)=>{var r=n(4239),o=n(5924),i=n(7005),a=Function.prototype,u=Object.prototype,c=a.toString,l=u.hasOwnProperty,f=c.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}},3448:(t,e,n)=>{var r=n(4239),o=n(7005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},6719:(t,e,n)=>{var r=n(8749),o=n(1717),i=n(1167),a=i&&i.isTypedArray,u=a?o(a):r;t.exports=u},3674:(t,e,n)=>{var r=n(4636),o=n(280),i=n(8612);t.exports=function(t){return i(t)?r(t):o(t)}},1704:(t,e,n)=>{var r=n(4636),o=n(313),i=n(8612);t.exports=function(t){return i(t)?r(t,!0):o(t)}},2492:(t,e,n)=>{var r=n(2980),o=n(1463)((function(t,e,n){r(t,e,n)}));t.exports=o},5062:t=>{t.exports=function(){return!1}},1106:(t,e,n)=>{var r=n(9018),o=n(9591),i=n(7415),a=n(3833),u=n(1994),c=n(4647),l=n(6612),f=n(3674),s=n(5712),p=n(5835),y=n(9833),v=/\b__p \+= '';/g,b=/\b(__p \+=) '' \+/g,h=/(__e\(.*?\)|\b__t\)) \+\n'';/g,d=/[()=,{}\[\]\/\s]/,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g=/($^)/,w=/['\n\r\u2028\u2029\\]/g,S=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var E=p.imports._.templateSettings||p;n&&l(t,e,n)&&(e=void 0),t=y(t),e=r({},e,E,a);var j,O,_=r({},e.imports,E.imports,a),T=f(_),k=i(_,T),P=0,N=e.interpolate||g,A="__p += '",x=RegExp((e.escape||g).source+"|"+N.source+"|"+(N===s?m:g).source+"|"+(e.evaluate||g).source+"|$","g"),I=S.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(x,(function(e,n,r,o,i,a){return r||(r=o),A+=t.slice(P,a).replace(w,u),n&&(j=!0,A+="' +\n__e("+n+") +\n'"),i&&(O=!0,A+="';\n"+i+";\n__p += '"),r&&(A+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),P=a+e.length,e})),A+="';\n";var R=S.call(e,"variable")&&e.variable;if(R){if(d.test(R))throw new Error("Invalid `variable` option passed into `_.template`")}else A="with (obj) {\n"+A+"\n}\n";A=(O?A.replace(v,""):A).replace(b,"$1").replace(h,"$1;"),A="function("+(R||"obj")+") {\n"+(R?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(j?", __e = _.escape":"")+(O?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+A+"return __p\n}";var C=o((function(){return Function(T,I+"return "+A).apply(void 0,k)}));if(C.source=A,c(C))throw C;return C}},5835:(t,e,n)=>{var r=n(7187),o={escape:n(9865),evaluate:n(6051),interpolate:n(5712),variable:"",imports:{_:{escape:r}}};t.exports=o},9881:(t,e,n)=>{var r=n(8363),o=n(1704);t.exports=function(t){return r(t,o(t))}},9833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r](i,i.exports,n),i.loaded=!0,i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n.d(r,{EmbedAMPClientFactory:()=>No});const t=JSON.parse('{"i8":"1.5.0-beta.0"}');function e(t){return e="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},e(t)}function o(t,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:void 0;return this.options[t]||e}}],n&&B(e.prototype,n),r&&B(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function F(t){return F="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},F(t)}function L(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";if(-1===this.STATE.STATES.indexOf(t))throw new TypeError("".concat(t," is not valid state."));$(this,V,t),$(this,q,e.toString()),z(this,J)[t]=(z(this,J)[t]||0)+1,this._eventBus.dispatch(I.ON_BANNER_STATE_CHANGED,this)}},{key:"getCurrenBreakpoint",value:function(t){return null}},{key:"isManaged",value:function(){return!1}},{key:"isExternal",value:function(){return!1}},{key:"isEmbed",value:function(){return!1}}],n&&L(e.prototype,n),r&&L(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function X(t){return X="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},X(t)}function Z(t,e){for(var n=0;n=c&&(null===a||ac))&&(i=n,a=c,ut(t,vt)[r]=c)):o=n})),null===i&&null===o)throw new Error("Missing content for banner with ID ".concat(this.id));u.sort((function(t,e){return t-e})),"min"===r?u.unshift(null):u.push(null);var c=u.indexOf(a);return"max"===r&&c-1 in u&&(ut(this,vt).min=u[c-1]),"min"===r&&c+1 in u&&(ut(this,vt).max=u[c+1]),ct(this,yt,null!==i?i:o)}},{key:"needRedraw",value:function(){if(null===ut(this,yt))return!0;var t=at(this,bt,mt).call(this);return null!==ut(this,vt).min&&tut(this,vt).max}}])&&nt(e.prototype,n),r&&nt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mt(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function gt(t,e){for(var n in t)e(t[n],n)}function wt(t){return wt="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},wt(t)}function St(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"weight",n={},r=0,o=0;o0;)u-=n[a],a++;return t[--a]?t[a]:t[0]}}],(n=null)&&Nt(e.prototype,n),r&&Nt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xt(t){return xt="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},xt(t)}function It(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Rt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4&&void 0!==arguments[4]?arguments[4]:[],c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Ft(Bt(a=o.call(this,t,e,n,r,c)),$t,{writable:!0,value:void 0}),Ft(Bt(a),Ht,{writable:!0,value:!1}),Ft(Bt(a),Yt,{writable:!0,value:null}),Ft(Bt(a),Kt,{writable:!0,value:[]}),Ut(Bt(a),$t,u),a}return e=i,(n=[{key:"html",set:function(t){this.element.innerHTML=t}},{key:"resources",get:function(){return Lt(this,$t)}},{key:"data",get:function(){return console.warn("Usage of deprecated property `ManagedBanner.data`. Please use property `positionData` for accessing information about a position."),new kt(this)}},{key:"fingerprints",get:function(){var t;try{t=this.bannerData}catch(t){return[]}return this.positionData.isMultiple()||(t=[t]),t.map((function(t){return t.fingerprint}))}},{key:"bannerData",get:function(){if(null!==Lt(this,Yt))return Lt(this,Yt);if(!Lt(this,Kt).length)throw new Error("Banner's data is empty.");var t=null,e=this.positionData,n=function(t){return tt.createFromProperties({bannerId:t.id,bannerName:t.name,positionId:e.id,positionCode:e.code,positionName:e.name,campaignId:t.campaignId,campaignCode:t.campaignCode,campaignName:t.campaignName})};switch(!0){case e.isSingle():(t=Lt(this,Kt).reduce((function(t,e){return t.score>=e.score?t:e}))).fingerprint=n(t);break;case e.isRandom():(t=At.randomByWeights(Lt(this,Kt),"score")).fingerprint=n(t);break;case e.isMultiple():var r,o=It(t=Lt(this,Kt).sort((function(t,e){return e.score-t.score})));try{for(o.s();!(r=o.n()).done;){var i=r.value;i.fingerprint=n(i)}}catch(t){o.e(t)}finally{o.f()}break;default:throw new Error("Invalid display type ".concat(this.displayType,"."))}if(null===t)throw new Error("Banner's data is empty.");return Ut(this,Yt,t),t}},{key:"getCurrenBreakpoint",value:function(t){var e=this.bannerData,n=(e=(Array.isArray(e)?e:[e]).find((function(e){return e.id===t})))&&e.content?e.content.breakpoint:null;return null===n?null:parseInt(n)}},{key:"isManaged",value:function(){return!0}},{key:"setResponseData",value:function(t){if(Lt(this,Ht))throw new Error("Data for banner on position ".concat(this.position," is already set."));this._positionData=new M({id:t.position_id||null,code:this._positionData.code,name:t.position_name||null,rotationSeconds:t.rotation_seconds,displayType:t.display_type,breakpointType:t.breakpoint_type});var e=[];for(var n in t.banners||[])e.push(new dt(t.banners[n],t.breakpoint_type));Ut(this,Kt,e),Ut(this,Ht,!0)}},{key:"needRedraw",value:function(){var t=this.bannerData;for(var e in Array.isArray(t)||(t=[t]),t)if(t[e].needRedraw())return!0;return!1}}])&&Ct(e.prototype,n),r&&Ct(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Q);function Vt(t){return Vt="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},Vt(t)}function qt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Jt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jt(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ee(this,_e,{writable:!0,value:void 0}),je(this,_e,e-1)}var e,n,r;return e=t,(n=[{key:"getNextIdentifier",value:function(){var t,e;return je(this,_e,(t=function(t,e){return e.get?e.get.call(t):e.value}(e=this,Oe(e,_e,"get")),++t))}}])&&Se(e.prototype,n),r&&Se(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ke(t){return ke="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},ke(t)}function Pe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ne(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ne(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Ne(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=[];for(n in(t=Ce(this,Le,ze).call(this,t)).setAttribute("data-amp-attached",""),r)i.push(new _(n,r[n]));var a=new Gt(Re(this,Be),Re(this,We).getNextIdentifier(),t,e,i,o);return Re(this,Fe).push(a),a}},{key:"addEmbedBanner",value:function(t,e,n){(t=Ce(this,Le,ze).call(this,t)).setAttribute("data-amp-attached","");var r=new ge(Re(this,Be),Re(this,We).getNextIdentifier(),t,e,n);return Re(this,Fe).push(r),r}},{key:"getBannersByState",value:function(t){var e=t.state,n=t.managed,r=void 0===n||n,o=t.external,i=void 0===o||o,a=t.embed,u=void 0===a||a;return Re(this,Fe).filter((function(t){return t instanceof Q&&t.state===e&&!(t instanceof Gt&&!r||t instanceof ye&&!i||t instanceof ge&&!u)}))}},{key:"getBannerByFingerprint",value:function(t){var e,n=t instanceof tt?t.value:t,r=Pe(Re(this,Fe));try{for(r.s();!(e=r.n()).done;){var o=e.value;if(!(o in ge)){var i,a=Pe(o.fingerprints);try{for(a.s();!(i=a.n()).done;)if(i.value.value===n)return o}catch(t){a.e(t)}finally{a.f()}}}}catch(t){r.e(t)}finally{r.f()}return null}},{key:"getBannerByUid",value:function(t){var e,n=Pe(Re(this,Fe));try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.uid===t)return r}}catch(t){n.e(t)}finally{n.f()}return null}}],n&&Ae(e.prototype,n),r&&Ae(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ze(t){if(t instanceof HTMLElement)return t;if("string"!=typeof t)throw new TypeError("Element must be instance of HTMLElement or String");var e;if(!((e="#"===t.charAt(0)?document.getElementById(t.slice(1)):document.querySelector(t))instanceof HTMLElement))throw new TypeError("Selector "+t+" is invalid.");return e}function $e(t){return $e="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},$e(t)}function He(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ye(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ye(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("function"!=typeof e)throw new TypeError("Listener must be of type function.");var i="idx_"+Ve(this,Qe).getNextIdentifier();return Ve(this,Xe)[t]=Ve(this,Xe)[t]||{},Ve(this,Xe)[t][i]={callback:e,scope:r,priority:o},t in Ve(this,Ze)&&delete Ve(this,Ze)[t],function(){t in Ve(n,Xe)&&i in Ve(n,Xe)[t]&&delete Ve(n,Xe)[t][i]}}},{key:"dispatch",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;re.priority?-1:t.priority=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function un(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=u.pixels)return u.ratio}}catch(t){i.e(t)}finally{i.f()}return r};return new IntersectionObserver((function(r){var o,a=[],u={},l={},f=an(r);try{for(f.s();!(o=f.n()).done;){var s=o.value,p=s.target.dataset.ampBannerFingerprint,y=t.getBannerByFingerprint(p);if(y){var v=n[p];if(v){var b={fingerprint:v.fingerprint,element:s.target,banner:y};if(a.push(rn(rn({},b),{},{entry:s})),!v.alreadySeen){var h=s.intersectionRatio>=c(s.target);u[p]=!(p in u)||!u[p].isIntersecting&&h?{fingerprintArgs:b,fingerprintMetadata:v,isIntersecting:h}:u[p]}if(!v.alreadyFullySeen){var d=1<=s.intersectionRatio;l[p]=!(p in l)||!l[p].isFullyIntersecting&&d?{fingerprintArgs:b,fingerprintMetadata:v,isFullyIntersecting:d}:l[p]}}}}}catch(t){f.e(t)}finally{f.f()}for(var m=function(){var t=w[g],n=t.fingerprintArgs,r=t.fingerprintMetadata,o=t.isIntersecting;o&&!r.alreadySeen&&null===r.firstTimeSeenTimeoutId?r.firstTimeSeenTimeoutId=setTimeout((function(){r.alreadySeen=!0,e.dispatch(I.ON_BANNER_FIRST_TIME_SEEN,n)}),i):o||null===r.firstTimeSeenTimeoutId||(clearTimeout(r.firstTimeSeenTimeoutId),r.firstTimeSeenTimeoutId=null)},g=0,w=Object.values(u);g=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function yn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Bn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=":"<=").concat(r),{channel_code:e,banner_id:t.bannerId,banner_name:t.bannerName,position_id:t.positionId,position_code:t.positionCode,position_name:t.positionName,campaign_id:t.campaignId,campaign_code:t.campaignCode,campaign_name:t.campaignName,breakpoint:r}};n.isEventEnabled(xn.BANNER_LOADED)&&t.subscribe(I.ON_BANNER_STATE_CHANGED,(function(t){if(!t.isEmbed()&&N.RENDERED===t.state&&1===t.stateCounter){var e,o=Dn(t.fingerprints);try{for(o.s();!(e=o.n()).done;){var i=e.value;n.send(xn.BANNER_LOADED,r(i,t))}}catch(t){o.e(t)}finally{o.f()}}})),n.isEventEnabled(xn.BANNER_DISPLAYED)&&t.subscribe(I.ON_BANNER_FIRST_TIME_SEEN,(function(t){var e=t.fingerprint,o=t.banner;n.send(xn.BANNER_DISPLAYED,r(e,o))})),n.isEventEnabled(xn.BANNER_FULLY_DISPLAYED)&&t.subscribe(I.ON_BANNER_FIRST_TIME_FULLY_SEEN,(function(t){var e=t.fingerprint,o=t.banner;n.send(xn.BANNER_FULLY_DISPLAYED,r(e,o))})),n.isEventEnabled(xn.BANNER_CLICKED)&&t.subscribe(I.ON_BANNER_LINK_CLICKED,(function(t){var e=t.fingerprint,o=t.banner,i=t.target;n.send(xn.BANNER_CLICKED,Cn(Cn({},r(e,o)),{},{link:i.href||""}))}))}}}}])&&Wn(e.prototype,n),r&&Wn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),qn=!1;const Jn=function(t,e){if(!("plausible"in window)||"function"!=typeof window.plausible)return!qn&&console.warn("Unable to send metrics to Plausible because the function plausible() does not occur in the window."),void(qn=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.plausible(t,{props:e})};var Qn=!1;const Xn=function(t,e){if(!("gtag"in window)||"function"!=typeof window.gtag)return!Qn&&console.warn("Unable to send metrics to Google Analytics because the function gtag() does not occur in the window."),void(Qn=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.gtag("event",t,e)};function Zn(t){return Zn="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},Zn(t)}function tr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function er(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Zn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Zn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Zn(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nr=!1;const rr=function(t,e){if(!("dataLayer"in window))return!nr&&console.warn("Unable to send metrics to GTM because the dataLayer does not occur in the window."),void(nr=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.dataLayer.push(function(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function ur(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:"*";t.postMessage({message:e,data:n},r)}},{key:"listen",value:function(){var t=this;window.addEventListener("message",(function(e){if(!(0t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.interaction.defaultIntersectionRatio||1a||1e.interaction.firstTimeSeenTimeout)throw new Error('The option "interaction.firstTimeSeenTimeout" must be a int with a minimum value of 500, "'.concat(e.interaction.firstTimeSeenTimeout,'" passed.'));return e}function Ar(t){return Ar="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},Ar(t)}function xr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ir(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ir(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:null;return lo(this,bo).subscribe(t,e,n)}},{key:"attachBanner",value:function(){if(lo(this,Eo))throw new Error("Method attachBanner() should be called only once.");var t=document.querySelector("[data-amp-banner]:not([data-amp-attached])");if(t){var e=lo(this,ho).addExternalBanner(t);fo(this,Eo,!0),lo(this,bo).dispatch(this.EVENTS.ON_BANNER_ATTACHED,e)}else console.warn("No banner not found in the embed client.")}}],n&&io(e.prototype,n),r&&io(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _o(t,e){lo(this,mo).sendToParent("metrics",{eventName:t,eventArgs:e})}function To(t){return To="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},To(t)}function ko(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return new Oo(t.version,e)}},{key:"version",get:function(){return new s(Po,"embed@".concat(Po))}}],(n=null)&&ko(e.prototype,n),r&&ko(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()})(),AMPClientFactory=r.EmbedAMPClientFactory})(); \ No newline at end of file diff --git a/dist/amp-client.min.js b/dist/amp-client.min.js index e42d321..d120355 100644 --- a/dist/amp-client.min.js +++ b/dist/amp-client.min.js @@ -1 +1 @@ -var AMPClientFactory;(()=>{var t={6010:(t,e,r)=>{"use strict";t.exports=r(7015)},5637:t=>{function e(t){return e="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},e(t)}function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{function n(t){return n="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},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=[];for(r in(t=b(t)).setAttribute("data-amp-attached",""),n)i.push(new y(r,n[r]));var a=new c(u(this).eventBus,t,e,i,o);return u(this).banners.push(a),a}},{key:"getBannersByState",value:function(t){var e=t.state,r=t.managed,n=void 0===r||r,o=t.external,i=void 0===o||o;return u(this).banners.filter((function(t){return t instanceof l&&t.state===e&&!(t instanceof c&&!n||t instanceof s&&!i)}))}},{key:"getBannerByFingerprint",value:function(t){var e,r=t instanceof p?t.value:t,n=o(u(this).banners);try{for(n.s();!(e=n.n()).done;){var i,a=e.value,c=o(a.fingerprints);try{for(c.s();!(i=c.n()).done;)if(i.value.value===r)return a}catch(t){c.e(t)}finally{c.f()}}}catch(t){n.e(t)}finally{n.f()}return null}}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=v},9015:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"";if(-1===this.STATE.STATES.indexOf(t))throw new TypeError("".concat(t," is not valid state."));s(this).state=t,s(this).stateInfo=e.toString(),s(this).stateCounters[t]=(s(this).stateCounters[t]||0)+1,s(this).eventBus.dispatch(a.ON_BANNER_STATE_CHANGED,this)}},{key:"getCurrenBreakpoint",value:function(t){return null}}],r&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=l},8752:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n{function n(t){return n="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},n(t)}function o(t,e){for(var r=0;r=i&&(null===c||ci))&&(a=r,c=i,t.resolvedContentBounds[n]=i)):o=r})),null===a&&null===o)throw new Error("Missing content for banner with ID ".concat(this.id));s.sort((function(t,e){return t-e})),"min"===n?s.unshift(null):s.push(null);var l=s.indexOf(c);return"max"===n&&l-1 in s&&(t.resolvedContentBounds.min=s[l-1]),"min"===n&&l+1 in s&&(t.resolvedContentBounds.max=s[l+1]),t.resolvedContent=null!==a?a:o}},{key:"needRedraw",value:function(){var t=i(this);if(null===t.resolvedContent)return!0;var e=u();return null!==t.resolvedContentBounds.min&&et.resolvedContentBounds.max}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=c},5148:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),n=i.call(this,t,e,r,a),d(s(n)).resources=o,d(s(n)).responseDataReceived=!1,d(s(n)).resolvedBannerData=null,d(s(n)).banners=[],n}return e=l,(r=[{key:"html",set:function(t){d(this).element.innerHTML=t}},{key:"resources",get:function(){return d(this).resources}},{key:"data",get:function(){return console.warn("Usage of deprecated property `ManagedBanner.data`. Please use property `positionData` for accessing information about a position."),new b(this)}},{key:"fingerprints",get:function(){var t;try{t=this.bannerData}catch(t){return[]}return this.positionData.isMultiple()||(t=[t]),t.map((function(t){return t.fingerprint}))}},{key:"bannerData",get:function(){if(null!==d(this).resolvedBannerData)return d(this).resolvedBannerData;if(!d(this).banners.length)throw new Error("Banner's data is empty.");var t=null,e=this.positionData,r=function(t){return m.createFromProperties({bannerId:t.id,bannerName:t.name,positionId:e.id,positionCode:e.code,positionName:e.name,campaignId:t.campaignId,campaignCode:t.campaignCode,campaignName:t.campaignName})};switch(!0){case e.isSingle():(t=d(this).banners.reduce((function(t,e){return t.score>=e.score?t:e}))).fingerprint=r(t);break;case e.isRandom():(t=v.randomByWeights(d(this).banners,"score")).fingerprint=r(t);break;case e.isMultiple():var n,i=o(t=d(this).banners.sort((function(t,e){return e.score-t.score})));try{for(i.s();!(n=i.n()).done;){var a=n.value;a.fingerprint=r(a)}}catch(t){i.e(t)}finally{i.f()}break;default:throw new Error("Invalid display type ".concat(this.displayType,"."))}if(null===t)throw new Error("Banner's data is empty.");return d(this).resolvedBannerData=t,t}},{key:"getCurrenBreakpoint",value:function(t){var e=this.bannerData,r=(e=(Array.isArray(e)?e:[e]).find((function(e){return e.id===t})))&&e.content?e.content.breakpoint:null;return null===r?null:parseInt(r)}},{key:"setResponseData",value:function(t){if(d(this).responseDataReceived)throw new Error("Data for banner on position ".concat(this.position," is already set."));d(this).positionData=new p({id:t.position_id||null,code:this.positionData.code,name:t.position_name||null,rotationSeconds:t.rotation_seconds,displayType:t.display_type,breakpointType:t.breakpoint_type});var e=[];for(var r in t.banners||[])e.push(new y(t.banners[r],t.breakpoint_type));d(this).banners=e,d(this).responseDataReceived=!0}},{key:"needRedraw",value:function(){var t=this.bannerData;for(var e in Array.isArray(t)||(t=[t]),t)if(t[e].needRedraw())return!0;return!1}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(f);t.exports=h},9839:t=>{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:void 0;return this.options[t]||e}}],n&&r(e.prototype,n),o&&r(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=n},6717:t=>{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n{function n(t){return n="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},n(t)}function o(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{})}}],(r=null)&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=a},4847:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:null;return c(this).eventBus.subscribe(t,e,r)}},{key:"setLocale",value:function(t){c(this).requestFactory.locale=t}},{key:"setGateway",value:function(t){if(!l.isGateway(t))throw new TypeError("Argument gateway mut be instance of AbstractGateway.");c(this).gateway=t}},{key:"getGateway",value:function(){return null===c(this).gateway&&this.setGateway(l.create()),c(this).gateway}},{key:"createBanner",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return c(this).bannerManager.addManagedBanner(t,e,r,n)}},{key:"attachBanners",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=c(this),n=o(e.querySelectorAll("[data-amp-banner]:not([data-amp-attached])"));try{for(n.s();!(t=n.n()).done;){var i=t.value,a=void 0;if("ampBannerExternal"in i.dataset)a=c(this).bannerManager.addExternalBanner(i);else{var u=i.dataset.ampBanner;if(!u){console.warn("Unable to attach a banner to the element ",i,' because the attribute "data-amp-banner" has an empty value.');continue}var s=b.parseResources(i),l=b.parseOptions(i);a=this.createBanner(i,u,s,l)}r.eventBus.dispatch(this.EVENTS.ON_BANNER_ATTACHED,a)}}catch(t){n.e(t)}finally{n.f()}}},{key:"fetch",value:function(){var t=this,e=c(this),r=e.bannerManager.getBannersByState({state:e.bannerManager.STATE.NEW,managed:!0,external:!1});if(r.length){var n,i=e.requestFactory.create(),a=o(r);try{for(a.s();!(n=a.n()).done;){var u=n.value;i.addPosition(u.position,u.resources)}}catch(t){a.e(t)}finally{a.f()}e.eventBus.dispatch(this.EVENTS.ON_BEFORE_FETCH),this.getGateway().fetch(i,(function(n){var i,a=n.data,u=o(r);try{for(u.s();!(i=u.n()).done;){var c=i.value;c.position in a&&"banners"in a[c.position]&&Object.values(a[c.position].banners).length?(Array.isArray(a[c.position].banners)||(a[c.position].banners=Object.values(a[c.position].banners)),c.setResponseData(a[c.position]),t.renderBanner(c)):c.setState(e.bannerManager.STATE.NOT_FOUND,"Banner not found in fetched response.")}}catch(t){u.e(t)}finally{u.f()}e.eventBus.dispatch(t.EVENTS.ON_FETCH_SUCCESS,n)}),(function(n){var i,a=o(r);try{for(a.s();!(i=a.n()).done;)i.value.setState(e.bannerManager.STATE.ERROR,"Request on api failed.")}catch(t){a.e(t)}finally{a.f()}e.eventBus.dispatch(t.EVENTS.ON_FETCH_ERROR,n)}))}}},{key:"renderBanner",value:function(t){if(!(t instanceof y))throw new TypeError("Only managed banners can be rendered.");var e=c(this);try{e.bannerRenderer.render(t)}catch(r){return void t.setState(e.bannerManager.STATE.ERROR,"Render error: "+r.message)}t.setState(e.bannerManager.STATE.RENDERED,"Banner was successfully rendered.")}}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=w},1613:(t,e,r)=>{function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);re.interaction.defaultIntersectionRatio||1m||1e.interaction.firstTimeSeenTimeout)throw new Error('The option "interaction.firstTimeSeenTimeout" must be a int with a minimum value of 500, "'.concat(e.interaction.firstTimeSeenTimeout,'" passed.'));if("object"!==i(e.metrics))throw new Error('The option "metrics" must be an object of the format { receiver: null|string|function|array, disabledEvents: array }, '.concat(e.metrics," passed."));if(null!==e.metrics.receiver&&-1===["string","function"].indexOf(i(e.metrics.receiver))&&!Array.isArray(e.metrics.receiver))throw new Error('The option "metrics.receiver" must be a null or a string or a function or an array of strings|functions, "'.concat(e.metrics.receiver,'" passed.'));if(Array.isArray(e.metrics.receiver)){for(var d in e.metrics.receiver)if(-1===["string","function"].indexOf(i(e.metrics.receiver[d])))throw new Error('The option "metrics.receiver.'.concat(d,'" must be a string or a function, "').concat(e.metrics.receiver[d],'" passed.'))}else e.metrics.receiver=null!==e.metrics.receiver?[e.metrics.receiver]:[];if(!Array.isArray(e.metrics.disabledEvents))throw new Error('The option "metrics.disabledEvents" must an array of strings (event names), "'.concat(e.metrics.disabledEvents,'" passed.'));for(var h in e.metrics.disabledEvents)if("string"!=typeof e.metrics.disabledEvents[h])throw new Error('The option "metrics.disabledEvents.'.concat(h,'" must be a string, "').concat(e.metrics.disabledEvents[h],'" passed.'));return e}},5109:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("function"!=typeof e)throw new TypeError("Listener must be of type function.");var o=c(this),i="idx_"+o.generator.getNextIdentifier();return o.listeners[t]=o.listeners[t]||{},o.listeners[t][i]={callback:e,scope:r,priority:n},t in o.sortedListeners&&delete o.sortedListeners[t],function(){t in o.listeners&&i in o.listeners[t]&&delete o.listeners[t][i]}}},{key:"dispatch",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;ne.priority?-1:t.priority{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n{function n(t){return n="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},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rn.status?e(t):r(t)},n.onerror=function(){r({status:"error",data:{code:n.status,error:n.statusText||"unknown"}})};var i=t.endpoint;"GET"===t.method&&(i+="?".concat(f.stringify(t.parameters))),n.open(t.method,i,!0),n.overrideMimeType("application/json"),n.setRequestHeader("Accept","application/json");var a,u=o(t.headers);try{for(u.s();!(a=u.n()).done;){var c=a.value;n.setRequestHeader(c.name,c.value)}}catch(t){u.e(t)}finally{u.f()}n.send("POST"===t.method?JSON.stringify(t.parameters):null)}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(l);t.exports=p},8484:(t,e,r)=>{var n=r(3549),o=r(5427);t.exports={isGateway:function(t){return t instanceof n},create:function(){return new o}}},4199:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{function n(t){return n="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},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=a.pixels)return a.ratio}}catch(t){i.e(t)}finally{i.f()}return n};return new IntersectionObserver((function(n){var o,c=[],l={},p={},y=u(n);try{for(y.s();!(o=y.n()).done;){var b=o.value,v=b.target.dataset.ampBannerFingerprint,m=t.getBannerByFingerprint(v);if(m){var d=r[v];if(d){var h={fingerprint:d.fingerprint,element:b.target,banner:m};if(c.push(i(i({},h),{},{entry:b})),!d.alreadySeen){var g=b.intersectionRatio>=f(b.target);l[v]=!(v in l)||!l[v].isIntersecting&&g?{fingerprintArgs:h,fingerprintMetadata:d,isIntersecting:g}:l[v]}if(!d.alreadyFullySeen){var w=1<=b.intersectionRatio;p[v]=!(v in p)||!p[v].isFullyIntersecting&&w?{fingerprintArgs:h,fingerprintMetadata:d,isFullyIntersecting:w}:p[v]}}}}}catch(t){y.e(t)}finally{y.f()}for(var S=function(){var t=E[j],r=t.fingerprintArgs,n=t.fingerprintMetadata,o=t.isIntersecting;o&&!n.alreadySeen&&null===n.firstTimeSeenTimeoutId?n.firstTimeSeenTimeoutId=setTimeout((function(){n.alreadySeen=!0,e.dispatch(s.ON_BANNER_FIRST_TIME_SEEN,r)}),a):o||null===n.firstTimeSeenTimeoutId||(clearTimeout(n.firstTimeSeenTimeoutId),n.firstTimeSeenTimeoutId=null)},j=0,E=Object.values(l);j{t.exports=function(t,e){console.log("Sending metrics.",{eventName:t,eventArgs:e})}},8388:t=>{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n{var e=!1;t.exports=function(t,r){if(!("gtag"in window)||"function"!=typeof window.gtag)return!e&&console.warn("Unable to send metrics to Google Analytics because the function gtag() does not occur in the window."),void(e=!0);Object.keys(r).forEach((function(t){return null===r[t]&&delete r[t]})),window.gtag("event",t,r)}},9056:t=>{function e(t){return e="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},e(t)}function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function n(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var o=!1;t.exports=function(t,e){if(!("dataLayer"in window))return!o&&console.warn("Unable to send metrics to GTM because the dataLayer does not occur in the window."),void(o=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.dataLayer.push(function(t){for(var e=1;e{function n(t){return n="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},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=":"<=").concat(n),{channel_code:e,banner_id:t.bannerId,banner_name:t.bannerName,position_id:t.positionId,position_code:t.positionCode,position_name:t.positionName,campaign_id:t.campaignId,campaign_code:t.campaignCode,campaign_name:t.campaignName,breakpoint:n}};-1===n.indexOf(y.BANNER_LOADED)&&t.subscribe(b.ON_BANNER_STATE_CHANGED,(function(t){if(v.RENDERED===t.state&&1===t.stateCounter){var e,n=u(t.fingerprints);try{for(n.s();!(e=n.n()).done;){var i=e.value;r.send(y.BANNER_LOADED,o(i,t))}}catch(t){n.e(t)}finally{n.f()}}})),-1===n.indexOf(y.BANNER_DISPLAYED)&&t.subscribe(b.ON_BANNER_FIRST_TIME_SEEN,(function(t){var e=t.fingerprint,n=t.banner;r.send(y.BANNER_DISPLAYED,o(e,n))})),-1===n.indexOf(y.BANNER_FULLY_DISPLAYED)&&t.subscribe(b.ON_BANNER_FIRST_TIME_FULLY_SEEN,(function(t){var e=t.fingerprint,n=t.banner;r.send(y.BANNER_FULLY_DISPLAYED,o(e,n))})),-1===n.indexOf(y.BANNER_CLICKED)&&t.subscribe(b.ON_BANNER_LINK_CLICKED,(function(t){var e=t.fingerprint,n=t.banner,a=t.target;r.send(y.BANNER_CLICKED,i(i({},o(e,n)),{},{link:a.href||""}))}))}}}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=m},131:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{var e=!1;t.exports=function(t,r){if(!("plausible"in window)||"function"!=typeof window.plausible)return!e&&console.warn("Unable to send metrics to Plausible because the function plausible() does not occur in the window."),void(e=!0);Object.keys(r).forEach((function(t){return null===r[t]&&delete r[t]})),window.plausible(t,{props:r})}},4777:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r{function n(t){return n="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},n(t)}function o(t,e){for(var r=0;r{function n(t){return n="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},n(t)}function o(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this).method=e,a(this).endpoint=r,a(this).locale=n,a(this).query={},a(this).defaultResources=o,a(this).headers=i}var e,r,n;return e=t,r=[{key:"addPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=a(this).query;if(t in r)throw new Error('Position "'+t+'" already exists.');r[t]={},this.addPositionResources(t,a(this).defaultResources),this.addPositionResources(t,e)}},{key:"addPositionResources",value:function(t,e){for(var r in e)this.addPositionResource(t,e[r])}},{key:"addPositionResource",value:function(t,e){if(!(e instanceof i))throw new TypeError("Argument resource must be instance of Resource class.");var r=a(this).query;if(!(t in r))throw new Error('Missing position "'+t+'".');var n=r[t];e.name in n?n[e.name]=n[e.name].withValues(e.value):n[e.name]=e}},{key:"method",get:function(){return a(this).method}},{key:"endpoint",get:function(){return a(this).endpoint}},{key:"locale",get:function(){return a(this).locale}},{key:"parameters",get:function(){var t=function(t){var e,r,n=Object.assign({},t);for(e in n)for(r in n[e])n[e][r]=n[e][r].value;return n}(a(this).query),e={query:"GET"===this.method?JSON.stringify(t):t};return null!==this.locale&&(e.locale=this.locale),e}},{key:"headers",get:function(){return a(this).headers}}],r&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=u},2053:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){for(var r=0;r{t.exports={single:r(6371),random:r(2621),multiple:r(7213)}},7213:t=>{t.exports='\n \n'},2621:t=>{t.exports='\n \n'},6371:t=>{t.exports='\n \n'},9159:t=>{var e=new WeakMap;t.exports=function(t){return e.has(t)||e.set(t,{}),e.get(t)}},2593:t=>{function e(t){return e="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},e(t)}function r(t,r){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"weight",r={},n=0,o=0;o0;)u-=r[a],a++;return t[--a]?t[a]:t[0]}}],(n=null)&&r(e.prototype,n),o&&r(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=n},4604:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this).lastId=e-1}var e,r,n;return e=t,(r=[{key:"getNextIdentifier",value:function(){return i(this).lastId++}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=a},1989:(t,e,r)=>{var n=r(1789),o=r(401),i=r(7667),a=r(1327),u=r(1866);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(7040),o=r(4125),i=r(2117),a=r(7518),u=r(4705);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(852)(r(5639),"Map");t.exports=n},3369:(t,e,r)=>{var n=r(4785),o=r(1285),i=r(6e3),a=r(9916),u=r(5265);function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{var n=r(8407),o=r(7465),i=r(3779),a=r(7599),u=r(4758),c=r(4309);function s(t){var e=this.__data__=new n(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=u,s.prototype.set=c,t.exports=s},2705:(t,e,r)=>{var n=r(5639).Symbol;t.exports=n},1149:(t,e,r)=>{var n=r(5639).Uint8Array;t.exports=n},6874:t=>{t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},4636:(t,e,r)=>{var n=r(2545),o=r(5694),i=r(1469),a=r(4144),u=r(5776),c=r(6719),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),l=!r&&o(t),f=!r&&!l&&a(t),p=!r&&!l&&!f&&c(t),y=r||l||f||p,b=y?n(t.length,String):[],v=b.length;for(var m in t)!e&&!s.call(t,m)||y&&("length"==m||f&&("offset"==m||"parent"==m)||p&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||u(m,v))||b.push(m);return b}},9932:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r{var n=r(9465),o=r(7813);t.exports=function(t,e,r){(void 0!==r&&!o(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},4865:(t,e,r)=>{var n=r(9465),o=r(7813),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var a=t[e];i.call(t,e)&&o(a,r)&&(void 0!==r||e in t)||n(t,e,r)}},8470:(t,e,r)=>{var n=r(7813);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},9465:(t,e,r)=>{var n=r(8777);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},3118:(t,e,r)=>{var n=r(3218),o=Object.create,i=function(){function t(){}return function(e){if(!n(e))return{};if(o)return o(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=i},8483:(t,e,r)=>{var n=r(5063)();t.exports=n},4239:(t,e,r)=>{var n=r(2705),o=r(9607),i=r(2333),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},9454:(t,e,r)=>{var n=r(4239),o=r(7005);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},8458:(t,e,r)=>{var n=r(3560),o=r(5346),i=r(3218),a=r(346),u=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,l=c.toString,f=s.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(n(t)?p:u).test(a(t))}},8749:(t,e,r)=>{var n=r(4239),o=r(1780),i=r(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[n(t)]}},280:(t,e,r)=>{var n=r(5726),o=r(6916),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=[];for(var r in Object(t))i.call(t,r)&&"constructor"!=r&&e.push(r);return e}},313:(t,e,r)=>{var n=r(3218),o=r(5726),i=r(3498),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=o(t),r=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&r.push(u);return r}},2980:(t,e,r)=>{var n=r(6384),o=r(6556),i=r(8483),a=r(9783),u=r(3218),c=r(1704),s=r(6390);t.exports=function t(e,r,l,f,p){e!==r&&i(r,(function(i,c){if(p||(p=new n),u(i))a(e,r,c,l,t,f,p);else{var y=f?f(s(e,c),i,c+"",e,r,p):void 0;void 0===y&&(y=i),o(e,c,y)}}),c)}},9783:(t,e,r)=>{var n=r(6556),o=r(4626),i=r(7133),a=r(278),u=r(8517),c=r(5694),s=r(1469),l=r(9246),f=r(4144),p=r(3560),y=r(3218),b=r(8630),v=r(6719),m=r(6390),d=r(9881);t.exports=function(t,e,r,h,g,w,S){var j=m(t,r),E=m(e,r),O=S.get(E);if(O)n(t,r,O);else{var _=w?w(j,E,r+"",t,e,S):void 0,T=void 0===_;if(T){var x=s(E),k=!x&&f(E),A=!x&&!k&&v(E);_=E,x||k||A?s(j)?_=j:l(j)?_=a(j):k?(T=!1,_=o(E,!0)):A?(T=!1,_=i(E,!0)):_=[]:b(E)||c(E)?(_=j,c(j)?_=d(j):y(j)&&!p(j)||(_=u(E))):T=!1}T&&(S.set(E,_),g(_,E,h,w,S),S.delete(E)),n(t,r,_)}}},8674:t=>{t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},5976:(t,e,r)=>{var n=r(6557),o=r(5357),i=r(61);t.exports=function(t,e){return i(o(t,e,n),t+"")}},6560:(t,e,r)=>{var n=r(5703),o=r(8777),i=r(6557),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=a},2545:t=>{t.exports=function(t,e){for(var r=-1,n=Array(t);++r{var n=r(2705),o=r(9932),i=r(1469),a=r(3448),u=n?n.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return c?c.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},7415:(t,e,r)=>{var n=r(9932);t.exports=function(t,e){return n(e,(function(e){return t[e]}))}},4318:(t,e,r)=>{var n=r(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},4626:(t,e,r)=>{t=r.nmd(t);var n=r(5639),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?n.Buffer:void 0,u=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}},7133:(t,e,r)=>{var n=r(4318);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},278:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{var n=r(4865),o=r(9465);t.exports=function(t,e,r,i){var a=!r;r||(r={});for(var u=-1,c=e.length;++u{var n=r(5639)["__core-js_shared__"];t.exports=n},1463:(t,e,r)=>{var n=r(5976),o=r(6612);t.exports=function(t){return n((function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,u=i>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(r[0],r[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{t.exports=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}},3833:(t,e,r)=>{var n=r(7813),o=Object.prototype,i=o.hasOwnProperty;t.exports=function(t,e,r,a){return void 0===t||n(t,o[r])&&!i.call(a,r)?e:t}},8777:(t,e,r)=>{var n=r(852),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},9464:(t,e,r)=>{var n=r(8674)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=n},1994:t=>{var e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(t){return"\\"+e[t]}},1957:(t,e,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},5050:(t,e,r)=>{var n=r(7019);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},852:(t,e,r)=>{var n=r(8458),o=r(7801);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},5924:(t,e,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);t.exports=n},9607:(t,e,r)=>{var n=r(2705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=a.call(t);return n&&(e?t[u]=r:delete t[u]),o}},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,r)=>{var n=r(4536);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,r)=>{var n=r(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},1327:(t,e,r)=>{var n=r(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},1866:(t,e,r)=>{var n=r(4536);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},8517:(t,e,r)=>{var n=r(3118),o=r(5924),i=r(5726);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:n(o(t))}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t{var n=r(7813),o=r(8612),i=r(5776),a=r(3218);t.exports=function(t,e,r){if(!a(r))return!1;var u=typeof e;return!!("number"==u?o(r)&&i(e,r.length):"string"==u&&e in r)&&n(r[e],t)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,r)=>{var n,o=r(4429),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!i&&i in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,r)=>{var n=r(8470),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)}},2117:(t,e,r)=>{var n=r(8470);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},7518:(t,e,r)=>{var n=r(8470);t.exports=function(t){return n(this.__data__,t)>-1}},4705:(t,e,r)=>{var n=r(8470);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},4785:(t,e,r)=>{var n=r(1989),o=r(8407),i=r(7071);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},1285:(t,e,r)=>{var n=r(5050);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).get(t)}},9916:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).has(t)}},5265:(t,e,r)=>{var n=r(5050);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},4536:(t,e,r)=>{var n=r(852)(Object,"create");t.exports=n},6916:(t,e,r)=>{var n=r(5569)(Object.keys,Object);t.exports=n},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},1167:(t,e,r)=>{t=r.nmd(t);var n=r(1957),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(r){return t(e(r))}}},5357:(t,e,r)=>{var n=r(6874),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a{t.exports=/<%-([\s\S]+?)%>/g},6051:t=>{t.exports=/<%([\s\S]+?)%>/g},5712:t=>{t.exports=/<%=([\s\S]+?)%>/g},5639:(t,e,r)=>{var n=r(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},61:(t,e,r)=>{var n=r(6560),o=r(1275)(n);t.exports=o},1275:t=>{var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var o=e(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},7465:(t,e,r)=>{var n=r(8407);t.exports=function(){this.__data__=new n,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,r)=>{var n=r(8407),o=r(7071),i=r(3369);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(t,e),this.size=r.size,this}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},9018:(t,e,r)=>{var n=r(8363),o=r(1463),i=r(1704),a=o((function(t,e,r,o){n(e,i(e),t,o)}));t.exports=a},9591:(t,e,r)=>{var n=r(6874),o=r(5976),i=r(4647),a=o((function(t,e){try{return n(t,void 0,e)}catch(t){return i(t)?t:new Error(t)}}));t.exports=a},5703:t=>{t.exports=function(t){return function(){return t}}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},7187:(t,e,r)=>{var n=r(9464),o=r(9833),i=/[&<>"']/g,a=RegExp(i.source);t.exports=function(t){return(t=o(t))&&a.test(t)?t.replace(i,n):t}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,r)=>{var n=r(9454),o=r(7005),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,r)=>{var n=r(3560),o=r(1780);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},9246:(t,e,r)=>{var n=r(8612),o=r(7005);t.exports=function(t){return o(t)&&n(t)}},4144:(t,e,r)=>{t=r.nmd(t);var n=r(5639),o=r(5062),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,u=a&&a.exports===i?n.Buffer:void 0,c=(u?u.isBuffer:void 0)||o;t.exports=c},4647:(t,e,r)=>{var n=r(4239),o=r(7005),i=r(8630);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!i(t)}},3560:(t,e,r)=>{var n=r(4239),o=r(3218);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,r)=>{var n=r(4239),o=r(5924),i=r(7005),a=Function.prototype,u=Object.prototype,c=a.toString,s=u.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=n(t))return!1;var e=o(t);if(null===e)return!0;var r=s.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==l}},3448:(t,e,r)=>{var n=r(4239),o=r(7005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==n(t)}},6719:(t,e,r)=>{var n=r(8749),o=r(1717),i=r(1167),a=i&&i.isTypedArray,u=a?o(a):n;t.exports=u},3674:(t,e,r)=>{var n=r(4636),o=r(280),i=r(8612);t.exports=function(t){return i(t)?n(t):o(t)}},1704:(t,e,r)=>{var n=r(4636),o=r(313),i=r(8612);t.exports=function(t){return i(t)?n(t,!0):o(t)}},2492:(t,e,r)=>{var n=r(2980),o=r(1463)((function(t,e,r){n(t,e,r)}));t.exports=o},5062:t=>{t.exports=function(){return!1}},1106:(t,e,r)=>{var n=r(9018),o=r(9591),i=r(7415),a=r(3833),u=r(1994),c=r(4647),s=r(6612),l=r(3674),f=r(5712),p=r(5835),y=r(9833),b=/\b__p \+= '';/g,v=/\b(__p \+=) '' \+/g,m=/(__e\(.*?\)|\b__t\)) \+\n'';/g,d=/[()=,{}\[\]\/\s]/,h=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g=/($^)/,w=/['\n\r\u2028\u2029\\]/g,S=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var j=p.imports._.templateSettings||p;r&&s(t,e,r)&&(e=void 0),t=y(t),e=n({},e,j,a);var E,O,_=n({},e.imports,j.imports,a),T=l(_),x=i(_,T),k=0,A=e.interpolate||g,P="__p += '",N=RegExp((e.escape||g).source+"|"+A.source+"|"+(A===f?h:g).source+"|"+(e.evaluate||g).source+"|$","g"),R=S.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(N,(function(e,r,n,o,i,a){return n||(n=o),P+=t.slice(k,a).replace(w,u),r&&(E=!0,P+="' +\n__e("+r+") +\n'"),i&&(O=!0,P+="';\n"+i+";\n__p += '"),n&&(P+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),k=a+e.length,e})),P+="';\n";var I=S.call(e,"variable")&&e.variable;if(I){if(d.test(I))throw new Error("Invalid `variable` option passed into `_.template`")}else P="with (obj) {\n"+P+"\n}\n";P=(O?P.replace(b,""):P).replace(v,"$1").replace(m,"$1;"),P="function("+(I||"obj")+") {\n"+(I?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(E?", __e = _.escape":"")+(O?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+P+"return __p\n}";var B=o((function(){return Function(T,R+"return "+P).apply(void 0,x)}));if(B.source=P,c(B))throw B;return B}},5835:(t,e,r)=>{var n=r(7187),o={escape:r(9865),evaluate:r(6051),interpolate:r(5712),variable:"",imports:{_:{escape:n}}};t.exports=o},9881:(t,e,r)=>{var n=r(8363),o=r(1704);t.exports=function(t){return n(t,o(t))}},9833:(t,e,r)=>{var n=r(531);t.exports=function(t){return null==t?"":n(t)}},6685:(t,e,r)=>{"use strict";r.d(e,{Z:()=>k});var n={};r.r(n),r.d(n,{exclude:()=>x,extract:()=>S,parse:()=>j,parseUrl:()=>O,pick:()=>T,stringify:()=>E,stringifyUrl:()=>_});const o="%[a-f0-9]{2}",i=new RegExp("("+o+")|([^%]+?)","gi"),a=new RegExp("("+o+")+","gi");function u(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(1===t.length)return t;e=e||1;const r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],u(r),u(n))}function c(t){try{return decodeURIComponent(t)}catch{let e=t.match(i)||[];for(let r=1;rnull==t,y=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),b=Symbol("encodeFragmentIdentifier");function v(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function m(t,e){return e.encode?e.strict?y(t):encodeURIComponent(t):t}function d(t,e){return e.decode?s(t):t}function h(t){return Array.isArray(t)?t.sort():"object"==typeof t?h(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function g(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function w(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function S(t){const e=(t=g(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function j(t,e){v((e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e}).arrayFormatSeparator);const r=function(t){let e;switch(t.arrayFormat){case"index":return(t,r,n)=>{e=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return(t,r,n)=>{e=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),e?void 0!==n[t]?n[t]=[...n[t],r]:n[t]=[r]:n[t]=r};case"colon-list-separator":return(t,r,n)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==n[t]?n[t]=[...n[t],r]:n[t]=[r]:n[t]=r};case"comma":case"separator":return(e,r,n)=>{const o="string"==typeof r&&r.includes(t.arrayFormatSeparator),i="string"==typeof r&&!o&&d(r,t).includes(t.arrayFormatSeparator);r=i?d(r,t):r;const a=o||i?r.split(t.arrayFormatSeparator).map((e=>d(e,t))):null===r?r:d(r,t);n[e]=a};case"bracket-separator":return(e,r,n)=>{const o=/(\[])$/.test(e);if(e=e.replace(/\[]$/,""),!o)return void(n[e]=r?d(r,t):r);const i=null===r?[]:r.split(t.arrayFormatSeparator).map((e=>d(e,t)));void 0!==n[e]?n[e]=[...n[e],...i]:n[e]=i};default:return(t,e,r)=>{void 0!==r[t]?r[t]=[...[r[t]].flat(),e]:r[t]=e}}}(e),n=Object.create(null);if("string"!=typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const o of t.split("&")){if(""===o)continue;const t=e.decode?o.replace(/\+/g," "):o;let[i,a]=l(t,"=");void 0===i&&(i=t),a=void 0===a?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:d(a,e),r(d(i,e),a,n)}for(const[t,r]of Object.entries(n))if("object"==typeof r&&null!==r)for(const[t,n]of Object.entries(r))r[t]=w(n,e);else n[t]=w(r,e);return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((t,e)=>{const r=n[e];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?t[e]=h(r):t[e]=r,t}),Object.create(null))}function E(t,e){if(!t)return"";v((e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e}).arrayFormatSeparator);const r=r=>e.skipNull&&p(t[r])||e.skipEmptyString&&""===t[r],n=function(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const o=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[m(e,t),"[",o,"]"].join("")]:[...r,[m(e,t),"[",m(o,t),"]=",m(n,t)].join("")]};case"bracket":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[m(e,t),"[]"].join("")]:[...r,[m(e,t),"[]=",m(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[m(e,t),":list="].join("")]:[...r,[m(e,t),":list=",m(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return r=>(n,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?n:(o=null===o?"":o,0===n.length?[[m(r,t),e,m(o,t)].join("")]:[[n,m(o,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,m(e,t)]:[...r,[m(e,t),"=",m(n,t)].join("")]}}(e),o={};for(const[e,n]of Object.entries(t))r(e)||(o[e]=n);const i=Object.keys(o);return!1!==e.sort&&i.sort(e.sort),i.map((r=>{const o=t[r];return void 0===o?"":null===o?m(r,e):Array.isArray(o)?0===o.length&&"bracket-separator"===e.arrayFormat?m(r,e)+"[]":o.reduce(n(r),[]).join("&"):m(r,e)+"="+m(o,e)})).filter((t=>t.length>0)).join("&")}function O(t,e){e={decode:!0,...e};let[r,n]=l(t,"#");return void 0===r&&(r=t),{url:r?.split("?")?.[0]??"",query:j(S(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:d(n,e)}:{}}}function _(t,e){e={encode:!0,strict:!0,[b]:!0,...e};const r=g(t.url).split("?")[0]||"";let n=E({...j(S(t.url),{sort:!1}),...t.query},e);n&&(n=`?${n}`);let o=function(t){let e="";const r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);if(t.fragmentIdentifier){const n=new URL(r);n.hash=t.fragmentIdentifier,o=e[b]?n.hash:`#${t.fragmentIdentifier}`}return`${r}${n}${o}`}function T(t,e,r){r={parseFragmentIdentifier:!0,[b]:!1,...r};const{url:n,query:o,fragmentIdentifier:i}=O(t,r);return _({url:n,query:f(o,e),fragmentIdentifier:i},r)}function x(t,e,r){return T(t,Array.isArray(e)?t=>!e.includes(t):(t,r)=>!e(t,r),r)}const k=n},4147:t=>{"use strict";t.exports=JSON.parse('{"i8":"1.4.0-beta.2"}')}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n](i,i.exports,r),i.loaded=!0,i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n=r(6010);AMPClientFactory=n})(); \ No newline at end of file +var AMPClientFactory;(()=>{var t={1989:(t,e,n)=>{var r=n(1789),o=n(401),i=n(7667),a=n(1327),u=n(1866);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(7040),o=n(4125),i=n(2117),a=n(7518),u=n(4705);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),o=n(1285),i=n(6e3),a=n(9916),u=n(5265);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(8407),o=n(7465),i=n(3779),a=n(7599),u=n(4758),c=n(4309);function l(t){var e=this.__data__=new r(t);this.size=e.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=c,t.exports=l},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},6874:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},4636:(t,e,n)=>{var r=n(2545),o=n(5694),i=n(1469),a=n(4144),u=n(5776),c=n(6719),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),s=!n&&o(t),f=!n&&!s&&a(t),p=!n&&!s&&!f&&c(t),y=n||s||f||p,v=y?r(t.length,String):[],b=v.length;for(var d in t)!e&&!l.call(t,d)||y&&("length"==d||f&&("offset"==d||"parent"==d)||p&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||u(d,b))||v.push(d);return v}},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n{var r=n(9465),o=n(7813);t.exports=function(t,e,n){(void 0!==n&&!o(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},4865:(t,e,n)=>{var r=n(9465),o=n(7813),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},9465:(t,e,n)=>{var r=n(8777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},3118:(t,e,n)=>{var r=n(3218),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},8483:(t,e,n)=>{var r=n(5063)();t.exports=r},4239:(t,e,n)=>{var r=n(2705),o=n(9607),i=n(2333),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},9454:(t,e,n)=>{var r=n(4239),o=n(7005);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},8458:(t,e,n)=>{var r=n(3560),o=n(5346),i=n(3218),a=n(346),u=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,s=c.toString,f=l.hasOwnProperty,p=RegExp("^"+s.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:u).test(a(t))}},8749:(t,e,n)=>{var r=n(4239),o=n(1780),i=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},280:(t,e,n)=>{var r=n(5726),o=n(6916),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},313:(t,e,n)=>{var r=n(3218),o=n(5726),i=n(3498),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&n.push(u);return n}},2980:(t,e,n)=>{var r=n(6384),o=n(6556),i=n(8483),a=n(9783),u=n(3218),c=n(1704),l=n(6390);t.exports=function t(e,n,s,f,p){e!==n&&i(n,(function(i,c){if(p||(p=new r),u(i))a(e,n,c,s,t,f,p);else{var y=f?f(l(e,c),i,c+"",e,n,p):void 0;void 0===y&&(y=i),o(e,c,y)}}),c)}},9783:(t,e,n)=>{var r=n(6556),o=n(4626),i=n(7133),a=n(278),u=n(8517),c=n(5694),l=n(1469),s=n(9246),f=n(4144),p=n(3560),y=n(3218),v=n(8630),b=n(6719),d=n(6390),m=n(9881);t.exports=function(t,e,n,h,g,w,S){var E=d(t,n),j=d(e,n),O=S.get(j);if(O)r(t,n,O);else{var T=w?w(E,j,n+"",t,e,S):void 0,k=void 0===T;if(k){var _=l(j),P=!_&&f(j),A=!_&&!P&&b(j);T=j,_||P||A?l(E)?T=E:s(E)?T=a(E):P?(k=!1,T=o(j,!0)):A?(k=!1,T=i(j,!0)):T=[]:v(j)||c(j)?(T=E,c(E)?T=m(E):y(E)&&!p(E)||(T=u(j))):k=!1}k&&(S.set(j,T),g(T,j,h,w,S),S.delete(j)),r(t,n,T)}}},8674:t=>{t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},5976:(t,e,n)=>{var r=n(6557),o=n(5357),i=n(61);t.exports=function(t,e){return i(o(t,e,r),t+"")}},6560:(t,e,n)=>{var r=n(5703),o=n(8777),i=n(6557),a=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=a},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n{var r=n(2705),o=n(9932),i=n(1469),a=n(3448),u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},4318:(t,e,n)=>{var r=n(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},4626:(t,e,n)=>{t=n.nmd(t);var r=n(5639),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}},7133:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},278:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n{var r=n(4865),o=n(9465);t.exports=function(t,e,n,i){var a=!n;n||(n={});for(var u=-1,c=e.length;++u{var r=n(5639)["__core-js_shared__"];t.exports=r},1463:(t,e,n)=>{var r=n(5976),o=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),e=Object(e);++r{t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===n(i[c],c,i))break}return e}}},3833:(t,e,n)=>{var r=n(7813),o=Object.prototype,i=o.hasOwnProperty;t.exports=function(t,e,n,a){return void 0===t||r(t,o[n])&&!i.call(a,n)?e:t}},8777:(t,e,n)=>{var r=n(852),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},9464:(t,e,n)=>{var r=n(8674)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=r},1994:t=>{var e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(t){return"\\"+e[t]}},1957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},852:(t,e,n)=>{var r=n(8458),o=n(7801);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},5924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r},9607:(t,e,n)=>{var r=n(2705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},8517:(t,e,n)=>{var r=n(3118),o=n(5924),i=n(5726);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t{var r=n(7813),o=n(8612),i=n(5776),a=n(3218);t.exports=function(t,e,n){if(!a(n))return!1;var u=typeof e;return!!("number"==u?o(n)&&i(e,n.length):"string"==u&&e in n)&&r(n[e],t)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,o=n(4429),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),o=n(8407),i=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5357:(t,e,n)=>{var r=n(6874),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,u=o(i.length-e,0),c=Array(u);++a{t.exports=/<%-([\s\S]+?)%>/g},6051:t=>{t.exports=/<%([\s\S]+?)%>/g},5712:t=>{t.exports=/<%=([\s\S]+?)%>/g},5639:(t,e,n)=>{var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},61:(t,e,n)=>{var r=n(6560),o=n(1275)(r);t.exports=o},1275:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),o=n(7071),i=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},9018:(t,e,n)=>{var r=n(8363),o=n(1463),i=n(1704),a=o((function(t,e,n,o){r(e,i(e),t,o)}));t.exports=a},9591:(t,e,n)=>{var r=n(6874),o=n(5976),i=n(4647),a=o((function(t,e){try{return r(t,void 0,e)}catch(t){return i(t)?t:new Error(t)}}));t.exports=a},5703:t=>{t.exports=function(t){return function(){return t}}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},7187:(t,e,n)=>{var r=n(9464),o=n(9833),i=/[&<>"']/g,a=RegExp(i.source);t.exports=function(t){return(t=o(t))&&a.test(t)?t.replace(i,r):t}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),o=n(1780);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},9246:(t,e,n)=>{var r=n(8612),o=n(7005);t.exports=function(t){return o(t)&&r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),o=n(5062),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,u=a&&a.exports===i?r.Buffer:void 0,c=(u?u.isBuffer:void 0)||o;t.exports=c},4647:(t,e,n)=>{var r=n(4239),o=n(7005),i=n(8630);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!i(t)}},3560:(t,e,n)=>{var r=n(4239),o=n(3218);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,n)=>{var r=n(4239),o=n(5924),i=n(7005),a=Function.prototype,u=Object.prototype,c=a.toString,l=u.hasOwnProperty,s=c.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==s}},3448:(t,e,n)=>{var r=n(4239),o=n(7005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},6719:(t,e,n)=>{var r=n(8749),o=n(1717),i=n(1167),a=i&&i.isTypedArray,u=a?o(a):r;t.exports=u},3674:(t,e,n)=>{var r=n(4636),o=n(280),i=n(8612);t.exports=function(t){return i(t)?r(t):o(t)}},1704:(t,e,n)=>{var r=n(4636),o=n(313),i=n(8612);t.exports=function(t){return i(t)?r(t,!0):o(t)}},2492:(t,e,n)=>{var r=n(2980),o=n(1463)((function(t,e,n){r(t,e,n)}));t.exports=o},5062:t=>{t.exports=function(){return!1}},1106:(t,e,n)=>{var r=n(9018),o=n(9591),i=n(7415),a=n(3833),u=n(1994),c=n(4647),l=n(6612),s=n(3674),f=n(5712),p=n(5835),y=n(9833),v=/\b__p \+= '';/g,b=/\b(__p \+=) '' \+/g,d=/(__e\(.*?\)|\b__t\)) \+\n'';/g,m=/[()=,{}\[\]\/\s]/,h=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g=/($^)/,w=/['\n\r\u2028\u2029\\]/g,S=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var E=p.imports._.templateSettings||p;n&&l(t,e,n)&&(e=void 0),t=y(t),e=r({},e,E,a);var j,O,T=r({},e.imports,E.imports,a),k=s(T),_=i(T,k),P=0,A=e.interpolate||g,N="__p += '",x=RegExp((e.escape||g).source+"|"+A.source+"|"+(A===f?h:g).source+"|"+(e.evaluate||g).source+"|$","g"),R=S.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(x,(function(e,n,r,o,i,a){return r||(r=o),N+=t.slice(P,a).replace(w,u),n&&(j=!0,N+="' +\n__e("+n+") +\n'"),i&&(O=!0,N+="';\n"+i+";\n__p += '"),r&&(N+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),P=a+e.length,e})),N+="';\n";var I=S.call(e,"variable")&&e.variable;if(I){if(m.test(I))throw new Error("Invalid `variable` option passed into `_.template`")}else N="with (obj) {\n"+N+"\n}\n";N=(O?N.replace(v,""):N).replace(b,"$1").replace(d,"$1;"),N="function("+(I||"obj")+") {\n"+(I?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(j?", __e = _.escape":"")+(O?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+N+"return __p\n}";var C=o((function(){return Function(k,R+"return "+N).apply(void 0,_)}));if(C.source=N,c(C))throw C;return C}},5835:(t,e,n)=>{var r=n(7187),o={escape:n(9865),evaluate:n(6051),interpolate:n(5712),variable:"",imports:{_:{escape:r}}};t.exports=o},9881:(t,e,n)=>{var r=n(8363),o=n(1704);t.exports=function(t){return r(t,o(t))}},9833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r](i,i.exports,n),i.loaded=!0,i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n.d(r,{AMPClientFactory:()=>da});var t={};n.r(t),n.d(t,{exclude:()=>q,extract:()=>W,parse:()=>U,parseUrl:()=>z,pick:()=>H,stringify:()=>L,stringifyUrl:()=>$});const e=JSON.parse('{"i8":"1.5.0-beta.0"}');function o(t){return o="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},o(t)}function i(t,e){for(var n=0;n\n\n <% if(\'img\' === data.content.type) { %>\n target="<%- data.content.target %>"<% } %>>\n \n <% (data.content.sources || []).forEach(function(source) { %>\n \n <% }); %>\n <%- data.content.alt %>title="<%- data.content.title %>"<% } %>\n <% if(banner.options.has(\'loading\')) { %>loading="<%- banner.options.get(\'loading\') %>"<% } %>>\n \n \n <% } else if (\'html\' === data.content.type) { %>\n
\n <%= data.content.html %>\n
\n <% } %>\n\n \n',random:'\n \n',multiple:'\n \n'};function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nnull==t,x=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),R=Symbol("encodeFragmentIdentifier");function I(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function C(t,e){return e.encode?e.strict?x(t):encodeURIComponent(t):t}function M(t,e){return e.decode?_(t):t}function B(t){return Array.isArray(t)?t.sort():"object"==typeof t?B(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function D(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function F(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function W(t){const e=(t=D(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function U(t,e){I((e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e}).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),e?void 0!==r[t]?r[t]=[...r[t],n]:r[t]=[n]:r[t]=n};case"colon-list-separator":return(t,n,r)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==r[t]?r[t]=[...r[t],n]:r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{const o="string"==typeof n&&n.includes(t.arrayFormatSeparator),i="string"==typeof n&&!o&&M(n,t).includes(t.arrayFormatSeparator);n=i?M(n,t):n;const a=o||i?n.split(t.arrayFormatSeparator).map((e=>M(e,t))):null===n?n:M(n,t);r[e]=a};case"bracket-separator":return(e,n,r)=>{const o=/(\[])$/.test(e);if(e=e.replace(/\[]$/,""),!o)return void(r[e]=n?M(n,t):n);const i=null===n?[]:n.split(t.arrayFormatSeparator).map((e=>M(e,t)));void 0!==r[e]?r[e]=[...r[e],...i]:r[e]=i};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[...[n[t]].flat(),e]:n[t]=e}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){if(""===o)continue;const t=e.decode?o.replace(/\+/g," "):o;let[i,a]=P(t,"=");void 0===i&&(i=t),a=void 0===a?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:M(a,e),n(M(i,e),a,r)}for(const[t,n]of Object.entries(r))if("object"==typeof n&&null!==n)for(const[t,r]of Object.entries(n))n[t]=F(r,e);else r[t]=F(n,e);return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce(((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=B(n):t[e]=n,t}),Object.create(null))}function L(t,e){if(!t)return"";I((e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e}).arrayFormatSeparator);const n=n=>e.skipNull&&N(t[n])||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[C(e,t),"[",o,"]"].join("")]:[...n,[C(e,t),"[",C(o,t),"]=",C(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[C(e,t),"[]"].join("")]:[...n,[C(e,t),"[]=",C(r,t)].join("")];case"colon-list-separator":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[C(e,t),":list="].join("")]:[...n,[C(e,t),":list=",C(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[C(n,t),e,C(o,t)].join("")]:[[r,C(o,t)].join(t.arrayFormatSeparator)])}default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,C(e,t)]:[...n,[C(e,t),"=",C(r,t)].join("")]}}(e),o={};for(const[e,r]of Object.entries(t))n(e)||(o[e]=r);const i=Object.keys(o);return!1!==e.sort&&i.sort(e.sort),i.map((n=>{const o=t[n];return void 0===o?"":null===o?C(n,e):Array.isArray(o)?0===o.length&&"bracket-separator"===e.arrayFormat?C(n,e)+"[]":o.reduce(r(n),[]).join("&"):C(n,e)+"="+C(o,e)})).filter((t=>t.length>0)).join("&")}function z(t,e){e={decode:!0,...e};let[n,r]=P(t,"#");return void 0===n&&(n=t),{url:n?.split("?")?.[0]??"",query:U(W(t),e),...e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:M(r,e)}:{}}}function $(t,e){e={encode:!0,strict:!0,[R]:!0,...e};const n=D(t.url).split("?")[0]||"";let r=L({...U(W(t.url),{sort:!1}),...t.query},e);r&&(r=`?${r}`);let o=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);if(t.fragmentIdentifier){const r=new URL(n);r.hash=t.fragmentIdentifier,o=e[R]?r.hash:`#${t.fragmentIdentifier}`}return`${n}${r}${o}`}function H(t,e,n){n={parseFragmentIdentifier:!0,[R]:!1,...n};const{url:r,query:o,fragmentIdentifier:i}=z(t,n);return $({url:r,query:A(o,e),fragmentIdentifier:i},n)}function q(t,e,n){return H(t,Array.isArray(e)?t=>!e.includes(t):(t,n)=>!e(t,n),n)}const G=t;function V(t){return V="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},V(t)}function Y(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return K(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nr.status?e(t):n(t)},r.onerror=function(){n({status:"error",data:{code:r.status,error:r.statusText||"unknown"}})};var o=t.endpoint;"GET"===t.method&&(o+="?".concat(G.stringify(t.parameters))),r.open(t.method,o,!0),r.overrideMimeType("application/json"),r.setRequestHeader("Accept","application/json");var i,a=Y(t.headers);try{for(a.s();!(i=a.n()).done;){var u=i.value;r.setRequestHeader(u.name,u.value)}}catch(t){a.e(t)}finally{a.f()}r.send("POST"===t.method?JSON.stringify(t.parameters):null)}}])&&J(e.prototype,n),r&&J(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(S);function et(t){return et="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},et(t)}function nt(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),dt(this,wt,{writable:!0,value:void 0}),dt(this,St,{writable:!0,value:void 0}),dt(this,Et,{writable:!0,value:void 0}),dt(this,jt,{writable:!0,value:void 0}),dt(this,Ot,{writable:!0,value:void 0}),dt(this,Tt,{writable:!0,value:void 0}),dt(this,kt,{writable:!0,value:function(t){var e,n,r=Object.assign({},t);for(e in r)for(n in r[e])r[e][n]=r[e][n].value;return r}}),ht(this,wt,e),ht(this,St,n),ht(this,Et,r),ht(this,jt,{}),ht(this,Ot,o),ht(this,Tt,i)}var e,n,r;return e=t,n=[{key:"addPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=mt(this,jt);if(t in n)throw new Error('Position "'+t+'" already exists.');n[t]={},this.addPositionResources(t,mt(this,Ot)),this.addPositionResources(t,e)}},{key:"addPositionResources",value:function(t,e){for(var n in e)this.addPositionResource(t,e[n])}},{key:"addPositionResource",value:function(t,e){if(!(e instanceof pt))throw new TypeError("Argument resource must be instance of Resource class.");var n=mt(this,jt);if(!(t in n))throw new Error('Missing position "'+t+'".');var r=n[t];e.name in r?r[e.name]=r[e.name].withValues(e.value):r[e.name]=e}},{key:"method",get:function(){return mt(this,wt)}},{key:"endpoint",get:function(){return mt(this,St)}},{key:"locale",get:function(){return mt(this,Et)}},{key:"parameters",get:function(){var t=mt(this,kt).call(this,mt(this,jt)),e={query:"GET"===this.method?JSON.stringify(t):t};return null!==this.locale&&(e.locale=this.locale),e}},{key:"headers",get:function(){return mt(this,Tt)}}],n&&bt(e.prototype,n),r&&bt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Pt(t){return Pt="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},Pt(t)}function At(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=$t(this,Yt);for(var o in e){var i=new pt(o,e[o]);i.name in r?r[i.name]=r[i.name].withValues(i.value):r[i.name]=i}var a={};for(var u in r)a[u]=r[u].value;a=JSON.stringify(a);var c=JSON.stringify(n),l={};"{}"!==a&&(l.resources=a),"{}"!==c&&(l.options=c),null!==$t(this,Vt)&&(l.locale=$t(this,Vt));var s=G.stringify(l);return"".concat($t(this,Gt),"/").concat(encodeURIComponent(t)).concat(""!==s?"?"+s:"")}}],n&&Lt(e.prototype,n),r&&Lt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Jt(t){return Jt="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},Jt(t)}function Xt(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:void 0;return this.options[t]||e}}],n&&ae(e.prototype,n),r&&ae(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ce(t){return ce="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},ce(t)}function le(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";if(-1===this.STATE.STATES.indexOf(t))throw new TypeError("".concat(t," is not valid state."));pe(this,me,t),pe(this,he,e.toString()),fe(this,ge)[t]=(fe(this,ge)[t]||0)+1,this._eventBus.dispatch(ee.ON_BANNER_STATE_CHANGED,this)}},{key:"getCurrenBreakpoint",value:function(t){return null}},{key:"isManaged",value:function(){return!1}},{key:"isExternal",value:function(){return!1}},{key:"isEmbed",value:function(){return!1}}],n&&le(e.prototype,n),r&&le(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Se(t){return Se="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},Se(t)}function Ee(t,e){for(var n=0;n=c&&(null===a||ac))&&(i=n,a=c,Ne(t,De)[r]=c)):o=n})),null===i&&null===o)throw new Error("Missing content for banner with ID ".concat(this.id));u.sort((function(t,e){return t-e})),"min"===r?u.unshift(null):u.push(null);var c=u.indexOf(a);return"max"===r&&c-1 in u&&(Ne(this,De).min=u[c-1]),"min"===r&&c+1 in u&&(Ne(this,De).max=u[c+1]),xe(this,Be,null!==i?i:o)}},{key:"needRedraw",value:function(){if(null===Ne(this,Be))return!0;var t=Ae(this,Fe,Le).call(this);return null!==Ne(this,De).min&&tNe(this,De).max}}])&&Te(e.prototype,n),r&&Te(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Le(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function ze(t,e){for(var n in t)e(t[n],n)}function $e(t){return $e="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},$e(t)}function He(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"weight",n={},r=0,o=0;o0;)u-=n[a],a++;return t[--a]?t[a]:t[0]}}],(n=null)&&Qe(e.prototype,n),r&&Qe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function tn(t){return tn="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},tn(t)}function en(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return nn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4&&void 0!==arguments[4]?arguments[4]:[],c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),ln(un(a=o.call(this,t,e,n,r,c)),yn,{writable:!0,value:void 0}),ln(un(a),vn,{writable:!0,value:!1}),ln(un(a),bn,{writable:!0,value:null}),ln(un(a),dn,{writable:!0,value:[]}),fn(un(a),yn,u),a}return e=i,(n=[{key:"html",set:function(t){this.element.innerHTML=t}},{key:"resources",get:function(){return sn(this,yn)}},{key:"data",get:function(){return console.warn("Usage of deprecated property `ManagedBanner.data`. Please use property `positionData` for accessing information about a position."),new Je(this)}},{key:"fingerprints",get:function(){var t;try{t=this.bannerData}catch(t){return[]}return this.positionData.isMultiple()||(t=[t]),t.map((function(t){return t.fingerprint}))}},{key:"bannerData",get:function(){if(null!==sn(this,bn))return sn(this,bn);if(!sn(this,dn).length)throw new Error("Banner's data is empty.");var t=null,e=this.positionData,n=function(t){return je.createFromProperties({bannerId:t.id,bannerName:t.name,positionId:e.id,positionCode:e.code,positionName:e.name,campaignId:t.campaignId,campaignCode:t.campaignCode,campaignName:t.campaignName})};switch(!0){case e.isSingle():(t=sn(this,dn).reduce((function(t,e){return t.score>=e.score?t:e}))).fingerprint=n(t);break;case e.isRandom():(t=Ze.randomByWeights(sn(this,dn),"score")).fingerprint=n(t);break;case e.isMultiple():var r,o=en(t=sn(this,dn).sort((function(t,e){return e.score-t.score})));try{for(o.s();!(r=o.n()).done;){var i=r.value;i.fingerprint=n(i)}}catch(t){o.e(t)}finally{o.f()}break;default:throw new Error("Invalid display type ".concat(this.displayType,"."))}if(null===t)throw new Error("Banner's data is empty.");return fn(this,bn,t),t}},{key:"getCurrenBreakpoint",value:function(t){var e=this.bannerData,n=(e=(Array.isArray(e)?e:[e]).find((function(e){return e.id===t})))&&e.content?e.content.breakpoint:null;return null===n?null:parseInt(n)}},{key:"isManaged",value:function(){return!0}},{key:"setResponseData",value:function(t){if(sn(this,vn))throw new Error("Data for banner on position ".concat(this.position," is already set."));this._positionData=new oe({id:t.position_id||null,code:this._positionData.code,name:t.position_name||null,rotationSeconds:t.rotation_seconds,displayType:t.display_type,breakpointType:t.breakpoint_type});var e=[];for(var n in t.banners||[])e.push(new Ue(t.banners[n],t.breakpoint_type));fn(this,dn,e),fn(this,vn,!0)}},{key:"needRedraw",value:function(){var t=this.bannerData;for(var e in Array.isArray(t)||(t=[t]),t)if(t[e].needRedraw())return!0;return!1}}])&&rn(e.prototype,n),r&&rn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(we);function hn(t){return hn="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},hn(t)}function gn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return wn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Tn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Gn(this,Kn,{writable:!0,value:void 0}),Vn(this,Kn,e-1)}var e,n,r;return e=t,(n=[{key:"getNextIdentifier",value:function(){var t,e;return Vn(this,Kn,(t=function(t,e){return e.get?e.get.call(t):e.value}(e=this,Yn(e,Kn,"get")),++t))}}])&&qn(e.prototype,n),r&&qn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Xn(t){return Xn="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},Xn(t)}function Qn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Zn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=[];for(n in(t=or(this,sr,pr).call(this,t)).setAttribute("data-amp-attached",""),r)i.push(new pt(n,r[n]));var a=new mn(rr(this,ur),rr(this,cr).getNextIdentifier(),t,e,i,o);return rr(this,lr).push(a),a}},{key:"addEmbedBanner",value:function(t,e,n){(t=or(this,sr,pr).call(this,t)).setAttribute("data-amp-attached","");var r=new $n(rr(this,ur),rr(this,cr).getNextIdentifier(),t,e,n);return rr(this,lr).push(r),r}},{key:"getBannersByState",value:function(t){var e=t.state,n=t.managed,r=void 0===n||n,o=t.external,i=void 0===o||o,a=t.embed,u=void 0===a||a;return rr(this,lr).filter((function(t){return t instanceof we&&t.state===e&&!(t instanceof mn&&!r||t instanceof Dn&&!i||t instanceof $n&&!u)}))}},{key:"getBannerByFingerprint",value:function(t){var e,n=t instanceof je?t.value:t,r=Qn(rr(this,lr));try{for(r.s();!(e=r.n()).done;){var o=e.value;if(!(o in $n)){var i,a=Qn(o.fingerprints);try{for(a.s();!(i=a.n()).done;)if(i.value.value===n)return o}catch(t){a.e(t)}finally{a.f()}}}}catch(t){r.e(t)}finally{r.f()}return null}},{key:"getBannerByUid",value:function(t){var e,n=Qn(rr(this,lr));try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.uid===t)return r}}catch(t){n.e(t)}finally{n.f()}return null}}],n&&tr(e.prototype,n),r&&tr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function pr(t){if(t instanceof HTMLElement)return t;if("string"!=typeof t)throw new TypeError("Element must be instance of HTMLElement or String");var e;if(!((e="#"===t.charAt(0)?document.getElementById(t.slice(1)):document.querySelector(t))instanceof HTMLElement))throw new TypeError("Selector "+t+" is invalid.");return e}function yr(t){return yr="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},yr(t)}function vr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return br(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return br(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function br(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("function"!=typeof e)throw new TypeError("Listener must be of type function.");var i="idx_"+hr(this,Sr).getNextIdentifier();return hr(this,Er)[t]=hr(this,Er)[t]||{},hr(this,Er)[t][i]={callback:e,scope:r,priority:o},t in hr(this,jr)&&delete hr(this,jr)[t],function(){t in hr(n,Er)&&i in hr(n,Er)[t]&&delete hr(n,Er)[t][i]}}},{key:"dispatch",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;re.priority?-1:t.priority=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Vr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=u.pixels)return u.ratio}}catch(t){i.e(t)}finally{i.f()}return r};return new IntersectionObserver((function(r){var o,a=[],u={},l={},s=Gr(r);try{for(s.s();!(o=s.n()).done;){var f=o.value,p=f.target.dataset.ampBannerFingerprint,y=t.getBannerByFingerprint(p);if(y){var v=n[p];if(v){var b={fingerprint:v.fingerprint,element:f.target,banner:y};if(a.push(Hr(Hr({},b),{},{entry:f})),!v.alreadySeen){var d=f.intersectionRatio>=c(f.target);u[p]=!(p in u)||!u[p].isIntersecting&&d?{fingerprintArgs:b,fingerprintMetadata:v,isIntersecting:d}:u[p]}if(!v.alreadyFullySeen){var m=1<=f.intersectionRatio;l[p]=!(p in l)||!l[p].isFullyIntersecting&&m?{fingerprintArgs:b,fingerprintMetadata:v,isFullyIntersecting:m}:l[p]}}}}}catch(t){s.e(t)}finally{s.f()}for(var h=function(){var t=w[g],n=t.fingerprintArgs,r=t.fingerprintMetadata,o=t.isIntersecting;o&&!r.alreadySeen&&null===r.firstTimeSeenTimeoutId?r.firstTimeSeenTimeoutId=setTimeout((function(){r.alreadySeen=!0,e.dispatch(ee.ON_BANNER_FIRST_TIME_SEEN,n)}),i):o||null===r.firstTimeSeenTimeoutId||(clearTimeout(r.firstTimeSeenTimeoutId),r.firstTimeSeenTimeoutId=null)},g=0,w=Object.values(u);g=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Zr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Oo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=":"<=").concat(r),{channel_code:e,banner_id:t.bannerId,banner_name:t.bannerName,position_id:t.positionId,position_code:t.positionCode,position_name:t.positionName,campaign_id:t.campaignId,campaign_code:t.campaignCode,campaign_name:t.campaignName,breakpoint:r}};n.isEventEnabled(ho.BANNER_LOADED)&&t.subscribe(ee.ON_BANNER_STATE_CHANGED,(function(t){if(!t.isEmbed()&&Qt.RENDERED===t.state&&1===t.stateCounter){var e,o=jo(t.fingerprints);try{for(o.s();!(e=o.n()).done;){var i=e.value;n.send(ho.BANNER_LOADED,r(i,t))}}catch(t){o.e(t)}finally{o.f()}}})),n.isEventEnabled(ho.BANNER_DISPLAYED)&&t.subscribe(ee.ON_BANNER_FIRST_TIME_SEEN,(function(t){var e=t.fingerprint,o=t.banner;n.send(ho.BANNER_DISPLAYED,r(e,o))})),n.isEventEnabled(ho.BANNER_FULLY_DISPLAYED)&&t.subscribe(ee.ON_BANNER_FIRST_TIME_FULLY_SEEN,(function(t){var e=t.fingerprint,o=t.banner;n.send(ho.BANNER_FULLY_DISPLAYED,r(e,o))})),n.isEventEnabled(ho.BANNER_CLICKED)&&t.subscribe(ee.ON_BANNER_LINK_CLICKED,(function(t){var e=t.fingerprint,o=t.banner,i=t.target;n.send(ho.BANNER_CLICKED,So(So({},r(e,o)),{},{link:i.href||""}))}))}}}}])&&To(e.prototype,n),r&&To(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Bo=!1;const Do=function(t,e){if(!("plausible"in window)||"function"!=typeof window.plausible)return!Bo&&console.warn("Unable to send metrics to Plausible because the function plausible() does not occur in the window."),void(Bo=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.plausible(t,{props:e})};var Fo=!1;const Wo=function(t,e){if(!("gtag"in window)||"function"!=typeof window.gtag)return!Fo&&console.warn("Unable to send metrics to Google Analytics because the function gtag() does not occur in the window."),void(Fo=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.gtag("event",t,e)};function Uo(t){return Uo="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},Uo(t)}function Lo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function zo(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Uo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Uo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Uo(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $o=!1;const Ho=function(t,e){if(!("dataLayer"in window))return!$o&&console.warn("Unable to send metrics to GTM because the dataLayer does not occur in the window."),void($o=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.dataLayer.push(function(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Yo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:"*";t.postMessage({message:e,data:n},r)}},{key:"listen",value:function(){var t=this;window.addEventListener("message",(function(e){if(!(0=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function $i(t,e){if(t){if("string"==typeof t)return Hi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hi(t,e):void 0}}function Hi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.interaction.defaultIntersectionRatio||1f||1e.interaction.firstTimeSeenTimeout)throw new Error('The option "interaction.firstTimeSeenTimeout" must be a int with a minimum value of 500, "'.concat(e.interaction.firstTimeSeenTimeout,'" passed.'));if("object"!==m(e.metrics))throw new Error('The option "metrics" must be an object of the format { receiver: null|string|function|array, disabledEvents: array }, '.concat(e.metrics," passed."));if(null!==e.metrics.receiver&&-1===["string","function"].indexOf(m(e.metrics.receiver))&&!Array.isArray(e.metrics.receiver))throw new Error('The option "metrics.receiver" must be a null or a string or a function or an array of strings|functions, "'.concat(e.metrics.receiver,'" passed.'));if(Array.isArray(e.metrics.receiver)){for(var p in e.metrics.receiver)if(-1===["string","function"].indexOf(m(e.metrics.receiver[p])))throw new Error('The option "metrics.receiver.'.concat(p,'" must be a string or a function, "').concat(e.metrics.receiver[p],'" passed.'))}else e.metrics.receiver=null!==e.metrics.receiver?[e.metrics.receiver]:[];if(!Array.isArray(e.metrics.disabledEvents))throw new Error('The option "metrics.disabledEvents" must an array of strings (event names), "'.concat(e.metrics.disabledEvents,'" passed.'));for(var d in e.metrics.disabledEvents)if("string"!=typeof e.metrics.disabledEvents[d])throw new Error('The option "metrics.disabledEvents.'.concat(d,'" must be a string, "').concat(e.metrics.disabledEvents[d],'" passed.'));return e}(n)),Ji(this,ta,new Or),Ji(this,ea,new Wt(n.method,n.url,n.version,n.channel)),Ji(this,na,new Kt(n.url,n.channel)),Ji(this,oa,new fr(Ki(this,ta))),Ji(this,ia,new Lr(n.template)),Ji(this,aa,new yo(Ki(this,oa),Ki(this,ta),n.interaction)),Ji(this,ua,ni.createFromReceivers(n.metrics.receiver,n.metrics.disabledEvents)),Ji(this,ca,new Mo(Ki(this,ua),Ki(this,ta),n.channel)),Ji(this,la,new Ci({origin:n.url,connectionData:{extendedConfig:{interaction:n.interaction}},bannerManager:Ki(this,oa),metricsSender:Ki(this,ua)})),this.setLocale(n.locale),Ki(this,ea).origin=n.origin,n.resources)Ki(this,ea).addDefaultResource(a,n.resources[a]),Ki(this,na).addDefaultResource(a,n.resources[a]);window.addEventListener("resize",(function(){var t=Ki(i,oa).getBannersByState({state:Ki(i,oa).STATE.RENDERED,managed:!0,external:!1,embed:!1});for(var e in t)t[e].needRedraw()&&i.renderBanner(t[e])})),Ki(this,la).listen(),Ki(this,ca).attach(),Ki(this,aa).start()}var e,n,r;return e=t,n=[{key:"version",get:function(){return Ki(this,Qi)}},{key:"on",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Ki(this,ta).subscribe(t,e,n)}},{key:"setLocale",value:function(t){Ki(this,ea).locale=t,Ki(this,na).locale=t}},{key:"setGateway",value:function(t){if(!function(t){return t instanceof S}(t))throw new TypeError("Argument gateway mut be instance of AbstractGateway.");Ji(this,ra,t)}},{key:"getGateway",value:function(){return null===Ki(this,ra)&&this.setGateway(new tt),Ki(this,ra)}},{key:"createBanner",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Ki(this,oa).addManagedBanner(t,e,n,r)}},{key:"attachBanners",value:function(){var t,e=zi((arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll("[data-amp-banner]:not([data-amp-attached])"));try{for(e.s();!(t=e.n()).done;){var n=t.value,r=n.dataset.ampBanner;if(r){var o=void 0;if("ampBannerExternal"in n.dataset)o=Ki(this,oa).addExternalBanner(n);else if("ampMode"in n.dataset&&"embed"===n.dataset.ampMode){var i=Yi(this,sa,pa).call(this,n,r),a=i.iframe,u=i.options;o=Ki(this,oa).addEmbedBanner(a,r,u),Ki(this,la).connectBanner(o),n.insertAdjacentElement("afterend",a),n.remove(),n=a}else{var c=En.parseResources(n),l=En.parseOptions(n);o=this.createBanner(n,r,c,l)}Ki(this,ta).dispatch(this.EVENTS.ON_BANNER_ATTACHED,o)}else console.warn("Unable to attach a banner to the element ",n,' because the attribute "data-amp-banner" has an empty value.')}}catch(t){e.e(t)}finally{e.f()}}},{key:"fetch",value:function(){var t=this,e=Ki(this,oa).getBannersByState({state:Ki(this,oa).STATE.NEW,managed:!0,external:!1,embed:!1});if(e.length){var n,r=Ki(this,ea).create(),o=zi(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.addPosition(i.position,i.resources)}}catch(t){o.e(t)}finally{o.f()}Ki(this,ta).dispatch(this.EVENTS.ON_BEFORE_FETCH),this.getGateway().fetch(r,(function(n){var r,o=n.data,i=zi(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.position in o&&"banners"in o[a.position]&&Object.values(o[a.position].banners).length?(Array.isArray(o[a.position].banners)||(o[a.position].banners=Object.values(o[a.position].banners)),a.setResponseData(o[a.position]),t.renderBanner(a)):a.setState(Ki(t,oa).STATE.NOT_FOUND,"Banner not found in fetched response.")}}catch(t){i.e(t)}finally{i.f()}Ki(t,ta).dispatch(t.EVENTS.ON_FETCH_SUCCESS,n)}),(function(n){var r,o=zi(e);try{for(o.s();!(r=o.n()).done;)r.value.setState(Ki(t,oa).STATE.ERROR,"Request on api failed.")}catch(t){o.e(t)}finally{o.f()}Ki(t,ta).dispatch(t.EVENTS.ON_FETCH_ERROR,n)}))}}},{key:"renderBanner",value:function(t){if(!(t instanceof mn))throw new TypeError("Only managed banners can be rendered.");try{t.html=Ki(this,ia).render(t)}catch(e){return void t.setState(Ki(this,oa).STATE.ERROR,"Render error: "+e.message)}t.setState(Ki(this,oa).STATE.RENDERED,"Banner was successfully rendered.")}}],n&&qi(e.prototype,n),r&&qi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function pa(t,e){var n=En.parseOptions(t),r=document.createElement("iframe");return Li(t.attributes).map((function(t){var e=t.name,n=t.value;r.setAttribute(e,n)})),r.width="100%",r.height="100%",r.allowFullscreen=!0,r.scrolling="no",r.style.border="none",r.style.overflow="hidden",r.src=t.dataset.ampEmbedSrc||Ki(this,na).create(e,En.parseResources(t),n),r.setAttribute("allowtransparency","true"),"lazy"===n.loading&&(r.loading="lazy"),{iframe:r,options:n}}function ya(t){return ya="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},ya(t)}function va(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return new fa(t.version,e)}},{key:"version",get:function(){return new p(ba,"standard@".concat(ba))}}],(n=null)&&va(e.prototype,n),r&&va(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.i8})(),AMPClientFactory=r.AMPClientFactory})(); \ No newline at end of file diff --git a/dist/amp-client.standalone.min.js b/dist/amp-client.standalone.min.js index c07ecf9..db18be2 100644 --- a/dist/amp-client.standalone.min.js +++ b/dist/amp-client.standalone.min.js @@ -1 +1 @@ -var AMPClientFactory;(()=>{var t={10:(t,e,n)=>{"use strict";t.exports=n(15)},637:t=>{function e(t){return e="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},e(t)}function n(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n{function r(t){return r="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},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=[];for(n in(t=b(t)).setAttribute("data-amp-attached",""),r)i.push(new y(n,r[n]));var a=new c(u(this).eventBus,t,e,i,o);return u(this).banners.push(a),a}},{key:"getBannersByState",value:function(t){var e=t.state,n=t.managed,r=void 0===n||n,o=t.external,i=void 0===o||o;return u(this).banners.filter((function(t){return t instanceof l&&t.state===e&&!(t instanceof c&&!r||t instanceof s&&!i)}))}},{key:"getBannerByFingerprint",value:function(t){var e,n=t instanceof p?t.value:t,r=o(u(this).banners);try{for(r.s();!(e=r.n()).done;){var i,a=e.value,c=o(a.fingerprints);try{for(c.s();!(i=c.n()).done;)if(i.value.value===n)return a}catch(t){c.e(t)}finally{c.f()}}}catch(t){r.e(t)}finally{r.f()}return null}}],n&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=m},150:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";if(-1===this.STATE.STATES.indexOf(t))throw new TypeError("".concat(t," is not valid state."));s(this).state=t,s(this).stateInfo=e.toString(),s(this).stateCounters[t]=(s(this).stateCounters[t]||0)+1,s(this).eventBus.dispatch(a.ON_BANNER_STATE_CHANGED,this)}},{key:"getCurrenBreakpoint",value:function(t){return null}}],n&&o(e.prototype,n),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=l},752:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r{function r(t){return r="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},r(t)}function o(t,e){for(var n=0;n=i&&(null===c||ci))&&(a=n,c=i,t.resolvedContentBounds[r]=i)):o=n})),null===a&&null===o)throw new Error("Missing content for banner with ID ".concat(this.id));s.sort((function(t,e){return t-e})),"min"===r?s.unshift(null):s.push(null);var l=s.indexOf(c);return"max"===r&&l-1 in s&&(t.resolvedContentBounds.min=s[l-1]),"min"===r&&l+1 in s&&(t.resolvedContentBounds.max=s[l+1]),t.resolvedContent=null!==a?a:o}},{key:"needRedraw",value:function(){var t=i(this);if(null===t.resolvedContent)return!0;var e=u();return null!==t.resolvedContentBounds.min&&et.resolvedContentBounds.max}}])&&o(e.prototype,n),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=c},148:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),r=i.call(this,t,e,n,a),v(s(r)).resources=o,v(s(r)).responseDataReceived=!1,v(s(r)).resolvedBannerData=null,v(s(r)).banners=[],r}return e=l,(n=[{key:"html",set:function(t){v(this).element.innerHTML=t}},{key:"resources",get:function(){return v(this).resources}},{key:"data",get:function(){return console.warn("Usage of deprecated property `ManagedBanner.data`. Please use property `positionData` for accessing information about a position."),new b(this)}},{key:"fingerprints",get:function(){var t;try{t=this.bannerData}catch(t){return[]}return this.positionData.isMultiple()||(t=[t]),t.map((function(t){return t.fingerprint}))}},{key:"bannerData",get:function(){if(null!==v(this).resolvedBannerData)return v(this).resolvedBannerData;if(!v(this).banners.length)throw new Error("Banner's data is empty.");var t=null,e=this.positionData,n=function(t){return d.createFromProperties({bannerId:t.id,bannerName:t.name,positionId:e.id,positionCode:e.code,positionName:e.name,campaignId:t.campaignId,campaignCode:t.campaignCode,campaignName:t.campaignName})};switch(!0){case e.isSingle():(t=v(this).banners.reduce((function(t,e){return t.score>=e.score?t:e}))).fingerprint=n(t);break;case e.isRandom():(t=m.randomByWeights(v(this).banners,"score")).fingerprint=n(t);break;case e.isMultiple():var r,i=o(t=v(this).banners.sort((function(t,e){return e.score-t.score})));try{for(i.s();!(r=i.n()).done;){var a=r.value;a.fingerprint=n(a)}}catch(t){i.e(t)}finally{i.f()}break;default:throw new Error("Invalid display type ".concat(this.displayType,"."))}if(null===t)throw new Error("Banner's data is empty.");return v(this).resolvedBannerData=t,t}},{key:"getCurrenBreakpoint",value:function(t){var e=this.bannerData,n=(e=(Array.isArray(e)?e:[e]).find((function(e){return e.id===t})))&&e.content?e.content.breakpoint:null;return null===n?null:parseInt(n)}},{key:"setResponseData",value:function(t){if(v(this).responseDataReceived)throw new Error("Data for banner on position ".concat(this.position," is already set."));v(this).positionData=new p({id:t.position_id||null,code:this.positionData.code,name:t.position_name||null,rotationSeconds:t.rotation_seconds,displayType:t.display_type,breakpointType:t.breakpoint_type});var e=[];for(var n in t.banners||[])e.push(new y(t.banners[n],t.breakpoint_type));v(this).banners=e,v(this).responseDataReceived=!0}},{key:"needRedraw",value:function(){var t=this.bannerData;for(var e in Array.isArray(t)||(t=[t]),t)if(t[e].needRedraw())return!0;return!1}}])&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),l}(f);t.exports=h},839:t=>{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:void 0;return this.options[t]||e}}],r&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=r},717:t=>{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r{function r(t){return r="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},r(t)}function o(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{})}}],(n=null)&&o(e.prototype,n),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=a},847:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:null;return c(this).eventBus.subscribe(t,e,n)}},{key:"setLocale",value:function(t){c(this).requestFactory.locale=t}},{key:"setGateway",value:function(t){if(!l.isGateway(t))throw new TypeError("Argument gateway mut be instance of AbstractGateway.");c(this).gateway=t}},{key:"getGateway",value:function(){return null===c(this).gateway&&this.setGateway(l.create()),c(this).gateway}},{key:"createBanner",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return c(this).bannerManager.addManagedBanner(t,e,n,r)}},{key:"attachBanners",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=c(this),r=o(e.querySelectorAll("[data-amp-banner]:not([data-amp-attached])"));try{for(r.s();!(t=r.n()).done;){var i=t.value,a=void 0;if("ampBannerExternal"in i.dataset)a=c(this).bannerManager.addExternalBanner(i);else{var u=i.dataset.ampBanner;if(!u){console.warn("Unable to attach a banner to the element ",i,' because the attribute "data-amp-banner" has an empty value.');continue}var s=b.parseResources(i),l=b.parseOptions(i);a=this.createBanner(i,u,s,l)}n.eventBus.dispatch(this.EVENTS.ON_BANNER_ATTACHED,a)}}catch(t){r.e(t)}finally{r.f()}}},{key:"fetch",value:function(){var t=this,e=c(this),n=e.bannerManager.getBannersByState({state:e.bannerManager.STATE.NEW,managed:!0,external:!1});if(n.length){var r,i=e.requestFactory.create(),a=o(n);try{for(a.s();!(r=a.n()).done;){var u=r.value;i.addPosition(u.position,u.resources)}}catch(t){a.e(t)}finally{a.f()}e.eventBus.dispatch(this.EVENTS.ON_BEFORE_FETCH),this.getGateway().fetch(i,(function(r){var i,a=r.data,u=o(n);try{for(u.s();!(i=u.n()).done;){var c=i.value;c.position in a&&"banners"in a[c.position]&&Object.values(a[c.position].banners).length?(Array.isArray(a[c.position].banners)||(a[c.position].banners=Object.values(a[c.position].banners)),c.setResponseData(a[c.position]),t.renderBanner(c)):c.setState(e.bannerManager.STATE.NOT_FOUND,"Banner not found in fetched response.")}}catch(t){u.e(t)}finally{u.f()}e.eventBus.dispatch(t.EVENTS.ON_FETCH_SUCCESS,r)}),(function(r){var i,a=o(n);try{for(a.s();!(i=a.n()).done;)i.value.setState(e.bannerManager.STATE.ERROR,"Request on api failed.")}catch(t){a.e(t)}finally{a.f()}e.eventBus.dispatch(t.EVENTS.ON_FETCH_ERROR,r)}))}}},{key:"renderBanner",value:function(t){if(!(t instanceof y))throw new TypeError("Only managed banners can be rendered.");var e=c(this);try{e.bannerRenderer.render(t)}catch(n){return void t.setState(e.bannerManager.STATE.ERROR,"Render error: "+n.message)}t.setState(e.bannerManager.STATE.RENDERED,"Banner was successfully rendered.")}}],n&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=w},613:(t,e,n)=>{function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.interaction.defaultIntersectionRatio||1d||1e.interaction.firstTimeSeenTimeout)throw new Error('The option "interaction.firstTimeSeenTimeout" must be a int with a minimum value of 500, "'.concat(e.interaction.firstTimeSeenTimeout,'" passed.'));if("object"!==i(e.metrics))throw new Error('The option "metrics" must be an object of the format { receiver: null|string|function|array, disabledEvents: array }, '.concat(e.metrics," passed."));if(null!==e.metrics.receiver&&-1===["string","function"].indexOf(i(e.metrics.receiver))&&!Array.isArray(e.metrics.receiver))throw new Error('The option "metrics.receiver" must be a null or a string or a function or an array of strings|functions, "'.concat(e.metrics.receiver,'" passed.'));if(Array.isArray(e.metrics.receiver)){for(var v in e.metrics.receiver)if(-1===["string","function"].indexOf(i(e.metrics.receiver[v])))throw new Error('The option "metrics.receiver.'.concat(v,'" must be a string or a function, "').concat(e.metrics.receiver[v],'" passed.'))}else e.metrics.receiver=null!==e.metrics.receiver?[e.metrics.receiver]:[];if(!Array.isArray(e.metrics.disabledEvents))throw new Error('The option "metrics.disabledEvents" must an array of strings (event names), "'.concat(e.metrics.disabledEvents,'" passed.'));for(var h in e.metrics.disabledEvents)if("string"!=typeof e.metrics.disabledEvents[h])throw new Error('The option "metrics.disabledEvents.'.concat(h,'" must be a string, "').concat(e.metrics.disabledEvents[h],'" passed.'));return e}},109:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("function"!=typeof e)throw new TypeError("Listener must be of type function.");var o=c(this),i="idx_"+o.generator.getNextIdentifier();return o.listeners[t]=o.listeners[t]||{},o.listeners[t][i]={callback:e,scope:n,priority:r},t in o.sortedListeners&&delete o.sortedListeners[t],function(){t in o.listeners&&i in o.listeners[t]&&delete o.listeners[t][i]}}},{key:"dispatch",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;re.priority?-1:t.priority{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r{function r(t){return r="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},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nr.status?e(t):n(t)},r.onerror=function(){n({status:"error",data:{code:r.status,error:r.statusText||"unknown"}})};var i=t.endpoint;"GET"===t.method&&(i+="?".concat(f.stringify(t.parameters))),r.open(t.method,i,!0),r.overrideMimeType("application/json"),r.setRequestHeader("Accept","application/json");var a,u=o(t.headers);try{for(u.s();!(a=u.n()).done;){var c=a.value;r.setRequestHeader(c.name,c.value)}}catch(t){u.e(t)}finally{u.f()}r.send("POST"===t.method?JSON.stringify(t.parameters):null)}}])&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(l);t.exports=p},484:(t,e,n)=>{var r=n(549),o=n(427);t.exports={isGateway:function(t){return t instanceof r},create:function(){return new o}}},199:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n{function r(t){return r="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},r(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=a.pixels)return a.ratio}}catch(t){i.e(t)}finally{i.f()}return r};return new IntersectionObserver((function(r){var o,c=[],l={},p={},y=u(r);try{for(y.s();!(o=y.n()).done;){var b=o.value,m=b.target.dataset.ampBannerFingerprint,d=t.getBannerByFingerprint(m);if(d){var v=n[m];if(v){var h={fingerprint:v.fingerprint,element:b.target,banner:d};if(c.push(i(i({},h),{},{entry:b})),!v.alreadySeen){var g=b.intersectionRatio>=f(b.target);l[m]=!(m in l)||!l[m].isIntersecting&&g?{fingerprintArgs:h,fingerprintMetadata:v,isIntersecting:g}:l[m]}if(!v.alreadyFullySeen){var w=1<=b.intersectionRatio;p[m]=!(m in p)||!p[m].isFullyIntersecting&&w?{fingerprintArgs:h,fingerprintMetadata:v,isFullyIntersecting:w}:p[m]}}}}}catch(t){y.e(t)}finally{y.f()}for(var S=function(){var t=O[E],n=t.fingerprintArgs,r=t.fingerprintMetadata,o=t.isIntersecting;o&&!r.alreadySeen&&null===r.firstTimeSeenTimeoutId?r.firstTimeSeenTimeoutId=setTimeout((function(){r.alreadySeen=!0,e.dispatch(s.ON_BANNER_FIRST_TIME_SEEN,n)}),a):o||null===r.firstTimeSeenTimeoutId||(clearTimeout(r.firstTimeSeenTimeoutId),r.firstTimeSeenTimeoutId=null)},E=0,O=Object.values(l);E{t.exports=function(t,e){console.log("Sending metrics.",{eventName:t,eventArgs:e})}},388:t=>{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r{var e=!1;t.exports=function(t,n){if(!("gtag"in window)||"function"!=typeof window.gtag)return!e&&console.warn("Unable to send metrics to Google Analytics because the function gtag() does not occur in the window."),void(e=!0);Object.keys(n).forEach((function(t){return null===n[t]&&delete n[t]})),window.gtag("event",t,n)}},56:t=>{function e(t){return e="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},e(t)}function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t,n,r){return(n=function(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===e(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var o=!1;t.exports=function(t,e){if(!("dataLayer"in window))return!o&&console.warn("Unable to send metrics to GTM because the dataLayer does not occur in the window."),void(o=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.dataLayer.push(function(t){for(var e=1;e{function r(t){return r="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},r(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=":"<=").concat(r),{channel_code:e,banner_id:t.bannerId,banner_name:t.bannerName,position_id:t.positionId,position_code:t.positionCode,position_name:t.positionName,campaign_id:t.campaignId,campaign_code:t.campaignCode,campaign_name:t.campaignName,breakpoint:r}};-1===r.indexOf(y.BANNER_LOADED)&&t.subscribe(b.ON_BANNER_STATE_CHANGED,(function(t){if(m.RENDERED===t.state&&1===t.stateCounter){var e,r=u(t.fingerprints);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.send(y.BANNER_LOADED,o(i,t))}}catch(t){r.e(t)}finally{r.f()}}})),-1===r.indexOf(y.BANNER_DISPLAYED)&&t.subscribe(b.ON_BANNER_FIRST_TIME_SEEN,(function(t){var e=t.fingerprint,r=t.banner;n.send(y.BANNER_DISPLAYED,o(e,r))})),-1===r.indexOf(y.BANNER_FULLY_DISPLAYED)&&t.subscribe(b.ON_BANNER_FIRST_TIME_FULLY_SEEN,(function(t){var e=t.fingerprint,r=t.banner;n.send(y.BANNER_FULLY_DISPLAYED,o(e,r))})),-1===r.indexOf(y.BANNER_CLICKED)&&t.subscribe(b.ON_BANNER_LINK_CLICKED,(function(t){var e=t.fingerprint,r=t.banner,a=t.target;n.send(y.BANNER_CLICKED,i(i({},o(e,r)),{},{link:a.href||""}))}))}}}}])&&s(e.prototype,n),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=d},131:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n{var e=!1;t.exports=function(t,n){if(!("plausible"in window)||"function"!=typeof window.plausible)return!e&&console.warn("Unable to send metrics to Plausible because the function plausible() does not occur in the window."),void(e=!0);Object.keys(n).forEach((function(t){return null===n[t]&&delete n[t]})),window.plausible(t,{props:n})}},777:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n{function r(t){return r="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},r(t)}function o(t,e){for(var n=0;n{function r(t){return r="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},r(t)}function o(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this).method=e,a(this).endpoint=n,a(this).locale=r,a(this).query={},a(this).defaultResources=o,a(this).headers=i}var e,n,r;return e=t,n=[{key:"addPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=a(this).query;if(t in n)throw new Error('Position "'+t+'" already exists.');n[t]={},this.addPositionResources(t,a(this).defaultResources),this.addPositionResources(t,e)}},{key:"addPositionResources",value:function(t,e){for(var n in e)this.addPositionResource(t,e[n])}},{key:"addPositionResource",value:function(t,e){if(!(e instanceof i))throw new TypeError("Argument resource must be instance of Resource class.");var n=a(this).query;if(!(t in n))throw new Error('Missing position "'+t+'".');var r=n[t];e.name in r?r[e.name]=r[e.name].withValues(e.value):r[e.name]=e}},{key:"method",get:function(){return a(this).method}},{key:"endpoint",get:function(){return a(this).endpoint}},{key:"locale",get:function(){return a(this).locale}},{key:"parameters",get:function(){var t=function(t){var e,n,r=Object.assign({},t);for(e in r)for(n in r[e])r[e][n]=r[e][n].value;return r}(a(this).query),e={query:"GET"===this.method?JSON.stringify(t):t};return null!==this.locale&&(e.locale=this.locale),e}},{key:"headers",get:function(){return a(this).headers}}],n&&o(e.prototype,n),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=u},53:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){for(var n=0;n{t.exports={single:n(371),random:n(621),multiple:n(213)}},213:t=>{t.exports='\n \n'},621:t=>{t.exports='\n \n'},371:t=>{t.exports='\n \n'},159:t=>{var e=new WeakMap;t.exports=function(t){return e.has(t)||e.set(t,{}),e.get(t)}},593:t=>{function e(t){return e="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},e(t)}function n(t,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"weight",n={},r=0,o=0;o0;)u-=n[a],a++;return t[--a]?t[a]:t[0]}}],(r=null)&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=r},604:(t,e,n)=>{function r(t){return r="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},r(t)}function o(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this).lastId=e-1}var e,n,r;return e=t,(n=[{key:"getNextIdentifier",value:function(){return i(this).lastId++}}])&&o(e.prototype,n),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=a},377:t=>{"use strict";t.exports=_.merge},781:t=>{"use strict";t.exports=_.template},685:(t,e,n)=>{"use strict";n.d(e,{Z:()=>P});var r={};n.r(r),n.d(r,{exclude:()=>N,extract:()=>S,parse:()=>E,parseUrl:()=>j,pick:()=>k,stringify:()=>O,stringifyUrl:()=>T});const o="%[a-f0-9]{2}",i=new RegExp("("+o+")|([^%]+?)","gi"),a=new RegExp("("+o+")+","gi");function u(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(1===t.length)return t;e=e||1;const n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],u(n),u(r))}function c(t){try{return decodeURIComponent(t)}catch{let e=t.match(i)||[];for(let n=1;nnull==t,y=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),b=Symbol("encodeFragmentIdentifier");function m(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(t,e){return e.encode?e.strict?y(t):encodeURIComponent(t):t}function v(t,e){return e.decode?s(t):t}function h(t){return Array.isArray(t)?t.sort():"object"==typeof t?h(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function g(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function w(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function S(t){const e=(t=g(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function E(t,e){m((e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e}).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),e?void 0!==r[t]?r[t]=[...r[t],n]:r[t]=[n]:r[t]=n};case"colon-list-separator":return(t,n,r)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==r[t]?r[t]=[...r[t],n]:r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{const o="string"==typeof n&&n.includes(t.arrayFormatSeparator),i="string"==typeof n&&!o&&v(n,t).includes(t.arrayFormatSeparator);n=i?v(n,t):n;const a=o||i?n.split(t.arrayFormatSeparator).map((e=>v(e,t))):null===n?n:v(n,t);r[e]=a};case"bracket-separator":return(e,n,r)=>{const o=/(\[])$/.test(e);if(e=e.replace(/\[]$/,""),!o)return void(r[e]=n?v(n,t):n);const i=null===n?[]:n.split(t.arrayFormatSeparator).map((e=>v(e,t)));void 0!==r[e]?r[e]=[...r[e],...i]:r[e]=i};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[...[n[t]].flat(),e]:n[t]=e}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){if(""===o)continue;const t=e.decode?o.replace(/\+/g," "):o;let[i,a]=l(t,"=");void 0===i&&(i=t),a=void 0===a?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:v(a,e),n(v(i,e),a,r)}for(const[t,n]of Object.entries(r))if("object"==typeof n&&null!==n)for(const[t,r]of Object.entries(n))n[t]=w(r,e);else r[t]=w(n,e);return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce(((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=h(n):t[e]=n,t}),Object.create(null))}function O(t,e){if(!t)return"";m((e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e}).arrayFormatSeparator);const n=n=>e.skipNull&&p(t[n])||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[d(e,t),"[",o,"]"].join("")]:[...n,[d(e,t),"[",d(o,t),"]=",d(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[d(e,t),"[]"].join("")]:[...n,[d(e,t),"[]=",d(r,t)].join("")];case"colon-list-separator":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[d(e,t),":list="].join("")]:[...n,[d(e,t),":list=",d(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[d(n,t),e,d(o,t)].join("")]:[[r,d(o,t)].join(t.arrayFormatSeparator)])}default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,d(e,t)]:[...n,[d(e,t),"=",d(r,t)].join("")]}}(e),o={};for(const[e,r]of Object.entries(t))n(e)||(o[e]=r);const i=Object.keys(o);return!1!==e.sort&&i.sort(e.sort),i.map((n=>{const o=t[n];return void 0===o?"":null===o?d(n,e):Array.isArray(o)?0===o.length&&"bracket-separator"===e.arrayFormat?d(n,e)+"[]":o.reduce(r(n),[]).join("&"):d(n,e)+"="+d(o,e)})).filter((t=>t.length>0)).join("&")}function j(t,e){e={decode:!0,...e};let[n,r]=l(t,"#");return void 0===n&&(n=t),{url:n?.split("?")?.[0]??"",query:E(S(t),e),...e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:v(r,e)}:{}}}function T(t,e){e={encode:!0,strict:!0,[b]:!0,...e};const n=g(t.url).split("?")[0]||"";let r=O({...E(S(t.url),{sort:!1}),...t.query},e);r&&(r=`?${r}`);let o=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);if(t.fragmentIdentifier){const r=new URL(n);r.hash=t.fragmentIdentifier,o=e[b]?r.hash:`#${t.fragmentIdentifier}`}return`${n}${r}${o}`}function k(t,e,n){n={parseFragmentIdentifier:!0,[b]:!1,...n};const{url:r,query:o,fragmentIdentifier:i}=j(t,n);return T({url:r,query:f(o,e),fragmentIdentifier:i},n)}function N(t,e,n){return k(t,Array.isArray(e)?t=>!e.includes(t):(t,n)=>!e(t,n),n)}const P=r},147:t=>{"use strict";t.exports=JSON.parse('{"i8":"1.4.0-beta.2"}')}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r=n(10);AMPClientFactory=r})(); \ No newline at end of file +var AMPClientFactory;(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.d(e,{AMPClientFactory:()=>da});var n={};t.r(n),t.d(n,{exclude:()=>q,extract:()=>L,parse:()=>U,parseUrl:()=>$,pick:()=>G,stringify:()=>z,stringifyUrl:()=>H});const r=JSON.parse('{"i8":"1.5.0-beta.0"}');function o(t){return o="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},o(t)}function i(t,e){for(var n=0;n\n\n <% if(\'img\' === data.content.type) { %>\n target="<%- data.content.target %>"<% } %>>\n \n <% (data.content.sources || []).forEach(function(source) { %>\n \n <% }); %>\n <%- data.content.alt %>title="<%- data.content.title %>"<% } %>\n <% if(banner.options.has(\'loading\')) { %>loading="<%- banner.options.get(\'loading\') %>"<% } %>>\n \n \n <% } else if (\'html\' === data.content.type) { %>\n
\n <%= data.content.html %>\n
\n <% } %>\n\n \n',random:'\n \n',multiple:'\n \n'};function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nnull==t,I=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),C=Symbol("encodeFragmentIdentifier");function M(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function D(t,e){return e.encode?e.strict?I(t):encodeURIComponent(t):t}function B(t,e){return e.decode?P(t):t}function W(t){return Array.isArray(t)?t.sort():"object"==typeof t?W(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function F(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function x(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function L(t){const e=(t=F(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function U(t,e){M((e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e}).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),e?void 0!==r[t]?r[t]=[...r[t],n]:r[t]=[n]:r[t]=n};case"colon-list-separator":return(t,n,r)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==r[t]?r[t]=[...r[t],n]:r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{const o="string"==typeof n&&n.includes(t.arrayFormatSeparator),i="string"==typeof n&&!o&&B(n,t).includes(t.arrayFormatSeparator);n=i?B(n,t):n;const a=o||i?n.split(t.arrayFormatSeparator).map((e=>B(e,t))):null===n?n:B(n,t);r[e]=a};case"bracket-separator":return(e,n,r)=>{const o=/(\[])$/.test(e);if(e=e.replace(/\[]$/,""),!o)return void(r[e]=n?B(n,t):n);const i=null===n?[]:n.split(t.arrayFormatSeparator).map((e=>B(e,t)));void 0!==r[e]?r[e]=[...r[e],...i]:r[e]=i};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[...[n[t]].flat(),e]:n[t]=e}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){if(""===o)continue;const t=e.decode?o.replace(/\+/g," "):o;let[i,a]=N(t,"=");void 0===i&&(i=t),a=void 0===a?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:B(a,e),n(B(i,e),a,r)}for(const[t,n]of Object.entries(r))if("object"==typeof n&&null!==n)for(const[t,r]of Object.entries(n))n[t]=x(r,e);else r[t]=x(n,e);return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce(((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=W(n):t[e]=n,t}),Object.create(null))}function z(t,e){if(!t)return"";M((e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e}).arrayFormatSeparator);const n=n=>e.skipNull&&R(t[n])||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[D(e,t),"[",o,"]"].join("")]:[...n,[D(e,t),"[",D(o,t),"]=",D(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[D(e,t),"[]"].join("")]:[...n,[D(e,t),"[]=",D(r,t)].join("")];case"colon-list-separator":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[D(e,t),":list="].join("")]:[...n,[D(e,t),":list=",D(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return n=>(r,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&""===o?r:(o=null===o?"":o,0===r.length?[[D(n,t),e,D(o,t)].join("")]:[[r,D(o,t)].join(t.arrayFormatSeparator)])}default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,D(e,t)]:[...n,[D(e,t),"=",D(r,t)].join("")]}}(e),o={};for(const[e,r]of Object.entries(t))n(e)||(o[e]=r);const i=Object.keys(o);return!1!==e.sort&&i.sort(e.sort),i.map((n=>{const o=t[n];return void 0===o?"":null===o?D(n,e):Array.isArray(o)?0===o.length&&"bracket-separator"===e.arrayFormat?D(n,e)+"[]":o.reduce(r(n),[]).join("&"):D(n,e)+"="+D(o,e)})).filter((t=>t.length>0)).join("&")}function $(t,e){e={decode:!0,...e};let[n,r]=N(t,"#");return void 0===n&&(n=t),{url:n?.split("?")?.[0]??"",query:U(L(t),e),...e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:B(r,e)}:{}}}function H(t,e){e={encode:!0,strict:!0,[C]:!0,...e};const n=F(t.url).split("?")[0]||"";let r=z({...U(L(t.url),{sort:!1}),...t.query},e);r&&(r=`?${r}`);let o=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);if(t.fragmentIdentifier){const r=new URL(n);r.hash=t.fragmentIdentifier,o=e[C]?r.hash:`#${t.fragmentIdentifier}`}return`${n}${r}${o}`}function G(t,e,n){n={parseFragmentIdentifier:!0,[C]:!1,...n};const{url:r,query:o,fragmentIdentifier:i}=$(t,n);return H({url:r,query:A(o,e),fragmentIdentifier:i},n)}function q(t,e,n){return G(t,Array.isArray(e)?t=>!e.includes(t):(t,n)=>!e(t,n),n)}const Y=n;function V(t){return V="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},V(t)}function K(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return J(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nr.status?e(t):n(t)},r.onerror=function(){n({status:"error",data:{code:r.status,error:r.statusText||"unknown"}})};var o=t.endpoint;"GET"===t.method&&(o+="?".concat(Y.stringify(t.parameters))),r.open(t.method,o,!0),r.overrideMimeType("application/json"),r.setRequestHeader("Accept","application/json");var i,a=K(t.headers);try{for(a.s();!(i=a.n()).done;){var u=i.value;r.setRequestHeader(u.name,u.value)}}catch(t){a.e(t)}finally{a.f()}r.send("POST"===t.method?JSON.stringify(t.parameters):null)}}])&&X(e.prototype,n),r&&X(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(S);function nt(t){return nt="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},nt(t)}function rt(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),dt(this,St,{writable:!0,value:void 0}),dt(this,Et,{writable:!0,value:void 0}),dt(this,Tt,{writable:!0,value:void 0}),dt(this,kt,{writable:!0,value:void 0}),dt(this,jt,{writable:!0,value:void 0}),dt(this,Ot,{writable:!0,value:void 0}),dt(this,Pt,{writable:!0,value:function(t){var e,n,r=Object.assign({},t);for(e in r)for(n in r[e])r[e][n]=r[e][n].value;return r}}),wt(this,St,e),wt(this,Et,n),wt(this,Tt,r),wt(this,kt,{}),wt(this,jt,o),wt(this,Ot,i)}var e,n,r;return e=t,n=[{key:"addPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=ht(this,kt);if(t in n)throw new Error('Position "'+t+'" already exists.');n[t]={},this.addPositionResources(t,ht(this,jt)),this.addPositionResources(t,e)}},{key:"addPositionResources",value:function(t,e){for(var n in e)this.addPositionResource(t,e[n])}},{key:"addPositionResource",value:function(t,e){if(!(e instanceof yt))throw new TypeError("Argument resource must be instance of Resource class.");var n=ht(this,kt);if(!(t in n))throw new Error('Missing position "'+t+'".');var r=n[t];e.name in r?r[e.name]=r[e.name].withValues(e.value):r[e.name]=e}},{key:"method",get:function(){return ht(this,St)}},{key:"endpoint",get:function(){return ht(this,Et)}},{key:"locale",get:function(){return ht(this,Tt)}},{key:"parameters",get:function(){var t=ht(this,Pt).call(this,ht(this,kt)),e={query:"GET"===this.method?JSON.stringify(t):t};return null!==this.locale&&(e.locale=this.locale),e}},{key:"headers",get:function(){return ht(this,Ot)}}],n&&vt(e.prototype,n),r&&vt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function At(t){return At="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},At(t)}function _t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ht(this,Kt);for(var o in e){var i=new yt(o,e[o]);i.name in r?r[i.name]=r[i.name].withValues(i.value):r[i.name]=i}var a={};for(var u in r)a[u]=r[u].value;a=JSON.stringify(a);var c=JSON.stringify(n),l={};"{}"!==a&&(l.resources=a),"{}"!==c&&(l.options=c),null!==Ht(this,Vt)&&(l.locale=Ht(this,Vt));var s=Y.stringify(l);return"".concat(Ht(this,Yt),"/").concat(encodeURIComponent(t)).concat(""!==s?"?"+s:"")}}],n&&zt(e.prototype,n),r&&zt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Xt(t){return Xt="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},Xt(t)}function Qt(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:void 0;return this.options[t]||e}}],n&&ue(e.prototype,n),r&&ue(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function le(t){return le="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},le(t)}function se(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";if(-1===this.STATE.STATES.indexOf(t))throw new TypeError("".concat(t," is not valid state."));ye(this,he,t),ye(this,we,e.toString()),pe(this,ge)[t]=(pe(this,ge)[t]||0)+1,this._eventBus.dispatch(ne.ON_BANNER_STATE_CHANGED,this)}},{key:"getCurrenBreakpoint",value:function(t){return null}},{key:"isManaged",value:function(){return!1}},{key:"isExternal",value:function(){return!1}},{key:"isEmbed",value:function(){return!1}}],n&&se(e.prototype,n),r&&se(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ee(t){return Ee="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},Ee(t)}function Te(t,e){for(var n=0;n=c&&(null===a||ac))&&(i=n,a=c,Re(t,Fe)[r]=c)):o=n})),null===i&&null===o)throw new Error("Missing content for banner with ID ".concat(this.id));u.sort((function(t,e){return t-e})),"min"===r?u.unshift(null):u.push(null);var c=u.indexOf(a);return"max"===r&&c-1 in u&&(Re(this,Fe).min=u[c-1]),"min"===r&&c+1 in u&&(Re(this,Fe).max=u[c+1]),Ie(this,We,null!==i?i:o)}},{key:"needRedraw",value:function(){if(null===Re(this,We))return!0;var t=_e(this,xe,ze).call(this);return null!==Re(this,Fe).min&&tRe(this,Fe).max}}])&&Oe(e.prototype,n),r&&Oe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ze(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}function $e(t,e){for(var n in t)e(t[n],n)}function He(t){return He="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},He(t)}function Ge(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"weight",n={},r=0,o=0;o0;)u-=n[a],a++;return t[--a]?t[a]:t[0]}}],(n=null)&&Ze(e.prototype,n),r&&Ze(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function en(t){return en="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},en(t)}function nn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return rn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n4&&void 0!==arguments[4]?arguments[4]:[],c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),sn(cn(a=o.call(this,t,e,n,r,c)),bn,{writable:!0,value:void 0}),sn(cn(a),mn,{writable:!0,value:!1}),sn(cn(a),vn,{writable:!0,value:null}),sn(cn(a),dn,{writable:!0,value:[]}),pn(cn(a),bn,u),a}return e=i,(n=[{key:"html",set:function(t){this.element.innerHTML=t}},{key:"resources",get:function(){return fn(this,bn)}},{key:"data",get:function(){return console.warn("Usage of deprecated property `ManagedBanner.data`. Please use property `positionData` for accessing information about a position."),new Xe(this)}},{key:"fingerprints",get:function(){var t;try{t=this.bannerData}catch(t){return[]}return this.positionData.isMultiple()||(t=[t]),t.map((function(t){return t.fingerprint}))}},{key:"bannerData",get:function(){if(null!==fn(this,vn))return fn(this,vn);if(!fn(this,dn).length)throw new Error("Banner's data is empty.");var t=null,e=this.positionData,n=function(t){return ke.createFromProperties({bannerId:t.id,bannerName:t.name,positionId:e.id,positionCode:e.code,positionName:e.name,campaignId:t.campaignId,campaignCode:t.campaignCode,campaignName:t.campaignName})};switch(!0){case e.isSingle():(t=fn(this,dn).reduce((function(t,e){return t.score>=e.score?t:e}))).fingerprint=n(t);break;case e.isRandom():(t=tn.randomByWeights(fn(this,dn),"score")).fingerprint=n(t);break;case e.isMultiple():var r,o=nn(t=fn(this,dn).sort((function(t,e){return e.score-t.score})));try{for(o.s();!(r=o.n()).done;){var i=r.value;i.fingerprint=n(i)}}catch(t){o.e(t)}finally{o.f()}break;default:throw new Error("Invalid display type ".concat(this.displayType,"."))}if(null===t)throw new Error("Banner's data is empty.");return pn(this,vn,t),t}},{key:"getCurrenBreakpoint",value:function(t){var e=this.bannerData,n=(e=(Array.isArray(e)?e:[e]).find((function(e){return e.id===t})))&&e.content?e.content.breakpoint:null;return null===n?null:parseInt(n)}},{key:"isManaged",value:function(){return!0}},{key:"setResponseData",value:function(t){if(fn(this,mn))throw new Error("Data for banner on position ".concat(this.position," is already set."));this._positionData=new ie({id:t.position_id||null,code:this._positionData.code,name:t.position_name||null,rotationSeconds:t.rotation_seconds,displayType:t.display_type,breakpointType:t.breakpoint_type});var e=[];for(var n in t.banners||[])e.push(new Ue(t.banners[n],t.breakpoint_type));pn(this,dn,e),pn(this,mn,!0)}},{key:"needRedraw",value:function(){var t=this.bannerData;for(var e in Array.isArray(t)||(t=[t]),t)if(t[e].needRedraw())return!0;return!1}}])&&on(e.prototype,n),r&&on(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(Se);function wn(t){return wn="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},wn(t)}function gn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Sn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Sn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function On(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Yn(this,Jn,{writable:!0,value:void 0}),Vn(this,Jn,e-1)}var e,n,r;return e=t,(n=[{key:"getNextIdentifier",value:function(){var t,e;return Vn(this,Jn,(t=function(t,e){return e.get?e.get.call(t):e.value}(e=this,Kn(e,Jn,"get")),++t))}}])&&qn(e.prototype,n),r&&qn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qn(t){return Qn="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},Qn(t)}function Zn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return tr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=[];for(n in(t=ir(this,fr,yr).call(this,t)).setAttribute("data-amp-attached",""),r)i.push(new yt(n,r[n]));var a=new hn(or(this,cr),or(this,lr).getNextIdentifier(),t,e,i,o);return or(this,sr).push(a),a}},{key:"addEmbedBanner",value:function(t,e,n){(t=ir(this,fr,yr).call(this,t)).setAttribute("data-amp-attached","");var r=new Hn(or(this,cr),or(this,lr).getNextIdentifier(),t,e,n);return or(this,sr).push(r),r}},{key:"getBannersByState",value:function(t){var e=t.state,n=t.managed,r=void 0===n||n,o=t.external,i=void 0===o||o,a=t.embed,u=void 0===a||a;return or(this,sr).filter((function(t){return t instanceof Se&&t.state===e&&!(t instanceof hn&&!r||t instanceof Fn&&!i||t instanceof Hn&&!u)}))}},{key:"getBannerByFingerprint",value:function(t){var e,n=t instanceof ke?t.value:t,r=Zn(or(this,sr));try{for(r.s();!(e=r.n()).done;){var o=e.value;if(!(o in Hn)){var i,a=Zn(o.fingerprints);try{for(a.s();!(i=a.n()).done;)if(i.value.value===n)return o}catch(t){a.e(t)}finally{a.f()}}}}catch(t){r.e(t)}finally{r.f()}return null}},{key:"getBannerByUid",value:function(t){var e,n=Zn(or(this,sr));try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.uid===t)return r}}catch(t){n.e(t)}finally{n.f()}return null}}],n&&er(e.prototype,n),r&&er(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yr(t){if(t instanceof HTMLElement)return t;if("string"!=typeof t)throw new TypeError("Element must be instance of HTMLElement or String");var e;if(!((e="#"===t.charAt(0)?document.getElementById(t.slice(1)):document.querySelector(t))instanceof HTMLElement))throw new TypeError("Selector "+t+" is invalid.");return e}function br(t){return br="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},br(t)}function mr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return vr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function vr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("function"!=typeof e)throw new TypeError("Listener must be of type function.");var i="idx_"+wr(this,Er).getNextIdentifier();return wr(this,Tr)[t]=wr(this,Tr)[t]||{},wr(this,Tr)[t][i]={callback:e,scope:r,priority:o},t in wr(this,kr)&&delete wr(this,kr)[t],function(){t in wr(n,Tr)&&i in wr(n,Tr)[t]&&delete wr(n,Tr)[t][i]}}},{key:"dispatch",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;re.priority?-1:t.priority=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Vr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=u.pixels)return u.ratio}}catch(t){i.e(t)}finally{i.f()}return r};return new IntersectionObserver((function(r){var o,a=[],u={},l={},s=Yr(r);try{for(s.s();!(o=s.n()).done;){var f=o.value,p=f.target.dataset.ampBannerFingerprint,y=t.getBannerByFingerprint(p);if(y){var b=n[p];if(b){var m={fingerprint:b.fingerprint,element:f.target,banner:y};if(a.push(Gr(Gr({},m),{},{entry:f})),!b.alreadySeen){var v=f.intersectionRatio>=c(f.target);u[p]=!(p in u)||!u[p].isIntersecting&&v?{fingerprintArgs:m,fingerprintMetadata:b,isIntersecting:v}:u[p]}if(!b.alreadyFullySeen){var d=1<=f.intersectionRatio;l[p]=!(p in l)||!l[p].isFullyIntersecting&&d?{fingerprintArgs:m,fingerprintMetadata:b,isFullyIntersecting:d}:l[p]}}}}}catch(t){s.e(t)}finally{s.f()}for(var h=function(){var t=g[w],n=t.fingerprintArgs,r=t.fingerprintMetadata,o=t.isIntersecting;o&&!r.alreadySeen&&null===r.firstTimeSeenTimeoutId?r.firstTimeSeenTimeoutId=setTimeout((function(){r.alreadySeen=!0,e.dispatch(ne.ON_BANNER_FIRST_TIME_SEEN,n)}),i):o||null===r.firstTimeSeenTimeoutId||(clearTimeout(r.firstTimeSeenTimeoutId),r.firstTimeSeenTimeoutId=null)},w=0,g=Object.values(u);w=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function to(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function jo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=":"<=").concat(r),{channel_code:e,banner_id:t.bannerId,banner_name:t.bannerName,position_id:t.positionId,position_code:t.positionCode,position_name:t.positionName,campaign_id:t.campaignId,campaign_code:t.campaignCode,campaign_name:t.campaignName,breakpoint:r}};n.isEventEnabled(wo.BANNER_LOADED)&&t.subscribe(ne.ON_BANNER_STATE_CHANGED,(function(t){if(!t.isEmbed()&&Zt.RENDERED===t.state&&1===t.stateCounter){var e,o=ko(t.fingerprints);try{for(o.s();!(e=o.n()).done;){var i=e.value;n.send(wo.BANNER_LOADED,r(i,t))}}catch(t){o.e(t)}finally{o.f()}}})),n.isEventEnabled(wo.BANNER_DISPLAYED)&&t.subscribe(ne.ON_BANNER_FIRST_TIME_SEEN,(function(t){var e=t.fingerprint,o=t.banner;n.send(wo.BANNER_DISPLAYED,r(e,o))})),n.isEventEnabled(wo.BANNER_FULLY_DISPLAYED)&&t.subscribe(ne.ON_BANNER_FIRST_TIME_FULLY_SEEN,(function(t){var e=t.fingerprint,o=t.banner;n.send(wo.BANNER_FULLY_DISPLAYED,r(e,o))})),n.isEventEnabled(wo.BANNER_CLICKED)&&t.subscribe(ne.ON_BANNER_LINK_CLICKED,(function(t){var e=t.fingerprint,o=t.banner,i=t.target;n.send(wo.BANNER_CLICKED,Eo(Eo({},r(e,o)),{},{link:i.href||""}))}))}}}}])&&Oo(e.prototype,n),r&&Oo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Wo=!1;const Fo=function(t,e){if(!("plausible"in window)||"function"!=typeof window.plausible)return!Wo&&console.warn("Unable to send metrics to Plausible because the function plausible() does not occur in the window."),void(Wo=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.plausible(t,{props:e})};var xo=!1;const Lo=function(t,e){if(!("gtag"in window)||"function"!=typeof window.gtag)return!xo&&console.warn("Unable to send metrics to Google Analytics because the function gtag() does not occur in the window."),void(xo=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.gtag("event",t,e)};function Uo(t){return Uo="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},Uo(t)}function zo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $o(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Uo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Uo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Uo(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ho=!1;const Go=function(t,e){if(!("dataLayer"in window))return!Ho&&console.warn("Unable to send metrics to GTM because the dataLayer does not occur in the window."),void(Ho=!0);Object.keys(e).forEach((function(t){return null===e[t]&&delete e[t]})),window.dataLayer.push(function(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Ko(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:"*";t.postMessage({message:e,data:n},r)}},{key:"listen",value:function(){var t=this;window.addEventListener("message",(function(e){if(!(0=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Hi(t,e){if(t){if("string"==typeof t)return Gi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(t,e):void 0}}function Gi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.interaction.defaultIntersectionRatio||1f||1e.interaction.firstTimeSeenTimeout)throw new Error('The option "interaction.firstTimeSeenTimeout" must be a int with a minimum value of 500, "'.concat(e.interaction.firstTimeSeenTimeout,'" passed.'));if("object"!==d(e.metrics))throw new Error('The option "metrics" must be an object of the format { receiver: null|string|function|array, disabledEvents: array }, '.concat(e.metrics," passed."));if(null!==e.metrics.receiver&&-1===["string","function"].indexOf(d(e.metrics.receiver))&&!Array.isArray(e.metrics.receiver))throw new Error('The option "metrics.receiver" must be a null or a string or a function or an array of strings|functions, "'.concat(e.metrics.receiver,'" passed.'));if(Array.isArray(e.metrics.receiver)){for(var p in e.metrics.receiver)if(-1===["string","function"].indexOf(d(e.metrics.receiver[p])))throw new Error('The option "metrics.receiver.'.concat(p,'" must be a string or a function, "').concat(e.metrics.receiver[p],'" passed.'))}else e.metrics.receiver=null!==e.metrics.receiver?[e.metrics.receiver]:[];if(!Array.isArray(e.metrics.disabledEvents))throw new Error('The option "metrics.disabledEvents" must an array of strings (event names), "'.concat(e.metrics.disabledEvents,'" passed.'));for(var v in e.metrics.disabledEvents)if("string"!=typeof e.metrics.disabledEvents[v])throw new Error('The option "metrics.disabledEvents.'.concat(v,'" must be a string, "').concat(e.metrics.disabledEvents[v],'" passed.'));return e}(n)),Xi(this,ea,new jr),Xi(this,na,new Lt(n.method,n.url,n.version,n.channel)),Xi(this,ra,new Jt(n.url,n.channel)),Xi(this,ia,new pr(Ji(this,ea))),Xi(this,aa,new zr(n.template)),Xi(this,ua,new bo(Ji(this,ia),Ji(this,ea),n.interaction)),Xi(this,ca,ri.createFromReceivers(n.metrics.receiver,n.metrics.disabledEvents)),Xi(this,la,new Bo(Ji(this,ca),Ji(this,ea),n.channel)),Xi(this,sa,new Di({origin:n.url,connectionData:{extendedConfig:{interaction:n.interaction}},bannerManager:Ji(this,ia),metricsSender:Ji(this,ca)})),this.setLocale(n.locale),Ji(this,na).origin=n.origin,n.resources)Ji(this,na).addDefaultResource(a,n.resources[a]),Ji(this,ra).addDefaultResource(a,n.resources[a]);window.addEventListener("resize",(function(){var t=Ji(i,ia).getBannersByState({state:Ji(i,ia).STATE.RENDERED,managed:!0,external:!1,embed:!1});for(var e in t)t[e].needRedraw()&&i.renderBanner(t[e])})),Ji(this,sa).listen(),Ji(this,la).attach(),Ji(this,ua).start()}var e,n,r;return e=t,n=[{key:"version",get:function(){return Ji(this,Zi)}},{key:"on",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Ji(this,ea).subscribe(t,e,n)}},{key:"setLocale",value:function(t){Ji(this,na).locale=t,Ji(this,ra).locale=t}},{key:"setGateway",value:function(t){if(!function(t){return t instanceof S}(t))throw new TypeError("Argument gateway mut be instance of AbstractGateway.");Xi(this,oa,t)}},{key:"getGateway",value:function(){return null===Ji(this,oa)&&this.setGateway(new et),Ji(this,oa)}},{key:"createBanner",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Ji(this,ia).addManagedBanner(t,e,n,r)}},{key:"attachBanners",value:function(){var t,e=$i((arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll("[data-amp-banner]:not([data-amp-attached])"));try{for(e.s();!(t=e.n()).done;){var n=t.value,r=n.dataset.ampBanner;if(r){var o=void 0;if("ampBannerExternal"in n.dataset)o=Ji(this,ia).addExternalBanner(n);else if("ampMode"in n.dataset&&"embed"===n.dataset.ampMode){var i=Ki(this,fa,ya).call(this,n,r),a=i.iframe,u=i.options;o=Ji(this,ia).addEmbedBanner(a,r,u),Ji(this,sa).connectBanner(o),n.insertAdjacentElement("afterend",a),n.remove(),n=a}else{var c=Tn.parseResources(n),l=Tn.parseOptions(n);o=this.createBanner(n,r,c,l)}Ji(this,ea).dispatch(this.EVENTS.ON_BANNER_ATTACHED,o)}else console.warn("Unable to attach a banner to the element ",n,' because the attribute "data-amp-banner" has an empty value.')}}catch(t){e.e(t)}finally{e.f()}}},{key:"fetch",value:function(){var t=this,e=Ji(this,ia).getBannersByState({state:Ji(this,ia).STATE.NEW,managed:!0,external:!1,embed:!1});if(e.length){var n,r=Ji(this,na).create(),o=$i(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.addPosition(i.position,i.resources)}}catch(t){o.e(t)}finally{o.f()}Ji(this,ea).dispatch(this.EVENTS.ON_BEFORE_FETCH),this.getGateway().fetch(r,(function(n){var r,o=n.data,i=$i(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.position in o&&"banners"in o[a.position]&&Object.values(o[a.position].banners).length?(Array.isArray(o[a.position].banners)||(o[a.position].banners=Object.values(o[a.position].banners)),a.setResponseData(o[a.position]),t.renderBanner(a)):a.setState(Ji(t,ia).STATE.NOT_FOUND,"Banner not found in fetched response.")}}catch(t){i.e(t)}finally{i.f()}Ji(t,ea).dispatch(t.EVENTS.ON_FETCH_SUCCESS,n)}),(function(n){var r,o=$i(e);try{for(o.s();!(r=o.n()).done;)r.value.setState(Ji(t,ia).STATE.ERROR,"Request on api failed.")}catch(t){o.e(t)}finally{o.f()}Ji(t,ea).dispatch(t.EVENTS.ON_FETCH_ERROR,n)}))}}},{key:"renderBanner",value:function(t){if(!(t instanceof hn))throw new TypeError("Only managed banners can be rendered.");try{t.html=Ji(this,aa).render(t)}catch(e){return void t.setState(Ji(this,ia).STATE.ERROR,"Render error: "+e.message)}t.setState(Ji(this,ia).STATE.RENDERED,"Banner was successfully rendered.")}}],n&&qi(e.prototype,n),r&&qi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ya(t,e){var n=Tn.parseOptions(t),r=document.createElement("iframe");return zi(t.attributes).map((function(t){var e=t.name,n=t.value;r.setAttribute(e,n)})),r.width="100%",r.height="100%",r.allowFullscreen=!0,r.scrolling="no",r.style.border="none",r.style.overflow="hidden",r.src=t.dataset.ampEmbedSrc||Ji(this,ra).create(e,Tn.parseResources(t),n),r.setAttribute("allowtransparency","true"),"lazy"===n.loading&&(r.loading="lazy"),{iframe:r,options:n}}function ba(t){return ba="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},ba(t)}function ma(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return new pa(t.version,e)}},{key:"version",get:function(){return new p(va,"standard@".concat(va))}}],(n=null)&&ma(e.prototype,n),r&&ma(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.i8;AMPClientFactory=e.AMPClientFactory})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 66f6405..312ed47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@68publishers/amp-client", - "version": "1.4.0-beta.2", + "version": "1.5.0-beta.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@68publishers/amp-client", - "version": "1.4.0-beta.2", + "version": "1.5.0-beta.0", "license": "ISC", "dependencies": { "lodash": "^4.17.21", diff --git a/package.json b/package.json index 810a580..55dec0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@68publishers/amp-client", - "version": "1.4.0-beta.2", + "version": "1.5.0-beta.0", "description": "JS Client for 68publishers/amp", "homepage": "http://www.68publishers.io/", "main": "index.mjs",