diff --git a/CHANGELOG.md b/CHANGELOG.md index 60d3608..c8b2653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [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. - Added support for native lazy loading. Feature can be enabled through banner options `loading=lazy` and `loading-offset=` (for multiple positions only). @@ -92,7 +94,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.1...HEAD +[Unreleased]: https://gitlab.com/68publishers/projects/amp/amp-client-js/compare/v1.4.0-beta.2...HEAD +[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 [1.3.0]: https://gitlab.com/68publishers/projects/amp/amp-client-js/compare/v1.2.1...v1.3.0 diff --git a/dist/amp-client.min.js b/dist/amp-client.min.js index b707682..e42d321 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)},2692:(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]:{},o=[];for(r in(t=b(t)).setAttribute("data-amp-attached",""),n)o.push(new y(r,n[r]));var i=new c(u(this).eventBus,t,e,o);return u(this).banners.push(i),i}},{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."));c(this).state=t,c(this).stateInfo=e.toString(),c(this).stateCounters[t]=(c(this).stateCounters[t]||0)+1,c(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=s},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]:[];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),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;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]:{};return c(this).bannerManager.addManagedBanner(t,e,r)}},{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.getAttribute("data-amp-banner"),s={};if(!u)continue;var l,f=[].filter.call(i.attributes,(function(t){return/^data-amp-resource-[\S]+/.test(t.name)})),p=o(f);try{for(p.s();!(l=p.n()).done;){var y=l.value;y.value&&(s[y.name.slice(18)]=y.value.split(",").map((function(t){return t.trim()})))}}catch(t){p.e(t)}finally{p.f()}a=this.createBanner(i,u,s)}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=g},7392:(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}},4106:t=>{var e=function(t){return"\n <% if('img' === ".concat(t,'.content.type) { %>\n >\n \n <% (").concat(t,'.content.sources || []).forEach(function(source) { %>\n \n <% }); %>\n <%- ').concat(t,\" <% if('' !== ").concat(t,".content.title) { print('title=\"' + ").concat(t,".content.title + '\"'); } %>>\n \n \n <% } else if ('html' === ").concat(t,'.content.type) { %>\n
\n <%= ').concat(t,".content.html %>\n
\n <% } %>\n ")};t.exports={single:'
'.concat(e("data"),"
"),random:'
'.concat(e("data"),"
"),multiple:'\n
\n
\n <% data.forEach(function(b) { %>\n
\n '.concat(e("b"),"\n
\n <% }); %>\n
\n
\n ")}},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{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.1"}')}},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={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 diff --git a/dist/amp-client.standalone.min.js b/dist/amp-client.standalone.min.js index 8286c0c..c07ecf9 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)},692:(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]:{},o=[];for(n in(t=m(t)).setAttribute("data-amp-attached",""),r)o.push(new y(n,r[n]));var i=new c(u(this).eventBus,t,e,o);return u(this).banners.push(i),i}},{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=b},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."));c(this).state=t,c(this).stateInfo=e.toString(),c(this).stateCounters[t]=(c(this).stateCounters[t]||0)+1,c(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=s},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]:[];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),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 m(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=b.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;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]:{};return c(this).bannerManager.addManagedBanner(t,e,n)}},{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.getAttribute("data-amp-banner"),s={};if(!u)continue;var l,f=[].filter.call(i.attributes,(function(t){return/^data-amp-resource-[\S]+/.test(t.name)})),p=o(f);try{for(p.s();!(l=p.n()).done;){var y=l.value;y.value&&(s[y.name.slice(18)]=y.value.split(",").map((function(t){return t.trim()})))}}catch(t){p.e(t)}finally{p.f()}a=this.createBanner(i,u,s)}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=g},392:(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}},106:t=>{var e=function(t){return"\n <% if('img' === ".concat(t,'.content.type) { %>\n >\n \n <% (").concat(t,'.content.sources || []).forEach(function(source) { %>\n \n <% }); %>\n <%- ').concat(t,\" <% if('' !== ").concat(t,".content.title) { print('title=\"' + ").concat(t,".content.title + '\"'); } %>>\n \n \n <% } else if ('html' === ").concat(t,'.content.type) { %>\n
\n <%= ').concat(t,".content.html %>\n
\n <% } %>\n ")};t.exports={single:'
'.concat(e("data"),"
"),random:'
'.concat(e("data"),"
"),multiple:'\n
\n
\n <% data.forEach(function(b) { %>\n
\n '.concat(e("b"),"\n
\n <% }); %>\n
\n
\n ")}},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 m=o.value,b=m.target.dataset.ampBannerFingerprint,d=t.getBannerByFingerprint(b);if(d){var v=n[b];if(v){var h={fingerprint:v.fingerprint,element:m.target,banner:d};if(c.push(i(i({},h),{},{entry:m})),!v.alreadySeen){var g=m.intersectionRatio>=f(m.target);l[b]=!(b in l)||!l[b].isIntersecting&&g?{fingerprintArgs:h,fingerprintMetadata:v,isIntersecting:g}:l[b]}if(!v.alreadyFullySeen){var w=1<=m.intersectionRatio;p[b]=!(b in p)||!p[b].isFullyIntersecting&&w?{fingerprintArgs:h,fingerprintMetadata:v,isFullyIntersecting:w}:p[b]}}}}}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(m.ON_BANNER_STATE_CHANGED,(function(t){if(b.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(m.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(m.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(m.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{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:()=>A});var r={};n.r(r),n.d(r,{exclude:()=>N,extract:()=>S,parse:()=>E,parseUrl:()=>T,pick:()=>k,stringify:()=>O,stringifyUrl:()=>j});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()}`)),m=Symbol("encodeFragmentIdentifier");function b(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){b((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"";b((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 T(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 j(t,e){e={encode:!0,strict:!0,[m]:!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[m]?r.hash:`#${t.fragmentIdentifier}`}return`${n}${r}${o}`}function k(t,e,n){n={parseFragmentIdentifier:!0,[m]:!1,...n};const{url:r,query:o,fragmentIdentifier:i}=T(t,n);return j({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 A=r},147:t=>{"use strict";t.exports=JSON.parse('{"i8":"1.4.0-beta.1"}')}},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;(()=>{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 diff --git a/package-lock.json b/package-lock.json index 6905d24..68fda8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@68publishers/amp-client", - "version": "1.4.0-beta.1", + "version": "1.4.0-beta.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@68publishers/amp-client", - "version": "1.4.0-beta.1", + "version": "1.4.0-beta.2", "license": "ISC", "dependencies": { "lodash": "^4.17.21", diff --git a/package.json b/package.json index 7020cc3..9f06103 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@68publishers/amp-client", - "version": "1.4.0-beta.1", + "version": "1.4.0-beta.2", "description": "JS Client for 68publishers/amp", "homepage": "http://www.68publishers.io/", "main": "index.js",