@68publishers/amp-client
Version:
JS Client for 68publishers/amp
1 lines • 95.3 kB
JavaScript
var AMPClientFactory;(()=>{"use strict";var e={9306:(e,t,n)=>{var r=n(4901),i=n(6823),s=TypeError;e.exports=function(e){if(r(e))return e;throw new s(i(e)+" is not a function")}},3506:(e,t,n)=>{var r=n(3925),i=String,s=TypeError;e.exports=function(e){if(r(e))return e;throw new s("Can't set "+i(e)+" as a prototype")}},679:(e,t,n)=>{var r=n(1625),i=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new i("Incorrect invocation")}},8551:(e,t,n)=>{var r=n(34),i=String,s=TypeError;e.exports=function(e){if(r(e))return e;throw new s(i(e)+" is not an object")}},9617:(e,t,n)=>{var r=n(5397),i=n(5610),s=n(6198),a=function(e){return function(t,n,a){var o=r(t),c=s(o);if(0===c)return!e&&-1;var l,u=i(a,c);if(e&&n!=n){for(;c>u;)if((l=o[u++])!=l)return!0}else for(;c>u;u++)if((e||u in o)&&o[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},4527:(e,t,n)=>{var r=n(3724),i=n(4376),s=TypeError,a=Object.getOwnPropertyDescriptor,o=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(i(e)&&!a(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},2195:(e,t,n)=>{var r=n(9504),i=r({}.toString),s=r("".slice);e.exports=function(e){return s(i(e),8,-1)}},6955:(e,t,n)=>{var r=n(2140),i=n(4901),s=n(2195),a=n(8227)("toStringTag"),o=Object,c="Arguments"===s(function(){return arguments}());e.exports=r?s:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=o(e),a))?n:c?s(t):"Object"===(r=s(t))&&i(t.callee)?"Arguments":r}},7740:(e,t,n)=>{var r=n(9297),i=n(5031),s=n(7347),a=n(4913);e.exports=function(e,t,n){for(var o=i(t),c=a.f,l=s.f,u=0;u<o.length;u++){var d=o[u];r(e,d)||n&&r(n,d)||c(e,d,l(t,d))}}},6699:(e,t,n)=>{var r=n(3724),i=n(4913),s=n(6980);e.exports=r?function(e,t,n){return i.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},6980:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6840:(e,t,n)=>{var r=n(4901),i=n(4913),s=n(283),a=n(9433);e.exports=function(e,t,n,o){o||(o={});var c=o.enumerable,l=void 0!==o.name?o.name:t;if(r(n)&&s(n,l,o),o.global)c?e[t]=n:a(t,n);else{try{o.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},9433:(e,t,n)=>{var r=n(4576),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},4606:(e,t,n)=>{var r=n(6823),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+r(t)+" of "+r(e))}},3724:(e,t,n)=>{var r=n(9039);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(e,t,n)=>{var r=n(4576),i=n(34),s=r.document,a=i(s)&&i(s.createElement);e.exports=function(e){return a?s.createElement(e):{}}},6837:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},5002:e=>{e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},8727:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2839:(e,t,n)=>{var r=n(4576).navigator,i=r&&r.userAgent;e.exports=i?String(i):""},9519:(e,t,n)=>{var r,i,s=n(4576),a=n(2839),o=s.process,c=s.Deno,l=o&&o.versions||c&&c.version,u=l&&l.v8;u&&(i=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},6193:(e,t,n)=>{var r=n(9504),i=Error,s=r("".replace),a=String(new i("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,c=o.test(a);e.exports=function(e,t){if(c&&"string"==typeof e&&!i.prepareStackTrace)for(;t--;)e=s(e,o,"");return e}},6518:(e,t,n)=>{var r=n(4576),i=n(7347).f,s=n(6699),a=n(6840),o=n(9433),c=n(7740),l=n(2796);e.exports=function(e,t){var n,u,d,h,p,f=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[f]||o(f,{}):r[f]&&r[f].prototype)for(u in t){if(h=t[u],d=e.dontCallGetSet?(p=i(n,u))&&p.value:n[u],!l(m?u:f+(g?".":"#")+u,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;c(h,d)}(e.sham||d&&d.sham)&&s(h,"sham",!0),a(n,u,h,e)}}},9039:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},616:(e,t,n)=>{var r=n(9039);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},9565:(e,t,n)=>{var r=n(616),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},350:(e,t,n)=>{var r=n(3724),i=n(9297),s=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,o=i(s,"name"),c=o&&"something"===function(){}.name,l=o&&(!r||r&&a(s,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:l}},6706:(e,t,n)=>{var r=n(9504),i=n(9306);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},9504:(e,t,n)=>{var r=n(616),i=Function.prototype,s=i.call,a=r&&i.bind.bind(s,s);e.exports=r?a:function(e){return function(){return s.apply(e,arguments)}}},7751:(e,t,n)=>{var r=n(4576),i=n(4901);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},5966:(e,t,n)=>{var r=n(9306),i=n(4117);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},4576:function(e,t,n){var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(e,t,n)=>{var r=n(9504),i=n(8981),s=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(i(e),t)}},421:e=>{e.exports={}},5917:(e,t,n)=>{var r=n(3724),i=n(9039),s=n(4055);e.exports=!r&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},7055:(e,t,n)=>{var r=n(9504),i=n(9039),s=n(2195),a=Object,o=r("".split);e.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===s(e)?o(e,""):a(e)}:a},3167:(e,t,n)=>{var r=n(4901),i=n(34),s=n(2967);e.exports=function(e,t,n){var a,o;return s&&r(a=t.constructor)&&a!==n&&i(o=a.prototype)&&o!==n.prototype&&s(e,o),e}},3706:(e,t,n)=>{var r=n(9504),i=n(4901),s=n(7629),a=r(Function.toString);i(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),e.exports=s.inspectSource},1181:(e,t,n)=>{var r,i,s,a=n(8622),o=n(4576),c=n(34),l=n(6699),u=n(9297),d=n(7629),h=n(6119),p=n(421),f="Object already initialized",m=o.TypeError,g=o.WeakMap;if(a||d.state){var b=d.state||(d.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw new m(f);return t.facade=e,b.set(e,t),t},i=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var y=h("state");p[y]=!0,r=function(e,t){if(u(e,y))throw new m(f);return t.facade=e,l(e,y,t),t},i=function(e){return u(e,y)?e[y]:{}},s=function(e){return u(e,y)}}e.exports={set:r,get:i,has:s,enforce:function(e){return s(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new m("Incompatible receiver, "+e+" required");return n}}}},4376:(e,t,n)=>{var r=n(2195);e.exports=Array.isArray||function(e){return"Array"===r(e)}},4901:e=>{var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2796:(e,t,n)=>{var r=n(9039),i=n(4901),s=/#|\.prototype\./,a=function(e,t){var n=c[o(e)];return n===u||n!==l&&(i(t)?r(t):!!t)},o=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},4117:e=>{e.exports=function(e){return null==e}},34:(e,t,n)=>{var r=n(4901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},3925:(e,t,n)=>{var r=n(34);e.exports=function(e){return r(e)||null===e}},6395:e=>{e.exports=!1},757:(e,t,n)=>{var r=n(7751),i=n(4901),s=n(1625),a=n(7040),o=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&s(t.prototype,o(e))}},6198:(e,t,n)=>{var r=n(8014);e.exports=function(e){return r(e.length)}},283:(e,t,n)=>{var r=n(9504),i=n(9039),s=n(4901),a=n(9297),o=n(3724),c=n(350).CONFIGURABLE,l=n(3706),u=n(1181),d=u.enforce,h=u.get,p=String,f=Object.defineProperty,m=r("".slice),g=r("".replace),b=r([].join),y=o&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),v=String(String).split("String"),E=e.exports=function(e,t,n){"Symbol("===m(p(t),0,7)&&(t="["+g(p(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(o?f(e,"name",{value:t,configurable:!0}):e.name=t),y&&n&&a(n,"arity")&&e.length!==n.arity&&f(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?o&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=d(e);return a(r,"source")||(r.source=b(v,"string"==typeof t?t:"")),e};Function.prototype.toString=E((function(){return s(this)&&h(this).source||l(this)}),"toString")},741:e=>{var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},2603:(e,t,n)=>{var r=n(655);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},4913:(e,t,n)=>{var r=n(3724),i=n(5917),s=n(8686),a=n(8551),o=n(6969),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",p="writable";t.f=r?s?function(e,t,n){if(a(e),t=o(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:d in n?n[d]:r[d],writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(a(e),t=o(t),a(n),i)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7347:(e,t,n)=>{var r=n(3724),i=n(9565),s=n(8773),a=n(6980),o=n(5397),c=n(6969),l=n(9297),u=n(5917),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=o(e),t=c(t),u)try{return d(e,t)}catch(e){}if(l(e,t))return a(!i(s.f,e,t),e[t])}},8480:(e,t,n)=>{var r=n(1828),i=n(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},3717:(e,t)=>{t.f=Object.getOwnPropertySymbols},1625:(e,t,n)=>{var r=n(9504);e.exports=r({}.isPrototypeOf)},1828:(e,t,n)=>{var r=n(9504),i=n(9297),s=n(5397),a=n(9617).indexOf,o=n(421),c=r([].push);e.exports=function(e,t){var n,r=s(e),l=0,u=[];for(n in r)!i(o,n)&&i(r,n)&&c(u,n);for(;t.length>l;)i(r,n=t[l++])&&(~a(u,n)||c(u,n));return u}},8773:(e,t)=>{var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},2967:(e,t,n)=>{var r=n(6706),i=n(34),s=n(7750),a=n(3506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return s(n),a(r),i(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},4270:(e,t,n)=>{var r=n(9565),i=n(4901),s=n(34),a=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&i(n=e.toString)&&!s(o=r(n,e)))return o;if(i(n=e.valueOf)&&!s(o=r(n,e)))return o;if("string"!==t&&i(n=e.toString)&&!s(o=r(n,e)))return o;throw new a("Can't convert object to primitive value")}},5031:(e,t,n)=>{var r=n(7751),i=n(9504),s=n(8480),a=n(3717),o=n(8551),c=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=s.f(o(e)),n=a.f;return n?c(t,n(e)):t}},7750:(e,t,n)=>{var r=n(4117),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},6119:(e,t,n)=>{var r=n(5745),i=n(3392),s=r("keys");e.exports=function(e){return s[e]||(s[e]=i(e))}},7629:(e,t,n)=>{var r=n(6395),i=n(4576),s=n(9433),a="__core-js_shared__",o=e.exports=i[a]||s(a,{});(o.versions||(o.versions=[])).push({version:"3.40.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(e,t,n)=>{var r=n(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},4495:(e,t,n)=>{var r=n(9519),i=n(9039),s=n(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},5610:(e,t,n)=>{var r=n(1291),i=Math.max,s=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):s(n,t)}},5397:(e,t,n)=>{var r=n(7055),i=n(7750);e.exports=function(e){return r(i(e))}},1291:(e,t,n)=>{var r=n(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},8014:(e,t,n)=>{var r=n(1291),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},8981:(e,t,n)=>{var r=n(7750),i=Object;e.exports=function(e){return i(r(e))}},2777:(e,t,n)=>{var r=n(9565),i=n(34),s=n(757),a=n(5966),o=n(4270),c=n(8227),l=TypeError,u=c("toPrimitive");e.exports=function(e,t){if(!i(e)||s(e))return e;var n,c=a(e,u);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!i(n)||s(n))return n;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},6969:(e,t,n)=>{var r=n(2777),i=n(757);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},2140:(e,t,n)=>{var r={};r[n(8227)("toStringTag")]="z",e.exports="[object z]"===String(r)},655:(e,t,n)=>{var r=n(6955),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},6823:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},3392:(e,t,n)=>{var r=n(9504),i=0,s=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+s,36)}},7040:(e,t,n)=>{var r=n(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(e,t,n)=>{var r=n(3724),i=n(9039);e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8622:(e,t,n)=>{var r=n(4576),i=n(4901),s=r.WeakMap;e.exports=i(s)&&/native code/.test(String(s))},8227:(e,t,n)=>{var r=n(4576),i=n(5745),s=n(9297),a=n(3392),o=n(4495),c=n(7040),l=r.Symbol,u=i("wks"),d=c?l.for||l:l&&l.withoutSetter||a;e.exports=function(e){return s(u,e)||(u[e]=o&&s(l,e)?l[e]:d("Symbol."+e)),u[e]}},4114:(e,t,n)=>{var r=n(6518),i=n(8981),s=n(6198),a=n(4527),o=n(6837);r({target:"Array",proto:!0,arity:1,forced:n(9039)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=i(this),n=s(t),r=arguments.length;o(n+r);for(var c=0;c<r;c++)t[n]=arguments[c],n++;return a(t,n),n}})},3609:(e,t,n)=>{var r=n(6518),i=n(8981),s=n(6198),a=n(4527),o=n(4606),c=n(6837);r({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=i(this),n=s(t),r=arguments.length;if(r){c(n+r);for(var l=n;l--;){var u=l+r;l in t?t[u]=t[l]:o(t,u)}for(var d=0;d<r;d++)t[d]=arguments[d]}return a(t,n+r)}})},4979:(e,t,n)=>{var r=n(6518),i=n(4576),s=n(7751),a=n(6980),o=n(4913).f,c=n(9297),l=n(679),u=n(3167),d=n(2603),h=n(5002),p=n(6193),f=n(3724),m=n(6395),g="DOMException",b=s("Error"),y=s(g),v=function(){l(this,E);var e=arguments.length,t=d(e<1?void 0:arguments[0]),n=d(e<2?void 0:arguments[1],"Error"),r=new y(t,n),i=new b(t);return i.name=g,o(r,"stack",a(1,p(i.stack,1))),u(r,this,v),r},E=v.prototype=y.prototype,w="stack"in new b(g),N="stack"in new y(1,2),T=y&&f&&Object.getOwnPropertyDescriptor(i,g),S=!(!T||T.writable&&T.configurable),R=w&&!S&&!N;r({global:!0,constructor:!0,forced:m||R},{DOMException:R?v:y});var _=s(g),A=_.prototype;if(A.constructor!==_)for(var B in m||o(A,"constructor",a(1,_)),h)if(c(h,B)){var x=h[B],I=x.s;c(_,I)||o(_,I,a(6,x.c))}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.d(r,{default:()=>$e});var i={};n.r(i),n.d(i,{exclude:()=>M,extract:()=>B,parse:()=>x,parseUrl:()=>O,pick:()=>D,stringify:()=>I,stringifyUrl:()=>C});class s{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get semver(){return this.#e}get full(){return this.#t}}n(4114);const a=_.merge,o={single:'\n <% if(null !== data.content && \'noContent\' !== data.content.type) { %>\n <div class="amp-banner amp-banner--single"\n data-amp-banner-fingerprint="<%= data.fingerprint %>">\n \n <% if(\'img\' === data.content.type) { %>\n <a class="amp-banner__content amp-banner__content--img"\n href="<%= data.content.href %>"\n <% if(null !== data.content.target) { %>target="<%- data.content.target %>"<% } %>>\n <picture>\n <% (data.content.sources || []).forEach(function(source) { %>\n <source type="<%= source.type %>"\n srcset="<%= source.srcset %>"\n sizes="<%- data.content.sizes %>">\n <% }); %>\n <img srcset="<%= data.content.srcset %>"\n src="<%= data.content.src %>"\n sizes="<%- data.content.sizes %>"\n alt="<%- data.content.alt %>"\n <% if(null !== data.content.dimensions.width) { %>width="<%- data.content.dimensions.width %>"<% } %>\n <% if(null !== data.content.dimensions.height) { %>height="<%- data.content.dimensions.height %>"<% } %>\n <% if(\'\' !== data.content.title) { %>title="<%- data.content.title %>"<% } %>\n <% var loading; if(loading = banner.options.evaluate(\'loading\', 0)) { %>loading="<%- loading %>"<% } %>\n <% var fetchPriority; if(fetchPriority = banner.options.evaluate(\'fetchpriority\', 0)) { %>fetchpriority="<%- fetchPriority %>"<% } %>>\n </picture>\n </a>\n <% } else if (\'html\' === data.content.type) { %>\n <div class="amp-banner__content amp-banner__content--html">\n <%= data.content.html %>\n </div>\n <% } %>\n \n </div>\n <% } %>\n',random:'\n <% if(null !== data.content && \'noContent\' !== data.content.type) { %>\n <div class="amp-banner amp-banner--random"\n data-amp-banner-fingerprint="<%= data.fingerprint %>">\n \n <% if(\'img\' === data.content.type) { %>\n <a class="amp-banner__content amp-banner__content--img"\n href="<%= data.content.href %>"\n <% if(null !== data.content.target) { %>target="<%- data.content.target %>"<% } %>>\n <picture>\n <% (data.content.sources || []).forEach(function(source) { %>\n <source type="<%= source.type %>"\n srcset="<%= source.srcset %>"\n sizes="<%- data.content.sizes %>">\n <% }); %>\n <img srcset="<%= data.content.srcset %>"\n src="<%= data.content.src %>"\n sizes="<%- data.content.sizes %>"\n alt="<%- data.content.alt %>"\n <% if(null !== data.content.dimensions.width) { %>width="<%- data.content.dimensions.width %>"<% } %>\n <% if(null !== data.content.dimensions.height) { %>height="<%- data.content.dimensions.height %>"<% } %>\n <% if(\'\' !== data.content.title) { %>title="<%- data.content.title %>"<% } %>\n <% var loading; if(loading = banner.options.evaluate(\'loading\', 0)) { %>loading="<%- loading %>"<% } %>\n <% var fetchPriority; if(fetchPriority = banner.options.evaluate(\'fetchpriority\', 0)) { %>fetchpriority="<%- fetchPriority %>"<% } %>>\n </picture>\n </a>\n <% } else if (\'html\' === data.content.type) { %>\n <div class="amp-banner__content amp-banner__content--html">\n <%= data.content.html %>\n </div>\n <% } %>\n \n </div>\n <% } %>\n',multiple:'\n <% data = data.filter(d => \'noContent\' !== d.content.type); if(data.length) { %>\n <div class="amp-banner amp-banner--multiple">\n <div class="amp-banner__list">\n <% for (index in data) { var b = data[index]; %>\n <div class="amp-banner__item"\n data-amp-banner-fingerprint="<%= b.fingerprint %>">\n \n <% if(\'img\' === b.content.type) { %>\n <a class="amp-banner__content amp-banner__content--img"\n href="<%= b.content.href %>"\n <% if(null !== b.content.target) { %>target="<%- b.content.target %>"<% } %>>\n <picture>\n <% (b.content.sources || []).forEach(function(source) { %>\n <source type="<%= source.type %>"\n srcset="<%= source.srcset %>"\n sizes="<%- b.content.sizes %>">\n <% }); %>\n <img srcset="<%= b.content.srcset %>"\n src="<%= b.content.src %>"\n sizes="<%- b.content.sizes %>"\n alt="<%- b.content.alt %>"\n <% if(null !== b.content.dimensions.width) { %>width="<%- b.content.dimensions.width %>"<% } %>\n <% if(null !== b.content.dimensions.height) { %>height="<%- b.content.dimensions.height %>"<% } %>\n <% if(\'\' !== b.content.title) { %>title="<%- b.content.title %>"<% } %>\n <% var loading; if(loading = banner.options.evaluate(\'loading\', index)) { %>loading="<%- loading %>"<% } %>\n <% var fetchPriority; if(fetchPriority = banner.options.evaluate(\'fetchpriority\', index)) { %>fetchpriority="<%- fetchPriority %>"<% } %>>\n </picture>\n </a>\n <% } else if (\'html\' === b.content.type) { %>\n <div class="amp-banner__content amp-banner__content--html">\n <%= b.content.html %>\n </div>\n <% } %>\n \n </div>\n <% } %>\n </div>\n </div>\n <% } %>\n'},c=(e,t)=>{const n=Math.round(10*e)/10;return n!==e&&console.warn(`The value for the option "${t}" has been rounded to ${n} (originally ${e}).`),n};class l{constructor(){if(this.constructor===l)throw new TypeError("Can not construct abstract class AbstractGateway.");if(this.fetch===l.prototype.fetch)throw new TypeError("Please implement abstract method ::fetch().")}fetch(e,t){throw new TypeError("Do not call abstract method ::fetch() from child.")}}const u="%[a-f0-9]{2}",d=new RegExp("("+u+")|([^%]+?)","gi"),h=new RegExp("("+u+")+","gi");function p(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],p(n),p(r))}function f(e){try{return decodeURIComponent(e)}catch{let t=e.match(d)||[];for(let n=1;n<t.length;n++)t=(e=p(t,n).join("")).match(d)||[];return e}}function m(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return function(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=h.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch{const e=f(n[0]);e!==n[0]&&(t[n[0]]=e)}n=h.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const n of r)e=e.replace(new RegExp(n,"g"),t[n]);return e}(e)}}function g(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}function b(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);t?.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){t(r,e[r],e)&&Object.defineProperty(n,r,i)}}return n}const y=e=>null==e,v=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),E=Symbol("encodeFragmentIdentifier");function w(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function N(e,t){return t.encode?t.strict?v(e):encodeURIComponent(e):e}function T(e,t){return t.decode?m(e):e}function S(e){return Array.isArray(e)?e.sort():"object"==typeof e?S(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function R(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function A(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function B(e){const t=(e=R(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function x(e,t){w((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t}).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),s="string"==typeof n&&!i&&T(n,e).includes(e.arrayFormatSeparator);n=s?T(n,e):n;const a=i||s?n.split(e.arrayFormatSeparator).map((t=>T(t,e))):null===n?n:T(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i)return void(r[t]=n?T(n,e):n);const s=null===n?[]:n.split(e.arrayFormatSeparator).map((t=>T(t,e)));void 0!==r[t]?r[t]=[...r[t],...s]:r[t]=s};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;const e=t.decode?i.replace(/\+/g," "):i;let[s,a]=g(e,"=");void 0===s&&(s=e),a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:T(a,t),n(T(s,t),a,r)}for(const[e,n]of Object.entries(r))if("object"==typeof n&&null!==n)for(const[e,r]of Object.entries(n))n[e]=A(r,t);else r[e]=A(n,t);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=S(n):e[t]=n,e}),Object.create(null))}function I(e,t){if(!e)return"";w((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);const n=n=>t.skipNull&&y(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[N(t,e),"[",i,"]"].join("")]:[...n,[N(t,e),"[",N(i,e),"]=",N(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[N(t,e),"[]"].join("")]:[...n,[N(t,e),"[]=",N(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[N(t,e),":list="].join("")]:[...n,[N(t,e),":list=",N(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[N(n,e),t,N(i,e)].join("")]:[[r,N(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,N(t,e)]:[...n,[N(t,e),"=",N(r,e)].join("")]}}(t),i={};for(const[t,r]of Object.entries(e))n(t)||(i[t]=r);const s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map((n=>{const i=e[n];return void 0===i?"":null===i?N(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?N(n,t)+"[]":i.reduce(r(n),[]).join("&"):N(n,t)+"="+N(i,t)})).filter((e=>e.length>0)).join("&")}function O(e,t){t={decode:!0,...t};let[n,r]=g(e,"#");return void 0===n&&(n=e),{url:n?.split("?")?.[0]??"",query:x(B(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:T(r,t)}:{}}}function C(e,t){t={encode:!0,strict:!0,[E]:!0,...t};const n=R(e.url).split("?")[0]||"";let r=I({...x(B(e.url),{sort:!1}),...e.query},t);r&&(r=`?${r}`);let i=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if(e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,i=t[E]?r.hash:`#${e.fragmentIdentifier}`}return`${n}${r}${i}`}function D(e,t,n){n={parseFragmentIdentifier:!0,[E]:!1,...n};const{url:r,query:i,fragmentIdentifier:s}=O(e,n);return C({url:r,query:b(i,t),fragmentIdentifier:s},n)}function M(e,t,n){return D(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const k=i;class L extends l{fetch(e,t,n){const r=new XMLHttpRequest;r.onreadystatechange=()=>{if(XMLHttpRequest.DONE!==r.readyState||0===r.status)return!1;const e=JSON.parse(r.responseText);200<=r.status&&300>r.status?t(e):n(e)},r.onerror=()=>{n({status:"error",data:{code:r.status,error:r.statusText||"unknown"}})};let i=e.endpoint;"GET"===e.method&&(i+=`?${k.stringify(e.parameters)}`),r.open(e.method,i,!0),r.overrideMimeType("application/json"),r.setRequestHeader("Accept","application/json");for(let t of e.headers)r.setRequestHeader(t.name,t.value);r.send("POST"===e.method?JSON.stringify(e.parameters):null)}}class F extends l{#n;constructor(e){super(),this.#n=e}fetch(e,t,n){const r=2>e.version?e=>{const{status:n,data:r,settings:i}=e;t({status:n,positions:r,settings:i||{},response:e})}:e=>{const{status:n,data:r}=e;t({status:n,positions:r.positions||{},settings:r.settings||{},response:e})};this.#n.fetch(e,r,n)}}class P{#r;#i;constructor(e,t){this.#r=e,this.#i=this.#s(t)}get name(){return this.#r}get value(){return this.#i}withValues(e){return new P(this.name,this.#s(e).concat(this.value).filter(((e,t,n)=>n.indexOf(e)===t)))}#s(e){return Array.isArray(e)?e:[e]}}class j{#a;#o;#c;#l;#u;#d;#h;constructor(e){let{method:t,endpoint:n,version:r,locale:i=null,defaultResources:s=[],headers:a=[]}=e;this.#a=t,this.#o=n,this.#c=r,this.#l=i,this.#u={},this.#d=s,this.#h=a}addPosition(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=this.#u;if(e in r)throw new Error('Position "'+e+'" already exists.');r[e]={},n&&this.addPositionResources(e,this.#d),this.addPositionResources(e,t)}addPositionResources(e,t){for(let n in t)this.addPositionResource(e,t[n])}addPositionResource(e,t){if(!(t instanceof P))throw new TypeError("Argument resource must be instance of Resource class.");const n=this.#u;if(!(e in n))throw new Error('Missing position "'+e+'".');const r=n[e];t.name in r?r[t.name]=r[t.name].withValues(t.value):r[t.name]=t}get method(){return this.#a}get endpoint(){return this.#o}get version(){return this.#c}get locale(){return this.#l}get parameters(){const e=this.#p(this.#u),t={query:"GET"===this.method?JSON.stringify(e):e};return null!==this.locale&&(t.locale=this.locale),t}get headers(){return this.#h}#p=e=>{const t={};for(let n in e){t[n]={};for(let r in e[n]){const i=e[n][r].value.filter((e=>""!==e));i.length&&(t[n][r]=i)}}return t}}class ${#a;#o;#l;#c;#d;#f;constructor(e,t,n,r){this.#a=e,this.#o=`${t}/api/v${n}/content/${encodeURIComponent(r)}`,this.#l=null,this.#c=n,this.#d=[],this.#f=null}set locale(e){this.#l=e}set origin(e){this.#f=e}addDefaultResource(e,t){this.#d.push(new P(e,t))}create(){const e=[];return"string"==typeof this.#f&&""!==this.#f&&e.push({name:"X-Amp-Origin",value:this.#f}),new j({method:this.#a,endpoint:this.#o,version:this.#c,locale:this.#l,defaultResources:this.#d,headers:e})}}class U{#o;#l;#d;constructor(e,t,n){this.#o=`${e}/api/v${t}/preview/position/${encodeURIComponent(n)}`,this.#l=null,this.#d={}}set locale(e){this.#l=e}addDefaultResource(e,t){const n=this.#d,r=new P(e,t);r.name in n?n[r.name]=n[r.name].withValues(r.value):n[r.name]=r}create(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"1"!==(r["omit-default-resources"]||"0").toString()?t={...this.#d}:(t={},delete r["omit-default-resources"]);for(let e in n){const r=new P(e,n[e]);r.name in t?t[r.name]=t[r.name].withValues(r.value):t[r.name]=r}let i={};for(let e in t){t[e].value.filter((e=>""!==e)).length&&(i[e]=t[e].value)}i=JSON.stringify(i);const s=JSON.stringify(r),a={};"{}"!==i&&(a.resources=i),"{}"!==s&&(a.options=s),null!==this.#l&&(a.locale=this.#l);const o=k.stringify(a);return`${this.#o}/${encodeURIComponent(e)}${""!==o?"?"+o:""}`}}class W{static get NEW(){return"NEW"}static get RENDERED(){return"RENDERED"}static get NOT_FOUND(){return"NOT_FOUND"}static get ERROR(){return"ERROR"}static get CLOSED(){return"CLOSED"}static get STATES(){return[W.NEW,W.RENDERED,W.NOT_FOUND,W.ERROR,W.CLOSED]}}class H{static get ON_BANNER_ATTACHED(){return"amp:banner:attached"}static get ON_BANNER_STATE_CHANGED(){return"amp:banner:state-changed"}static get ON_BANNER_INTERSECTION_CHANGED(){return"amp:banner:intersection-changed"}static get ON_BANNER_FIRST_TIME_SEEN(){return"amp:banner:first-time-seen"}static get ON_BANNER_FIRST_TIME_FULLY_SEEN(){return"amp:banner:first-time-fully-seen"}static get ON_BANNER_LINK_CLICKED(){return"amp:banner:link-clicked"}static get ON_BANNER_BEFORE_CLOSE(){return"amp:banner:before-close"}static get ON_BANNER_AFTER_CLOSE(){return"amp:banner:after-close"}static get ON_BANNER_MUTATED(){return"amp:banner:mutated"}static get ON_BEFORE_FETCH(){return"amp:fetch:before"}static get ON_FETCH_ERROR(){return"amp:fetch:error"}static get ON_FETCH_SUCCESS(){return"amp:fetch:success"}}class G{constructor(e){let{id:t,code:n,name:r,rotationSeconds:i,displayType:s,breakpointType:a,closedExpiration:o=null}=e;this.id=t,this.code=n,this.name=r,this.rotationSeconds=i,this.displayType=s,this.breakpointType=a,this.closedExpiration=o}static createInitial(e){return new G({id:null,code:e,name:null,rotationSeconds:0,displayType:null,breakpointType:null,closedExpiration:null})}isSingle(){return"single"===this.displayType}isRandom(){return"random"===this.displayType}isMultiple(){return"multiple"===this.displayType}toObject(){return{id:this.id,code:this.code,name:this.name,rotationSeconds:this.rotationSeconds,displayType:this.displayType,breakpointType:this.breakpointType,closedExpiration:this.closedExpiration}}}const q=/^(?:(?<INTERVAL_FROM>\d+)-(?<INTERVAL_TO>\d+):|(?<EQ>\d+):|<(?<LT>\d+):|<=(?<LTE>\d+):|>(?<GT>\d+):|>=(?<GTE>\d+):)?(?<VALUE>[^:\s]+)$/,V={};function Q(e,t){const n=function(e){if(e in V)return V[e];const t=e.split(",").map((e=>e.trim())),n=[];for(let e=0;e<t.length;e++){const r=t[e].match(q);if(null===r||void 0===r.groups||void 0===r.groups.VALUE)continue;let i;switch(!0){case void 0!==r.groups.INTERVAL_FROM&&void 0!==r.groups.INTERVAL_TO:i={from:parseInt(r.groups.INTERVAL_FROM),to:parseInt(r.groups.INTERVAL_TO),matches:function(e){return e>=this.from&&e<=this.to}};break;case void 0!==r.groups.EQ:i={eq:parseInt(r.groups.EQ),matches:function(e){return e===this.eq}};break;case void 0!==r.groups.LT:i={lt:parseInt(r.groups.LT),matches:function(e){return e<this.lt}};break;case void 0!==r.groups.LTE:i={lte:parseInt(r.groups.LTE),matches:function(e){return e<=this.lte}};break;case void 0!==r.groups.GT:i={gt:parseInt(r.groups.GT),matches:function(e){return e>this.gt}};break;case void 0!==r.groups.GTE:i={gte:parseInt(r.groups.GTE),matches:function(e){return e>=this.gte}};break;default:i={matches:function(){return!0}}}i&&(i.matches=i.matches.bind(i),i.value=r.groups.VALUE,n.push(i))}const r={rules:n,cache:{}};return r.evaluate=function(e){Number.isInteger(e)||(e=parseInt(e));const t=`i_${e}`;if(t in this.cache)return this.cache[t];for(let n=0;n<this.rules.length;n++){const r=this.rules[n];if(r.matches(e))return this.cache[t]=r.value}return this.cache[t]=null}.bind(r),V[e]=r,r}(e);return n.evaluate(t)}class z{constructor(e){this.options={},this.options=this.#m({...e})}has(e){return void 0!==this.options[e]}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this.options[e]||t}evaluate(e,t){return void 0===this.options[e]?null:Q(this.options[e],t)}override(e){this.options={...this.options,...this.#m({...e})}}#m(e){if("loading-offset"in e){const t=e["loading-offset"],n="loading"in e?e.loading:"loading"in this.options?this.options.loading:null,r=null!==n?`>=${t}:${n}`:null;let i='AMP deprecation warning: The banner option "loading-offset" is deprecated and will be removed in some future release.';null!==r&&(i+=` Instead of options {"loading": "${n}", "loading-offset": "${t}"} use an expression based option {"loading": "${r}"}.`),console.warn(i),delete e["loading-offset"],null!==r&&(e.loading=r)}return e}}class Y{#g;#b;#y;#v=null;#E=null;#w={};constructor(e,t,n,r,i){if(this.constructor===Y)throw new TypeError("Can not construct abstract class Banner.");this.#g=t,this.#b=n,this.#y=new z(i),this._eventBus=e,this._positionData=G.createInitial(r),this.STATE=W}get uid(){return this.#g}get element(){return this.#b}get state(){return this.#v}get stateInfo(){return this.#E}get stateCounter(){return this.#w[this.state]||0}get position(){return this.positionData.code}get positionData(){return this._positionData}get options(){return this.#y}get fingerprints(){return[]}unsetFingerprint(e){}setState(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(-1===this.STATE.STATES.indexOf(e))throw new TypeError(`${e} is not valid state.`);this.#v=e,this.#E=t.toString(),this.#w[e]=(this.#w[e]||0)+1,this._eventBus.dispatch(H.ON_BANNER_STATE_CHANGED,{banner:this})}on(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.startsWith("amp:banner:"))throw new Error(`Unable to attach listener on event "${e}" through a banner.`);return this._eventBus.subscribe(e,(function(e){const{banner:r}=e;r===this&&(null!==n?t.call(n,e):t(e))}),this)}getCurrentBreakpoint(e){return null}overrideOptions(e){this.#y.override(e)}redrawIfNeeded(){}isManaged(){return!1}isExternal(){return!1}isEmbed(){return!1}}n(4979);class J{constructor(e,t){let{bannerId:n,bannerName:r,positionId:i,positionCode:s,positionName:a,campaignId:o,campaignCode:c,campaignName:l,closedExpiration:u=null}=t;this.value=e,this.bannerId=n,this.bannerName=r,this.positionId=i,this.positionCode=s,this.positionName=a,this.campaignId=o,this.campaignCode=c,this.campaignName=l,this.closedExpiration=u}static createFromProperties(e){return new J(btoa(encodeURIComponent(JSON.stringify(e))),e)}static createFromValue(e){return new J(e,JSON.parse(decodeURIComponent(atob(e))))}toString(){return this.value}}n(3609);class K{#N;#T;constructor(e,t){this.#N=e,this.#T=t}get breakpoint(){return this.#N}get data(){return this.#T}}class X{#S;#R;#_=[];#A=void 0;#B={min:null,max:null,reset:function(){this.min=this.max=null}};constructor(e,t){this.#S=e,this.#R=t}addContent(e,t){this.#_.push(new K(e,t)),this.#A=void 0}get contents(){return this.#_}get content(){if(void 0!==this.#A&&!this.needRedraw())return this.#A;this.#B.reset();const e=this.#S.width,t=this.#R;let n=null,r=null,i=null;const s=[];this.#x(this.#_,(a=>{let o=a.breakpoint;null!==o?(s.push(o),("min"===t&&e>=o&&(null===i||i<o)||"max"===t&&e<=o&&(null===i||i>o))&&(r=a,i=o,this.#B[t]=o)):n=a})),s.sort(((e,t)=>e-t)),"min"===t?s.unshift(null):s.push(null);const a=s.indexOf(i);return"max"===t&&a-1 in s&&(this.#B.min=s[a-1]+1),"min"===t&&a+1 in s&&(this.#B.max=s[a+1]-1),this.#A=null!==r?r:n}needRedraw(){if(void 0===this.#A)return!0;const e=this.#S.width;return null!==this.#B.min&&e<this.#B.min||null!==this.#B.max&&e>this.#B.max}#x(e,t){for(let n in e)t(e[n],n)}}class Z{#T;#_;#I=null;constructor(e,t,n){this.#T=e,this.#_=new X(n,t);for(let e of this.#T.contents)"img"!==e.type||"dimensions"in e||(e.dimensions={width:null,height:null}),this.#_.addContent(e.breakpoint,e)}set fingerprint(e){if(!(e instanceof J))throw new TypeError("The value must be instance of Fingerprint object.");this.#I=e}get fingerprint(){return this.#I}get id(){return this.#T.id}get name(){return this.#T.name||null}get score(){return this.#T.score}get campaign(){return console.warn("Usage of deprecated property `BannerData.campaign`. Please use property `campaignCode` instead."),this.campaignCode()}get campaignId(){return this.#T.campaign_id||null}get campaignCode(){return this.#T.campaign_code||this.#T.campaign||null}get campaignName(){return this.#T.campaign_name||null}get closedExpiration(){return"closed_expiration"in this.#T?this.#T.closed_expiration:null}get content(){return this.#_.content?.data||null}needRedraw(){return this.#_.needRedraw()}}class ee{#O;constructor(e){this.#O=e}get positionCode(){return this.#O.positionData.code}get rotationSeconds(){return this.#O.positionData.rotationSeconds}get displayType(){return this.#O.positionData.displayType}get breakpointType(){return this.#O.positionData.breakpointType}get fingerprints(){return this.#O.fingerprints}get bannerData(){return this.#O.bannerData}}class te{static randomByWeights(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"weight";const n={};let r=0;for(let n=0;n<e.length;n++)r+=e[n][t];for(let i=0;i<e.length;i++)n[i]=e[i][t]/r;let i=0,s=Math.random();for(;s>0;)s-=n[i],i++;return i--,e[i]?e[i]:e[0]}}function ne(e,t){if(e instanceof t.HTMLElement)return e;if("string"!=typeof e)throw new TypeError("Element must be instance of HTMLElement or String");let n;if(n="#"===e.charAt(0)?document.getElementById(e.slice(1)):document.querySelector(e),!(n instanceof t.HTMLElement))throw new TypeError("Selector "+e+" is invalid.");return n}function re(e){Array.from(e.getElementsByTagName("script")).forEach((e=>{if(""!==e.type&&"text/javascript"!==e.type)return;const t=document.createElement("script");Array.from(e.attributes).forEach((e=>{t.setAttribute(e.name,e.value)})),t.appendChild(document.createTextNode(e.innerHTML)),e.parentNode.replaceChild(t,e)}))}class ie extends Y{#S;#C;#D=[];#M;#k=!1;#L=null;#F=[];constructor(e,t,n,r,i,s){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};super(n,r,i,s,arguments.length>7&&void 0!==arguments[7]?arguments[7]:{}),this.#S=e,this.#C=t,this.#M=a;for(let e in a)this.#D.push(new P(e,a[e]));this.setState(this.STATE.NEW,"Banner created.")}set html(e){this.element.innerHTML=e,re(this.element)}get resources(){return this.#D}get rawResources(){return this.#M}get data(){return console.warn("Usage of deprecated property `ManagedBanner.data`. Please use property `positionData` for accessing information about a position."),new ee(this)}get fingerprints(){let e;try{e=this.bannerData}catch(e){return[]}return null===e?[]:(this.positionData.isMultiple()||(e=[e]),e.map((e=>e.fingerprint)))}get bannerData(){if(null!==this.#L)return this.#L;if(!this.#F.length)return null;let e=null;const t=this.positionData,n=e=>J.createFromProperties({bannerId:e.id,bannerName:e.name,positionId:t.id,positionCode:t.code,positionName:t.name,campaignId:e.campaignId,campaignCode:e.campaignCode,campaignName:e.campaignName,closedExpiration:e.closedExpiration});switch(!0){case t.isSingle():e=this.#F.reduce(((e,t)=>e.score>=t.score?e:t)),e.fingerprint=n(e);break;case t.isRandom():e=te.randomByWeights(this.#F,"score"),e.fingerprint=n(e);break;case t.isMultiple():e=this.#F.sort(((e,t)=>t.score-e.score));for(let t of e)t.fingerprint=n(t);break;default:throw new Error(`Invalid display type ${this.displayType}.`)}return this.#L=e,e}unsetFingerprint(e){const t=e.bannerId,n=this.positionData;if(!!this.#F.filter((e=>e.id===t))[0]){switch(!0){case n.isSingle():this.#F=[],this.#L=null;break;case n.isRandom():this.#L&&this.#L.id===t?(this.#F=[],this.#L=null):this.#F=this.#F.filter((e=>e.id!==t));break;case n.isMultiple():this.#F=this.#F.filter((e=>e.id!==t)),this.#L&&(this.#L=this.#L.filter((e=>e.id!==t)))}0>=this.#F.length?this.setState(this.STATE.CLOSED,"Banner has empty data."):n.isRandom()&&this.redrawIfNeeded()}}setResponseData(e){if(this.#k)throw new Error(`Data for banner on position ${this.position} is already set.`);this._positionData=new G({id:e.position_id||null,code:this._positionData.code,name:e.position_name||null,rotationSeconds:e.rotation_seconds,displayType:e.display_type,breakpointType:e.breakpoint_type,closedExpiration:e.closed_expiration||null}),"options"in e&&this.overrideOptions(e.options);const t=[];for(let n in e.banners||[])t.push(new Z(e.banners[n],e.breakpoint_type,this.#S));this.#F=t,this.#k=!0,0>=this.#F.length?this.setState(this.STATE.CLOSED,"Banner has empty data."):this.#P("Banner was successfully rendered.")}getCurrentBreakpoint(e){let t=this.bannerData;t=(Array.isArray(t)?t:t?[t]:[]).find((t=>t.id===e));const n=t&&t.content?t.content.breakpoint:null;return null===n?null:parseInt(n)}isManaged(){return!0}redrawIfNeeded(){this.#j()&&this.#P("Banner was successfully redrawn.")}#P(e){try{this.html=this.#C.render(this)}catch(e){return void this.setState(this.STATE.ERROR,"Render error: "+e.message)}this.setState(this.STATE.RENDERED,e)}#j(){let e=this.bannerData;Array.isArray(e)||(e=[e]);for(let t in e)if(e[t].needRedraw())return!0;return!1}}class se{static parseResources(e){const t={},n=[].filter.call(e.attributes,(e=>/^data-amp-resource-\S+/.test(e.name)));for(let e of n)e.value&&(t[e.name.slice(18)]=e.value.split(",").map((e=>e.trim())));return t}static parseOptions(e){const t={},n=[].filter.call(e.attributes,(e=>/^data-amp-option-\S+/.test(e.name)));for(let e of n)e.value&&(t[e.name.slice(16)]=e.value.trim());return t}}class ae extends Y{#$=[];#U={};#W=null;constructor(e,t,n,r){if(!("ampBannerExternal"in r.dataset))throw new Error('Unable to initialize ExternalBanner from element that does not have an attribute "data-amp-external".');const i=JSON.parse(decodeURIComponent(atob(r.dataset.ampBannerExternal)));if(!("state"in i)||!("positionData"in i))throw new Error('Unable to initialize ExternalBanner data attribute "data-amp-external" is malformed.');const s=i.state,a=new G(i.positionData),o=se.parseOptions(r);super(t,n,r,a.code,o);const c=[],l={},u=r.cloneNode(!0),d=u.querySelectorAll("[data-amp-banner-fingerprint]");let h=d.item(0)?.parentElement||null,p=h;if(h===u)h=p=null;else for(;null!==p&&p!==u&&p?.parentElement!==u;)p=p.parentElement||null;for(let t of d){const n=J.createFromValue(t.dataset.ampBannerFingerprint);c.push(n);for(let r of t.querySelectorAll("[data-amp-content-breakpoint]")){let i=r.dataset.ampContentBreakpoint;i="default"===i?null:parseInt(i),n.bannerId in l||(l[n.bannerId]=new X(e,a.breakpointType));const s=t.cloneNode(!1);s.insertAdjacentElement("afterbegin",r),l[n.bannerId].addContent(i,{html:s.outerHTML,contentType:r.dataset.ampContentType||"unknown"})}}h&&(h.dataset.ampBannerList="true"),h&&(h.innerHTML=""),this._positionD