@inappstory/react-sdk 1.16.4 → 1.16.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react/jsx-runtime"),require("react"),require("mobx-react-lite"),require("classnames"),require("mobx"),require("uuid"),require("react-dom/client"),require("@inappstory/slide-api"));else if("function"==typeof define&&define.amd)define(["react/jsx-runtime","react","mobx-react-lite","classnames","mobx","uuid","react-dom/client","@inappstory/slide-api"],t);else{var r="object"==typeof exports?t(require("react/jsx-runtime"),require("react"),require("mobx-react-lite"),require("classnames"),require("mobx"),require("uuid"),require("react-dom/client"),require("@inappstory/slide-api")):t(e["react/jsx-runtime"],e.react,e["mobx-react-lite"],e.classnames,e.mobx,e.uuid,e["react-dom/client"],e["@inappstory/slide-api"]);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(self,(e,t,r,i,n,a,s,o)=>(()=>{var l={643(e){e.exports=function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(18),n=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});t.push(0);var r=t[0],i=t[1];if(10===r)switch(i){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(r){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,i){void 0===i&&(i=!1);var n=e.getVersionPrecision(t),a=e.getVersionPrecision(r),s=Math.max(n,a),o=0,l=e.map([t,r],function(t){var r=s-e.getVersionPrecision(t),i=t+new Array(r+1).join(".0");return e.map(i.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(i&&(o=s-Math.min(n,a)),s-=1;s>=o;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===o)return 0;s-=1}else if(l[0][s]<l[1][s])return-1}},e.map=function(e,t){var r,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)i.push(t(e[r]));return i},e.find=function(e,t){var r,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,i=e.length;r<i;r+=1){var n=e[r];if(t(n,r))return n}},e.assign=function(e){for(var t,r,i=e,n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var o=function(){var e=a[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){i[t]=e[t]})};for(t=0,r=a.length;t<r;t+=1)o();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=n,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(91))&&i.__esModule?i:{default:i},a=r(18);function s(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var o=function(){function e(){}var t,r;return e.getParser=function(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new n.default(e,t,r)},e.parse=function(e,t){return void 0===t&&(t=null),new n.default(e,t).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return a.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return a.ENGINE_MAP}},{key:"OS_MAP",get:function(){return a.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return a.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=o,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=l(r(92)),n=l(r(93)),a=l(r(94)),s=l(r(95)),o=l(r(17));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var i=!1;"boolean"==typeof t?(i=t,this._hints=r):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==i&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),r=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return r?r.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=o.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=o.default.find(n.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=o.default.find(a.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=o.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return o.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},i=0,n={},a=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(n[t]=s,a+=1):"object"==typeof s&&(r[t]=s,i+=1)}),i>0){var s=Object.keys(r),l=o.default.find(s,function(e){return t.isOS(e)});if(l){var c=this.satisfies(r[l]);if(void 0!==c)return c}var d=o.default.find(s,function(e){return t.isPlatform(e)});if(d){var u=this.satisfies(r[d]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(n),f=o.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(n[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),n=o.default.getBrowserTypeByAlias(i);return t&&n&&(i=n.toLowerCase()),i===r},t.compareVersion=function(e){var t=[0],r=e,i=!1,n=this.getBrowserVersion();if("string"==typeof n)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(i=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(i=!0,r=e.substr(1)),t.indexOf(o.default.compareVersions(n,r,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=c,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},a=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},r=n.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},r=n.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},r=n.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},r=n.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},r=n.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},r=n.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},r=n.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},r=n.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},r=n.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},r=n.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},r=n.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},r=n.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},r=n.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=n.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},r=n.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},r=n.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},r=n.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},r=n.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},r=n.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},r=n.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},r=n.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=n.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=n.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=n.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=n.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=n.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=n.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=n.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=n.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=n.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=n.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=n.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=n.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=n.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=n.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=n.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=n.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=n.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=n.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=n.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=n.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},r=n.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=n.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=n.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},r=n.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),i=n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),a=n.default.getFirstMatch(/se ([\d.]+)x/i,e),s=r||i||a;return s&&(t.version=s),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=n.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var r={name:"DuckDuckGo"};if(t){var i=t.getBrandVersion("DuckDuckGo");if(i)return r.version=i,r}var a=n.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return a&&(r.version=a),r}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var r={name:"Brave"};if(t){var i=t.getBrandVersion("Brave");if(i)return r.version=i,r}return r}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=n.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=n.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:n.default.getFirstMatch(t,e),version:n.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},a=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=n.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=n.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=n.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=n.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},r=n.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=n.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=n.default.getMacOSVersionName(t),i={name:a.OS_MAP.MacOS,version:t};return r&&(i.versionName=r),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=n.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=n.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=n.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=n.default.getAndroidVersionName(t),i={name:a.OS_MAP.Android,version:t};return r&&(i.versionName=r),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=n.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:a.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=n.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||n.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||n.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=n.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=n.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=n.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},a=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=n.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=n.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=n.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),r={type:a.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(r.model=t),r}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},a=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=n.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},r=n.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},r=n.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},r=n.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},r=n.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},126(e,t,r){"use strict";r.d(t,{MU:()=>l,Xr:()=>c,wG:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".loader--IOiL0{position:absolute;z-index:10001;top:0;bottom:0;left:0;right:0;display:flex;justify-content:center;align-items:center;background:var(--loader-background, black)}.loader--IOiL0 .loader__refresh-btn--Xq6kc{color:#fff;cursor:pointer;position:absolute;left:50%;top:50%;transform:translate3d(-50%, -50%, 0);pointer-events:auto;padding:20px;width:32px;height:32px;box-sizing:content-box}.loader--IOiL0 .loader__spinner--Cl4w_{-ms-flex-negative:0;flex-shrink:0;display:inline-block;width:32px;height:32px;border-radius:50%;border:solid 2px var(--loaderBackgroundColor, white);border-color:var(--loaderBackgroundAccentColor, transparent) var(--loaderBackgroundColor, white) var(--loaderBackgroundColor, white) var(--loaderBackgroundColor, white);-webkit-animation:loading-spinner--KDbkH .6s infinite linear;animation:loading-spinner--KDbkH .6s infinite linear}@keyframes loading-spinner--KDbkH{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}",""]);var o="loader--IOiL0",l="loader__refresh-btn--Xq6kc",c="loader__spinner--Cl4w_";const d=s;r.d(t,["Ay",0,d])},81(e,t,r){"use strict";r.d(t,{K:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".icon--oME3c{width:2rem;height:2rem}",""]);var o="icon--oME3c";const l=s;r.d(t,["A",0,l])},371(e,t,r){"use strict";r.d(t,{kK:()=>l,rh:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".bnr--d4JN5{width:100%;height:100%;position:relative;backface-visibility:hidden;transform:translateZ(0);clip-path:inset(0 round var(--ias-banner-border-radius, 0px))}.bnr-slides--DM_du{position:relative;width:100%;height:100%;display:block}",""]);var o="bnr--d4JN5",l="bnr-slides--DM_du";const c=s;r.d(t,["Ay",0,c])},243(e,t,r){"use strict";r.d(t,{f:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".bnr-place--stDju{width:100%;height:100%;position:relative;border-radius:var(--ias-bnr-place-border-radius, 0px)}.bnr-slider__slider_visible--LefjP{border:solid 1px green}",""]);var o="bnr-place--stDju";const l=s;r.d(t,["Ay",0,l])},883(e,t,r){"use strict";r.d(t,{f:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".bnr-place--w8Fmt{width:100%;height:100%;display:flex;flex-direction:column;position:relative}",""]);var o="bnr-place--w8Fmt";const l=s;r.d(t,["A",0,l])},713(e,t,r){"use strict";r.d(t,{f:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".bnr-place--xfX8t{width:100%;height:100%;position:relative}",""]);var o="bnr-place--xfX8t";const l=s;r.d(t,["A",0,l])},41(e,t,r){"use strict";r.d(t,{aw:()=>o,pj:()=>c,xs:()=>l,yC:()=>d});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".slider--O5WPf{width:100%;height:100%;overflow:hidden;position:relative;justify-content:center;user-select:none;border-radius:inherit}.slider__track--EtUXY{display:flex;transition:transform .3s ease;width:100%;height:100%;will-change:transform}.slider__slide--fFM0h{width:100%;flex-shrink:0;position:relative;display:flex}.slider--vertical--YnGKe .slider__track--EtUXY{flex-direction:column}.slider--vertical--YnGKe .slider__slide--fFM0h{justify-content:center}",""]);var o="slider--O5WPf",l="slider__track--EtUXY",c="slider__slide--fFM0h",d="slider--vertical--YnGKe";const u=s;r.d(t,["Ay",0,u])},379(e,t,r){"use strict";r.d(t,{L5:()=>l,Yf:()=>u,a8:()=>c,cG:()=>h,j$:()=>o,oX:()=>d,pB:()=>f});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".slider__controls-btn--DSE2l{position:absolute;top:50%;z-index:1;width:1.5rem;height:1.5rem;transform:translate3d(0, -50%, 0);transition:all .2s ease-in-out;cursor:pointer;padding:0;background-color:rgba(0,0,0,0);color:#0c62f3;border:0;outline:0}.slider__controls-btn--start--Gd7fV{left:1.5rem}.slider__controls-btn--end--NmOPz{right:1.5rem}.slider__controls--d6Jab.slider__controls--vertical--aArlx .slider__controls-btn--DSE2l{top:auto;left:50%;transform:translate3d(-50%, 0, 0)}.slider__controls--d6Jab.slider__controls--vertical--aArlx .slider__controls-btn--start--Gd7fV{top:0;transform:rotate(90deg)}.slider__controls--d6Jab.slider__controls--vertical--aArlx .slider__controls-btn--end--NmOPz{bottom:0;transform:rotate(90deg)}.slider__controls--d6Jab:not(.slider__controls--vertical--aArlx) .slider__controls-btn--start--Gd7fV.slider__controls-btn--dir--rtl--gkKSR{left:auto;right:0;transform:translate3d(0, -50%, 0) rotate(180deg)}.slider__controls--d6Jab:not(.slider__controls--vertical--aArlx) .slider__controls-btn--end--NmOPz.slider__controls-btn--dir--rtl--gkKSR{left:0;right:auto;transform:translate3d(0, -50%, 0) rotate(180deg)}.slider__controls-btn--DSE2l{transition:opacity .3s ease-in-out}.slider__controls-btn--disabled--j4st5{opacity:0;pointer-events:none}",""]);var o="slider__controls-btn--DSE2l",l="slider__controls-btn--start--Gd7fV",c="slider__controls-btn--end--NmOPz",d="slider__controls--d6Jab",u="slider__controls--vertical--aArlx",h="slider__controls-btn--dir--rtl--gkKSR",f="slider__controls-btn--disabled--j4st5";const p=s;r.d(t,["Ay",0,p])},55(e,t,r){"use strict";r.d(t,{KK:()=>d,eF:()=>l,u7:()=>c,y8:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".slider-bullets--Xskhv{position:absolute;z-index:2;bottom:1.5rem;left:50%;display:inline-flex;list-style:none;transform:translate3d(-50%, 0, 0)}.slider-bullets__bullet--Azfv6{background-color:var(--ias-banners-pagination-inactive-color, hsla(0, 0%, 100%, 0.5));width:var(--ias-banners-pagination-width, 0.5rem);height:var(--ias-banners-pagination-height, 0.5rem);padding:0;border-radius:50%;border:.25rem solid rgba(0,0,0,0);cursor:pointer;line-height:0;box-shadow:0 .25em .5em 0 rgba(0,0,0,.1);margin:0 .25em;transition:transform 100ms ease-in;transform:scale(0.8)}.slider-bullets__bullet--active--R_QzW{background-color:#0c62f3;transform:scale(1)}.slider-bullets--Xskhv.slider-bullets--vertical--JBfQ7{transform:translate3d(0, -50%, 0);left:auto;bottom:auto;right:1.5rem;top:50%;display:flex;flex-direction:column}.slider-bullets--Xskhv.slider-bullets--vertical--JBfQ7 .slider-bullets__bullet--Azfv6{margin:.25em 0}",""]);var o="slider-bullets--Xskhv",l="slider-bullets__bullet--Azfv6",c="slider-bullets__bullet--active--R_QzW",d="slider-bullets--vertical--JBfQ7";const u=s;r.d(t,["Ay",0,u])},935(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",i=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),i&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),i&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,i,n,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(i)for(var o=0;o<this.length;o++){var l=this[o][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);i&&s[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},758(e){"use strict";e.exports=function(e){return e[1]}},46(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(r,i){function n(r){e.removeListener(t,a),i(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}b(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,n)})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,r,i){var n,a,s,c;if(o(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]),void 0===s)s=a[t]=r,++e._eventsCount;else if("function"==typeof s?s=a[t]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=l(e))>0&&s.length>n&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,c=d,console&&console.warn&&console.warn(c)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=d.bind(i);return n.listener=r,i.wrapFn=n,n}function h(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):p(n,n.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function b(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function n(a){i.once&&e.removeEventListener(t,n),r(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,a=this._events;if(void 0!==a)n=n&&void 0===a.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,d=p(l,c);for(r=0;r<c;++r)i(d[r],this,t)}return!0},a.prototype.addListener=function(e,t){return c(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return c(this,e,t,!0)},a.prototype.once=function(e,t){return o(t),this.on(e,u(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,u(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,i,n,a,s;if(o(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,n=a;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,a=Object.keys(r);for(i=0;i<a.length;++i)"removeListener"!==(n=a[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},591(e){"use strict";var t=[];function r(e){for(var r=-1,i=0;i<t.length;i++)if(t[i].identifier===e){r=i;break}return r}function i(e,i){for(var a={},s=[],o=0;o<e.length;o++){var l=e[o],c=i.base?l[0]+i.base:l[0],d=a[c]||0,u="".concat(c," ").concat(d);a[c]=d+1;var h=r(u),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=n(f,i);i.byIndex=o,t.splice(o,0,{identifier:u,updater:p,references:1})}s.push(u)}return s}function n(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,n){var a=i(e=e||[],n=n||{});return function(e){e=e||[];for(var s=0;s<a.length;s++){var o=r(a[s]);t[o].references--}for(var l=i(e,n),c=0;c<a.length;c++){var d=r(a[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=l}}},128(e){"use strict";var t={};e.exports=function(e,r){var i=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(r)}},51(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},740(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var i="";r.supports&&(i+="@supports (".concat(r.supports,") {")),r.media&&(i+="@media ".concat(r.media," {"));var n=void 0!==r.layer;n&&(i+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),i+=r.css,n&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},656(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},968(e,t,r){"use strict";const i=document.querySelector("[nonce]");i&&(r.nc=i.nonce||i.getAttribute("nonce"))},136(e){"use strict";e.exports=o},992(e){"use strict";e.exports=i},314(e){"use strict";e.exports=n},299(e){"use strict";e.exports=r},155(e){"use strict";e.exports=t},236(e){"use strict";e.exports=s},272(t){"use strict";t.exports=e},315(e){"use strict";e.exports=a}};const c={};function d(e){const t=c[e];if(void 0!==t)return t.exports;const r=c[e]={id:e,exports:{}};return l[e].call(r.exports,r,r.exports,d),r.exports}d.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var i=t[r++],n=t[r++];d.o(e,i)?0===n&&r++:0===n?Object.defineProperty(e,i,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,i,{enumerable:!0,get:n})}else for(var i in t)d.o(t,i)&&!d.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.nc=void 0;let u={};return(()=>{"use strict";d.d(u,{default:()=>dr}),d(968);var e=d(272),t=d(155),r=d(299),i=d(591),n=d.n(i),a=d(740),s=d.n(a),o=d(128),l=d.n(o),c=d(855),h=d.n(c),f=d(51),p=d.n(f),b=d(656),m=d.n(b),v=d(371),g={};g.styleTagTransform=m(),g.setAttributes=h(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=p(),n()(v.Ay,g),v.Ay&&v.Ay.locals&&v.Ay.locals;var y=d(126),w={};w.styleTagTransform=m(),w.setAttributes=h(),w.insert=l().bind(null,"head"),w.domAPI=s(),w.insertStyleElement=p(),n()(y.Ay,w),y.Ay&&y.Ay.locals&&y.Ay.locals;var S=d(81),P={};P.styleTagTransform=m(),P.setAttributes=h(),P.insert=l().bind(null,"head"),P.domAPI=s(),P.insertStyleElement=p(),n()(S.A,P),S.A&&S.A.locals&&S.A.locals;var _=d(992),M=d.n(_);const T=({onClick:t,className:r})=>(0,e.jsx)("div",{className:M()(S.K,r),onClick:t,children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",children:(0,e.jsx)("path",{fill:"currentColor",d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"})})}),x=(0,r.observer)(t=>{const r=t.needShowErrorScreen,i=t.needShowLoaderScreen;return i||r?(0,e.jsx)("div",{className:M()(y.wG),style:Object.assign({"--loader-background":t.background,"--loaderBackgroundColor":t.color},t.style),onClick:e=>{e.preventDefault()},children:r?(0,e.jsx)(T,{className:y.MU,onClick:e=>{e.stopPropagation(),t.onReload()}}):i&&(0,e.jsx)("div",{className:y.Xr})}):null});function A(e){const t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i);if(t){const[e,r,i,n]=t.map(Number);return(299*r+587*i+114*n)/1e3>128}if(e.startsWith("#")){const t=e.slice(1);let r,i,n;if(3===t.length)r=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16);else{if(6!==t.length)return!1;r=parseInt(t.slice(0,2),16),i=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16)}return(299*r+587*i+114*n)/1e3>128}return!0}const O=()=>null!==d.nc&&void 0!==d.nc?d.nc:"";class E extends HTMLElement{constructor(){super(...arguments),Object.defineProperty(this,"styleElement",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"mountPoint",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"handleClick",{enumerable:!0,configurable:!0,writable:!0,value:e=>{var t;this.shadowRoot&&"true"===this.shadowRoot.host.getAttribute("allow-click")&&(null===(t=this.banner)||void 0===t||t.activeSlide.onClick({event:e,currentTarget:this.shadowRoot.host}))}})}setStyle(e){var t;this.styleElement&&this.styleElement.parentNode&&this.styleElement.parentNode.removeChild(this.styleElement);const r=document.createElement("style");r.textContent=e,r.setAttribute("nonce",O()),this.styleElement=r,null===(t=this.shadowRoot)||void 0===t||t.prepend(r)}async init(e){this.mountPoint&&(this.banner=e,this.mountPoint.addEventListener("click",this.handleClick),await this.banner.attachRoot(this.mountPoint))}destroy(){var e,t;null===(e=this.banner)||void 0===e||e.detachRoot(),null===(t=this.mountPoint)||void 0===t||t.removeEventListener("click",this.handleClick)}connectedCallback(){if(this.shadowRoot)return;const e=this.attachShadow({mode:"open"});this.mountPoint=document.createElement("div"),this.mountPoint.style.height="100%",this.mountPoint.style.width="100%",e.appendChild(this.mountPoint)}disconnectedCallback(){}}customElements.get("bnr-slides-container")||customElements.define("bnr-slides-container",E);const k=(0,r.observer)((L=(r,i)=>{var{banner:n,direction:a="row"}=r,s=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r}(r,["banner","direction"]);const o=(0,t.useRef)(null),l=n.canBeShown;(0,t.useLayoutEffect)(()=>{o.current&&o.current.setStyle(n.context.style)},[n.context.style]),(0,t.useLayoutEffect)(()=>{if(!o.current)return;const e=o.current;return e.init(n),()=>{e.destroy()}},[n]),(0,t.useEffect)(()=>{if(s.isActive&&l)return n.start(),()=>{n.stop()}},[n,s.isActive,l]);const c="row"===a?{height:`${Math.ceil(n.width/n.contentRatio)}px`}:{width:`${Math.ceil(n.height*n.contentRatio)}px`};return(0,e.jsxs)("div",{className:M()(v.rh,"ias-bnr",s.className),ref:i,style:Object.assign(Object.assign({},c),{background:n.appearance.background,"--ias-banner-border-radius":`${s.clientAppearance.borderRadius}px`}),children:[(0,e.jsx)("bnr-slides-container",{style:{opacity:l?1:0},class:v.kK,ref:o,"allow-click":s.allowClick.toString(),dir:n.dir}),(0,e.jsx)(x,{needShowErrorScreen:n.needShowErrorScreen,needShowLoaderScreen:n.needShowLoaderScreen,onReload:async()=>{n.recover()},background:n.appearance.background,color:A(n.appearance.background)?"black":"white"})]})},"function"==typeof t.forwardRef?t.forwardRef(L):function(e){return L(e,e.ref)}));var L,B=d(243),I={};I.styleTagTransform=m(),I.setAttributes=h(),I.insert=l().bind(null,"head"),I.domAPI=s(),I.insertStyleElement=p(),n()(B.Ay,I),B.Ay&&B.Ay.locals&&B.Ay.locals;var R=d(55),j={};j.styleTagTransform=m(),j.setAttributes=h(),j.insert=l().bind(null,"head"),j.domAPI=s(),j.insertStyleElement=p(),n()(R.Ay,j),R.Ay&&R.Ay.locals&&R.Ay.locals;const C=r=>{const[i,n]=(0,t.useState)(-1);return(0,t.useEffect)(()=>{r.activeIndex===i&&n(-1)},[r.activeIndex,i]),r.totalPages>1&&(0,e.jsx)("div",{dir:r.langDirection,className:M()(R.y8,{[R.KK]:"column"===r.direction},"ias-bnr-bullets"),children:Array.from({length:r.totalPages}).map((t,i)=>(0,e.jsx)("div",{className:M()("ias-bnr__bullet",R.eF,{[R.u7]:i===r.activeIndex,"ias-bnr__bullet--active":i===r.activeIndex}),onClick:()=>(e=>{n(e),r.onClick(e)})(i)},i))})};var F=d(41),D={};D.styleTagTransform=m(),D.setAttributes=h(),D.insert=l().bind(null,"head"),D.domAPI=s(),D.insertStyleElement=p(),n()(F.Ay,D),F.Ay&&F.Ay.locals&&F.Ay.locals;var N=d(379),z={};z.styleTagTransform=m(),z.setAttributes=h(),z.insert=l().bind(null,"head"),z.domAPI=s(),z.insertStyleElement=p(),n()(N.Ay,z),N.Ay&&N.Ay.locals&&N.Ay.locals;const W=t=>(0,e.jsxs)("div",{className:M()(N.oX,{[N.Yf]:"column"===t.direction}),children:[(0,e.jsx)("button",{onClick:t.onPrevClick,className:M()("ias-bnr__controls-btn","ias-bnr__controls-btn--prev","ias-bnr__controls-btn--start",N.j$,N.L5,{[N.pB]:t.prevDisabled,[N.cG]:"rtl"===t.langDirection,"ias-bnr__controls-btn--disabled":t.prevDisabled}),children:(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M0 12l10.975 11 2.848-2.828-6.176-6.176H24v-3.992H7.646l6.176-6.176L10.975 1 0 12z",fill:"currentColor"})})}),(0,e.jsx)("button",{onClick:t.onNextClick,className:M()("ias-bnr__controls-btn","ias-bnr__controls-btn--next","ias-bnr__controls-btn--end",N.j$,N.a8,{[N.pB]:t.nextDisabled,[N.cG]:"rtl"===t.langDirection,"ias-bnr__controls-btn--disabled":t.nextDisabled}),children:(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M13.025 1l-2.847 2.828 6.176 6.176h-16.354v3.992h16.354l-6.176 6.176 2.847 2.828 10.975-11z",fill:"currentColor"})})})]});class V{constructor(e){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_enabled",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get enabled(){return this._enabled}update(){const e=this.slider.options.loop&&this.canUseLoop();this._enabled?e||(this._enabled=!1,this.destroy()):e&&(this._enabled=!0)}applyLoopFix({targetIndex:e,direction:t}){if(!this.enabled)return!1;const r="next"===t||!t,i="prev"!==t&&t?[]:this.getPrependSlidesIndexes(e),n=r?this.getAppendSlidesIndexes(e):[];return this.moveSlides(i,n),this.adjustPosition(i,n),i.length>0||n.length>0}destroy(){this.resetSlidesOrder()}resetSlidesOrder(){const e=[];this.slider.slides.forEach(t=>{const r=+t.dataset.index;e[r]=t}),e.forEach(e=>{this.slider.track.append(e)})}canUseLoop(){return!(this.slider.slides.length<this.slider.options.slidesPerView+1&&(console.warn("IAS Banners Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView parameters"),1))}getPrependSlidesIndexes(e){const t=this.slider.track.children,r=[];if(e<1)for(let i=0;i<1-e;i++){const e=t.length-i-1;r.push(e)}return r}getAppendSlidesIndexes(e){const t=[];if(e+this.slider.options.slidesPerView>this.slider.slides.length-1){const r=Math.max(e-(this.slider.slides.length-2),1);for(let e=0;e<r;e++){const r=e;t.push(r)}}return t}moveSlides(e,t){const r=this.slider.track,i=this.slider.slides.slice();e.forEach(e=>{r.prepend(i[e])}),t.forEach(e=>{r.append(i[e])})}adjustPosition(e,t){e.length>0?this.slider.slideTo(this.slider.activeIndex+e.length,0):t.length>0&&this.slider.slideTo(this.slider.activeIndex-t.length,0)}}var q;!function(e){e.TouchStart="touchStart",e.TouchMove="touchMove",e.TouchEnd="touchEnd",e.ReachStart="reachStart",e.ReachEnd="reachEnd",e.ActiveIndexChange="activeIndexChange",e.RealIndexChnage="realIndexChange",e.TransitionStart="transitionStart",e.TransitionEnd="transitionend",e.Resize="resize",e.SlidesUpdated="slidesUpdated",e.AutoplayTimeLeft="autoplayTimeLeft",e.AutoplayTimerTick="autoplayTimerTick"}(q||(q={}));class G{constructor(e,t){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"loopModule",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"startPosition",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"startTranslate",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"isTouched",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isMoved",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_enabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"startDirection",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"onTouchStart",{enumerable:!0,configurable:!0,writable:!0,value:e=>{if(this.slider.animating||!this._enabled)return;e.stopPropagation();const{startPosition:t,startTranslate:r}=this.getTouchStartState(e);this.startPosition=t,this.startTranslate=r,this.isTouched=!0,this.setGrabCursor(!1),this.slider.autoplay.pause()}}),Object.defineProperty(this,"onTouchMove",{enumerable:!0,configurable:!0,writable:!0,value:e=>{if(!this.isTouched)return;e.stopPropagation();const t=this.getTouchDiff(e);if(!(Math.abs(t)>this.slider.options.swipeThreshold||this._isMoved))return;this.setGrabCursor(!0),this._isMoved||(this.slider.emit(q.TouchStart),this.slider.autoplay.pause(),this.slider.lockActiveIndex(),this.startDirection=this.getSwipeDirection(t)),this._isMoved=!0;const r="next"===this.startDirection?this.slider.options.swipeThreshold:-this.slider.options.swipeThreshold;this.slider.emit(q.TouchMove);let i=this.startTranslate+t+r;this.applyLoopFix(i),i=this.startTranslate+t+r,this.setTranslate(i)}}),Object.defineProperty(this,"onTouchEnd",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.isTouched&&(this.slider.unlockActiveIndex(),this.updateActiveIndex(),this.unsetGrabCursor(),this.isTouched=!1,this._isMoved=!1,this.slider.emit(q.TouchEnd),this.slider.autoplay.resume())}}),this.slider.track.addEventListener("mousedown",this.onTouchStart,{passive:!0}),document.addEventListener("mousemove",this.onTouchMove,{passive:!0}),document.addEventListener("mouseup",this.onTouchEnd),this.slider.track.addEventListener("touchstart",this.onTouchStart,{passive:!0}),document.addEventListener("touchmove",this.onTouchMove,{passive:!0}),document.addEventListener("touchend",this.onTouchEnd)}get isMoved(){return this._isMoved}enable(){this._enabled=!0}disable(){this._enabled=!1}enableHorizontalSwipeGesture(){this._enabled=!0}disableHorizontalSwipeGesture(){this._enabled=!1}enableVerticalSwipeGesture(){this._enabled=!0}disableVerticalSwipeGesture(){this._enabled=!1}destroy(){this.slider.track.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd),this.slider.track.removeEventListener("mousedown",this.onTouchStart),document.removeEventListener("mousemove",this.onTouchMove),document.removeEventListener("mouseup",this.onTouchEnd)}getTouchStartState(e){let t=0,r=0;return"row"===this.slider.options.direction?(t=e instanceof MouseEvent?e.pageX:e.touches[0].clientX,r=this.slider.currentTranslateX):(t=e instanceof MouseEvent?e.pageY:e.touches[0].clientY,r=this.slider.currentTranslateY),{startPosition:t,startTranslate:r}}getTouchDiff(e){let t=0;return"row"===this.slider.options.direction?(t=(e instanceof MouseEvent?e.pageX:e.touches[0].clientX)-this.startPosition,t*=this.slider.options.touchRatio):(t=(e instanceof MouseEvent?e.pageY:e.touches[0].clientY)-this.startPosition,t*=this.slider.options.touchRatio),t}setTranslate(e){e=this.applyEdgeResistance(e),this.slider.setTranslate(e)}applyLoopFix(e){if(!this.loopModule.enabled)return;e=this.slider.langDirSign*-e;const t=this.slider.langDirSign*(this.slider.slideSize+this.slider.options.spaceBetween),r=this.slider.getMinTranslate(),i=Math.abs(this.slider.getSlideOffset(this.slider.slides.length-this.slider.options.slidesPerView));e<r?this.loopModule.applyLoopFix({targetIndex:0,direction:"prev"})&&(this.startTranslate-=t):e>i&&this.loopModule.applyLoopFix({targetIndex:this.slider.slides.length-this.slider.options.slidesPerView,direction:"next"})&&(this.startTranslate+=t)}updateActiveIndex(){if(!this.slider.slides.length)return;const{currentTranslate:e,options:t}=this.slider,r=this.slider.slideSize+t.spaceBetween,i=this.slider.langDirSign*-e/r,n=Math.abs(i);let a=n-Math.trunc(n);if(a="next"===this.startDirection?a:1-a,a>t.longSwipesRatio){const e="next"===this.startDirection?Math.ceil(i):Math.floor(i);this.slider.slideTo(e)}else{let e=Math.trunc(i);0===e&&"prev"===this.startDirection&&(e+=1),e===this.slider.totalPages-1&&"next"===this.startDirection&&(e-=1),this.slider.slideTo(e)}}setGrabCursor(e){this.slider.track.style.cursor="move",this.slider.track.style.cursor=e?"grabbing":"grab"}unsetGrabCursor(){this.slider.track.style.cursor=""}getResistanceCoeff(e){const t=Math.min(Math.abs(e)/(.5*this.slider.slideSize),1);return this.slider.options.edgeTouchRatio+(this.slider.options.touchRatio-this.slider.options.edgeTouchRatio)*Math.exp(3*-t)}applyEdgeResistance(e){if(this.loopModule.enabled)return e;const t=this.slider.langDirSign,r=-t*e,i=this.slider.getMinTranslate(),n=this.slider.getMaxTranslate();let a=r;if(a>n){const e=a-n;a=n+e*this.getResistanceCoeff(e)}else if(a<i){const e=i-a;a=i-e*this.getResistanceCoeff(e)}return-t*a}getSwipeDirection(e){return this.slider.langDirSign*e>0?"prev":"next"}}var U,H=d(46);!function(e){e.Start="start",e.Stop="stop",e.Pause="pause",e.Resume="resume",e.Progress="progress",e.Complete="complete"}(U||(U={}));class $ extends H.EventEmitter{constructor(){super(...arguments),Object.defineProperty(this,"timerId",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"currentProgress",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"progressBeforePause",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"timerPaused",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"isCompleted",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"enabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"rafId",{enumerable:!0,configurable:!0,writable:!0,value:0})}get started(){return!this.isCompleted}get paused(){return this.timerPaused}setTimer(e){0!==e?(this.timerId=setTimeout(()=>this.complete({}),e),this.currentProgress=0,this.runTimerTicks(e)):this.forceEnd()}start(e){this.timerPaused||(this.stop(),this.progressBeforePause=0,this.timeout=e,this.enabled&&(this.isCompleted=!1,this.emit(U.Start),this.setTimer(e)))}restart(){this.stop(),this.start(this.timeout)}stop(){this.isCompleted||(this.clearTimer(),this.emit(U.Stop),this.isCompleted=!0,this.timerPaused=!1)}pause(){this.isCompleted||(this.timerPaused=!0,this.clearTimer(),this.progressBeforePause=this.currentProgress,this.emit(U.Pause))}resume(){if(!this.timerPaused)return;this.timerPaused=!1;const e=1-this.progressBeforePause,t=this.timeout*e;this.setTimer(t),this.emit(U.Resume)}forceEnd(){this.complete({forceEnd:!0})}disable(){this.enabled=!1,this.stop()}enable(){this.enabled=!0,this.start(this.timeout)}complete({forceEnd:e=!1}){this.isCompleted=!0,this.progressBeforePause=0,this.clearTimer(),this.emit(U.Complete,{forceEnd:e})}clearTimer(){cancelAnimationFrame(this.rafId),null!==this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}updateProgress(e){const t=1-this.progressBeforePause;this.currentProgress=this.progressBeforePause+e*t;const r=100*this.currentProgress;this.emit(U.Progress,{percents:r,totalTime:this.timeout,currentTime:this.currentProgress*this.timeout})}runTimerTicks(e){const t=performance.now(),r=i=>{let n=(i-t)/e;n>1&&(n=1);const a=n;this.updateProgress(a),n<1&&(this.rafId=requestAnimationFrame(r))};this.rafId=requestAnimationFrame(r)}}class Y{constructor(e,t){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"loopModule",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:new $}),Object.defineProperty(this,"delay",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"handleTimerComplete",{enumerable:!0,configurable:!0,writable:!0,value:({forceEnd:e})=>{e||this.slider.emit(q.AutoplayTimeLeft)}}),Object.defineProperty(this,"handleTimerProgress",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.slider.emit(q.AutoplayTimerTick,{currentTime:e.currentTime,totalTime:e.totalTime,percents:e.percents})}}),this.timer.on(U.Complete,this.handleTimerComplete),this.timer.on(U.Progress,this.handleTimerProgress)}get paused(){return this.timer.paused}start(){this.slider.options.autoplay&&(this.stop(),this.timer.start(this.delay))}stop(){this.timer.stop()}pause(){this.slider.options.autoplay&&this.timer.pause()}resume(){this.slider.options.autoplay&&this.timer.resume()}setDelay(e){this.delay=e}destroy(){this.timer.off(U.Complete,this.handleTimerComplete),this.timer.off(U.Progress,this.handleTimerProgress),this.stop()}}class X extends H.EventEmitter{constructor(e,t={}){super(),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:{autoplay:!1,speed:300,delay:3e3,loop:!1,slidesPerView:1,spaceBetween:0,initialSlide:0,updateOnWindowResize:!0,direction:"row",langDirection:"ltr",allowTouchMove:!0,touchRatio:1,longSwipesRatio:.5,swipeThreshold:20,edgeTouchRatio:.3}}),Object.defineProperty(this,"isAnimating",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_activeIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_realIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_currentTranslateX",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_currentTranslateY",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_reachEnd",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_reachStart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"loopModule",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"touchModule",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_slideWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_slideHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"autoplay",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_activeIndexLocked",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"handleResize",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.updateSize(),this.emit(q.Resize)}}),this.track=e,this.container=e.parentElement,this.loopModule=new V(this),this.touchModule=new G(this,this.loopModule),this.autoplay=new Y(this,this.loopModule),this.options.updateOnWindowResize&&window.addEventListener("resize",this.handleResize),this.collectSlides(),this.update(t)}get langDirSign(){return"column"===this.options.direction||"ltr"===this.options.langDirection?1:-1}get activeIndex(){return this._activeIndex}get realIndex(){return this._realIndex}get reachEnd(){return this._reachEnd}get reachStart(){return this._reachStart}get slidesEl(){return this.track}get slides(){return Array.from(this.track.children)}get allSlides(){return this.slides}get animating(){return this.isAnimating}get currentTranslateX(){return this._currentTranslateX}get currentTranslateY(){return this._currentTranslateY}get currentTranslate(){return"row"===this.options.direction?this._currentTranslateX:this._currentTranslateY}get isMoved(){return this.touchModule.isMoved}get slideWidth(){return this._slideWidth}get slideHeight(){return this._slideHeight}get slideSize(){return"row"===this.options.direction?this.slideWidth:this.slideHeight}get totalPages(){return this.loopModule.enabled?this.slides.length:Math.max(this.slides.length-this.options.slidesPerView+1,1)}async slideToLoop(e,t=this.options.speed){if(!this.loopModule.enabled)return this.slideTo(e,t);if(this.isAnimating)return;const r=this.getPhysicalIndexByRealIndex(e),i=this.slides.length-r<this.options.slidesPerView,n=r-this._activeIndex-1<this.options.slidesPerView?"next":"prev";if(i){const e="next"===n?r+1:r-this.slides.length+1;this.loopModule.applyLoopFix({targetIndex:e,direction:n})}const a=this.getPhysicalIndexByRealIndex(e);requestAnimationFrame(()=>this.slideTo(a))}async slideTo(e,t=this.options.speed){e=this.clamp(e,0,this.totalPages-1),this.isAnimating||(this.isAnimating=!0,await this.performTranslateToSlide(e,t),this._activeIndexLocked||this.updateIndexes(e),this.isAnimating=!1)}lockActiveIndex(){this._activeIndexLocked=!0}unlockActiveIndex(){this._activeIndexLocked=!1}toNextSlide(){this.isAnimating||(this.loopModule.enabled?this.toNextSlideByLoop():this.slideTo(this.normalizeIndex(this._realIndex+1)))}toPrevSlide(){this.isAnimating||(this.loopModule.enabled?this.toPrevSlideByLoop():this.slideTo(this.normalizeIndex(this._realIndex-1)))}update(e){this.options=this.normalizeOptions(Object.assign(Object.assign({},this.options),e)),this.setupTrackStyles(),this.updateSize(),this.loopModule.update(),this.testAttraction(),this.options.allowTouchMove?this.touchModule.enable():this.touchModule.disable()}destroy(){window.removeEventListener("resize",this.handleResize),this.autoplay.destroy(),this.touchModule.destroy(),this.track.removeAttribute("style"),this._activeIndex=0,this._activeIndexLocked=!1,this.isAnimating=!1}isSlideVisible(e){const t=this.getPhysicalIndexByRealIndex(e);return t>=this._activeIndex&&t<this._activeIndex+this.options.slidesPerView}getVisibleSlideIndexes(){return this.slides.slice(this._activeIndex,this._activeIndex+this.options.slidesPerView).map(e=>+e.dataset.index)}getPhysicalIndexByRealIndex(e){const t=this.normalizeIndex(e);return this.slides.findIndex(e=>e.dataset.index===t.toString())}getMinTranslate(){return 0}getMaxTranslate(){return Math.abs(this.getSlideOffset(this.totalPages-1))}setTranslate(e){"row"===this.options.direction?(this.track.style.transform=`translate3d(${e}px, 0px, 0px)`,this._currentTranslateX=e,this._currentTranslateY=0):(this.track.style.transform=`translate3d(0px, ${e}px, 0px)`,this._currentTranslateX=0,this._currentTranslateY=e),this.testAttraction()}enableHorizontalSwipeGesture(){this.touchModule.enableHorizontalSwipeGesture()}disableHorizontalSwipeGesture(){this.touchModule.disableHorizontalSwipeGesture()}getSlideOffset(e){return this.slides.length?-e*(("row"===this.options.direction?this.slides[0].clientWidth:this.slides[0].clientHeight)+this.options.spaceBetween):0}updateSize(){const e=this.slideWidth,t=this.slideHeight;"row"===this.options.direction?this.calculateSlideWidths():this.calculateSlideHeight(),e===this.slideWidth&&t===this.slideHeight||this.emit(q.SlidesUpdated),this.slideTo(this._activeIndex,0)}getTrackWidth(){return this.track.clientWidth-this.options.spaceBetween*(this.options.slidesPerView-1)}getTrackHeight(){return this.track.clientHeight-this.options.spaceBetween*(this.options.slidesPerView-1)}toNextSlideByLoop(){this.isAnimating||(this.loopModule.applyLoopFix({targetIndex:this._activeIndex,direction:"next"}),requestAnimationFrame(()=>this.slideTo(this._activeIndex+1)))}toPrevSlideByLoop(){this.isAnimating||(this.loopModule.applyLoopFix({targetIndex:this._activeIndex,direction:"prev"}),requestAnimationFrame(()=>this.slideTo(this._activeIndex-1)))}updateIndexes(e){if(!this.slides.length)return;const t=+this.slides[e].dataset.index,r=this._realIndex,i=this._activeIndex;this._realIndex=t,this._activeIndex=e,r!==t&&this.emit(q.RealIndexChnage,t),i!==e&&this.emit(q.ActiveIndexChange,e)}setupTrackStyles(){Object.assign(this.track.style,{display:"flex",transition:`transform ${this.options.speed}ms ease`,gap:`${this.options.spaceBetween}px`})}collectSlides(){this.slides.forEach((e,t)=>{e.dataset.index=t.toString()})}calculateSlideWidths(){this._slideWidth=Math.ceil(this.getTrackWidth()/this.options.slidesPerView),this.slides.forEach(e=>{e.style.width=`${this._slideWidth}px`,e.style.height=""})}calculateSlideHeight(){this._slideHeight=Math.ceil(this.getTrackHeight()/this.options.slidesPerView),this.slides.forEach(e=>{e.style.height=`${this._slideHeight}px`,e.style.width=""})}translateSlidesTrack(e,t){this.track.style.transitionDuration=`${t}ms`,this.setTranslate(this.langDirSign*this.getSlideOffset(e))}async performTranslateToSlide(e,t){if(0===t)this.translateSlidesTrack(e,0);else{if(this._activeIndex===e&&!this.touchModule.isMoved)return;this.translateSlidesTrack(e,t),this.emit(q.TransitionStart),await this.waitTransitionEnd(),this.emit(q.TransitionEnd)}}waitTransitionEnd(){return new Promise(e=>{this.track.addEventListener("transitionend",t=>{"transform"===t.propertyName&&(this.track.style.transitionDuration="0ms",e())},{once:!0})})}testAttraction(){const e=this.getMinTranslate(),t=this.getMaxTranslate();let r=!this.loopModule.enabled&&this.langDirSign*this.currentTranslate>=e,i=!this.loopModule.enabled&&this.langDirSign*-this.currentTranslate>=t;this.options.slidesPerView===this.slides.length&&(r=!0,i=!0),r!==this._reachStart&&(this._reachStart=r,this.emit(q.ReachStart,r)),i!==this._reachEnd&&(this._reachEnd=i,this.emit(q.ReachEnd,i))}normalizeOptions(e){var t,r,i,n,a,s,o,l,c,d,u,h,f,p,b;return{autoplay:null!==(t=e.autoplay)&&void 0!==t?t:this.options.autoplay,speed:null!==(r=e.speed)&&void 0!==r?r:this.options.speed,delay:null!==(i=e.delay)&&void 0!==i?i:this.options.delay,loop:null!==(n=e.loop)&&void 0!==n?n:this.options.loop,slidesPerView:Math.max(Math.min(this.track.children.length,null!==(a=e.slidesPerView)&&void 0!==a?a:this.options.slidesPerView),0),spaceBetween:null!==(s=e.spaceBetween)&&void 0!==s?s:this.options.spaceBetween,initialSlide:null!==(o=e.initialSlide)&&void 0!==o?o:this.options.initialSlide,updateOnWindowResize:null!==(l=e.updateOnWindowResize)&&void 0!==l?l:this.options.updateOnWindowResize,direction:null!==(c=e.direction)&&void 0!==c?c:this.options.direction,allowTouchMove:null!==(d=e.allowTouchMove)&&void 0!==d?d:this.options.allowTouchMove,langDirection:null!==(u=e.langDirection)&&void 0!==u?u:this.options.langDirection,touchRatio:null!==(h=e.touchRatio)&&void 0!==h?h:this.options.touchRatio,longSwipesRatio:null!==(f=e.longSwipesRatio)&&void 0!==f?f:this.options.longSwipesRatio,swipeThreshold:null!==(p=e.swipeThreshold)&&void 0!==p?p:this.options.swipeThreshold,edgeTouchRatio:null!==(b=e.edgeTouchRatio)&&void 0!==b?b:this.options.edgeTouchRatio}}normalizeIndex(e){const t=this.slides.length;return(e%t+t)%t}clamp(e,t,r){return Math.max(t,Math.min(e,r))}}const K=(0,r.observer)(r=>{const[i,n]=(0,t.useState)(null),a=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!a.current||!r.slidesCount)return;const e=new X(a.current,{autoplay:r.autoplay,speed:r.speed,loop:r.loop,slidesPerView:r.slidesPerView,spaceBetween:r.spaceBetween,allowTouchMove:r.allowTouchMove,direction:r.direction,touchRatio:r.touchRatio,longSwipesRatio:r.longSwipesRatio,swipeThreshold:r.swipeThreshold,edgeTouchRatio:r.edgeTouchRatio,langDirection:r.langDirection});return r.onInit(e),n(e),()=>{null==e||e.destroy()}},[r.slidesCount]),(0,t.useEffect)(()=>{i&&i.update({autoplay:r.autoplay,speed:r.speed,loop:r.loop,slidesPerView:r.slidesPerView,spaceBetween:r.spaceBetween,allowTouchMove:r.allowTouchMove,direction:r.direction,touchRatio:r.touchRatio,longSwipesRatio:r.longSwipesRatio,swipeThreshold:r.swipeThreshold,edgeTouchRatio:r.edgeTouchRatio,langDirection:r.langDirection})},[i,r.autoplay,r.speed,r.loop,r.langDirection,r.slidesPerView,r.spaceBetween,r.slidesCount,r.allowTouchMove,r.direction,r.touchRatio,r.longSwipesRatio,r.swipeThreshold,r.edgeTouchRatio]),(0,e.jsxs)("div",{className:M()("ias-bnr-slider",F.aw,{[F.yC]:"column"===r.direction}),children:[(0,e.jsx)("div",{dir:r.langDirection,ref:a,className:M()("ias-bnr-slider__track",F.xs),children:r.children}),i&&r.pagination.enabled&&(0,e.jsx)(C,{direction:r.direction,langDirection:r.langDirection,totalPages:i.totalPages,activeIndex:i.realIndex,onClick:e=>{r.loop?i.slideToLoop(e):i.slideTo(e)}}),i&&r.navigation.enabled&&(0,e.jsx)(W,{direction:r.direction,langDirection:r.langDirection,onPrevClick:()=>{i.toPrevSlide()},onNextClick:()=>{i.toNextSlide()},nextDisabled:i.reachEnd,prevDisabled:i.reachStart})]})}),Q=t=>(0,e.jsx)("div",{className:M()(F.pj,t.className),style:t.style,children:t.children});class J{constructor(e){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e})}isPaused(){return this.slider.autoplay.paused}resume(){this.slider.autoplay.resume()}pause(){this.slider.autoplay.pause()}start(){this.slider.autoplay.start()}setDelay(e){this.slider.autoplay.setDelay(e)}stop(){this.slider.autoplay.stop()}}class Z{constructor(e){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"autoplay",{enumerable:!0,configurable:!0,writable:!0,value:new J(this.slider)})}getTotalPages(){return this.slider.totalPages}getActiveIndex(){return this.slider.realIndex}toNextSlide(){this.slider.isMoved||this.slider.toNextSlide()}toPrevSlide(){this.slider.isMoved||this.slider.toPrevSlide()}slideTo(e,t){this.slider.isMoved||this.slider.slideToLoop(e,t)}enableHorizontalSwipeGesture(){this.slider.enableHorizontalSwipeGesture()}disableHorizontalSwipeGesture(){this.slider.disableHorizontalSwipeGesture()}updateSize(){this.slider.updateSize()}}var ee=d(314),te=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0};let re,ie=(()=>{var e,t;let r,i=[],n=[];return e=class{get _context(){return function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}(this,t,"f")}set _context(e){!function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?n.call(e,r):n?n.value=r:t.set(e,r)}(this,t,e,"f")}constructor(e){t.set(this,te(this,i,void 0)),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:te(this,n)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayFrom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayTo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"appearance",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_wasShown",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_frequencyLimit",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_openTime",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_isOnceOpened",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this.id=e.id,this.name=e.name,this.displayFrom=e.displayFrom,this.displayTo=e.displayTo,this.slides=e.slides,this._context=e.context,this.appearance=e.appearance}get context(){return this._context}get withinDisplayTimeRange(){const e=Math.trunc(Date.now()/1e3);return(!this.displayFrom||e>=this.displayFrom)&&(!this.displayTo||e<=this.displayTo)}get wasShown(){return this._wasShown}get frequencyLimitTimeExceeded(){return null===this._frequencyLimit?this._isOnceOpened:0!==this._frequencyLimit&&Math.trunc(this.timeSinceLastShow/1e3)<=this._frequencyLimit}get timeSinceLastShow(){return Date.now()-this._openTime}get openTime(){return this._openTime}updatePlaceholders(e){for(const t of this.slides)t.updatePlaceholders(e)}markWasShown(){this._wasShown=!0}markAsOpened(){this._openTime=Date.now(),this._isOnceOpened=!0}},t=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[ee.observable],function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0}(e,null,r,{kind:"accessor",name:"_context",static:!1,private:!1,access:{has:e=>"_context"in e,get:e=>e._context,set:(e,t)=>{e._context=t}},metadata:t},i,n),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();class ne{constructor(e){var t;Object.defineProperty(this,"contentRatio",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"background",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.contentRatio=null!==(t=e.content_ratio)&&void 0!==t?t:1,this.background=this.mapBackgroundDtoToModel(e.background)}mapBackgroundDtoToModel(e){if(!e||0===e.alpha)return"transparent";if("solid"in e)return this.applyAlphaToColor(e.solid,e.alpha);if("linear_gradient"in e){const{angle:t,color_step_list:r}=e.linear_gradient;return`linear-gradient(${t}deg, ${r.map(t=>`${this.applyAlphaToColor(t.color,e.alpha)} ${t.position}%`).join(", ")})`}return"transparent"}applyAlphaToColor(e,t){if(e.startsWith("#")){const r=e.slice(1),i=3===r.length;return`rgba(${parseInt(i?r[0]+r[0]:r.slice(0,2),16)}, ${parseInt(i?r[1]+r[1]:r.slice(2,4),16)}, ${parseInt(i?r[2]+r[2]:r.slice(4,6),16)}, ${t})`}return e}}class ae{constructor(e,t){Object.defineProperty(this,"widgetsData",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"style",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.style=t.style,this.widgetsData=this.mapBannerContextDto(e,t)}mapBannerContextDto(e,t){var r;const i={},n=null!==(r=t.widgetsData)&&void 0!==r?r:{};for(const t in n)Array.isArray(n[t])||(i[t]=n[t][e]);return i}updateNarrativeSavedData(e){this.widgetsData._narrative_saved_data=e}}function se(e,t,r){return String(e).replace(new RegExp(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t),"g"),()=>r)}re=function(){};const oe=["InternalPrimaryFont","InternalSecondaryFont"];function le(e,t){if(!t)return e;let r=e;for(const e of oe)r=se(r,e,`${t}${e}`);return r}var ce;(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}}),r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch(e){}})(),function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}(),function(e){e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary",e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary"}(ce||(ce={}));var de=d(643);d.n(de)().getParser(window.navigator.userAgent).parse().getPlatformType();var ue=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0};let he=(()=>{var e,t;let r,i=[],n=[];return e=class{get _html(){return function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}(this,t,"f")}set _html(e){!function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?n.call(e,r):n?n.value=r:t.set(e,r)}(this,t,e,"f")}get html(){return this._html}get payload(){return this._payload}constructor(e){Object.defineProperty(this,"_rawHtml",{enumerable:!0,configurable:!0,writable:!0,value:""}),t.set(this,ue(this,i,void 0)),Object.defineProperty(this,"_payload",{enumerable:!0,configurable:!0,writable:!0,value:ue(this,n)}),this._rawHtml=this.replaceSlideNonce(e.html),this._rawHtml=le(this._rawHtml,e.fontPrefix),this._payload=e.payload,this._html=this._rawHtml}updatePlaceholders(e){let t=this._rawHtml;for(const r of e)t=se(t,`%${r.key}%`,r.value);this._html=t}replaceSlideNonce(e){var t;return se(e,"{{nonce}}",null!==(t=O())&&void 0!==t?t:"")}},t=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[ee.observable],function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0}(e,null,r,{kind:"accessor",name:"_html",static:!1,private:!1,access:{has:e=>"_html"in e,get:e=>e._html,set:(e,t)=>{e._html=t}},metadata:t},i,n),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();var fe=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0};let pe=(()=>{var e,t;let r,i=[],n=[];return e=class{get _banners(){return function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}(this,t,"f")}set _banners(e){!function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?n.call(e,r):n?n.value=r:t.set(e,r)}(this,t,e,"f")}constructor(e){Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"style",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t.set(this,fe(this,i,[])),fe(this,n),this.id=e.id,this._banners=e.banners,this.style=e.style}get banners(){return this._banners}updatePlaceholders(e){for(const t of this._banners)t.updatePlaceholders(e)}},t=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[ee.observable],function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0}(e,null,r,{kind:"accessor",name:"_banners",static:!1,private:!1,access:{has:e=>"_banners"in e,get:e=>e._banners,set:(e,t)=>{e._banners=t}},metadata:t},i,n),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();const be=(e,t)=>{if("number"==typeof e)return e;if("string"==typeof e){const t=parseFloat(e);if(!isNaN(t))return t}return t};var me=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},ve=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},ge=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},ye=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};let we=(()=>{var e,t;let r,i=[],n=[];return e=class{get borderRadius(){return ge(this,t,"f")}set borderRadius(e){ye(this,t,e,"f")}update(e){this.borderRadius=be(null==e?void 0:e.borderRadius,this.borderRadius)}constructor(){t.set(this,ve(this,i,12)),ve(this,n)}},t=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[ee.observable],me(e,null,r,{kind:"accessor",name:"borderRadius",static:!1,private:!1,access:{has:e=>"borderRadius"in e,get:e=>e.borderRadius,set:(e,t)=>{e.borderRadius=t}},metadata:t},i,n),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})(),Se=(()=>{var e,t,r,i,n,a,s,o,l,c,d,u,h,f;let p,b,m,v,g,y,w,S,P,_,M,T,x,A=[],O=[],E=[],k=[],L=[],B=[],I=[],R=[],j=[],C=[],F=[],D=[],N=[],z=[],W=[],V=[],q=[],G=[],U=[],H=[],$=[],Y=[],X=[],K=[],Q=[],J=[];return e=class{get loop(){return ge(this,t,"f")}set loop(e){ye(this,t,e,"f")}get gap(){return ge(this,r,"f")}set gap(e){ye(this,r,e,"f")}get autoplay(){return ge(this,i,"f")}set autoplay(e){ye(this,i,e,"f")}get animationSpeed(){return ge(this,n,"f")}set animationSpeed(e){ye(this,n,e,"f")}get slidesPerView(){return ge(this,a,"f")}set slidesPerView(e){ye(this,a,e,"f")}get navigation(){return ge(this,s,"f")}set navigation(e){ye(this,s,e,"f")}get pagination(){return ge(this,o,"f")}set pagination(e){ye(this,o,e,"f")}get direction(){return ge(this,l,"f")}set direction(e){ye(this,l,e,"f")}get allowTouchMove(){return ge(this,c,"f")}set allowTouchMove(e){ye(this,c,e,"f")}get touchRatio(){return ge(this,d,"f")}set touchRatio(e){ye(this,d,e,"f")}get longSwipesRatio(){return ge(this,u,"f")}set longSwipesRatio(e){ye(this,u,e,"f")}get swipeThreshold(){return ge(this,h,"f")}set swipeThreshold(e){ye(this,h,e,"f")}get edgeTouchRatio(){return ge(this,f,"f")}set edgeTouchRatio(e){ye(this,f,e,"f")}constructor(e){t.set(this,ve(this,A,!0)),r.set(this,(ve(this,O),ve(this,E,16))),i.set(this,(ve(this,k),ve(this,L,!0))),n.set(this,(ve(this,B),ve(this,I,300))),a.set(this,(ve(this,R),ve(this,j,1))),s.set(this,(ve(this,C),ve(this,F,{enabled:!0}))),o.set(this,(ve(this,D),ve(this,N,{enabled:!0}))),l.set(this,(ve(this,z),ve(this,W,"row"))),c.set(this,(ve(this,V),ve(this,q,!0))),d.set(this,(ve(this,G),ve(this,U,1))),u.set(this,(ve(this,H),ve(this,$,.5))),h.set(this,(ve(this,Y),ve(this,X,20))),f.set(this,(ve(this,K),ve(this,Q,.3))),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:(ve(this,J),new we)}),e&&this.update(e)}update(e){var t,r,i,n,a,s,o,l;this.loop=null!==(t=null==e?void 0:e.loop)&&void 0!==t?t:this.loop,this.gap=be(null==e?void 0:e.gap,this.gap),this.autoplay=null!==(r=null==e?void 0:e.autoplay)&&void 0!==r?r:this.autoplay,this.animationSpeed=be(null==e?void 0:e.animationSpeed,this.animationSpeed),this.slidesPerView=Math.max(be(null==e?void 0:e.slidesPerView,this.slidesPerView),0),this.navigation={enabled:null!==(n=null===(i=null==e?void 0:e.navigation)||void 0===i?void 0:i.enabled)&&void 0!==n?n:this.navigation.enabled},this.pagination={enabled:null!==(s=null===(a=null==e?void 0:e.pagination)||void 0===a?void 0:a.enabled)&&void 0!==s?s:this.pagination.enabled},this.direction=null!==(o=e.direction)&&void 0!==o?o:this.direction,this.allowTouchMove=null!==(l=e.allowTouchMove)&&void 0!==l?l:this.allowTouchMove,this.touchRatio=be(null==e?void 0:e.touchRatio,this.touchRatio),this.longSwipesRatio=be(null==e?void 0:e.longSwipesRatio,this.longSwipesRatio),this.swipeThreshold=be(null==e?void 0:e.swipeThreshold,this.swipeThreshold),this.edgeTouchRatio=be(null==e?void 0:e.edgeTouchRatio,this.edgeTouchRatio),this.banner.update(e.banner)}},t=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;p=[ee.observable],b=[ee.observable],m=[ee.observable],v=[ee.observable],g=[ee.observable],y=[ee.observable],w=[ee.observable],S=[ee.observable],P=[ee.observable],_=[ee.observable],M=[ee.observable],T=[ee.observable],x=[ee.observable],me(e,null,p,{kind:"accessor",name:"loop",static:!1,private:!1,access:{has:e=>"loop"in e,get:e=>e.loop,set:(e,t)=>{e.loop=t}},metadata:t},A,O),me(e,null,b,{kind:"accessor",name:"gap",static:!1,private:!1,access:{has:e=>"gap"in e,get:e=>e.gap,set:(e,t)=>{e.gap=t}},metadata:t},E,k),me(e,null,m,{kind:"accessor",name:"autoplay",static:!1,private:!1,access:{has:e=>"autoplay"in e,get:e=>e.autoplay,set:(e,t)=>{e.autoplay=t}},metadata:t},L,B),me(e,null,v,{kind:"accessor",name:"animationSpeed",static:!1,private:!1,access:{has:e=>"animationSpeed"in e,get:e=>e.animationSpeed,set:(e,t)=>{e.animationSpeed=t}},metadata:t},I,R),me(e,null,g,{kind:"accessor",name:"slidesPerView",static:!1,private:!1,access:{has:e=>"slidesPerView"in e,get:e=>e.slidesPerView,set:(e,t)=>{e.slidesPerView=t}},metadata:t},j,C),me(e,null,y,{kind:"accessor",name:"navigation",static:!1,private:!1,access:{has:e=>"navigation"in e,get:e=>e.navigation,set:(e,t)=>{e.navigation=t}},metadata:t},F,D),me(e,null,w,{kind:"accessor",name:"pagination",static:!1,private:!1,access:{has:e=>"pagination"in e,get:e=>e.pagination,set:(e,t)=>{e.pagination=t}},metadata:t},N,z),me(e,null,S,{kind:"accessor",name:"direction",static:!1,private:!1,access:{has:e=>"direction"in e,get:e=>e.direction,set:(e,t)=>{e.direction=t}},metadata:t},W,V),me(e,null,P,{kind:"accessor",name:"allowTouchMove",static:!1,private:!1,access:{has:e=>"allowTouchMove"in e,get:e=>e.allowTouchMove,set:(e,t)=>{e.allowTouchMove=t}},metadata:t},q,G),me(e,null,_,{kind:"accessor",name:"touchRatio",static:!1,private:!1,access:{has:e=>"touchRatio"in e,get:e=>e.touchRatio,set:(e,t)=>{e.touchRatio=t}},metadata:t},U,H),me(e,null,M,{kind:"accessor",name:"longSwipesRatio",static:!1,private:!1,access:{has:e=>"longSwipesRatio"in e,get:e=>e.longSwipesRatio,set:(e,t)=>{e.longSwipesRatio=t}},metadata:t},$,Y),me(e,null,T,{kind:"accessor",name:"swipeThreshold",static:!1,private:!1,access:{has:e=>"swipeThreshold"in e,get:e=>e.swipeThreshold,set:(e,t)=>{e.swipeThreshold=t}},metadata:t},X,K),me(e,null,x,{kind:"accessor",name:"edgeTouchRatio",static:!1,private:!1,access:{has:e=>"edgeTouchRatio"in e,get:e=>e.edgeTouchRatio,set:(e,t)=>{e.edgeTouchRatio=t}},metadata:t},Q,J),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();var Pe=d(315);class _e{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"eventId",{enumerable:!0,configurable:!0,writable:!0,value:(0,Pe.v4)()})}get type(){return"view"}toQueryParams(){return{ei:this.eventId,ii:this.payload.iterationId,si:this.payload.slideIndex,st:this.payload.slideTotal}}}class Me{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"eventId",{enumerable:!0,configurable:!0,writable:!0,value:(0,Pe.v4)()})}get type(){return this.payload.type}toQueryParams(){return Object.assign({ei:this.eventId,ii:this.payload.iterationId,si:this.payload.slideIndex,st:this.payload.slideTotal,d:this.payload.durationMs},this.payload.widgetPayload)}}class Te{constructor(){Object.defineProperty(this,"autoplay",{enumerable:!0,configurable:!0,writable:!0,value:{isPaused:function(){return!1},resume:function(){},pause:function(){},start:function(){},stop:function(){},setDelay:function(){}}})}updateSize(){}enableHorizontalSwipeGesture(){}disableHorizontalSwipeGesture(){}getTotalPages(){return 1}getActiveIndex(){return 0}toNextSlide(){}toPrevSlide(){}slideTo(e,t){}}var xe,Ae=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},Oe=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},Ee=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},ke=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};!function(e){e.LoadStart="loadStart",e.LoadEnd="loadEnd",e.LoadError="loadError",e.ActiveIndexChange="activeIndexChange",e.AutoplayTimeLeft="autoplayTimeLeft",e.AutoplayTimerTick="autoplayTimerTick",e.ShowBanner="showBanner",e.ShowBannerFailed="showBannerFailed",e.BannerWidget="bannerWidget"}(xe||(xe={}));let Le=(()=>{var e,t,r,i,n,a;let s,o,l,c,d,u=H.EventEmitter,h=[],f=[],p=[],b=[],m=[],v=[],g=[],y=[],w=[],S=[];return e=class extends u{get _banners(){return Ee(this,t,"f")}set _banners(e){ke(this,t,e,"f")}get _bannerPlace(){return Ee(this,r,"f")}set _bannerPlace(e){ke(this,r,e,"f")}get _isLoading(){return Ee(this,i,"f")}set _isLoading(e){ke(this,i,e,"f")}get _isLoaded(){return Ee(this,n,"f")}set _isLoaded(e){ke(this,n,e,"f")}get _error(){return Ee(this,a,"f")}set _error(e){ke(this,a,e,"f")}constructor(e,s,o,l,c){super(),Object.defineProperty(this,"placeId",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"ctx",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"bannerStatisticService",{enumerable:!0,configurable:!0,writable:!0,value:o}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(this,"bannerViewModelFactory",{enumerable:!0,configurable:!0,writable:!0,value:c}),t.set(this,Oe(this,h,[])),r.set(this,(Oe(this,f),Oe(this,p,null))),i.set(this,(Oe(this,b),Oe(this,m,!1))),n.set(this,(Oe(this,v),Oe(this,g,!1))),a.set(this,(Oe(this,y),Oe(this,w,null))),Object.defineProperty(this,"appearance",{enumerable:!0,configurable:!0,writable:!0,value:(Oe(this,S),new Se)}),Object.defineProperty(this,"sliderController",{enumerable:!0,configurable:!0,writable:!0,value:new Te}),this.ctx.addBannerPlace(this)}get dir(){return this.ctx.getConfig().dir}get id(){return this.placeId}get banners(){return this._banners}get contentRatio(){const e=this._banners.map(e=>e.contentRatio);return this.median(e)}get isLoaded(){return this._isLoaded}get isLoading(){return this._isLoading}get error(){return this._error}get slider(){return this.sliderController}get activeIndex(){return this.sliderController.getActiveIndex()}get activeBanner(){return this._banners[this.activeIndex]}get paginationBullets(){return this.sliderController.getTotalPages()}refreshSizes(){this._banners.forEach(e=>e.refreshSizes())}setSliderController(e){this.sliderController=e}updateAppearance(e){this.appearance.update(e)}resume(){for(const e of this._banners)e.resumeByUser();this.appearance.autoplay&&this.slider.autoplay.resume()}pause(){for(const e of this._banners)e.pauseByUser();this.appearance.autoplay&&this.slider.autoplay.pause()}async reload(){this.bannerStore.removeBannerPlaceById(this.id),await Promise.all(this._banners.map(e=>e.destroy())),this._banners=[],await this.fetchBanners()}destroy(){this.sliderController=new Te;for(const e of this._banners)e.destroy();this._banners=[],this.ctx.removeBannerPlace(this)}notifyTimerEnd(){var e;null===(e=this.activeBanner)||void 0===e||e.notifyTimerEnd()}showNext(){this.sliderController.toNextSlide()}showPrevious(){this.sliderController.toPrevSlide()}showByIndex(e,t){this.sliderController.slideTo(e,t)}async updateUserData(e){return this.bannerStore.updateBannerUserData(this.id,e)}async fetchBanners(){try{if((await this.ctx.getConfig()).anonymous)return console.warn("[IAS]: You can't fetch banners in anonymous access mode"),[];if(this._isLoading)return[];this._isLoading=!0,this._isLoaded=!1,this._error=null,this.emit(xe.LoadStart),this._bannerPlace=await this.bannerStore.getBannerPlaceById({placeId:this.placeId});let e=this.filterBannersByTimeRange(this._bannerPlace.banners);return e=this.filterBannersByContent(e),this._banners=e.map(e=>this.bannerViewModelFactory.create(this,e)),await Promise.allSettled(this._banners.map(e=>e.waitInit())),this._isLoaded=!0,this._banners}catch(e){throw this.emit(xe.LoadError,e),this._error=e,e}finally{this.emit(xe.LoadEnd,{banners:this._banners.slice()}),this._isLoading=!1}}filterBannersByTimeRange(e){return e.filter(e=>e.withinDisplayTimeRange)}filterBannersByContent(e){return e.filter(e=>Boolean(e.slides.length))}median(e){const t=[...e].sort((e,t)=>e-t),r=Math.floor(t.length/2);return t.length%2==0?(t[r-1]+t[r])/2:t[r]}},t=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,(()=>{var t;const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=u[Symbol.metadata])&&void 0!==t?t:null):void 0;s=[ee.observable],o=[ee.observable],l=[ee.observable],c=[ee.observable],d=[ee.observable],Ae(e,null,s,{kind:"accessor",name:"_banners",static:!1,private:!1,access:{has:e=>"_banners"in e,get:e=>e._banners,set:(e,t)=>{e._banners=t}},metadata:r},h,f),Ae(e,null,o,{kind:"accessor",name:"_bannerPlace",static:!1,private:!1,access:{has:e=>"_bannerPlace"in e,get:e=>e._bannerPlace,set:(e,t)=>{e._bannerPlace=t}},metadata:r},p,b),Ae(e,null,l,{kind:"accessor",name:"_isLoading",static:!1,private:!1,access:{has:e=>"_isLoading"in e,get:e=>e._isLoading,set:(e,t)=>{e._isLoading=t}},metadata:r},m,v),Ae(e,null,c,{kind:"accessor",name:"_isLoaded",static:!1,private:!1,access:{has:e=>"_isLoaded"in e,get:e=>e._isLoaded,set:(e,t)=>{e._isLoaded=t}},metadata:r},g,y),Ae(e,null,d,{kind:"accessor",name:"_error",static:!1,private:!1,access:{has:e=>"_error"in e,get:e=>e._error,set:(e,t)=>{e._error=t}},metadata:r},w,S),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();const Be=e=>((0,t.useEffect)(()=>(e.onLoadStart&&e.bannerPlace.on(xe.LoadStart,e.onLoadStart),e.onLoadEnd&&e.bannerPlace.on(xe.LoadEnd,e.onLoadEnd),e.onLoadError&&e.bannerPlace.on(xe.LoadError,e.onLoadError),e.onActiveIndexChange&&e.bannerPlace.on(xe.ActiveIndexChange,e.onActiveIndexChange),e.onAutoplayTimeLeft&&e.bannerPlace.on(xe.AutoplayTimeLeft,e.onAutoplayTimeLeft),e.onAutoplayTimerTick&&e.bannerPlace.on(xe.AutoplayTimerTick,e.onAutoplayTimerTick),e.onShowBanner&&e.bannerPlace.on(xe.ShowBanner,e.onShowBanner),e.onShowBannerFailed&&e.bannerPlace.on(xe.ShowBannerFailed,e.onShowBannerFailed),e.onBannerWidget&&e.bannerPlace.on(xe.BannerWidget,e.onBannerWidget),()=>{e.onLoadStart&&e.bannerPlace.off(xe.LoadStart,e.onLoadStart),e.onLoadEnd&&e.bannerPlace.off(xe.LoadEnd,e.onLoadEnd),e.onLoadError&&e.bannerPlace.off(xe.LoadError,e.onLoadError),e.onActiveIndexChange&&e.bannerPlace.off(xe.ActiveIndexChange,e.onActiveIndexChange),e.onAutoplayTimeLeft&&e.bannerPlace.off(xe.AutoplayTimeLeft,e.onAutoplayTimeLeft),e.onAutoplayTimerTick&&e.bannerPlace.off(xe.AutoplayTimerTick,e.onAutoplayTimerTick),e.onShowBanner&&e.bannerPlace.off(xe.ShowBanner,e.onShowBanner),e.onShowBannerFailed&&e.bannerPlace.off(xe.ShowBannerFailed,e.onShowBannerFailed),e.onBannerWidget&&e.bannerPlace.off(xe.BannerWidget,e.onBannerWidget)}),[e.bannerPlace,e.onLoadStart,e.onLoadError,e.onLoadEnd,e.onActiveIndexChange,e.onAutoplayTimeLeft,e.onAutoplayTimerTick,e.onShowBanner,e.onShowBannerFailed,e.onBannerWidget]),(0,t.useEffect)(()=>{(async e=>{try{await e.fetchBanners()}catch(e){console.error(e)}})(e.bannerPlace)},[e.bannerPlace]),e.bannerPlace.banners),Ie=e=>{(0,t.useEffect)(()=>{e.appearance&&e.bannerPlace.updateAppearance(e.appearance)},[e.bannerPlace,JSON.stringify(e.appearance)])},Re=({bannerPlace:e,bannerPlaceRef:r})=>{const[i,n]=(0,t.useState)(!1),[a,s]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let t=!1,i=()=>{};const a=()=>{t=!0,i(),n(!1)};if(!(e=>e.isLoaded&&e.banners.length>0)(e))return s(null),a;n(!1),s(null);const{promise:o,abort:l}=((e,t=1e4)=>{let r,i,n=!1;const a=e=>{n||(n=!0,r&&clearTimeout(r),i&&cancelAnimationFrame(i),e())};return{promise:new Promise((n,s)=>{r=setTimeout(()=>{a(()=>s(new Error("[IAS]: Unable to calculate banner place width. Check if you are using ad blockers such as AdBlock, uBlock Origin, etc.")))},t);const o=()=>{var t,r;(null!==(r=null===(t=e.current)||void 0===t?void 0:t.clientWidth)&&void 0!==r?r:0)>0?a(n):i=requestAnimationFrame(o)};i=requestAnimationFrame(o)}),abort:()=>{a(()=>{})}}})(r);return i=l,o.then(()=>{t||n(!0)}).catch(e=>{t||(s(e),console.error(e))}),a},[e,e.isLoaded,e.banners.length]),{canBeShown:i,error:a}},je=(0,r.observer)(r=>{const i=(0,t.useRef)(null),n=Be(r);Ie(r);const{realIndex:a,allowClick:s,slider:o,isAnimating:l,setSlider:c,isMoved:d}=(e=>{const r=(0,t.useRef)(null),[i,n]=(0,t.useState)(!1),[a,s]=(0,t.useState)(!1),[o,l]=(0,t.useState)(!1),[c,d]=(0,t.useState)(!0),[u,h]=(0,t.useState)(null),[f,p]=(0,t.useState)(0),[b,m]=(0,t.useState)(0),[v,g]=(0,t.useState)(!0),[y,w]=(0,t.useState)(!0),S=()=>{clearTimeout(r.current),d(!1),l(!0),((e,t)=>{e.getVisibleSlideIndexes().map(e=>t.banners[e]).forEach(e=>e.pause())})(u,e)},P=()=>{r.current=setTimeout(()=>d(!0),100),l(!1),((e,t)=>{t.banners.forEach(e=>e.resume())})(0,e)},_=()=>{s(!0),d(!1)},M=()=>{s(!1),d(!0)},T=t=>{m(t),e.emit(xe.ActiveIndexChange,t)},x=e=>{p(e)},A=()=>{u&&g(u.reachStart)},O=()=>{u&&w(u.reachEnd)},E=()=>{},k=()=>{e.refreshSizes(),requestAnimationFrame(()=>{e.refreshSizes(),n(e=>!e)})},L=()=>{e.emit(xe.AutoplayTimeLeft),e.notifyTimerEnd()},B=t=>{e.emit(xe.AutoplayTimerTick,Object.assign(Object.assign({},t),{bannerIndex:e.activeIndex}))};return(0,t.useEffect)(()=>{if(!u)return;const t=new Z(u);e.setSliderController(t)},[e,u]),(0,t.useEffect)(()=>{u&&e&&e.banners[u.realIndex].markAsOpened()},[e,u]),(0,t.useEffect)(()=>{if(u)return u.on(q.TouchStart,S),u.on(q.TouchEnd,P),u.on(q.TransitionStart,_),u.on(q.TransitionEnd,M),u.on(q.RealIndexChnage,T),u.on(q.ActiveIndexChange,x),u.on(q.ReachStart,A),u.on(q.ReachEnd,O),u.on(q.Resize,E),u.on(q.SlidesUpdated,k),u.on(q.AutoplayTimeLeft,L),u.on(q.AutoplayTimerTick,B),A(),O(),()=>{u.off(q.TouchStart,S),u.off(q.TouchEnd,P),u.off(q.TransitionStart,_),u.off(q.TransitionEnd,M),u.off(q.RealIndexChnage,T),u.off(q.ActiveIndexChange,x),u.off(q.ReachStart,A),u.off(q.ReachEnd,O),u.off(q.Resize,E),u.off(q.SlidesUpdated,k),u.off(q.AutoplayTimeLeft,L),u.off(q.AutoplayTimerTick,B)}},[e,u]),{reachStart:v,reachEnd:y,activeIndex:f,realIndex:b,isMoved:o,isAnimating:a,slider:u,setSlider:h,allowClick:c}})(r.bannerPlace),{error:u,canBeShown:h}=Re({bannerPlace:r.bannerPlace,bannerPlaceRef:i});(0,t.useEffect)(()=>{o&&h&&(o.updateSize(),r.bannerPlace.refreshSizes(),requestAnimationFrame(()=>{r.bannerPlace.refreshSizes()}))},[r.bannerPlace,h]);const f=r.bannerPlace.appearance;return!r.bannerPlace.banners.length||u?null:(0,e.jsx)("div",{className:M()(B.f,r.className),style:Object.assign(Object.assign({},r.style),{"--ias-bnr-place-border-radius":`${f.banner.borderRadius}px`}),ref:i,children:(0,e.jsx)(K,{onInit:c,autoplay:f.autoplay,speed:f.animationSpeed,loop:f.loop,slidesPerView:f.slidesPerView,spaceBetween:f.gap,slidesCount:n.length,navigation:f.navigation,pagination:f.pagination,direction:f.direction,allowTouchMove:f.allowTouchMove,touchRatio:f.touchRatio,longSwipesRatio:f.longSwipesRatio,swipeThreshold:f.swipeThreshold,edgeTouchRatio:f.edgeTouchRatio,langDirection:r.bannerPlace.dir,children:n.map((t,r)=>{const i=Boolean(null==o?void 0:o.isSlideVisible(r))&&h;return(0,e.jsx)(Q,{children:(0,e.jsx)(k,{index:r,isActive:i,canBeInited:i,banner:t,allowClick:s,clientAppearance:f.banner,direction:f.direction})},t.id)})})})});var Ce=d(236);class Fe{constructor(e,t,r){Object.defineProperty(this,"mountPoint",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rootElement",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.rootElement=document.createElement("div"),this.rootElement.style.width="100%",this.rootElement.style.height="100%",e.appendChild(this.rootElement),this.root=(0,Ce.createRoot)(this.rootElement)}get dir(){return this.bannerPlace.dir}get activeIndex(){return this.bannerPlace.activeIndex}get activeBanner(){return this.bannerPlace.activeBanner}get isLoaded(){return this.bannerPlace.isLoaded}get id(){return this.bannerPlace.id}get banners(){return this.bannerPlace.banners}get appearance(){return this.bannerPlace.appearance}get contentRatio(){return this.bannerPlace.contentRatio}get isLoading(){return this.bannerPlace.isLoading}get error(){return this.bannerPlace.error}get slider(){return this.bannerPlace.slider}get paginationBullets(){return this.bannerPlace.slider.getTotalPages()}refreshSizes(){}emit(e,...t){}setSliderController(e){this.bannerPlace.setSliderController(e)}updateAppearance(e){this.bannerPlace.updateAppearance(e)}resume(){this.bannerPlace.resume()}pause(){this.bannerPlace.pause()}reload(){return this.bannerPlace.reload()}destroy(){setTimeout(()=>{this.root.unmount()}),this.mountPoint.removeChild(this.rootElement),this.bannerPlace.destroy()}fetchBanners(){return this.bannerPlace.fetchBanners()}updateUserData(e){return Promise.resolve()}notifyTimerEnd(){this.bannerPlace.notifyTimerEnd()}showNext(){this.bannerPlace.showNext()}showPrevious(){this.bannerPlace.showPrevious()}showByIndex(e,t){this.bannerPlace.showByIndex(e,t)}on(e,t){return this.bannerPlace.on(e,t),this}once(e,t){return this.bannerPlace.once(e,t),this}off(e,t){return this.bannerPlace.off(e,t),this}render(){var t;this.root.render((0,e.jsx)(je,{appearance:null===(t=this.params)||void 0===t?void 0:t.appearance,bannerPlace:this.bannerPlace}))}}class De extends Fe{render(){var t;this.root.render((0,e.jsx)(Ue,{appearance:null===(t=this.params)||void 0===t?void 0:t.appearance,bannerPlace:this.bannerPlace}))}}var Ne=d(713),ze={};ze.styleTagTransform=m(),ze.setAttributes=h(),ze.insert=l().bind(null,"head"),ze.domAPI=s(),ze.insertStyleElement=p(),n()(Ne.A,ze),Ne.A&&Ne.A.locals&&Ne.A.locals;const We=(0,r.observer)(r=>{const i=Be(r),n=(0,t.useRef)(null),{error:a,canBeShown:s}=Re({bannerPlace:r.bannerPlace,bannerPlaceRef:n}),o=i[0],l=!0;return(0,t.useEffect)(()=>{s&&(r.bannerPlace.refreshSizes(),requestAnimationFrame(()=>{r.bannerPlace.refreshSizes()}))},[r.bannerPlace,s]),r.bannerPlace.error||a?null:(0,e.jsx)("div",{className:Ne.f,ref:n,children:o&&s&&!r.bannerPlace.isLoading?(0,e.jsx)(k,{index:0,isActive:l,canBeInited:l,banner:o,allowClick:!0,clientAppearance:r.bannerPlace.appearance.banner}):(0,e.jsx)(x,{needShowErrorScreen:!1,needShowLoaderScreen:!0,onReload:()=>{}})})});var Ve=d(883),qe={};qe.styleTagTransform=m(),qe.setAttributes=h(),qe.insert=l().bind(null,"head"),qe.domAPI=s(),qe.insertStyleElement=p(),n()(Ve.A,qe),Ve.A&&Ve.A.locals&&Ve.A.locals;const Ge=({banner:r,index:i,clientAppearance:n,canBeShown:a})=>{const[s,o]=(0,t.useState)(!1),l=(0,t.useRef)(null);return(0,t.useEffect)(()=>{const e=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>=.5?o(!0):o(!1)})},{threshold:[0,.5,1]});return l.current&&e.observe(l.current),()=>{l.current&&e.unobserve(l.current)}},[]),(0,e.jsx)(k,{index:i,isActive:s&&a,canBeInited:s&&a,banner:r,allowClick:!0,clientAppearance:n,direction:"row",ref:l},r.id)},Ue=(0,r.observer)(r=>{const i=(0,t.useRef)(null),n=Be(r);Ie(r);const{error:a,canBeShown:s}=Re({bannerPlace:r.bannerPlace,bannerPlaceRef:i});(0,t.useEffect)(()=>{s&&(r.bannerPlace.refreshSizes(),requestAnimationFrame(()=>{r.bannerPlace.refreshSizes()}))},[r.bannerPlace,s]);const o=r.bannerPlace.appearance;return!r.bannerPlace.banners.length||a?null:(0,e.jsx)("div",{className:M()(Ve.f,r.className),style:Object.assign(Object.assign({},r.style),{gap:o.gap}),ref:i,children:n.map((t,r)=>(0,e.jsx)(Ge,{banner:t,canBeShown:s,index:r,clientAppearance:o.banner},t.id))})});var He=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},$e=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},Ye=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},Xe=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};let Ke=(()=>{var e,t,r,i,n;let a,s,o,l,c=H.EventEmitter,d=[],u=[],h=[],f=[],p=[],b=[],m=[],v=[];return e=class extends c{get _banners(){return Ye(this,t,"f")}set _banners(e){Xe(this,t,e,"f")}get _isLoading(){return Ye(this,r,"f")}set _isLoading(e){Xe(this,r,e,"f")}get _isLoaded(){return Ye(this,i,"f")}set _isLoaded(e){Xe(this,i,e,"f")}get _error(){return Ye(this,n,"f")}set _error(e){Xe(this,n,e,"f")}constructor(e,a,s,o){super(),Object.defineProperty(this,"bannerId",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"ctx",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"bannerViewModelFactory",{enumerable:!0,configurable:!0,writable:!0,value:o}),t.set(this,$e(this,d,[])),r.set(this,($e(this,u),$e(this,h,!1))),i.set(this,($e(this,f),$e(this,p,!1))),n.set(this,($e(this,b),$e(this,m,null))),Object.defineProperty(this,"appearance",{enumerable:!0,configurable:!0,writable:!0,value:($e(this,v),new Se)}),this.ctx.addBannerPlace(this)}get dir(){return this.ctx.getConfig().dir}get activeIndex(){return 0}get activeBanner(){return this._banners[0]}get id(){return"__BANNER_PREVIEW__"}get slider(){return new Te}get banners(){return this._banners}get isLoading(){return this._isLoading}get isLoaded(){return this._isLoaded}get contentRatio(){var e,t;return null!==(t=null===(e=this._banners[0])||void 0===e?void 0:e.contentRatio)&&void 0!==t?t:1}get paginationBullets(){return 1}get error(){return this._error}refreshSizes(){this._banners.forEach(e=>e.refreshSizes())}setSliderController(e){}updateAppearance(e){this.appearance.update(e)}resume(){for(const e of this._banners)e.resume()}pause(){for(const e of this._banners)e.pause()}async reload(){this.bannerStore.removeBannerPlaceById(this.id),await Promise.all(this._banners.map(e=>e.destroy())),this._banners=[],await this.fetchBanners()}destroy(){for(const e of this._banners)e.destroy();this._banners=[],this.ctx.removeBannerPlace(this)}async updateUserData(e){return this.bannerStore.updateBannerUserData(this.id,e)}notifyTimerEnd(){}showNext(){}showPrevious(){}showByIndex(e,t){}async fetchBanners(){try{if(this._isLoading)return[];this._error=null,this._isLoading=!0,this._isLoaded=!1,this.emit(xe.LoadStart);const e=await this.bannerStore.getBannerById(this.bannerId);return e.slides.length?(this._banners=[this.bannerViewModelFactory.create(this,e)],this._isLoaded=!0,this._banners):[]}catch(e){throw this.emit(xe.LoadError,e),this._error=e,e}finally{this.emit(xe.LoadEnd),this._isLoading=!1}}},t=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,(()=>{var t;const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[ee.observable],s=[ee.observable],o=[ee.observable],l=[ee.observable],He(e,null,a,{kind:"accessor",name:"_banners",static:!1,private:!1,access:{has:e=>"_banners"in e,get:e=>e._banners,set:(e,t)=>{e._banners=t}},metadata:r},d,u),He(e,null,s,{kind:"accessor",name:"_isLoading",static:!1,private:!1,access:{has:e=>"_isLoading"in e,get:e=>e._isLoading,set:(e,t)=>{e._isLoading=t}},metadata:r},h,f),He(e,null,o,{kind:"accessor",name:"_isLoaded",static:!1,private:!1,access:{has:e=>"_isLoaded"in e,get:e=>e._isLoaded,set:(e,t)=>{e._isLoaded=t}},metadata:r},p,b),He(e,null,l,{kind:"accessor",name:"_error",static:!1,private:!1,access:{has:e=>"_error"in e,get:e=>e._error,set:(e,t)=>{e._error=t}},metadata:r},m,v),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();class Qe{constructor(e){Object.defineProperty(this,"bannerStatisticApi",{enumerable:!0,configurable:!0,writable:!0,value:e})}async sendViewEvent(e,t){const r=new _e(t);await this.bannerStatisticApi.sendViewEvent(e,r)}async sendWidgetEvent(e,t){const r=new Me(t);await this.bannerStatisticApi.sendWidgetEvent(e,r)}}class Je{constructor(){Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:{}})}set(e,t){this.cache[e]=t}clear(){this.cache={}}get(e){return this.cache[e]}}class Ze{constructor(e,t,r){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlaceViewModel",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:r})}async handle(e){try{const t=this.storyManager.gameReader;await t.openGame(e.gameInstanceId),this.bannerPlaceViewModel.pause(),t.once("close",()=>{this.bannerPlaceViewModel.resume()})}catch(e){console.error(e)}}}var et,tt,rt,it,nt,at,st,ot,lt,ct,dt,ut,ht,ft,pt,bt,mt,vt,gt,yt;!function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(et||(et={})),et.END,function(e){e.Text="text",e.Link="link",e.Image="image"}(tt||(tt={})),function(e){e.DEFAULT="default",e.CUSTOM_CARD="customCard"}(rt||(rt={})),rt.DEFAULT,rt.DEFAULT,function(e){e.CENTER="center",e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(it||(it={})),function(e){e.CIRCLE="circle",e.QUAD="quad",e.RECTANGLE="rectangle"}(nt||(nt={})),function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end",e.CENTER="center"}(at||(at={})),function(e){e.CARD_INSIDE_BOTTOM="cardInsideBottom",e.CARD_OUTSIDE_TOP="cardOutsideTop",e.CARD_OUTSIDE_BOTTOM="cardOutsideBottom"}(st||(st={})),function(e){e.Medium="medium",e.High="high"}(ot||(ot={})),function(e){e.COLUMN="vertical",e.ROW="horizontal"}(lt||(lt={})),function(e){e.START_LOADER="startLoad",e.END_LOADER="endLoad"}(ct||(ct={})),lt.ROW,at.START,st.CARD_INSIDE_BOTTOM,ot.High,nt.RECTANGLE,at.START,st.CARD_INSIDE_BOTTOM,ot.High,nt.CIRCLE,it.START,at.START,st.CARD_INSIDE_BOTTOM,ot.High,nt.CIRCLE,function(e){e.WidgetEvent="widgetEvent",e.ClickOnButton="clickOnButton"}(dt||(dt={})),function(e){e.STORY_LIST="storyList",e.STORY_READER="storyReader",e.GAME_READER="gameReader",e.STACK_STORY_LIST="stackStoryList",e.IAM_READER="iamReader",e.BANNERS="banners"}(ut||(ut={})),function(e){e.FLAT="flat",e.COVER="cover",e.CUBE="cube"}(ht||(ht={})),function(e){e.Classic="classic",e.Modern="modern"}(ft||(ft={})),ht.FLAT,ft.Classic,function(e){e.STYLE_CIRCLE="circle",e.STYLE_QUAD="quad",e.STYLE_RECTANGLE="rectangle",e.SWIPE_CUBE="cube",e.SWIPE_FLAT="flat",e.SWIPE_COVER="cover",e.CLOSE_BUTTON_LEFT="left",e.CLOSE_BUTTON_RIGHT="right"}(pt||(pt={})),function(e){e.direct="direct",e.onboarding="onboarding",e.list="list",e.favorite="favorite"}(bt||(bt={})),function(e){e[e.default=0]="default",e[e.favorite=1]="favorite",e[e.stacked=2]="stacked"}(mt||(mt={})),function(e){e.LTR="ltr",e.RTL="rtl"}(vt||(vt={})),function(e){e.StoryList="storyList",e.StoryReader="storyReader",e.GameReader="gameReader",e.StackStoryList="stackStoryList",e.IamReader="iamReader",e.Banners="banners"}(gt||(gt={}));class wt{constructor(e,t){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:t})}handle(e){try{const t=decodeURIComponent(e.linkTarget),r={src:gt.Banners,data:{id:this.banner.id,index:this.banner.activeSlideIndex,url:t,elementId:e.elementId}};this.storyManager.storyLinkClickHandler(r),this.storyManager.emit("clickOnButton",r)}catch(t){t instanceof URIError?console.error(`[Banners]: the URL <${e.linkTarget}> has an invalid format`):console.error(t)}}}class St{constructor(e,t,r){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:r})}async handle(e){try{const t={src:gt.Banners,data:{id:this.banner.id,index:this.banner.activeSlideIndex,url:e.storyId.toString()}};this.storyManager.storyLinkClickHandler(t),this.storyManager.emit("clickOnButton",t),this.bannerPlace.pause(),await this.storyManager.storyReader.showStory(e.storyId),this.storyManager.storyReader.once("closeStoryReader",()=>{this.bannerPlace.resume()})}catch(e){console.error(e)}}}class Pt{constructor(){Object.defineProperty(this,"textArea",{enumerable:!0,configurable:!0,writable:!0,value:null})}async copy(e){try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(e):this.copyLegacy(e)}catch(t){this.copyLegacy(e)}}isIOS(){return/ipad|iphone/i.test(navigator.userAgent)}createTextArea(e){this.textArea=document.createElement("textarea"),this.textArea.value=e,document.body.appendChild(this.textArea)}selectText(){if(this.textArea)if(this.isIOS()){const e=document.createRange();e.selectNodeContents(this.textArea);const t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e)),this.textArea.setSelectionRange(0,999999)}else this.textArea.select()}copyLegacy(e){this.createTextArea(e),this.selectText();try{document.execCommand("copy")}catch(e){console.error("Copy failed:",e)}this.textArea&&(document.body.removeChild(this.textArea),this.textArea=null)}}class _t{constructor(e){Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:e})}manageTimer(e,t){if(!this.bannerPlace.slider)return;const r=this.bannerPlace.slider.autoplay;switch(e){case"start":this.startTimer(r,t);break;case"pause":r.pause();break;case"stop":case"before_start":r.stop()}}startTimer(e,t){e.isPaused()?e.resume():(e.setDelay(t),e.start())}}class Mt{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e})}}Object.defineProperty(Mt,"name",{enumerable:!0,configurable:!0,writable:!0,value:"bannerWidget"});class Tt{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e})}}Object.defineProperty(Tt,"name",{enumerable:!0,configurable:!0,writable:!0,value:"showBanner"});class xt{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e})}}Object.defineProperty(xt,"name",{enumerable:!0,configurable:!0,writable:!0,value:"showBannerFailed"});class At{constructor(e,t,r,i){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"bannerStatisticService",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"sessionNarrativeDataCache",{enumerable:!0,configurable:!0,writable:!0,value:new Je}),Object.defineProperty(this,"narrativeDataCache",{enumerable:!0,configurable:!0,writable:!0,value:new Je})}onVerticalScrollChange(e){}onWidgetRequirePauseUI(){this.banner.pause()}onWidgetRequireResumeUI(){this.banner.resume()}productCartUpdate(e){return Promise.reject({message:"Not implemented"})}productCartClicked(){}async productCartGetState(){return Promise.reject("Not implemented")}onEvent(e,t){}onCardLoadingStateChange(e){}updateCardServerDataLocally(e){this.banner.context.updateNarrativeSavedData(e)}async updateTimeline(e,t,r,i,n,a){"before_start"!==t&&(n?this.banner.showLoaderScreen():this.banner.activeSlide.inited&&this.banner.hideLoaderScreen(),a?this.banner.showErrorScreen():this.banner.hideErrorScreen()),new _t(this.bannerPlace).manageTimer(t,i)}clearCardSession(){this.sessionNarrativeDataCache.clear()}disableVerticalSwipeGesture(){}enableVerticalSwipeGesture(){}disableHorizontalSwipeGesture(){this.bannerPlace.slider.disableHorizontalSwipeGesture()}enableHorizontalSwipeGesture(){this.bannerPlace.slider.enableHorizontalSwipeGesture()}async getCardLocalData(){const e=this.narrativeDataCache.get(`banner_${this.banner.id}_data_${this.storyManager.rootStore.sessionStore.userId}`);return e?JSON.parse(e):{}}setCardLocalData(e,t){const r=JSON.stringify(e);this.narrativeDataCache.set(`banner_${this.banner.id}_data_${this.storyManager.rootStore.sessionStore.userId}`,r),this.banner.context.updateNarrativeSavedData(r),t&&this.banner.updateUserData(r).catch(console.error)}getCardServerData(){var e;return null!==(e=this.banner.context.widgetsData._narrative_saved_data)&&void 0!==e?e:null}getSlideDuration(e){var t,r;return null!==(r=null===(t=this.banner.context.widgetsData._narrative_slides_duration)||void 0===t?void 0:t[e])&&void 0!==r?r:null}pauseUI(){this.banner.pause()}resumeUI(){this.banner.resume()}showCardTextInput(e,t){}setCardSessionValue(e,t){this.sessionNarrativeDataCache.set(e,t)}getCardSessionValue(e){return this.sessionNarrativeDataCache.get(e)}getWidgetsSharedData(e){const t=this.banner.context.widgetsData;switch(e){case"rangeSlider":return t._narrative_range_slider_data;case"poll":return t._narrative_poll_data;case"vote":return t._narrative_vote_data;case"reactions":return t._narrative_reactions_data}return null}async sendApiRequest(e,t,r,i,n,a){var s,o,l;try{const a=await this.storyManager.httpClient.request({url:e,method:t,params:null!=r?r:{},headers:null!=i?i:{},data:null!=n?n:{}});return{status:a.status,headers:a.headers,data:a.data}}catch(e){if(e instanceof Error&&"IasNetworkError"===e.name)return{status:null!==(s=e.networkStatus)&&void 0!==s?s:400,headers:null===(o=e.response)||void 0===o?void 0:o.headers,data:null===(l=e.response)||void 0===l?void 0:l.data}}}share(e,t){}shareSlideScreenshot(e,t,r){}showLayer(e){this.banner.showLayerByIndex(e)}showCardSlide(e){var t;this.bannerPlace.activeIndex===e&&(null===(t=this.bannerPlace.activeBanner)||void 0===t||t.restart()),this.bannerPlace.slider.slideTo(e)}cardShowNext(){this.bannerPlace.slider.toNextSlide()}showNextSlide(){this.bannerPlace.slider.toNextSlide()}sendStatisticEvent(e,t,r,i){this.bannerStatisticService.sendWidgetEvent(this.banner.id,{iterationId:this.banner.iterationId,type:e,slideIndex:this.banner.activeSlideIndex,slideTotal:this.banner.slides.length,durationMs:this.banner.durationMs,widgetPayload:t}),this.bannerPlace.emit(Mt.name,new Mt({id:this.banner.id,bannerPlace:this.bannerPlace.id,widgetEventName:e,widgetData:null!=r?r:{}}).payload),this.storyManager.emit("widgetEvent",{name:e,data:r})}async resetCard(e){this.updateCardServerDataLocally({}),this.setCardLocalData({},!0),this.showCardSlide(0),this.showLayer(0)}getCardFonts(){var e,t;return null!==(t=null===(e=this.storyManager.rootStore.sessionStore.session)||void 0===e?void 0:e.fontsResources)&&void 0!==t?t:[]}showToast(e){this.banner.showToast({content:e})}closeCard(e){}openStory(e,t){new St(this.storyManager,this.bannerPlace,this.banner).handle({storyId:e,slideIndex:t})}openGame(e){new Ze(this.storyManager,this.bannerPlace,this.banner).handle({gameInstanceId:e})}writeToClipboard(e){(new Pt).copy(e.textValue)}openUrl(e){"swipeUpItems"!==e.type&&new wt(this.storyManager,this.banner).handle({elementId:e.elementId,linkTarget:e.link.target})}}!function(e){e.Top="top",e.Bottom="bottom"}(yt||(yt={}));const Ot=yt.Bottom;class Et{constructor(e){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"duration",{enumerable:!0,configurable:!0,writable:!0,value:3e3}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"position",{enumerable:!0,configurable:!0,writable:!0,value:Ot}),Object.defineProperty(this,"mountPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"toastContainer",{enumerable:!0,configurable:!0,writable:!0,value:null}),this.initializeOptions(e),this.mountPoint=e.mountPoint}show(e){return this.content=e,this.destroy(),this.createAndShowToast(),!0}hide(){return!!this.toastContainer&&(clearTimeout(this.timeoutId),this.toastContainer.className+=" toast_fadeout",this.addAnimationEndListeners(this.toastContainer,()=>{var e,t;null===(t=null===(e=this.toastContainer)||void 0===e?void 0:e.parentNode)||void 0===t||t.removeChild(this.toastContainer),this.toastContainer=null}),!0)}destroy(){var e;this.toastContainer&&(clearTimeout(this.timeoutId),null===(e=this.toastContainer.parentNode)||void 0===e||e.removeChild(this.toastContainer),this.toastContainer=null)}initializeOptions(e){if(e.duration&&(this.duration="string"==typeof e.duration?parseFloat(e.duration):e.duration),e.position){const t=e.position.toLowerCase();this.position="top"===t||"bottom"===t?t:Ot}}createAndShowToast(){const e=this.createToastContainer(),t=this.createToastElement(),r=this.createToastTextElement();t.appendChild(r),e.appendChild(t),this.mountPoint.appendChild(e),this.timeoutId=window.setTimeout(()=>this.hide(),this.duration),this.toastContainer=e}createToastContainer(){const e=document.createElement("div");return e.id="toast_container",e.className="toast_fadein",e.style.zIndex="1130",e}createToastElement(){const e=document.createElement("div");return e.id="toast",e}createToastTextElement(){const e=document.createElement("span");return e.innerHTML=this.content,e}addAnimationEndListeners(e,t){["animationend","webkitAnimationEnd","msAnimationEnd","oAnimationEnd"].forEach(r=>{e.addEventListener(r,t,{once:!0})})}}var kt=d(136);new Error("timeout while waiting for mutex to become available"),new Error("mutex already locked");const Lt=new Error("request for lock canceled");class Bt{constructor(e,t=Lt){this._value=e,this._cancelError=t,this._queue=[],this._weightedWaiters=[]}acquire(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((r,i)=>{const n={resolve:r,reject:i,weight:e,priority:t},a=It(this._queue,e=>t<=e.priority);-1===a&&e<=this._value?this._dispatchItem(n):this._queue.splice(a+1,0,n)})}runExclusive(e){return function(e,t,r,i){return new(r||(r=Promise))(function(n,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((i=i.apply(e,t||[])).next())})}(this,arguments,void 0,function*(e,t=1,r=0){const[i,n]=yield this.acquire(t,r);try{return yield e(i)}finally{n()}})}waitForUnlock(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,t)?Promise.resolve():new Promise(r=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function(e,t){const r=It(e,e=>t.priority<=e.priority);e.splice(r+1,0,t)}(this._weightedWaiters[e-1],{resolve:r,priority:t})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const t=this._value;this._value-=e.weight,e.resolve([t,this._newReleaser(e.weight)])}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const t=this._weightedWaiters[e-1];t&&(t.forEach(e=>e.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let t=this._value;t>0;t--){const r=this._weightedWaiters[t-1];if(!r)continue;const i=r.findIndex(t=>t.priority<=e);(-1===i?r:r.splice(0,i)).forEach(e=>e.resolve())}}}_couldLockImmediately(e,t){return(0===this._queue.length||this._queue[0].priority<t)&&e<=this._value}}function It(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return-1}class Rt{constructor(e){this._semaphore=new Bt(1,e)}acquire(){return function(e,t,r,i){return new(r||(r=Promise))(function(n,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((i=i.apply(e,t||[])).next())})}(this,arguments,void 0,function*(e=0){const[,t]=yield this._semaphore.acquire(1,e);return t})}runExclusive(e,t=0){return this._semaphore.runExclusive(()=>e(),1,t)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}class jt{constructor(e,t,r){Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerSlide",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"slideApi",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"mutex",{enumerable:!0,configurable:!0,writable:!0,value:new Rt}),Object.defineProperty(this,"_inited",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get html(){return this.bannerSlide.html}get state(){return this.slideApi.state}get inited(){return this._inited}get payload(){return this.bannerSlide.payload}notifyTimerEnd(){this.slideApi.slideTimerEnd()}async init(){const e=await this.mutex.acquire();if(this._inited)return;let t=this.banner.needShowLoaderScreen,r=Date.now();const i=setTimeout(()=>{this.banner.showLoaderScreen(),t=!0,r=Date.now()},500);try{this.banner.id,await this.slideApi.showSlide(this.html),this._inited=!0}catch(e){throw this.handleSlideError(e),e}finally{clearTimeout(i),await this.cleanupLoaderIfNeeded(Date.now()-r,t),e()}}async start(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideStart({muted:!0})}catch(e){throw this.handleSlideError(e),e}finally{e()}}async restart(){const e=await this.mutex.acquire();try{this.banner.hideErrorScreen(),await this.slideApi.slideRestart({muted:!0})}catch(e){throw this.handleSlideError(e),e}finally{this.banner.hideLoaderScreen(),e()}}async resume(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideAppResume()}catch(e){this.handleSlideError(e)}finally{e()}}async pause(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideAppPause()}catch(e){this.handleSlideError(e)}finally{e()}}async pauseByUser(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideUserPause()}catch(e){this.handleSlideError(e)}finally{e()}}async resumeByUser(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideUserResume()}catch(e){this.handleSlideError(e)}finally{e()}}async stop(e){const t=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideStop(e)}catch(e){this.handleSlideError(e)}finally{t()}}refreshSizes(){this.slideApi.refreshSizes()}onClick({event:e,currentTarget:t}){if(e.target)try{e.preventDefault(),e.stopPropagation();const r=this.getNavigationDirection(e,t);this.slideApi.slideClickHandler(e.target,r>0?"forward":"backward")}catch(e){console.error(e)}}async destroy(){await this.stop({prepareForRestart:2})}showLayerByIndex(e){this.slideApi.showLayer(e)}handleSlideError(e){console.warn(e),this.banner.showErrorScreen()}getNavigationDirection(e,t){const r=this.getClickPosition(e,t),i="ltr"===this.slideApi.layoutDirection?1:-1;return r>=.3?i:-i}getClickPosition(e,t){const r=t.getBoundingClientRect(),i=r.width;if(i<=0)return 0;let n;if(e instanceof MouseEvent)n=e.pageX-r.left;else{if(!(e.touches&&e.touches.length>0))return 0;n=e.touches[0].pageX-r.left}return Math.max(0,Math.min(1,n/i))}delay(e){return new Promise(t=>setTimeout(t,e))}async cleanupLoaderIfNeeded(e,t){t&&(await this.delay(Math.max(500-e,0)),this.banner.hideLoaderScreen())}}class Ct{get html(){return""}get state(){return 0}async init(){}async start(){}async restart(){}async resume(){}async pause(){}async resumeByUser(){}async pauseByUser(){}async stop(e){}onClick({event:e,currentTarget:t}){}async destroy(){}showLayerByIndex(e){}refreshSizes(){}notifyTimerEnd(){}}var Ft=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},Dt=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},Nt=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},zt=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};let Wt=(()=>{var e,t,r,i,n,a,s,o;let l,c,d,u,h,f,p,b,m,v,g,y,w,S,P=[],_=[],M=[],T=[],x=[],A=[],E=[],k=[],L=[],B=[],I=[],R=[],j=[],C=[],F=[];return e=class{get _$root(){return Nt(this,t,"f")}set _$root(e){zt(this,t,e,"f")}get _needShowErrorScreen(){return Nt(this,r,"f")}set _needShowErrorScreen(e){zt(this,r,e,"f")}get _needShowLoaderScreen(){return Nt(this,i,"f")}set _needShowLoaderScreen(e){zt(this,i,e,"f")}get _width(){return Nt(this,n,"f")}set _width(e){zt(this,n,e,"f")}get _height(){return Nt(this,a,"f")}set _height(e){zt(this,a,e,"f")}get _slides(){return Nt(this,s,"f")}set _slides(e){zt(this,s,e,"f")}get isInited(){return Nt(this,o,"f")}set isInited(e){zt(this,o,e,"f")}constructor(e,l,c,d,u){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:(Ft(this,P),e)}),Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:c}),Object.defineProperty(this,"bannerStatisticService",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:u}),t.set(this,Ft(this,_,null)),r.set(this,(Ft(this,M),Ft(this,T,!1))),i.set(this,(Ft(this,x),Ft(this,A,!1))),n.set(this,(Ft(this,E),Ft(this,k,0))),a.set(this,(Ft(this,L),Ft(this,B,0))),s.set(this,(Ft(this,I),Ft(this,R,[]))),Object.defineProperty(this,"slideApi",{enumerable:!0,configurable:!0,writable:!0,value:(Ft(this,j),null)}),Object.defineProperty(this,"slideApiImpl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"locked",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"toast",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_iterationId",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_startTime",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_initPromise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_initPromiseResolver",{enumerable:!0,configurable:!0,writable:!0,value:()=>{}}),o.set(this,Ft(this,C,!1)),Object.defineProperty(this,"attachRoot",{enumerable:!0,configurable:!0,writable:!0,value:(Ft(this,F),async e=>{this._$root||(this._$root=e,this.slideApi=this.createSlideApi(e),this._slides=[new jt(this,this.banner.slides[0],this.slideApi)],await this.init())})}),Object.defineProperty(this,"handleVisibilityChange",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.locked||("hidden"===document.visibilityState&&this.pause(),"visible"===document.visibilityState&&this.resume())}}),this.slideApiImpl=new At(this.storyManager,this.bannerPlace,this,this.bannerStatisticService),this._initPromise=new Promise(e=>{this._initPromiseResolver=e})}get id(){return this.banner.id}get context(){return this.banner.context}get appearance(){return this.banner.appearance}get contentRatio(){return this.banner.appearance.contentRatio}get name(){return this.banner.name}get dir(){return this.storyManager.config.dir}get slides(){return this._slides}get activeSlideIndex(){return 0}get width(){return this._width}get height(){return this._height}get activeSlide(){var e;return null!==(e=this._slides[this.activeSlideIndex])&&void 0!==e?e:new Ct}get needShowErrorScreen(){return this._needShowErrorScreen}get needShowLoaderScreen(){return this._needShowLoaderScreen}get canBeShown(){return Boolean(this._$root)&&this.isInited}get iterationId(){return this._iterationId}get durationMs(){return Date.now()-this._startTime}async init(){this.isInited||(this.showLoaderScreen(),await this.activeSlide.init(),this._initPromiseResolver(),this.isInited=!0)}async start(){if(!this._$root)throw new Error(`[IAS]: Slide API mount point not found for banner with ID ${this.id}`);document.addEventListener("visibilitychange",this.handleVisibilityChange);try{await this.activeSlide.start(),this._startTime=Date.now(),this.markAsOpened(),this.emitShowBannerEvent()}catch(e){this.emitShowBannerFailedEvent(e)}}refreshSizes(){this.activeSlide.refreshSizes()}async recover(){try{await this.activeSlide.init(),await this.activeSlide.start(),this._startTime=Date.now(),this.markAsOpened(),this.emitShowBannerEvent()}catch(e){this.emitShowBannerFailedEvent(e)}}async restart(){try{await this.activeSlide.restart(),this._startTime=Date.now(),this.markAsOpened(),this.emitShowBannerEvent()}catch(e){this.emitShowBannerFailedEvent(e)}}async resume(){await this.activeSlide.resume()}async pause(){await this.activeSlide.pause()}async resumeByUser(){await this.activeSlide.resumeByUser()}async pauseByUser(){await this.activeSlide.pauseByUser()}async stop(){var e;this.slideApiImpl.clearCardSession(),document.removeEventListener("visibilitychange",this.handleVisibilityChange),null===(e=this.toast)||void 0===e||e.destroy(),await this.activeSlide.stop({prepareForRestart:1})}async destroy(){var e,t;document.removeEventListener("visibilitychange",this.handleVisibilityChange);const r=this.activeSlide;this._slides=[],this._$root=null,this.isInited=!1,await r.destroy(),null===(e=this.slideApi)||void 0===e||e.destroy(),null===(t=this.toast)||void 0===t||t.destroy()}showLayerByIndex(e){this.activeSlide.showLayerByIndex(e)}showToast(e){if(!this._$root)return;const t=this._$root;this.toast=new Et(Object.assign({mountPoint:t},e)),this.toast.show(e.content)}detachRoot(){var e;this.isInited=!1,this._$root=null,this._slides.forEach(e=>e.destroy()),null===(e=this.slideApi)||void 0===e||e.destroy()}showErrorScreen(){this._needShowErrorScreen=!0}showLoaderScreen(){this._needShowLoaderScreen=!0}hideLoaderScreen(){this._needShowLoaderScreen=!1}hideErrorScreen(){this._needShowErrorScreen=!1}markAsOpened(){this._iterationId=(0,Pe.v4)(),this.banner.markAsOpened(),this.markWasShown()}async waitInit(){await this._initPromise}notifyTimerEnd(){this.activeSlide.notifyTimerEnd()}async markWasShown(){!this.banner.wasShown&&this._iterationId&&(this.banner.markWasShown(),this.bannerStatisticService.sendViewEvent(this.id,{iterationId:this._iterationId,slideIndex:this.activeSlideIndex,slideTotal:this.banner.slides.length}))}async updateUserData(e){return this.bannerStore.updateBannerUserData(this.id,e)}createSlideApi(e){return new kt.SlideApi(this.slideApiImpl,{root:e,slideRatio:this.banner.appearance.contentRatio,isFullscreen:!1,nonce:O(),viewport:window,userResizeHandler:e=>{this._width=e.viewportWidth,this._height=e.viewportHeight},VODPlayer:this.storyManager.globalProperties.$videoOnDemand,overlappingActionBarHeight:0,useSdkCacheForMultislideMode:!1})}emitShowBannerEvent(){this.bannerPlace.emit(Tt.name,new Tt({id:this.id,bannerPlace:this.bannerPlace.id,payload:this.activeSlide.payload}).payload)}emitShowBannerFailedEvent(e){this.bannerPlace.emit(xt.name,new xt({id:this.id,bannerPlace:this.bannerPlace.id,error:e,payload:this.activeSlide.payload}).payload)}},t=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap,o=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l=[ee.observable],c=[ee.observable],d=[ee.observable],u=[ee.observable],h=[ee.observable],f=[ee.observable],p=[ee.observable],b=[ee.computed],m=[ee.computed],v=[ee.computed],g=[ee.action],y=[ee.action],w=[ee.action],S=[ee.action],Dt(e,null,l,{kind:"accessor",name:"_$root",static:!1,private:!1,access:{has:e=>"_$root"in e,get:e=>e._$root,set:(e,t)=>{e._$root=t}},metadata:t},_,M),Dt(e,null,c,{kind:"accessor",name:"_needShowErrorScreen",static:!1,private:!1,access:{has:e=>"_needShowErrorScreen"in e,get:e=>e._needShowErrorScreen,set:(e,t)=>{e._needShowErrorScreen=t}},metadata:t},T,x),Dt(e,null,d,{kind:"accessor",name:"_needShowLoaderScreen",static:!1,private:!1,access:{has:e=>"_needShowLoaderScreen"in e,get:e=>e._needShowLoaderScreen,set:(e,t)=>{e._needShowLoaderScreen=t}},metadata:t},A,E),Dt(e,null,u,{kind:"accessor",name:"_width",static:!1,private:!1,access:{has:e=>"_width"in e,get:e=>e._width,set:(e,t)=>{e._width=t}},metadata:t},k,L),Dt(e,null,h,{kind:"accessor",name:"_height",static:!1,private:!1,access:{has:e=>"_height"in e,get:e=>e._height,set:(e,t)=>{e._height=t}},metadata:t},B,I),Dt(e,null,f,{kind:"accessor",name:"_slides",static:!1,private:!1,access:{has:e=>"_slides"in e,get:e=>e._slides,set:(e,t)=>{e._slides=t}},metadata:t},R,j),Dt(e,null,p,{kind:"accessor",name:"isInited",static:!1,private:!1,access:{has:e=>"isInited"in e,get:e=>e.isInited,set:(e,t)=>{e.isInited=t}},metadata:t},C,F),Dt(e,null,b,{kind:"getter",name:"activeSlide",static:!1,private:!1,access:{has:e=>"activeSlide"in e,get:e=>e.activeSlide},metadata:t},null,P),Dt(e,null,m,{kind:"getter",name:"needShowLoaderScreen",static:!1,private:!1,access:{has:e=>"needShowLoaderScreen"in e,get:e=>e.needShowLoaderScreen},metadata:t},null,P),Dt(e,null,v,{kind:"getter",name:"canBeShown",static:!1,private:!1,access:{has:e=>"canBeShown"in e,get:e=>e.canBeShown},metadata:t},null,P),Dt(e,null,g,{kind:"method",name:"showErrorScreen",static:!1,private:!1,access:{has:e=>"showErrorScreen"in e,get:e=>e.showErrorScreen},metadata:t},null,P),Dt(e,null,y,{kind:"method",name:"showLoaderScreen",static:!1,private:!1,access:{has:e=>"showLoaderScreen"in e,get:e=>e.showLoaderScreen},metadata:t},null,P),Dt(e,null,w,{kind:"method",name:"hideLoaderScreen",static:!1,private:!1,access:{has:e=>"hideLoaderScreen"in e,get:e=>e.hideLoaderScreen},metadata:t},null,P),Dt(e,null,S,{kind:"method",name:"hideErrorScreen",static:!1,private:!1,access:{has:e=>"hideErrorScreen"in e,get:e=>e.hideErrorScreen},metadata:t},null,P),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();class Vt{constructor(e,t,r){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"bannerStatisticService",{enumerable:!0,configurable:!0,writable:!0,value:r})}create(e,t){return new Wt(this.storyManager,e,t,this.bannerStatisticService,this.bannerStore)}}function qt(e,t){let r=null;return async function(...t){return r||(r=(async()=>{try{return await e.apply(this,t)}catch(e){throw e}finally{r=null}})(),r)}}class Gt extends Error{constructor(e){super(`[IAS]: Banner with ID ${e} not found`),this.name="IasBannerNotFoundError"}}class Ut extends Error{constructor(e){super(`[IAS]: Banner slot with ID ${e} not found`),this.name="IasBannerPlaceNotFoundError"}}var Ht=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0};let $t=(()=>{var e;let t,r=[];return e=class{constructor(e){Object.defineProperty(this,"httpClient",{enumerable:!0,configurable:!0,writable:!0,value:(Ht(this,r),e)})}async fetchBannerPlaceById(e){const t=await this.httpClient.post(`banner/place/${e.placeId}`,{tags:e.tags.join(","),options:e.options},{params:{expand:"banners.slides"}});if(t.data)return t.data;throw new Ut(e.placeId)}async fetchBannerById(e){const t=await this.httpClient.get(`banner/${e}`,{params:{expand:"slides"}});if(t.data)return t.data;throw new Gt(e)}async fetchWidgetsData({bannerIds:e}){return(await this.httpClient.get("banner/context",{params:{fields:"widgetsData",id:e.join()}})).data}async fetchStyles(){return(await this.httpClient.get("banner/context",{params:{fields:"style"}})).data}async updateUserData(e,t){try{await this.httpClient.request({url:`banner/${e}/data`,method:"put",data:{data:t}})}catch(e){console.error(e)}}},(()=>{const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[qt],function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0}(e,null,t,{kind:"method",name:"fetchStyles",static:!1,private:!1,access:{has:e=>"fetchStyles"in e,get:e=>e.fetchStyles},metadata:i},null,r),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();class Yt{constructor(e,t){Object.defineProperty(this,"httpClient",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:t})}async sendViewEvent(e,t){await this.sendStatisticsEvent(e,t)}async sendWidgetEvent(e,t){await this.sendStatisticsEvent(e,t)}async sendStatisticsEvent(e,t){try{if(this.storyManager.isStatisticsDisabled)return void console.log("[BANNER STATISTICS]",Object.assign({bannerId:e,type:t.type},t.toQueryParams()));await this.httpClient.sendBeacon(`/banner/${e}/event/${t.type}`,t.toQueryParams())}catch(e){console.error(e)}}}var Xt;!function(e){e[e.Base=0]="Base",e[e.Dynamic=1]="Dynamic",e[e.Game=2]="Game",e[e.Story=3]="Story",e[e.IAM=4]="IAM"}(Xt||(Xt={}));var Kt=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0};(()=>{var e;let t,r,i=[];e=class{async fetchBannerPlaceById(e){return{id:"default",appearance:{single_banner_aspect_ratio:2,banners_gap:16,corner_radius:16,loop:!0,autoplay:!0,autoplay_delay:1e3,animation_speed:300},banners:[]}}async fetchWidgetsData({bannerIds:e}){return{widgetsData:{}}}async fetchStyles(){return{style:""}}updateUserData(e,t){throw new Error("Method not implemented.")}fetchBannerById(e){throw new Error("Method not implemented.")}constructor(){!function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e)}(this,i)}},(()=>{const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[qt],r=[qt],Kt(e,null,t,{kind:"method",name:"fetchBannerPlaceById",static:!1,private:!1,access:{has:e=>"fetchBannerPlaceById"in e,get:e=>e.fetchBannerPlaceById},metadata:n},null,i),Kt(e,null,r,{kind:"method",name:"fetchStyles",static:!1,private:!1,access:{has:e=>"fetchStyles"in e,get:e=>e.fetchStyles},metadata:n},null,i),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})()})();class Qt{constructor(e,t){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:t})}createBannerPlace(e,t){var r;const i=new Yt(this.storyManager.httpClient,this.storyManager),n=new Qe(i),a=new Vt(this.storyManager,this.bannerStore,n);return new Le(null!==(r=null==t?void 0:t.toString())&&void 0!==r?r:"default",e,n,this.bannerStore,a)}createBannerPreviewPlace(e,t){const r=new Yt(this.storyManager.httpClient,this.storyManager),i=new Qe(r),n=new Vt(this.storyManager,this.bannerStore,i);return new Ke(t.toString(),e,this.bannerStore,n)}}class Jt{static toDomain({bannerDto:e,bannerContextDto:t,fontPrefix:r}){return new ie({id:e.id,name:e.name,slides:e.slides.filter(e=>Boolean(e.html.length)).map(e=>{var t;return new he({html:e.html,fontPrefix:r,duration:e.duration,payload:null===(t=e.event_payload)||void 0===t?void 0:t.payload})}),displayFrom:e.display_from,displayTo:e.display_to,appearance:new ne(e.appearance),context:new ae(e.id,t),frequencyLimit:e.frequency_limit})}}class Zt{static toDomain({bannerPlaceDto:e,bannerContextDto:t,placeholders:r,fontPrefix:i}){const n=e.banners.map(e=>Jt.toDomain({bannerDto:e,bannerContextDto:t,fontPrefix:i}));return new pe({id:e.id,banners:n,placeholders:r,style:t.style})}}var er=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},tr=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var p={};for(var b in i)p[b]="access"===b?{}:i[b];for(var b in i.access)p.access[b]=i.access[b];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],p);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},rr=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},ir=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};let nr=(()=>{var e,t,r;let i,n,a,s=[],o=[],l=[],c=[],d=[];return e=class{get _bannerPlaces(){return rr(this,t,"f")}set _bannerPlaces(e){ir(this,t,e,"f")}get _banners(){return rr(this,r,"f")}set _banners(e){ir(this,r,e,"f")}constructor(e,i){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:(er(this,s),e)}),Object.defineProperty(this,"bannerApi",{enumerable:!0,configurable:!0,writable:!0,value:i}),t.set(this,er(this,o,ee.observable.map())),r.set(this,(er(this,l),er(this,c,ee.observable.map()))),Object.defineProperty(this,"_inFlightBannerPlaces",{enumerable:!0,configurable:!0,writable:!0,value:(er(this,d),new Map)}),Object.defineProperty(this,"bannerCSS",{enumerable:!0,configurable:!0,writable:!0,value:""}),(0,ee.reaction)(()=>e.rootStore.placeholderStore.placeholders,e=>{for(const t of this._bannerPlaces.values())t.updatePlaceholders(e)})}get bannerPlaces(){return Array.from(this._bannerPlaces.values())}async getBannerById(e){if(this._banners.has(e))return this._banners.get(e);await this.storyManager.rootStore.sessionStore.open();const t=await this.fetchBannerContext({bannerIds:[e]}),r=await this.bannerApi.fetchBannerById(e);return this.addBanner(r,t)}async getBannerPlaceById(e){if(this._bannerPlaces.has(e.placeId))return this._bannerPlaces.get(e.placeId);const t=this._inFlightBannerPlaces.get(e.placeId);if(t)return t;const r=this.loadBannerPlace(e);this._inFlightBannerPlaces.set(e.placeId,r);try{return await r}finally{this._inFlightBannerPlaces.delete(e.placeId)}}clearCache(){this._bannerPlaces=ee.observable.map(),this._banners=ee.observable.map(),this._inFlightBannerPlaces.clear(),this.bannerCSS=""}removeBannerPlaceById(e){this._bannerPlaces.delete(e)}async updateBannerUserData(e,t){if(!this.storyManager.isStatisticsDisabled)return this.bannerApi.updateUserData(e,t);console.log("[IAM]: update user data",{bannerId:e,payload:t})}async loadBannerPlace(e){const t=this.storyManager.config;await this.storyManager.rootStore.sessionStore.open();const r=await this.bannerApi.fetchBannerPlaceById({placeId:e.placeId,tags:t.tags,options:t.options}),i=await this.fetchBannerContext({bannerIds:r.banners.map(e=>e.id)});return this.addBannerPlace(r,i)}async fetchBannerContext({bannerIds:e}){const t=this.bannerApi.fetchWidgetsData({bannerIds:e});if(!this.bannerCSS){const[e,r]=await Promise.all([t,this.bannerApi.fetchStyles()]);return r.style&&(this.bannerCSS=le(r.style,this.storyManager.config.fontPrefix)),{widgetsData:e.widgetsData,style:this.bannerCSS}}return{widgetsData:(await t).widgetsData,style:this.bannerCSS}}addBannerPlace(e,t){const r=this.storyManager.rootStore.placeholderStore.placeholders,i=Zt.toDomain({bannerPlaceDto:e,bannerContextDto:t,placeholders:r,fontPrefix:this.storyManager.config.fontPrefix});return i.updatePlaceholders(r),this._bannerPlaces.set(e.id,i),i}addBanner(e,t){const r=this.storyManager.rootStore.placeholderStore.placeholders,i=Jt.toDomain({bannerDto:e,bannerContextDto:t,fontPrefix:this.storyManager.config.fontPrefix});return i.updatePlaceholders(r),this._banners.set(i.id,i),i}},t=new WeakMap,r=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i=[ee.observable],n=[ee.observable],a=[ee.computed],tr(e,null,i,{kind:"accessor",name:"_bannerPlaces",static:!1,private:!1,access:{has:e=>"_bannerPlaces"in e,get:e=>e._bannerPlaces,set:(e,t)=>{e._bannerPlaces=t}},metadata:t},o,l),tr(e,null,n,{kind:"accessor",name:"_banners",static:!1,private:!1,access:{has:e=>"_banners"in e,get:e=>e._banners,set:(e,t)=>{e._banners=t}},metadata:t},c,d),tr(e,null,a,{kind:"getter",name:"bannerPlaces",static:!1,private:!1,access:{has:e=>"bannerPlaces"in e,get:e=>e.bannerPlaces},metadata:t},null,s),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();class ar{constructor(e){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const t=new $t(e.httpClient);this.bannerStore=new nr(this.storyManager,t)}}Error;class sr extends Error{constructor(e){super(`[IAS]: Mount point ${e} is not present in DOM at initialization time`),this.name="IasMountPointReferenceError"}}class or extends Fe{render(){this.root.render((0,e.jsx)(We,{bannerPlace:this.bannerPlace}))}}class lr{constructor(e){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlaces",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"bannerPlaceViewModelFactory",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rootStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reloadAllBanners",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.rootStore.bannerStore.clearCache(),this.bannerPlaces.forEach(e=>{e.reload().catch(console.error)})}}),this.rootStore=new ar(e),this.bannerPlaceViewModelFactory=new Qt(e,this.rootStore.bannerStore),this.storyManager.on("requestSDKReload",this.reloadAllBanners)}getConfig(){return this.storyManager.config}addBannerPlace(e){this.bannerPlaces.push(e)}removeBannerPlace(e){const t=this.bannerPlaces.indexOf(e);-1!==t&&this.bannerPlaces.splice(t,1)}clear(){for(const e of this.bannerPlaces)e.destroy();this.bannerPlaces=[]}createBannerPlace(e){return this.bannerPlaceViewModelFactory.createBannerPlace(this,e)}createBannerPreviewPlace(e){return this.bannerPlaceViewModelFactory.createBannerPreviewPlace(this,e)}static create(e){return lr.instance||(lr.instance=new lr(e)),lr.instance}mountBannerPlace(e,t){return this.mountBannerCarousel(e,t)}mountBannerCarousel(e,t){const r=document.querySelector(e);if(!r)throw new sr(e);const i=this.createBannerPlace(null==t?void 0:t.placeId),n=new Fe(r,i,t);return n.render(),n}mountBannerList(e,t){const r=document.querySelector(e);if(!r)throw new sr(e);const i=this.createBannerPlace(null==t?void 0:t.placeId),n=new De(r,i,t);return n.render(),n}mountBannerPreviewPlace(e,t){const r=document.querySelector(e);if(!r)throw new sr(e);const i=this.createBannerPreviewPlace(t.bannerId),n=new or(r,i);return n.render(),n}}const cr=lr,dr=new class{constructor(){Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ias-banners"})}install(e){const t=cr.create(e.INTERNAL_API);e.HOST.prototype.banners=t}uninstall(){}}})(),u=u.default,u})());
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react/jsx-runtime"),require("react"),require("mobx-react-lite"),require("classnames"),require("mobx"),require("uuid"),require("react-dom/client"),require("@inappstory/slide-api"));else if("function"==typeof define&&define.amd)define(["react/jsx-runtime","react","mobx-react-lite","classnames","mobx","uuid","react-dom/client","@inappstory/slide-api"],t);else{var r="object"==typeof exports?t(require("react/jsx-runtime"),require("react"),require("mobx-react-lite"),require("classnames"),require("mobx"),require("uuid"),require("react-dom/client"),require("@inappstory/slide-api")):t(e["react/jsx-runtime"],e.react,e["mobx-react-lite"],e.classnames,e.mobx,e.uuid,e["react-dom/client"],e["@inappstory/slide-api"]);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(self,(e,t,r,i,n,a,s,o)=>(()=>{var l={643(e){e.exports=function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(18),n=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});t.push(0);var r=t[0],i=t[1];if(10===r)switch(i){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(r){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,i){void 0===i&&(i=!1);var n=e.getVersionPrecision(t),a=e.getVersionPrecision(r),s=Math.max(n,a),o=0,l=e.map([t,r],function(t){var r=s-e.getVersionPrecision(t),i=t+new Array(r+1).join(".0");return e.map(i.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(i&&(o=s-Math.min(n,a)),s-=1;s>=o;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===o)return 0;s-=1}else if(l[0][s]<l[1][s])return-1}},e.map=function(e,t){var r,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)i.push(t(e[r]));return i},e.find=function(e,t){var r,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,i=e.length;r<i;r+=1){var n=e[r];if(t(n,r))return n}},e.assign=function(e){for(var t,r,i=e,n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var o=function(){var e=a[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){i[t]=e[t]})};for(t=0,r=a.length;t<r;t+=1)o();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=n,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(91))&&i.__esModule?i:{default:i},a=r(18);function s(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var o=function(){function e(){}var t,r;return e.getParser=function(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new n.default(e,t,r)},e.parse=function(e,t){return void 0===t&&(t=null),new n.default(e,t).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return a.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return a.ENGINE_MAP}},{key:"OS_MAP",get:function(){return a.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return a.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=o,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=l(r(92)),n=l(r(93)),a=l(r(94)),s=l(r(95)),o=l(r(17));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var i=!1;"boolean"==typeof t?(i=t,this._hints=r):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==i&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),r=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return r?r.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=o.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=o.default.find(n.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=o.default.find(a.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=o.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return o.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},i=0,n={},a=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(n[t]=s,a+=1):"object"==typeof s&&(r[t]=s,i+=1)}),i>0){var s=Object.keys(r),l=o.default.find(s,function(e){return t.isOS(e)});if(l){var c=this.satisfies(r[l]);if(void 0!==c)return c}var d=o.default.find(s,function(e){return t.isPlatform(e)});if(d){var u=this.satisfies(r[d]);if(void 0!==u)return u}}if(a>0){var h=Object.keys(n),f=o.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(n[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),n=o.default.getBrowserTypeByAlias(i);return t&&n&&(i=n.toLowerCase()),i===r},t.compareVersion=function(e){var t=[0],r=e,i=!1,n=this.getBrowserVersion();if("string"==typeof n)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(i=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(i=!0,r=e.substr(1)),t.indexOf(o.default.compareVersions(n,r,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=c,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},a=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},r=n.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},r=n.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},r=n.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},r=n.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},r=n.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},r=n.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},r=n.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},r=n.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},r=n.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},r=n.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},r=n.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},r=n.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},r=n.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=n.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},r=n.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},r=n.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},r=n.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},r=n.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},r=n.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},r=n.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},r=n.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=n.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=n.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=n.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=n.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=n.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=n.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=n.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=n.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=n.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=n.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=n.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=n.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=n.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=n.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=n.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=n.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=n.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=n.default.getFirstMatch(a,e)||n.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=n.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=n.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=n.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},r=n.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=n.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=n.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},r=n.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),i=n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),a=n.default.getFirstMatch(/se ([\d.]+)x/i,e),s=r||i||a;return s&&(t.version=s),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=n.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var r={name:"DuckDuckGo"};if(t){var i=t.getBrandVersion("DuckDuckGo");if(i)return r.version=i,r}var a=n.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return a&&(r.version=a),r}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var r={name:"Brave"};if(t){var i=t.getBrandVersion("Brave");if(i)return r.version=i,r}return r}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=n.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=n.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=n.default.getFirstMatch(a,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:n.default.getFirstMatch(t,e),version:n.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},a=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=n.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=n.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=n.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=n.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},r=n.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=n.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=n.default.getMacOSVersionName(t),i={name:a.OS_MAP.MacOS,version:t};return r&&(i.versionName=r),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=n.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=n.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=n.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=n.default.getAndroidVersionName(t),i={name:a.OS_MAP.Android,version:t};return r&&(i.versionName=r),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=n.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:a.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=n.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||n.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||n.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=n.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=n.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=n.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},a=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:a.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=n.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=n.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=n.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),r={type:a.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(r.model=t),r}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},a=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=n.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},r=n.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},r=n.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},r=n.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},r=n.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},126(e,t,r){"use strict";r.d(t,{MU:()=>l,Xr:()=>c,wG:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".loader--IOiL0{position:absolute;z-index:10001;top:0;bottom:0;left:0;right:0;display:flex;justify-content:center;align-items:center;background:var(--loader-background, black)}.loader--IOiL0 .loader__refresh-btn--Xq6kc{color:#fff;cursor:pointer;position:absolute;left:50%;top:50%;transform:translate3d(-50%, -50%, 0);pointer-events:auto;padding:20px;width:32px;height:32px;box-sizing:content-box}.loader--IOiL0 .loader__spinner--Cl4w_{-ms-flex-negative:0;flex-shrink:0;display:inline-block;width:32px;height:32px;border-radius:50%;border:solid 2px var(--loaderBackgroundColor, white);border-color:var(--loaderBackgroundAccentColor, transparent) var(--loaderBackgroundColor, white) var(--loaderBackgroundColor, white) var(--loaderBackgroundColor, white);-webkit-animation:loading-spinner--KDbkH .6s infinite linear;animation:loading-spinner--KDbkH .6s infinite linear}@keyframes loading-spinner--KDbkH{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}",""]);var o="loader--IOiL0",l="loader__refresh-btn--Xq6kc",c="loader__spinner--Cl4w_";const d=s;r.d(t,["Ay",0,d])},81(e,t,r){"use strict";r.d(t,{K:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".icon--oME3c{width:2rem;height:2rem}",""]);var o="icon--oME3c";const l=s;r.d(t,["A",0,l])},371(e,t,r){"use strict";r.d(t,{kK:()=>l,rh:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".bnr--d4JN5{width:100%;height:100%;position:relative;backface-visibility:hidden;transform:translateZ(0);clip-path:inset(0 round var(--ias-banner-border-radius, 0px))}.bnr-slides--DM_du{position:relative;width:100%;height:100%;display:block}",""]);var o="bnr--d4JN5",l="bnr-slides--DM_du";const c=s;r.d(t,["Ay",0,c])},243(e,t,r){"use strict";r.d(t,{f:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".bnr-place--stDju{width:100%;height:100%;position:relative;border-radius:var(--ias-bnr-place-border-radius, 0px)}.bnr-slider__slider_visible--LefjP{border:solid 1px green}",""]);var o="bnr-place--stDju";const l=s;r.d(t,["Ay",0,l])},883(e,t,r){"use strict";r.d(t,{f:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".bnr-place--w8Fmt{width:100%;height:100%;display:flex;flex-direction:column;position:relative}",""]);var o="bnr-place--w8Fmt";const l=s;r.d(t,["A",0,l])},713(e,t,r){"use strict";r.d(t,{f:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".bnr-place--xfX8t{width:100%;height:100%;position:relative}",""]);var o="bnr-place--xfX8t";const l=s;r.d(t,["A",0,l])},41(e,t,r){"use strict";r.d(t,{aw:()=>o,pj:()=>c,xs:()=>l,yC:()=>d});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".slider--O5WPf{width:100%;height:100%;overflow:hidden;position:relative;justify-content:center;user-select:none;border-radius:inherit}.slider__track--EtUXY{display:flex;transition:transform .3s ease;width:100%;height:100%;will-change:transform}.slider__slide--fFM0h{width:100%;flex-shrink:0;position:relative;display:flex}.slider--vertical--YnGKe .slider__track--EtUXY{flex-direction:column}.slider--vertical--YnGKe .slider__slide--fFM0h{justify-content:center}",""]);var o="slider--O5WPf",l="slider__track--EtUXY",c="slider__slide--fFM0h",d="slider--vertical--YnGKe";const u=s;r.d(t,["Ay",0,u])},379(e,t,r){"use strict";r.d(t,{L5:()=>l,Yf:()=>u,a8:()=>c,cG:()=>h,j$:()=>o,oX:()=>d,pB:()=>f});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".slider__controls-btn--DSE2l{position:absolute;top:50%;z-index:1;width:1.5rem;height:1.5rem;transform:translate3d(0, -50%, 0);transition:all .2s ease-in-out;cursor:pointer;padding:0;background-color:rgba(0,0,0,0);color:#0c62f3;border:0;outline:0}.slider__controls-btn--start--Gd7fV{left:1.5rem}.slider__controls-btn--end--NmOPz{right:1.5rem}.slider__controls--d6Jab.slider__controls--vertical--aArlx .slider__controls-btn--DSE2l{top:auto;left:50%;transform:translate3d(-50%, 0, 0)}.slider__controls--d6Jab.slider__controls--vertical--aArlx .slider__controls-btn--start--Gd7fV{top:0;transform:rotate(90deg)}.slider__controls--d6Jab.slider__controls--vertical--aArlx .slider__controls-btn--end--NmOPz{bottom:0;transform:rotate(90deg)}.slider__controls--d6Jab:not(.slider__controls--vertical--aArlx) .slider__controls-btn--start--Gd7fV.slider__controls-btn--dir--rtl--gkKSR{left:auto;right:0;transform:translate3d(0, -50%, 0) rotate(180deg)}.slider__controls--d6Jab:not(.slider__controls--vertical--aArlx) .slider__controls-btn--end--NmOPz.slider__controls-btn--dir--rtl--gkKSR{left:0;right:auto;transform:translate3d(0, -50%, 0) rotate(180deg)}.slider__controls-btn--DSE2l{transition:opacity .3s ease-in-out}.slider__controls-btn--disabled--j4st5{opacity:0;pointer-events:none}",""]);var o="slider__controls-btn--DSE2l",l="slider__controls-btn--start--Gd7fV",c="slider__controls-btn--end--NmOPz",d="slider__controls--d6Jab",u="slider__controls--vertical--aArlx",h="slider__controls-btn--dir--rtl--gkKSR",f="slider__controls-btn--disabled--j4st5";const b=s;r.d(t,["Ay",0,b])},55(e,t,r){"use strict";r.d(t,{KK:()=>d,eF:()=>l,u7:()=>c,y8:()=>o});var i=r(758),n=r.n(i),a=r(935),s=r.n(a)()(n());s.push([e.id,".slider-bullets--Xskhv{position:absolute;z-index:2;bottom:1.5rem;left:50%;display:inline-flex;list-style:none;transform:translate3d(-50%, 0, 0)}.slider-bullets__bullet--Azfv6{background-color:var(--ias-banners-pagination-inactive-color, hsla(0, 0%, 100%, 0.5));width:var(--ias-banners-pagination-width, 0.5rem);height:var(--ias-banners-pagination-height, 0.5rem);padding:0;border-radius:50%;border:.25rem solid rgba(0,0,0,0);cursor:pointer;line-height:0;box-shadow:0 .25em .5em 0 rgba(0,0,0,.1);margin:0 .25em;transition:transform 100ms ease-in;transform:scale(0.8)}.slider-bullets__bullet--active--R_QzW{background-color:#0c62f3;transform:scale(1)}.slider-bullets--Xskhv.slider-bullets--vertical--JBfQ7{transform:translate3d(0, -50%, 0);left:auto;bottom:auto;right:1.5rem;top:50%;display:flex;flex-direction:column}.slider-bullets--Xskhv.slider-bullets--vertical--JBfQ7 .slider-bullets__bullet--Azfv6{margin:.25em 0}",""]);var o="slider-bullets--Xskhv",l="slider-bullets__bullet--Azfv6",c="slider-bullets__bullet--active--R_QzW",d="slider-bullets--vertical--JBfQ7";const u=s;r.d(t,["Ay",0,u])},935(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",i=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),i&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),i&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,i,n,a){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(i)for(var o=0;o<this.length;o++){var l=this[o][0];null!=l&&(s[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);i&&s[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},758(e){"use strict";e.exports=function(e){return e[1]}},46(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(r,i){function n(r){e.removeListener(t,a),i(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}p(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&p(e,"error",t,{once:!0})}(e,n)})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,r,i){var n,a,s,c;if(o(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]),void 0===s)s=a[t]=r,++e._eventsCount;else if("function"==typeof s?s=a[t]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(n=l(e))>0&&s.length>n&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,c=d,console&&console.warn&&console.warn(c)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=d.bind(i);return n.listener=r,i.wrapFn=n,n}function h(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):b(n,n.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function b(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function p(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function n(a){i.once&&e.removeEventListener(t,n),r(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,a=this._events;if(void 0!==a)n=n&&void 0===a.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,d=b(l,c);for(r=0;r<c;++r)i(d[r],this,t)}return!0},a.prototype.addListener=function(e,t){return c(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return c(this,e,t,!0)},a.prototype.once=function(e,t){return o(t),this.on(e,u(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,u(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,i,n,a,s;if(o(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,n=a;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,a=Object.keys(r);for(i=0;i<a.length;++i)"removeListener"!==(n=a[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},591(e){"use strict";var t=[];function r(e){for(var r=-1,i=0;i<t.length;i++)if(t[i].identifier===e){r=i;break}return r}function i(e,i){for(var a={},s=[],o=0;o<e.length;o++){var l=e[o],c=i.base?l[0]+i.base:l[0],d=a[c]||0,u="".concat(c," ").concat(d);a[c]=d+1;var h=r(u),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var b=n(f,i);i.byIndex=o,t.splice(o,0,{identifier:u,updater:b,references:1})}s.push(u)}return s}function n(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,n){var a=i(e=e||[],n=n||{});return function(e){e=e||[];for(var s=0;s<a.length;s++){var o=r(a[s]);t[o].references--}for(var l=i(e,n),c=0;c<a.length;c++){var d=r(a[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=l}}},128(e){"use strict";var t={};e.exports=function(e,r){var i=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(r)}},51(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},740(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var i="";r.supports&&(i+="@supports (".concat(r.supports,") {")),r.media&&(i+="@media ".concat(r.media," {"));var n=void 0!==r.layer;n&&(i+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),i+=r.css,n&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},656(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},968(e,t,r){"use strict";const i=document.querySelector("[nonce]");i&&(r.nc=i.nonce||i.getAttribute("nonce"))},136(e){"use strict";e.exports=o},992(e){"use strict";e.exports=i},314(e){"use strict";e.exports=n},299(e){"use strict";e.exports=r},155(e){"use strict";e.exports=t},236(e){"use strict";e.exports=s},272(t){"use strict";t.exports=e},315(e){"use strict";e.exports=a}};const c={};function d(e){const t=c[e];if(void 0!==t)return t.exports;const r=c[e]={id:e,exports:{}};return l[e].call(r.exports,r,r.exports,d),r.exports}d.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var i=t[r++],n=t[r++];d.o(e,i)?0===n&&r++:0===n?Object.defineProperty(e,i,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,i,{enumerable:!0,get:n})}else for(var i in t)d.o(t,i)&&!d.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.nc=void 0;let u={};return(()=>{"use strict";d.d(u,{default:()=>Sr}),d(968);var e=d(272),t=d(155),r=d(299),i=d(591),n=d.n(i),a=d(740),s=d.n(a),o=d(128),l=d.n(o),c=d(855),h=d.n(c),f=d(51),b=d.n(f),p=d(656),m=d.n(p),g=d(371),v={};v.styleTagTransform=m(),v.setAttributes=h(),v.insert=l().bind(null,"head"),v.domAPI=s(),v.insertStyleElement=b(),n()(g.Ay,v),g.Ay&&g.Ay.locals&&g.Ay.locals;var y=d(126),w={};w.styleTagTransform=m(),w.setAttributes=h(),w.insert=l().bind(null,"head"),w.domAPI=s(),w.insertStyleElement=b(),n()(y.Ay,w),y.Ay&&y.Ay.locals&&y.Ay.locals;var P=d(81),S={};S.styleTagTransform=m(),S.setAttributes=h(),S.insert=l().bind(null,"head"),S.domAPI=s(),S.insertStyleElement=b(),n()(P.A,S),P.A&&P.A.locals&&P.A.locals;var _=d(992),M=d.n(_);const x=({onClick:t,className:r})=>(0,e.jsx)("div",{className:M()(P.K,r),onClick:t,children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",children:(0,e.jsx)("path",{fill:"currentColor",d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"})})}),T=(0,r.observer)(t=>{const r=t.needShowErrorScreen,i=t.needShowLoaderScreen;return i||r?(0,e.jsx)("div",{className:M()(y.wG),style:Object.assign({"--loader-background":t.background,"--loaderBackgroundColor":t.color},t.style),onClick:e=>{e.preventDefault()},children:r?(0,e.jsx)(x,{className:y.MU,onClick:e=>{e.stopPropagation(),t.onReload()}}):i&&(0,e.jsx)("div",{className:y.Xr})}):null});function A(e){const t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i);if(t){const[e,r,i,n]=t.map(Number);return(299*r+587*i+114*n)/1e3>128}if(e.startsWith("#")){const t=e.slice(1);let r,i,n;if(3===t.length)r=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),n=parseInt(t[2]+t[2],16);else{if(6!==t.length)return!1;r=parseInt(t.slice(0,2),16),i=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16)}return(299*r+587*i+114*n)/1e3>128}return!0}const O=()=>null!==d.nc&&void 0!==d.nc?d.nc:"";class E extends HTMLElement{constructor(){super(...arguments),Object.defineProperty(this,"styleElement",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"mountPoint",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"handleClick",{enumerable:!0,configurable:!0,writable:!0,value:e=>{var t;this.shadowRoot&&"true"===this.shadowRoot.host.getAttribute("allow-click")&&(null===(t=this.banner)||void 0===t||t.activeSlide.onClick({event:e,currentTarget:this.shadowRoot.host}))}})}setStyle(e){var t;this.styleElement&&this.styleElement.parentNode&&this.styleElement.parentNode.removeChild(this.styleElement);const r=document.createElement("style");r.textContent=e,r.setAttribute("nonce",O()),this.styleElement=r,null===(t=this.shadowRoot)||void 0===t||t.prepend(r)}async init(e){this.mountPoint&&(this.banner=e,this.mountPoint.addEventListener("click",this.handleClick),await this.banner.attachRoot(this.mountPoint))}destroy(){var e,t;null===(e=this.banner)||void 0===e||e.detachRoot(),null===(t=this.mountPoint)||void 0===t||t.removeEventListener("click",this.handleClick)}connectedCallback(){if(this.shadowRoot)return;const e=this.attachShadow({mode:"open"});this.mountPoint=document.createElement("div"),this.mountPoint.style.height="100%",this.mountPoint.style.width="100%",e.appendChild(this.mountPoint)}disconnectedCallback(){}}customElements.get("bnr-slides-container")||customElements.define("bnr-slides-container",E);const k=(0,r.observer)((L=(r,i)=>{var{banner:n,direction:a="row"}=r,s=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r}(r,["banner","direction"]);const o=(0,t.useRef)(null),l=n.canBeShown;(0,t.useLayoutEffect)(()=>{o.current&&o.current.setStyle(n.context.style)},[n.context.style]),(0,t.useLayoutEffect)(()=>{if(!o.current)return;const e=o.current;return e.init(n),()=>{e.destroy()}},[n]),(0,t.useEffect)(()=>{if(s.isActive&&l)return n.start(),()=>{n.stop()}},[n,s.isActive,l]);const c="row"===a?{height:`${Math.ceil(n.width/n.contentRatio)}px`}:{width:`${Math.ceil(n.height*n.contentRatio)}px`};return(0,e.jsxs)("div",{className:M()(g.rh,"ias-bnr",s.className),ref:i,style:Object.assign(Object.assign({},c),{background:n.appearance.background,"--ias-banner-border-radius":`${s.clientAppearance.borderRadius}px`}),children:[(0,e.jsx)("bnr-slides-container",{style:{opacity:l?1:0},class:g.kK,ref:o,"allow-click":s.allowClick.toString(),dir:n.dir}),(0,e.jsx)(T,{needShowErrorScreen:n.needShowErrorScreen,needShowLoaderScreen:n.needShowLoaderScreen,onReload:async()=>{n.recover()},background:n.appearance.background,color:A(n.appearance.background)?"black":"white"})]})},"function"==typeof t.forwardRef?t.forwardRef(L):function(e){return L(e,e.ref)}));var L,I=d(243),B={};B.styleTagTransform=m(),B.setAttributes=h(),B.insert=l().bind(null,"head"),B.domAPI=s(),B.insertStyleElement=b(),n()(I.Ay,B),I.Ay&&I.Ay.locals&&I.Ay.locals;var j=d(55),R={};R.styleTagTransform=m(),R.setAttributes=h(),R.insert=l().bind(null,"head"),R.domAPI=s(),R.insertStyleElement=b(),n()(j.Ay,R),j.Ay&&j.Ay.locals&&j.Ay.locals;const C=r=>{const[i,n]=(0,t.useState)(-1);return(0,t.useEffect)(()=>{r.activeIndex===i&&n(-1)},[r.activeIndex,i]),r.totalPages>1&&(0,e.jsx)("div",{dir:r.langDirection,className:M()(j.y8,{[j.KK]:"column"===r.direction},"ias-bnr-bullets"),children:Array.from({length:r.totalPages}).map((t,i)=>(0,e.jsx)("div",{className:M()("ias-bnr__bullet",j.eF,{[j.u7]:i===r.activeIndex,"ias-bnr__bullet--active":i===r.activeIndex}),onClick:()=>(e=>{n(e),r.onClick(e)})(i)},i))})};var F=d(41),D={};D.styleTagTransform=m(),D.setAttributes=h(),D.insert=l().bind(null,"head"),D.domAPI=s(),D.insertStyleElement=b(),n()(F.Ay,D),F.Ay&&F.Ay.locals&&F.Ay.locals;var N=d(379),z={};z.styleTagTransform=m(),z.setAttributes=h(),z.insert=l().bind(null,"head"),z.domAPI=s(),z.insertStyleElement=b(),n()(N.Ay,z),N.Ay&&N.Ay.locals&&N.Ay.locals;const W=t=>(0,e.jsxs)("div",{className:M()(N.oX,{[N.Yf]:"column"===t.direction}),children:[(0,e.jsx)("button",{onClick:t.onPrevClick,className:M()("ias-bnr__controls-btn","ias-bnr__controls-btn--prev","ias-bnr__controls-btn--start",N.j$,N.L5,{[N.pB]:t.prevDisabled,[N.cG]:"rtl"===t.langDirection,"ias-bnr__controls-btn--disabled":t.prevDisabled}),children:(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M0 12l10.975 11 2.848-2.828-6.176-6.176H24v-3.992H7.646l6.176-6.176L10.975 1 0 12z",fill:"currentColor"})})}),(0,e.jsx)("button",{onClick:t.onNextClick,className:M()("ias-bnr__controls-btn","ias-bnr__controls-btn--next","ias-bnr__controls-btn--end",N.j$,N.a8,{[N.pB]:t.nextDisabled,[N.cG]:"rtl"===t.langDirection,"ias-bnr__controls-btn--disabled":t.nextDisabled}),children:(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M13.025 1l-2.847 2.828 6.176 6.176h-16.354v3.992h16.354l-6.176 6.176 2.847 2.828 10.975-11z",fill:"currentColor"})})})]});class V{constructor(e){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_enabled",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get enabled(){return this._enabled}update(){const e=this.slider.options.loop&&this.canUseLoop();this._enabled?e||(this._enabled=!1,this.destroy()):e&&(this._enabled=!0)}applyLoopFix({targetIndex:e,direction:t}){if(!this.enabled)return!1;const r="next"===t||!t,i="prev"!==t&&t?[]:this.getPrependSlidesIndexes(e),n=r?this.getAppendSlidesIndexes(e):[];return this.moveSlides(i,n),this.adjustPosition(i,n),i.length>0||n.length>0}destroy(){this.resetSlidesOrder()}resetSlidesOrder(){const e=[];this.slider.slides.forEach(t=>{const r=+t.dataset.index;e[r]=t}),e.forEach(e=>{this.slider.track.append(e)})}canUseLoop(){return!(this.slider.slides.length<this.slider.options.slidesPerView+1&&(console.warn("IAS Banners Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView parameters"),1))}getPrependSlidesIndexes(e){const t=this.slider.track.children,r=[];if(e<1)for(let i=0;i<1-e;i++){const e=t.length-i-1;r.push(e)}return r}getAppendSlidesIndexes(e){const t=[];if(e+this.slider.options.slidesPerView>this.slider.slides.length-1){const r=Math.max(e-(this.slider.slides.length-2),1);for(let e=0;e<r;e++){const r=e;t.push(r)}}return t}moveSlides(e,t){const r=this.slider.track,i=this.slider.slides.slice();e.forEach(e=>{r.prepend(i[e])}),t.forEach(e=>{r.append(i[e])})}adjustPosition(e,t){e.length>0?this.slider.slideTo(this.slider.activeIndex+e.length,0):t.length>0&&this.slider.slideTo(this.slider.activeIndex-t.length,0)}}var q;!function(e){e.TouchStart="touchStart",e.TouchMove="touchMove",e.TouchEnd="touchEnd",e.ReachStart="reachStart",e.ReachEnd="reachEnd",e.ActiveIndexChange="activeIndexChange",e.RealIndexChnage="realIndexChange",e.TransitionStart="transitionStart",e.TransitionEnd="transitionend",e.Resize="resize",e.SlidesUpdated="slidesUpdated",e.AutoplayTimeLeft="autoplayTimeLeft",e.AutoplayTimerTick="autoplayTimerTick"}(q||(q={}));class G{constructor(e,t){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"loopModule",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"startPosition",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"startTranslate",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"isTouched",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isMoved",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_enabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"startDirection",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"onTouchStart",{enumerable:!0,configurable:!0,writable:!0,value:e=>{if(this.slider.animating||!this._enabled)return;e.stopPropagation();const{startPosition:t,startTranslate:r}=this.getTouchStartState(e);this.startPosition=t,this.startTranslate=r,this.isTouched=!0,this.setGrabCursor(!1),this.slider.autoplay.pause()}}),Object.defineProperty(this,"onTouchMove",{enumerable:!0,configurable:!0,writable:!0,value:e=>{if(!this.isTouched)return;e.stopPropagation();const t=this.getTouchDiff(e);if(!(Math.abs(t)>this.slider.options.swipeThreshold||this._isMoved))return;this.setGrabCursor(!0),this._isMoved||(this.slider.emit(q.TouchStart),this.slider.autoplay.pause(),this.slider.lockActiveIndex(),this.startDirection=this.getSwipeDirection(t)),this._isMoved=!0;const r="next"===this.startDirection?this.slider.options.swipeThreshold:-this.slider.options.swipeThreshold;this.slider.emit(q.TouchMove);let i=this.startTranslate+t+r;this.applyLoopFix(i),i=this.startTranslate+t+r,this.setTranslate(i)}}),Object.defineProperty(this,"onTouchEnd",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.isTouched&&(this.slider.unlockActiveIndex(),this.updateActiveIndex(),this.unsetGrabCursor(),this.isTouched=!1,this._isMoved=!1,this.slider.emit(q.TouchEnd),this.slider.autoplay.resume())}}),this.slider.track.addEventListener("mousedown",this.onTouchStart,{passive:!0}),document.addEventListener("mousemove",this.onTouchMove,{passive:!0}),document.addEventListener("mouseup",this.onTouchEnd),this.slider.track.addEventListener("touchstart",this.onTouchStart,{passive:!0}),document.addEventListener("touchmove",this.onTouchMove,{passive:!0}),document.addEventListener("touchend",this.onTouchEnd)}get isMoved(){return this._isMoved}enable(){this._enabled=!0}disable(){this._enabled=!1}enableHorizontalSwipeGesture(){this._enabled=!0}disableHorizontalSwipeGesture(){this._enabled=!1}enableVerticalSwipeGesture(){this._enabled=!0}disableVerticalSwipeGesture(){this._enabled=!1}destroy(){this.slider.track.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd),this.slider.track.removeEventListener("mousedown",this.onTouchStart),document.removeEventListener("mousemove",this.onTouchMove),document.removeEventListener("mouseup",this.onTouchEnd)}getTouchStartState(e){let t=0,r=0;return"row"===this.slider.options.direction?(t=e instanceof MouseEvent?e.pageX:e.touches[0].clientX,r=this.slider.currentTranslateX):(t=e instanceof MouseEvent?e.pageY:e.touches[0].clientY,r=this.slider.currentTranslateY),{startPosition:t,startTranslate:r}}getTouchDiff(e){let t=0;return"row"===this.slider.options.direction?(t=(e instanceof MouseEvent?e.pageX:e.touches[0].clientX)-this.startPosition,t*=this.slider.options.touchRatio):(t=(e instanceof MouseEvent?e.pageY:e.touches[0].clientY)-this.startPosition,t*=this.slider.options.touchRatio),t}setTranslate(e){e=this.applyEdgeResistance(e),this.slider.setTranslate(e)}applyLoopFix(e){if(!this.loopModule.enabled)return;e=this.slider.langDirSign*-e;const t=this.slider.langDirSign*(this.slider.slideSize+this.slider.options.spaceBetween),r=this.slider.getMinTranslate(),i=Math.abs(this.slider.getSlideOffset(this.slider.slides.length-this.slider.options.slidesPerView));e<r?this.loopModule.applyLoopFix({targetIndex:0,direction:"prev"})&&(this.startTranslate-=t):e>i&&this.loopModule.applyLoopFix({targetIndex:this.slider.slides.length-this.slider.options.slidesPerView,direction:"next"})&&(this.startTranslate+=t)}updateActiveIndex(){if(!this.slider.slides.length)return;const{currentTranslate:e,options:t}=this.slider,r=this.slider.slideSize+t.spaceBetween,i=this.slider.langDirSign*-e/r,n=Math.abs(i);let a=n-Math.trunc(n);if(a="next"===this.startDirection?a:1-a,a>t.longSwipesRatio){const e="next"===this.startDirection?Math.ceil(i):Math.floor(i);this.slider.slideTo(e)}else{let e=Math.trunc(i);0===e&&"prev"===this.startDirection&&(e+=1),e===this.slider.totalPages-1&&"next"===this.startDirection&&(e-=1),this.slider.slideTo(e)}}setGrabCursor(e){this.slider.track.style.cursor="move",this.slider.track.style.cursor=e?"grabbing":"grab"}unsetGrabCursor(){this.slider.track.style.cursor=""}getResistanceCoeff(e){const t=Math.min(Math.abs(e)/(.5*this.slider.slideSize),1);return this.slider.options.edgeTouchRatio+(this.slider.options.touchRatio-this.slider.options.edgeTouchRatio)*Math.exp(3*-t)}applyEdgeResistance(e){if(this.loopModule.enabled)return e;const t=this.slider.langDirSign,r=-t*e,i=this.slider.getMinTranslate(),n=this.slider.getMaxTranslate();let a=r;if(a>n){const e=a-n;a=n+e*this.getResistanceCoeff(e)}else if(a<i){const e=i-a;a=i-e*this.getResistanceCoeff(e)}return-t*a}getSwipeDirection(e){return this.slider.langDirSign*e>0?"prev":"next"}}var U,H=d(46);!function(e){e.Start="start",e.Stop="stop",e.Pause="pause",e.Resume="resume",e.Progress="progress",e.Complete="complete"}(U||(U={}));class $ extends H.EventEmitter{constructor(){super(...arguments),Object.defineProperty(this,"timerId",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"currentProgress",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"progressBeforePause",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"timerPaused",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"isCompleted",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"enabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"rafId",{enumerable:!0,configurable:!0,writable:!0,value:0})}get started(){return!this.isCompleted}get paused(){return this.timerPaused}setTimer(e){0!==e?(this.timerId=setTimeout(()=>this.complete({}),e),this.currentProgress=0,this.runTimerTicks(e)):this.forceEnd()}start(e){this.timerPaused||(this.stop(),this.progressBeforePause=0,this.timeout=e,this.enabled&&(this.isCompleted=!1,this.emit(U.Start),this.setTimer(e)))}restart(){this.stop(),this.start(this.timeout)}stop(){this.isCompleted||(this.clearTimer(),this.emit(U.Stop),this.isCompleted=!0,this.timerPaused=!1)}pause(){this.isCompleted||(this.timerPaused=!0,this.clearTimer(),this.progressBeforePause=this.currentProgress,this.emit(U.Pause))}resume(){if(!this.timerPaused)return;this.timerPaused=!1;const e=1-this.progressBeforePause,t=this.timeout*e;this.setTimer(t),this.emit(U.Resume)}forceEnd(){this.complete({forceEnd:!0})}disable(){this.enabled=!1,this.stop()}enable(){this.enabled=!0,this.start(this.timeout)}complete({forceEnd:e=!1}){this.isCompleted=!0,this.progressBeforePause=0,this.clearTimer(),this.emit(U.Complete,{forceEnd:e})}clearTimer(){cancelAnimationFrame(this.rafId),null!==this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}updateProgress(e){const t=1-this.progressBeforePause;this.currentProgress=this.progressBeforePause+e*t;const r=100*this.currentProgress;this.emit(U.Progress,{percents:r,totalTime:this.timeout,currentTime:this.currentProgress*this.timeout})}runTimerTicks(e){const t=performance.now(),r=i=>{let n=(i-t)/e;n>1&&(n=1);const a=n;this.updateProgress(a),n<1&&(this.rafId=requestAnimationFrame(r))};this.rafId=requestAnimationFrame(r)}}class Y{constructor(e,t){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"loopModule",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:new $}),Object.defineProperty(this,"delay",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"handleTimerComplete",{enumerable:!0,configurable:!0,writable:!0,value:({forceEnd:e})=>{e||this.slider.emit(q.AutoplayTimeLeft)}}),Object.defineProperty(this,"handleTimerProgress",{enumerable:!0,configurable:!0,writable:!0,value:e=>{this.slider.emit(q.AutoplayTimerTick,{currentTime:e.currentTime,totalTime:e.totalTime,percents:e.percents})}}),this.timer.on(U.Complete,this.handleTimerComplete),this.timer.on(U.Progress,this.handleTimerProgress)}get paused(){return this.timer.paused}start(){this.slider.options.autoplay&&(this.stop(),this.timer.start(this.delay))}stop(){this.timer.stop()}pause(){this.slider.options.autoplay&&this.timer.pause()}resume(){this.slider.options.autoplay&&this.timer.resume()}setDelay(e){this.delay=e}destroy(){this.timer.off(U.Complete,this.handleTimerComplete),this.timer.off(U.Progress,this.handleTimerProgress),this.stop()}}class X extends H.EventEmitter{constructor(e,t={}){super(),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:{autoplay:!1,speed:300,delay:3e3,loop:!1,slidesPerView:1,spaceBetween:0,initialSlide:0,updateOnWindowResize:!0,direction:"row",langDirection:"ltr",allowTouchMove:!0,touchRatio:1,longSwipesRatio:.5,swipeThreshold:20,edgeTouchRatio:.3}}),Object.defineProperty(this,"isAnimating",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_activeIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_realIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_currentTranslateX",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_currentTranslateY",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_reachEnd",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_reachStart",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"loopModule",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"touchModule",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_slideWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_slideHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"autoplay",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_activeIndexLocked",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"handleResize",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.updateSize(),this.emit(q.Resize)}}),this.track=e,this.container=e.parentElement,this.loopModule=new V(this),this.touchModule=new G(this,this.loopModule),this.autoplay=new Y(this,this.loopModule),this.options.updateOnWindowResize&&window.addEventListener("resize",this.handleResize),this.collectSlides(),this.update(t)}get langDirSign(){return"column"===this.options.direction||"ltr"===this.options.langDirection?1:-1}get activeIndex(){return this._activeIndex}get realIndex(){return this._realIndex}get reachEnd(){return this._reachEnd}get reachStart(){return this._reachStart}get slidesEl(){return this.track}get slides(){return Array.from(this.track.children)}get allSlides(){return this.slides}get animating(){return this.isAnimating}get currentTranslateX(){return this._currentTranslateX}get currentTranslateY(){return this._currentTranslateY}get currentTranslate(){return"row"===this.options.direction?this._currentTranslateX:this._currentTranslateY}get isMoved(){return this.touchModule.isMoved}get slideWidth(){return this._slideWidth}get slideHeight(){return this._slideHeight}get slideSize(){return"row"===this.options.direction?this.slideWidth:this.slideHeight}get totalPages(){return this.loopModule.enabled?this.slides.length:Math.max(this.slides.length-this.options.slidesPerView+1,1)}async slideToLoop(e,t=this.options.speed){if(!this.loopModule.enabled)return this.slideTo(e,t);if(this.isAnimating)return;const r=this.getPhysicalIndexByRealIndex(e),i=this.slides.length-r<this.options.slidesPerView,n=r-this._activeIndex-1<this.options.slidesPerView?"next":"prev";if(i){const e="next"===n?r+1:r-this.slides.length+1;this.loopModule.applyLoopFix({targetIndex:e,direction:n})}const a=this.getPhysicalIndexByRealIndex(e);requestAnimationFrame(()=>this.slideTo(a))}async slideTo(e,t=this.options.speed){e=this.clamp(e,0,this.totalPages-1),this.isAnimating||(this.isAnimating=!0,await this.performTranslateToSlide(e,t),this._activeIndexLocked||this.updateIndexes(e),this.isAnimating=!1)}lockActiveIndex(){this._activeIndexLocked=!0}unlockActiveIndex(){this._activeIndexLocked=!1}toNextSlide(){this.isAnimating||(this.loopModule.enabled?this.toNextSlideByLoop():this.slideTo(this.normalizeIndex(this._realIndex+1)))}toPrevSlide(){this.isAnimating||(this.loopModule.enabled?this.toPrevSlideByLoop():this.slideTo(this.normalizeIndex(this._realIndex-1)))}update(e){this.options=this.normalizeOptions(Object.assign(Object.assign({},this.options),e)),this.setupTrackStyles(),this.updateSize(),this.loopModule.update(),this.testAttraction(),this.options.allowTouchMove?this.touchModule.enable():this.touchModule.disable()}destroy(){window.removeEventListener("resize",this.handleResize),this.autoplay.destroy(),this.touchModule.destroy(),this.track.removeAttribute("style"),this._activeIndex=0,this._activeIndexLocked=!1,this.isAnimating=!1}isSlideVisible(e){const t=this.getPhysicalIndexByRealIndex(e);return t>=this._activeIndex&&t<this._activeIndex+this.options.slidesPerView}getVisibleSlideIndexes(){return this.slides.slice(this._activeIndex,this._activeIndex+this.options.slidesPerView).map(e=>+e.dataset.index)}getPhysicalIndexByRealIndex(e){const t=this.normalizeIndex(e);return this.slides.findIndex(e=>e.dataset.index===t.toString())}getMinTranslate(){return 0}getMaxTranslate(){return Math.abs(this.getSlideOffset(this.totalPages-1))}setTranslate(e){"row"===this.options.direction?(this.track.style.transform=`translate3d(${e}px, 0px, 0px)`,this._currentTranslateX=e,this._currentTranslateY=0):(this.track.style.transform=`translate3d(0px, ${e}px, 0px)`,this._currentTranslateX=0,this._currentTranslateY=e),this.testAttraction()}enableHorizontalSwipeGesture(){this.touchModule.enableHorizontalSwipeGesture()}disableHorizontalSwipeGesture(){this.touchModule.disableHorizontalSwipeGesture()}getSlideOffset(e){return this.slides.length?-e*(("row"===this.options.direction?this.slides[0].clientWidth:this.slides[0].clientHeight)+this.options.spaceBetween):0}updateSize(){const e=this.slideWidth,t=this.slideHeight;"row"===this.options.direction?this.calculateSlideWidths():this.calculateSlideHeight(),e===this.slideWidth&&t===this.slideHeight||this.emit(q.SlidesUpdated),this.slideTo(this._activeIndex,0)}getTrackWidth(){return this.track.clientWidth-this.options.spaceBetween*(this.options.slidesPerView-1)}getTrackHeight(){return this.track.clientHeight-this.options.spaceBetween*(this.options.slidesPerView-1)}toNextSlideByLoop(){this.isAnimating||(this.loopModule.applyLoopFix({targetIndex:this._activeIndex,direction:"next"}),requestAnimationFrame(()=>this.slideTo(this._activeIndex+1)))}toPrevSlideByLoop(){this.isAnimating||(this.loopModule.applyLoopFix({targetIndex:this._activeIndex,direction:"prev"}),requestAnimationFrame(()=>this.slideTo(this._activeIndex-1)))}updateIndexes(e){if(!this.slides.length)return;const t=+this.slides[e].dataset.index,r=this._realIndex,i=this._activeIndex;this._realIndex=t,this._activeIndex=e,r!==t&&this.emit(q.RealIndexChnage,t),i!==e&&this.emit(q.ActiveIndexChange,e)}setupTrackStyles(){Object.assign(this.track.style,{display:"flex",transition:`transform ${this.options.speed}ms ease`,gap:`${this.options.spaceBetween}px`})}collectSlides(){this.slides.forEach((e,t)=>{e.dataset.index=t.toString()})}calculateSlideWidths(){this._slideWidth=Math.ceil(this.getTrackWidth()/this.options.slidesPerView),this.slides.forEach(e=>{e.style.width=`${this._slideWidth}px`,e.style.height=""})}calculateSlideHeight(){this._slideHeight=Math.ceil(this.getTrackHeight()/this.options.slidesPerView),this.slides.forEach(e=>{e.style.height=`${this._slideHeight}px`,e.style.width=""})}translateSlidesTrack(e,t){this.track.style.transitionDuration=`${t}ms`,this.setTranslate(this.langDirSign*this.getSlideOffset(e))}async performTranslateToSlide(e,t){if(0===t)this.translateSlidesTrack(e,0);else{if(this._activeIndex===e&&!this.touchModule.isMoved)return;this.translateSlidesTrack(e,t),this.emit(q.TransitionStart),await this.waitTransitionEnd(),this.emit(q.TransitionEnd)}}waitTransitionEnd(){return new Promise(e=>{this.track.addEventListener("transitionend",t=>{"transform"===t.propertyName&&(this.track.style.transitionDuration="0ms",e())},{once:!0})})}testAttraction(){const e=this.getMinTranslate(),t=this.getMaxTranslate();let r=!this.loopModule.enabled&&this.langDirSign*this.currentTranslate>=e,i=!this.loopModule.enabled&&this.langDirSign*-this.currentTranslate>=t;this.options.slidesPerView===this.slides.length&&(r=!0,i=!0),r!==this._reachStart&&(this._reachStart=r,this.emit(q.ReachStart,r)),i!==this._reachEnd&&(this._reachEnd=i,this.emit(q.ReachEnd,i))}normalizeOptions(e){var t,r,i,n,a,s,o,l,c,d,u,h,f,b,p;return{autoplay:null!==(t=e.autoplay)&&void 0!==t?t:this.options.autoplay,speed:null!==(r=e.speed)&&void 0!==r?r:this.options.speed,delay:null!==(i=e.delay)&&void 0!==i?i:this.options.delay,loop:null!==(n=e.loop)&&void 0!==n?n:this.options.loop,slidesPerView:Math.max(Math.min(this.track.children.length,null!==(a=e.slidesPerView)&&void 0!==a?a:this.options.slidesPerView),0),spaceBetween:null!==(s=e.spaceBetween)&&void 0!==s?s:this.options.spaceBetween,initialSlide:null!==(o=e.initialSlide)&&void 0!==o?o:this.options.initialSlide,updateOnWindowResize:null!==(l=e.updateOnWindowResize)&&void 0!==l?l:this.options.updateOnWindowResize,direction:null!==(c=e.direction)&&void 0!==c?c:this.options.direction,allowTouchMove:null!==(d=e.allowTouchMove)&&void 0!==d?d:this.options.allowTouchMove,langDirection:null!==(u=e.langDirection)&&void 0!==u?u:this.options.langDirection,touchRatio:null!==(h=e.touchRatio)&&void 0!==h?h:this.options.touchRatio,longSwipesRatio:null!==(f=e.longSwipesRatio)&&void 0!==f?f:this.options.longSwipesRatio,swipeThreshold:null!==(b=e.swipeThreshold)&&void 0!==b?b:this.options.swipeThreshold,edgeTouchRatio:null!==(p=e.edgeTouchRatio)&&void 0!==p?p:this.options.edgeTouchRatio}}normalizeIndex(e){const t=this.slides.length;return(e%t+t)%t}clamp(e,t,r){return Math.max(t,Math.min(e,r))}}const K=(0,r.observer)(r=>{const[i,n]=(0,t.useState)(null),a=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!a.current||!r.slidesCount)return;const e=new X(a.current,{autoplay:r.autoplay,speed:r.speed,loop:r.loop,slidesPerView:r.slidesPerView,spaceBetween:r.spaceBetween,allowTouchMove:r.allowTouchMove,direction:r.direction,touchRatio:r.touchRatio,longSwipesRatio:r.longSwipesRatio,swipeThreshold:r.swipeThreshold,edgeTouchRatio:r.edgeTouchRatio,langDirection:r.langDirection});return r.onInit(e),n(e),()=>{null==e||e.destroy()}},[r.slidesCount]),(0,t.useEffect)(()=>{i&&i.update({autoplay:r.autoplay,speed:r.speed,loop:r.loop,slidesPerView:r.slidesPerView,spaceBetween:r.spaceBetween,allowTouchMove:r.allowTouchMove,direction:r.direction,touchRatio:r.touchRatio,longSwipesRatio:r.longSwipesRatio,swipeThreshold:r.swipeThreshold,edgeTouchRatio:r.edgeTouchRatio,langDirection:r.langDirection})},[i,r.autoplay,r.speed,r.loop,r.langDirection,r.slidesPerView,r.spaceBetween,r.slidesCount,r.allowTouchMove,r.direction,r.touchRatio,r.longSwipesRatio,r.swipeThreshold,r.edgeTouchRatio]),(0,e.jsxs)("div",{className:M()("ias-bnr-slider",F.aw,{[F.yC]:"column"===r.direction}),children:[(0,e.jsx)("div",{dir:r.langDirection,ref:a,className:M()("ias-bnr-slider__track",F.xs),children:r.children}),i&&r.pagination.enabled&&(0,e.jsx)(C,{direction:r.direction,langDirection:r.langDirection,totalPages:i.totalPages,activeIndex:i.realIndex,onClick:e=>{r.loop?i.slideToLoop(e):i.slideTo(e)}}),i&&r.navigation.enabled&&(0,e.jsx)(W,{direction:r.direction,langDirection:r.langDirection,onPrevClick:()=>{i.toPrevSlide()},onNextClick:()=>{i.toNextSlide()},nextDisabled:i.reachEnd,prevDisabled:i.reachStart})]})}),Q=t=>(0,e.jsx)("div",{className:M()(F.pj,t.className),style:t.style,children:t.children});class J{constructor(e){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e})}isPaused(){return this.slider.autoplay.paused}resume(){this.slider.autoplay.resume()}pause(){this.slider.autoplay.pause()}start(){this.slider.autoplay.start()}setDelay(e){this.slider.autoplay.setDelay(e)}stop(){this.slider.autoplay.stop()}}class Z{constructor(e){Object.defineProperty(this,"slider",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"autoplay",{enumerable:!0,configurable:!0,writable:!0,value:new J(this.slider)})}getTotalPages(){return this.slider.totalPages}getActiveIndex(){return this.slider.realIndex}toNextSlide(){this.slider.isMoved||this.slider.toNextSlide()}toPrevSlide(){this.slider.isMoved||this.slider.toPrevSlide()}slideTo(e,t){this.slider.isMoved||this.slider.slideToLoop(e,t)}enableHorizontalSwipeGesture(){this.slider.enableHorizontalSwipeGesture()}disableHorizontalSwipeGesture(){this.slider.disableHorizontalSwipeGesture()}updateSize(){this.slider.updateSize()}}var ee=d(314),te=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0};let re,ie=(()=>{var e,t;let r,i=[],n=[];return e=class{get _context(){return function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}(this,t,"f")}set _context(e){!function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?n.call(e,r):n?n.value=r:t.set(e,r)}(this,t,e,"f")}constructor(e){t.set(this,te(this,i,void 0)),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:te(this,n)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayFrom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayTo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"appearance",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_wasShown",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_frequencyLimit",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_openTime",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_isOnceOpened",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this.id=e.id,this.name=e.name,this.displayFrom=e.displayFrom,this.displayTo=e.displayTo,this.slides=e.slides,this._context=e.context,this.appearance=e.appearance}get context(){return this._context}get withinDisplayTimeRange(){const e=Math.trunc(Date.now()/1e3);return(!this.displayFrom||e>=this.displayFrom)&&(!this.displayTo||e<=this.displayTo)}get wasShown(){return this._wasShown}get frequencyLimitTimeExceeded(){return null===this._frequencyLimit?this._isOnceOpened:0!==this._frequencyLimit&&Math.trunc(this.timeSinceLastShow/1e3)<=this._frequencyLimit}get timeSinceLastShow(){return Date.now()-this._openTime}get openTime(){return this._openTime}updatePlaceholders(e){for(const t of this.slides)t.updatePlaceholders(e)}markWasShown(){this._wasShown=!0}markAsOpened(){this._openTime=Date.now(),this._isOnceOpened=!0}},t=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[ee.observable],function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0}(e,null,r,{kind:"accessor",name:"_context",static:!1,private:!1,access:{has:e=>"_context"in e,get:e=>e._context,set:(e,t)=>{e._context=t}},metadata:t},i,n),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();class ne{constructor(e){var t;Object.defineProperty(this,"contentRatio",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"background",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.contentRatio=null!==(t=e.content_ratio)&&void 0!==t?t:1,this.background=this.mapBackgroundDtoToModel(e.background)}mapBackgroundDtoToModel(e){if(!e||0===e.alpha)return"transparent";if("solid"in e)return this.applyAlphaToColor(e.solid,e.alpha);if("linear_gradient"in e){const{angle:t,color_step_list:r}=e.linear_gradient;return`linear-gradient(${t}deg, ${r.map(t=>`${this.applyAlphaToColor(t.color,e.alpha)} ${t.position}%`).join(", ")})`}return"transparent"}applyAlphaToColor(e,t){if(e.startsWith("#")){const r=e.slice(1),i=3===r.length;return`rgba(${parseInt(i?r[0]+r[0]:r.slice(0,2),16)}, ${parseInt(i?r[1]+r[1]:r.slice(2,4),16)}, ${parseInt(i?r[2]+r[2]:r.slice(4,6),16)}, ${t})`}return e}}class ae{constructor(e,t){Object.defineProperty(this,"widgetsData",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"style",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.style=t.style,this.widgetsData=this.mapBannerContextDto(e,t)}mapBannerContextDto(e,t){var r;const i={},n=null!==(r=t.widgetsData)&&void 0!==r?r:{};for(const t in n)Array.isArray(n[t])||(i[t]=n[t][e]);return i}updateNarrativeSavedData(e){this.widgetsData._narrative_saved_data=e}}function se(e,t,r){return String(e).replace(new RegExp(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t),"g"),()=>r)}re=function(){},Error,Error;const oe=["InternalPrimaryFont","InternalSecondaryFont"];function le(e,t){if(!t)return e;let r=e;for(const e of oe)r=se(r,e,`${t}${e}`);return r}var ce;(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}}),r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch(e){}})(),function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}(),function(e){e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary",e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary"}(ce||(ce={}));var de=d(643);d.n(de)().getParser(window.navigator.userAgent).parse().getPlatformType();var ue=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0};let he=(()=>{var e,t;let r,i=[],n=[];return e=class{get _html(){return function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}(this,t,"f")}set _html(e){!function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?n.call(e,r):n?n.value=r:t.set(e,r)}(this,t,e,"f")}get html(){return this._html}get payload(){return this._payload}constructor(e){Object.defineProperty(this,"_rawHtml",{enumerable:!0,configurable:!0,writable:!0,value:""}),t.set(this,ue(this,i,void 0)),Object.defineProperty(this,"_payload",{enumerable:!0,configurable:!0,writable:!0,value:ue(this,n)}),this._rawHtml=this.replaceSlideNonce(e.html),this._rawHtml=le(this._rawHtml,e.fontPrefix),this._payload=e.payload,this._html=this._rawHtml}updatePlaceholders(e){let t=this._rawHtml;for(const r of e)t=se(t,`%${r.key}%`,r.value);this._html=t}replaceSlideNonce(e){var t;return se(e,"{{nonce}}",null!==(t=O())&&void 0!==t?t:"")}},t=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[ee.observable],function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0}(e,null,r,{kind:"accessor",name:"_html",static:!1,private:!1,access:{has:e=>"_html"in e,get:e=>e._html,set:(e,t)=>{e._html=t}},metadata:t},i,n),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();var fe=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0};let be=(()=>{var e,t;let r,i=[],n=[];return e=class{get _banners(){return function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}(this,t,"f")}set _banners(e){!function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?n.call(e,r):n?n.value=r:t.set(e,r)}(this,t,e,"f")}constructor(e){Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"style",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t.set(this,fe(this,i,[])),fe(this,n),this.id=e.id,this._banners=e.banners,this.style=e.style}get banners(){return this._banners}updatePlaceholders(e){for(const t of this._banners)t.updatePlaceholders(e)}},t=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[ee.observable],function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0}(e,null,r,{kind:"accessor",name:"_banners",static:!1,private:!1,access:{has:e=>"_banners"in e,get:e=>e._banners,set:(e,t)=>{e._banners=t}},metadata:t},i,n),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();const pe=(e,t)=>{if("number"==typeof e)return e;if("string"==typeof e){const t=parseFloat(e);if(!isNaN(t))return t}return t};var me=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},ge=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},ve=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},ye=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};let we=(()=>{var e,t;let r,i=[],n=[];return e=class{get borderRadius(){return ve(this,t,"f")}set borderRadius(e){ye(this,t,e,"f")}update(e){this.borderRadius=pe(null==e?void 0:e.borderRadius,this.borderRadius)}constructor(){t.set(this,ge(this,i,12)),ge(this,n)}},t=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;r=[ee.observable],me(e,null,r,{kind:"accessor",name:"borderRadius",static:!1,private:!1,access:{has:e=>"borderRadius"in e,get:e=>e.borderRadius,set:(e,t)=>{e.borderRadius=t}},metadata:t},i,n),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})(),Pe=(()=>{var e,t,r,i,n,a,s,o,l,c,d,u,h,f;let b,p,m,g,v,y,w,P,S,_,M,x,T,A=[],O=[],E=[],k=[],L=[],I=[],B=[],j=[],R=[],C=[],F=[],D=[],N=[],z=[],W=[],V=[],q=[],G=[],U=[],H=[],$=[],Y=[],X=[],K=[],Q=[],J=[];return e=class{get loop(){return ve(this,t,"f")}set loop(e){ye(this,t,e,"f")}get gap(){return ve(this,r,"f")}set gap(e){ye(this,r,e,"f")}get autoplay(){return ve(this,i,"f")}set autoplay(e){ye(this,i,e,"f")}get animationSpeed(){return ve(this,n,"f")}set animationSpeed(e){ye(this,n,e,"f")}get slidesPerView(){return ve(this,a,"f")}set slidesPerView(e){ye(this,a,e,"f")}get navigation(){return ve(this,s,"f")}set navigation(e){ye(this,s,e,"f")}get pagination(){return ve(this,o,"f")}set pagination(e){ye(this,o,e,"f")}get direction(){return ve(this,l,"f")}set direction(e){ye(this,l,e,"f")}get allowTouchMove(){return ve(this,c,"f")}set allowTouchMove(e){ye(this,c,e,"f")}get touchRatio(){return ve(this,d,"f")}set touchRatio(e){ye(this,d,e,"f")}get longSwipesRatio(){return ve(this,u,"f")}set longSwipesRatio(e){ye(this,u,e,"f")}get swipeThreshold(){return ve(this,h,"f")}set swipeThreshold(e){ye(this,h,e,"f")}get edgeTouchRatio(){return ve(this,f,"f")}set edgeTouchRatio(e){ye(this,f,e,"f")}constructor(e){t.set(this,ge(this,A,!0)),r.set(this,(ge(this,O),ge(this,E,16))),i.set(this,(ge(this,k),ge(this,L,!0))),n.set(this,(ge(this,I),ge(this,B,300))),a.set(this,(ge(this,j),ge(this,R,1))),s.set(this,(ge(this,C),ge(this,F,{enabled:!0}))),o.set(this,(ge(this,D),ge(this,N,{enabled:!0}))),l.set(this,(ge(this,z),ge(this,W,"row"))),c.set(this,(ge(this,V),ge(this,q,!0))),d.set(this,(ge(this,G),ge(this,U,1))),u.set(this,(ge(this,H),ge(this,$,.5))),h.set(this,(ge(this,Y),ge(this,X,20))),f.set(this,(ge(this,K),ge(this,Q,.3))),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:(ge(this,J),new we)}),e&&this.update(e)}update(e){var t,r,i,n,a,s,o,l;this.loop=null!==(t=null==e?void 0:e.loop)&&void 0!==t?t:this.loop,this.gap=pe(null==e?void 0:e.gap,this.gap),this.autoplay=null!==(r=null==e?void 0:e.autoplay)&&void 0!==r?r:this.autoplay,this.animationSpeed=pe(null==e?void 0:e.animationSpeed,this.animationSpeed),this.slidesPerView=Math.max(pe(null==e?void 0:e.slidesPerView,this.slidesPerView),0),this.navigation={enabled:null!==(n=null===(i=null==e?void 0:e.navigation)||void 0===i?void 0:i.enabled)&&void 0!==n?n:this.navigation.enabled},this.pagination={enabled:null!==(s=null===(a=null==e?void 0:e.pagination)||void 0===a?void 0:a.enabled)&&void 0!==s?s:this.pagination.enabled},this.direction=null!==(o=e.direction)&&void 0!==o?o:this.direction,this.allowTouchMove=null!==(l=e.allowTouchMove)&&void 0!==l?l:this.allowTouchMove,this.touchRatio=pe(null==e?void 0:e.touchRatio,this.touchRatio),this.longSwipesRatio=pe(null==e?void 0:e.longSwipesRatio,this.longSwipesRatio),this.swipeThreshold=pe(null==e?void 0:e.swipeThreshold,this.swipeThreshold),this.edgeTouchRatio=pe(null==e?void 0:e.edgeTouchRatio,this.edgeTouchRatio),this.banner.update(e.banner)}},t=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;b=[ee.observable],p=[ee.observable],m=[ee.observable],g=[ee.observable],v=[ee.observable],y=[ee.observable],w=[ee.observable],P=[ee.observable],S=[ee.observable],_=[ee.observable],M=[ee.observable],x=[ee.observable],T=[ee.observable],me(e,null,b,{kind:"accessor",name:"loop",static:!1,private:!1,access:{has:e=>"loop"in e,get:e=>e.loop,set:(e,t)=>{e.loop=t}},metadata:t},A,O),me(e,null,p,{kind:"accessor",name:"gap",static:!1,private:!1,access:{has:e=>"gap"in e,get:e=>e.gap,set:(e,t)=>{e.gap=t}},metadata:t},E,k),me(e,null,m,{kind:"accessor",name:"autoplay",static:!1,private:!1,access:{has:e=>"autoplay"in e,get:e=>e.autoplay,set:(e,t)=>{e.autoplay=t}},metadata:t},L,I),me(e,null,g,{kind:"accessor",name:"animationSpeed",static:!1,private:!1,access:{has:e=>"animationSpeed"in e,get:e=>e.animationSpeed,set:(e,t)=>{e.animationSpeed=t}},metadata:t},B,j),me(e,null,v,{kind:"accessor",name:"slidesPerView",static:!1,private:!1,access:{has:e=>"slidesPerView"in e,get:e=>e.slidesPerView,set:(e,t)=>{e.slidesPerView=t}},metadata:t},R,C),me(e,null,y,{kind:"accessor",name:"navigation",static:!1,private:!1,access:{has:e=>"navigation"in e,get:e=>e.navigation,set:(e,t)=>{e.navigation=t}},metadata:t},F,D),me(e,null,w,{kind:"accessor",name:"pagination",static:!1,private:!1,access:{has:e=>"pagination"in e,get:e=>e.pagination,set:(e,t)=>{e.pagination=t}},metadata:t},N,z),me(e,null,P,{kind:"accessor",name:"direction",static:!1,private:!1,access:{has:e=>"direction"in e,get:e=>e.direction,set:(e,t)=>{e.direction=t}},metadata:t},W,V),me(e,null,S,{kind:"accessor",name:"allowTouchMove",static:!1,private:!1,access:{has:e=>"allowTouchMove"in e,get:e=>e.allowTouchMove,set:(e,t)=>{e.allowTouchMove=t}},metadata:t},q,G),me(e,null,_,{kind:"accessor",name:"touchRatio",static:!1,private:!1,access:{has:e=>"touchRatio"in e,get:e=>e.touchRatio,set:(e,t)=>{e.touchRatio=t}},metadata:t},U,H),me(e,null,M,{kind:"accessor",name:"longSwipesRatio",static:!1,private:!1,access:{has:e=>"longSwipesRatio"in e,get:e=>e.longSwipesRatio,set:(e,t)=>{e.longSwipesRatio=t}},metadata:t},$,Y),me(e,null,x,{kind:"accessor",name:"swipeThreshold",static:!1,private:!1,access:{has:e=>"swipeThreshold"in e,get:e=>e.swipeThreshold,set:(e,t)=>{e.swipeThreshold=t}},metadata:t},X,K),me(e,null,T,{kind:"accessor",name:"edgeTouchRatio",static:!1,private:!1,access:{has:e=>"edgeTouchRatio"in e,get:e=>e.edgeTouchRatio,set:(e,t)=>{e.edgeTouchRatio=t}},metadata:t},Q,J),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();var Se,_e,Me,xe=d(315);class Te{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"eventId",{enumerable:!0,configurable:!0,writable:!0,value:(0,xe.v4)()})}get type(){return"view"}toQueryParams(){return{ei:this.eventId,ii:this.payload.iterationId,si:this.payload.slideIndex,st:this.payload.slideTotal}}}class Ae{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"eventId",{enumerable:!0,configurable:!0,writable:!0,value:(0,xe.v4)()})}get type(){return this.payload.type}toQueryParams(){return Object.assign({ei:this.eventId,ii:this.payload.iterationId,si:this.payload.slideIndex,st:this.payload.slideTotal,d:this.payload.durationMs},this.payload.widgetPayload)}}class Oe{constructor(){Object.defineProperty(this,"autoplay",{enumerable:!0,configurable:!0,writable:!0,value:{isPaused:function(){return!1},resume:function(){},pause:function(){},start:function(){},stop:function(){},setDelay:function(){}}})}updateSize(){}enableHorizontalSwipeGesture(){}disableHorizontalSwipeGesture(){}getTotalPages(){return 1}getActiveIndex(){return 0}toNextSlide(){}toPrevSlide(){}slideTo(e,t){}}!function(e){e.Stories="stories",e.Core="core",e.Games="games",e.InAppMessaging="in-app-messaging",e.Banners="banners"}(Se||(Se={})),function(e){e.StoryReader="story-reader",e.Api="api",e.GameReader="game-reader",e.IamReader="iam-reader",e.Banners="banners"}(_e||(_e={})),function(e){e.Story="story",e.StorySlide="story-slide",e.Session="session",e.SessionStore="session-store",e.HttpClient="http-client",e.Game="game",e.GameSession="game-session",e.Iam="iam",e.IamVisibilityObserver="iam-visibility-observer",e.IamDisplayService="iam-display-service",e.BannerPlace="banner-place",e.Banner="banner"}(Me||(Me={}));const Ee={debug:0,info:1,warn:2,error:3};class ke{constructor(e,t){Object.defineProperty(this,"root",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"boundContext",{enumerable:!0,configurable:!0,writable:!0,value:t})}debug(e,t){this.root.debug(e,this.mergeContext(t))}info(e,t){this.root.info(e,this.mergeContext(t))}warn(e,t,r){this.root.warn(e,this.mergeContext(t),r)}error(e,t,r){this.root.error(e,this.mergeContext(t),r)}child(e){return new ke(this.root,Object.assign(Object.assign({},this.boundContext),e))}mergeContext(e){return Object.assign(Object.assign({},this.boundContext),e)}}class Le{constructor(){Object.defineProperty(this,"listeners",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"onceListeners",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}on(e,t){return this.addListener(this.listeners,e,t),this}off(e,t){var r,i;return null===(r=this.listeners.get(e))||void 0===r||r.delete(t),null===(i=this.onceListeners.get(e))||void 0===i||i.delete(t),this}once(e,t){return this.addListener(this.onceListeners,e,t),this}removeAllListeners(e){if(void 0!==e)return this.listeners.delete(e),void this.onceListeners.delete(e);this.listeners.clear(),this.onceListeners.clear()}emit(e,t){this.invokeListeners(this.listeners.get(e),t);const r=this.onceListeners.get(e);(null==r?void 0:r.size)&&(this.invokeListeners(r,t),r.clear())}invokeListeners(e,t){if(null==e?void 0:e.size)for(const r of[...e])r(t)}addListener(e,t,r){let i=e.get(t);i||(i=new Set,e.set(t,i)),i.add(r)}}const Ie=new class{enqueue(e){}flush(){return Promise.resolve()}destroy(){}},Be={level:"warn",silent:!0,timestamps:!0,environment:"production"},je={debug:"debug",info:"info",warn:"warn",error:"error"};class Re extends Le{constructor(){super(...arguments),Object.defineProperty(this,"config",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},Be)}),Object.defineProperty(this,"contextProvider",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"transport",{enumerable:!0,configurable:!0,writable:!0,value:Ie}),Object.defineProperty(this,"forceEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!1})}configure(e){var t,r;this.config=Object.assign(Object.assign(Object.assign({},this.config),e),{level:null!==(t=e.level)&&void 0!==t?t:this.config.level,environment:null!==(r=e.environment)&&void 0!==r?r:this.config.environment})}setForceEnabled(e){this.forceEnabled=e}setContextProvider(e){this.contextProvider=e}setTransport(e){this.transport.destroy(),this.transport=e||Ie}debug(e,t){this.log({level:"debug",message:e,context:t})}info(e,t){this.log({level:"info",message:e,context:t})}warn(e,t,r){this.log({level:"warn",message:e,context:t,error:r})}error(e,t,r){this.log({level:"error",message:e,context:t,error:r})}log(e){if(this.config.silent&&!this.forceEnabled)return;const t=this.buildEntry(e);this.transport.enqueue(t),this.shouldLog(e.level)&&(this.writeToConsole(t),this.emit(t.level,t),this.emit("log",t))}child(e){return new ke(this,e)}destroy(){this.transport.destroy(),this.removeAllListeners()}async flush(){await this.transport.flush()}shouldLog(e){return Ee[e]>=Ee[this.config.level]}buildEntry(e){var t,r,i,n,a;const s=null!==(r=null===(t=this.contextProvider)||void 0===t?void 0:t.call(this))&&void 0!==r?r:{},o=e.context,l=null!==(n=null!==(i=function(e){const t=null==e?void 0:e.environment;return"string"==typeof t?t:void 0}(o))&&void 0!==i?i:s.environment)&&void 0!==n?n:this.config.environment,c=Object.assign(Object.assign(Object.assign({},o),s),{environment:l});return Object.assign(Object.assign({},e),{timestamp:null!==(a=e.timestamp)&&void 0!==a?a:new Date,context:c})}writeToConsole(e){const t=je[e.level],r=this.formatConsolePrefix(e),i=this.formatConsolePayload(e);e.error?console[t](r,i,e.error):console[t](r,i)}formatConsolePrefix(e){const t=["[IAS]"];return this.config.timestamps&&t.push(e.timestamp.toISOString()),t.push(e.level.toUpperCase()),t.join(" ")}formatConsolePayload(e){return e}}let Ce=null;function Fe(){return Ce||(Ce=new Re),Ce}var De,Ne=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},ze=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},We=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},Ve=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};!function(e){e.LoadStart="loadStart",e.LoadEnd="loadEnd",e.LoadError="loadError",e.ActiveIndexChange="activeIndexChange",e.AutoplayTimeLeft="autoplayTimeLeft",e.AutoplayTimerTick="autoplayTimerTick",e.ShowBanner="showBanner",e.ShowBannerFailed="showBannerFailed",e.BannerWidget="bannerWidget"}(De||(De={}));let qe=(()=>{var e,t,r,i,n,a;let s,o,l,c,d,u=H.EventEmitter,h=[],f=[],b=[],p=[],m=[],g=[],v=[],y=[],w=[],P=[];return e=class extends u{get _banners(){return We(this,t,"f")}set _banners(e){Ve(this,t,e,"f")}get _bannerPlace(){return We(this,r,"f")}set _bannerPlace(e){Ve(this,r,e,"f")}get _isLoading(){return We(this,i,"f")}set _isLoading(e){Ve(this,i,e,"f")}get _isLoaded(){return We(this,n,"f")}set _isLoaded(e){Ve(this,n,e,"f")}get _error(){return We(this,a,"f")}set _error(e){Ve(this,a,e,"f")}constructor(e,s,o,l,c){super(),Object.defineProperty(this,"placeId",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"ctx",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"bannerStatisticService",{enumerable:!0,configurable:!0,writable:!0,value:o}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(this,"bannerViewModelFactory",{enumerable:!0,configurable:!0,writable:!0,value:c}),t.set(this,ze(this,h,[])),r.set(this,(ze(this,f),ze(this,b,null))),i.set(this,(ze(this,p),ze(this,m,!1))),n.set(this,(ze(this,g),ze(this,v,!1))),a.set(this,(ze(this,y),ze(this,w,null))),Object.defineProperty(this,"appearance",{enumerable:!0,configurable:!0,writable:!0,value:(ze(this,P),new Pe)}),Object.defineProperty(this,"sliderController",{enumerable:!0,configurable:!0,writable:!0,value:new Oe}),Object.defineProperty(this,"logger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.logger=Fe().child({domain:Se.Banners,module:_e.Banners,component:Me.BannerPlace,placeId:this.placeId}),this.ctx.addBannerPlace(this)}get dir(){return this.ctx.getConfig().dir}get id(){return this.placeId}get banners(){return this._banners}get contentRatio(){const e=this._banners.map(e=>e.contentRatio);return this.median(e)}get isLoaded(){return this._isLoaded}get isLoading(){return this._isLoading}get error(){return this._error}get slider(){return this.sliderController}get activeIndex(){return this.sliderController.getActiveIndex()}get activeBanner(){return this._banners[this.activeIndex]}get paginationBullets(){return this.sliderController.getTotalPages()}refreshSizes(){this._banners.forEach(e=>e.refreshSizes())}setSliderController(e){this.sliderController=e}updateAppearance(e){this.appearance.update(e)}resume(){for(const e of this._banners)e.resumeByUser();this.appearance.autoplay&&this.slider.autoplay.resume()}pause(){for(const e of this._banners)e.pauseByUser();this.appearance.autoplay&&this.slider.autoplay.pause()}async reload(){this.logger.debug("banner place reload started"),this.bannerStore.removeBannerPlaceById(this.id),await Promise.all(this._banners.map(e=>e.destroy())),this._banners=[],await this.fetchBanners()}destroy(){this.logger.debug("banner place destroyed",{bannersCount:this._banners.length}),this.sliderController=new Oe;for(const e of this._banners)e.destroy();this._banners=[],this.ctx.removeBannerPlace(this)}notifyTimerEnd(){var e;null===(e=this.activeBanner)||void 0===e||e.notifyTimerEnd()}showNext(){this.sliderController.toNextSlide()}showPrevious(){this.sliderController.toPrevSlide()}showByIndex(e,t){this.sliderController.slideTo(e,t)}async updateUserData(e){return this.bannerStore.updateBannerUserData(this.id,e)}async fetchBanners(){try{if((await this.ctx.getConfig()).anonymous)return this.logger.warn("cannot fetch banners in anonymous access mode",{placeId:this.placeId}),[];if(this._isLoading)return[];this._isLoading=!0,this._isLoaded=!1,this._error=null,this.emit(De.LoadStart),this._bannerPlace=await this.bannerStore.getBannerPlaceById({placeId:this.placeId});const e=this._bannerPlace.banners.length;let t=this.filterBannersByTimeRange(this._bannerPlace.banners);return t=this.filterBannersByContent(t),this._banners=t.map(e=>this.bannerViewModelFactory.create(this,e)),await Promise.allSettled(this._banners.map(e=>e.waitInit())),this._isLoaded=!0,this.logger.debug("banners loaded",{placeId:this.placeId,count:this._banners.length,totalCount:e,filteredOut:e-this._banners.length}),this._banners}catch(e){throw this.logger.error("failed to load banners",{placeId:this.placeId},e),this.emit(De.LoadError,e),this._error=e,e}finally{this.emit(De.LoadEnd,{banners:this._banners.slice()}),this._isLoading=!1}}filterBannersByTimeRange(e){return e.filter(e=>e.withinDisplayTimeRange)}filterBannersByContent(e){return e.filter(e=>Boolean(e.slides.length))}median(e){const t=[...e].sort((e,t)=>e-t),r=Math.floor(t.length/2);return t.length%2==0?(t[r-1]+t[r])/2:t[r]}},t=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,(()=>{var t;const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=u[Symbol.metadata])&&void 0!==t?t:null):void 0;s=[ee.observable],o=[ee.observable],l=[ee.observable],c=[ee.observable],d=[ee.observable],Ne(e,null,s,{kind:"accessor",name:"_banners",static:!1,private:!1,access:{has:e=>"_banners"in e,get:e=>e._banners,set:(e,t)=>{e._banners=t}},metadata:r},h,f),Ne(e,null,o,{kind:"accessor",name:"_bannerPlace",static:!1,private:!1,access:{has:e=>"_bannerPlace"in e,get:e=>e._bannerPlace,set:(e,t)=>{e._bannerPlace=t}},metadata:r},b,p),Ne(e,null,l,{kind:"accessor",name:"_isLoading",static:!1,private:!1,access:{has:e=>"_isLoading"in e,get:e=>e._isLoading,set:(e,t)=>{e._isLoading=t}},metadata:r},m,g),Ne(e,null,c,{kind:"accessor",name:"_isLoaded",static:!1,private:!1,access:{has:e=>"_isLoaded"in e,get:e=>e._isLoaded,set:(e,t)=>{e._isLoaded=t}},metadata:r},v,y),Ne(e,null,d,{kind:"accessor",name:"_error",static:!1,private:!1,access:{has:e=>"_error"in e,get:e=>e._error,set:(e,t)=>{e._error=t}},metadata:r},w,P),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();const Ge=e=>((0,t.useEffect)(()=>(e.onLoadStart&&e.bannerPlace.on(De.LoadStart,e.onLoadStart),e.onLoadEnd&&e.bannerPlace.on(De.LoadEnd,e.onLoadEnd),e.onLoadError&&e.bannerPlace.on(De.LoadError,e.onLoadError),e.onActiveIndexChange&&e.bannerPlace.on(De.ActiveIndexChange,e.onActiveIndexChange),e.onAutoplayTimeLeft&&e.bannerPlace.on(De.AutoplayTimeLeft,e.onAutoplayTimeLeft),e.onAutoplayTimerTick&&e.bannerPlace.on(De.AutoplayTimerTick,e.onAutoplayTimerTick),e.onShowBanner&&e.bannerPlace.on(De.ShowBanner,e.onShowBanner),e.onShowBannerFailed&&e.bannerPlace.on(De.ShowBannerFailed,e.onShowBannerFailed),e.onBannerWidget&&e.bannerPlace.on(De.BannerWidget,e.onBannerWidget),()=>{e.onLoadStart&&e.bannerPlace.off(De.LoadStart,e.onLoadStart),e.onLoadEnd&&e.bannerPlace.off(De.LoadEnd,e.onLoadEnd),e.onLoadError&&e.bannerPlace.off(De.LoadError,e.onLoadError),e.onActiveIndexChange&&e.bannerPlace.off(De.ActiveIndexChange,e.onActiveIndexChange),e.onAutoplayTimeLeft&&e.bannerPlace.off(De.AutoplayTimeLeft,e.onAutoplayTimeLeft),e.onAutoplayTimerTick&&e.bannerPlace.off(De.AutoplayTimerTick,e.onAutoplayTimerTick),e.onShowBanner&&e.bannerPlace.off(De.ShowBanner,e.onShowBanner),e.onShowBannerFailed&&e.bannerPlace.off(De.ShowBannerFailed,e.onShowBannerFailed),e.onBannerWidget&&e.bannerPlace.off(De.BannerWidget,e.onBannerWidget)}),[e.bannerPlace,e.onLoadStart,e.onLoadError,e.onLoadEnd,e.onActiveIndexChange,e.onAutoplayTimeLeft,e.onAutoplayTimerTick,e.onShowBanner,e.onShowBannerFailed,e.onBannerWidget]),(0,t.useEffect)(()=>{(async e=>{try{await e.fetchBanners()}catch(e){console.error(e)}})(e.bannerPlace)},[e.bannerPlace]),e.bannerPlace.banners),Ue=e=>{(0,t.useEffect)(()=>{e.appearance&&e.bannerPlace.updateAppearance(e.appearance)},[e.bannerPlace,JSON.stringify(e.appearance)])},He=({bannerPlace:e,bannerPlaceRef:r})=>{const[i,n]=(0,t.useState)(!1),[a,s]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let t=!1,i=()=>{};const a=()=>{t=!0,i(),n(!1)};if(!(e=>e.isLoaded&&e.banners.length>0)(e))return s(null),a;n(!1),s(null);const{promise:o,abort:l}=((e,t=1e4)=>{let r,i,n=!1;const a=e=>{n||(n=!0,r&&clearTimeout(r),i&&cancelAnimationFrame(i),e())};return{promise:new Promise((n,s)=>{r=setTimeout(()=>{a(()=>s(new Error("[IAS]: Unable to calculate banner place width. Check if you are using ad blockers such as AdBlock, uBlock Origin, etc.")))},t);const o=()=>{var t,r;(null!==(r=null===(t=e.current)||void 0===t?void 0:t.clientWidth)&&void 0!==r?r:0)>0?a(n):i=requestAnimationFrame(o)};i=requestAnimationFrame(o)}),abort:()=>{a(()=>{})}}})(r);return i=l,o.then(()=>{t||n(!0)}).catch(e=>{t||(s(e),console.error(e))}),a},[e,e.isLoaded,e.banners.length]),{canBeShown:i,error:a}},$e=(0,r.observer)(r=>{const i=(0,t.useRef)(null),n=Ge(r);Ue(r);const{realIndex:a,allowClick:s,slider:o,isAnimating:l,setSlider:c,isMoved:d}=(e=>{const r=(0,t.useRef)(null),[i,n]=(0,t.useState)(!1),[a,s]=(0,t.useState)(!1),[o,l]=(0,t.useState)(!1),[c,d]=(0,t.useState)(!0),[u,h]=(0,t.useState)(null),[f,b]=(0,t.useState)(0),[p,m]=(0,t.useState)(0),[g,v]=(0,t.useState)(!0),[y,w]=(0,t.useState)(!0),P=()=>{clearTimeout(r.current),d(!1),l(!0),((e,t)=>{e.getVisibleSlideIndexes().map(e=>t.banners[e]).forEach(e=>e.pause())})(u,e)},S=()=>{r.current=setTimeout(()=>d(!0),100),l(!1),((e,t)=>{t.banners.forEach(e=>e.resume())})(0,e)},_=()=>{s(!0),d(!1)},M=()=>{s(!1),d(!0)},x=t=>{m(t),e.emit(De.ActiveIndexChange,t)},T=e=>{b(e)},A=()=>{u&&v(u.reachStart)},O=()=>{u&&w(u.reachEnd)},E=()=>{},k=()=>{e.refreshSizes(),requestAnimationFrame(()=>{e.refreshSizes(),n(e=>!e)})},L=()=>{e.emit(De.AutoplayTimeLeft),e.notifyTimerEnd()},I=t=>{e.emit(De.AutoplayTimerTick,Object.assign(Object.assign({},t),{bannerIndex:e.activeIndex}))};return(0,t.useEffect)(()=>{if(!u)return;const t=new Z(u);e.setSliderController(t)},[e,u]),(0,t.useEffect)(()=>{u&&e&&e.banners[u.realIndex].markAsOpened()},[e,u]),(0,t.useEffect)(()=>{if(u)return u.on(q.TouchStart,P),u.on(q.TouchEnd,S),u.on(q.TransitionStart,_),u.on(q.TransitionEnd,M),u.on(q.RealIndexChnage,x),u.on(q.ActiveIndexChange,T),u.on(q.ReachStart,A),u.on(q.ReachEnd,O),u.on(q.Resize,E),u.on(q.SlidesUpdated,k),u.on(q.AutoplayTimeLeft,L),u.on(q.AutoplayTimerTick,I),A(),O(),()=>{u.off(q.TouchStart,P),u.off(q.TouchEnd,S),u.off(q.TransitionStart,_),u.off(q.TransitionEnd,M),u.off(q.RealIndexChnage,x),u.off(q.ActiveIndexChange,T),u.off(q.ReachStart,A),u.off(q.ReachEnd,O),u.off(q.Resize,E),u.off(q.SlidesUpdated,k),u.off(q.AutoplayTimeLeft,L),u.off(q.AutoplayTimerTick,I)}},[e,u]),{reachStart:g,reachEnd:y,activeIndex:f,realIndex:p,isMoved:o,isAnimating:a,slider:u,setSlider:h,allowClick:c}})(r.bannerPlace),{error:u,canBeShown:h}=He({bannerPlace:r.bannerPlace,bannerPlaceRef:i});(0,t.useEffect)(()=>{o&&h&&(o.updateSize(),r.bannerPlace.refreshSizes(),requestAnimationFrame(()=>{r.bannerPlace.refreshSizes()}))},[r.bannerPlace,h]);const f=r.bannerPlace.appearance;return!r.bannerPlace.banners.length||u?null:(0,e.jsx)("div",{className:M()(I.f,r.className),style:Object.assign(Object.assign({},r.style),{"--ias-bnr-place-border-radius":`${f.banner.borderRadius}px`}),ref:i,children:(0,e.jsx)(K,{onInit:c,autoplay:f.autoplay,speed:f.animationSpeed,loop:f.loop,slidesPerView:f.slidesPerView,spaceBetween:f.gap,slidesCount:n.length,navigation:f.navigation,pagination:f.pagination,direction:f.direction,allowTouchMove:f.allowTouchMove,touchRatio:f.touchRatio,longSwipesRatio:f.longSwipesRatio,swipeThreshold:f.swipeThreshold,edgeTouchRatio:f.edgeTouchRatio,langDirection:r.bannerPlace.dir,children:n.map((t,r)=>{const i=Boolean(null==o?void 0:o.isSlideVisible(r))&&h;return(0,e.jsx)(Q,{children:(0,e.jsx)(k,{index:r,isActive:i,canBeInited:i,banner:t,allowClick:s,clientAppearance:f.banner,direction:f.direction})},t.id)})})})});var Ye=d(236);class Xe{constructor(e,t,r){Object.defineProperty(this,"mountPoint",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rootElement",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.rootElement=document.createElement("div"),this.rootElement.style.width="100%",this.rootElement.style.height="100%",e.appendChild(this.rootElement),this.root=(0,Ye.createRoot)(this.rootElement)}get dir(){return this.bannerPlace.dir}get activeIndex(){return this.bannerPlace.activeIndex}get activeBanner(){return this.bannerPlace.activeBanner}get isLoaded(){return this.bannerPlace.isLoaded}get id(){return this.bannerPlace.id}get banners(){return this.bannerPlace.banners}get appearance(){return this.bannerPlace.appearance}get contentRatio(){return this.bannerPlace.contentRatio}get isLoading(){return this.bannerPlace.isLoading}get error(){return this.bannerPlace.error}get slider(){return this.bannerPlace.slider}get paginationBullets(){return this.bannerPlace.slider.getTotalPages()}refreshSizes(){}emit(e,...t){}setSliderController(e){this.bannerPlace.setSliderController(e)}updateAppearance(e){this.bannerPlace.updateAppearance(e)}resume(){this.bannerPlace.resume()}pause(){this.bannerPlace.pause()}reload(){return this.bannerPlace.reload()}destroy(){setTimeout(()=>{this.root.unmount()}),this.mountPoint.removeChild(this.rootElement),this.bannerPlace.destroy()}fetchBanners(){return this.bannerPlace.fetchBanners()}updateUserData(e){return Promise.resolve()}notifyTimerEnd(){this.bannerPlace.notifyTimerEnd()}showNext(){this.bannerPlace.showNext()}showPrevious(){this.bannerPlace.showPrevious()}showByIndex(e,t){this.bannerPlace.showByIndex(e,t)}on(e,t){return this.bannerPlace.on(e,t),this}once(e,t){return this.bannerPlace.once(e,t),this}off(e,t){return this.bannerPlace.off(e,t),this}render(){var t;this.root.render((0,e.jsx)($e,{appearance:null===(t=this.params)||void 0===t?void 0:t.appearance,bannerPlace:this.bannerPlace}))}}class Ke extends Xe{render(){var t;this.root.render((0,e.jsx)(it,{appearance:null===(t=this.params)||void 0===t?void 0:t.appearance,bannerPlace:this.bannerPlace}))}}var Qe=d(713),Je={};Je.styleTagTransform=m(),Je.setAttributes=h(),Je.insert=l().bind(null,"head"),Je.domAPI=s(),Je.insertStyleElement=b(),n()(Qe.A,Je),Qe.A&&Qe.A.locals&&Qe.A.locals;const Ze=(0,r.observer)(r=>{const i=Ge(r),n=(0,t.useRef)(null),{error:a,canBeShown:s}=He({bannerPlace:r.bannerPlace,bannerPlaceRef:n}),o=i[0],l=!0;return(0,t.useEffect)(()=>{s&&(r.bannerPlace.refreshSizes(),requestAnimationFrame(()=>{r.bannerPlace.refreshSizes()}))},[r.bannerPlace,s]),r.bannerPlace.error||a?null:(0,e.jsx)("div",{className:Qe.f,ref:n,children:o&&s&&!r.bannerPlace.isLoading?(0,e.jsx)(k,{index:0,isActive:l,canBeInited:l,banner:o,allowClick:!0,clientAppearance:r.bannerPlace.appearance.banner}):(0,e.jsx)(T,{needShowErrorScreen:!1,needShowLoaderScreen:!0,onReload:()=>{}})})});var et=d(883),tt={};tt.styleTagTransform=m(),tt.setAttributes=h(),tt.insert=l().bind(null,"head"),tt.domAPI=s(),tt.insertStyleElement=b(),n()(et.A,tt),et.A&&et.A.locals&&et.A.locals;const rt=({banner:r,index:i,clientAppearance:n,canBeShown:a})=>{const[s,o]=(0,t.useState)(!1),l=(0,t.useRef)(null);return(0,t.useEffect)(()=>{const e=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>=.5?o(!0):o(!1)})},{threshold:[0,.5,1]});return l.current&&e.observe(l.current),()=>{l.current&&e.unobserve(l.current)}},[]),(0,e.jsx)(k,{index:i,isActive:s&&a,canBeInited:s&&a,banner:r,allowClick:!0,clientAppearance:n,direction:"row",ref:l},r.id)},it=(0,r.observer)(r=>{const i=(0,t.useRef)(null),n=Ge(r);Ue(r);const{error:a,canBeShown:s}=He({bannerPlace:r.bannerPlace,bannerPlaceRef:i});(0,t.useEffect)(()=>{s&&(r.bannerPlace.refreshSizes(),requestAnimationFrame(()=>{r.bannerPlace.refreshSizes()}))},[r.bannerPlace,s]);const o=r.bannerPlace.appearance;return!r.bannerPlace.banners.length||a?null:(0,e.jsx)("div",{className:M()(et.f,r.className),style:Object.assign(Object.assign({},r.style),{gap:o.gap}),ref:i,children:n.map((t,r)=>(0,e.jsx)(rt,{banner:t,canBeShown:s,index:r,clientAppearance:o.banner},t.id))})});var nt=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},at=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},st=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},ot=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};let lt=(()=>{var e,t,r,i,n;let a,s,o,l,c=H.EventEmitter,d=[],u=[],h=[],f=[],b=[],p=[],m=[],g=[];return e=class extends c{get _banners(){return st(this,t,"f")}set _banners(e){ot(this,t,e,"f")}get _isLoading(){return st(this,r,"f")}set _isLoading(e){ot(this,r,e,"f")}get _isLoaded(){return st(this,i,"f")}set _isLoaded(e){ot(this,i,e,"f")}get _error(){return st(this,n,"f")}set _error(e){ot(this,n,e,"f")}constructor(e,a,s,o){super(),Object.defineProperty(this,"bannerId",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"ctx",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"bannerViewModelFactory",{enumerable:!0,configurable:!0,writable:!0,value:o}),t.set(this,at(this,d,[])),r.set(this,(at(this,u),at(this,h,!1))),i.set(this,(at(this,f),at(this,b,!1))),n.set(this,(at(this,p),at(this,m,null))),Object.defineProperty(this,"appearance",{enumerable:!0,configurable:!0,writable:!0,value:(at(this,g),new Pe)}),this.ctx.addBannerPlace(this)}get dir(){return this.ctx.getConfig().dir}get activeIndex(){return 0}get activeBanner(){return this._banners[0]}get id(){return"__BANNER_PREVIEW__"}get slider(){return new Oe}get banners(){return this._banners}get isLoading(){return this._isLoading}get isLoaded(){return this._isLoaded}get contentRatio(){var e,t;return null!==(t=null===(e=this._banners[0])||void 0===e?void 0:e.contentRatio)&&void 0!==t?t:1}get paginationBullets(){return 1}get error(){return this._error}refreshSizes(){this._banners.forEach(e=>e.refreshSizes())}setSliderController(e){}updateAppearance(e){this.appearance.update(e)}resume(){for(const e of this._banners)e.resume()}pause(){for(const e of this._banners)e.pause()}async reload(){this.bannerStore.removeBannerPlaceById(this.id),await Promise.all(this._banners.map(e=>e.destroy())),this._banners=[],await this.fetchBanners()}destroy(){for(const e of this._banners)e.destroy();this._banners=[],this.ctx.removeBannerPlace(this)}async updateUserData(e){return this.bannerStore.updateBannerUserData(this.id,e)}notifyTimerEnd(){}showNext(){}showPrevious(){}showByIndex(e,t){}async fetchBanners(){try{if(this._isLoading)return[];this._error=null,this._isLoading=!0,this._isLoaded=!1,this.emit(De.LoadStart);const e=await this.bannerStore.getBannerById(this.bannerId);return e.slides.length?(this._banners=[this.bannerViewModelFactory.create(this,e)],this._isLoaded=!0,this._banners):[]}catch(e){throw this.emit(De.LoadError,e),this._error=e,e}finally{this.emit(De.LoadEnd),this._isLoading=!1}}},t=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,(()=>{var t;const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(t=c[Symbol.metadata])&&void 0!==t?t:null):void 0;a=[ee.observable],s=[ee.observable],o=[ee.observable],l=[ee.observable],nt(e,null,a,{kind:"accessor",name:"_banners",static:!1,private:!1,access:{has:e=>"_banners"in e,get:e=>e._banners,set:(e,t)=>{e._banners=t}},metadata:r},d,u),nt(e,null,s,{kind:"accessor",name:"_isLoading",static:!1,private:!1,access:{has:e=>"_isLoading"in e,get:e=>e._isLoading,set:(e,t)=>{e._isLoading=t}},metadata:r},h,f),nt(e,null,o,{kind:"accessor",name:"_isLoaded",static:!1,private:!1,access:{has:e=>"_isLoaded"in e,get:e=>e._isLoaded,set:(e,t)=>{e._isLoaded=t}},metadata:r},b,p),nt(e,null,l,{kind:"accessor",name:"_error",static:!1,private:!1,access:{has:e=>"_error"in e,get:e=>e._error,set:(e,t)=>{e._error=t}},metadata:r},m,g),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();class ct{constructor(e){Object.defineProperty(this,"bannerStatisticApi",{enumerable:!0,configurable:!0,writable:!0,value:e})}async sendViewEvent(e,t){const r=new Te(t);await this.bannerStatisticApi.sendViewEvent(e,r)}async sendWidgetEvent(e,t){const r=new Ae(t);await this.bannerStatisticApi.sendWidgetEvent(e,r)}}class dt{constructor(){Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:{}})}set(e,t){this.cache[e]=t}clear(){this.cache={}}get(e){return this.cache[e]}}class ut{constructor(e,t,r){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlaceViewModel",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:r})}async handle(e){try{const t=this.storyManager.gameReader;await t.openGame(e.gameInstanceId),this.bannerPlaceViewModel.pause(),t.once("close",()=>{this.bannerPlaceViewModel.resume()})}catch(e){console.error(e)}}}var ht,ft,bt,pt,mt,gt,vt,yt,wt,Pt,St,_t,Mt,xt,Tt,At,Ot,Et,kt,Lt;!function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(ht||(ht={})),ht.END,function(e){e.Text="text",e.Link="link",e.Image="image"}(ft||(ft={})),function(e){e.DEFAULT="default",e.CUSTOM_CARD="customCard"}(bt||(bt={})),bt.DEFAULT,bt.DEFAULT,function(e){e.CENTER="center",e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(pt||(pt={})),function(e){e.CIRCLE="circle",e.QUAD="quad",e.RECTANGLE="rectangle"}(mt||(mt={})),function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end",e.CENTER="center"}(gt||(gt={})),function(e){e.CARD_INSIDE_BOTTOM="cardInsideBottom",e.CARD_OUTSIDE_TOP="cardOutsideTop",e.CARD_OUTSIDE_BOTTOM="cardOutsideBottom"}(vt||(vt={})),function(e){e.Medium="medium",e.High="high"}(yt||(yt={})),function(e){e.COLUMN="vertical",e.ROW="horizontal"}(wt||(wt={})),function(e){e.START_LOADER="startLoad",e.END_LOADER="endLoad"}(Pt||(Pt={})),wt.ROW,gt.START,vt.CARD_INSIDE_BOTTOM,yt.High,mt.RECTANGLE,gt.START,vt.CARD_INSIDE_BOTTOM,yt.High,mt.CIRCLE,pt.START,gt.START,vt.CARD_INSIDE_BOTTOM,yt.High,mt.CIRCLE,function(e){e.WidgetEvent="widgetEvent",e.ClickOnButton="clickOnButton"}(St||(St={})),function(e){e.STORY_LIST="storyList",e.STORY_READER="storyReader",e.GAME_READER="gameReader",e.STACK_STORY_LIST="stackStoryList",e.IAM_READER="iamReader",e.BANNERS="banners"}(_t||(_t={})),function(e){e.FLAT="flat",e.COVER="cover",e.CUBE="cube"}(Mt||(Mt={})),function(e){e.Classic="classic",e.Modern="modern"}(xt||(xt={})),Mt.FLAT,xt.Classic,function(e){e.STYLE_CIRCLE="circle",e.STYLE_QUAD="quad",e.STYLE_RECTANGLE="rectangle",e.SWIPE_CUBE="cube",e.SWIPE_FLAT="flat",e.SWIPE_COVER="cover",e.CLOSE_BUTTON_LEFT="left",e.CLOSE_BUTTON_RIGHT="right"}(Tt||(Tt={})),function(e){e.direct="direct",e.onboarding="onboarding",e.list="list",e.favorite="favorite"}(At||(At={})),function(e){e[e.default=0]="default",e[e.favorite=1]="favorite",e[e.stacked=2]="stacked"}(Ot||(Ot={})),function(e){e.LTR="ltr",e.RTL="rtl"}(Et||(Et={})),function(e){e.StoryList="storyList",e.StoryReader="storyReader",e.GameReader="gameReader",e.StackStoryList="stackStoryList",e.IamReader="iamReader",e.Banners="banners"}(kt||(kt={}));class It{constructor(e,t){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:t})}handle(e){try{const t=decodeURIComponent(e.linkTarget),r={src:kt.Banners,data:{id:this.banner.id,index:this.banner.activeSlideIndex,url:t,elementId:e.elementId}};this.storyManager.storyLinkClickHandler(r),this.storyManager.emit("clickOnButton",r)}catch(t){t instanceof URIError?console.error(`[Banners]: the URL <${e.linkTarget}> has an invalid format`):console.error(t)}}}class Bt{constructor(e,t,r){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:r})}async handle(e){try{const t={src:kt.Banners,data:{id:this.banner.id,index:this.banner.activeSlideIndex,url:e.storyId.toString()}};this.storyManager.storyLinkClickHandler(t),this.storyManager.emit("clickOnButton",t),this.bannerPlace.pause(),await this.storyManager.storyReader.showStory(e.storyId),this.storyManager.storyReader.once("closeStoryReader",()=>{this.bannerPlace.resume()})}catch(e){console.error(e)}}}class jt{constructor(){Object.defineProperty(this,"textArea",{enumerable:!0,configurable:!0,writable:!0,value:null})}async copy(e){try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(e):this.copyLegacy(e)}catch(t){this.copyLegacy(e)}}isIOS(){return/ipad|iphone/i.test(navigator.userAgent)}createTextArea(e){this.textArea=document.createElement("textarea"),this.textArea.value=e,document.body.appendChild(this.textArea)}selectText(){if(this.textArea)if(this.isIOS()){const e=document.createRange();e.selectNodeContents(this.textArea);const t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e)),this.textArea.setSelectionRange(0,999999)}else this.textArea.select()}copyLegacy(e){this.createTextArea(e),this.selectText();try{document.execCommand("copy")}catch(e){console.error("Copy failed:",e)}this.textArea&&(document.body.removeChild(this.textArea),this.textArea=null)}}class Rt{constructor(e){Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:e})}manageTimer(e,t){if(!this.bannerPlace.slider)return;const r=this.bannerPlace.slider.autoplay;switch(e){case"start":this.startTimer(r,t);break;case"pause":r.pause();break;case"stop":case"before_start":r.stop()}}startTimer(e,t){e.isPaused()?e.resume():(e.setDelay(t),e.start())}}class Ct{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e})}}Object.defineProperty(Ct,"name",{enumerable:!0,configurable:!0,writable:!0,value:"bannerWidget"});class Ft{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e})}}Object.defineProperty(Ft,"name",{enumerable:!0,configurable:!0,writable:!0,value:"showBanner"});class Dt{constructor(e){Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:e})}}Object.defineProperty(Dt,"name",{enumerable:!0,configurable:!0,writable:!0,value:"showBannerFailed"});class Nt{constructor(e,t,r,i){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"bannerStatisticService",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"sessionNarrativeDataCache",{enumerable:!0,configurable:!0,writable:!0,value:new dt}),Object.defineProperty(this,"narrativeDataCache",{enumerable:!0,configurable:!0,writable:!0,value:new dt})}onVerticalScrollChange(e){}onWidgetRequirePauseUI(){this.banner.pause()}onWidgetRequireResumeUI(){this.banner.resume()}productCartUpdate(e){return Promise.reject({message:"Not implemented"})}productCartClicked(){}async productCartGetState(){return Promise.reject("Not implemented")}onEvent(e,t){}onCardLoadingStateChange(e){}updateCardServerDataLocally(e){this.banner.context.updateNarrativeSavedData(e)}async updateTimeline(e,t,r,i,n,a){"before_start"!==t&&(n?this.banner.showLoaderScreen():this.banner.activeSlide.inited&&this.banner.hideLoaderScreen(),a?this.banner.showErrorScreen():this.banner.hideErrorScreen()),new Rt(this.bannerPlace).manageTimer(t,i)}clearCardSession(){this.sessionNarrativeDataCache.clear()}disableVerticalSwipeGesture(){}enableVerticalSwipeGesture(){}disableHorizontalSwipeGesture(){this.bannerPlace.slider.disableHorizontalSwipeGesture()}enableHorizontalSwipeGesture(){this.bannerPlace.slider.enableHorizontalSwipeGesture()}async getCardLocalData(){const e=this.narrativeDataCache.get(`banner_${this.banner.id}_data_${this.storyManager.rootStore.sessionStore.userId}`);return e?JSON.parse(e):{}}setCardLocalData(e,t){const r=JSON.stringify(e);this.narrativeDataCache.set(`banner_${this.banner.id}_data_${this.storyManager.rootStore.sessionStore.userId}`,r),this.banner.context.updateNarrativeSavedData(r),t&&this.banner.updateUserData(r).catch(console.error)}getCardServerData(){var e;return null!==(e=this.banner.context.widgetsData._narrative_saved_data)&&void 0!==e?e:null}getSlideDuration(e){var t,r;return null!==(r=null===(t=this.banner.context.widgetsData._narrative_slides_duration)||void 0===t?void 0:t[e])&&void 0!==r?r:null}pauseUI(){this.banner.pause()}resumeUI(){this.banner.resume()}showCardTextInput(e,t){}setCardSessionValue(e,t){this.sessionNarrativeDataCache.set(e,t)}getCardSessionValue(e){return this.sessionNarrativeDataCache.get(e)}getWidgetsSharedData(e){const t=this.banner.context.widgetsData;switch(e){case"rangeSlider":return t._narrative_range_slider_data;case"poll":return t._narrative_poll_data;case"vote":return t._narrative_vote_data;case"reactions":return t._narrative_reactions_data}return null}async sendApiRequest(e,t,r,i,n,a){var s,o,l;try{const a=await this.storyManager.httpClient.request({url:e,method:t,params:null!=r?r:{},headers:null!=i?i:{},data:null!=n?n:{}});return{status:a.status,headers:a.headers,data:a.data}}catch(e){if(e instanceof Error&&"IasNetworkError"===e.name)return{status:null!==(s=e.networkStatus)&&void 0!==s?s:400,headers:null===(o=e.response)||void 0===o?void 0:o.headers,data:null===(l=e.response)||void 0===l?void 0:l.data}}}share(e,t){}shareSlideScreenshot(e,t,r){}showLayer(e){this.banner.showLayerByIndex(e)}showCardSlide(e){var t;this.bannerPlace.activeIndex===e&&(null===(t=this.bannerPlace.activeBanner)||void 0===t||t.restart()),this.bannerPlace.slider.slideTo(e)}cardShowNext(){this.bannerPlace.slider.toNextSlide()}showNextSlide(){this.bannerPlace.slider.toNextSlide()}sendStatisticEvent(e,t,r,i){this.bannerStatisticService.sendWidgetEvent(this.banner.id,{iterationId:this.banner.iterationId,type:e,slideIndex:this.banner.activeSlideIndex,slideTotal:this.banner.slides.length,durationMs:this.banner.durationMs,widgetPayload:t}),this.bannerPlace.emit(Ct.name,new Ct({id:this.banner.id,bannerPlace:this.bannerPlace.id,widgetEventName:e,widgetData:null!=r?r:{}}).payload),this.storyManager.emit("widgetEvent",{name:e,data:r})}async resetCard(e){this.updateCardServerDataLocally({}),this.setCardLocalData({},!0),this.showCardSlide(0),this.showLayer(0)}getCardFonts(){var e,t;return null!==(t=null===(e=this.storyManager.rootStore.sessionStore.session)||void 0===e?void 0:e.fontsResources)&&void 0!==t?t:[]}showToast(e){this.banner.showToast({content:e})}closeCard(e){}openStory(e,t){new Bt(this.storyManager,this.bannerPlace,this.banner).handle({storyId:e,slideIndex:t})}openGame(e){new ut(this.storyManager,this.bannerPlace,this.banner).handle({gameInstanceId:e})}writeToClipboard(e){(new jt).copy(e.textValue)}openUrl(e){"swipeUpItems"!==e.type&&new It(this.storyManager,this.banner).handle({elementId:e.elementId,linkTarget:e.link.target})}}!function(e){e.Top="top",e.Bottom="bottom"}(Lt||(Lt={}));const zt=Lt.Bottom;class Wt{constructor(e){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"duration",{enumerable:!0,configurable:!0,writable:!0,value:3e3}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"position",{enumerable:!0,configurable:!0,writable:!0,value:zt}),Object.defineProperty(this,"mountPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"toastContainer",{enumerable:!0,configurable:!0,writable:!0,value:null}),this.initializeOptions(e),this.mountPoint=e.mountPoint}show(e){return this.content=e,this.destroy(),this.createAndShowToast(),!0}hide(){return!!this.toastContainer&&(clearTimeout(this.timeoutId),this.toastContainer.className+=" toast_fadeout",this.addAnimationEndListeners(this.toastContainer,()=>{var e,t;null===(t=null===(e=this.toastContainer)||void 0===e?void 0:e.parentNode)||void 0===t||t.removeChild(this.toastContainer),this.toastContainer=null}),!0)}destroy(){var e;this.toastContainer&&(clearTimeout(this.timeoutId),null===(e=this.toastContainer.parentNode)||void 0===e||e.removeChild(this.toastContainer),this.toastContainer=null)}initializeOptions(e){if(e.duration&&(this.duration="string"==typeof e.duration?parseFloat(e.duration):e.duration),e.position){const t=e.position.toLowerCase();this.position="top"===t||"bottom"===t?t:zt}}createAndShowToast(){const e=this.createToastContainer(),t=this.createToastElement(),r=this.createToastTextElement();t.appendChild(r),e.appendChild(t),this.mountPoint.appendChild(e),this.timeoutId=window.setTimeout(()=>this.hide(),this.duration),this.toastContainer=e}createToastContainer(){const e=document.createElement("div");return e.id="toast_container",e.className="toast_fadein",e.style.zIndex="1130",e}createToastElement(){const e=document.createElement("div");return e.id="toast",e}createToastTextElement(){const e=document.createElement("span");return e.innerHTML=this.content,e}addAnimationEndListeners(e,t){["animationend","webkitAnimationEnd","msAnimationEnd","oAnimationEnd"].forEach(r=>{e.addEventListener(r,t,{once:!0})})}}var Vt=d(136);new Error("timeout while waiting for mutex to become available"),new Error("mutex already locked");const qt=new Error("request for lock canceled");class Gt{constructor(e,t=qt){this._value=e,this._cancelError=t,this._queue=[],this._weightedWaiters=[]}acquire(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((r,i)=>{const n={resolve:r,reject:i,weight:e,priority:t},a=Ut(this._queue,e=>t<=e.priority);-1===a&&e<=this._value?this._dispatchItem(n):this._queue.splice(a+1,0,n)})}runExclusive(e){return function(e,t,r,i){return new(r||(r=Promise))(function(n,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((i=i.apply(e,t||[])).next())})}(this,arguments,void 0,function*(e,t=1,r=0){const[i,n]=yield this.acquire(t,r);try{return yield e(i)}finally{n()}})}waitForUnlock(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,t)?Promise.resolve():new Promise(r=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function(e,t){const r=Ut(e,e=>t.priority<=e.priority);e.splice(r+1,0,t)}(this._weightedWaiters[e-1],{resolve:r,priority:t})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const t=this._value;this._value-=e.weight,e.resolve([t,this._newReleaser(e.weight)])}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const t=this._weightedWaiters[e-1];t&&(t.forEach(e=>e.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let t=this._value;t>0;t--){const r=this._weightedWaiters[t-1];if(!r)continue;const i=r.findIndex(t=>t.priority<=e);(-1===i?r:r.splice(0,i)).forEach(e=>e.resolve())}}}_couldLockImmediately(e,t){return(0===this._queue.length||this._queue[0].priority<t)&&e<=this._value}}function Ut(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return-1}class Ht{constructor(e){this._semaphore=new Gt(1,e)}acquire(){return function(e,t,r,i){return new(r||(r=Promise))(function(n,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((i=i.apply(e,t||[])).next())})}(this,arguments,void 0,function*(e=0){const[,t]=yield this._semaphore.acquire(1,e);return t})}runExclusive(e,t=0){return this._semaphore.runExclusive(()=>e(),1,t)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}class $t{constructor(e,t,r){Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerSlide",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"slideApi",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"mutex",{enumerable:!0,configurable:!0,writable:!0,value:new Ht}),Object.defineProperty(this,"_inited",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get html(){return this.bannerSlide.html}get state(){return this.slideApi.state}get inited(){return this._inited}get payload(){return this.bannerSlide.payload}notifyTimerEnd(){this.slideApi.slideTimerEnd()}async init(){const e=await this.mutex.acquire();if(this._inited)return;let t=this.banner.needShowLoaderScreen,r=Date.now();const i=setTimeout(()=>{this.banner.showLoaderScreen(),t=!0,r=Date.now()},500);try{this.banner.id,await this.slideApi.showSlide(this.html),this._inited=!0}catch(e){throw this.handleSlideError(e),e}finally{clearTimeout(i),await this.cleanupLoaderIfNeeded(Date.now()-r,t),e()}}async start(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideStart({muted:!0})}catch(e){throw this.handleSlideError(e),e}finally{e()}}async restart(){const e=await this.mutex.acquire();try{this.banner.hideErrorScreen(),await this.slideApi.slideRestart({muted:!0})}catch(e){throw this.handleSlideError(e),e}finally{this.banner.hideLoaderScreen(),e()}}async resume(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideAppResume()}catch(e){this.handleSlideError(e)}finally{e()}}async pause(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideAppPause()}catch(e){this.handleSlideError(e)}finally{e()}}async pauseByUser(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideUserPause()}catch(e){this.handleSlideError(e)}finally{e()}}async resumeByUser(){const e=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideUserResume()}catch(e){this.handleSlideError(e)}finally{e()}}async stop(e){const t=await this.mutex.acquire();try{this.banner.id,await this.slideApi.slideStop(e)}catch(e){this.handleSlideError(e)}finally{t()}}refreshSizes(){this.slideApi.refreshSizes()}onClick({event:e,currentTarget:t}){if(e.target)try{e.preventDefault(),e.stopPropagation();const r=this.getNavigationDirection(e,t);this.slideApi.slideClickHandler(e.target,r>0?"forward":"backward")}catch(e){console.error(e)}}async destroy(){await this.stop({prepareForRestart:2})}showLayerByIndex(e){this.slideApi.showLayer(e)}handleSlideError(e){console.warn(e),this.banner.showErrorScreen()}getNavigationDirection(e,t){const r=this.getClickPosition(e,t),i="ltr"===this.slideApi.layoutDirection?1:-1;return r>=.3?i:-i}getClickPosition(e,t){const r=t.getBoundingClientRect(),i=r.width;if(i<=0)return 0;let n;if(e instanceof MouseEvent)n=e.pageX-r.left;else{if(!(e.touches&&e.touches.length>0))return 0;n=e.touches[0].pageX-r.left}return Math.max(0,Math.min(1,n/i))}delay(e){return new Promise(t=>setTimeout(t,e))}async cleanupLoaderIfNeeded(e,t){t&&(await this.delay(Math.max(500-e,0)),this.banner.hideLoaderScreen())}}class Yt{get html(){return""}get state(){return 0}async init(){}async start(){}async restart(){}async resume(){}async pause(){}async resumeByUser(){}async pauseByUser(){}async stop(e){}onClick({event:e,currentTarget:t}){}async destroy(){}showLayerByIndex(e){}refreshSizes(){}notifyTimerEnd(){}}var Xt=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},Kt=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},Qt=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},Jt=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};let Zt=(()=>{var e,t,r,i,n,a,s,o;let l,c,d,u,h,f,b,p,m,g,v,y,w,P,S=[],_=[],M=[],x=[],T=[],A=[],E=[],k=[],L=[],I=[],B=[],j=[],R=[],C=[],F=[];return e=class{get _$root(){return Qt(this,t,"f")}set _$root(e){Jt(this,t,e,"f")}get _needShowErrorScreen(){return Qt(this,r,"f")}set _needShowErrorScreen(e){Jt(this,r,e,"f")}get _needShowLoaderScreen(){return Qt(this,i,"f")}set _needShowLoaderScreen(e){Jt(this,i,e,"f")}get _width(){return Qt(this,n,"f")}set _width(e){Jt(this,n,e,"f")}get _height(){return Qt(this,a,"f")}set _height(e){Jt(this,a,e,"f")}get _slides(){return Qt(this,s,"f")}set _slides(e){Jt(this,s,e,"f")}get isInited(){return Qt(this,o,"f")}set isInited(e){Jt(this,o,e,"f")}constructor(e,l,c,d,u){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:(Xt(this,S),e)}),Object.defineProperty(this,"bannerPlace",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(this,"banner",{enumerable:!0,configurable:!0,writable:!0,value:c}),Object.defineProperty(this,"bannerStatisticService",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:u}),t.set(this,Xt(this,_,null)),r.set(this,(Xt(this,M),Xt(this,x,!1))),i.set(this,(Xt(this,T),Xt(this,A,!1))),n.set(this,(Xt(this,E),Xt(this,k,0))),a.set(this,(Xt(this,L),Xt(this,I,0))),s.set(this,(Xt(this,B),Xt(this,j,[]))),Object.defineProperty(this,"slideApi",{enumerable:!0,configurable:!0,writable:!0,value:(Xt(this,R),null)}),Object.defineProperty(this,"slideApiImpl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"locked",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"toast",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_iterationId",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"_startTime",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_initPromise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_initPromiseResolver",{enumerable:!0,configurable:!0,writable:!0,value:()=>{}}),o.set(this,Xt(this,C,!1)),Object.defineProperty(this,"logger",{enumerable:!0,configurable:!0,writable:!0,value:Xt(this,F)}),Object.defineProperty(this,"attachRoot",{enumerable:!0,configurable:!0,writable:!0,value:async e=>{this._$root||(this._$root=e,this.slideApi=this.createSlideApi(e),this._slides=[new $t(this,this.banner.slides[0],this.slideApi)],this.logger.debug("attached to DOM"),await this.init())}}),Object.defineProperty(this,"handleVisibilityChange",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.locked||("hidden"===document.visibilityState&&(this.logger.debug("paused by app visibility change"),this.pause()),"visible"===document.visibilityState&&(this.logger.debug("resumed by app visibility change"),this.resume()))}}),this.logger=Fe().child({domain:Se.Banners,module:_e.Banners,component:Me.Banner,bannerId:this.id,placeId:this.bannerPlace.id}),this.slideApiImpl=new Nt(this.storyManager,this.bannerPlace,this,this.bannerStatisticService),this._initPromise=new Promise(e=>{this._initPromiseResolver=e})}get id(){return this.banner.id}get context(){return this.banner.context}get appearance(){return this.banner.appearance}get contentRatio(){return this.banner.appearance.contentRatio}get name(){return this.banner.name}get dir(){return this.storyManager.config.dir}get slides(){return this._slides}get activeSlideIndex(){return 0}get width(){return this._width}get height(){return this._height}get activeSlide(){var e;return null!==(e=this._slides[this.activeSlideIndex])&&void 0!==e?e:new Yt}get needShowErrorScreen(){return this._needShowErrorScreen}get needShowLoaderScreen(){return this._needShowLoaderScreen}get canBeShown(){return Boolean(this._$root)&&this.isInited}get iterationId(){return this._iterationId}get durationMs(){return Date.now()-this._startTime}async init(){this.isInited||(this.showLoaderScreen(),await this.activeSlide.init(),this._initPromiseResolver(),this.isInited=!0,this.logger.debug("banner initialized"))}async start(){if(!this._$root)throw new Error(`[IAS]: Slide API mount point not found for banner with ID ${this.id}`);document.addEventListener("visibilitychange",this.handleVisibilityChange);try{await this.activeSlide.start(),this._startTime=Date.now(),this.markAsOpened(),this.emitShowBannerEvent(),this.logger.debug("slide started",{iterationId:this._iterationId})}catch(e){this.emitShowBannerFailedEvent(e)}}refreshSizes(){this.activeSlide.refreshSizes()}async recover(){try{await this.activeSlide.init(),await this.activeSlide.start(),this._startTime=Date.now(),this.markAsOpened(),this.emitShowBannerEvent(),this.logger.debug("slide recovered",{iterationId:this._iterationId})}catch(e){this.emitShowBannerFailedEvent(e)}}async restart(){try{await this.activeSlide.restart(),this._startTime=Date.now(),this.markAsOpened(),this.emitShowBannerEvent(),this.logger.debug("slide restarted",{iterationId:this._iterationId})}catch(e){this.emitShowBannerFailedEvent(e)}}async resume(){await this.activeSlide.resume()}async pause(){await this.activeSlide.pause()}async resumeByUser(){await this.activeSlide.resumeByUser()}async pauseByUser(){await this.activeSlide.pauseByUser()}async stop(){var e;this.slideApiImpl.clearCardSession(),document.removeEventListener("visibilitychange",this.handleVisibilityChange),null===(e=this.toast)||void 0===e||e.destroy(),await this.activeSlide.stop({prepareForRestart:1}),this.logger.debug("slide stopped",{durationMs:this.durationMs})}async destroy(){var e,t;document.removeEventListener("visibilitychange",this.handleVisibilityChange);const r=this.activeSlide;this._slides=[],this._$root=null,this.isInited=!1,await r.destroy(),null===(e=this.slideApi)||void 0===e||e.destroy(),null===(t=this.toast)||void 0===t||t.destroy(),this.logger.debug("banner torn down")}showLayerByIndex(e){this.activeSlide.showLayerByIndex(e)}showToast(e){if(!this._$root)return;const t=this._$root;this.toast=new Wt(Object.assign({mountPoint:t},e)),this.toast.show(e.content)}detachRoot(){var e;this.logger.debug("detached from DOM"),this.isInited=!1,this._$root=null,this._slides.forEach(e=>e.destroy()),null===(e=this.slideApi)||void 0===e||e.destroy()}showErrorScreen(){this._needShowErrorScreen=!0}showLoaderScreen(){this._needShowLoaderScreen=!0}hideLoaderScreen(){this._needShowLoaderScreen=!1}hideErrorScreen(){this._needShowErrorScreen=!1}markAsOpened(){this._iterationId=(0,xe.v4)(),this.banner.markAsOpened(),this.markWasShown()}async waitInit(){await this._initPromise}notifyTimerEnd(){this.activeSlide.notifyTimerEnd()}async markWasShown(){!this.banner.wasShown&&this._iterationId&&(this.banner.markWasShown(),this.bannerStatisticService.sendViewEvent(this.id,{iterationId:this._iterationId,slideIndex:this.activeSlideIndex,slideTotal:this.banner.slides.length}))}async updateUserData(e){return this.bannerStore.updateBannerUserData(this.id,e)}createSlideApi(e){return new Vt.SlideApi(this.slideApiImpl,{root:e,slideRatio:this.banner.appearance.contentRatio,isFullscreen:!1,nonce:O(),viewport:window,userResizeHandler:e=>{this._width=e.viewportWidth,this._height=e.viewportHeight},VODPlayer:this.storyManager.globalProperties.$videoOnDemand,overlappingActionBarHeight:0,useSdkCacheForMultislideMode:!1})}emitShowBannerEvent(){this.bannerPlace.emit(Ft.name,new Ft({id:this.id,bannerPlace:this.bannerPlace.id,payload:this.activeSlide.payload}).payload)}emitShowBannerFailedEvent(e){this.logger.error("failed to show banner",void 0,e),this.bannerPlace.emit(Dt.name,new Dt({id:this.id,bannerPlace:this.bannerPlace.id,error:e,payload:this.activeSlide.payload}).payload)}},t=new WeakMap,r=new WeakMap,i=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap,o=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l=[ee.observable],c=[ee.observable],d=[ee.observable],u=[ee.observable],h=[ee.observable],f=[ee.observable],b=[ee.observable],p=[ee.computed],m=[ee.computed],g=[ee.computed],v=[ee.action],y=[ee.action],w=[ee.action],P=[ee.action],Kt(e,null,l,{kind:"accessor",name:"_$root",static:!1,private:!1,access:{has:e=>"_$root"in e,get:e=>e._$root,set:(e,t)=>{e._$root=t}},metadata:t},_,M),Kt(e,null,c,{kind:"accessor",name:"_needShowErrorScreen",static:!1,private:!1,access:{has:e=>"_needShowErrorScreen"in e,get:e=>e._needShowErrorScreen,set:(e,t)=>{e._needShowErrorScreen=t}},metadata:t},x,T),Kt(e,null,d,{kind:"accessor",name:"_needShowLoaderScreen",static:!1,private:!1,access:{has:e=>"_needShowLoaderScreen"in e,get:e=>e._needShowLoaderScreen,set:(e,t)=>{e._needShowLoaderScreen=t}},metadata:t},A,E),Kt(e,null,u,{kind:"accessor",name:"_width",static:!1,private:!1,access:{has:e=>"_width"in e,get:e=>e._width,set:(e,t)=>{e._width=t}},metadata:t},k,L),Kt(e,null,h,{kind:"accessor",name:"_height",static:!1,private:!1,access:{has:e=>"_height"in e,get:e=>e._height,set:(e,t)=>{e._height=t}},metadata:t},I,B),Kt(e,null,f,{kind:"accessor",name:"_slides",static:!1,private:!1,access:{has:e=>"_slides"in e,get:e=>e._slides,set:(e,t)=>{e._slides=t}},metadata:t},j,R),Kt(e,null,b,{kind:"accessor",name:"isInited",static:!1,private:!1,access:{has:e=>"isInited"in e,get:e=>e.isInited,set:(e,t)=>{e.isInited=t}},metadata:t},C,F),Kt(e,null,p,{kind:"getter",name:"activeSlide",static:!1,private:!1,access:{has:e=>"activeSlide"in e,get:e=>e.activeSlide},metadata:t},null,S),Kt(e,null,m,{kind:"getter",name:"needShowLoaderScreen",static:!1,private:!1,access:{has:e=>"needShowLoaderScreen"in e,get:e=>e.needShowLoaderScreen},metadata:t},null,S),Kt(e,null,g,{kind:"getter",name:"canBeShown",static:!1,private:!1,access:{has:e=>"canBeShown"in e,get:e=>e.canBeShown},metadata:t},null,S),Kt(e,null,v,{kind:"method",name:"showErrorScreen",static:!1,private:!1,access:{has:e=>"showErrorScreen"in e,get:e=>e.showErrorScreen},metadata:t},null,S),Kt(e,null,y,{kind:"method",name:"showLoaderScreen",static:!1,private:!1,access:{has:e=>"showLoaderScreen"in e,get:e=>e.showLoaderScreen},metadata:t},null,S),Kt(e,null,w,{kind:"method",name:"hideLoaderScreen",static:!1,private:!1,access:{has:e=>"hideLoaderScreen"in e,get:e=>e.hideLoaderScreen},metadata:t},null,S),Kt(e,null,P,{kind:"method",name:"hideErrorScreen",static:!1,private:!1,access:{has:e=>"hideErrorScreen"in e,get:e=>e.hideErrorScreen},metadata:t},null,S),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();class er{constructor(e,t,r){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"bannerStatisticService",{enumerable:!0,configurable:!0,writable:!0,value:r})}create(e,t){return new Zt(this.storyManager,e,t,this.bannerStatisticService,this.bannerStore)}}function tr(e,t){let r=null;return async function(...t){return r||(r=(async()=>{try{return await e.apply(this,t)}catch(e){throw e}finally{r=null}})(),r)}}class rr extends Error{constructor(e){super(`[IAS]: Banner with ID ${e} not found`),this.name="IasBannerNotFoundError"}}class ir extends Error{constructor(e){super(`[IAS]: Banner slot with ID ${e} not found`),this.name="IasBannerPlaceNotFoundError"}}var nr=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0};let ar=(()=>{var e;let t,r=[];return e=class{constructor(e){Object.defineProperty(this,"httpClient",{enumerable:!0,configurable:!0,writable:!0,value:(nr(this,r),e)})}async fetchBannerPlaceById(e){const t=await this.httpClient.post(`banner/place/${e.placeId}`,{tags:e.tags.join(","),options:e.options},{params:{expand:"banners.slides"}});if(t.data)return t.data;throw new ir(e.placeId)}async fetchBannerById(e){const t=await this.httpClient.get(`banner/${e}`,{params:{expand:"slides"}});if(t.data)return t.data;throw new rr(e)}async fetchWidgetsData({bannerIds:e}){return(await this.httpClient.get("banner/context",{params:{fields:"widgetsData",id:e.join()}})).data}async fetchStyles(){return(await this.httpClient.get("banner/context",{params:{fields:"style"}})).data}async updateUserData(e,t){try{await this.httpClient.request({url:`banner/${e}/data`,method:"put",data:{data:t}})}catch(e){console.error(e)}}},(()=>{const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[tr],function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0}(e,null,t,{kind:"method",name:"fetchStyles",static:!1,private:!1,access:{has:e=>"fetchStyles"in e,get:e=>e.fetchStyles},metadata:i},null,r),i&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),e})();class sr{constructor(e,t){Object.defineProperty(this,"httpClient",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:t})}async sendViewEvent(e,t){await this.sendStatisticsEvent(e,t)}async sendWidgetEvent(e,t){await this.sendStatisticsEvent(e,t)}async sendStatisticsEvent(e,t){try{if(this.storyManager.isStatisticsDisabled)return void console.log("[BANNER STATISTICS]",Object.assign({bannerId:e,type:t.type},t.toQueryParams()));await this.httpClient.sendBeacon(`/banner/${e}/event/${t.type}`,t.toQueryParams())}catch(e){console.error(e)}}}var or;!function(e){e[e.Base=0]="Base",e[e.Dynamic=1]="Dynamic",e[e.Game=2]="Game",e[e.Story=3]="Story",e[e.IAM=4]="IAM"}(or||(or={}));var lr=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0};(()=>{var e;let t,r,i=[];e=class{async fetchBannerPlaceById(e){return{id:"default",appearance:{single_banner_aspect_ratio:2,banners_gap:16,corner_radius:16,loop:!0,autoplay:!0,autoplay_delay:1e3,animation_speed:300},banners:[]}}async fetchWidgetsData({bannerIds:e}){return{widgetsData:{}}}async fetchStyles(){return{style:""}}updateUserData(e,t){throw new Error("Method not implemented.")}fetchBannerById(e){throw new Error("Method not implemented.")}constructor(){!function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e)}(this,i)}},(()=>{const n="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;t=[tr],r=[tr],lr(e,null,t,{kind:"method",name:"fetchBannerPlaceById",static:!1,private:!1,access:{has:e=>"fetchBannerPlaceById"in e,get:e=>e.fetchBannerPlaceById},metadata:n},null,i),lr(e,null,r,{kind:"method",name:"fetchStyles",static:!1,private:!1,access:{has:e=>"fetchStyles"in e,get:e=>e.fetchStyles},metadata:n},null,i),n&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})()})();class cr{constructor(e,t){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:t})}createBannerPlace(e,t){var r;const i=new sr(this.storyManager.httpClient,this.storyManager),n=new ct(i),a=new er(this.storyManager,this.bannerStore,n);return new qe(null!==(r=null==t?void 0:t.toString())&&void 0!==r?r:"default",e,n,this.bannerStore,a)}createBannerPreviewPlace(e,t){const r=new sr(this.storyManager.httpClient,this.storyManager),i=new ct(r),n=new er(this.storyManager,this.bannerStore,i);return new lt(t.toString(),e,this.bannerStore,n)}}class dr{static toDomain({bannerDto:e,bannerContextDto:t,fontPrefix:r}){return new ie({id:e.id,name:e.name,slides:e.slides.filter(e=>Boolean(e.html.length)).map(e=>{var t;return new he({html:e.html,fontPrefix:r,duration:e.duration,payload:null===(t=e.event_payload)||void 0===t?void 0:t.payload})}),displayFrom:e.display_from,displayTo:e.display_to,appearance:new ne(e.appearance),context:new ae(e.id,t),frequencyLimit:e.frequency_limit})}}class ur{static toDomain({bannerPlaceDto:e,bannerContextDto:t,placeholders:r,fontPrefix:i}){const n=e.banners.map(e=>dr.toDomain({bannerDto:e,bannerContextDto:t,fontPrefix:i}));return new be({id:e.id,banners:n,placeholders:r,style:t.style})}}var hr=function(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0},fr=function(e,t,r,i,n,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?i.static?e:e.prototype:null,u=t||(d?Object.getOwnPropertyDescriptor(d,i.name):{}),h=!1,f=r.length-1;f>=0;f--){var b={};for(var p in i)b[p]="access"===p?{}:i[p];for(var p in i.access)b.access[p]=i.access[p];b.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var m=(0,r[f])("accessor"===l?{get:u.get,set:u.set}:u[c],b);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(o=s(m.get))&&(u.get=o),(o=s(m.set))&&(u.set=o),(o=s(m.init))&&n.unshift(o)}else(o=s(m))&&("field"===l?n.unshift(o):u[c]=o)}d&&Object.defineProperty(d,i.name,u),h=!0},br=function(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},pr=function(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r};let mr=(()=>{var e,t,r;let i,n,a,s=[],o=[],l=[],c=[],d=[];return e=class{get _bannerPlaces(){return br(this,t,"f")}set _bannerPlaces(e){pr(this,t,e,"f")}get _banners(){return br(this,r,"f")}set _banners(e){pr(this,r,e,"f")}constructor(e,i){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:(hr(this,s),e)}),Object.defineProperty(this,"bannerApi",{enumerable:!0,configurable:!0,writable:!0,value:i}),t.set(this,hr(this,o,ee.observable.map())),r.set(this,(hr(this,l),hr(this,c,ee.observable.map()))),Object.defineProperty(this,"_inFlightBannerPlaces",{enumerable:!0,configurable:!0,writable:!0,value:(hr(this,d),new Map)}),Object.defineProperty(this,"bannerCSS",{enumerable:!0,configurable:!0,writable:!0,value:""}),(0,ee.reaction)(()=>e.rootStore.placeholderStore.placeholders,e=>{for(const t of this._bannerPlaces.values())t.updatePlaceholders(e)})}get bannerPlaces(){return Array.from(this._bannerPlaces.values())}async getBannerById(e){if(this._banners.has(e))return this._banners.get(e);await this.storyManager.rootStore.sessionStore.open();const t=await this.fetchBannerContext({bannerIds:[e]}),r=await this.bannerApi.fetchBannerById(e);return this.addBanner(r,t)}async getBannerPlaceById(e){if(this._bannerPlaces.has(e.placeId))return this._bannerPlaces.get(e.placeId);const t=this._inFlightBannerPlaces.get(e.placeId);if(t)return t;const r=this.loadBannerPlace(e);this._inFlightBannerPlaces.set(e.placeId,r);try{return await r}finally{this._inFlightBannerPlaces.delete(e.placeId)}}clearCache(){this._bannerPlaces=ee.observable.map(),this._banners=ee.observable.map(),this._inFlightBannerPlaces.clear(),this.bannerCSS=""}removeBannerPlaceById(e){this._bannerPlaces.delete(e)}async updateBannerUserData(e,t){if(!this.storyManager.isStatisticsDisabled)return this.bannerApi.updateUserData(e,t);console.log("[IAM]: update user data",{bannerId:e,payload:t})}async loadBannerPlace(e){const t=this.storyManager.config;await this.storyManager.rootStore.sessionStore.open();const r=await this.bannerApi.fetchBannerPlaceById({placeId:e.placeId,tags:t.tags,options:t.options}),i=await this.fetchBannerContext({bannerIds:r.banners.map(e=>e.id)});return this.addBannerPlace(r,i)}async fetchBannerContext({bannerIds:e}){const t=this.bannerApi.fetchWidgetsData({bannerIds:e});if(!this.bannerCSS){const[e,r]=await Promise.all([t,this.bannerApi.fetchStyles()]);return r.style&&(this.bannerCSS=le(r.style,this.storyManager.config.fontPrefix)),{widgetsData:e.widgetsData,style:this.bannerCSS}}return{widgetsData:(await t).widgetsData,style:this.bannerCSS}}addBannerPlace(e,t){const r=this.storyManager.rootStore.placeholderStore.placeholders,i=ur.toDomain({bannerPlaceDto:e,bannerContextDto:t,placeholders:r,fontPrefix:this.storyManager.config.fontPrefix});return i.updatePlaceholders(r),this._bannerPlaces.set(e.id,i),i}addBanner(e,t){const r=this.storyManager.rootStore.placeholderStore.placeholders,i=dr.toDomain({bannerDto:e,bannerContextDto:t,fontPrefix:this.storyManager.config.fontPrefix});return i.updatePlaceholders(r),this._banners.set(i.id,i),i}},t=new WeakMap,r=new WeakMap,(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i=[ee.observable],n=[ee.observable],a=[ee.computed],fr(e,null,i,{kind:"accessor",name:"_bannerPlaces",static:!1,private:!1,access:{has:e=>"_bannerPlaces"in e,get:e=>e._bannerPlaces,set:(e,t)=>{e._bannerPlaces=t}},metadata:t},o,l),fr(e,null,n,{kind:"accessor",name:"_banners",static:!1,private:!1,access:{has:e=>"_banners"in e,get:e=>e._banners,set:(e,t)=>{e._banners=t}},metadata:t},c,d),fr(e,null,a,{kind:"getter",name:"bannerPlaces",static:!1,private:!1,access:{has:e=>"bannerPlaces"in e,get:e=>e.bannerPlaces},metadata:t},null,s),t&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})();class gr{constructor(e){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const t=new ar(e.httpClient);this.bannerStore=new mr(this.storyManager,t)}}Error;class vr extends Error{constructor(e){super(`[IAS]: Mount point ${e} is not present in DOM at initialization time`),this.name="IasMountPointReferenceError"}}class yr extends Xe{render(){this.root.render((0,e.jsx)(Ze,{bannerPlace:this.bannerPlace}))}}class wr{constructor(e){Object.defineProperty(this,"storyManager",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"bannerPlaces",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"bannerPlaceViewModelFactory",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rootStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reloadAllBanners",{enumerable:!0,configurable:!0,writable:!0,value:()=>{this.rootStore.bannerStore.clearCache(),this.bannerPlaces.forEach(e=>{e.reload().catch(console.error)})}}),this.rootStore=new gr(e),this.bannerPlaceViewModelFactory=new cr(e,this.rootStore.bannerStore),this.storyManager.on("requestSDKReload",this.reloadAllBanners)}getConfig(){return this.storyManager.config}addBannerPlace(e){this.bannerPlaces.push(e)}removeBannerPlace(e){const t=this.bannerPlaces.indexOf(e);-1!==t&&this.bannerPlaces.splice(t,1)}clear(){for(const e of this.bannerPlaces)e.destroy();this.bannerPlaces=[]}createBannerPlace(e){return this.bannerPlaceViewModelFactory.createBannerPlace(this,e)}createBannerPreviewPlace(e){return this.bannerPlaceViewModelFactory.createBannerPreviewPlace(this,e)}static create(e){return wr.instance||(wr.instance=new wr(e)),wr.instance}mountBannerPlace(e,t){return this.mountBannerCarousel(e,t)}mountBannerCarousel(e,t){const r=document.querySelector(e);if(!r)throw new vr(e);const i=this.createBannerPlace(null==t?void 0:t.placeId),n=new Xe(r,i,t);return this.scheduleRender(n),n}mountBannerList(e,t){const r=document.querySelector(e);if(!r)throw new vr(e);const i=this.createBannerPlace(null==t?void 0:t.placeId),n=new Ke(r,i,t);return this.scheduleRender(n),n}mountBannerPreviewPlace(e,t){const r=document.querySelector(e);if(!r)throw new vr(e);const i=this.createBannerPreviewPlace(t.bannerId),n=new yr(r,i);return this.scheduleRender(n),n}scheduleRender(e){this.getConfig().waitForReloadSdk().then(()=>{e.render()})}}const Pr=wr,Sr=new class{constructor(){Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ias-banners"})}install(e){const t=Pr.create(e.INTERNAL_API);e.HOST.prototype.banners=t}uninstall(){}}})(),u=u.default,u})());