@inappstory/react-sdk 0.5.0 → 0.5.1

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("effector"),require("uuid"),require("@inappstory/slide-api"),require("@inappstory/video-player"),require("react"),require("@emotion/cache"),require("classnames"),require("@emotion/styled"),require("@emotion/react"),require("react-input-mask"),require("parse-css-sides"));else if("function"==typeof define&&define.amd)define(["effector","uuid","@inappstory/slide-api","@inappstory/video-player","react","@emotion/cache","classnames","@emotion/styled","@emotion/react","react-input-mask","parse-css-sides"],t);else{var i="object"==typeof exports?t(require("effector"),require("uuid"),require("@inappstory/slide-api"),require("@inappstory/video-player"),require("react"),require("@emotion/cache"),require("classnames"),require("@emotion/styled"),require("@emotion/react"),require("react-input-mask"),require("parse-css-sides")):t(e.effector,e.uuid,e["@inappstory/slide-api"],e["@inappstory/video-player"],e.react,e["@emotion/cache"],e.classnames,e["@emotion/styled"],e["@emotion/react"],e["react-input-mask"],e["parse-css-sides"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,s,n,o,a,l,d,c)=>(()=>{var u={3643:function(e){e.exports=function(e){var t={};function i(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(r,s,function(t){return e[t]}.bind(null,s));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r=i(18),s=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},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}));if(t.push(0),10===t[0])switch(t[1]){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}},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,i,r){void 0===r&&(r=!1);var s=e.getVersionPrecision(t),n=e.getVersionPrecision(i),o=Math.max(s,n),a=0,l=e.map([t,i],(function(t){var i=o-e.getVersionPrecision(t),r=t+new Array(i+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=o-Math.min(s,n)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},e.map=function(e,t){var i,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)r.push(t(e[i]));return r},e.find=function(e,t){var i,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,r=e.length;i<r;i+=1){var s=e[i];if(t(s,i))return s}},e.assign=function(e){for(var t,i,r=e,s=arguments.length,n=new Array(s>1?s-1:0),o=1;o<s;o++)n[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(n));var a=function(){var e=n[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,i=n.length;t<i;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=s,e.exports=t.default},18:function(e,t,i){"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={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(91))&&r.__esModule?r:{default:r},n=i(18);function o(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,i,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new s.default(e,t)},e.parse=function(e){return new s.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return n.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return n.ENGINE_MAP}},{key:"OS_MAP",get:function(){return n.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return n.PLATFORMS_MAP}}],(i=null)&&o(t.prototype,i),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r=l(i(92)),s=l(i(93)),n=l(i(94)),o=l(i(95)),a=l(i(17));function l(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return 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=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)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.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=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)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=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)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=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)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 a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,i={},r=0,s={},n=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(s[t]=o,n+=1):"object"==typeof o&&(i[t]=o,r+=1)})),r>0){var o=Object.keys(i),l=a.default.find(o,(function(e){return t.isOS(e)}));if(l){var d=this.satisfies(i[l]);if(void 0!==d)return d}var c=a.default.find(o,(function(e){return t.isPlatform(e)}));if(c){var u=this.satisfies(i[c]);if(void 0!==u)return u}}if(n>0){var h=Object.keys(s),p=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(s[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var i=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),s=a.default.getBrowserTypeByAlias(r);return t&&s&&(r=s.toLowerCase()),r===i},t.compareVersion=function(e){var t=[0],i=e,r=!1,s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(r=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(r=!0,i=e.substr(1)),t.indexOf(a.default.compareVersions(s,i,r))>-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=d,e.exports=t.default},92:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(17))&&r.__esModule?r:{default:r},n=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=s.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=s.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=s.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=s.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=s.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=s.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=s.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=s.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=s.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=s.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=s.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=s.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=s.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=s.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=s.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=s.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=s.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=s.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=s.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=s.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=s.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=s.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=s.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s.default.getFirstMatch(t,e),version:s.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(17))&&r.__esModule?r:{default:r},n=i(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=s.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:n.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=s.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:n.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=s.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=s.default.getWindowsVersionName(t);return{name:n.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:n.OS_MAP.iOS},i=s.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=s.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=s.default.getMacOSVersionName(t),r={name:n.OS_MAP.MacOS,version:t};return i&&(r.versionName=i),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=s.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:n.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=s.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=s.default.getAndroidVersionName(t),r={name:n.OS_MAP.Android,version:t};return i&&(r.versionName=i),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=s.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:n.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=s.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||s.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||s.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:n.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=s.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:n.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=s.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:n.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:n.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:n.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=s.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:n.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(17))&&r.__esModule?r:{default:r},n=i(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=s.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:n.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe:function(e){var t=s.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:n.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:n.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:n.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:n.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:n.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(17))&&r.__esModule?r:{default:r},n=i(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:n.ENGINE_MAP.Blink};var t=s.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:n.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:n.ENGINE_MAP.Trident},i=s.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:n.ENGINE_MAP.Presto},i=s.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:n.ENGINE_MAP.Gecko},i=s.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:n.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:n.ENGINE_MAP.WebKit},i=s.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})},6644:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".aspect-ratio-box--XcAlO{width:auto;height:100%;left:50%;transform:translateX(-50%);overflow:hidden;position:relative}.aspect-ratio-box-inside--j-DAC{position:absolute;top:0;left:0;width:100%;height:100%}",""]),s.locals={"aspect-ratio-box":"aspect-ratio-box--XcAlO","aspect-ratio-box-inside":"aspect-ratio-box-inside--j-DAC"};const n=s},1422:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".icon--sEycZ{padding:10px;width:2rem;height:2rem}",""]),s.locals={icon:"icon--sEycZ"};const n=s},4978:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'@keyframes spin--hXgzP{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.refresh--S4PQ5{cursor:pointer;position:absolute;left:50%;top:50%;transform:translate3d(-50%, -50%, 0);z-index:2}.game-reader-container--nTAGw{background-color:rgba(0,0,0,0);position:fixed;left:0px;top:0px;padding:0px;border:0px;z-index:2147483645;width:100%;height:100%;overflow:hidden;color-scheme:auto}.game-reader--1ZgeS{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0);z-index:1;user-select:none;pointer-events:all;color:#fff}.game-reader--1ZgeS.desktop-mode--EXjc3{padding:50px 0}.game-reader--1ZgeS .game-box--pcuyl{border-radius:5px;background-position:center center;background-size:cover;background-repeat:no-repeat}.game-reader--1ZgeS .game-iframe--r85vH{width:inherit;height:inherit}.game-reader--1ZgeS:after{display:none;position:absolute;top:calc(50% - 1rem);left:calc(50% - 1rem);content:"";width:2rem;height:2rem;border:solid 2px var(--GRLoaderBackgroundColor, white);border-color:var(--GRLoaderBackgroundAccentColor, transparent) var(--GRLoaderBackgroundColor, white) var(--GRLoaderBackgroundColor, white) var(--GRLoaderBackgroundColor, white);border-radius:50%;animation:spin--hXgzP .6s infinite linear}.game-reader--1ZgeS.loading--pZ\\+6O:after{display:inline-block}.game-reader--1ZgeS .game-reader__backdrop--ojYHb{position:fixed;inset:0}.game-reader__close--tXZJZ{border:0;padding:0;background:rgba(0,0,0,0);position:absolute;top:20px;z-index:1140;pointer-events:all;cursor:pointer;outline:none;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.game-reader__close--tXZJZ:focus{outline:none}.game-reader__close--tXZJZ svg{overflow:visible}.game-reader__close--tXZJZ[data-position=start],.game-reader__close--tXZJZ[data-position=left]{left:10px}.game-reader__close--tXZJZ[data-position=start][dir=rtl],.game-reader__close--tXZJZ[data-position=left][dir=rtl]{left:auto;right:10px}.game-reader__close--tXZJZ[data-position=end],.game-reader__close--tXZJZ[data-position=right]{right:10px}.game-reader__close--tXZJZ[data-position=end][dir=rtl],.game-reader__close--tXZJZ[data-position=right][dir=rtl]{left:10px;right:auto}',""]),s.locals={refresh:"refresh--S4PQ5","game-reader-container":"game-reader-container--nTAGw","game-reader":"game-reader--1ZgeS","desktop-mode":"desktop-mode--EXjc3","game-box":"game-box--pcuyl","game-iframe":"game-iframe--r85vH",spin:"spin--hXgzP",loading:"loading--pZ+6O","game-reader__backdrop":"game-reader__backdrop--ojYHb","game-reader__close":"game-reader__close--tXZJZ"};const n=s},763:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,":root{--ias-sat: env(safe-area-inset-top);--ias-sar: env(safe-area-inset-right);--ias-sab: env(safe-area-inset-bottom);--ias-sal: env(safe-area-inset-left)}",""]),s.locals={};const n=s},5213:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,"h3{margin:0}.stories-list-wrapper--rTQwL{background-color:var(--background-color, transparent);height:auto;padding:0;position:relative}.stories-list-wrapper--rTQwL.mode-desktop--o0ka0.with-list-controls--k8u1L{position:relative}.stories-list--cPITI{position:relative;overflow:visible}@media(min-width: 767.99px){.stories-list--cPITI{overflow:hidden}}.stories-list__actions--SI0\\+0{position:absolute;right:0;top:0}.stories-list__viewport--KbCw2{overflow:hidden;height:auto}.stories-list__viewport--KbCw2:not(.mode-desktop--o0ka0){display:flex}.stories-list__viewport-inner--LCUH4{display:flex;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-top:var(--storiesListTopPadding, 0);padding-bottom:var(--storiesListBottomPadding, 0);box-sizing:content-box}.stories-list__viewport-inner--LCUH4::-webkit-scrollbar{display:none}.stories-list__viewport-inner--LCUH4.mode-desktop--o0ka0{scroll-behavior:unset;cursor:grab}.stories-list__viewport-inner--LCUH4.isVerticalDirection--jIuyZ{flex-flow:row wrap}.stories-list__viewport-inner--LCUH4.align-center--zgJPi{margin-left:auto;margin-right:auto}.stories-list__viewport-inner--LCUH4.align-left--mSkW6{margin-right:auto}.stories-list__viewport-inner--LCUH4.align-right--R8\\+zN{margin-left:auto}.stories-list__viewport-inner--LCUH4.isTitleCardOutsideTop--M9GF-{align-items:flex-end}.stories-list__viewport-inner--LCUH4.isTitleCardOutsideBottom--rx9jV{align-items:flex-start}",""]),s.locals={"stories-list-wrapper":"stories-list-wrapper--rTQwL","mode-desktop":"mode-desktop--o0ka0","with-list-controls":"with-list-controls--k8u1L","stories-list":"stories-list--cPITI","stories-list__actions":"stories-list__actions--SI0+0","stories-list__viewport":"stories-list__viewport--KbCw2","stories-list__viewport-inner":"stories-list__viewport-inner--LCUH4",isVerticalDirection:"isVerticalDirection--jIuyZ","align-center":"align-center--zgJPi","align-left":"align-left--mSkW6","align-right":"align-right--R8+zN",isTitleCardOutsideTop:"isTitleCardOutsideTop--M9GF-",isTitleCardOutsideBottom:"isTitleCardOutsideBottom--rx9jV"};const n=s},7966:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".favorite-images-wrapper--Xrkk6{display:flex;flex-direction:row;flex-wrap:wrap;padding:var(--storiesListCardFavoriteTitle, --storiesListItemTitlePadding, 0px);gap:var(--storiesListCardFavoriteGap, 3px);box-sizing:border-box}.favorite-image-wrapper--iWxvX{flex:0 1 calc(50% - var(--storiesListCardFavoriteGap, 3px));position:relative}.favorite-image--zPW-D{position:relative}.favorite-image-item--t9M\\+t{position:absolute;inset:0px;border-radius:calc(var(--storiesListInnerBorderRadiusRead, 0)/4);background-position:50% 50%;background-size:cover}.circle_style--3lFSw .favorite-image-item--t9M\\+t{border-radius:50%}",""]),s.locals={"favorite-images-wrapper":"favorite-images-wrapper--Xrkk6","favorite-image-wrapper":"favorite-image-wrapper--iWxvX","favorite-image":"favorite-image--zPW-D","favorite-image-item":"favorite-image-item--t9M+t",circle_style:"circle_style--3lFSw"};const n=s},6892:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.stories-slide-wrapper--aVM\\+1:not(:last-child){margin-right:var(--storiesGap, 20px)}.stories-slide-wrapper--aVM\\+1{display:flex;flex-direction:column;flex:0 0 auto;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.stories-slide-wrapper--aVM\\+1:hover{text-decoration:none}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze{display:block;box-sizing:border-box;text-align:left;position:relative;overflow:visible;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);border:var(--storiesListBorderNotReadWidth, 2px) solid var(--storiesBorderNotReadColor, #00b956);padding:var(--storiesListBorderGapNotRead, 2px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x{border-radius:var(--storiesListBorderRadius, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide-image--E2w7f,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide-image--E2w7f{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide-image__image--viK-T,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide-image__image--viK-T video,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide-image__image--viK-T,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide-image__image--viK-T video{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide__mask--Ra85s,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide__mask--Ra85s{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide__content--GZM3d,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide__content--GZM3d{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j{border-radius:var(--storiesListBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide-image--E2w7f,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide-image--E2w7f{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide-image__image--viK-T,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide-image__image--viK-T video,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide-image__image--viK-T,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide-image__image--viK-T video{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide__mask--Ra85s,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide__mask--Ra85s{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide__content--GZM3d,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide__content--GZM3d{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._is-read--O-P1j{border:var(--storiesListBorderReadWidth, 1px) solid var(--storiesBorderReadColor, #ededed)}.stories-slide-wrapper--aVM\\+1.isTitleCardOutsideTop--rgyxL{justify-content:flex-end}.stories-slide-wrapper--aVM\\+1.isTitleCardOutsideBottom--9w6eu{justify-content:flex-start}.stories-slide-wrapper--aVM\\+1 .stories-slide__inner--jP7d2{display:block;position:relative;width:100%;height:100%}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-black--LzoGN{background:#000}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-white--cCu4O{background:#fff}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-red--oS-Gd{background:#ff1a36}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-yellow--hVzqv{background:#fff000}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-green--hQFmN{background:#0be361}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-violet--D\\+STO{background:#b300bc}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-blue--GkTxq{background:#0761db}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-grey--qU8eo{background:#a8a8a8}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-black-gradient--I75n4{background:#fff;background:linear-gradient(0deg, #c1c1c1, #000)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-white-gradient--yfwk7{background:#fff;background:linear-gradient(180deg, #fff, #ffc800)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-red-gradient--i3Awy{background:#ff1a36;background:linear-gradient(180deg, #c90174, #eb5c57)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-yellow-gradient--c89UQ{background:#fff000;background:linear-gradient(0deg, #fbda61, #f76b1c)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-green-gradient--3TGxB{background:#0be361;background:linear-gradient(0deg, #b4ed50, #429321)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-violet-gradient--JAdS3{background:#b300bc;background:linear-gradient(180deg, #c90174, #0164fd)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-blue-gradient--qKJCa{background:#0761db;background:linear-gradient(180deg, #3023ae, #53a0fe 48%, #b4ed50)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-grey-gradient--4\\+MvA{background:#a8a8a8;background:linear-gradient(0deg, #e2e2e2, #959595)}.stories-slide-wrapper--aVM\\+1 .stories-slide-image--E2w7f{position:relative;width:100%;height:100%}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__wrap--jAg55{position:absolute;top:0;bottom:0;left:0;right:0}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T{position:relative;opacity:1;transition:opacity .3s ease-in-out;overflow:hidden}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T._mode_list--dkBpg{width:100%;height:100%}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T.ugc-card-cell--Ybjtv img{object-fit:contain}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T img{width:100%;height:100%;object-fit:cover}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T video{min-height:100%;min-width:100%;width:100%;background-position:center center;background-repeat:no-repeat;object-fit:cover;opacity:0}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T.video-loaded--CLBMu img{display:none}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T.video-loaded--CLBMu video{opacity:1}.stories-slide-wrapper--aVM\\+1 .stories-slide__mask--Ra85s{position:absolute;top:0;bottom:0;left:0;right:0;z-index:2;background-color:var(--storiesListItemMaskColor, rgba(0, 0, 0, 0));background-image:var(--storiesListItemMaskLinearGradient, none);opacity:1}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._is-read--O-P1j .stories-slide__mask--Ra85s{background-color:var(--storiesListItemOpenedMaskColor, rgba(0, 0, 0, 0));background-image:var(--storiesListItemOpenedMaskLinearGradient, none)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._ugc-cell--f8S1f .stories-slide__mask--Ra85s{background-color:var(--storiesListCardUgcMaskColor, rgba(0, 0, 0, 0));background-image:var(--storiesListCardUgcMaskLinearGradient, none)}.stories-slide-wrapper--aVM\\+1 .stories-slide__content--GZM3d{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;height:100%;max-height:100%;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;color:var(--storiesListItemTitleColor, white);font-family:var(--storiesListItemTitleFontFamily);font-weight:normal;font-size:1rem;line-height:normal;font:var(--storiesListItemTitleFont, normal);text-decoration:none;padding:var(--storiesListItemTitlePadding, 0px)}.stories-slide-wrapper--aVM\\+1 .stories-slide__content--GZM3d.__position_outside_top--en7U6,.stories-slide-wrapper--aVM\\+1 .stories-slide__content--GZM3d.__position_outside_bottom--X5wOp{position:relative;top:unset;right:unset;bottom:unset;left:unset;height:auto}.stories-slide-wrapper--aVM\\+1 .clamp--1Awvg{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.stories-slide-wrapper--aVM\\+1 .stories-slide__title--PDoTn{white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:none;user-select:none}.stories-slide-wrapper--aVM\\+1 .stories-slide__title--PDoTn.align-left--835Gu{text-align:left}.stories-slide-wrapper--aVM\\+1 .stories-slide__title--PDoTn.align-center--5jKkF{text-align:center}.stories-slide-wrapper--aVM\\+1 .stories-slide__title--PDoTn.align-right--Pfrzc{text-align:right}.stories-slide--ZUGze._format-circle--prePc,.stories-slide--ZUGze._format-circle--prePc .stories-slide-image__image--viK-T,.stories-slide--ZUGze._format-circle--prePc .stories-slide-image__image--viK-T video,.stories-slide--ZUGze._format-circle--prePc .stories-slide__mask--Ra85s,.stories-slide--ZUGze._format-circle--prePc .stories-slide-image--E2w7f{border-radius:50%}.stories-slide--ZUGze._favorite-cell--1l8Xk .stories-slide__mask--Ra85s{background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%)}.stories-slide--ZUGze._favorite-cell--1l8Xk._format-circle--prePc .stories-slide-image__wrap--jAg55{display:flex}.stories-slide--ZUGze._favorite-cell--1l8Xk._format-circle--prePc .stories-slide-image__image--viK-T{width:85%;height:85%;overflow:visible;margin:auto}.stories-slide--ZUGze._favorite-cell--1l8Xk._format-circle--prePc .favorite-images-wrapper--\\+i2pB{margin:0;padding:0}.stories-slide--ZUGze._has-drop-shadow--2LySa{filter:drop-shadow(var(--storiesListCardDropShadow, none))}.stories-slide--ZUGze._has-drop-shadow--2LySa._is-read--O-P1j{filter:drop-shadow(var(--storiesListCardOpenedDropShadow, none))}.stories-slide--ZUGze._has-drop-shadow--2LySa._favorite-cell--1l8Xk{filter:drop-shadow(var(--storiesListCardFavoriteDropShadow, none))}.stories-slide--ZUGze._has-drop-shadow--2LySa._ugc-cell--f8S1f{filter:drop-shadow(var(--storiesListCardUgcDropShadow, none))}.stories-slide--ZUGze._has-card-svg-mask--17djB .stories-slide__inner--jP7d2{-webkit-mask-image:var(--storiesListCardMask);mask-image:var(--storiesListCardMask)}.stories-slide--ZUGze._has-card-svg-mask--17djB._is-read--O-P1j .stories-slide__inner--jP7d2{-webkit-mask-image:var(--storiesListCardOpenedMask);mask-image:var(--storiesListCardOpenedMask)}.stories-slide--ZUGze._has-card-svg-mask--17djB._favorite-cell--1l8Xk .stories-slide__inner--jP7d2{-webkit-mask-image:var(--storiesListCardFavoriteMask);mask-image:var(--storiesListCardFavoriteMask)}.stories-slide--ZUGze._has-card-svg-mask--17djB._ugc-cell--f8S1f .stories-slide__inner--jP7d2{-webkit-mask-image:var(--storiesListCardUgcMask);mask-image:var(--storiesListCardUgcMask)}.stories-slide--ZUGze .card-overlay-svg-mask--PoiQW{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;z-index:3}@supports(((mask-image: linear-gradient(0deg, #fff, #fff), linear-gradient(0deg, #fff, #fff)) and (mask-clip: content-box, border-box)) or ((-webkit-mask-image: linear-gradient(0deg, #fff, #fff), linear-gradient(0deg, #fff, #fff)) and (-webkit-mask-clip: content-box, border-box))) and ((mask-composite: exclude) or (-webkit-mask-composite: xor)){.stories-slide--ZUGze._has-border-gradient-color--xkN4Z{border-color:rgba(0,0,0,0)}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z:before{content:"";position:absolute;border-radius:inherit;box-sizing:border-box;-webkit-mask-composite:xor;mask-composite:exclude;padding:var(--storiesListBorderNotReadWidth, 2px);top:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);right:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);bottom:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);left:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);background:var(--storiesBorderNotReadGradientColor, transparent);-webkit-mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);-webkit-mask-clip:content-box,border-box;mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);mask-clip:content-box,border-box}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._is-read--O-P1j{border-color:rgba(0,0,0,0)}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._is-read--O-P1j:before{padding:var(--storiesListBorderReadWidth, 2px);top:calc(var(--storiesListBorderReadWidth, 2px)*-1);right:calc(var(--storiesListBorderReadWidth, 2px)*-1);bottom:calc(var(--storiesListBorderReadWidth, 2px)*-1);left:calc(var(--storiesListBorderReadWidth, 2px)*-1);background:var(--storiesBorderReadGradientColor, transparent);-webkit-mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);-webkit-mask-clip:content-box,border-box;mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);mask-clip:content-box,border-box}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._favorite-cell--1l8Xk{border-color:rgba(0,0,0,0)}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._favorite-cell--1l8Xk:before{padding:var(--storiesListBorderNotReadWidth, 2px);top:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);right:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);bottom:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);left:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);background:var(--storiesListCardFavoriteGradientColor, transparent);-webkit-mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);-webkit-mask-clip:content-box,border-box;mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);mask-clip:content-box,border-box}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._ugc-cell--f8S1f{border-color:rgba(0,0,0,0)}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._ugc-cell--f8S1f:before{padding:var(--storiesListBorderNotReadWidth, 2px);top:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);right:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);bottom:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);left:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);background:var(--storiesListCardUgcGradientColor, transparent);-webkit-mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);-webkit-mask-clip:content-box,border-box;mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);mask-clip:content-box,border-box}}',""]),s.locals={"stories-slide-wrapper":"stories-slide-wrapper--aVM+1","stories-slide":"stories-slide--ZUGze","_format-quad":"_format-quad--jf7N7","_format-rectangle":"_format-rectangle--Kqy8x","stories-slide-image":"stories-slide-image--E2w7f","stories-slide-image__image":"stories-slide-image__image--viK-T","stories-slide__mask":"stories-slide__mask--Ra85s","stories-slide__content":"stories-slide__content--GZM3d","_is-read":"_is-read--O-P1j",isTitleCardOutsideTop:"isTitleCardOutsideTop--rgyxL",isTitleCardOutsideBottom:"isTitleCardOutsideBottom--9w6eu","stories-slide__inner":"stories-slide__inner--jP7d2","_background-color-black":"_background-color-black--LzoGN","_background-color-white":"_background-color-white--cCu4O","_background-color-red":"_background-color-red--oS-Gd","_background-color-yellow":"_background-color-yellow--hVzqv","_background-color-green":"_background-color-green--hQFmN","_background-color-violet":"_background-color-violet--D+STO","_background-color-blue":"_background-color-blue--GkTxq","_background-color-grey":"_background-color-grey--qU8eo","_background-color-black-gradient":"_background-color-black-gradient--I75n4","_background-color-white-gradient":"_background-color-white-gradient--yfwk7","_background-color-red-gradient":"_background-color-red-gradient--i3Awy","_background-color-yellow-gradient":"_background-color-yellow-gradient--c89UQ","_background-color-green-gradient":"_background-color-green-gradient--3TGxB","_background-color-violet-gradient":"_background-color-violet-gradient--JAdS3","_background-color-blue-gradient":"_background-color-blue-gradient--qKJCa","_background-color-grey-gradient":"_background-color-grey-gradient--4+MvA","stories-slide-image__wrap":"stories-slide-image__wrap--jAg55",_mode_list:"_mode_list--dkBpg","ugc-card-cell":"ugc-card-cell--Ybjtv","video-loaded":"video-loaded--CLBMu","_ugc-cell":"_ugc-cell--f8S1f",__position_outside_top:"__position_outside_top--en7U6",__position_outside_bottom:"__position_outside_bottom--X5wOp",clamp:"clamp--1Awvg","stories-slide__title":"stories-slide__title--PDoTn","align-left":"align-left--835Gu","align-center":"align-center--5jKkF","align-right":"align-right--Pfrzc","_format-circle":"_format-circle--prePc","_favorite-cell":"_favorite-cell--1l8Xk","favorite-images-wrapper":"favorite-images-wrapper--+i2pB","_has-drop-shadow":"_has-drop-shadow--2LySa","_has-card-svg-mask":"_has-card-svg-mask--17djB","card-overlay-svg-mask":"card-overlay-svg-mask--PoiQW","_has-border-gradient-color":"_has-border-gradient-color--xkN4Z"};const n=s},1980:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-list-controls--PIqE6{pointer-events:none}.stories-list-controls--PIqE6 .control-start--0L66N,.stories-list-controls--PIqE6 .control-end--rFrlW{cursor:pointer;position:absolute;background-color:var(--storiesListControlsBackgroundColor, white);border-radius:50%;z-index:10;height:var(--storiesListControlsSize);width:var(--storiesListControlsSize);top:50%;display:flex;justify-content:center;align-items:center;pointer-events:all}.stories-list-controls--PIqE6 .control-icon--9JIpq{width:7px;height:12px;background-color:var(--storiesListControlsColor, black)}.stories-list-controls--PIqE6.horizontal---4ee9 .control-start--0L66N{left:0;transform:translateY(-50%)}.stories-list-controls--PIqE6.horizontal---4ee9 .control-start--0L66N.control-start_dir_rtl--HAuqS{left:auto;right:0}.stories-list-controls--PIqE6.horizontal---4ee9 .control-end--rFrlW{right:0;transform:translateY(-50%)}.stories-list-controls--PIqE6.horizontal---4ee9 .control-end--rFrlW.control-end_dir_rtl--qq6Cs{left:0;right:auto}.stories-list-controls--PIqE6.vertical--fd6vu .control-start--0L66N{top:var(--storiesListTopPadding, 0);left:50%;transform:translate3d(-50%, 0, 0) rotate(90deg)}.stories-list-controls--PIqE6.vertical--fd6vu .control-end--rFrlW{top:auto;bottom:var(--storiesListBottomPadding, 0);right:50%;transform:translate3d(50%, 0, 0) rotate(90deg)}.stories-list-controls--PIqE6 .control-start--0L66N .control-icon--9JIpq{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 11L1 6L6 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 11L1 6L6 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")}.stories-list-controls--PIqE6 .control-end--rFrlW .control-icon--9JIpq{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 11L6 6L1 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 11L6 6L1 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")}",""]),s.locals={"stories-list-controls":"stories-list-controls--PIqE6","control-start":"control-start--0L66N","control-end":"control-end--rFrlW","control-icon":"control-icon--9JIpq",horizontal:"horizontal---4ee9","control-start_dir_rtl":"control-start_dir_rtl--HAuqS","control-end_dir_rtl":"control-end_dir_rtl--qq6Cs",vertical:"vertical--fd6vu"};const n=s},827:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".slider3d__btn_next--4Wkfq,.slider3d__btn_prev--jX6Zb{display:none}._desktop_mode--uyGyi .slider3d__btn_next--4Wkfq,._desktop_mode--uyGyi .slider3d__btn_prev--jX6Zb{display:block;position:absolute;top:50%;transform:translateY(-50%);left:50%}.btn-icon--anih0{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:rgba(0,0,0,0);border:none;color:#fff;cursor:pointer}.btn-icon--anih0:focus{outline:0}.btn-icon--anih0:disabled{color:#464646;cursor:not-allowed}",""]),s.locals={slider3d__btn_next:"slider3d__btn_next--4Wkfq",slider3d__btn_prev:"slider3d__btn_prev--jX6Zb",_desktop_mode:"_desktop_mode--uyGyi","btn-icon":"btn-icon--anih0"};const n=s},1239:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-viewer--4fkyX{position:fixed;z-index:1100;top:0;left:0;width:100%;height:100%;display:block;transition:opacity .3s ease;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.stories-viewer--4fkyX:-webkit-full-screen,.stories-viewer--4fkyX:-moz-full-screen,.stories-viewer--4fkyX:-ms-fullscreen,.stories-viewer--4fkyX :fullscreen{width:100% !important;height:100% !important}.stories-viewer-background--VIoup{position:fixed;top:-60px;left:-60px;width:calc(100% + 120px);height:calc(100% + 120px);background-position:center;background-repeat:no-repeat;background-size:cover}.stories-viewer-backdrop---yMm9{position:fixed;top:0;right:0;bottom:0;left:0;z-index:11;background-color:rgba(255,255,255,.5)}.stories-viewer-backdrop---yMm9._desktopMode--wpoLG{display:none}.slider3d--mD8T8{position:fixed !important}.slider3d--mD8T8.no-select--DtR2G{user-select:none}",""]),s.locals={"stories-viewer":"stories-viewer--4fkyX","stories-viewer-background":"stories-viewer-background--VIoup","stories-viewer-backdrop":"stories-viewer-backdrop---yMm9",_desktopMode:"_desktopMode--wpoLG",slider3d:"slider3d--mD8T8","no-select":"no-select--DtR2G"};const n=s},9322:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-button-panel--SCzyq{position:absolute;z-index:10001;bottom:0;left:0;width:100%;background-color:#000;border-bottom-left-radius:var(--slideBorderRadius, 0);border-bottom-right-radius:var(--slideBorderRadius, 0)}.stories-button-panel--SCzyq[dir=rtl] .stories-button-panel-actions--aacxy .right-container--DEzuh{margin-left:0;margin-right:auto}.stories-button-panel-actions--aacxy{position:absolute;top:0;left:0;width:100%;height:50px;padding:0 4px;display:flex;flex-direction:row;color:#fff;align-items:center}.stories-button-panel-actions--aacxy>span{display:flex}.stories-button-panel-actions--aacxy .right-container--DEzuh{margin-left:auto}.button-panel-action--q6w4I{cursor:pointer;pointer-events:all;display:flex;align-items:center;justify-content:center;height:50px;width:38px}.button-panel-action--q6w4I>*{pointer-events:none}",""]),s.locals={"stories-button-panel":"stories-button-panel--SCzyq","stories-button-panel-actions":"stories-button-panel-actions--aacxy","right-container":"right-container--DEzuh","button-panel-action":"button-panel-action--q6w4I"};const n=s},2843:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".goods-container--q3jcO{position:absolute;inset:0;z-index:3000}",""]),s.locals={"goods-container":"goods-container--q3jcO"};const n=s},2208:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-viewer__close---ZGke{border:0;padding:0;background:rgba(0,0,0,0);position:absolute;top:calc(15px + var(--timelineBlockTopOffset, 5px));pointer-events:all;cursor:pointer;outline:none;transition:opacity .3s ease-in;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.stories-viewer__close---ZGke:focus{outline:none}.stories-viewer__close---ZGke svg{overflow:visible}.stories-viewer__close---ZGke._paused-ui--\\+yY54{opacity:0}.stories-viewer__close---ZGke[data-position=start],.stories-viewer__close---ZGke[data-position=left]{left:10px}.stories-viewer__close---ZGke[data-position=start][dir=rtl],.stories-viewer__close---ZGke[data-position=left][dir=rtl]{left:auto;right:10px}.stories-viewer__close---ZGke[data-position=end],.stories-viewer__close---ZGke[data-position=right]{right:10px}.stories-viewer__close---ZGke[data-position=end][dir=rtl],.stories-viewer__close---ZGke[data-position=right][dir=rtl]{left:10px;right:auto}.story-header--oupRd{position:relative;z-index:1140}",""]),s.locals={"stories-viewer__close":"stories-viewer__close---ZGke","_paused-ui":"_paused-ui--+yY54","story-header":"story-header--oupRd"};const n=s},5196:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-pager--g2Xmx{position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;z-index:1131;background-image:linear-gradient(180deg, rgba(0, 0, 0, 0.104) 0%, rgba(0, 0, 0, 0) 20%);pointer-events:none;transition:opacity .3s ease-in}.stories-pager--g2Xmx._desktop-mode--Uv8uD{border-top-left-radius:5px;border-top-right-radius:5px}.stories-pager--g2Xmx._paused-ui--OaHJ\\+{opacity:0}.stories-pager__ticks--qsxTP{height:3px;display:flex;margin:8px 8px;margin-top:var(--timelineBlockTopOffset, 8px);opacity:1}.stories-pager__ticks--qsxTP.hiddenTimeline--j8OH3{opacity:0}.stories-pager__tick--Po3p4{background-color:rgba(255,255,255,.6);width:100%;margin:0 2px;overflow:hidden;position:relative;border-radius:10px}.stories-pager__tick--Po3p4:first-child{margin-left:0}.stories-pager__tick--Po3p4:last-child{margin-right:0}.stories-pager__tick-progress--SGN1\\+{width:100%;height:3px}.stories-pager__tick-progress--SGN1\\+._active--z6a-V{background-color:#fff}.stories-pager__tick-progress-loader--zGfrP{width:100%;height:3px;position:absolute;top:0;left:0;background:linear-gradient(to right, rgb(255, 255, 255) var(--tick), transparent 0)}.stories-pager--g2Xmx[dir=rtl] .stories-pager__tick-progress-loader--zGfrP{background:linear-gradient(to left, rgb(255, 255, 255) var(--tick), transparent 0)}",""]),s.locals={"stories-pager":"stories-pager--g2Xmx","_desktop-mode":"_desktop-mode--Uv8uD","_paused-ui":"_paused-ui--OaHJ+","stories-pager__ticks":"stories-pager__ticks--qsxTP",hiddenTimeline:"hiddenTimeline--j8OH3","stories-pager__tick":"stories-pager__tick--Po3p4","stories-pager__tick-progress":"stories-pager__tick-progress--SGN1+",_active:"_active--z6a-V","stories-pager__tick-progress-loader":"stories-pager__tick-progress-loader--zGfrP"};const n=s},9485:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.stories-slide--q9VWO{top:0;left:0;right:0;bottom:0;position:absolute;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:var(--slideBorderRadius, 0)}.stories-slide--q9VWO._dummy--nHvZB{background-color:#fff}.stories-slide--q9VWO .load-mask--ZMb\\+b{position:absolute;background-color:#000;z-index:2000;top:0;bottom:0;left:0;right:0;display:flex;justify-content:center;align-items:center}.stories-slide--q9VWO._with-bottom-panel--SpzAH._desktop-mode--qLP7s,.stories-slide--q9VWO._with-bottom-panel--SpzAH._desktop-mode--qLP7s .narrative-slide-background--VJv7a,.stories-slide--q9VWO._with-bottom-panel--SpzAH._desktop-mode--qLP7s .narrative-slide-elements--X3ZwO{border-bottom-right-radius:0;border-bottom-left-radius:0}.loading-spinner-default--5ZaBK{-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--6vLEc .6s infinite linear;animation:loading-spinner--6vLEc .6s infinite linear}@keyframes loading-spinner--6vLEc{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.stories-slide--q9VWO{z-index:1100}.stories-slide--q9VWO._position_1--e8VEN{z-index:1130}.stories-slide--q9VWO._position_2--mXClB{z-index:1120}.stories-slide-offset--jyuN0{pointer-events:none;position:relative;height:100%}.stories-slide-box--B9o8s{position:relative;padding:154.838709677% 0 0 0}.stories-slide-content--4HRnN{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}',""]),s.locals={"stories-slide":"stories-slide--q9VWO",_dummy:"_dummy--nHvZB","load-mask":"load-mask--ZMb+b","_with-bottom-panel":"_with-bottom-panel--SpzAH","_desktop-mode":"_desktop-mode--qLP7s","narrative-slide-background":"narrative-slide-background--VJv7a","narrative-slide-elements":"narrative-slide-elements--X3ZwO","loading-spinner-default":"loading-spinner-default--5ZaBK","loading-spinner":"loading-spinner--6vLEc",_position_1:"_position_1--e8VEN",_position_2:"_position_2--mXClB","stories-slide-offset":"stories-slide-offset--jyuN0","stories-slide-box":"stories-slide-box--B9o8s","stories-slide-content":"stories-slide-content--4HRnN"};const n=s},6349:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-item--eRGlp{visibility:visible;position:absolute;width:100%;height:auto;bottom:0;border-radius:inherit;backface-visibility:hidden}.slider3d__item--\\+4QeZ{position:absolute;left:0;top:0;width:100%;backface-visibility:hidden;transform-style:preserve-3d}",""]),s.locals={"stories-item":"stories-item--eRGlp",slider3d__item:"slider3d__item--+4QeZ"};const n=s},417:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".slider3d__wrapper--YC5-I{left:50%;transform:translateX(-50%);overflow:hidden;box-sizing:border-box}.slider3d__wrapper--YC5-I.slider3d__wrapper_swipe-up--Yv\\+U6.slider3d__wrapper_swipe-up--Yv\\+U6{background-color:rgba(0,0,0,0)}.slider3d__wrapper--YC5-I .game-reader-wrapper--0Rcrg,.slider3d__wrapper--YC5-I .share-panel-wrapper--sCLxf{overflow:hidden}.slider3d__wrapper--YC5-I._desktop_mode--DxFXS{padding:50px 0}.slider3d__wrapper--YC5-I._desktop_mode--DxFXS>.share-panel-wrapper--sCLxf{top:50px;bottom:50px;border-radius:5px}.slider3d__wrapper--YC5-I._desktop_mode--DxFXS>.share-panel-wrapper--sCLxf.share-panel-wrapper--sCLxf{border-bottom-left-radius:0;border-bottom-right-radius:0}.slider3d__wrapper--YC5-I *,.slider3d__wrapper--YC5-I ::after,.slider3d__wrapper--YC5-I ::before{box-sizing:border-box}.slider3d__wrapper--YC5-I .stories-item--ogpUG,.slider3d__wrapper--YC5-I .stories-slide--k2\\+mz,.slider3d__wrapper--YC5-I .narrative-slide-background--\\+K5pl,.slider3d__wrapper--YC5-I .narrative-slide-elements--CcHGt{border-radius:var(--slideBorderRadius, 0)}.slider3d--GoDJO{position:fixed !important}.slider3d--GoDJO.no-select--A4lKf{user-select:none}.slider3d__wrapper--YC5-I{z-index:1;position:relative;height:100%}.stories-face--DhzSl{position:absolute !important;top:0;left:0;right:0;width:100%;width:calc(100% + .01px);height:100%}.slider3d__rotater--sf46d{--tick: 0%;--tickOpacity: 0}.slider3d__inner--7opZa,.slider3d__rotater--sf46d{position:relative;height:100%;transform-style:preserve-3d}",""]),s.locals={slider3d__wrapper:"slider3d__wrapper--YC5-I","slider3d__wrapper_swipe-up":"slider3d__wrapper_swipe-up--Yv+U6","game-reader-wrapper":"game-reader-wrapper--0Rcrg","share-panel-wrapper":"share-panel-wrapper--sCLxf",_desktop_mode:"_desktop_mode--DxFXS","stories-item":"stories-item--ogpUG","stories-slide":"stories-slide--k2+mz","narrative-slide-background":"narrative-slide-background--+K5pl","narrative-slide-elements":"narrative-slide-elements--CcHGt",slider3d:"slider3d--GoDJO","no-select":"no-select--A4lKf","stories-face":"stories-face--DhzSl",slider3d__rotater:"slider3d__rotater--sf46d",slider3d__inner:"slider3d__inner--7opZa"};const n=s},2372:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.wrapper--FSy6K{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";position:absolute;inset:0;z-index:3000;border-radius:inherit}.wrapper--FSy6K .backdrop--WK6JL{display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.5);border-radius:inherit}.main--CNCI0{position:absolute;z-index:2;user-select:none;display:flex;flex-direction:column;text-rendering:geometricprecision;overflow:hidden}.main--CNCI0 .question--pbdpA{width:100%;height:auto}.main--CNCI0 .question--pbdpA:empty{display:none}.main--CNCI0 .input-group--z2bKl{display:flex}.main--CNCI0 .input-group--z2bKl .input--SQayn{width:100%}.main--CNCI0 .input-group--z2bKl .input-group__prepend--mYrcE{display:flex;flex:.35}.main--CNCI0 .input-group--z2bKl .input-group__separator--2fDEy{border-right:1px solid #fff;margin-right:.5rem}.main--CNCI0 .input-group--z2bKl .input--SQayn{flex:1}.main--CNCI0 .input-wrapper--tPiNs{overflow:hidden;box-sizing:content-box;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.main--CNCI0 .input-wrapper--tPiNs .input--SQayn{background:none;-webkit-tap-highlight-color:rgba(0,0,0,0);text-rendering:inherit;outline:none;border:none}.main--CNCI0 .input-wrapper--tPiNs .input--SQayn::placeholder{color:inherit}.main--CNCI0 .input-wrapper--tPiNs .input--SQayn.input_centered--3I7po{text-align:center}.main--CNCI0 .input-wrapper--tPiNs.is-invalid--Un0Xg{border-color:#dc3545 !important;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.textarea-grow-wrap--CES2v{display:grid;max-width:100%;word-break:break-all}.textarea-grow-wrap--CES2v::after{content:attr(data-replicated-value) " ";white-space:pre-wrap;visibility:hidden}.textarea-grow-wrap--CES2v>.input--SQayn{resize:none;overflow:hidden}.textarea-grow-wrap--CES2v>.input--SQayn,.textarea-grow-wrap--CES2v::after{border:inherit;padding:inherit;font:inherit;text-rendering:inherit;text-align:inherit;line-height:normal;color:inherit;grid-area:1/1/2/2}.button-wrapper--dC7kk{width:100%}.button-wrapper--dC7kk .button--gURik{width:100%;cursor:pointer}.button-wrapper--dC7kk .button--gURik:disabled,.button-wrapper--dC7kk .button--gURik[disabled=true]{cursor:not-allowed;pointer-events:none;background-color:#272727 !important}@keyframes fadeIn--WL4XY{from{opacity:0}to{opacity:1}}@keyframes fadeOut--iRp81{from{opacity:1}to{opacity:0}}.fadeIn--WL4XY{animation:fadeIn--WL4XY 300ms forwards}.fadeOut--iRp81{animation:fadeOut--iRp81 0ms forwards}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}',""]),s.locals={wrapper:"wrapper--FSy6K",backdrop:"backdrop--WK6JL",main:"main--CNCI0",question:"question--pbdpA","input-group":"input-group--z2bKl",input:"input--SQayn","input-group__prepend":"input-group__prepend--mYrcE","input-group__separator":"input-group__separator--2fDEy","input-wrapper":"input-wrapper--tPiNs",input_centered:"input_centered--3I7po","is-invalid":"is-invalid--Un0Xg","textarea-grow-wrap":"textarea-grow-wrap--CES2v","button-wrapper":"button-wrapper--dC7kk",button:"button--gURik",fadeIn:"fadeIn--WL4XY",fadeOut:"fadeOut--iRp81"};const n=s},3639:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.screen-orientation-lock--4vxfS{pointer-events:all;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;z-index:1;user-select:none;background-position:center center;background-size:cover;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTc2MiIgaGVpZ2h0PSI4MjkiIHZpZXdCb3g9IjAgMCAxNzYyIDgyOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxyZWN0IHdpZHRoPSIxNzYyIiBoZWlnaHQ9IjgyOSIgZmlsbD0iIzIxMjEyMSIvPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02NjYgNTQ5QzY2MS41ODIgNTQ5IDY1OCA1NDUuNDE4IDY1OCA1NDFMNjU4IDM0OUM2NTggMzQ0LjU4MiA2NjEuNTgyIDM0MSA2NjYgMzQxTDk5NCAzNDFDOTk4LjQxOCAzNDEgMTAwMiAzNDQuNTgyIDEwMDIgMzQ5TDEwMDIgNTQxQzEwMDIgNTQ1LjQxOCA5OTguNDE4IDU0OSA5OTQgNTQ5TDY2NiA1NDlaTTY2OCA1NDFMOTYyIDU0MUw5NjIgMzQ5TDY2OCAzNDlMNjY4IDU0MVoiIGZpbGw9IiMzRjNGM0YiLz4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTAwIDIxNEM5MDAgMjA5LjU4MiA5MDMuNTgyIDIwNiA5MDggMjA2SDExMDBDMTEwNC40MiAyMDYgMTEwOCAyMDkuNTgyIDExMDggMjE0VjU0MkMxMTA4IDU0Ni40MTggMTEwNC40MiA1NTAgMTEwMCA1NTBIOTA4QzkwMy41ODIgNTUwIDkwMCA1NDYuNDE4IDkwMCA1NDJWMjE0Wk05MDggMjE2VjUxMEgxMTAwVjIxNkg5MDhaIiBmaWxsPSJ3aGl0ZSIvPg0KPHBhdGggZD0iTTgwMy41IDIxNkM3NTggMjIwLjUgNzEzLjUgMjU3IDcxNyAzMTcuNUM3MjEgMjc4IDc1OCAyMzcuNSA4MDMuNSAyNDIuNVYyNjRMODQ1LjUgMjI5TDgwMy41IDE5NS41VjIxNloiIGZpbGw9IndoaXRlIi8+DQo8L3N2Zz4=")}',""]),s.locals={"screen-orientation-lock":"screen-orientation-lock--4vxfS"};const n=s},7231:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".share-panel__body_screenshot--\\+-VL3{display:flex;flex-direction:column}.share-panel__body_screenshot--\\+-VL3 .share-panel-row--7dNdh{justify-content:center}.share-panel__body_screenshot--\\+-VL3 .share-panel-row--7dNdh:first-child{flex:0 0 450px;padding:1rem;box-sizing:border-box}.share-panel__body_screenshot--\\+-VL3 .share-panel-row--7dNdh:last-child{flex-basis:50px;padding:0}.share-panel__body_screenshot--\\+-VL3 .share-panel-row__image-link--Islxp{width:100%;height:100%;display:flex;justify-content:center}.share-panel__body_screenshot--\\+-VL3 .share-panel-row__image--fk\\+wi{max-width:100%;height:100%;object-fit:cover;border-radius:20px}.share-panel__body_screenshot--\\+-VL3 .share-item__download-button--gMuRx{align-self:center;cursor:pointer;height:100%;width:100%;text-decoration:none;color:#fff;display:flex;align-items:center;justify-content:center}",""]),s.locals={"share-panel__body_screenshot":"share-panel__body_screenshot--+-VL3","share-panel-row":"share-panel-row--7dNdh","share-panel-row__image-link":"share-panel-row__image-link--Islxp","share-panel-row__image":"share-panel-row__image--fk+wi","share-item__download-button":"share-item__download-button--gMuRx"};const n=s},9749:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".share-item--8FmHt{color:#fff}.social-list--5g9js{flex-wrap:wrap;height:auto;padding-bottom:1rem}.social-list--5g9js .social-list__item--UG-g9{margin-top:1rem}",""]),s.locals={"share-item":"share-item--8FmHt","social-list":"social-list--5g9js","social-list__item":"social-list__item--UG-g9"};const n=s},5839:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.share-panel-wrapper--dn9M6{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";position:absolute;top:0;left:0;right:0;bottom:0;z-index:2}.share-panel-wrapper--dn9M6 .share-panel-backdrop--MgwuI{display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.5)}.share-panel--yVlOc{position:absolute;top:auto;left:0;right:0;bottom:0;z-index:2;user-select:none}.share-panel-row--deDQ6{width:100%;height:150px;display:flex;flex-direction:row;align-items:center}.share-panel-row--deDQ6 .share-item--dKU92{cursor:pointer;flex:0 0 auto;width:69px;height:90px;margin:0 10px;display:flex;flex-direction:column;align-items:center;text-align:center}.share-panel-row--deDQ6 .share-item--dKU92:first-child{margin-left:20px}.share-panel-row--deDQ6 .share-item--dKU92:last-child{margin-right:20px}.share-panel-row--deDQ6 .share-item--dKU92,.share-panel-row--deDQ6 .share-item--dKU92:visited,.share-panel-row--deDQ6 .share-item--dKU92:active,.share-panel-row--deDQ6 .share-item--dKU92:focus{text-decoration:none}.share-panel-row--deDQ6 .share-item--dKU92 .share-item-title--DzDoA{margin-top:20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:.2rem}.share-panel-row--deDQ6.title-row--\\+CIE7{height:120px;padding-top:30px;padding-bottom:30px;padding-left:20px;padding-right:20px}.share-panel-row--deDQ6.title-row--\\+CIE7 .share-url-favicon--lcC7\\+{width:60px;height:60px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.share-panel-row--deDQ6.title-row--\\+CIE7 .share-url-favicon--lcC7\\+ img{width:30px;height:30px}.share-panel-row--deDQ6.title-row--\\+CIE7 .title--vZjLV{font-size:16px;line-height:1.4rem;margin-left:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.share-panel-separator--iqGC0{width:100%;height:1px}.share-panel--yVlOc{will-change:transform;transition:transform 300ms}.share-panel__body--Jik8H{width:100%;height:100%}@keyframes slideIn--EfZ6a{from{transform:translateY(100%)}to{transform:translateY(0%)}}@keyframes slideOut--1goeU{from{transform:translateY(0%)}to{transform:translateY(100%)}}@keyframes fadeIn--ebk1h{from{opacity:0}to{opacity:1}}@keyframes fadeOut--5l1DQ{from{opacity:1}to{opacity:0}}.fadeIn--ebk1h{animation:fadeIn--ebk1h 300ms forwards}.fadeOut--5l1DQ{animation:fadeOut--5l1DQ 300ms forwards}.slideIn--EfZ6a{animation:slideIn--EfZ6a 300ms forwards}.slideOut--1goeU{animation:slideOut--1goeU 300ms forwards}',""]),s.locals={"share-panel-wrapper":"share-panel-wrapper--dn9M6","share-panel-backdrop":"share-panel-backdrop--MgwuI","share-panel":"share-panel--yVlOc","share-panel-row":"share-panel-row--deDQ6","share-item":"share-item--dKU92","share-item-title":"share-item-title--DzDoA","title-row":"title-row--+CIE7","share-url-favicon":"share-url-favicon--lcC7+",title:"title--vZjLV","share-panel-separator":"share-panel-separator--iqGC0","share-panel__body":"share-panel__body--Jik8H",fadeIn:"fadeIn--ebk1h",fadeOut:"fadeOut--5l1DQ",slideIn:"slideIn--EfZ6a",slideOut:"slideOut--1goeU"};const n=s},8624:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-link{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-link *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-quiz-answer{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-quiz-answer *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-data-input{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-data-input *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-range-slider-input-container .rangeslider{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-poll-button{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-poll-button *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-vote-answer{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-vote-answer *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-rate-input{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-rate-input *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-range-slider-next-button{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-range-slider-next-button *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-test-answer{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-test-answer *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-quiz-next-button,.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-test-next-button{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-quiz-next-button *,.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-test-next-button *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-copy{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-copy *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-share{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-share *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-story-repeat{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-story-repeat *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-game{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-game *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-image[data-link-target],.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-image[data-link-type=closeStory]{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-image[data-link-target] *,.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-image[data-link-type=closeStory] *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-swipe-up{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-swipe-up *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-swipe-up-items{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-swipe-up-items *{pointer-events:none}",""]);const n=s},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,r){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(r)for(var n=0;n<this.length;n++){var o=this[n][0];null!=o&&(s[o]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);r&&s[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},2743:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function s(e,t,i){return e.concat(t).map((function(e){return r(e,i)}))}function n(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,i){var s={};return i.isMergeableObject(e)&&n(e).forEach((function(t){s[t]=r(e[t],i)})),n(t).forEach((function(n){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,n)||(o(e,n)&&i.isMergeableObject(t[n])?s[n]=function(e,t){if(!t.customMerge)return l;var i=t.customMerge(e);return"function"==typeof i?i:l}(n,i)(e[n],t[n],i):s[n]=r(t[n],i))})),s}function l(e,i,n){(n=n||{}).arrayMerge=n.arrayMerge||s,n.isMergeableObject=n.isMergeableObject||t,n.cloneUnlessOtherwiseSpecified=r;var o=Array.isArray(i);return o===Array.isArray(e)?o?n.arrayMerge(e,i,n):a(e,i,n):r(i,n)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,i){return l(e,i,t)}),{})};var d=l;e.exports=d},46:e=>{"use strict";var t,i="object"==typeof Reflect?Reflect:null,r=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}e.exports=n,e.exports.once=function(e,t){return new Promise((function(i,r){function s(i){e.removeListener(t,n),r(i)}function n(){"function"==typeof e.removeListener&&e.removeListener("error",s),i([].slice.call(arguments))}g(e,t,n,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&g(e,"error",t,i)}(e,s,{once:!0})}))},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var o=10;function a(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?n.defaultMaxListeners:e._maxListeners}function d(e,t,i,r){var s,n,o,d;if(a(i),void 0===(n=e._events)?(n=e._events=Object.create(null),e._eventsCount=0):(void 0!==n.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),n=e._events),o=n[t]),void 0===o)o=n[t]=i,++e._eventsCount;else if("function"==typeof o?o=n[t]=r?[i,o]:[o,i]:r?o.unshift(i):o.push(i),(s=l(e))>0&&o.length>s&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,d=c,console&&console.warn&&console.warn(d)}return e}function c(){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,i){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},s=c.bind(r);return s.listener=i,r.wrapFn=s,s}function h(e,t,i){var r=e._events;if(void 0===r)return[];var s=r[t];return void 0===s?[]:"function"==typeof s?i?[s.listener||s]:[s]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(s):f(s,s.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(e,t){for(var i=new Array(t),r=0;r<t;++r)i[r]=e[r];return i}function g(e,t,i,r){if("function"==typeof e.on)r.once?e.once(t,i):e.on(t,i);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 s(n){r.once&&e.removeEventListener(t,s),i(n)}))}}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),n.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},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(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},n.prototype.getMaxListeners=function(){return l(this)},n.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var s="error"===e,n=this._events;if(void 0!==n)s=s&&void 0===n.error;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=n[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var d=l.length,c=f(l,d);for(i=0;i<d;++i)r(c[i],this,t)}return!0},n.prototype.addListener=function(e,t){return d(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return d(this,e,t,!0)},n.prototype.once=function(e,t){return a(t),this.on(e,u(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,u(this,e,t)),this},n.prototype.removeListener=function(e,t){var i,r,s,n,o;if(a(t),void 0===(r=this._events))return this;if(void 0===(i=r[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(s=-1,n=i.length-1;n>=0;n--)if(i[n]===t||i[n].listener===t){o=i[n].listener,s=n;break}if(s<0)return this;0===s?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,s),1===i.length&&(r[e]=i[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,i,r;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var s,n=Object.keys(i);for(r=0;r<n.length;++r)"removeListener"!==(s=n[r])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},n.prototype.listeners=function(e){return h(this,e,!0)},n.prototype.rawListeners=function(e){return h(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},n.prototype.listenerCount=p,n.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},5985:(e,t,i)=>{"use strict";var r=i(524),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?o:a[e.$$typeof]||s}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=o;var d=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,i,r){if("string"!=typeof i){if(f){var s=p(i);s&&s!==f&&e(t,s,r)}var o=c(i);u&&(o=o.concat(u(i)));for(var a=l(t),g=l(i),v=0;v<o.length;++v){var m=o[v];if(!(n[m]||r&&r[m]||g&&g[m]||a&&a[m])){var y=h(i,m);try{d(t,m,y)}catch(e){}}}}return t}},3103:(e,t,i)=>{var r=i(4715)(i(8942),"DataView");e.exports=r},5098:(e,t,i)=>{var r=i(3305),s=i(9361),n=i(1112),o=i(5276),a=i(7452);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=s,l.prototype.get=n,l.prototype.has=o,l.prototype.set=a,e.exports=l},1386:(e,t,i)=>{var r=i(2393),s=i(2049),n=i(7144),o=i(5071),a=i(3964);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=s,l.prototype.get=n,l.prototype.has=o,l.prototype.set=a,e.exports=l},9770:(e,t,i)=>{var r=i(4715)(i(8942),"Map");e.exports=r},8250:(e,t,i)=>{var r=i(9753),s=i(5681),n=i(88),o=i(4732),a=i(9068);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=s,l.prototype.get=n,l.prototype.has=o,l.prototype.set=a,e.exports=l},9413:(e,t,i)=>{var r=i(4715)(i(8942),"Promise");e.exports=r},4512:(e,t,i)=>{var r=i(4715)(i(8942),"Set");e.exports=r},3212:(e,t,i)=>{var r=i(8250),s=i(1877),n=i(8006);function o(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new r;++t<i;)this.add(e[t])}o.prototype.add=o.prototype.push=s,o.prototype.has=n,e.exports=o},5650:(e,t,i)=>{var r=i(8942).Symbol;e.exports=r},9270:(e,t,i)=>{var r=i(4715)(i(8942),"WeakMap");e.exports=r},9756:(e,t,i)=>{var r=i(2478);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},3316:e=>{e.exports=function(e,t,i){for(var r=-1,s=null==e?0:e.length;++r<s;)if(i(t,e[r]))return!0;return!1}},1129:e=>{e.exports=function(e,t){for(var i=-1,r=t.length,s=e.length;++i<r;)e[s+i]=t[i];return e}},7034:(e,t,i)=>{var r=i(6285);e.exports=function(e,t){for(var i=e.length;i--;)if(r(e[i][0],t))return i;return-1}},7250:e=>{e.exports=function(e,t,i,r){for(var s=e.length,n=i+(r?1:-1);r?n--:++n<s;)if(t(e[n],n,e))return n;return-1}},313:(e,t,i)=>{var r=i(1129),s=i(714);e.exports=function e(t,i,n,o,a){var l=-1,d=t.length;for(n||(n=s),a||(a=[]);++l<d;){var c=t[l];i>0&&n(c)?i>1?e(c,i-1,n,o,a):r(a,c):o||(a[a.length]=c)}return a}},7379:(e,t,i)=>{var r=i(5650),s=i(8870),n=i(9005),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?s(e):n(e)}},2478:(e,t,i)=>{var r=i(7250),s=i(9454),n=i(7706);e.exports=function(e,t,i){return t==t?n(e,t,i):r(e,s,i)}},6027:(e,t,i)=>{var r=i(7379),s=i(547);e.exports=function(e){return s(e)&&"[object Arguments]"==r(e)}},9454:e=>{e.exports=function(e){return e!=e}},9624:(e,t,i)=>{var r=i(3655),s=i(4759),n=i(1580),o=i(4066),a=/^\[object .+?Constructor\]$/,l=Function.prototype,d=Object.prototype,c=l.toString,u=d.hasOwnProperty,h=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!n(e)||s(e))&&(r(e)?h:a).test(o(e))}},674:(e,t,i)=>{var r=i(7379),s=i(5387),n=i(547),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return n(e)&&s(e.length)&&!!o[r(e)]}},195:(e,t,i)=>{var r=i(4882),s=i(8121),n=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return s(e);var t=[];for(var i in Object(e))n.call(e,i)&&"constructor"!=i&&t.push(i);return t}},6403:(e,t,i)=>{var r=i(2945),s=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(s,""):e}},9460:e=>{e.exports=function(e){return function(t){return e(t)}}},5630:(e,t,i)=>{var r=i(3212),s=i(9756),n=i(3316),o=i(5568),a=i(6208),l=i(9828);e.exports=function(e,t,i){var d=-1,c=s,u=e.length,h=!0,p=[],f=p;if(i)h=!1,c=n;else if(u>=200){var g=t?null:a(e);if(g)return l(g);h=!1,c=o,f=new r}else f=t?[]:p;e:for(;++d<u;){var v=e[d],m=t?t(v):v;if(v=i||0!==v?v:0,h&&m==m){for(var y=f.length;y--;)if(f[y]===m)continue e;t&&f.push(m),p.push(v)}else c(f,m,i)||(f!==p&&f.push(m),p.push(v))}return p}},5568:e=>{e.exports=function(e,t){return e.has(t)}},4354:e=>{e.exports=function(e,t){var i=-1,r=e.length;for(t||(t=Array(r));++i<r;)t[i]=e[i];return t}},1950:(e,t,i)=>{var r=i(8942)["__core-js_shared__"];e.exports=r},6208:(e,t,i)=>{var r=i(4512),s=i(9071),n=i(9828),o=r&&1/n(new r([,-0]))[1]==1/0?function(e){return new r(e)}:s;e.exports=o},4967:(e,t,i)=>{var r="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;e.exports=r},4700:(e,t,i)=>{var r=i(9067);e.exports=function(e,t){var i=e.__data__;return r(t)?i["string"==typeof t?"string":"hash"]:i.map}},4715:(e,t,i)=>{var r=i(9624),s=i(155);e.exports=function(e,t){var i=s(e,t);return r(i)?i:void 0}},8870:(e,t,i)=>{var r=i(5650),s=Object.prototype,n=s.hasOwnProperty,o=s.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=n.call(e,a),i=e[a];try{e[a]=void 0;var r=!0}catch(e){}var s=o.call(e);return r&&(t?e[a]=i:delete e[a]),s}},8486:(e,t,i)=>{var r=i(3103),s=i(9770),n=i(9413),o=i(4512),a=i(9270),l=i(7379),d=i(4066),c="[object Map]",u="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=d(r),v=d(s),m=d(n),y=d(o),w=d(a),S=l;(r&&S(new r(new ArrayBuffer(1)))!=f||s&&S(new s)!=c||n&&S(n.resolve())!=u||o&&S(new o)!=h||a&&S(new a)!=p)&&(S=function(e){var t=l(e),i="[object Object]"==t?e.constructor:void 0,r=i?d(i):"";if(r)switch(r){case g:return f;case v:return c;case m:return u;case y:return h;case w:return p}return t}),e.exports=S},155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},3305:(e,t,i)=>{var r=i(4497);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},9361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},1112:(e,t,i)=>{var r=i(4497),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return s.call(t,e)?t[e]:void 0}},5276:(e,t,i)=>{var r=i(4497),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:s.call(t,e)}},7452:(e,t,i)=>{var r=i(4497);e.exports=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},714:(e,t,i)=>{var r=i(5650),s=i(3283),n=i(3142),o=r?r.isConcatSpreadable:void 0;e.exports=function(e){return n(e)||s(e)||!!(o&&e&&e[o])}},9067:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4759:(e,t,i)=>{var r,s=i(1950),n=(r=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!n&&n in e}},4882:e=>{var t=Object.prototype;e.exports=function(e){var i=e&&e.constructor;return e===("function"==typeof i&&i.prototype||t)}},2393:e=>{e.exports=function(){this.__data__=[],this.size=0}},2049:(e,t,i)=>{var r=i(7034),s=Array.prototype.splice;e.exports=function(e){var t=this.__data__,i=r(t,e);return!(i<0)&&(i==t.length-1?t.pop():s.call(t,i,1),--this.size,!0)}},7144:(e,t,i)=>{var r=i(7034);e.exports=function(e){var t=this.__data__,i=r(t,e);return i<0?void 0:t[i][1]}},5071:(e,t,i)=>{var r=i(7034);e.exports=function(e){return r(this.__data__,e)>-1}},3964:(e,t,i)=>{var r=i(7034);e.exports=function(e,t){var i=this.__data__,s=r(i,e);return s<0?(++this.size,i.push([e,t])):i[s][1]=t,this}},9753:(e,t,i)=>{var r=i(5098),s=i(1386),n=i(9770);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(n||s),string:new r}}},5681:(e,t,i)=>{var r=i(4700);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},88:(e,t,i)=>{var r=i(4700);e.exports=function(e){return r(this,e).get(e)}},4732:(e,t,i)=>{var r=i(4700);e.exports=function(e){return r(this,e).has(e)}},9068:(e,t,i)=>{var r=i(4700);e.exports=function(e,t){var i=r(this,e),s=i.size;return i.set(e,t),this.size+=i.size==s?0:1,this}},4497:(e,t,i)=>{var r=i(4715)(Object,"create");e.exports=r},8121:(e,t,i)=>{var r=i(3766)(Object.keys,Object);e.exports=r},2306:(e,t,i)=>{e=i.nmd(e);var r=i(4967),s=t&&!t.nodeType&&t,n=s&&e&&!e.nodeType&&e,o=n&&n.exports===s&&r.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a},9005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3766:e=>{e.exports=function(e,t){return function(i){return e(t(i))}}},8942:(e,t,i)=>{var r=i(4967),s="object"==typeof self&&self&&self.Object===Object&&self,n=r||s||Function("return this")();e.exports=n},1877:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},8006:e=>{e.exports=function(e){return this.__data__.has(e)}},9828:e=>{e.exports=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}},7706:e=>{e.exports=function(e,t,i){for(var r=i-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}},4066:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2945:e=>{var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},4871:(e,t,i)=>{var r=i(1129),s=i(313),n=i(4354),o=i(3142);e.exports=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),i=arguments[0],a=e;a--;)t[a-1]=arguments[a];return r(o(i)?n(i):[i],s(t,1))}},2784:(e,t,i)=>{var r=i(1580),s=i(4495),n=i(6131),o=Math.max,a=Math.min;e.exports=function(e,t,i){var l,d,c,u,h,p,f=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var i=l,r=d;return l=d=void 0,f=t,u=e.apply(r,i)}function w(e){var i=e-p;return void 0===p||i>=t||i<0||v&&e-f>=c}function S(){var e=s();if(w(e))return b(e);h=setTimeout(S,function(e){var i=t-(e-p);return v?a(i,c-(e-f)):i}(e))}function b(e){return h=void 0,m&&l?y(e):(l=d=void 0,u)}function _(){var e=s(),i=w(e);if(l=arguments,d=this,p=e,i){if(void 0===h)return function(e){return f=e,h=setTimeout(S,t),g?y(e):u}(p);if(v)return clearTimeout(h),h=setTimeout(S,t),y(p)}return void 0===h&&(h=setTimeout(S,t)),u}return t=n(t)||0,r(i)&&(g=!!i.leading,c=(v="maxWait"in i)?o(n(i.maxWait)||0,t):c,m="trailing"in i?!!i.trailing:m),_.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=d=h=void 0},_.flush=function(){return void 0===h?u:b(s())},_}},6285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3981:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},3283:(e,t,i)=>{var r=i(6027),s=i(547),n=Object.prototype,o=n.hasOwnProperty,a=n.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return s(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},3142:e=>{var t=Array.isArray;e.exports=t},6529:(e,t,i)=>{var r=i(3655),s=i(5387);e.exports=function(e){return null!=e&&s(e.length)&&!r(e)}},5853:(e,t,i)=>{e=i.nmd(e);var r=i(8942),s=i(4772),n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,a=o&&o.exports===n?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||s;e.exports=l},3514:(e,t,i)=>{var r=i(195),s=i(8486),n=i(3283),o=i(3142),a=i(6529),l=i(5853),d=i(4882),c=i(8666),u=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(o(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||n(e)))return!e.length;var t=s(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(d(e))return!r(e).length;for(var i in e)if(u.call(e,i))return!1;return!0}},3655:(e,t,i)=>{var r=i(7379),s=i(1580);e.exports=function(e){if(!s(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},5387:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},986:(e,t,i)=>{var r=i(7379),s=i(547);e.exports=function(e){return"number"==typeof e||s(e)&&"[object Number]"==r(e)}},1580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8138:(e,t,i)=>{var r=i(7379),s=i(3142),n=i(547);e.exports=function(e){return"string"==typeof e||!s(e)&&n(e)&&"[object String]"==r(e)}},1187:(e,t,i)=>{var r=i(7379),s=i(547);e.exports=function(e){return"symbol"==typeof e||s(e)&&"[object Symbol]"==r(e)}},8666:(e,t,i)=>{var r=i(674),s=i(9460),n=i(2306),o=n&&n.isTypedArray,a=o?s(o):r;e.exports=a},9071:e=>{e.exports=function(){}},4495:(e,t,i)=>{var r=i(8942);e.exports=function(){return r.Date.now()}},4772:e=>{e.exports=function(){return!1}},6131:(e,t,i)=>{var r=i(6403),s=i(1580),n=i(1187),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return NaN;if(s(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=s(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var i=a.test(e);return i||l.test(e)?d(e.slice(2),i?2:8):o.test(e)?NaN:+e}},2438:(e,t,i)=>{var r=i(5630);e.exports=function(e){return e&&e.length?r(e):[]}},320:(e,t)=>{"use strict";
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("effector"),require("uuid"),require("@inappstory/slide-api"),require("@inappstory/video-player"),require("react"),require("@emotion/cache"),require("classnames"),require("@emotion/styled"),require("@emotion/react"),require("react-input-mask"),require("parse-css-sides"));else if("function"==typeof define&&define.amd)define(["effector","uuid","@inappstory/slide-api","@inappstory/video-player","react","@emotion/cache","classnames","@emotion/styled","@emotion/react","react-input-mask","parse-css-sides"],t);else{var i="object"==typeof exports?t(require("effector"),require("uuid"),require("@inappstory/slide-api"),require("@inappstory/video-player"),require("react"),require("@emotion/cache"),require("classnames"),require("@emotion/styled"),require("@emotion/react"),require("react-input-mask"),require("parse-css-sides")):t(e.effector,e.uuid,e["@inappstory/slide-api"],e["@inappstory/video-player"],e.react,e["@emotion/cache"],e.classnames,e["@emotion/styled"],e["@emotion/react"],e["react-input-mask"],e["parse-css-sides"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,s,n,o,a,l,d,c)=>(()=>{var u={3643:function(e){e.exports=function(e){var t={};function i(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(r,s,function(t){return e[t]}.bind(null,s));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=90)}({17:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r=i(18),s=function(){function e(){}return e.getFirstMatch=function(e,t){var i=t.match(e);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(e,t){var i=t.match(e);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(e,t,i){if(e.test(t))return i},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}));if(t.push(0),10===t[0])switch(t[1]){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}},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,i,r){void 0===r&&(r=!1);var s=e.getVersionPrecision(t),n=e.getVersionPrecision(i),o=Math.max(s,n),a=0,l=e.map([t,i],(function(t){var i=o-e.getVersionPrecision(t),r=t+new Array(i+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=o-Math.min(s,n)),o-=1;o>=a;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===a)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},e.map=function(e,t){var i,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)r.push(t(e[i]));return r},e.find=function(e,t){var i,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(i=0,r=e.length;i<r;i+=1){var s=e[i];if(t(s,i))return s}},e.assign=function(e){for(var t,i,r=e,s=arguments.length,n=new Array(s>1?s-1:0),o=1;o<s;o++)n[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(n));var a=function(){var e=n[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,i=n.length;t<i;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=s,e.exports=t.default},18:function(e,t,i){"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={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(91))&&r.__esModule?r:{default:r},n=i(18);function o(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,i,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new s.default(e,t)},e.parse=function(e){return new s.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return n.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return n.ENGINE_MAP}},{key:"OS_MAP",get:function(){return n.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return n.PLATFORMS_MAP}}],(i=null)&&o(t.prototype,i),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r=l(i(92)),s=l(i(93)),n=l(i(94)),o=l(i(95)),a=l(i(17));function l(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return 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=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)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.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=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)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=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)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=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)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 a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,i={},r=0,s={},n=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(s[t]=o,n+=1):"object"==typeof o&&(i[t]=o,r+=1)})),r>0){var o=Object.keys(i),l=a.default.find(o,(function(e){return t.isOS(e)}));if(l){var d=this.satisfies(i[l]);if(void 0!==d)return d}var c=a.default.find(o,(function(e){return t.isPlatform(e)}));if(c){var u=this.satisfies(i[c]);if(void 0!==u)return u}}if(n>0){var h=Object.keys(s),p=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(s[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var i=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),s=a.default.getBrowserTypeByAlias(r);return t&&s&&(r=s.toLowerCase()),r===i},t.compareVersion=function(e){var t=[0],i=e,r=!1,s=this.getBrowserVersion();if("string"==typeof s)return">"===e[0]||"<"===e[0]?(i=e.substr(1),"="===e[1]?(r=!0,i=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?i=e.substr(1):"~"===e[0]&&(r=!0,i=e.substr(1)),t.indexOf(a.default.compareVersions(s,i,r))>-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=d,e.exports=t.default},92:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(17))&&r.__esModule?r:{default:r},n=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},i=s.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},i=s.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},i=s.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},i=s.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},i=s.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},i=s.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},i=s.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},i=s.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},i=s.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},i=s.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},i=s.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},i=s.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},i=s.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},i=s.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return i&&(t.version=i),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},i=s.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},i=s.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},i=s.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},i=s.default.getFirstMatch(n,e)||s.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},i=s.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},i=s.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},i=s.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},i=s.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},i=s.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},i=s.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},i=s.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},i=s.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},i=s.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t={name:"Android Browser"},i=s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},i=s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},i=s.default.getFirstMatch(n,e);return i&&(t.version=i),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s.default.getFirstMatch(t,e),version:s.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(17))&&r.__esModule?r:{default:r},n=i(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=s.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:n.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=s.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:n.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=s.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),i=s.default.getWindowsVersionName(t);return{name:n.OS_MAP.Windows,version:t,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:n.OS_MAP.iOS},i=s.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return i&&(t.version=i),t}},{test:[/macintosh/i],describe:function(e){var t=s.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),i=s.default.getMacOSVersionName(t),r={name:n.OS_MAP.MacOS,version:t};return i&&(r.versionName=i),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=s.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:n.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),i=e.test(/android/i);return t&&i},describe:function(e){var t=s.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),i=s.default.getAndroidVersionName(t),r={name:n.OS_MAP.Android,version:t};return i&&(r.versionName=i),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=s.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),i={name:n.OS_MAP.WebOS};return t&&t.length&&(i.version=t),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=s.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||s.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||s.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:n.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=s.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:n.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=s.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:n.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:n.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:n.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=s.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:n.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(17))&&r.__esModule?r:{default:r},n=i(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=s.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",i={type:n.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(i.model=t),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:n.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),i=e.test(/like (ipod|iphone)/i);return t&&!i},describe:function(e){var t=s.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:n.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:n.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:n.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:n.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:n.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:n.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var r,s=(r=i(17))&&r.__esModule?r:{default:r},n=i(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:n.ENGINE_MAP.Blink};var t=s.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:n.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:n.ENGINE_MAP.Trident},i=s.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:n.ENGINE_MAP.Presto},i=s.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:function(e){var t=e.test(/gecko/i),i=e.test(/like gecko/i);return t&&!i},describe:function(e){var t={name:n.ENGINE_MAP.Gecko},i=s.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:n.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:n.ENGINE_MAP.WebKit},i=s.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return i&&(t.version=i),t}}];t.default=o,e.exports=t.default}})},6644:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".aspect-ratio-box--XcAlO{width:auto;height:100%;left:50%;transform:translateX(-50%);overflow:hidden;position:relative}.aspect-ratio-box-inside--j-DAC{position:absolute;top:0;left:0;width:100%;height:100%}",""]),s.locals={"aspect-ratio-box":"aspect-ratio-box--XcAlO","aspect-ratio-box-inside":"aspect-ratio-box-inside--j-DAC"};const n=s},1422:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".icon--sEycZ{padding:10px;width:2rem;height:2rem}",""]),s.locals={icon:"icon--sEycZ"};const n=s},4978:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'@keyframes spin--hXgzP{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.refresh--S4PQ5{cursor:pointer;position:absolute;left:50%;top:50%;transform:translate3d(-50%, -50%, 0);z-index:2}.game-reader-container--nTAGw{background-color:rgba(0,0,0,0);position:fixed;left:0px;top:0px;padding:0px;border:0px;z-index:2147483645;width:100%;height:100%;overflow:hidden;color-scheme:auto}.game-reader--1ZgeS{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0);z-index:1;user-select:none;pointer-events:all;color:#fff}.game-reader--1ZgeS.desktop-mode--EXjc3{padding:50px 0}.game-reader--1ZgeS .game-box--pcuyl{border-radius:5px;background-position:center center;background-size:cover;background-repeat:no-repeat}.game-reader--1ZgeS .game-iframe--r85vH{width:inherit;height:inherit}.game-reader--1ZgeS:after{display:none;position:absolute;top:calc(50% - 1rem);left:calc(50% - 1rem);content:"";width:2rem;height:2rem;border:solid 2px var(--GRLoaderBackgroundColor, white);border-color:var(--GRLoaderBackgroundAccentColor, transparent) var(--GRLoaderBackgroundColor, white) var(--GRLoaderBackgroundColor, white) var(--GRLoaderBackgroundColor, white);border-radius:50%;animation:spin--hXgzP .6s infinite linear}.game-reader--1ZgeS.loading--pZ\\+6O:after{display:inline-block}.game-reader--1ZgeS .game-reader__backdrop--ojYHb{position:fixed;inset:0}.game-reader__close--tXZJZ{border:0;padding:0;background:rgba(0,0,0,0);position:absolute;top:20px;z-index:1140;pointer-events:all;cursor:pointer;outline:none;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.game-reader__close--tXZJZ:focus{outline:none}.game-reader__close--tXZJZ svg{overflow:visible}.game-reader__close--tXZJZ[data-position=start],.game-reader__close--tXZJZ[data-position=left]{left:10px}.game-reader__close--tXZJZ[data-position=start][dir=rtl],.game-reader__close--tXZJZ[data-position=left][dir=rtl]{left:auto;right:10px}.game-reader__close--tXZJZ[data-position=end],.game-reader__close--tXZJZ[data-position=right]{right:10px}.game-reader__close--tXZJZ[data-position=end][dir=rtl],.game-reader__close--tXZJZ[data-position=right][dir=rtl]{left:10px;right:auto}',""]),s.locals={refresh:"refresh--S4PQ5","game-reader-container":"game-reader-container--nTAGw","game-reader":"game-reader--1ZgeS","desktop-mode":"desktop-mode--EXjc3","game-box":"game-box--pcuyl","game-iframe":"game-iframe--r85vH",spin:"spin--hXgzP",loading:"loading--pZ+6O","game-reader__backdrop":"game-reader__backdrop--ojYHb","game-reader__close":"game-reader__close--tXZJZ"};const n=s},763:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,":root{--ias-sat: env(safe-area-inset-top);--ias-sar: env(safe-area-inset-right);--ias-sab: env(safe-area-inset-bottom);--ias-sal: env(safe-area-inset-left)}",""]),s.locals={};const n=s},5213:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,"h3{margin:0}.stories-list-wrapper--rTQwL{background-color:var(--background-color, transparent);height:auto;padding:0;position:relative}.stories-list-wrapper--rTQwL.mode-desktop--o0ka0.with-list-controls--k8u1L{position:relative}.stories-list--cPITI{position:relative;overflow:visible}@media(min-width: 767.99px){.stories-list--cPITI{overflow:hidden}}.stories-list__actions--SI0\\+0{position:absolute;right:0;top:0}.stories-list__viewport--KbCw2{overflow:hidden;height:auto}.stories-list__viewport--KbCw2:not(.mode-desktop--o0ka0){display:flex}.stories-list__viewport-inner--LCUH4{display:flex;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-top:var(--storiesListTopPadding, 0);padding-bottom:var(--storiesListBottomPadding, 0);box-sizing:content-box}.stories-list__viewport-inner--LCUH4::-webkit-scrollbar{display:none}.stories-list__viewport-inner--LCUH4.mode-desktop--o0ka0{scroll-behavior:unset;cursor:grab}.stories-list__viewport-inner--LCUH4.isVerticalDirection--jIuyZ{flex-flow:row wrap}.stories-list__viewport-inner--LCUH4.align-center--zgJPi{margin-left:auto;margin-right:auto}.stories-list__viewport-inner--LCUH4.align-left--mSkW6{margin-right:auto}.stories-list__viewport-inner--LCUH4.align-right--R8\\+zN{margin-left:auto}.stories-list__viewport-inner--LCUH4.isTitleCardOutsideTop--M9GF-{align-items:flex-end}.stories-list__viewport-inner--LCUH4.isTitleCardOutsideBottom--rx9jV{align-items:flex-start}",""]),s.locals={"stories-list-wrapper":"stories-list-wrapper--rTQwL","mode-desktop":"mode-desktop--o0ka0","with-list-controls":"with-list-controls--k8u1L","stories-list":"stories-list--cPITI","stories-list__actions":"stories-list__actions--SI0+0","stories-list__viewport":"stories-list__viewport--KbCw2","stories-list__viewport-inner":"stories-list__viewport-inner--LCUH4",isVerticalDirection:"isVerticalDirection--jIuyZ","align-center":"align-center--zgJPi","align-left":"align-left--mSkW6","align-right":"align-right--R8+zN",isTitleCardOutsideTop:"isTitleCardOutsideTop--M9GF-",isTitleCardOutsideBottom:"isTitleCardOutsideBottom--rx9jV"};const n=s},7966:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".favorite-images-wrapper--Xrkk6{display:flex;flex-direction:row;flex-wrap:wrap;padding:var(--storiesListCardFavoriteTitle, --storiesListItemTitlePadding, 0px);gap:var(--storiesListCardFavoriteGap, 3px);box-sizing:border-box}.favorite-image-wrapper--iWxvX{flex:0 1 calc(50% - var(--storiesListCardFavoriteGap, 3px));position:relative}.favorite-image--zPW-D{position:relative}.favorite-image-item--t9M\\+t{position:absolute;inset:0px;border-radius:calc(var(--storiesListInnerBorderRadiusRead, 0)/4);background-position:50% 50%;background-size:cover}.circle_style--3lFSw .favorite-image-item--t9M\\+t{border-radius:50%}",""]),s.locals={"favorite-images-wrapper":"favorite-images-wrapper--Xrkk6","favorite-image-wrapper":"favorite-image-wrapper--iWxvX","favorite-image":"favorite-image--zPW-D","favorite-image-item":"favorite-image-item--t9M+t",circle_style:"circle_style--3lFSw"};const n=s},6892:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.stories-slide-wrapper--aVM\\+1:not(:last-child){margin-right:var(--storiesGap, 20px)}.stories-slide-wrapper--aVM\\+1{display:flex;flex-direction:column;flex:0 0 auto;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.stories-slide-wrapper--aVM\\+1:hover{text-decoration:none}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze{display:block;box-sizing:border-box;text-align:left;position:relative;overflow:visible;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);border:var(--storiesListBorderNotReadWidth, 2px) solid var(--storiesBorderNotReadColor, #00b956);padding:var(--storiesListBorderGapNotRead, 2px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x{border-radius:var(--storiesListBorderRadius, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide-image--E2w7f,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide-image--E2w7f{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide-image__image--viK-T,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide-image__image--viK-T video,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide-image__image--viK-T,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide-image__image--viK-T video{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide__mask--Ra85s,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide__mask--Ra85s{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7 .stories-slide__content--GZM3d,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x .stories-slide__content--GZM3d{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j{border-radius:var(--storiesListBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide-image--E2w7f,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide-image--E2w7f{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide-image__image--viK-T,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide-image__image--viK-T video,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide-image__image--viK-T,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide-image__image--viK-T video{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide__mask--Ra85s,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide__mask--Ra85s{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-quad--jf7N7._is-read--O-P1j .stories-slide__content--GZM3d,.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._format-rectangle--Kqy8x._is-read--O-P1j .stories-slide__content--GZM3d{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._is-read--O-P1j{border:var(--storiesListBorderReadWidth, 1px) solid var(--storiesBorderReadColor, #ededed)}.stories-slide-wrapper--aVM\\+1.isTitleCardOutsideTop--rgyxL{justify-content:flex-end}.stories-slide-wrapper--aVM\\+1.isTitleCardOutsideBottom--9w6eu{justify-content:flex-start}.stories-slide-wrapper--aVM\\+1 .stories-slide__inner--jP7d2{display:block;position:relative;width:100%;height:100%}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-black--LzoGN{background:#000}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-white--cCu4O{background:#fff}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-red--oS-Gd{background:#ff1a36}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-yellow--hVzqv{background:#fff000}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-green--hQFmN{background:#0be361}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-violet--D\\+STO{background:#b300bc}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-blue--GkTxq{background:#0761db}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-grey--qU8eo{background:#a8a8a8}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-black-gradient--I75n4{background:#fff;background:linear-gradient(0deg, #c1c1c1, #000)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-white-gradient--yfwk7{background:#fff;background:linear-gradient(180deg, #fff, #ffc800)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-red-gradient--i3Awy{background:#ff1a36;background:linear-gradient(180deg, #c90174, #eb5c57)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-yellow-gradient--c89UQ{background:#fff000;background:linear-gradient(0deg, #fbda61, #f76b1c)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-green-gradient--3TGxB{background:#0be361;background:linear-gradient(0deg, #b4ed50, #429321)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-violet-gradient--JAdS3{background:#b300bc;background:linear-gradient(180deg, #c90174, #0164fd)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-blue-gradient--qKJCa{background:#0761db;background:linear-gradient(180deg, #3023ae, #53a0fe 48%, #b4ed50)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._background-color-grey-gradient--4\\+MvA{background:#a8a8a8;background:linear-gradient(0deg, #e2e2e2, #959595)}.stories-slide-wrapper--aVM\\+1 .stories-slide-image--E2w7f{position:relative;width:100%;height:100%}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__wrap--jAg55{position:absolute;top:0;bottom:0;left:0;right:0}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T{position:relative;opacity:1;transition:opacity .3s ease-in-out;overflow:hidden}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T._mode_list--dkBpg{width:100%;height:100%}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T.ugc-card-cell--Ybjtv img{object-fit:contain}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T img{width:100%;height:100%;object-fit:cover}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T video{min-height:100%;min-width:100%;width:100%;background-position:center center;background-repeat:no-repeat;object-fit:cover;opacity:0}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T.video-loaded--CLBMu img{display:none}.stories-slide-wrapper--aVM\\+1 .stories-slide-image__image--viK-T.video-loaded--CLBMu video{opacity:1}.stories-slide-wrapper--aVM\\+1 .stories-slide__mask--Ra85s{position:absolute;top:0;bottom:0;left:0;right:0;z-index:2;background-color:var(--storiesListItemMaskColor, rgba(0, 0, 0, 0));background-image:var(--storiesListItemMaskLinearGradient, none);opacity:1}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._is-read--O-P1j .stories-slide__mask--Ra85s{background-color:var(--storiesListItemOpenedMaskColor, rgba(0, 0, 0, 0));background-image:var(--storiesListItemOpenedMaskLinearGradient, none)}.stories-slide-wrapper--aVM\\+1 .stories-slide--ZUGze._ugc-cell--f8S1f .stories-slide__mask--Ra85s{background-color:var(--storiesListCardUgcMaskColor, rgba(0, 0, 0, 0));background-image:var(--storiesListCardUgcMaskLinearGradient, none)}.stories-slide-wrapper--aVM\\+1 .stories-slide__content--GZM3d{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;height:100%;max-height:100%;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;color:var(--storiesListItemTitleColor, white);font-family:var(--storiesListItemTitleFontFamily);font-weight:normal;font-size:1rem;line-height:normal;font:var(--storiesListItemTitleFont, normal);text-decoration:none;padding:var(--storiesListItemTitlePadding, 0px)}.stories-slide-wrapper--aVM\\+1 .stories-slide__content--GZM3d.__position_outside_top--en7U6,.stories-slide-wrapper--aVM\\+1 .stories-slide__content--GZM3d.__position_outside_bottom--X5wOp{position:relative;top:unset;right:unset;bottom:unset;left:unset;height:auto}.stories-slide-wrapper--aVM\\+1 .clamp--1Awvg{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.stories-slide-wrapper--aVM\\+1 .stories-slide__title--PDoTn{white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:none;user-select:none}.stories-slide-wrapper--aVM\\+1 .stories-slide__title--PDoTn.align-left--835Gu{text-align:left}.stories-slide-wrapper--aVM\\+1 .stories-slide__title--PDoTn.align-center--5jKkF{text-align:center}.stories-slide-wrapper--aVM\\+1 .stories-slide__title--PDoTn.align-right--Pfrzc{text-align:right}.stories-slide--ZUGze._format-circle--prePc,.stories-slide--ZUGze._format-circle--prePc .stories-slide-image__image--viK-T,.stories-slide--ZUGze._format-circle--prePc .stories-slide-image__image--viK-T video,.stories-slide--ZUGze._format-circle--prePc .stories-slide__mask--Ra85s,.stories-slide--ZUGze._format-circle--prePc .stories-slide-image--E2w7f{border-radius:50%}.stories-slide--ZUGze._favorite-cell--1l8Xk .stories-slide__mask--Ra85s{background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%)}.stories-slide--ZUGze._favorite-cell--1l8Xk._format-circle--prePc .stories-slide-image__wrap--jAg55{display:flex}.stories-slide--ZUGze._favorite-cell--1l8Xk._format-circle--prePc .stories-slide-image__image--viK-T{width:85%;height:85%;overflow:visible;margin:auto}.stories-slide--ZUGze._favorite-cell--1l8Xk._format-circle--prePc .favorite-images-wrapper--\\+i2pB{margin:0;padding:0}.stories-slide--ZUGze._has-drop-shadow--2LySa{filter:drop-shadow(var(--storiesListCardDropShadow, none))}.stories-slide--ZUGze._has-drop-shadow--2LySa._is-read--O-P1j{filter:drop-shadow(var(--storiesListCardOpenedDropShadow, none))}.stories-slide--ZUGze._has-drop-shadow--2LySa._favorite-cell--1l8Xk{filter:drop-shadow(var(--storiesListCardFavoriteDropShadow, none))}.stories-slide--ZUGze._has-drop-shadow--2LySa._ugc-cell--f8S1f{filter:drop-shadow(var(--storiesListCardUgcDropShadow, none))}.stories-slide--ZUGze._has-card-svg-mask--17djB .stories-slide__inner--jP7d2{-webkit-mask-image:var(--storiesListCardMask);mask-image:var(--storiesListCardMask)}.stories-slide--ZUGze._has-card-svg-mask--17djB._is-read--O-P1j .stories-slide__inner--jP7d2{-webkit-mask-image:var(--storiesListCardOpenedMask);mask-image:var(--storiesListCardOpenedMask)}.stories-slide--ZUGze._has-card-svg-mask--17djB._favorite-cell--1l8Xk .stories-slide__inner--jP7d2{-webkit-mask-image:var(--storiesListCardFavoriteMask);mask-image:var(--storiesListCardFavoriteMask)}.stories-slide--ZUGze._has-card-svg-mask--17djB._ugc-cell--f8S1f .stories-slide__inner--jP7d2{-webkit-mask-image:var(--storiesListCardUgcMask);mask-image:var(--storiesListCardUgcMask)}.stories-slide--ZUGze .card-overlay-svg-mask--PoiQW{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;z-index:3}@supports(((mask-image: linear-gradient(0deg, #fff, #fff), linear-gradient(0deg, #fff, #fff)) and (mask-clip: content-box, border-box)) or ((-webkit-mask-image: linear-gradient(0deg, #fff, #fff), linear-gradient(0deg, #fff, #fff)) and (-webkit-mask-clip: content-box, border-box))) and ((mask-composite: exclude) or (-webkit-mask-composite: xor)){.stories-slide--ZUGze._has-border-gradient-color--xkN4Z{border-color:rgba(0,0,0,0)}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z:before{content:"";position:absolute;border-radius:inherit;box-sizing:border-box;-webkit-mask-composite:xor;mask-composite:exclude;padding:var(--storiesListBorderNotReadWidth, 2px);top:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);right:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);bottom:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);left:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);background:var(--storiesBorderNotReadGradientColor, transparent);-webkit-mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);-webkit-mask-clip:content-box,border-box;mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);mask-clip:content-box,border-box}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._is-read--O-P1j{border-color:rgba(0,0,0,0)}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._is-read--O-P1j:before{padding:var(--storiesListBorderReadWidth, 2px);top:calc(var(--storiesListBorderReadWidth, 2px)*-1);right:calc(var(--storiesListBorderReadWidth, 2px)*-1);bottom:calc(var(--storiesListBorderReadWidth, 2px)*-1);left:calc(var(--storiesListBorderReadWidth, 2px)*-1);background:var(--storiesBorderReadGradientColor, transparent);-webkit-mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);-webkit-mask-clip:content-box,border-box;mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);mask-clip:content-box,border-box}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._favorite-cell--1l8Xk{border-color:rgba(0,0,0,0)}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._favorite-cell--1l8Xk:before{padding:var(--storiesListBorderNotReadWidth, 2px);top:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);right:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);bottom:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);left:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);background:var(--storiesListCardFavoriteGradientColor, transparent);-webkit-mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);-webkit-mask-clip:content-box,border-box;mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);mask-clip:content-box,border-box}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._ugc-cell--f8S1f{border-color:rgba(0,0,0,0)}.stories-slide--ZUGze._has-border-gradient-color--xkN4Z._ugc-cell--f8S1f:before{padding:var(--storiesListBorderNotReadWidth, 2px);top:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);right:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);bottom:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);left:calc(var(--storiesListBorderNotReadWidth, 2px)*-1);background:var(--storiesListCardUgcGradientColor, transparent);-webkit-mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);-webkit-mask-clip:content-box,border-box;mask-image:linear-gradient(0deg, #fff, #fff),linear-gradient(0deg, #fff, #fff);mask-clip:content-box,border-box}}',""]),s.locals={"stories-slide-wrapper":"stories-slide-wrapper--aVM+1","stories-slide":"stories-slide--ZUGze","_format-quad":"_format-quad--jf7N7","_format-rectangle":"_format-rectangle--Kqy8x","stories-slide-image":"stories-slide-image--E2w7f","stories-slide-image__image":"stories-slide-image__image--viK-T","stories-slide__mask":"stories-slide__mask--Ra85s","stories-slide__content":"stories-slide__content--GZM3d","_is-read":"_is-read--O-P1j",isTitleCardOutsideTop:"isTitleCardOutsideTop--rgyxL",isTitleCardOutsideBottom:"isTitleCardOutsideBottom--9w6eu","stories-slide__inner":"stories-slide__inner--jP7d2","_background-color-black":"_background-color-black--LzoGN","_background-color-white":"_background-color-white--cCu4O","_background-color-red":"_background-color-red--oS-Gd","_background-color-yellow":"_background-color-yellow--hVzqv","_background-color-green":"_background-color-green--hQFmN","_background-color-violet":"_background-color-violet--D+STO","_background-color-blue":"_background-color-blue--GkTxq","_background-color-grey":"_background-color-grey--qU8eo","_background-color-black-gradient":"_background-color-black-gradient--I75n4","_background-color-white-gradient":"_background-color-white-gradient--yfwk7","_background-color-red-gradient":"_background-color-red-gradient--i3Awy","_background-color-yellow-gradient":"_background-color-yellow-gradient--c89UQ","_background-color-green-gradient":"_background-color-green-gradient--3TGxB","_background-color-violet-gradient":"_background-color-violet-gradient--JAdS3","_background-color-blue-gradient":"_background-color-blue-gradient--qKJCa","_background-color-grey-gradient":"_background-color-grey-gradient--4+MvA","stories-slide-image__wrap":"stories-slide-image__wrap--jAg55",_mode_list:"_mode_list--dkBpg","ugc-card-cell":"ugc-card-cell--Ybjtv","video-loaded":"video-loaded--CLBMu","_ugc-cell":"_ugc-cell--f8S1f",__position_outside_top:"__position_outside_top--en7U6",__position_outside_bottom:"__position_outside_bottom--X5wOp",clamp:"clamp--1Awvg","stories-slide__title":"stories-slide__title--PDoTn","align-left":"align-left--835Gu","align-center":"align-center--5jKkF","align-right":"align-right--Pfrzc","_format-circle":"_format-circle--prePc","_favorite-cell":"_favorite-cell--1l8Xk","favorite-images-wrapper":"favorite-images-wrapper--+i2pB","_has-drop-shadow":"_has-drop-shadow--2LySa","_has-card-svg-mask":"_has-card-svg-mask--17djB","card-overlay-svg-mask":"card-overlay-svg-mask--PoiQW","_has-border-gradient-color":"_has-border-gradient-color--xkN4Z"};const n=s},1980:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-list-controls--PIqE6{pointer-events:none}.stories-list-controls--PIqE6 .control-start--0L66N,.stories-list-controls--PIqE6 .control-end--rFrlW{cursor:pointer;position:absolute;background-color:var(--storiesListControlsBackgroundColor, white);border-radius:50%;z-index:10;height:var(--storiesListControlsSize);width:var(--storiesListControlsSize);top:50%;display:flex;justify-content:center;align-items:center;pointer-events:all}.stories-list-controls--PIqE6 .control-icon--9JIpq{width:7px;height:12px;background-color:var(--storiesListControlsColor, black)}.stories-list-controls--PIqE6.horizontal---4ee9 .control-start--0L66N{left:0;transform:translateY(-50%)}.stories-list-controls--PIqE6.horizontal---4ee9 .control-start--0L66N.control-start_dir_rtl--HAuqS{left:auto;right:0}.stories-list-controls--PIqE6.horizontal---4ee9 .control-end--rFrlW{right:0;transform:translateY(-50%)}.stories-list-controls--PIqE6.horizontal---4ee9 .control-end--rFrlW.control-end_dir_rtl--qq6Cs{left:0;right:auto}.stories-list-controls--PIqE6.vertical--fd6vu .control-start--0L66N{top:var(--storiesListTopPadding, 0);left:50%;transform:translate3d(-50%, 0, 0) rotate(90deg)}.stories-list-controls--PIqE6.vertical--fd6vu .control-end--rFrlW{top:auto;bottom:var(--storiesListBottomPadding, 0);right:50%;transform:translate3d(50%, 0, 0) rotate(90deg)}.stories-list-controls--PIqE6 .control-start--0L66N .control-icon--9JIpq{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 11L1 6L6 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 11L1 6L6 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")}.stories-list-controls--PIqE6 .control-end--rFrlW .control-icon--9JIpq{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 11L6 6L1 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='7' height='12' viewBox='0 0 7 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 11L6 6L1 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")}",""]),s.locals={"stories-list-controls":"stories-list-controls--PIqE6","control-start":"control-start--0L66N","control-end":"control-end--rFrlW","control-icon":"control-icon--9JIpq",horizontal:"horizontal---4ee9","control-start_dir_rtl":"control-start_dir_rtl--HAuqS","control-end_dir_rtl":"control-end_dir_rtl--qq6Cs",vertical:"vertical--fd6vu"};const n=s},827:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".slider3d__btn_next--4Wkfq,.slider3d__btn_prev--jX6Zb{display:none}._desktop_mode--uyGyi .slider3d__btn_next--4Wkfq,._desktop_mode--uyGyi .slider3d__btn_prev--jX6Zb{display:block;position:absolute;top:50%;transform:translateY(-50%);left:50%}.btn-icon--anih0{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:rgba(0,0,0,0);border:none;color:#fff;cursor:pointer}.btn-icon--anih0:focus{outline:0}.btn-icon--anih0:disabled{color:#464646;cursor:not-allowed}",""]),s.locals={slider3d__btn_next:"slider3d__btn_next--4Wkfq",slider3d__btn_prev:"slider3d__btn_prev--jX6Zb",_desktop_mode:"_desktop_mode--uyGyi","btn-icon":"btn-icon--anih0"};const n=s},1239:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-viewer--4fkyX{position:fixed;z-index:1100;top:0;left:0;width:100%;height:100%;display:block;transition:opacity .3s ease;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.stories-viewer--4fkyX:-webkit-full-screen,.stories-viewer--4fkyX:-moz-full-screen,.stories-viewer--4fkyX:-ms-fullscreen,.stories-viewer--4fkyX :fullscreen{width:100% !important;height:100% !important}.stories-viewer-background--VIoup{position:fixed;top:-60px;left:-60px;width:calc(100% + 120px);height:calc(100% + 120px);background-position:center;background-repeat:no-repeat;background-size:cover}.stories-viewer-backdrop---yMm9{position:fixed;top:0;right:0;bottom:0;left:0;z-index:11;background-color:rgba(255,255,255,.5)}.stories-viewer-backdrop---yMm9._desktopMode--wpoLG{display:none}.slider3d--mD8T8{position:fixed !important}.slider3d--mD8T8.no-select--DtR2G{user-select:none}",""]),s.locals={"stories-viewer":"stories-viewer--4fkyX","stories-viewer-background":"stories-viewer-background--VIoup","stories-viewer-backdrop":"stories-viewer-backdrop---yMm9",_desktopMode:"_desktopMode--wpoLG",slider3d:"slider3d--mD8T8","no-select":"no-select--DtR2G"};const n=s},9322:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-button-panel--SCzyq{position:absolute;z-index:10001;bottom:0;left:0;width:100%;background-color:#000;border-bottom-left-radius:var(--slideBorderRadius, 0);border-bottom-right-radius:var(--slideBorderRadius, 0)}.stories-button-panel--SCzyq[dir=rtl] .stories-button-panel-actions--aacxy .right-container--DEzuh{margin-left:0;margin-right:auto}.stories-button-panel-actions--aacxy{position:absolute;top:0;left:0;width:100%;height:50px;padding:0 4px;display:flex;flex-direction:row;color:#fff;align-items:center}.stories-button-panel-actions--aacxy>span{display:flex}.stories-button-panel-actions--aacxy .right-container--DEzuh{margin-left:auto}.button-panel-action--q6w4I{cursor:pointer;pointer-events:all;display:flex;align-items:center;justify-content:center;height:50px;width:38px}.button-panel-action--q6w4I>*{pointer-events:none}",""]),s.locals={"stories-button-panel":"stories-button-panel--SCzyq","stories-button-panel-actions":"stories-button-panel-actions--aacxy","right-container":"right-container--DEzuh","button-panel-action":"button-panel-action--q6w4I"};const n=s},2843:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".goods-container--q3jcO{position:absolute;inset:0;z-index:3000}",""]),s.locals={"goods-container":"goods-container--q3jcO"};const n=s},2208:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-viewer__close---ZGke{border:0;padding:0;background:rgba(0,0,0,0);position:absolute;top:calc(15px + var(--timelineBlockTopOffset, 5px));pointer-events:all;cursor:pointer;outline:none;transition:opacity .3s ease-in;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.stories-viewer__close---ZGke:focus{outline:none}.stories-viewer__close---ZGke svg{overflow:visible}.stories-viewer__close---ZGke._paused-ui--\\+yY54{opacity:0}.stories-viewer__close---ZGke[data-position=start],.stories-viewer__close---ZGke[data-position=left]{left:10px}.stories-viewer__close---ZGke[data-position=start][dir=rtl],.stories-viewer__close---ZGke[data-position=left][dir=rtl]{left:auto;right:10px}.stories-viewer__close---ZGke[data-position=end],.stories-viewer__close---ZGke[data-position=right]{right:10px}.stories-viewer__close---ZGke[data-position=end][dir=rtl],.stories-viewer__close---ZGke[data-position=right][dir=rtl]{left:10px;right:auto}.story-header--oupRd{position:relative;z-index:1140}",""]),s.locals={"stories-viewer__close":"stories-viewer__close---ZGke","_paused-ui":"_paused-ui--+yY54","story-header":"story-header--oupRd"};const n=s},5196:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-pager--g2Xmx{position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;z-index:1131;background-image:linear-gradient(180deg, rgba(0, 0, 0, 0.104) 0%, rgba(0, 0, 0, 0) 20%);pointer-events:none;transition:opacity .3s ease-in}.stories-pager--g2Xmx._desktop-mode--Uv8uD{border-top-left-radius:5px;border-top-right-radius:5px}.stories-pager--g2Xmx._paused-ui--OaHJ\\+{opacity:0}.stories-pager__ticks--qsxTP{height:3px;display:flex;margin:8px 8px;margin-top:var(--timelineBlockTopOffset, 8px);opacity:1}.stories-pager__ticks--qsxTP.hiddenTimeline--j8OH3{opacity:0}.stories-pager__tick--Po3p4{background-color:rgba(255,255,255,.6);width:100%;margin:0 2px;overflow:hidden;position:relative;border-radius:10px}.stories-pager__tick--Po3p4:first-child{margin-left:0}.stories-pager__tick--Po3p4:last-child{margin-right:0}.stories-pager__tick-progress--SGN1\\+{width:100%;height:3px}.stories-pager__tick-progress--SGN1\\+._active--z6a-V{background-color:#fff}.stories-pager__tick-progress-loader--zGfrP{width:100%;height:3px;position:absolute;top:0;left:0;background:linear-gradient(to right, rgb(255, 255, 255) var(--tick), transparent 0)}.stories-pager--g2Xmx[dir=rtl] .stories-pager__tick-progress-loader--zGfrP{background:linear-gradient(to left, rgb(255, 255, 255) var(--tick), transparent 0)}",""]),s.locals={"stories-pager":"stories-pager--g2Xmx","_desktop-mode":"_desktop-mode--Uv8uD","_paused-ui":"_paused-ui--OaHJ+","stories-pager__ticks":"stories-pager__ticks--qsxTP",hiddenTimeline:"hiddenTimeline--j8OH3","stories-pager__tick":"stories-pager__tick--Po3p4","stories-pager__tick-progress":"stories-pager__tick-progress--SGN1+",_active:"_active--z6a-V","stories-pager__tick-progress-loader":"stories-pager__tick-progress-loader--zGfrP"};const n=s},9485:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.stories-slide--q9VWO{top:0;left:0;right:0;bottom:0;position:absolute;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:var(--slideBorderRadius, 0)}.stories-slide--q9VWO._dummy--nHvZB{background-color:#fff}.stories-slide--q9VWO .load-mask--ZMb\\+b{position:absolute;background-color:#000;z-index:2000;top:0;bottom:0;left:0;right:0;display:flex;justify-content:center;align-items:center}.stories-slide--q9VWO._with-bottom-panel--SpzAH._desktop-mode--qLP7s,.stories-slide--q9VWO._with-bottom-panel--SpzAH._desktop-mode--qLP7s .narrative-slide-background--VJv7a,.stories-slide--q9VWO._with-bottom-panel--SpzAH._desktop-mode--qLP7s .narrative-slide-elements--X3ZwO{border-bottom-right-radius:0;border-bottom-left-radius:0}.loading-spinner-default--5ZaBK{-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--6vLEc .6s infinite linear;animation:loading-spinner--6vLEc .6s infinite linear}@keyframes loading-spinner--6vLEc{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.stories-slide--q9VWO{z-index:1100}.stories-slide--q9VWO._position_1--e8VEN{z-index:1130}.stories-slide--q9VWO._position_2--mXClB{z-index:1120}.stories-slide-offset--jyuN0{pointer-events:none;position:relative;height:100%}.stories-slide-box--B9o8s{position:relative;padding:154.838709677% 0 0 0}.stories-slide-content--4HRnN{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}',""]),s.locals={"stories-slide":"stories-slide--q9VWO",_dummy:"_dummy--nHvZB","load-mask":"load-mask--ZMb+b","_with-bottom-panel":"_with-bottom-panel--SpzAH","_desktop-mode":"_desktop-mode--qLP7s","narrative-slide-background":"narrative-slide-background--VJv7a","narrative-slide-elements":"narrative-slide-elements--X3ZwO","loading-spinner-default":"loading-spinner-default--5ZaBK","loading-spinner":"loading-spinner--6vLEc",_position_1:"_position_1--e8VEN",_position_2:"_position_2--mXClB","stories-slide-offset":"stories-slide-offset--jyuN0","stories-slide-box":"stories-slide-box--B9o8s","stories-slide-content":"stories-slide-content--4HRnN"};const n=s},6349:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".stories-item--eRGlp{visibility:visible;position:absolute;width:100%;height:auto;bottom:0;border-radius:inherit;backface-visibility:hidden}.slider3d__item--\\+4QeZ{position:absolute;left:0;top:0;width:100%;backface-visibility:hidden;transform-style:preserve-3d}",""]),s.locals={"stories-item":"stories-item--eRGlp",slider3d__item:"slider3d__item--+4QeZ"};const n=s},417:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".slider3d__wrapper--YC5-I{left:50%;transform:translateX(-50%);overflow:hidden;box-sizing:border-box}.slider3d__wrapper--YC5-I.slider3d__wrapper_swipe-up--Yv\\+U6.slider3d__wrapper_swipe-up--Yv\\+U6{background-color:rgba(0,0,0,0)}.slider3d__wrapper--YC5-I .game-reader-wrapper--0Rcrg,.slider3d__wrapper--YC5-I .share-panel-wrapper--sCLxf{overflow:hidden}.slider3d__wrapper--YC5-I._desktop_mode--DxFXS{padding:50px 0}.slider3d__wrapper--YC5-I._desktop_mode--DxFXS>.share-panel-wrapper--sCLxf{top:50px;bottom:50px;border-radius:5px}.slider3d__wrapper--YC5-I._desktop_mode--DxFXS>.share-panel-wrapper--sCLxf.share-panel-wrapper--sCLxf{border-bottom-left-radius:0;border-bottom-right-radius:0}.slider3d__wrapper--YC5-I *,.slider3d__wrapper--YC5-I ::after,.slider3d__wrapper--YC5-I ::before{box-sizing:border-box}.slider3d__wrapper--YC5-I .stories-item--ogpUG,.slider3d__wrapper--YC5-I .stories-slide--k2\\+mz,.slider3d__wrapper--YC5-I .narrative-slide-background--\\+K5pl,.slider3d__wrapper--YC5-I .narrative-slide-elements--CcHGt{border-radius:var(--slideBorderRadius, 0)}.slider3d--GoDJO{position:fixed !important}.slider3d--GoDJO.no-select--A4lKf{user-select:none}.slider3d__wrapper--YC5-I{z-index:1;position:relative;height:100%}.stories-face--DhzSl{position:absolute !important;top:0;left:0;right:0;width:100%;width:calc(100% + .01px);height:100%}.slider3d__rotater--sf46d{--tick: 0%;--tickOpacity: 0}.slider3d__inner--7opZa,.slider3d__rotater--sf46d{position:relative;height:100%;transform-style:preserve-3d}",""]),s.locals={slider3d__wrapper:"slider3d__wrapper--YC5-I","slider3d__wrapper_swipe-up":"slider3d__wrapper_swipe-up--Yv+U6","game-reader-wrapper":"game-reader-wrapper--0Rcrg","share-panel-wrapper":"share-panel-wrapper--sCLxf",_desktop_mode:"_desktop_mode--DxFXS","stories-item":"stories-item--ogpUG","stories-slide":"stories-slide--k2+mz","narrative-slide-background":"narrative-slide-background--+K5pl","narrative-slide-elements":"narrative-slide-elements--CcHGt",slider3d:"slider3d--GoDJO","no-select":"no-select--A4lKf","stories-face":"stories-face--DhzSl",slider3d__rotater:"slider3d__rotater--sf46d",slider3d__inner:"slider3d__inner--7opZa"};const n=s},2372:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.wrapper--FSy6K{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";position:absolute;inset:0;z-index:3000;border-radius:inherit}.wrapper--FSy6K .backdrop--WK6JL{display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.5);border-radius:inherit}.main--CNCI0{position:absolute;z-index:2;user-select:none;display:flex;flex-direction:column;text-rendering:geometricprecision;overflow:hidden}.main--CNCI0 .question--pbdpA{width:100%;height:auto}.main--CNCI0 .question--pbdpA:empty{display:none}.main--CNCI0 .input-group--z2bKl{display:flex}.main--CNCI0 .input-group--z2bKl .input--SQayn{width:100%}.main--CNCI0 .input-group--z2bKl .input-group__prepend--mYrcE{display:flex;flex:.35}.main--CNCI0 .input-group--z2bKl .input-group__separator--2fDEy{border-right:1px solid #fff;margin-right:.5rem}.main--CNCI0 .input-group--z2bKl .input--SQayn{flex:1}.main--CNCI0 .input-wrapper--tPiNs{overflow:hidden;box-sizing:content-box;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.main--CNCI0 .input-wrapper--tPiNs .input--SQayn{background:none;-webkit-tap-highlight-color:rgba(0,0,0,0);text-rendering:inherit;outline:none;border:none}.main--CNCI0 .input-wrapper--tPiNs .input--SQayn::placeholder{color:inherit}.main--CNCI0 .input-wrapper--tPiNs .input--SQayn.input_centered--3I7po{text-align:center}.main--CNCI0 .input-wrapper--tPiNs.is-invalid--Un0Xg{border-color:#dc3545 !important;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.textarea-grow-wrap--CES2v{display:grid;max-width:100%;word-break:break-all}.textarea-grow-wrap--CES2v::after{content:attr(data-replicated-value) " ";white-space:pre-wrap;visibility:hidden}.textarea-grow-wrap--CES2v>.input--SQayn{resize:none;overflow:hidden}.textarea-grow-wrap--CES2v>.input--SQayn,.textarea-grow-wrap--CES2v::after{border:inherit;padding:inherit;font:inherit;text-rendering:inherit;text-align:inherit;line-height:normal;color:inherit;grid-area:1/1/2/2}.button-wrapper--dC7kk{width:100%}.button-wrapper--dC7kk .button--gURik{width:100%;cursor:pointer}.button-wrapper--dC7kk .button--gURik:disabled,.button-wrapper--dC7kk .button--gURik[disabled=true]{cursor:not-allowed;pointer-events:none;background-color:#272727 !important}@keyframes fadeIn--WL4XY{from{opacity:0}to{opacity:1}}@keyframes fadeOut--iRp81{from{opacity:1}to{opacity:0}}.fadeIn--WL4XY{animation:fadeIn--WL4XY 300ms forwards}.fadeOut--iRp81{animation:fadeOut--iRp81 0ms forwards}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}',""]),s.locals={wrapper:"wrapper--FSy6K",backdrop:"backdrop--WK6JL",main:"main--CNCI0",question:"question--pbdpA","input-group":"input-group--z2bKl",input:"input--SQayn","input-group__prepend":"input-group__prepend--mYrcE","input-group__separator":"input-group__separator--2fDEy","input-wrapper":"input-wrapper--tPiNs",input_centered:"input_centered--3I7po","is-invalid":"is-invalid--Un0Xg","textarea-grow-wrap":"textarea-grow-wrap--CES2v","button-wrapper":"button-wrapper--dC7kk",button:"button--gURik",fadeIn:"fadeIn--WL4XY",fadeOut:"fadeOut--iRp81"};const n=s},3639:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.screen-orientation-lock--4vxfS{pointer-events:all;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;z-index:1;user-select:none;background-position:center center;background-size:cover;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTc2MiIgaGVpZ2h0PSI4MjkiIHZpZXdCb3g9IjAgMCAxNzYyIDgyOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxyZWN0IHdpZHRoPSIxNzYyIiBoZWlnaHQ9IjgyOSIgZmlsbD0iIzIxMjEyMSIvPg0KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02NjYgNTQ5QzY2MS41ODIgNTQ5IDY1OCA1NDUuNDE4IDY1OCA1NDFMNjU4IDM0OUM2NTggMzQ0LjU4MiA2NjEuNTgyIDM0MSA2NjYgMzQxTDk5NCAzNDFDOTk4LjQxOCAzNDEgMTAwMiAzNDQuNTgyIDEwMDIgMzQ5TDEwMDIgNTQxQzEwMDIgNTQ1LjQxOCA5OTguNDE4IDU0OSA5OTQgNTQ5TDY2NiA1NDlaTTY2OCA1NDFMOTYyIDU0MUw5NjIgMzQ5TDY2OCAzNDlMNjY4IDU0MVoiIGZpbGw9IiMzRjNGM0YiLz4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTAwIDIxNEM5MDAgMjA5LjU4MiA5MDMuNTgyIDIwNiA5MDggMjA2SDExMDBDMTEwNC40MiAyMDYgMTEwOCAyMDkuNTgyIDExMDggMjE0VjU0MkMxMTA4IDU0Ni40MTggMTEwNC40MiA1NTAgMTEwMCA1NTBIOTA4QzkwMy41ODIgNTUwIDkwMCA1NDYuNDE4IDkwMCA1NDJWMjE0Wk05MDggMjE2VjUxMEgxMTAwVjIxNkg5MDhaIiBmaWxsPSJ3aGl0ZSIvPg0KPHBhdGggZD0iTTgwMy41IDIxNkM3NTggMjIwLjUgNzEzLjUgMjU3IDcxNyAzMTcuNUM3MjEgMjc4IDc1OCAyMzcuNSA4MDMuNSAyNDIuNVYyNjRMODQ1LjUgMjI5TDgwMy41IDE5NS41VjIxNloiIGZpbGw9IndoaXRlIi8+DQo8L3N2Zz4=")}',""]),s.locals={"screen-orientation-lock":"screen-orientation-lock--4vxfS"};const n=s},7231:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".share-panel__body_screenshot--\\+-VL3{display:flex;flex-direction:column}.share-panel__body_screenshot--\\+-VL3 .share-panel-row--7dNdh{justify-content:center}.share-panel__body_screenshot--\\+-VL3 .share-panel-row--7dNdh:first-child{flex:0 0 450px;padding:1rem;box-sizing:border-box}.share-panel__body_screenshot--\\+-VL3 .share-panel-row--7dNdh:last-child{flex-basis:50px;padding:0}.share-panel__body_screenshot--\\+-VL3 .share-panel-row__image-link--Islxp{width:100%;height:100%;display:flex;justify-content:center}.share-panel__body_screenshot--\\+-VL3 .share-panel-row__image--fk\\+wi{max-width:100%;height:100%;object-fit:cover;border-radius:20px}.share-panel__body_screenshot--\\+-VL3 .share-item__download-button--gMuRx{align-self:center;cursor:pointer;height:100%;width:100%;text-decoration:none;color:#fff;display:flex;align-items:center;justify-content:center}",""]),s.locals={"share-panel__body_screenshot":"share-panel__body_screenshot--+-VL3","share-panel-row":"share-panel-row--7dNdh","share-panel-row__image-link":"share-panel-row__image-link--Islxp","share-panel-row__image":"share-panel-row__image--fk+wi","share-item__download-button":"share-item__download-button--gMuRx"};const n=s},9749:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".share-item--8FmHt{color:#fff}.social-list--5g9js{flex-wrap:wrap;height:auto;padding-bottom:1rem}.social-list--5g9js .social-list__item--UG-g9{margin-top:1rem}",""]),s.locals={"share-item":"share-item--8FmHt","social-list":"social-list--5g9js","social-list__item":"social-list__item--UG-g9"};const n=s},5839:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,'.share-panel-wrapper--dn9M6{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";position:absolute;top:0;left:0;right:0;bottom:0;z-index:2}.share-panel-wrapper--dn9M6 .share-panel-backdrop--MgwuI{display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.5)}.share-panel--yVlOc{position:absolute;top:auto;left:0;right:0;bottom:0;z-index:2;user-select:none}.share-panel-row--deDQ6{width:100%;height:150px;display:flex;flex-direction:row;align-items:center}.share-panel-row--deDQ6 .share-item--dKU92{cursor:pointer;flex:0 0 auto;width:69px;height:90px;margin:0 10px;display:flex;flex-direction:column;align-items:center;text-align:center}.share-panel-row--deDQ6 .share-item--dKU92:first-child{margin-left:20px}.share-panel-row--deDQ6 .share-item--dKU92:last-child{margin-right:20px}.share-panel-row--deDQ6 .share-item--dKU92,.share-panel-row--deDQ6 .share-item--dKU92:visited,.share-panel-row--deDQ6 .share-item--dKU92:active,.share-panel-row--deDQ6 .share-item--dKU92:focus{text-decoration:none}.share-panel-row--deDQ6 .share-item--dKU92 .share-item-title--DzDoA{margin-top:20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:.2rem}.share-panel-row--deDQ6.title-row--\\+CIE7{height:120px;padding-top:30px;padding-bottom:30px;padding-left:20px;padding-right:20px}.share-panel-row--deDQ6.title-row--\\+CIE7 .share-url-favicon--lcC7\\+{width:60px;height:60px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.share-panel-row--deDQ6.title-row--\\+CIE7 .share-url-favicon--lcC7\\+ img{width:30px;height:30px}.share-panel-row--deDQ6.title-row--\\+CIE7 .title--vZjLV{font-size:16px;line-height:1.4rem;margin-left:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.share-panel-separator--iqGC0{width:100%;height:1px}.share-panel--yVlOc{will-change:transform;transition:transform 300ms}.share-panel__body--Jik8H{width:100%;height:100%}@keyframes slideIn--EfZ6a{from{transform:translateY(100%)}to{transform:translateY(0%)}}@keyframes slideOut--1goeU{from{transform:translateY(0%)}to{transform:translateY(100%)}}@keyframes fadeIn--ebk1h{from{opacity:0}to{opacity:1}}@keyframes fadeOut--5l1DQ{from{opacity:1}to{opacity:0}}.fadeIn--ebk1h{animation:fadeIn--ebk1h 300ms forwards}.fadeOut--5l1DQ{animation:fadeOut--5l1DQ 300ms forwards}.slideIn--EfZ6a{animation:slideIn--EfZ6a 300ms forwards}.slideOut--1goeU{animation:slideOut--1goeU 300ms forwards}',""]),s.locals={"share-panel-wrapper":"share-panel-wrapper--dn9M6","share-panel-backdrop":"share-panel-backdrop--MgwuI","share-panel":"share-panel--yVlOc","share-panel-row":"share-panel-row--deDQ6","share-item":"share-item--dKU92","share-item-title":"share-item-title--DzDoA","title-row":"title-row--+CIE7","share-url-favicon":"share-url-favicon--lcC7+",title:"title--vZjLV","share-panel-separator":"share-panel-separator--iqGC0","share-panel__body":"share-panel__body--Jik8H",fadeIn:"fadeIn--ebk1h",fadeOut:"fadeOut--5l1DQ",slideIn:"slideIn--EfZ6a",slideOut:"slideOut--1goeU"};const n=s},8624:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var r=i(935),s=i.n(r)()((function(e){return e[1]}));s.push([e.id,".narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-link{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-link *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-quiz-answer{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-quiz-answer *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-data-input{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-data-input *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-range-slider-input-container .rangeslider{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-poll-button{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-poll-button *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-vote-answer{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-vote-answer *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-rate-input{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-rate-input *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-range-slider-next-button{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-range-slider-next-button *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-test-answer{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-test-answer *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-quiz-next-button,.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-test-next-button{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-quiz-next-button *,.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-test-next-button *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-copy{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-copy *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-share{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-share *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-story-repeat{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-story-repeat *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-game{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-game *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-image[data-link-target],.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-image[data-link-type=closeStory]{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-image[data-link-target] *,.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-image[data-link-type=closeStory] *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-swipe-up{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-swipe-up *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-swipe-up-items{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-swipe-up-items *{pointer-events:none}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-vote-next-button{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-vote-next-button *{pointer-events:none}",""]);const n=s},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,r){"string"==typeof e&&(e=[[null,e,""]]);var s={};if(r)for(var n=0;n<this.length;n++){var o=this[n][0];null!=o&&(s[o]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);r&&s[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},2743:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function s(e,t,i){return e.concat(t).map((function(e){return r(e,i)}))}function n(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,i){var s={};return i.isMergeableObject(e)&&n(e).forEach((function(t){s[t]=r(e[t],i)})),n(t).forEach((function(n){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,n)||(o(e,n)&&i.isMergeableObject(t[n])?s[n]=function(e,t){if(!t.customMerge)return l;var i=t.customMerge(e);return"function"==typeof i?i:l}(n,i)(e[n],t[n],i):s[n]=r(t[n],i))})),s}function l(e,i,n){(n=n||{}).arrayMerge=n.arrayMerge||s,n.isMergeableObject=n.isMergeableObject||t,n.cloneUnlessOtherwiseSpecified=r;var o=Array.isArray(i);return o===Array.isArray(e)?o?n.arrayMerge(e,i,n):a(e,i,n):r(i,n)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,i){return l(e,i,t)}),{})};var d=l;e.exports=d},46:e=>{"use strict";var t,i="object"==typeof Reflect?Reflect:null,r=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}e.exports=n,e.exports.once=function(e,t){return new Promise((function(i,r){function s(i){e.removeListener(t,n),r(i)}function n(){"function"==typeof e.removeListener&&e.removeListener("error",s),i([].slice.call(arguments))}g(e,t,n,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&g(e,"error",t,i)}(e,s,{once:!0})}))},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var o=10;function a(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?n.defaultMaxListeners:e._maxListeners}function d(e,t,i,r){var s,n,o,d;if(a(i),void 0===(n=e._events)?(n=e._events=Object.create(null),e._eventsCount=0):(void 0!==n.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),n=e._events),o=n[t]),void 0===o)o=n[t]=i,++e._eventsCount;else if("function"==typeof o?o=n[t]=r?[i,o]:[o,i]:r?o.unshift(i):o.push(i),(s=l(e))>0&&o.length>s&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,d=c,console&&console.warn&&console.warn(d)}return e}function c(){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,i){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},s=c.bind(r);return s.listener=i,r.wrapFn=s,s}function h(e,t,i){var r=e._events;if(void 0===r)return[];var s=r[t];return void 0===s?[]:"function"==typeof s?i?[s.listener||s]:[s]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(s):f(s,s.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(e,t){for(var i=new Array(t),r=0;r<t;++r)i[r]=e[r];return i}function g(e,t,i,r){if("function"==typeof e.on)r.once?e.once(t,i):e.on(t,i);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 s(n){r.once&&e.removeEventListener(t,s),i(n)}))}}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),n.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},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(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},n.prototype.getMaxListeners=function(){return l(this)},n.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var s="error"===e,n=this._events;if(void 0!==n)s=s&&void 0===n.error;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=n[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var d=l.length,c=f(l,d);for(i=0;i<d;++i)r(c[i],this,t)}return!0},n.prototype.addListener=function(e,t){return d(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return d(this,e,t,!0)},n.prototype.once=function(e,t){return a(t),this.on(e,u(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,u(this,e,t)),this},n.prototype.removeListener=function(e,t){var i,r,s,n,o;if(a(t),void 0===(r=this._events))return this;if(void 0===(i=r[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(s=-1,n=i.length-1;n>=0;n--)if(i[n]===t||i[n].listener===t){o=i[n].listener,s=n;break}if(s<0)return this;0===s?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,s),1===i.length&&(r[e]=i[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,i,r;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var s,n=Object.keys(i);for(r=0;r<n.length;++r)"removeListener"!==(s=n[r])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},n.prototype.listeners=function(e){return h(this,e,!0)},n.prototype.rawListeners=function(e){return h(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},n.prototype.listenerCount=p,n.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},5985:(e,t,i)=>{"use strict";var r=i(524),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?o:a[e.$$typeof]||s}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=o;var d=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,i,r){if("string"!=typeof i){if(f){var s=p(i);s&&s!==f&&e(t,s,r)}var o=c(i);u&&(o=o.concat(u(i)));for(var a=l(t),g=l(i),v=0;v<o.length;++v){var m=o[v];if(!(n[m]||r&&r[m]||g&&g[m]||a&&a[m])){var y=h(i,m);try{d(t,m,y)}catch(e){}}}}return t}},3103:(e,t,i)=>{var r=i(4715)(i(8942),"DataView");e.exports=r},5098:(e,t,i)=>{var r=i(3305),s=i(9361),n=i(1112),o=i(5276),a=i(7452);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=s,l.prototype.get=n,l.prototype.has=o,l.prototype.set=a,e.exports=l},1386:(e,t,i)=>{var r=i(2393),s=i(2049),n=i(7144),o=i(5071),a=i(3964);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=s,l.prototype.get=n,l.prototype.has=o,l.prototype.set=a,e.exports=l},9770:(e,t,i)=>{var r=i(4715)(i(8942),"Map");e.exports=r},8250:(e,t,i)=>{var r=i(9753),s=i(5681),n=i(88),o=i(4732),a=i(9068);function l(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=s,l.prototype.get=n,l.prototype.has=o,l.prototype.set=a,e.exports=l},9413:(e,t,i)=>{var r=i(4715)(i(8942),"Promise");e.exports=r},4512:(e,t,i)=>{var r=i(4715)(i(8942),"Set");e.exports=r},3212:(e,t,i)=>{var r=i(8250),s=i(1877),n=i(8006);function o(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new r;++t<i;)this.add(e[t])}o.prototype.add=o.prototype.push=s,o.prototype.has=n,e.exports=o},5650:(e,t,i)=>{var r=i(8942).Symbol;e.exports=r},9270:(e,t,i)=>{var r=i(4715)(i(8942),"WeakMap");e.exports=r},9756:(e,t,i)=>{var r=i(2478);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},3316:e=>{e.exports=function(e,t,i){for(var r=-1,s=null==e?0:e.length;++r<s;)if(i(t,e[r]))return!0;return!1}},1129:e=>{e.exports=function(e,t){for(var i=-1,r=t.length,s=e.length;++i<r;)e[s+i]=t[i];return e}},7034:(e,t,i)=>{var r=i(6285);e.exports=function(e,t){for(var i=e.length;i--;)if(r(e[i][0],t))return i;return-1}},7250:e=>{e.exports=function(e,t,i,r){for(var s=e.length,n=i+(r?1:-1);r?n--:++n<s;)if(t(e[n],n,e))return n;return-1}},313:(e,t,i)=>{var r=i(1129),s=i(714);e.exports=function e(t,i,n,o,a){var l=-1,d=t.length;for(n||(n=s),a||(a=[]);++l<d;){var c=t[l];i>0&&n(c)?i>1?e(c,i-1,n,o,a):r(a,c):o||(a[a.length]=c)}return a}},7379:(e,t,i)=>{var r=i(5650),s=i(8870),n=i(9005),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?s(e):n(e)}},2478:(e,t,i)=>{var r=i(7250),s=i(9454),n=i(7706);e.exports=function(e,t,i){return t==t?n(e,t,i):r(e,s,i)}},6027:(e,t,i)=>{var r=i(7379),s=i(547);e.exports=function(e){return s(e)&&"[object Arguments]"==r(e)}},9454:e=>{e.exports=function(e){return e!=e}},9624:(e,t,i)=>{var r=i(3655),s=i(4759),n=i(1580),o=i(4066),a=/^\[object .+?Constructor\]$/,l=Function.prototype,d=Object.prototype,c=l.toString,u=d.hasOwnProperty,h=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!n(e)||s(e))&&(r(e)?h:a).test(o(e))}},674:(e,t,i)=>{var r=i(7379),s=i(5387),n=i(547),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return n(e)&&s(e.length)&&!!o[r(e)]}},195:(e,t,i)=>{var r=i(4882),s=i(8121),n=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return s(e);var t=[];for(var i in Object(e))n.call(e,i)&&"constructor"!=i&&t.push(i);return t}},6403:(e,t,i)=>{var r=i(2945),s=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(s,""):e}},9460:e=>{e.exports=function(e){return function(t){return e(t)}}},5630:(e,t,i)=>{var r=i(3212),s=i(9756),n=i(3316),o=i(5568),a=i(6208),l=i(9828);e.exports=function(e,t,i){var d=-1,c=s,u=e.length,h=!0,p=[],f=p;if(i)h=!1,c=n;else if(u>=200){var g=t?null:a(e);if(g)return l(g);h=!1,c=o,f=new r}else f=t?[]:p;e:for(;++d<u;){var v=e[d],m=t?t(v):v;if(v=i||0!==v?v:0,h&&m==m){for(var y=f.length;y--;)if(f[y]===m)continue e;t&&f.push(m),p.push(v)}else c(f,m,i)||(f!==p&&f.push(m),p.push(v))}return p}},5568:e=>{e.exports=function(e,t){return e.has(t)}},4354:e=>{e.exports=function(e,t){var i=-1,r=e.length;for(t||(t=Array(r));++i<r;)t[i]=e[i];return t}},1950:(e,t,i)=>{var r=i(8942)["__core-js_shared__"];e.exports=r},6208:(e,t,i)=>{var r=i(4512),s=i(9071),n=i(9828),o=r&&1/n(new r([,-0]))[1]==1/0?function(e){return new r(e)}:s;e.exports=o},4967:(e,t,i)=>{var r="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;e.exports=r},4700:(e,t,i)=>{var r=i(9067);e.exports=function(e,t){var i=e.__data__;return r(t)?i["string"==typeof t?"string":"hash"]:i.map}},4715:(e,t,i)=>{var r=i(9624),s=i(155);e.exports=function(e,t){var i=s(e,t);return r(i)?i:void 0}},8870:(e,t,i)=>{var r=i(5650),s=Object.prototype,n=s.hasOwnProperty,o=s.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=n.call(e,a),i=e[a];try{e[a]=void 0;var r=!0}catch(e){}var s=o.call(e);return r&&(t?e[a]=i:delete e[a]),s}},8486:(e,t,i)=>{var r=i(3103),s=i(9770),n=i(9413),o=i(4512),a=i(9270),l=i(7379),d=i(4066),c="[object Map]",u="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=d(r),v=d(s),m=d(n),y=d(o),w=d(a),S=l;(r&&S(new r(new ArrayBuffer(1)))!=f||s&&S(new s)!=c||n&&S(n.resolve())!=u||o&&S(new o)!=h||a&&S(new a)!=p)&&(S=function(e){var t=l(e),i="[object Object]"==t?e.constructor:void 0,r=i?d(i):"";if(r)switch(r){case g:return f;case v:return c;case m:return u;case y:return h;case w:return p}return t}),e.exports=S},155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},3305:(e,t,i)=>{var r=i(4497);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},9361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},1112:(e,t,i)=>{var r=i(4497),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return s.call(t,e)?t[e]:void 0}},5276:(e,t,i)=>{var r=i(4497),s=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:s.call(t,e)}},7452:(e,t,i)=>{var r=i(4497);e.exports=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},714:(e,t,i)=>{var r=i(5650),s=i(3283),n=i(3142),o=r?r.isConcatSpreadable:void 0;e.exports=function(e){return n(e)||s(e)||!!(o&&e&&e[o])}},9067:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4759:(e,t,i)=>{var r,s=i(1950),n=(r=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!n&&n in e}},4882:e=>{var t=Object.prototype;e.exports=function(e){var i=e&&e.constructor;return e===("function"==typeof i&&i.prototype||t)}},2393:e=>{e.exports=function(){this.__data__=[],this.size=0}},2049:(e,t,i)=>{var r=i(7034),s=Array.prototype.splice;e.exports=function(e){var t=this.__data__,i=r(t,e);return!(i<0)&&(i==t.length-1?t.pop():s.call(t,i,1),--this.size,!0)}},7144:(e,t,i)=>{var r=i(7034);e.exports=function(e){var t=this.__data__,i=r(t,e);return i<0?void 0:t[i][1]}},5071:(e,t,i)=>{var r=i(7034);e.exports=function(e){return r(this.__data__,e)>-1}},3964:(e,t,i)=>{var r=i(7034);e.exports=function(e,t){var i=this.__data__,s=r(i,e);return s<0?(++this.size,i.push([e,t])):i[s][1]=t,this}},9753:(e,t,i)=>{var r=i(5098),s=i(1386),n=i(9770);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(n||s),string:new r}}},5681:(e,t,i)=>{var r=i(4700);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},88:(e,t,i)=>{var r=i(4700);e.exports=function(e){return r(this,e).get(e)}},4732:(e,t,i)=>{var r=i(4700);e.exports=function(e){return r(this,e).has(e)}},9068:(e,t,i)=>{var r=i(4700);e.exports=function(e,t){var i=r(this,e),s=i.size;return i.set(e,t),this.size+=i.size==s?0:1,this}},4497:(e,t,i)=>{var r=i(4715)(Object,"create");e.exports=r},8121:(e,t,i)=>{var r=i(3766)(Object.keys,Object);e.exports=r},2306:(e,t,i)=>{e=i.nmd(e);var r=i(4967),s=t&&!t.nodeType&&t,n=s&&e&&!e.nodeType&&e,o=n&&n.exports===s&&r.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a},9005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3766:e=>{e.exports=function(e,t){return function(i){return e(t(i))}}},8942:(e,t,i)=>{var r=i(4967),s="object"==typeof self&&self&&self.Object===Object&&self,n=r||s||Function("return this")();e.exports=n},1877:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},8006:e=>{e.exports=function(e){return this.__data__.has(e)}},9828:e=>{e.exports=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}},7706:e=>{e.exports=function(e,t,i){for(var r=i-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}},4066:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2945:e=>{var t=/\s/;e.exports=function(e){for(var i=e.length;i--&&t.test(e.charAt(i)););return i}},4871:(e,t,i)=>{var r=i(1129),s=i(313),n=i(4354),o=i(3142);e.exports=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),i=arguments[0],a=e;a--;)t[a-1]=arguments[a];return r(o(i)?n(i):[i],s(t,1))}},2784:(e,t,i)=>{var r=i(1580),s=i(4495),n=i(6131),o=Math.max,a=Math.min;e.exports=function(e,t,i){var l,d,c,u,h,p,f=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var i=l,r=d;return l=d=void 0,f=t,u=e.apply(r,i)}function w(e){var i=e-p;return void 0===p||i>=t||i<0||v&&e-f>=c}function S(){var e=s();if(w(e))return b(e);h=setTimeout(S,function(e){var i=t-(e-p);return v?a(i,c-(e-f)):i}(e))}function b(e){return h=void 0,m&&l?y(e):(l=d=void 0,u)}function _(){var e=s(),i=w(e);if(l=arguments,d=this,p=e,i){if(void 0===h)return function(e){return f=e,h=setTimeout(S,t),g?y(e):u}(p);if(v)return clearTimeout(h),h=setTimeout(S,t),y(p)}return void 0===h&&(h=setTimeout(S,t)),u}return t=n(t)||0,r(i)&&(g=!!i.leading,c=(v="maxWait"in i)?o(n(i.maxWait)||0,t):c,m="trailing"in i?!!i.trailing:m),_.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=d=h=void 0},_.flush=function(){return void 0===h?u:b(s())},_}},6285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3981:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},3283:(e,t,i)=>{var r=i(6027),s=i(547),n=Object.prototype,o=n.hasOwnProperty,a=n.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return s(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},3142:e=>{var t=Array.isArray;e.exports=t},6529:(e,t,i)=>{var r=i(3655),s=i(5387);e.exports=function(e){return null!=e&&s(e.length)&&!r(e)}},5853:(e,t,i)=>{e=i.nmd(e);var r=i(8942),s=i(4772),n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,a=o&&o.exports===n?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||s;e.exports=l},3514:(e,t,i)=>{var r=i(195),s=i(8486),n=i(3283),o=i(3142),a=i(6529),l=i(5853),d=i(4882),c=i(8666),u=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(o(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||n(e)))return!e.length;var t=s(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(d(e))return!r(e).length;for(var i in e)if(u.call(e,i))return!1;return!0}},3655:(e,t,i)=>{var r=i(7379),s=i(1580);e.exports=function(e){if(!s(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},5387:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},986:(e,t,i)=>{var r=i(7379),s=i(547);e.exports=function(e){return"number"==typeof e||s(e)&&"[object Number]"==r(e)}},1580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8138:(e,t,i)=>{var r=i(7379),s=i(3142),n=i(547);e.exports=function(e){return"string"==typeof e||!s(e)&&n(e)&&"[object String]"==r(e)}},1187:(e,t,i)=>{var r=i(7379),s=i(547);e.exports=function(e){return"symbol"==typeof e||s(e)&&"[object Symbol]"==r(e)}},8666:(e,t,i)=>{var r=i(674),s=i(9460),n=i(2306),o=n&&n.isTypedArray,a=o?s(o):r;e.exports=a},9071:e=>{e.exports=function(){}},4495:(e,t,i)=>{var r=i(8942);e.exports=function(){return r.Date.now()}},4772:e=>{e.exports=function(){return!1}},6131:(e,t,i)=>{var r=i(6403),s=i(1580),n=i(1187),o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return NaN;if(s(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=s(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var i=a.test(e);return i||l.test(e)?d(e.slice(2),i?2:8):o.test(e)?NaN:+e}},2438:(e,t,i)=>{var r=i(5630);e.exports=function(e){return e&&e.length?r(e):[]}},320:(e,t)=>{"use strict";
2
2
  /** @license React v16.13.1
3
3
  * react-is.production.min.js
4
4
  *
@@ -33,7 +33,7 @@
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var r=i(9155),s=i(8139);var n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=s.useSyncExternalStore,a=r.useRef,l=r.useEffect,d=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,i,r,s){var u=a(null);if(null===u.current){var h={hasValue:!1,value:null};u.current=h}else h=u.current;u=d((function(){function e(e){if(!l){if(l=!0,o=e,e=r(e),void 0!==s&&h.hasValue){var t=h.value;if(s(t,e))return a=t}return a=e}if(t=a,n(o,e))return t;var i=r(e);return void 0!==s&&s(t,i)?t:(o=e,a=i)}var o,a,l=!1,d=void 0===i?null:i;return[function(){return e(t())},null===d?void 0:function(){return e(d())}]}),[t,i,r,s]);var p=o(e,u[0],u[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),c(p),p}},8139:(e,t,i)=>{"use strict";e.exports=i(4026)},7121:(e,t,i)=>{"use strict";e.exports=i(4965)},8384:e=>{"use strict";e.exports=n},1869:e=>{"use strict";e.exports=l},5729:e=>{"use strict";e.exports=a},5136:e=>{"use strict";e.exports=i},3107:e=>{"use strict";e.exports=r},992:e=>{"use strict";e.exports=o},2840:t=>{"use strict";t.exports=e},9780:e=>{"use strict";e.exports=c},9155:e=>{"use strict";e.exports=s},2265:e=>{"use strict";e.exports=d},7315:e=>{"use strict";e.exports=t}},h={};function p(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={id:e,loaded:!1,exports:{}};return u[e].call(i.exports,i,i.exports,p),i.loaded=!0,i.exports}p.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return p.d(t,{a:t}),t},p.d=(e,t)=>{for(var i in t)p.o(t,i)&&!p.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),p.nc=void 0;var f={};return(()=>{"use strict";p.r(f),p.d(f,{CloseButtonPosition:()=>j,FavoriteStoryList:()=>Ch,GoodsWidgetRenderingType:()=>re,IASContainer:()=>Tu,SharePageEvents:()=>ft,StoriesListCardCoverQuality:()=>q,StoriesListCardTitlePosition:()=>H,StoriesListCardTitleTextAlign:()=>$,StoriesListCardViewVariant:()=>W,StoriesListDirection:()=>Z,StoryList:()=>_h,StoryManager:()=>co,StoryReaderSwipeStyle:()=>J,UGCStoryList:()=>xh,storyManager:()=>go});p(5845);var e=p(2840);class t extends Error{constructor(e){super(`Invalid language tag: ${e}. The "lang" value must be comply with the RFC 5646 (also known as BCP 47). Examples of valid language tags include "en-US", "fr-FR", "es-ES", etc.`)}}const i="en-US";class r{constructor(e=i){const t=this.normalizeAndEnsureCompatibility(e),r=this.validateTag(t);this.parseTag(r)}isValidTag(e){return/^[a-z]+-[a-zA-Z]+$/.test(e)}toString(){return this.tag}normalizeAndEnsureCompatibility(e){const t=e.toLowerCase();return this.ensureBackwardCompatibility(t)}ensureBackwardCompatibility(e){var t;return null!==(t={ru:"ru-RU",en:"en-US"}[e])&&void 0!==t?t:e}validateTag(e){return this.isValidTag(e)?e:(console.error(new t(e).message),this.getNavigatorTag())}getNavigatorTag(){const e=navigator.language.toLowerCase();return this.isValidTag(e)?e:(console.error(`Invalid navigator language tag: ${e}`),i)}parseTag(e){const[t,i]=e.split("-");this.languageCode=t,this.countryCode=i.toUpperCase(),this.tag=`${this.languageCode}-${this.countryCode}`}}const s={apiKey:"",disableStatistic:!1,disableDeviceId:!1,lang:new r};var n=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i};const o=(0,e.createStore)(s),a=(0,e.createEvent)();o.on(a,((e,t)=>{var{disableStatistic:i,disableDeviceId:s}=t,o=n(t,["disableStatistic","disableDeviceId"]);return Object.assign(Object.assign({disableStatistic:null!=i?i:e.disableStatistic,disableDeviceId:null!=s?s:e.disableDeviceId},o),{lang:new r(o.lang)})}));const l=(0,e.createEvent)();o.on(l,((e,{tags:t})=>Object.assign(Object.assign({},e),{tags:t})));const d=(0,e.createEvent)();o.on(d,((e,{userId:t})=>Object.assign(Object.assign({},e),{userId:t})));const c=(0,e.createEvent)();o.on(c,((e,{placeholders:t})=>Object.assign(Object.assign({},e),{placeholders:t})));const u=(0,e.createEvent)();o.on(u,((e,{imagePlaceholders:t})=>Object.assign(Object.assign({},e),{imagePlaceholders:t})));const h=(0,e.createEvent)();o.on(h,((e,{lang:t})=>Object.assign(Object.assign({},e),{lang:new r(t)})));const g=(0,e.createStore)(""),v=(0,e.createEvent)();(0,e.sample)({clock:v,target:g});const m=(0,e.createStore)({session:{id:"",expire_in:0},server_timestamp:0,content_base_url:"",user_key:"",share:!1,is_allow_profiling:!1,cache:[],placeholders:[],image_placeholders:[],editor:null,storyWidgetsResources:[],is_allow_ugc:!1}),y=(0,e.createEffect)();m.on(y.doneData,((e,t)=>t));const w=(0,e.createEvent)(),S=(0,e.createEvent)();m.on(S,(e=>{const t=Object.assign({},e);return t.session.id="",t}));const b=(0,e.createEffect)((e=>{N("session/update",e,(()=>{}))})).prepend((e=>({data:[[5,0,...e]]})));var _=p(7315);class x{static createFunctionWithTimeout(e,t){let i=!1;function r(){i||(i=!0,e())}return setTimeout(r,t||1e3),r}static convertModelToFormData(e,t,i){t instanceof Object&&Object.keys(t).forEach((r=>{const s=t[r];if(s instanceof Object&&!Array.isArray(s))return this.convertModelToFormData(e,s,r);i&&(r=`${i}[${r}]`),Array.isArray(s)?s.forEach((t=>{e.append(`${r}[]`,t)})):e.append(r,s)}))}}const C=e=>null==e;function k(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)}function A(e,t){return Object.assign(Object.assign({},e),t)}function L(e){return e.replace(/^\//,"")}const M={baseUrl:"https://sdk.inappstory.ru",apiUrl:"https://api.inappstory.ru",faviconApiUrl:"https://favicon.inappstory.ru"};function O(e){if(e.length>32)try{const t=function(e){const t=(e=e.replace(new RegExp("-","g"),"+").replace(new RegExp("_","g"),"/")).length;return e=function(e,t,i){return void 0===t?e:t.length>=e.length?t:i?(e+t).slice(-e.length):(t+e).substring(0,e.length)}(new Array(t%4).fill("=").join(""),e,!1),window.atob(e)}(e),i=t.charCodeAt(13);if(i>0){let e=t.substr(14,i);e=e.replace(/\0+$/,"");const r="{QQN{xuV?1Dv16j3";let s=r,n=0;for(;s.length<i;)s+=r[n],n++,n===r.length&&(n=0);let o="";for(let t=0;t<i;t++)o+=String.fromCharCode(e.charCodeAt(t)^s.charCodeAt(t));return new URL(`https://${o}`).host}}catch(e){console.error(e)}return null}function E(e){const t=O(e);if(null!=t){const e=t.split(".").slice(1);M.baseUrl=`https://${["sdk",...e].join(".")}`,M.faviconApiUrl=`https://${["favicon",...e].join(".")}`,M.apiUrl=`https://${t}`}}function I(e){let t=e.length;for(let i=e.length-1;i>=0;i--){const r=e.charCodeAt(i);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&i--}return t}class T{constructor(){return this._sdkConfigIsIncorrect=!1,this._userIdByteLimit=255,this._tagsByteLimit=4e3,this.userMessage="",this.tagsMessage="",T.instance||(T.instance=this),T.instance}static getInstance(){return T.instance?T.instance:new T}get sdkConfigIsIncorrect(){return this._sdkConfigIsIncorrect}get sdkConfigErrorsAsArray(){const e=[];return this.userMessage&&e.push(this.userMessage),this.tagsMessage&&e.push(this.tagsMessage),e}checkUserIdLength(e){this.userMessage="",null!=e&&I(String(e))>this._userIdByteLimit&&(console.error(`UserId is bigger then ${this._userIdByteLimit} bytes`),this._sdkConfigIsIncorrect=!0,this.userMessage=`UserId "${String(e)}" is bigger then ${this._userIdByteLimit} bytes`)}checkTagsLength(e){this.tagsMessage="",null!=e&&Array.isArray(e)&&I(e.join(","))>this._tagsByteLimit&&(console.error(`Tags (joined by ',') is bigger then ${this._tagsByteLimit} bytes`),this._sdkConfigIsIncorrect=!0,this.tagsMessage=`Tags (joined by ',') "${e.join(",")}" is bigger then ${this._tagsByteLimit} bytes`)}}var R=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const P=`InAppStoryWebSDK/${parseInt(500)} ${navigator.userAgent}`;const D=new class{constructor(){this._deviceInfoPromise=null,this._baseHeaders={},this.requestInterceptors=[],this.interceptors={request:{use:e=>{this.requestInterceptors.push(e)}}}}set deviceInfoPromise(e){this._deviceInfoPromise=e}set baseHeaders(e){this._baseHeaders=e}get baseURL(){return`${M.apiUrl}/v2/`}request(e){return R(this,void 0,void 0,(function*(){return new Promise(((t,i)=>{const r=()=>R(this,void 0,void 0,(function*(){try{if(k(e.headers)&&null!=e.headers||(e.headers={}),e.headers=A(this._baseHeaders,e.headers),this.requestInterceptors.length)for(const t of this.requestInterceptors)t(e);let i="";!C(e.params)&&k(e.params)&&(i=new URLSearchParams(Object.entries(e.params)).toString());let r=new URL(`${L(e.url)}${i?"?"+i:""}`,this.baseURL),s="get";C(e.method)||(s=e.method);let n={};!C(e.headers)&&k(e.headers)&&(n=e.headers);let o=null;!C(e.data)&&k(e.data)&&(o=JSON.stringify(e.data),n["Content-Type"]="application/json");try{if(T.getInstance().sdkConfigIsIncorrect)return void t({data:{name:"SDK config is incorrect",message:T.getInstance().sdkConfigErrorsAsArray.join(". "),status:400},headersRaw:{},headers:{},status:400,statusText:"SDK config is incorrect",ok:!1})}catch(e){console.error(e)}const a=yield fetch(r.toString(),{method:s,body:o,headers:n,credentials:"omit"}),l=yield a.json();t({data:l,headersRaw:a.headers,headers:Object.fromEntries([...a.headers]),status:a.status,statusText:a.statusText,ok:a.ok})}catch(e){i(e)}}));this._deviceInfoPromise?this._deviceInfoPromise.finally(r):r()}))}))}post(e,t){return R(this,void 0,void 0,(function*(){return this.request({method:"post",url:e,data:t})}))}get(e,t){return R(this,void 0,void 0,(function*(){return this.request({method:"get",url:e,params:t})}))}};function N(e,t,i){var r,s,n;if("sendBeacon"in navigator){const a=new URLSearchParams({access_token:o.getState().apiKey,session_id:null===(s=null===(r=m.getState())||void 0===r?void 0:r.session)||void 0===s?void 0:s.id,x_user_agent:P}),l=o.getState();null!=l.appPackageId&&a.append("x_app_package_id",l.appPackageId);const d=`${n=D.baseURL,n.replace(/\/$/,"")}/${L(e)}?${a.toString()}`,c=new FormData;Object.keys(t).forEach((e=>{x.convertModelToFormData(c,t[e],e)}));let u=!1;null!=Array.from&&null!=c.keys&&(u=0===Array.from(c.keys()).length),u||navigator.sendBeacon(d,c),i()}else D.post(e,t).then((()=>i()),(()=>i()))}D.interceptors.request.use((e=>{var t,i,r;const s=o.getState();return e.headers=A(null!==(t=e.headers)&&void 0!==t?t:{},{Authorization:`Bearer ${s.apiKey}`,"Accept-Language":s.lang||"en","Auth-Session-Id":null===(r=null===(i=m.getState())||void 0===i?void 0:i.session)||void 0===r?void 0:r.id,"X-Device-Id":g.getState(),"X-User-Id":s.userId?s.userId:"","X-Request-Id":(0,_.v4)(),"X-User-Agent":P}),null!=s.appPackageId&&(e.headers["X-App-Package-Id"]=s.appPackageId),s.disableDeviceId||(e.headers["X-Device-Id"]=g.getState()),e}));const B=D;var F;!function(e){e.UPDATE="update"}(F||(F={}));Error;var j,U=p(46),V=p.n(U);!function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(j||(j={}));const G={hasFavorite:!1,hasLike:!1,hasShare:!1,closeButtonPosition:j.END,loader:{default:{color:"white",accentColor:"transparent"},custom:null},closeButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M30 15.2115C30 23.4958 23.2843 30.2115 15 30.2115C6.71573 30.2115 0 23.4958 0 15.2115C0 6.92728 6.71573 0.211548 15 0.211548C23.2843 0.211548 30 6.92728 30 15.2115Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.8309 10.0424C10.0969 9.77646 10.5281 9.77646 10.7941 10.0424L15 14.2483L19.2059 10.0424C19.4719 9.77646 19.9031 9.77646 20.1691 10.0424C20.4351 10.3084 20.4351 10.7397 20.1691 11.0057L15.9632 15.2115L20.1691 19.4174C20.4351 19.6834 20.4351 20.1147 20.1691 20.3807C19.9031 20.6466 19.4719 20.6466 19.2059 20.3807L15 16.1748L10.7941 20.3807C10.5281 20.6466 10.0969 20.6466 9.8309 20.3807C9.56492 20.1147 9.56492 19.6834 9.8309 19.4174L14.0368 15.2115L9.8309 11.0057C9.56492 10.7397 9.56492 10.3084 9.8309 10.0424Z" fill="#C2C2C4"/>\n</svg>'}},forceDesktopMode:void 0};var z,W,$,H,q,Z,Y;!function(e){e.CENTER="center",e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(z||(z={})),function(e){e.CIRCLE="circle",e.QUAD="quad",e.RECTANGLE="rectangle"}(W||(W={})),function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end",e.CENTER="center"}($||($={})),function(e){e.CARD_INSIDE_BOTTOM="cardInsideBottom",e.CARD_OUTSIDE_TOP="cardOutsideTop",e.CARD_OUTSIDE_BOTTOM="cardOutsideBottom"}(H||(H={})),function(e){e.Medium="medium",e.High="high"}(q||(q={})),function(e){e.COLUMN="vertical",e.ROW="horizontal"}(Z||(Z={})),function(e){e.START_LOADER="startLoad",e.END_LOADER="endLoad"}(Y||(Y={}));const X={direction:Z.ROW,card:{title:{font:'14px/1.2 system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',color:"#ffffff",padding:15,textAlign:$.START,position:H.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:q.High,variant:W.CIRCLE,border:{radius:0,color:"black",width:2,gap:3,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null,opened:{border:{radius:null,color:null,width:null,gap:null,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null},coverLazyLoading:!1},favoriteCard:{title:{content:"Избранное",font:"normal",color:"#000",padding:15,textAlign:$.START,position:H.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:q.High,coverLazyLoading:!1,variant:W.CIRCLE,border:{radius:0,color:"black",width:2,gap:3,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null,opened:{border:{radius:null,color:null,width:null,gap:null,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null}},sidePadding:20,topPadding:20,bottomPadding:20,bottomMargin:17,layout:{height:0,backgroundColor:"transparent",sliderAlign:z.START},navigation:{speed:300,showControls:!1,controlsSize:48,controlsBackgroundColor:"white",controlsColor:"black"},ugcCard:{title:{content:null,font:'14px/1.2 system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',color:"#000",padding:15,textAlign:$.START,position:H.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:q.High,coverLazyLoading:!1,variant:W.CIRCLE,border:{radius:0,color:"transparent",width:0,gap:0,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null,image:{svgSrc:{baseState:'<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M50 85.5C69.6061 85.5 85.5 69.6061 85.5 50C85.5 30.3939 69.6061 14.5 50 14.5C30.3939 14.5 14.5 30.3939 14.5 50C14.5 69.6061 30.3939 85.5 50 85.5Z" stroke="white" stroke-width="2"/>\n<path d="M50.5 34.5V65.5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M34.5 49.5H65.5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}},backgroundColor:"#0c62f3"}},Q={label:"X",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" viewBox="0 0 195 195" xmlns="http://www.w3.org/2000/svg">\n<g transform="matrix(.20227 0 0 .20302 -71 -26.7)">\n<circle cx="834.3" cy="610.6" r="481.3" stroke="#fff" strokeMiterlimit="10"/>\n<path d="m537.8 331.8 230 307.6-231.4 250.1h52.2l202.6-219 163.8 219h177.3l-243-324.9 215.5-232.8h-52l-187 201.7-150.7-201.7zm76.6 38.4h81.5l359.7 481h-81.5z" fill="#fff"/>\n</g>\n</svg>\n'}},getUrl:({url:e,text:t})=>`https://twitter.com/share?url=${e}&text=${t}`},K={targets:["vk","ok","facebook","x","linkedin","telegram"],targetParams:{vk:{label:"VK",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">\n<circle cx="24" cy="24" r="21.3" fill="#fff"/>\n<path d="M22.3.7a23.3 23.3 0 0 0-5 45.6A23.4 23.4 0 0 0 30.7 1.7C28 .8 25.2.6 22.3.7Zm1.8 14.5c1.2.1 1.8.3 2 .6l.3.6c.2.4.2.8 0 4.3 0 2.2 0 2.9.2 3.4s.7.8 1.1.6a8 8 0 0 0 1.8-2 29 29 0 0 0 3-5.8c.3-.4.5-.7.8-.8h7.1a.7.7 0 0 1 .5.8c0 .7-.8 2.2-2 4a92.7 92.7 0 0 1-3.5 4.8c-.3.5-.2 1 .2 1.6l1.4 1.4c1.8 1.7 2.6 2.6 3.3 3.6.4.7.6 1.2.5 1.7 0 .2-.2.5-.5.6-.4.2-.9.2-3.7.3H34l-.5-.1c-1-.4-1.8-1-3.5-3-.9-1-1.6-1.5-2-1.5-.5 0-1 .6-1.3 1.3-.1.5-.2.8-.2 1.7-.1 1-.2 1.2-.8 1.5H22a9.5 9.5 0 0 1-4.2-1.4c-1.9-1.1-3-2.2-4.4-3.8a48.7 48.7 0 0 1-7.2-12.5c-.1-.5 0-.9.5-1l3-.1h3c.5.3.7.5 1 1.4L16 22c.5.9 1 1.6 1.5 2 .6.6.9.7 1.3.7.3 0 .4-.1.6-.6.5-1 .6-4.8.1-6.3-.2-.8-.6-1.1-1.7-1.3-.2 0-.2-.2 0-.4.4-.6 1.1-.9 2.6-1H24Z" fill="#45668E"/>\n</svg>'}},getUrl:({url:e,text:t})=>`https://vk.com/share.php?url=${e}&title=${t}`},facebook:{label:"Facebook",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" viewBox="126.4 2.3 589 589" xmlns="http://www.w3.org/2000/svg">\n<circle cx="420.9" cy="296.8" r="294.5" fill="#3c5a9a"/>\n<path d="M516.7 92.7h-65.2c-38.8 0-81.8 16.3-81.8 72.4.2 19.5 0 38.3 0 59.3h-44.8v71.3h46.2V501h84.8V294.4h56l5-70.2h-62.4V184c0-22.2 23-21 24.4-21h37.8V92.8z" fill="#fff"/>\n</svg>\n'}},getUrl:({url:e,text:t})=>`https://www.facebook.com/sharer.php?u=${e}&t=${t}`},x:Q,twitter:Q,linkedin:{label:"LinkedIn",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" enableBackground="new 0 0 550 550" version="1.1" viewBox="0 0 550 550" xmlSpace="preserve" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink">\n<circle cx="275" cy="275" r="256" fill="#04689B"/>\n<path d="m219.2 366.5h-38.8v-124.3h38.8v124.3zm-20.4-139.9h-0.3c-14.1 0-23.2-9.5-23.2-21.6 0-12.3 9.4-21.6 23.7-21.6s23.1 9.3 23.4 21.5c0.1 12.2-9 21.7-23.6 21.7zm175.8 139.9h-44v-64.3c0-16.8-6.9-28.3-22-28.3-11.6 0-18 7.7-21 15.2-1.1 2.7-0.9 6.4-0.9 10.2v67.3h-43.7s0.6-113.9 0-124.3h43.6v19.5c2.6-8.5 16.5-20.7 38.8-20.7 27.6 0 49.3 17.9 49.3 56.4v69z" fill="#fff"/>\n</svg>\n'}},getUrl:({url:e,text:t})=>`https://www.linkedin.com/sharing/share-offsite/?url=${e}&title=${t}`},telegram:{label:"Telegram",icon:{svgSrc:{baseState:'<svg data-v-05f1b0f5="" data-v-b5b60290="" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50px" height="50px"><defs data-v-05f1b0f5=""><linearGradient data-v-05f1b0f5="" id="a" x1="120" y1="240" x2="120" gradientUnits="userSpaceOnUse"><stop data-v-05f1b0f5="" offset="0" stop-color="#1d93d2"></stop><stop data-v-05f1b0f5="" offset="1" stop-color="#38b0e3"></stop></linearGradient></defs><circle data-v-05f1b0f5="" cx="120" cy="120" r="120" fill="url(#a)"></circle><path data-v-05f1b0f5="" d="m81.2 128.8 14.3 39.4s1.7 3.7 3.7 3.7 30.2-29.5 30.2-29.5l31.5-61-79.2 37.2Z" fill="#c8daea"></path><path data-v-05f1b0f5="" d="m100.1 138.9-2.7 29s-1.2 9 7.7 0 17.4-15.7 17.4-15.7" fill="#a9c6d8"></path><path data-v-05f1b0f5="" d="m81.5 130.2-29.3-9.6s-3.5-1.4-2.4-4.6c.3-.7.7-1.2 2.1-2.2C58.4 109.3 172 68.4 172 68.4s3.2-1 5.1-.3a2.8 2.8 0 0 1 2 2 9.4 9.4 0 0 1 .2 2.6l-.2 2.6c-.7 11.1-21.4 94.4-21.4 94.4s-1.2 5-5.7 5a8.1 8.1 0 0 1-5.9-2.2 797.1 797.1 0 0 0-45.5-32.2 1.3 1.3 0 0 1-.5-.9c-.1-.4.4-1 .4-1s52.4-46.6 53.8-51.5c.1-.4-.3-.6-.8-.4C150 87.8 89.6 125.9 83 130a3.2 3.2 0 0 1-1.5 0Z" fill="#fff"></path></svg>\n'}},getUrl:({url:e,text:t})=>`https://t.me/share/url?url=${e}&text=${t}`},ok:{label:"OK",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" viewBox="0 0 388.4 387.1" xmlSpace="preserve" xmlns="http://www.w3.org/2000/svg">\n<path d="M331.7 330.2a194.2 193.5 0 0 1-273.9 1.1 194.2 193.5 0 0 1-2.6-272.9A194.2 193.5 0 0 1 329 54.2a194.2 193.5 0 0 1 5.7 273" fill="#faab62" style="mixBlendMode:normal"/>\n<path d="m328.7 327.1a189.2 188.5 0 0 1-266.9 1.2 189.2 188.5 0 0 1-2.5-266 189.2 188.5 0 0 1 266.7-4 189.2 188.5 0 0 1 5.6 265.9" fill="#f7931e" style="mixBlendMode:normal"/>\n<g fill="#fff" style="mixBlendMode:normal">\n<path d="m217.4 253.5c28-5.7 44.7-19 45.6-19.7a19 19 0 0 0-23.8-29.6c-0.2 0.1-18 13.8-47.5 13.8a84.5 84.5 0 0 1-47.8-13.8 19 19 0 0 0-23.8 29.6c1 0.7 18.4 14.3 47.1 19.9l-40 41.9a19 19 0 1 0 27.3 26.3l37.2-39.6 41 39.9a19 19 0 1 0 26.9-26.9z"/>\n<path transform="translate(-1.8 .2)" d="m194.5 57.9a69.9 69.9 0 1 0 0 139.8 69.9 69.9 0 0 0 0-139.8zm0 98.8a28.9 28.9 0 1 1 0-57.8 28.9 28.9 0 0 1 0 57.8z" style="mixBlendMode:normal"/>\n</g>\n</svg>\n'}},getUrl:({url:e,text:t})=>`https://connect.ok.ru/offer?url=${e}&title=${t}`}},copyButton:{label:"Copy link",svgSrc:{baseState:'<svg width="31.5px" height="35px" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 20"><path d="M6.6 0a2 2 0 0 0-2 2v12c0 1.2.9 2 2 2h9a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2h-9Zm0 2h9v12h-9V2Z" fill="currentColor"/><path d="M2.6 20a2 2 0 0 1-2-2V5h2v13h10v2h-10Z" fill="currentColor"/></svg>'}},downloadButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor"><path d="M31 22a1 1 0 0 0-1 1v7H2v-7a1 1 0 0 0-2 0v8c0 .6.4 1 1 1h30c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"/><path d="M15.3 23.7c.4.4 1 .4 1.4 0l7-6.9c.4-.4.4-1 0-1.4a1 1 0 0 0-1.4 0L17 20.6V1a1 1 0 0 0-2 0v19.6l-5.3-5.2a1 1 0 0 0-1.4 0 1 1 0 0 0 0 1.4l7 7z"/></g></svg>'}},title:{favicon:{background:"white",display:!0},getValue:({url:e})=>e},background:"#202125",borderRadius:20,divider:{background:"#36373b"},text:{color:"white",font:"inherit"}};var J;!function(e){e.FLAT="flat",e.COVER="cover",e.CUBE="cube"}(J||(J={}));const ee={gameReaderOptions:{loader:{default:{color:"white",accentColor:"transparent"},custom:null}},scrollStyle:J.FLAT,timelineBlockTopOffset:8,actionPanelBottomOffset:0,borderRadius:12,loader:{default:{color:"white",accentColor:"transparent"},custom:null},recycleStoriesList:!1,closeOnLastSlideByTimer:!0,sharePanel:K,commonBackdrop:{color:"rgba(51, 51, 51, 1)",backdropFilter:null},slideBackdrop:{opacity:.56,blur:30,linearGradientOverlay:["rgba(0, 0, 0, 0.1) 0%","rgba(0, 0, 0, 0.9) 100%"]},faviconApiUrl:"",navigation:{prevButton:{svgSrc:{baseState:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.8076 6.80761L9.20101 17.4142L7.7868 16L18.3934 5.3934L19.8076 6.80761Z" fill="currentColor" />\n <path d="M18.3934 26.6066L7.7868 16L9.20101 14.5858L19.8076 25.1924L18.3934 26.6066Z" fill="currentColor" />\n </svg>'}},nextButton:{svgSrc:{baseState:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.1924 25.1924L22.799 14.5858L24.2132 16L13.6066 26.6066L12.1924 25.1924Z" fill="currentColor" />\n <path d="M13.6066 5.3934L24.2132 16L22.799 17.4142L12.1924 6.80761L13.6066 5.3934Z" fill="currentColor" />\n </svg>'}}},likeButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.96277 15.177L8.11552 15.1837C8.75334 15.1873 9.26846 15.7054 9.26846 16.3433V22.7329C9.26846 23.376 8.74519 23.8962 8.10215 23.8925L6.94939 23.8859C6.31157 23.8822 5.79645 23.3641 5.79645 22.7263V16.3366C5.79645 15.6936 6.31972 15.1733 6.96277 15.177Z" stroke="white" stroke-width="1.21546"/>\n<path d="M11.2546 15.0917L11.3801 23.0645C11.3867 23.4802 11.6013 23.8648 11.9516 24.0886C12.119 24.1955 12.4834 24.2735 12.4834 24.2735L13.1084 24.3569L13.9973 24.4541L15.9789 24.5912L17.4834 24.6365H18.9642L19.282 24.6229C19.7715 24.6018 20.258 24.5358 20.7354 24.4256L21.1038 24.3406C21.3122 24.2925 21.516 24.2263 21.7128 24.1428L21.7439 24.1295C22.0493 23.9999 22.3342 23.8269 22.59 23.6157L22.717 23.5108C22.873 23.382 23.0108 23.2326 23.1265 23.0666L23.1451 23.04C23.2426 22.9003 23.3217 22.7485 23.3804 22.5886L23.428 22.4586C23.5278 22.1867 23.5473 21.8918 23.4842 21.6092L23.4296 21.3645C23.4285 21.3594 23.4265 21.3544 23.4237 21.3499C23.4102 21.3285 23.4163 21.3002 23.4374 21.2862L23.7911 21.0504V21.0504C23.8452 21.0143 23.8957 20.9723 23.9416 20.9263V20.9263C23.99 20.8728 24.0444 20.8083 24.0805 20.7458L24.1361 20.6625C24.2924 20.3945 24.3931 20.0167 24.4083 19.7069L24.4118 19.6352C24.4205 19.458 24.4079 19.2804 24.3744 19.1062L24.3305 18.8986C24.325 18.8696 24.2749 18.7163 24.2611 18.6902L24.1718 18.5154C24.1644 18.5014 24.1898 18.473 24.1898 18.473L24.3653 18.2658C24.4983 18.1109 24.6033 17.9305 24.673 17.7386C24.7222 17.6035 24.7532 17.4657 24.775 17.3153L24.7889 17.1764L24.7957 17.0468C24.8164 16.8366 24.7978 16.6244 24.7409 16.421C24.6929 16.2496 24.6183 16.0868 24.5198 15.9385L24.1983 15.4542C24.1843 15.4367 24.1808 15.413 24.1891 15.3922L24.3081 15.1055C24.3652 14.9628 24.4224 14.6641 24.4391 14.4717L24.4307 14.2984C24.4026 14.0113 24.2405 13.6815 24.0757 13.4238L23.9912 13.3055C23.7236 12.9608 23.3474 12.7334 22.9388 12.5804L22.706 12.4932C22.3923 12.3758 22.0667 12.3327 21.7279 12.2916L21.3444 12.2597C20.89 12.2378 20.2444 12.2651 19.7945 12.3327L18.1092 12.5861C18.1014 12.5873 18.0935 12.5879 18.0857 12.5879H18.0692C17.991 12.5879 17.9276 12.5245 17.9276 12.4462C17.9276 12.4387 17.9282 12.4312 17.9293 12.4238L18.1222 11.3847L18.5408 9.72426C18.6303 9.39087 18.6888 9.04995 18.7158 8.70582L18.7581 8.1657C18.7857 7.81269 18.746 7.45764 18.6411 7.11944L18.6144 7.03332C18.52 6.72899 18.3649 6.44697 18.1583 6.20434L18.1116 6.14941C17.819 5.80563 17.4249 5.56351 16.9859 5.45788L16.7169 5.39313C16.4437 5.32739 16.1567 5.3518 15.8986 5.46269C15.6593 5.56548 15.4564 5.73766 15.316 5.95699L15.2994 5.98302C15.155 6.20866 15.0783 6.47094 15.0783 6.73882V7.10777C15.0783 7.45352 15.0109 7.79596 14.88 8.11598L14.1668 9.85969C13.9176 10.4691 13.6196 11.0573 13.2758 11.6188L12.5778 12.7586C12.4514 12.9651 12.3013 13.1561 12.1306 13.3278L12.0855 13.3731C11.6243 13.837 11.3317 14.442 11.2546 15.0917Z" stroke="white" stroke-width="1.21546"/>\n</svg>',activeState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.96277 15.1771L8.11552 15.1838C8.75334 15.1875 9.26846 15.7056 9.26846 16.3434V22.733C9.26846 23.3761 8.74519 23.8964 8.10215 23.8926L6.94939 23.886C6.31157 23.8823 5.79645 23.3642 5.79645 22.7264V16.3368C5.79645 15.6937 6.31972 15.1734 6.96277 15.1771Z" fill="white" stroke="white" stroke-width="1.21546"/>\n<path d="M11.2546 15.0918L11.3801 23.0646C11.3867 23.4803 11.6013 23.8649 11.9516 24.0888C12.119 24.1957 12.4834 24.2737 12.4834 24.2737L13.1084 24.357L13.9973 24.4542L15.9789 24.5913L17.4834 24.6367H18.9642L19.282 24.623C19.7715 24.6019 20.258 24.5359 20.7354 24.4257L21.1038 24.3407C21.3122 24.2926 21.516 24.2264 21.7128 24.1429L21.7439 24.1297C22.0493 24.0001 22.3342 23.827 22.59 23.6158L22.717 23.5109C22.873 23.3821 23.0108 23.2327 23.1265 23.0668L23.1451 23.0401C23.2426 22.9004 23.3217 22.7487 23.3804 22.5887L23.428 22.4588C23.5278 22.1868 23.5473 21.892 23.4842 21.6093L23.4296 21.3647C23.4285 21.3595 23.4265 21.3545 23.4237 21.3501C23.4102 21.3286 23.4163 21.3004 23.4374 21.2863L23.7911 21.0505V21.0505C23.8452 21.0144 23.8957 20.9724 23.9416 20.9265V20.9265C23.99 20.8729 24.0444 20.8084 24.0805 20.7459L24.1361 20.6626C24.2924 20.3946 24.3931 20.0168 24.4083 19.707L24.4118 19.6353C24.4205 19.4581 24.4079 19.2805 24.3744 19.1063L24.3305 18.8987C24.325 18.8697 24.2749 18.7165 24.2611 18.6904L24.1718 18.5155C24.1644 18.5015 24.1898 18.4732 24.1898 18.4732L24.3653 18.2659C24.4983 18.1111 24.6033 17.9306 24.673 17.7387C24.7222 17.6036 24.7532 17.4658 24.775 17.3154L24.7889 17.1765L24.7957 17.0469C24.8164 16.8367 24.7978 16.6245 24.7409 16.4211C24.6929 16.2497 24.6183 16.0869 24.5198 15.9386L24.1983 15.4543C24.1843 15.4368 24.1808 15.4131 24.1891 15.3923L24.3081 15.1056C24.3652 14.9629 24.4224 14.6642 24.4391 14.4718L24.4307 14.2985C24.4026 14.0114 24.2405 13.6817 24.0757 13.4239L23.9912 13.3056C23.7236 12.9609 23.3474 12.7336 22.9388 12.5805L22.706 12.4934C22.3923 12.3759 22.0667 12.3329 21.7279 12.2918L21.3444 12.2598C20.89 12.2379 20.2444 12.2652 19.7945 12.3329L18.1092 12.5863C18.1014 12.5874 18.0935 12.588 18.0857 12.588H18.0692C17.991 12.588 17.9276 12.5246 17.9276 12.4464C17.9276 12.4389 17.9282 12.4313 17.9293 12.4239L18.1222 11.3849L18.5408 9.72438C18.6303 9.391 18.6888 9.05007 18.7158 8.70594L18.7581 8.16582C18.7857 7.81281 18.746 7.45776 18.6411 7.11956L18.6144 7.03344C18.52 6.72911 18.3649 6.4471 18.1583 6.20446L18.1116 6.14953C17.819 5.80575 17.4249 5.56363 16.9859 5.458L16.7169 5.39325C16.4437 5.32751 16.1567 5.35192 15.8986 5.46281C15.6593 5.5656 15.4564 5.73778 15.316 5.95711L15.2994 5.98314C15.155 6.20878 15.0783 6.47106 15.0783 6.73895V7.10789C15.0783 7.45364 15.0109 7.79608 14.88 8.1161L14.1668 9.85982C13.9176 10.4692 13.6196 11.0574 13.2758 11.6189L12.5778 12.7588C12.4514 12.9652 12.3013 13.1562 12.1306 13.3279L12.0855 13.3732C11.6243 13.8371 11.3317 14.4421 11.2546 15.0918Z" fill="white" stroke="white" stroke-width="1.21546"/>\n</svg>'}},dislikeButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M24.2033 13.6632C24.2033 14.3062 23.68 14.8265 23.037 14.8228L21.8842 14.8161C21.2464 14.8125 20.7313 14.2944 20.7313 13.6565V7.2669C20.7313 6.62385 21.2546 6.10359 21.8976 6.1073L23.0504 6.11395C23.6882 6.11762 24.2033 6.63572 24.2033 7.27355V13.6632Z" stroke="white" stroke-width="1.21547"/>\n<path d="M18.7451 14.9082L18.6196 6.93531C18.6131 6.51965 18.3984 6.13499 18.0481 5.91118C17.8808 5.80428 17.5164 5.72628 17.5164 5.72628L16.8914 5.64295L16.0025 5.54572L14.0208 5.4086L12.5164 5.36328H11.0356L10.7178 5.37695C10.2283 5.398 9.74173 5.46403 9.26432 5.57421L8.89596 5.65921C8.68758 5.7073 8.4838 5.7735 8.28695 5.85706L8.25581 5.87027C7.95049 5.99987 7.66551 6.17296 7.40975 6.38416L7.28278 6.48901C7.12677 6.61783 6.989 6.76725 6.87323 6.93318L6.85466 6.95981C6.75716 7.09955 6.67809 7.25128 6.6194 7.41124L6.57172 7.54119C6.47196 7.81311 6.45245 8.10797 6.51553 8.39066L6.57011 8.63528C6.57127 8.64045 6.57329 8.64539 6.5761 8.64989C6.58951 8.67134 6.58343 8.69958 6.56238 8.71361L6.20864 8.94944V8.94944C6.15453 8.98551 6.10408 9.0275 6.05811 9.07348V9.07348C6.00973 9.12703 5.95532 9.19155 5.91922 9.25403L5.86366 9.33737C5.70735 9.60533 5.60662 9.98309 5.59145 10.2929L5.58794 10.3646C5.57927 10.5418 5.59182 10.7194 5.62532 10.8937L5.66922 11.1012C5.6748 11.1302 5.72484 11.2835 5.73866 11.3096L5.82792 11.4845C5.83532 11.4984 5.80994 11.5268 5.80994 11.5268L5.63444 11.734C5.50143 11.8889 5.3965 12.0693 5.32674 12.2612C5.27758 12.3964 5.24658 12.5341 5.22478 12.6846L5.21089 12.8235L5.20405 12.953C5.18333 13.1632 5.20192 13.3755 5.25887 13.5788C5.30686 13.7503 5.38145 13.9131 5.47991 14.0614L5.80147 14.5456C5.81547 14.5631 5.81898 14.5868 5.81066 14.6076L5.69163 14.8944C5.63456 15.037 5.57739 15.3357 5.56065 15.5282L5.5691 15.7014C5.5972 15.9885 5.75924 16.3183 5.92402 16.576L6.00853 16.6943C6.2762 17.039 6.65231 17.2664 7.06099 17.4194L7.2938 17.5066C7.60742 17.624 7.93309 17.6671 8.27189 17.7082L8.65531 17.7401C9.10973 17.762 9.75538 17.7347 10.2053 17.6671L11.8906 17.4137C11.8984 17.4125 11.9062 17.4119 11.9141 17.4119H11.9305C12.0088 17.4119 12.0722 17.4753 12.0722 17.5536C12.0722 17.5611 12.0716 17.5686 12.0704 17.576L11.8775 18.6151L11.459 20.2756C11.3695 20.6089 11.3109 20.9499 11.284 21.294L11.2417 21.8341C11.214 22.1871 11.2537 22.5422 11.3586 22.8804L11.3853 22.9665C11.4797 23.2708 11.6349 23.5528 11.8414 23.7955L11.8882 23.8504C12.1808 24.1942 12.5749 24.4363 13.0138 24.5419L13.2829 24.6067C13.556 24.6724 13.8431 24.648 14.1012 24.5371C14.3404 24.4343 14.5434 24.2622 14.6837 24.0428L14.7004 24.0168C14.8448 23.7912 14.9215 23.5289 14.9215 23.261V22.892C14.9215 22.5463 14.9888 22.2039 15.1197 21.8838L15.8329 20.1401C16.0821 19.5308 16.3801 18.9425 16.7239 18.381L17.4219 17.2412C17.5483 17.0347 17.6984 16.8437 17.8691 16.6721L17.9142 16.6267C18.3755 16.1629 18.668 15.5578 18.7451 14.9082Z" stroke="white" stroke-width="1.21547"/>\n</svg>',activeState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M24.2035 13.6629C24.2035 14.3059 23.6803 14.8262 23.0372 14.8225L21.8845 14.8158C21.2466 14.8122 20.7315 14.2941 20.7315 13.6562V7.26655C20.7315 6.62348 21.2548 6.10322 21.8978 6.10693L23.0506 6.11358C23.6884 6.11725 24.2035 6.63535 24.2035 7.27319V13.6629Z" fill="white" stroke="white" stroke-width="1.21547"/>\n<path d="M18.7454 14.9079L18.6199 6.93496C18.6133 6.51929 18.3987 6.13463 18.0484 5.91082C17.881 5.80392 17.5166 5.72592 17.5166 5.72592L16.8916 5.64258L16.0027 5.54536L14.021 5.40824L12.5166 5.36292H11.0358L10.718 5.37659C10.2285 5.39764 9.74192 5.46367 9.26451 5.57384L8.89614 5.65885C8.68776 5.70694 8.48398 5.77314 8.28713 5.8567L8.25599 5.86991C7.95066 5.99951 7.66569 6.1726 7.40992 6.3838L7.28295 6.48865C7.12694 6.61747 6.98917 6.7669 6.8734 6.93283L6.85483 6.95946C6.75733 7.0992 6.67826 7.25093 6.61957 7.41088L6.57189 7.54084C6.47212 7.81276 6.45262 8.10762 6.5157 8.39032L6.57028 8.63494C6.57143 8.64011 6.57346 8.64505 6.57627 8.64954C6.58968 8.671 6.5836 8.69923 6.56255 8.71327L6.2088 8.9491C6.1547 8.98517 6.10425 9.02716 6.05827 9.07314C6.0099 9.12669 5.95549 9.19121 5.91938 9.25369L5.86383 9.33703C5.70751 9.60499 5.60678 9.98276 5.59161 10.2926L5.58811 10.3643C5.57943 10.5415 5.59198 10.7191 5.62549 10.8933L5.66938 11.1009C5.67496 11.1299 5.72501 11.2831 5.73883 11.3092L5.82808 11.4841C5.83549 11.4981 5.8101 11.5264 5.8101 11.5264L5.63461 11.7337C5.50159 11.8886 5.39666 12.069 5.3269 12.2609C5.27775 12.396 5.24674 12.5338 5.22494 12.6842L5.21105 12.8231L5.20421 12.9527C5.18349 13.1629 5.20208 13.3751 5.25903 13.5785C5.30702 13.7499 5.38161 13.9128 5.48007 14.061L5.80163 14.5453C5.81564 14.5628 5.81915 14.5865 5.81082 14.6073L5.69179 14.894C5.63472 15.0367 5.57755 15.3354 5.56081 15.5279L5.56926 15.7011C5.59737 15.9882 5.7594 16.318 5.92419 16.5757L6.0087 16.694C6.27636 17.0387 6.65248 17.2661 7.06116 17.4191L7.29397 17.5063C7.6076 17.6237 7.93327 17.6668 8.27207 17.7079L8.65549 17.7398C9.10991 17.7617 9.75557 17.7344 10.2055 17.6668L11.8908 17.4134C11.8986 17.4122 11.9064 17.4116 11.9143 17.4116H11.9307C12.009 17.4116 12.0724 17.4751 12.0724 17.5533C12.0724 17.5608 12.0718 17.5683 12.0706 17.5757L11.8777 18.6148L11.4592 20.2753C11.3697 20.6087 11.3111 20.9496 11.2842 21.2937L11.2419 21.8339C11.2142 22.1869 11.2539 22.5419 11.3588 22.8801L11.3855 22.9662C11.4799 23.2706 11.6351 23.5526 11.8416 23.7952L11.8884 23.8502C12.181 24.1939 12.5751 24.4361 13.014 24.5417L13.2831 24.6064C13.5562 24.6722 13.8433 24.6478 14.1014 24.5369C14.3407 24.4341 14.5436 24.2619 14.6839 24.0426L14.7006 24.0166C14.845 23.7909 14.9217 23.5286 14.9217 23.2607V22.8918C14.9217 22.546 14.989 22.2036 15.1199 21.8836L15.8331 20.1399C16.0824 19.5305 16.3803 18.9422 16.7241 18.3808L17.4221 17.2409C17.5486 17.0344 17.6987 16.8434 17.8694 16.6718L17.9144 16.6264C18.3757 16.1626 18.6683 15.5575 18.7454 14.9079Z" fill="white" stroke="white" stroke-width="1.21547"/>\n</svg>'}},favoriteButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.49976 7.25225V23.2366C7.49976 24.6882 9.33429 25.321 10.2292 24.1782L13.7974 19.6218C14.4088 18.8411 15.5907 18.8411 16.2021 19.6218L19.7703 24.1782C20.6652 25.321 22.4998 24.6882 22.4998 23.2366V7.25225C22.4998 5.98711 21.4742 4.96152 20.209 4.96152H9.79048C8.52535 4.96152 7.49976 5.98712 7.49976 7.25225Z" stroke="white" stroke-width="1.29808"/>\n</svg>',activeState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.49976 7.04073V23.0251C7.49976 24.4767 9.33429 25.1095 10.2292 23.9667L13.7974 19.4103C14.4088 18.6296 15.5907 18.6296 16.2021 19.4103L19.7703 23.9667C20.6652 25.1095 22.4998 24.4766 22.4998 23.0251V7.04072C22.4998 5.77559 21.4742 4.75 20.209 4.75H9.79048C8.52535 4.75 7.49976 5.77559 7.49976 7.04073Z" fill="white" stroke="white" stroke-width="1.29808"/>\n</svg>'}},muteButton:{svgSrc:{baseState:'<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M3.40625 13.5734V18.7664C3.40625 19.7239 4.18245 20.5001 5.13993 20.5001H8.04633C8.6342 20.5001 9.17511 20.8213 9.45654 21.3374L11.903 25.8242C12.271 26.4992 12.9783 26.9192 13.7471 26.9192C14.9072 26.9192 15.8477 25.9788 15.8477 24.8187V7.52486C15.8477 6.36469 14.9072 5.42416 13.747 5.42412C12.9783 5.42409 12.2709 5.84393 11.9028 6.51875L9.45651 11.0026C9.17509 11.5184 8.63442 11.8394 8.04683 11.8394H5.14027C4.1826 11.8394 3.40625 12.6157 3.40625 13.5734Z" fill="white"/>\n<path d="M19.8477 13.0466L26.0976 19.2966M26.0976 13.0466L19.8477 19.2966" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>',activeState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M3.40625 12.5733V17.7663C3.40625 18.7238 4.18245 19.5 5.13993 19.5H8.04633C8.6342 19.5 9.17511 19.8212 9.45654 20.3373L11.903 24.8241C12.271 25.4991 12.9783 25.919 13.7471 25.9191C14.9072 25.9191 15.8477 24.9787 15.8477 23.8186V6.52474C15.8477 5.36457 14.9072 4.42404 13.747 4.424C12.9783 4.42397 12.2709 4.84381 11.9028 5.51863L9.45651 10.0025C9.17509 10.5183 8.63442 10.8392 8.04683 10.8392H5.14027C4.1826 10.8392 3.40625 11.6156 3.40625 12.5733Z" fill="white"/>\n<path d="M19.8477 11.4215C20.6323 12.4661 21.0972 13.7645 21.0972 15.1715C21.0972 16.5785 20.6323 17.8769 19.8477 18.9215M22.3472 6.78613C24.6487 8.84608 26.0972 11.8396 26.0972 15.1715C26.0972 18.5034 24.6487 21.4969 22.3472 23.5569" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>'}},shareButton:{svgSrc:{baseState:'<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 10.9038C20.8488 10.9038 21.9423 9.81036 21.9423 8.46151C21.9423 7.11266 20.8488 6.01921 19.5 6.01921C18.1512 6.01921 17.0577 7.11266 17.0577 8.46151C17.0577 9.81036 18.1512 10.9038 19.5 10.9038ZM19.5 12.2115C21.5711 12.2115 23.25 10.5326 23.25 8.46151C23.25 6.39045 21.5711 4.71151 19.5 4.71151C17.4289 4.71151 15.75 6.39045 15.75 8.46151C15.75 8.98692 15.8581 9.48709 16.0531 9.94101L12.288 12.4511C11.6202 11.8367 10.7288 11.4615 9.74976 11.4615C7.67869 11.4615 5.99976 13.1404 5.99976 15.2115C5.99976 17.2826 7.67869 18.9615 9.74976 18.9615C10.7325 18.9615 11.6269 18.5835 12.2956 17.9649L16.018 20.5665C15.8451 20.9977 15.75 21.4685 15.75 21.9615C15.75 24.0326 17.4289 25.7115 19.5 25.7115C21.5711 25.7115 23.25 24.0326 23.25 21.9615C23.25 19.8904 21.5711 18.2115 19.5 18.2115C18.3369 18.2115 17.2974 18.7411 16.6096 19.5722L13.0138 17.0591C13.3231 16.5138 13.4998 15.8833 13.4998 15.2115C13.4998 14.5368 13.3216 13.9037 13.0097 13.3567L16.667 10.9185C17.3545 11.7106 18.3688 12.2115 19.5 12.2115ZM12.1921 15.2115C12.1921 16.5604 11.0986 17.6538 9.74976 17.6538C8.40091 17.6538 7.30745 16.5604 7.30745 15.2115C7.30745 13.8627 8.40091 12.7692 9.74976 12.7692C11.0986 12.7692 12.1921 13.8627 12.1921 15.2115ZM21.9423 21.9615C21.9423 23.3104 20.8488 24.4038 19.5 24.4038C18.1512 24.4038 17.0577 23.3104 17.0577 21.9615C17.0577 20.6127 18.1512 19.5192 19.5 19.5192C20.8488 19.5192 21.9423 20.6127 21.9423 21.9615Z" fill="white"/>\n</svg>'}}};var te;!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"}(te||(te={}));const ie={title:{content:"Favorite",font:"1.4rem/1.2 InternalPrimaryFont",color:"white",backgroundColor:"#333333"},headerTopOffset:0,bottomOffset:0,backgroundColor:"#333333"};var re,se=p(2743),ne=p.n(se);!function(e){e.DEFAULT="default",e.CUSTOM_CARD="customCard"}(re||(re={}));const oe={goodsWidgetRenderingType:re.DEFAULT,goodsList:{renderingType:re.DEFAULT,closeBackgroundColor:"#000000",substrateHeight:200,substrateColor:"#FFFFFF",dimColor:"rgba(0, 0, 0, 0.5)"},goodsCard:{mainTextColor:"#000000",oldPriceTextColor:"#CCCCCC",imageBackgroundColor:"transparent",imageCornerRadius:8},openGoodsWidgetHandler:e=>Promise.resolve(e),loader:{default:{color:"gray",accentColor:"transparent"}}},ae={loader:{default:{color:"white",accentColor:"transparent"},custom:null},backdropColor:"#1a1a1a",backdrop:{opacity:1,background:"#1a1a1a"},game:{backdropColor:"rgb(51, 51, 51)"},forceDesktopMode:G.forceDesktopMode,forceCheckOrientation:!0};class le extends U.EventEmitter{constructor(){super(),this._commonOptions=G,this._storiesListOptions=X,this._storyReaderOptions=ee,this._storyFavoriteReaderOptions=ie,this._goodsWidgetOptions=oe,this._gameReaderOptions=ae}setCommonOptions(e,t=!0){return this._commonOptions=ne()(this._commonOptions,e),this.emit(F.UPDATE,this.commonOptions),this}get commonOptions(){return this._commonOptions}setStoriesListOptions(e,t=!0){return this._storiesListOptions=ne()(this._storiesListOptions,e),t&&this.emit(F.UPDATE,this.storiesListOptions),this}get storiesListOptions(){return this._storiesListOptions}setStoryReaderOptions(e,t=!0){return this._storyReaderOptions=ne()(this._storyReaderOptions,e,{arrayMerge:(e,t,i)=>t}),t&&this.emit(F.UPDATE,{storyReaderOptions:this.storyReaderOptions,gameReaderOptions:this.gameReaderOptions,appearanceCommon:this.commonOptions}),this}get storyReaderOptions(){const e={closeButtonPosition:this.commonOptions.closeButtonPosition,closeButton:this.commonOptions.closeButton,loader:this.commonOptions.loader};return Object.assign(Object.assign({},e),this._storyReaderOptions)}setStoryFavoriteReaderOptions(e,t=!0){return this._storyFavoriteReaderOptions=ne()(this._storyFavoriteReaderOptions,e),t&&this.emit(F.UPDATE,this.storyFavoriteReaderOptions),this}get storyFavoriteReaderOptions(){const e={closeButtonPosition:this.commonOptions.closeButtonPosition,closeButton:this.commonOptions.closeButton};return Object.assign(Object.assign({},e),this._storyFavoriteReaderOptions)}setGoodsWidgetOptions(e,t=!0){return this._goodsWidgetOptions=ne()(this._goodsWidgetOptions,e),t&&this.emit(F.UPDATE,this.goodsWidgetOptions),this}get goodsWidgetOptions(){return this._goodsWidgetOptions}setGameReaderOptions(e,t=!0){return this._gameReaderOptions=ne()(this._gameReaderOptions,e),t&&this.emit(F.UPDATE,this.gameReaderOptions),this}get gameReaderOptions(){const e={closeButtonPosition:this.commonOptions.closeButtonPosition,closeButton:this.commonOptions.closeButton,loader:this.commonOptions.loader,forceDesktopMode:this.commonOptions.forceDesktopMode};return Object.assign(Object.assign({},e),this._gameReaderOptions)}}class de extends U.EventEmitter{constructor(e,t){super(),this.iframe=e,this.origin=t,this.messageListener=this.messageListener.bind(this),window.addEventListener("message",this.messageListener,!1)}messageListener(e){if(e.origin!==this.origin)return;const[t,...i]=e.data;try{if(!Array.isArray(e.data))throw new Error(`Invalid MessageEvent data format ${e.data}`);this.emit(t,...i)}catch(e){console.error(e)}}sendMessage(e,t){var i;null===(i=this.iframe.contentWindow)||void 0===i||i.postMessage([e,t],this.origin)}destroy(){window.removeEventListener("message",this.messageListener,!1),this.removeAllListeners()}}var ce,ue=p(1580),he=p.n(ue);class pe{constructor(e,t,i){this.userKey=e,this.gameInstanceId=t,this.instanceUserData=i}set(e){const t=ne()(this.get(),e);return window.localStorage.setItem(this.key,JSON.stringify(t)),t}get(){var e;let t={};const i=he()(this.instanceUserData)?this.instanceUserData:{};try{const i=JSON.parse(null!==(e=window.localStorage.getItem(this.key))&&void 0!==e?e:"{}");he()(i)&&(t=i)}catch(e){console.error(e)}return ne()(t,i)}get key(){return`game_instance_data_${this.userKey}_${this.gameInstanceId}`}}class fe{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const{id:t,callback:i}=JSON.parse(e),r=this.gameReaderViewModel.gameLaunch;if(!r)return;const s=new pe(r.clientConfig.userKey,r.config.gameInstanceId,r.instanceUserData).get();this.gameCenterMessageService.sendMessage("cb",{cb:i,arguments:JSON.stringify([t,JSON.stringify(s)])})}}!function(e){e.StartGame="startGame",e.GameComplete="gameComplete",e.GameInstanceEvent="gameInstanceEvent",e.OpenUrl="openUrl",e.SendApiRequest="sendApiRequest",e.StorySetLocalData="storySetLocalData",e.GameInstanceSetLocalData="gameInstanceSetLocalData",e.OpenSharePanel="openSharePanel"}(ce||(ce={}));class ge{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const{gameInstanceId:t,data:i}=JSON.parse(e),r=this.gameReaderViewModel.gameLaunch;if(!r)return;const s=new pe(r.clientConfig.userKey,r.config.gameInstanceId,r.instanceUserData).set(i);this.gameReaderViewModel.emit(ce.GameInstanceSetLocalData,{data:JSON.stringify(s)})}}var ve=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};var me,ye,we,Se,be,_e,xe,Ce=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};!function(e){e.Social="social",e.SlideScreenshot="slide-screenshot"}(me||(me={}));class ke{constructor(e,t,i){this.gameCenterMessageService=e,this.gameReaderViewModel=t,this.desktopMode=i}handle(e,t){return Ce(this,void 0,void 0,(function*(){var i,r,s;let n=null!==(i=null==t?void 0:t.url)&&void 0!==i?i:t.text,o=[];t.files&&Array.isArray(t.files)&&t.files.length>0&&(o=yield Promise.all(t.files.map((e=>(e=>ve(void 0,[e],void 0,(function*({file:e,name:t,type:i}){const r=yield fetch(`data:${i};base64,${e}`),s=yield r.blob();return new File([s],t,{type:i,lastModified:(new Date).getTime()})})))(e)))));const a={url:null!=n?n:void 0,files:o.length>0?o:void 0,text:null!==(r=t.text)&&void 0!==r?r:void 0,title:null!==(s=t.title)&&void 0!==s?s:void 0};if(!(a.files&&a.files.length>0||a.url))return void this.gameReaderViewModel.confirmSharingComplete({shareId:e,isSuccess:!1});let l=navigator.share;if(!navigator.share&&window.parent&&window.parent.navigator.share&&(l=window.parent.navigator.share),!this.desktopMode&&l)try{if(!l)return;l(a).then((()=>this.gameReaderViewModel.confirmSharingComplete({shareId:e,isSuccess:!0}))).catch((()=>this.gameReaderViewModel.confirmSharingComplete({shareId:e,isSuccess:!1})))}catch(t){console.error(t),this.openSharePanel({shareConfig:a,sharePath:n,shareId:e})}else this.openSharePanel({shareConfig:a,sharePath:n,shareId:e})}))}openSharePanel({shareConfig:e,sharePath:t,shareId:i}){let r=me.Social,s=t;e.files&&e.files.length>0&&(r=me.SlideScreenshot,s=URL.createObjectURL(e.files[0])),this.gameReaderViewModel.emit(ce.OpenSharePanel,{shareId:i,shareType:r,shareLink:s})}}class Ae{constructor(e){this.storyId=e}set(e){sessionStorage.setItem(this.key,JSON.stringify(e))}get(){var e;const t=null!==(e=sessionStorage.getItem(this.key))&&void 0!==e?e:"{}";return window.__activeNarrativeId?JSON.parse(t):{}}get key(){return`narrative_${this.storyId}_data`}}class Le{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const t=JSON.parse(e);if(!he()(t))return;const{id:i,storyId:r,callback:s}=t;let n=new Ae(r).get();this.gameCenterMessageService.sendMessage("cb",{cb:s,arguments:JSON.stringify([i,JSON.stringify(n)])})}}class Me{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const t=JSON.parse(e);if(!he()(t))return;const{storyId:i,data:r,sendToServer:s}=t;new Ae(i).set(r),s&&this.gameReaderViewModel.emit(ce.StorySetLocalData,{storyId:i,data:JSON.stringify(r)})}}!function(e){e.direct="direct",e.onboarding="onboarding",e.list="list",e.favorite="favorite"}(ye||(ye={})),function(e){e[e.default=0]="default",e[e.favorite=1]="favorite"}(we||(we={})),function(e){e[e.default=0]="default",e[e.onboarding=1]="onboarding",e[e.favorite=2]="favorite",e[e.direct=3]="direct"}(Se||(Se={})),function(e){e.list="list",e.favorite="favorite"}(be||(be={})),function(e){e.CLICK_ON_STORY="clickOnStoryLink"}(_e||(_e={})),function(e){e.TEXT="text",e.IMAGE="image"}(xe||(xe={}));var Oe=p(3142),Ee=p.n(Oe);const Ie=(0,e.createStore)({default:{},user:{}}),{sdkPlaceholdersChanged:Te,addDefaultPlaceholders:Re}=(0,e.createApi)(Ie,{sdkPlaceholdersChanged:(e,t)=>({default:e.default,user:t}),addDefaultPlaceholders:(e,t)=>{let i={default:{},user:e.user};return Ee()(t)&&t.forEach((e=>{he()(e)&&void 0!==e.name&&void 0!==e.default_value&&(i.default[e.name]=e.default_value)})),i}});var Pe=p(3655),De=p.n(Pe),Ne=p(8138),Be=p.n(Ne),Fe=p(986),je=p.n(Fe);const Ue=(0,e.createStore)({default:{},user:{}}),{sdkImagePlaceholdersChanged:Ve,addDefaultImagePlaceholders:Ge}=(0,e.createApi)(Ue,{sdkImagePlaceholdersChanged:(e,t)=>({default:e.default,user:t}),addDefaultImagePlaceholders:(e,t)=>{let i={default:{},user:e.user};return Ee()(t)&&t.forEach((e=>{he()(e)&&void 0!==e.name&&void 0!==e.default_value&&(i.default[e.name]=e.default_value)})),i}}),ze=(e,t,i,r)=>!(!e||t||i)&&(console.error(`Cannot open hidden story id ${r}`),!0),We=(e,t,i)=>{var r;e.isDeeplink?$e(e,t,i):(null===(r=t.gameInstance)||void 0===r?void 0:r.id)?He(e,t,i):qe(e,t,i)},$e=(e,t,i)=>{e.isDeeplink=!0,i.eventPublisher.emit("clickOnStoryDeepLink",e)},He=(e,t,i)=>{var r;i.eventPublisher.emit("clickOnStoryGame",{id:t.id,gameInstanceId:null===(r=t.gameInstance)||void 0===r?void 0:r.id})},qe=(e,t,i)=>{const r={index:e.index,isDeeplink:!1,id:e.id,listType:Se.default,windowReferer:we.default};t.isFavoriteCard?i.eventPublisher.emit("clickOnFavoriteCellInternal",r):t.isUgcCard?i.eventPublisher.emit("clickOnUgcCardCellInternal",r):i.eventPublisher.emit("clickOnStoryInternal",r),i.eventPublisher.emit("clickOnStory",e)};var Ze;!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.UGC=1]="UGC"}(Ze||(Ze={}));const Ye=e=>({id:e,type:Ze.DEFAULT,title:null,title_color:null,background:null,background_color:null,image:null,display_to:null,display_from:null,slides_html:[],slides_screenshot_share:[],slides_duration:[],favorite:null,like:null,slides_count:0,deeplink:null,hide_in_reader:null,disable_close:null,like_functional:null,favorite_functional:null,share_functional:null,is_opened:null,tags:[],has_audio:null,video_cover:null,need_placeholders:null,has_swipe_up:null,slides_payload:[],game_instance:{id:null},share_url:null,slidesLoaded:!1}),Xe=(0,e.createStore)({}),Qe=(0,e.createStore)({default:[]}),Ke=Qe.map((e=>e[m.getState().user_key||"default"]||[]));var Je;!function(e){e.FEEDS="feeds",e.FAVORITE="favorite"}(Je||(Je={}));const et=(0,e.createStore)({default:{[Je.FEEDS]:{},[Je.FAVORITE]:[]}}),tt=et.map((e=>e[m.getState().user_key||"default"]||{})),it=(0,e.createStore)({}),rt=(0,e.createStore)({}),st=(0,e.createStore)([]),nt=(e,t)=>e.map((e=>t.find((t=>t.id===e)))).filter((e=>!!e));it.on([tt,Ke],((e,t)=>{const i=tt.getState(),r=Ke.getState();return((e,t)=>{const i={};for(const[r,s]of Object.entries(e))i[r]=nt(s,t);return i})(i[Je.FEEDS],r)})),rt.on([tt,Ke],((e,t)=>{const i=tt.getState(),r={},s=Ke.getState();for(const e in i[Je.FEEDS])if("onboarding_"===e.substring(0,11)){const t=e.substring(11);r[t]=[],i[Je.FEEDS][e]&&Array.isArray(i[Je.FEEDS][e])&&(r[t]=s.filter((t=>-1!==i[Je.FEEDS][e].indexOf(t.id)&&!t.is_opened)))}return r})),st.on([tt,Ke],((e,t)=>{var i;const r=null!==(i=tt.getState()[Je.FAVORITE])&&void 0!==i?i:[],s={};return Ke.getState().forEach((e=>{s[e.id]=e})),r.map((e=>s[e]))}));const ot=(0,e.createEffect)(),at=(e,t="")=>(e.is_opened,e.is_opened),lt=Ke.map((e=>{const t={};return t[Ze.DEFAULT]=e.filter((e=>!e.slidesLoaded&&e.type===Ze.DEFAULT)).map((e=>e.id)),t[Ze.UGC]=e.filter((e=>!e.slidesLoaded&&e.type===Ze.UGC)).map((e=>e.id)),t})),{storyItemFavoriteChanged:dt,storyItemLikeChanged:ct,storyItemIsOpenedChanged:ut}=(Object.prototype.hasOwnProperty,(0,e.createApi)(Qe,{storyItemFavoriteChanged:(e,{id:t,favorite:i})=>{const r=m.getState().user_key||"default",s=(e[r]||[]).slice(0),n=s.find((e=>e.id===t));return void 0!==n&&(n.favorite=i),Object.assign(Object.assign({},e),{[r]:s})},storyItemLikeChanged:(e,{id:t,like:i})=>{const r=m.getState().user_key||"default",s=(e[r]||[]).slice(0),n=s.find((e=>e.id===t));return void 0!==n&&(n.like=i),Object.assign(Object.assign({},e),{[r]:s})},storyItemIsOpenedChanged:(e,{id:t})=>{const i=m.getState().user_key||"default",r=(e[i]||[]).slice(0),s=r.find((e=>e.id===t));return void 0!==s&&(s.is_opened=!0),Object.assign(Object.assign({},e),{[i]:r})}}));class ht extends U.EventEmitter{update(){this.emit("update")}destroy(){this.removeAllListeners()}}class pt{constructor(){this.viewModels=new Map}set(e,t){if(this.viewModels.has(e)){this.viewModels.get(e).add(t)}else this.viewModels.set(e,new Set([t]))}getAllByName(e){var t;const i=null!==(t=this.viewModels.get(e))&&void 0!==t?t:new Set;return Array.from(i.values())}getAll(){const e=[];for(const t of this.viewModels.values())for(const i of t.values())e.push(i);return e}getOneByName(e){const t=this.getAllByName(e)[0];if(!t)throw new Error(`ViewModel <${e}> is undefined`);return t}has(e){return this.viewModels.has(e)}clear(){for(const e of this.getAll())e.destroy();this.viewModels.clear()}}var ft;!function(e){e.START_LOADING="startLoading",e.END_LOADING="endLoading",e.CLOSE_STORY_READER="closeStoryReader"}(ft||(ft={}));class gt extends ht{constructor(e,t){super(),this.storyListViewModel=e,this.story=t,this.id=this.story.id,this.title=this.story.title,this.titleColor=this.story.title_color,this.magazineName=this.story.magazine_name,this.background=this.story.background,this.backgroundColor=this.story.background_color,this.favorite=this.story.favorite,this.like=this.story.like,this.deeplink=this.story.deeplink,this.hideInReader=this.story.hide_in_reader,this.gameInstance=this.story.game_instance,this.hasAudio=this.story.has_audio,this.isFavoriteCard=this.story.favorite_cell,this.isUgcCard=this.story.ugc_card_cell,this.isOpened=this.story.is_opened,this.image=this.story.image,this.videoCover=this.story._video_cover,this.videoCoverSrc=this.story.videoCoverSrc}getIsTitleCardInner(e){return e===H.CARD_INSIDE_BOTTOM}getIsTitleCardOutsideTop(e){return e===H.CARD_OUTSIDE_TOP}getIsTitleCardOutsideBottom(e){return e===H.CARD_OUTSIDE_BOTTOM}getAspectRatio(e){var t,i;const{aspectRatio:r,variant:s}=e;if(r)return r;switch(s){case te.STYLE_CIRCLE:case te.STYLE_QUAD:return 1;case te.STYLE_RECTANGLE:return null!==(i=null===(t=this.storyListViewModel.session)||void 0===t?void 0:t.preview_aspect_ratio)&&void 0!==i?i:.8;default:return 1}}getImageSrcByCoverQuality(e){var t,i;return null===(i=null===(t=this.story.image)||void 0===t?void 0:t.findOneByCoverQuality(e))||void 0===i?void 0:i.url}onClick(e){this.storyListViewModel.onStoryClick(this,e)}}class vt extends gt{constructor(e,t){super(e,t)}getImageSrcByCoverQuality(e){var t,i;return null===(i=null===(t=this.story.image)||void 0===t?void 0:t.findOneByCoverQuality(e))||void 0===i?void 0:i.url}}const mt=new U.EventEmitter;mt.setMaxListeners(50);var yt,wt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class St extends ht{set modeDesktop(e){this._modeDesktop!==e&&(this._modeDesktop=e,this.emit("update"))}get modeDesktop(){return this._modeDesktop}get session(){return this._session}get defaultStories(){return this._defaultStories.slice()}get favoriteStories(){return this._favoriteStories.slice()}constructor(e,t){super(),this.storiesService=e,this.params=t,this._defaultStories=[],this._favoriteStories=[],this._session=null,this._modeDesktop=!0,this.subscriptions=[],this.setDefaultStories=this.setDefaultStories.bind(this),this.setFavoriteStories=this.setFavoriteStories.bind(this),this.hanldeShowStory=this.hanldeShowStory.bind(this),this.handleCloseStory=this.handleCloseStory.bind(this),this.subscribeToStoriesService(),this.emit("create"),this.registerStoryReaderEvents()}get hasFavoriteCard(){return this.params.hasFavorite&&this._favoriteStories.length>0}get hasUgcCard(){return this.params.useUgcCard}get hasFavoriteStories(){return this.params.hasFavorite&&this.params.listType===Ze.DEFAULT}onStoryClick(e,t=0){((e,t)=>{const{deeplink:i,hideInReader:r,gameInstance:s}=e,n=Be()(i)&&i.trim().length>0,o=null==s?void 0:s.id;if(ze(Boolean(r),n,o,e.id))return;const a={id:e.id,index:t.index,isDeeplink:n,url:n?i:void 0};We(a,e,t)})(e,{eventPublisher:this,index:t})}destroy(){this.emit("destroy"),this.subscriptions.forEach((e=>e.unsubscribe())),this.removeAllListeners(),this.unregisterStoryReaderEvents(),this.subscriptions=[]}registerStoryReaderEvents(){mt.on("publicEvents.showStory",this.hanldeShowStory),mt.on("publicEvents.closeStory",this.handleCloseStory)}unregisterStoryReaderEvents(){mt.off("publicEvents.showStory",this.hanldeShowStory),mt.off("publicEvents.closeStory",this.handleCloseStory)}reload(){return wt(this,void 0,void 0,(function*(){yield this.loadStories({needFavorite:!1})}))}loadStories(e){return wt(this,void 0,void 0,(function*(){var t;const i=Boolean(this.params.hasFavorite)&&e.needFavorite,r={feed:this.params.identityFields.feedSlug,filter:{},defaultListLength:0,favoriteListLength:0,success:!0,error:{name:"",networkStatus:200,networkMessage:""}};try{this.emit("startLoading");const{defaultStories:e,favoriteStories:t}=yield this.storiesService.loadStories(Object.assign(Object.assign({},this.params),{needFavorite:i}));r.success=!0,r.error=null,r.defaultListLength=e.length,this.params.hasFavorite&&this.params.listType===Ze.DEFAULT&&(r.favoriteListLength=t.length)}catch(e){console.error(e),r.success=!1,r.error={name:e.name,networkMessage:e.networkMessage,networkStatus:e.networkStatus}}finally{r.filter=null!==(t=this.params.identityFields.filter)&&void 0!==t?t:{},this.emit("endLoading",r)}}))}hanldeShowStory(e){this.emit("openStory",e.id)}handleCloseStory(e){this.emit("closeStory",e.id)}subscribeToStoriesService(){const e=this.storiesService.observeDefaultStories(this.params.identityFields.feedSlug).watch(this.setDefaultStories);if(this.hasFavoriteStories){const e=this.storiesService.observeFavoriteStories().watch(this.setFavoriteStories);this.subscriptions.push(e)}const t=this.storiesService.observeSession().watch((e=>{this._session=e,this.emit("update")}));this.subscriptions.push(e,t)}setDefaultStories(e){this._defaultStories=e.map((e=>new gt(this,e))),this.emit("update")}setFavoriteStories(e){this._favoriteStories=e.map((e=>new vt(this,e))),this.emit("update")}}class bt extends gt{constructor(e,t){super(e,t),this.favoriteStories=[],this.favoriteStories=this.storyListViewModel.favoriteStories}}!function(e){e.STORY_LIST="storyList",e.STORY_READER="storyReader",e.GAME_READER="gameReader"}(yt||(yt={}));const _t=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();function xt(e){let t=null;if(_t){let i=window.localStorage.getItem(e);null!==i&&Be()(i)&&i.trim().length>0&&(t=JSON.parse(i))}return t}function Ct(e,t){_t&&window.localStorage.setItem(e,JSON.stringify(t))}var kt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};let At=null;function Lt(){return kt(this,void 0,void 0,(function*(){return null!=At?At:new Promise((e=>{!function(e,t){const i=new Image;i.onload=function(){var r=i.width>0&&i.height>0;t(e,r)},i.onerror=function(){t(e,!1)},i.src="data:image/webp;base64,"+{lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}[e]}("lossy",((t,i)=>{At=i,e(i)}))}))}))}var Mt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Ot=p(7315);function Et(){return Mt(this,void 0,void 0,(function*(){const[e,t]=yield Promise.all([Tt(),Lt()]);return{method:"POST",url:"session/open",params:{expand:"cache,storyWidgetsResources",fields:"session,server_timestamp,user_key,share,preview_aspect_ratio,placeholders,image_placeholders,is_allow_ugc"},data:It(e,t)}}))}y.use((()=>Mt(void 0,void 0,void 0,(function*(){return(yield B.request(yield Et())).data})))),(0,e.sample)({clock:w,target:m});const It=(e,t)=>{"iOS"===e.os_name?window.isIos=!0:"Android"===e.os_name&&(window.Android=!0);const i=o.getState();return i&&i.userId&&(e.user_id=i.userId),e.features="animation,data,deeplink,placeholder,resetTimers,gameReader,sendApi,swipeUpItems,imgPlaceholder,vod,closeStoryApi",t&&(e.features+=",webp"),e},Tt=()=>Mt(void 0,void 0,void 0,(function*(){return new Promise(((e,t)=>{let i=xt("device_data"),r=null;if(null!==i&&(r=i.device_id),null!==i&&r&&Be()(r)&&36===r.trim().length)v(r),e(i);else{const t={platform:"web",device_id:Ot.v4()};Ct("device_data",t),v(t.device_id),e(t)}}))}));var Rt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};function Pt(e,t,i=!1,r,s,n){const o=["slides_html","slides_duration","slides_screenshot_share","slides_payload"];s&&o.push("share_url");const a={url:`${t===ho?"ugc/":""}story/${e}`,method:"GET",params:{expand:o.join(",")}};return a.params&&(a.params.once=Number(n)),i||null!=a.params&&(a.params.fields=["id","slides_html","slides_duration","slides_screenshot_share","slides_payload"].join(",")),null!==r&&null!=a.params&&(a.params.session_id=r),a}ot.use((e=>Rt(void 0,[e],void 0,(function*({listType:e}){return B.get("story",Dt())}))));const Dt=(e,t,i,r,s)=>{var n;let a=null===(n=o.getState())||void 0===n?void 0:n.tags;const l={};a&&Ee()(a)&&a.length>0&&(l.tags=a.join(",")),void 0!==t&&Ee()(t)&&t.length>0&&(l.tags=t.join(","));return null==r||"number"!=typeof r&&!(e=>!isNaN(parseFloat(e))&&isFinite(e))(r)||(l.limit=r),e&&(l.session_id=e),null!=i&&(l.test=i),null!=s&&he()(s)&&(l.f=s),{params:l}},Nt=(0,e.createEffect)();var Bt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Nt.use((()=>Bt(void 0,void 0,void 0,(function*(){return(yield B.request(yield function(){return Bt(this,void 0,void 0,(function*(){return{method:"GET",url:"ugc/editor-config",params:{}}}))}())).data})))),m.on(Nt.doneData,((e,t)=>{const i=Object.assign({},e);return i.editor=t,i}));const Ft=Object.prototype.hasOwnProperty,jt=()=>{const e=Ie.getState(),t=Ue.getState(),i=[],r={};for(let t in e.default)Ft.call(e.default,t)&&(r[t]={type:xe.TEXT,name:t,value:e.default[t]});for(let t in e.user)Ft.call(e.user,t)&&(r[t]={type:xe.TEXT,name:t,value:e.user[t]});for(let e in r)Ft.call(r,e)&&i.push(r[e]);const s={};for(let e in t.default)Ft.call(t.default,e)&&(s[e]={type:xe.IMAGE,name:e,value:t.default[e]});for(let e in t.user)Ft.call(t.user,e)&&(s[e]={type:xe.IMAGE,name:e,value:t.user[e]});for(let e in s)Ft.call(s,e)&&i.push(s[e]);return i},Ut=(e,t)=>{const i={};return i[Ze.DEFAULT]=[],i[Ze.UGC]=[],i[e]=t,{storyTypeIds:i,style:"",widgetsData:{}}},Vt=(e,t)=>{let i;return i=null==t?Ut(Ze.DEFAULT,[]):t,{ids:i.storyTypeIds[e],style:i.style,widgetsData:i.widgetsData}},Gt=(0,e.createStore)({style:"",storyTypeIds:{[Ze.DEFAULT]:[],[Ze.UGC]:[]},widgetsData:{}}),zt=(0,e.createEffect)(),Wt=(0,e.createEvent)(),$t=(e,t)=>{let i=[];switch(e){case Se.default:i=t?it.getState()[t]:[];break;case Se.favorite:i=st.getState();break;case Se.onboarding:i=t?rt.getState()[t]:[]}return null!=i?i:[]},Ht=e=>"{{__ugc__}}"===e?Ze.UGC:Ze.DEFAULT;var qt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};var Zt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Yt=(e,t)=>Zt(void 0,void 0,void 0,(function*(){const e=yield(i={data:t},qt(void 0,void 0,void 0,(function*(){var e,t,r,s,n,o,a,l,d;let c=!1,u="",h={url:null!==(t=null===(e=i.data)||void 0===e?void 0:e.url)&&void 0!==t?t:"",method:null!==(s=null===(r=i.data)||void 0===r?void 0:r.method)&&void 0!==s?s:"get"};-1!==["post","put","path"].indexOf(null===(n=i.data)||void 0===n?void 0:n.method)?h.data=null!==(a=null===(o=i.data)||void 0===o?void 0:o.data)&&void 0!==a?a:void 0:h.params=null!==(d=null===(l=i.data)||void 0===l?void 0:l.params)&&void 0!==d?d:void 0;const p={requestId:i.id};try{const e=yield B.request(h);p.data=e.data,p.status=e.status,p.headers=e.headers,c=!0}catch(e){p.data=e,p.status=400,p.headers=[{}],u=e.toString()}return{name:i.cb,payload:{requestId:i.id,success:c,data:p,err:u}}})));var i;if(e.payload.success)return e.payload.data;throw e.payload.err}));var Xt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};function Qt(e,t){const i={url:"story-context",method:"GET",params:{id:e.join(","),fields:["style","widgetsData"].join(",")}};return null!=t&&null!=i.params&&(i.params.session_id=t),i}function Kt(e,t,i){return String(e).replace(new RegExp(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t),"g"),(()=>i))}zt.use((e=>Xt(void 0,[e],void 0,(function*({ids:e}){return B.request(Qt(e))})))),(0,e.sample)({clock:zt.done.filterMap((({params:e,result:t})=>{const i=t.data,r=Ht(e.feedSlug);if(i&&he()(i)){const t=Ut(r,e.ids);return t.style=i.style,t.widgetsData=i.widgetsData,t}})),target:Gt}),(0,e.sample)({clock:Wt,target:Gt});var Jt=p(3514),ei=p.n(Jt),ti=p(4871),ii=p.n(ti);let ri,si=!0;function ni(e){ri(e),si=e}function oi(){return ri(si),si}ri=function(){};class ai{constructor(){this.__lastUpdated=null,this._receiveTime=0,this._serverTimestamp=0,this.rawData={},this.myDictionary={}}get receiveTime(){return this._receiveTime}singleModelWrapper(){return""}attributes(){return["__lastUpdated"]}static prepareFromResponse(){}setAttributes(e){const t=this.attributes();let i=this;for(let r in e){let s=e[r];-1!==t.indexOf(r)&&(i[r]=s)}}static createInstance(e,t){const i=new e;let r=t;return""!==i.singleModelWrapper()&&void 0!==t[i.singleModelWrapper()]&&(r=t[i.singleModelWrapper()]),i.rawData=t,i.setAttributes(r),i._receiveTime=(new Date).getTime(),void 0!==t.server_timestamp&&(i._serverTimestamp=t.server_timestamp),i}static _fetch(e,t,i,r="get"){return new Promise(((s,n)=>{let o={url:t,method:r};-1!==["post","put","path"].indexOf(r)?o.data=i:o.params=i;B.request(o).then((function(t){let i,r;i=t.data,i&&(i.__lastUpdated=Date.now()),r=ai.createInstance(e,i),s(r)})).catch(n)}))}static _fetchList(e,t,i){return new Promise(((r,s)=>{B.get(t,{params:i}).then((function(t){const i=t.data;let s=[];i.forEach((t=>{s.push(ai.createInstance(e,t))}));let n={models:s,totalCount:Number(t.headers["x-pagination-total-count"]),currentPage:Number(t.headers["x-pagination-current-page"])};r(n)})).catch(s)}))}static emitEvent({type:e,event:t,eventData:i}){return new Promise(((r,s)=>{B.post(`${e}/event/${t}`,i).then((function(e){const t=e.data;r(t)})).catch(s)}))}static update(e,t,i="post"){let r={url:e,method:i};return-1!==["post","put","path"].indexOf(i)?r.data=t:r.params=t,new Promise(((e,t)=>{B.request(r).then((function(t){let i;i=t.data,e(i)})).catch(t)}))}}class li extends ai{attributes(){return["width","height","type","url"]}constructor(){super(),this._url=""}set url(e){this._url=e}get url(){let e=window.isSecureContext;return void 0===e&&"https:"===window.location.protocol&&(e=!0),e?this._url:this._url.replace(/^https:\/\//,"http://")}}const di=p(3981);class ci{constructor(){this.images=[],this.color="",this.gradient=!1}static createFromArray(e){const t=new ci;for(let i in e)e.hasOwnProperty(i)&&t.images.push(li.createInstance(li,e[i]));return t}findOneByType(e){let t=null;return this.images.forEach((i=>{i.type===e&&(t=i)})),t}findOneByWidth(e,t=!1){let i=null;return this.images.forEach((t=>{t.width===e&&(i=t)})),null!==i||t&&void 0!==(i=di(this.images))?i:null}}class ui extends ai{constructor(){super(...arguments),this._cover=null}attributes(){return ii()(super.attributes(),["id","cover","hasFavorite"])}set cover(e){this._cover=ci.createFromArray(e)}get cover(){return this._cover}get coverSrc(){var e;const t=null===(e=this._cover)||void 0===e?void 0:e.findOneByType("h");return null==t?void 0:t.url}}const hi=/[\r\n%#()<>?[\\\]^`{|}]/g;function pi(e,t="double"){return(e=(e=(e="double"===t?e.replace(/"/g,"'"):e.replace(/'/g,'"')).replace(/>\s{1,}</g,"><")).replace(/\s{2,}/g," ")).replace(hi,encodeURIComponent)}const fi=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34});function gi(e){return Object.keys(e).reduce(((t,i)=>t+i.split(/(?=[A-Z])/).join("-").toLowerCase()+":"+e[i]+";"),"")}function vi(e){let t=window.isSecureContext;return void 0===t&&"https:"===window.location.protocol&&(t=!0),t?e:e.replace(/^https:\/\//,"http://")}function mi(e){return e.map((e=>function(e){var t,i,r;if(!e.url)return null;let s={"font-family":null!==(t=e.family)&&void 0!==t?t:"normal",src:`url('${vi(String(e.url))}')`,"font-style":null!==(i=e.style)&&void 0!==i?i:"normal","font-weight":null!==(r=e.weight)&&void 0!==r?r:"normal"};e.title&&(s.src+=`, local('${e.title}')`);return`@font-face {${gi(s)}}\n`}(e))).filter(Boolean).join("")}function yi(e){"fonts"in document?e.forEach((e=>{const t=new FontFace(e.family,`url(${e.url})`,{style:e.style,weight:e.weight,display:"block"});document.fonts.add&&document.fonts.add(t),t.load()})):function(e){const t=mi(e);if(null!=t){const e="stories-font-style";let i=document.getElementById(e);null===i?(i=document.createElement("style"),i.type="text/css",i.id=e,i.attributes.setNamedItem(document.createAttribute("scoped")),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t)),document.body.appendChild(i)):i.styleSheet?i.styleSheet.cssText=t:(i.textContent="",i.appendChild(document.createTextNode(t)))}}(e)}var wi;!function(e){e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary",e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary"}(wi||(wi={}));var Si=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const bi=e=>Si(void 0,void 0,void 0,(function*(){return(yield fetch(e)).blob()})),_i=e=>Si(void 0,void 0,void 0,(function*(){const t=yield bi(e);return function(e,t=!0){return new Promise((function(i){var r=new FileReader;r.onloadend=function(){if(t){var e=String(r.result).replace("data:","").replace(/^.+,/,"");i(e)}else i(String(r.result))},r.readAsDataURL(e)}))}(new File([t],"image",{type:t.type,lastModified:(new Date).getTime()}),!1)}));function xi(e,t,i,r){var s=e.indexOf(i,t);if(-1===s)return null;for(var n="",o=s+i.length;o<e.length&&-1===r.indexOf(e[o]);o++)n+=e[o];return{foundAtIndex:s,value:n}}function Ci(e,t){const i=document.createElementNS("http://www.w3.org/2000/svg",e);for(let e in t)i.setAttributeNS(null,e.replace(/[A-Z]/g,(function(e,t,i,r){return"-"+e.toLowerCase()})),t[e]);return i}var ki;function Ai(e,t,i,r,s,n,o,a,l,d){var c=Ci("svg",{width:String(s),height:String(n),style:"background-color: #fff;"}),u=Ci("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"});c.appendChild(u);try{u.style.fontSize=document.body.style.fontSize}catch(e){console.error(e)}!function(){const h=t.cloneNode(!0);if(null!=r&&"string"==typeof r&&r.length>0){const e=Array.prototype.slice.call(h.querySelectorAll(r));for(let t=0;t<e.length;t++){const i=e[t];i&&i.style&&i.style.setProperty&&i.style.setProperty("display","none")}}u.appendChild(h);var p=[];(function(e){for(var t=[],i=0;;){var r=xi(e,i,"src: url(",[" ",")","\t"]);if(null==r)break;i=r.foundAtIndex+r.value.length,t.push(r.value.replace(/["']/g,""))}return t})(i).forEach((function(e){p.push(new Promise((function(t,r){_i(e).then((function(r){i=i.replace(e,r),t()})).catch((function(e){t()}))})))})),u.querySelectorAll("img").forEach((function(e){e.crossOrigin="Anonymous",p.push(new Promise((function(t,i){_i(e.src).then((function(i){e.onload=i=>e.decode().then((()=>t())),e.onerror=e=>{console.error(e),t()},e.src=i})).catch((function(e){t()}))})))})),u.querySelectorAll("video").forEach((function(e){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),u.querySelectorAll(".narrative-element-video").forEach((function(e){e.classList.add("init")})),Promise.all(p).then((function(){const t=Ci("style",{});t.textContent=i,c.appendChild(t);const r=(new XMLSerializer).serializeToString(c),u=new Image;u.onload=t=>{u.decode().then((function(){setTimeout((function(){const e=document.createElement("canvas"),t=e.getContext("2d");if(t){e.style.width=s+"px",e.style.height=n+"px",e.width=2*s,e.height=2*n,t.scale(2,2),t.drawImage(u,0,0);const i=e.toDataURL(o,a);bi(i).then((function(t){l(t),e.remove()}))}}),e===ki.IOS?200:void 0)})).catch((e=>{console.log({image:u,encodingError:e},"onDecodeError"),d("error render svg image: "+e)}))},u.onerror=e=>{d("error render svg image: "+e)},u.setAttribute("crossOrigin","Anonymous"),u.crossOrigin="Anonymous",u.src="data:image/svg+xml;base64,"+btoa(encodeURIComponent(r).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})))}))}()}function Li(e,t,i,r){return new Promise((function(s,n){null==r&&(r=""),function(e,t,i,r,s,n){Ai(e,t,i,r,t.clientWidth,t.clientHeight,"image/jpeg",1,s,n)}(e,t,i,r,(function(e){s(new File([e],"image.jpeg",{type:e.type,lastModified:(new Date).getTime()}))}),(function(){console.error("Image fail");const e=new Error;e.name="ImageFail",n(e)}))}))}function Mi(e){return"string"==typeof e&&(!isNaN(Number(e))&&!isNaN(parseFloat(e)))}!function(e){e[e.IOS=0]="IOS",e[e.ANDROID=1]="ANDROID",e[e.OTHER=2]="OTHER"}(ki||(ki={}));const Oi=()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}}),i=()=>{};window.addEventListener("test",i,t),window.removeEventListener("test",i)}catch(e){}return e},Ei=!!Oi()&&{passive:!0};var Ii=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Ti=(0,e.createEffect)((e=>Ii(void 0,[e],void 0,(function*({defaultList:e,onboardingList:t,favoriteList:i,onboardingTags:r,testKey:s,limit:n}){var o,a,l;const d=[],c=null===(a=null===(o=m.getState())||void 0===o?void 0:o.session)||void 0===a?void 0:a.id;let u=null;if(ei()(c)&&(d.push(Ri(yield Et(),"session")),u="@{session.session.id}"),!1!==e&&he()(e)&&Be()(e.feedSlug)){const t=e.feedSlug,i=null!==(l=e.filter)&&void 0!==l?l:{};t===ho?d.push(Ri(function(e,t,i,r,s){const{params:n}=Dt(i,r,s,null,t);return{method:"GET",url:"ugc/feed",params:n}}(0,i,u,[],s),`storyList_${t}`)):d.push(Ri(function(e,t,i,r){const{params:s}=Dt(t,i,r);return{method:"GET",url:`feed/${e}`,params:s}}(t,u,[],s),`storyList_${t}`))}i&&d.push(Ri(function(e){const{params:t}=Dt(e);return{method:"GET",url:"story",params:Object.assign(Object.assign({},t),{favorite:1})}}(u),"storyFavoriteList")),!1!==t&&Be()(t)&&d.push(Ri(function(e="onboarding",t,i,r){const{params:s}=Dt(t,i,null,r);return{method:"GET",url:`feed/${e}/onboarding`,params:s}}(t,u,r,n),`storyOnboardingList_${t}`));let h=null;try{const e=yield B.post("composite",{compositeRequest:d});if(e.status>=200&&e.status<=299)if(e.data&&e.data.compositeResponse&&Array.isArray(e.data.compositeResponse)){if(e.data.success)return e.data.compositeResponse;for(const t of e.data.compositeResponse){const e=t.status;if(je()(e)&&!(e>=200&&e<=299)){h={name:"networkError",networkStatus:e,networkMessage:String(t.body)};break}}}else h=e.data&&he()(e.data)&&null!=e.data.name&&null!=e.data.message&&null!=e.data.status?{name:e.data.name,networkStatus:e.data.status,networkMessage:e.data.message}:{name:"networkError",networkStatus:null,networkMessage:"Invalid data in API response, data from response as json: "+JSON.stringify(e.data)};else h=e.data&&he()(e.data)&&null!=e.data.name&&null!=e.data.message&&null!=e.data.status?{name:e.data.name,networkStatus:e.data.status,networkMessage:e.data.message}:{name:"networkError",networkStatus:e.status,networkMessage:"Invalid data in API response, data from response as json: "+JSON.stringify(e.data)}}catch(e){try{const t=e;if(t.response&&t.response.status)h={name:"networkError",networkStatus:t.response.status,networkMessage:t.response.statusText};else{let t="";window.navigator&&null!=window.navigator.onLine&&(t=" net::ERR_INTERNET_DISCONNECTED"),h={name:"error",networkStatus:null,networkMessage:e.toString()+t},console.error(e)}}catch(e){h={name:"error",networkStatus:null,networkMessage:e.toString()}}}if(null!==h)throw h;return[]})))),Ri=(e,t)=>({path:e.url,qs:e.params,body:e.data,ref:t,method:e.method}),Pi=e=>{const t=Ie.getState();for(let i in t.user)Ni.call(t.user,i)&&(e=Kt(e,`%${i}%`,t.user[i]));for(let i in t.default)Ni.call(t.default,i)&&(e=Kt(e,`%${i}%`,t.default[i]));const i=Ue.getState();for(let t in i.user)Ni.call(i.user,t)&&(e=Kt(e,`%${t}%`,i.user[t]));for(let t in i.default)Ni.call(i.default,t)&&(e=Kt(e,`%${t}%`,i.default[t]));return e},Di=(e,t)=>Array.isArray(e)?e.map((e=>Object.assign(Object.assign({},e),{title:e.need_placeholders?Pi(e.title):e.title,slidesLoaded:!1,is_opened:at(e),type:t}))):[];(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t;return null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body})),target:m}),(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t,i;return null===(i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body)||void 0===i?void 0:i.placeholders})),target:Re}),(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t,i;return null===(i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body)||void 0===i?void 0:i.image_placeholders})),target:Ge}),(0,e.sample)({clock:y.doneData.filterMap((e=>e.placeholders)),target:Re}),(0,e.sample)({clock:y.doneData.filterMap((e=>e.image_placeholders)),target:Ge});const Ni=Object.prototype.hasOwnProperty;(0,e.sample)({source:Qe,clock:m,fn:(e,t)=>{const i={};for(const r in e)Ni.call(e,r)&&(i[r]=e[r].map((e=>Object.assign(Object.assign({},e),{is_opened:at(e,t.user_key),title:e.need_placeholders?Pi(e.title):e.title}))));return i},target:Qe});const{storiesListIdsChanged:Bi}=(0,e.createApi)(et,{storiesListIdsChanged:(e,{storiesIdsUserEntity:t,feedSlug:i,storyList:r})=>{let s=m.getState().user_key||"default";const n=e[s]||{};return void 0===n[Je.FAVORITE]&&(n[Je.FAVORITE]=[]),void 0===n[Je.FEEDS]&&(n[Je.FEEDS]={}),t===Je.FEEDS&&i&&(n[Je.FEEDS][i]=r.map((e=>e.id))),t===Je.FAVORITE&&(n[Je.FAVORITE]=r.map((e=>e.id))),Object.assign(Object.assign({},e),{[s]:n})}}),{storiesListItemsAdded:Fi}=(0,e.createApi)(Qe,{storiesListItemsAdded:(e,{storiesIdsUserEntity:t,feedSlug:i,storyList:r})=>{let s=m.getState().user_key||"default";const n=e[s]||[],o=n.map((e=>e.id));return Object.assign(Object.assign({},e),{[s]:[...n,...r.filter((e=>-1===o.indexOf(e.id)))]})}});(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t;let i=null;for(const r of e)if(r.ref&&Be()(r.ref)){const e=r.ref.match(/^storyList_(.+)/);if(e&&Array.isArray(e)&&e[1]){let s=null===(t=r.body)||void 0===t?void 0:t.stories;const n=Ht(e[1]);n===Ze.UGC&&(s=r.body);const o=Di(s,n);i={storiesIdsUserEntity:Je.FEEDS,feedSlug:e[1],storyList:o}}}if(i)return i})),target:[Fi,Bi]}),(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t;let i=null;for(const r of e)if(r.ref&&Be()(r.ref)){const e=r.ref.match(/^storyOnboardingList_(.+)/);if(e&&Array.isArray(e)&&e[1]){const s=Di(null===(t=r.body)||void 0===t?void 0:t.stories,Ze.DEFAULT);i={storiesIdsUserEntity:Je.FEEDS,feedSlug:`onboarding_${e[1]}`,storyList:s}}}if(i)return i})),target:[Fi,Bi]}),(0,e.sample)({clock:Ti.doneData.filterMap((e=>{const t=e.find((e=>"storyFavoriteList"===e.ref));if(void 0===t)return;const i=Di(t.body,Ze.DEFAULT);return{storiesIdsUserEntity:Je.FAVORITE,feedSlug:null,storyList:i}})),target:[Fi,Bi]});const ji=(0,e.createEffect)();ji.use((e=>Ii(void 0,void 0,void 0,(function*(){const t=e.ids.map((t=>Ri(Pt(t,e.feedSlug),`storySlides_${t}`))),i=yield B.post("composite",{compositeRequest:t});return i.data&&i.data.success&&i.data.compositeResponse&&Array.isArray(i.data.compositeResponse)?i.data.compositeResponse:[]}))));const Ui=e=>e&&he()(e)&&"id"in e,Vi=(0,e.createEffect)();Vi.use((e=>Ii(void 0,[e],void 0,(function*({ids:e,id:t,feedSlug:i}){const r=[Ri(Pt(t,i),"storySlides"),Ri(Qt(e),"storyContext")],s=yield B.post("composite",{compositeRequest:r});return s.data&&s.data.success&&s.data.compositeResponse&&Array.isArray(s.data.compositeResponse)?s.data.compositeResponse:[]})))),Qe.on([ji.done,Vi.done],((e,{params:t,result:i})=>{const r=i;if(Array.isArray(r)){const i=Ht(t.feedSlug),s=m.getState().user_key||"default",n=(e[s]||[]).slice(0).map((e=>{var t,s,n,o,a,l,d,c,u,h,p,f,g,v,m;for(let y=0;y<r.length;y++)if(Ui(null===(t=r[y])||void 0===t?void 0:t.body)&&(null===(n=null===(s=r[y])||void 0===s?void 0:s.body)||void 0===n?void 0:n.id)===e.id&&i===e.type)return Object.assign({},e,{slides_html:e.need_placeholders?Array.from(null!==(l=null===(a=null===(o=r[y])||void 0===o?void 0:o.body)||void 0===a?void 0:a.slides_html)&&void 0!==l?l:[]).map((e=>Pi(e))):Array.from(null!==(u=null===(c=null===(d=r[y])||void 0===d?void 0:d.body)||void 0===c?void 0:c.slides_html)&&void 0!==u?u:[]),slides_duration:null===(p=null===(h=r[y])||void 0===h?void 0:h.body)||void 0===p?void 0:p.slides_duration,slides_screenshot_share:null===(g=null===(f=r[y])||void 0===f?void 0:f.body)||void 0===g?void 0:g.slides_screenshot_share,slides_payload:null===(m=null===(v=r[y])||void 0===v?void 0:v.body)||void 0===m?void 0:m.slides_payload,slidesLoaded:!0,is_opened:at(e)});return e}));return Object.assign(Object.assign({},e),{[s]:n})}return e})),(0,e.sample)({clock:Vi.done.filterMap((({params:e,result:t})=>{var i;const r=null===(i=t.find((e=>"storyContext"===e.ref)))||void 0===i?void 0:i.body,s=Ht(e.feedSlug);if(r&&he()(r)){const t=Ut(s,e.ids);return t.widgetsData=r.widgetsData,t.style=r.style,t}})),target:Gt});const Gi=(0,e.createEffect)((e=>Ii(void 0,[e],void 0,(function*({id:e,feedSlug:t,fetchShareUrl:i}){var r,s;const n=[],o=null===(s=null===(r=m.getState())||void 0===r?void 0:r.session)||void 0===s?void 0:s.id;let a=null;ei()(o)&&(n.push(Ri(yield Et(),"session")),a="@{session.session.id}"),n.push(Ri(Pt(e,t,!0,a,i),"story")),n.push(Ri(Qt([e],a),"storyContext"));const l=yield B.post("composite",{compositeRequest:n});if(l.data&&l.data.success&&l.data.compositeResponse&&Array.isArray(l.data.compositeResponse))return l.data.compositeResponse;if(l.data&&!l.data.success)throw Error("composite request error:"+JSON.stringify(l.data.compositeResponse));return[]}))));(0,e.sample)({clock:Gi.doneData.filterMap((e=>{var t;const i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body;if(i&&he()(i)&&i)return i})),target:m}),(0,e.sample)({clock:Gi.doneData.filterMap((e=>{var t,i;return null===(i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body)||void 0===i?void 0:i.placeholders})),target:Re}),(0,e.sample)({clock:Gi.doneData.filterMap((e=>{var t,i;return null===(i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body)||void 0===i?void 0:i.image_placeholders})),target:Ge}),(0,e.sample)({clock:Gi.done.filterMap((({params:e,result:t})=>{var i;const r=null===(i=t.find((e=>"storyContext"===e.ref)))||void 0===i?void 0:i.body;if(r&&he()(r)){const t=Ht(e.feedSlug),i=Ut(t,[e.id]);return i.widgetsData=r.widgetsData,i.style=r.style,i}})),target:Gt}),Qe.on(Gi.done.filterMap((({params:e,result:t})=>{var i;const r=null===(i=t.find((e=>"story"===e.ref)))||void 0===i?void 0:i.body;if(r&&he()(r))return r.type=Ht(e.feedSlug),r})),((e,t)=>{if(!Ui(t))return;const i=m.getState().user_key||"default",r=(e[i]||[]).slice(0).filter((e=>e.id!==(null==t?void 0:t.id))).slice(0);return t=Object.assign(t,{slides_html:t.need_placeholders?Array.from(t.slides_html).map((e=>Pi(e))):Array.from(t.slides_html),slides_duration:t.slides_duration,slidesLoaded:!0,is_opened:at(t)}),r.push(t),Object.assign(Object.assign({},e),{[i]:r})})),(0,e.sample)({source:Qe,clock:Ie,fn:(e,t)=>{const i={};for(const t in e)Ni.call(e,t)&&(i[t]=e[t].map((e=>{var t;return Object.assign(Object.assign({},e),{slides_html:e.need_placeholders&&Array.isArray(e.slides_html)?e.slides_html.map((e=>Pi(e))):null!==(t=e.slides_html)&&void 0!==t?t:[]})})));return i},target:Qe}),(0,e.sample)({source:m,clock:m,filter:e=>{var t;return Boolean(null===(t=null==e?void 0:e.session)||void 0===t?void 0:t.id)},target:(0,e.createEffect)((e=>{yi(e.cache.filter((e=>"font-face"===e.type)))}))});const{storyFeedsAdded:zi}=(0,e.createApi)(Xe,{storyFeedsAdded:(e,t)=>t});(0,e.sample)({clock:Ti.doneData.filterMap((e=>{let t={};for(const i of e)if(i.ref&&Be()(i.ref)){const e=i.ref.match(/^storyList_(.+)/);if(e&&Array.isArray(e)&&e[1]){const r=i.body;t[e[1]]=ai.createInstance(ui,r)}}return t})),target:zi});var Wi=p(2438),$i=p.n(Wi),Hi=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class qi extends Error{}class Zi{fetchSessionAndStoriesCompositeFx(e){return Hi(this,void 0,void 0,(function*(){return Ti({defaultList:!1,onboardingList:e.onboardingList,favoriteList:!1,onboardingTags:e?e.customTags:void 0,limit:e?e.limit:void 0})}))}fetchSingleStoryWithoutContext(e,t,i){return Hi(this,void 0,void 0,(function*(){try{yield Gi({id:e,feedSlug:t,fetchShareUrl:i});const r=Ke.getState().find((t=>t.id===e))||Ye(e);return r.slidesLoaded=!1,r}catch(t){return Ye(e)}}))}fetchSingleStoryContext(e,t){return Hi(this,void 0,void 0,(function*(){yield zt({ids:[e],feedSlug:t});const i=Ke.getState().find((t=>t.id===e));if(!i)throw new Error;return i.slidesLoaded=!0,i}))}fetchStoriesSlides(e,t){return Hi(this,void 0,void 0,(function*(){const i=lt.getState()[e];i.length>0&&(yield ji({ids:i,feedSlug:t}))}))}fetchMultipleStoriesContext(e,t,i){return Hi(this,void 0,void 0,(function*(){const r=Vt(t,Gt.getState()),s=Ke.getState().find((i=>i.id===e&&i.type===t));let n=null!==r&&""!==r.style;const o=lt.getState()[t];t===Ze.DEFAULT&&o.length>0&&(null==r?void 0:r.ids)!==o&&(n=!1);const a=!n&&!(null==s?void 0:s.slidesLoaded),l=!n&&o.length;if(a){const r=t===Ze.DEFAULT?o:[];yield Vi({ids:r,id:e,feedSlug:i})}else if(l)yield zt({ids:o,feedSlug:i});else{if(null==s?void 0:s.slidesLoaded)throw new qi;yield ji({ids:[e],feedSlug:i})}}))}getStoryContextInternalModel(e){const t=lt.getState()[e];return Gt.getState()||Ut(e,t)}static updateStoryLike(e,t){return Hi(this,void 0,void 0,(function*(){let i=!1;const r={like:void 0};let s="";try{const n=yield B.post(`story-like/${e}`,{value:t});void 0!==n.data.like?(i=!0,r.like=n.data.like,ct({id:e,like:r.like})):s="response.data.like is undefined"}catch(e){s=e.toString()}if(i)return r;throw s}))}static getStorySharePath(e){return Hi(this,void 0,void 0,(function*(){let t=!1;const i={url:void 0};let r="";try{const s=yield B.get(`story-share/${e}`,{});void 0!==s.data.url?(t=!0,i.url=s.data.url):r="response.data.url is undefined"}catch(e){r=e.toString()}if(t)return i;throw r}))}static markAsOpened(e){if(!ei()(m.getState().user_key)){const t=`u/${m.getState().user_key}/s_opened`;let i=xt(t);Ee()(i)||(i=[]),i.push(e),i=$i()(i),Ct(t,i)}ut({id:e})}static setBookmark(e,t){return Hi(this,void 0,void 0,(function*(){let i=!1;const r={favorite:void 0};let s="";try{const n=yield B.post(`story-favorite/${e}`,{value:t});void 0!==n.data.favorite?(i=!0,r.favorite=Boolean(n.data.favorite),!1===r.favorite?Bi({storiesIdsUserEntity:Je.FAVORITE,feedSlug:null,storyList:st.getState().filter((t=>t.id!==e))}):Bi({storiesIdsUserEntity:Je.FAVORITE,feedSlug:null,storyList:[...st.getState(),...Ke.getState().filter((t=>t.id===e))]}),dt({id:e,favorite:r.favorite})):s="response.data.favorite is undefined"}catch(e){s=e.toString()}if(i)return r;throw s}))}}const Yi=(0,e.createStore)({uiPaused:!1,timerPaused:!1,locked:!1,closeGestureInAction:!1}),Xi=Yi.map((e=>e.uiPaused)),Qi=Yi.map((e=>e.timerPaused)),Ki=(0,e.createStore)(!1),Ji=(0,e.createStore)(!0),er=(0,e.createStore)(!0),tr=(0,e.createEvent)(),ir=(0,e.createEvent)(),rr=(0,e.createEvent)(),sr=(0,e.createEvent)(),nr=(0,e.createEvent)(),or=(0,e.createEvent)(),ar=(0,e.createEvent)(),lr=(0,e.createEvent)(),dr=(0,e.createEvent)(),cr=(0,e.createEvent)(),ur=(0,e.createEvent)(),hr=(0,e.createEvent)(),pr=(0,e.createEvent)(),fr=(0,e.createEvent)(),gr=t=>(0,e.sample)({source:Yi,clock:t,filter:e=>!e.locked}),vr=gr(ar),mr=gr(lr),yr=gr(dr),wr=gr(cr);Yi.on(yr,(e=>Object.assign(Object.assign({},e),{uiPaused:!0,timerPaused:!0}))).on(wr,(e=>Object.assign(Object.assign({},e),{uiPaused:!1,timerPaused:!1}))).on(vr,(e=>e.timerPaused?e:Object.assign(Object.assign({},e),{timerPaused:!0}))).on(mr,(e=>e.timerPaused?Object.assign(Object.assign({},e),{timerPaused:!1}):e)).on(ur,(e=>Object.assign(Object.assign({},e),{uiPaused:!0,timerPaused:!0,locked:!0}))).on(hr,(e=>Object.assign(Object.assign({},e),{uiPaused:!1,timerPaused:!1,locked:!1}))).on(pr,(e=>Object.assign(Object.assign({},e),{timerPaused:!0,locked:!0}))).on(fr,(e=>Object.assign(Object.assign({},e),{timerPaused:!1,locked:!1}))),Ki.on(tr,(e=>!0)).on(ir,(e=>!1)),Ji.on(rr,(()=>!0)).on(sr,(()=>!1)),er.on(nr,(()=>!0)).on(or,(()=>!1));const Sr={id:"",isOpened:!1,type:me.Social,link:""},br=(0,e.createStore)(Sr),_r=br.map((e=>e.isOpened)),xr=(0,e.createEvent)(),Cr=(0,e.createEvent)();br.on(xr,((e,t)=>Object.assign(Object.assign({},e),{link:t.link,type:t.type,id:t.id,isOpened:!0}))).on(Cr,(e=>Sr));var kr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Ar{constructor(){this.type=Ar.name}init(e){return kr(this,void 0,void 0,(function*(){}))}get firstElement(){var e;return null===(e=this.elements)||void 0===e?void 0:e.item(0)}get isInited(){return Boolean(this.firstElement)}pause(){}resume(){}destroy(){}getActiveElement(){var e;return null===(e=this.elements)||void 0===e?void 0:e.item(0)}getActiveElements(){return this.elements}refreshUserData(){}getType(){return this.type}}var Lr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Mr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Mr.name}init(e){return Lr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-copy");try{this.slideApi.WidgetCopy.initWidget(this.elements)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetCopy.refreshUserData(this.elements)}click(e){this.slideApi.WidgetCopy.click(e)}}var Or=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Er extends Ar{constructor(e){super(),this.slideApi=e,this.type=Er.name}init(e){return Or(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-data-input");try{this.slideApi.WidgetDataInput.initWidget(this.elements)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetDataInput.refreshUserData(this.elements)}click(e){this.slideApi.WidgetDataInput.click(e)}setUserData(e,t=""){this.slideApi.WidgetDataInput.setUserData(e,t)}}var Ir=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Tr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Tr.name}init(e){return Ir(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-date-countdown");const t=Array.from(e.querySelectorAll(".narrative-slide.narrative-multi-slide"));try{if(!this.elements.length)return;this.slideApi.WidgetDateCountdown.initWidget(this.elements,t)}catch(e){console.error(e)}}))}pause(){try{if(!this.elements)return;this.slideApi.WidgetDateCountdown.pause(this.elements)}catch(e){console.error(e)}}resume(){try{if(!this.elements)return;this.slideApi.WidgetDateCountdown.resume(this.elements)}catch(e){console.error(e)}}refreshUserData(){this.elements&&this.slideApi.WidgetDateCountdown.refreshUserData(this.elements)}}var Rr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Pr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Pr.name}init(e){return Rr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-poll");try{if(!this.firstElement)return;this.slideApi.WidgetPoll.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetPoll.refreshUserData(this.elements)}select(e){this.slideApi.WidgetPoll.select(e)}setUserData(e,t=""){this.slideApi.WidgetPoll.setUserData(e,t)}}var Dr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Nr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Nr.name}init(e){return Dr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-poll-layers");const t=e.querySelectorAll(".narrative-slide.narrative-multi-slide");try{if(!this.firstElement)return;this.slideApi.WidgetPollLayers.initWidget(this.firstElement,Array.from(t))}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetPollLayers.refreshUserData(this.elements)}select(e){this.slideApi.WidgetPollLayers.select(e)}}var Br=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Fr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Fr.name}init(e){return Br(this,void 0,void 0,(function*(){var t;this.elements=e.querySelectorAll(".narrative-element-quest");const i=e.querySelectorAll(".narrative-slide"),r=null===(t=null==i?void 0:i.item(0))||void 0===t?void 0:t.getAttribute("data-quest-count");this.elements.length||null==r||(this.elements=i);try{if(!this.firstElement)return;yield this.slideApi.WidgetQuest.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetQuest.refreshUserData(this.elements)}select(e){this.slideApi.WidgetQuest.select(e)}handleRouteClick({direction:e,slideIndex:t,slidesCount:i,onClick:r}){this.firstElement&&this.slideApi.WidgetQuest.handleRouteClick(this.firstElement,{direction:e,slideIndex:t,slideCount:i,click:r})}}var jr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Ur extends Ar{constructor(e){super(),this.slideApi=e,this.type=Ur.name}init(e){return jr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-quiz");try{if(!this.firstElement)return;this.slideApi.WidgetQuiz.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetQuiz.refreshUserData(this.elements)}select(e){this.slideApi.WidgetQuiz.select(e)}slideQuizIsDone(e){return this.slideApi.WidgetQuiz.slideQuizIsDone(e)}}var Vr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Gr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Gr.name}init(e){return Vr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-quiz-grouped");try{if(!this.firstElement)return;this.slideApi.WidgetQuizGrouped.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetQuizGrouped.refreshUserData(this.elements)}select(e){this.slideApi.WidgetQuizGrouped.select(e)}slideQuizIsDone(e){return this.slideApi.WidgetQuizGrouped.slideQuizIsDone(e)}}var zr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Wr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Wr.name,this.disableSwipeGesture=this.disableSwipeGesture.bind(this),this.enableSwipeGesture=this.enableSwipeGesture.bind(this)}init(e){return zr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-range-slider"),this.slideContent=e;try{if(!this.firstElement)return;this.slideApi.WidgetRangeSlider.initWidget(this.firstElement),this.registerMouseAndTouchEvents()}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetRangeSlider.refreshUserData(this.elements)}click(e){this.slideApi.WidgetRangeSlider.click(e)}isClickCapturedBySlider(e){return this.slideApi.WidgetRangeSlider.isClickCapturedBySlider(e)}disableSwipeGesture(e){sr()}enableSwipeGesture(e){rr()}registerMouseAndTouchEvents(){this.slideContent.addEventListener("mouseup",this.enableSwipeGesture),this.slideContent.addEventListener("touchend",this.enableSwipeGesture),this.slideContent.addEventListener("mousedown",this.disableSwipeGesture),this.slideContent.addEventListener("touchstart",this.disableSwipeGesture)}unregisterMouseAndTouchEvents(){var e,t,i,r;null===(e=this.slideContent)||void 0===e||e.removeEventListener("mouseup",this.enableSwipeGesture),null===(t=this.slideContent)||void 0===t||t.removeEventListener("touchend",this.enableSwipeGesture),null===(i=this.slideContent)||void 0===i||i.removeEventListener("mousedown",this.disableSwipeGesture),null===(r=this.slideContent)||void 0===r||r.removeEventListener("touchstart",this.disableSwipeGesture)}destroy(){this.unregisterMouseAndTouchEvents()}}var $r=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Hr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Hr.name}init(e){return $r(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-rate");try{this.slideApi.WidgetRate.initWidget(this.elements)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetRate.refreshUserData(this.elements)}select(e){this.slideApi.WidgetRate.select(e)}setUserData(e,t=""){this.slideApi.WidgetRate.setUserData(e,t)}}var qr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Zr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Zr.name,this.handleShareComplete=this.handleShareComplete.bind(this)}init(e){return qr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-share"),this.slideContent=e;const t=e.querySelectorAll(".narrative-slide.narrative-multi-slide");try{this.registerEvents(),this.slideApi.WidgetShare.initWidget(this.elements,Array.from(t))}catch(e){console.error(e)}}))}complete(e,t){this.slideApi.WidgetShare.complete(e,t)}refreshUserData(){this.elements&&this.slideApi.WidgetShare.refreshUserData(this.elements)}click(e){this.slideApi.WidgetShare.click(e)}destroy(){this.unregisterEvents()}registerEvents(){mt.on(`${Zr.name}.shareComplete`,this.handleShareComplete)}unregisterEvents(){mt.off(`${Zr.name}.shareComplete`,this.handleShareComplete)}handleShareComplete({shareId:e,result:t}){ri(`[Share Widget]: share complete, { shareId, result }: ${e}, ${t}}`),this.complete(e,t)}}var Yr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Xr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Xr.name}init(e){return Yr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-test");try{if(!this.firstElement)return;this.slideApi.WidgetTest.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetTest.refreshUserData(this.elements)}select(e){this.slideApi.WidgetTest.select(e)}slideTestIsDone(e){return this.slideApi.WidgetTest.slideTestIsDone(e)}slideTestWithTimer(e){return this.slideApi.WidgetTest.slideTestWithTimer(e)}}var Qr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Kr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Kr.name}init(e){return Qr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-vote");try{if(!this.firstElement)return;this.slideApi.WidgetVote.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetVote.refreshUserData(this.elements)}select(e){this.slideApi.WidgetVote.select(e)}}const Jr={id:"",running:!1},es=(0,e.createStore)(Jr),ts=(0,e.createEvent)(),is=(0,e.createEvent)(),rs=(0,e.createEvent)(),ss=(0,e.createEffect)((({shareId:e,result:t})=>{rs(),fr(),mt.emit(`${Zr.name}.shareComplete`,{shareId:e,result:t})}));es.on(ts,((e,t)=>Object.assign(Object.assign({},e),{id:t.id,running:!0}))).on(rs,(()=>Jr)),(0,e.sample)({clock:is,source:es,filter:e=>e.running,fn:(e,t)=>({shareId:e.id,result:t.result}),target:ss});const ns={isOpened:!1,url:"",elementId:""},os=(0,e.createStore)(ns),as=(os.map((e=>e.isOpened)),(0,e.createEvent)()),ls=(0,e.createEvent)();(0,e.sample)({clock:as,target:sr}),(0,e.sample)({clock:ls,target:rr}),os.on(as,((e,t)=>({url:t.url,elementId:t.elementId,isOpened:!0}))).on(ls,(e=>ns));const ds=(0,e.createStore)({prevStoryId:-1,prevSlideIndex:-1}),cs=(0,e.createEvent)(),us=(0,e.createEvent)(),hs=(0,e.createEvent)(),ps=(0,e.createEffect)((e=>{e.prevStoryId!==e.currentStoryId&&mt.emit("publicEvents.showStory",{id:e.currentStoryId,index:e.currentSlideIndex}),-1!==e.prevStoryId&&mt.emit("statistics.nextSlide",{fromStoryId:e.prevStoryId,fromSlideIndex:e.prevSlideIndex}),mt.emit("publicEvents.showSlide",{id:e.currentStoryId,index:e.currentSlideIndex}),hs(e)}));ds.on(hs,((e,t)=>({prevStoryId:t.currentStoryId,prevSlideIndex:t.currentSlideIndex}))),ds.reset(us),(0,e.sample)({clock:cs,source:ds,fn:(e,t)=>Object.assign(Object.assign({},e),t),target:ps});class fs{constructor(){this.__lastUpdated=null,this._receiveTime=0,this._serverTimestamp=0,this.rawData={},this.myDictionary={}}get receiveTime(){return this._receiveTime}singleModelWrapper(){return""}attributes(){return["__lastUpdated"]}static prepareFromResponse(){}setAttributes(e){const t=this.attributes();let i=this;for(let r in e){let s=e[r];-1!==t.indexOf(r)&&(i[r]=s)}}static createInstance(e,t){const i=new e;let r=t;return""!==i.singleModelWrapper()&&void 0!==t[i.singleModelWrapper()]&&(r=t[i.singleModelWrapper()]),i.rawData=t,i.setAttributes(r),i._receiveTime=(new Date).getTime(),void 0!==t.server_timestamp&&(i._serverTimestamp=t.server_timestamp),i}static _fetch(e,t,i,r="get"){return new Promise(((e,t)=>{e({})}))}static _fetchList(e,t,i){return Promise.resolve({})}static emitEvent({type:e,event:t,eventData:i}){return Promise.resolve()}static update(e,t,i="post"){return Promise.resolve()}}class gs extends fs{static sentData(e,t,i){return new Promise((r=>{i("apiRequest",{url:"story-data/"+e,method:"put",params:null,data:t,headers:null}).then((e=>{r({data:e.data,status:200,headers:[{}]})})).catch((e=>{r({data:e,status:400,headers:[{}]})}))}))}static sendApiRequest({url:e,method:t,params:i,headers:r,data:s,profilingKey:n},o){return new Promise((n=>{o("apiRequest",{url:e,method:t,params:i,data:s,headers:r}).then((e=>{n({data:e.data,status:200,headers:[{}]})})).catch((e=>{n({data:e,status:400,headers:[{}]})}))}))}static sendApiRequestPromise(e,t,i){const{id:r,url:s,method:n,params:o,headers:a,data:l,cb:d}=JSON.parse(e);return i("apiRequest",{url:s,method:n,params:o,data:l,headers:a}).then((e=>{let i=JSON.stringify({requestId:r,data:JSON.stringify(e.data),status:e.status,headers:e.headers});t(d,i)}),(e=>{let i=JSON.stringify({requestId:r,data:JSON.stringify(e),status:400,headers:[{}]});t(d,i)}))}}class vs extends fs{attributes(){return["width","height","type","url"]}constructor(){super(),this._url=""}set url(e){this._url=e}get url(){let e=window.isSecureContext;return void 0===e&&"https:"===window.location.protocol&&(e=!0),e?this._url:this._url.replace(/^https:\/\//,"http://")}}const ms=p(3981);class ys{constructor(){this.images=[],this.color="",this.gradient=!1}static createFromArray(e){const t=new ys;for(let i in e)e.hasOwnProperty(i)&&t.images.push(vs.createInstance(vs,e[i]));return t}findOneByType(e){var t;return null!==(t=this.images.find((t=>t.type===e)))&&void 0!==t?t:null}findOneByCoverQuality(e){return this.findOneByType(this.mapCoverQualityToImageType(e))}findOneByWidth(e,t=!1){let i=null;return this.images.forEach((t=>{t.width===e&&(i=t)})),null!==i||t&&void 0!==(i=ms(this.images))?i:null}mapCoverQualityToImageType(e){switch(e){case q.Medium:return"m";case q.High:return"h"}}}const ws=()=>null!==p.nc&&void 0!==p.nc?p.nc:"";class Ss extends fs{constructor(){super(...arguments),this._title="",this.title_color="",this.magazine_name="",this.is_opened=!1,this._slides_html=[],this.slides_duration=[],this.slides_screenshot_share=[],this.source="",this.favorite=!1,this.like=0,this.slides_count=null,this.deeplink=null,this.hide_in_reader=null,this.blank=!1,this.disable_close=!1,this.need_placeholders=null,this._placeholders={},this.favorite_cell=!1,this.ugc_card_cell=!1,this.slidesLoaded=!1,this._imageSrc=null,this._parsedIssueArticleIds=null,this._parsedArticleIds=null,this._parsedSlideImage=null,this._video_cover=null,this._videoCoverSrc=null}static fetch(e,t){return this.placeholders=t,this._fetch(Ss,`story/${e}`,{expand:"slides_html,slides_duration"})}static fetchList(e,t,i){this.placeholders=e;const r={tags:t};return void 0!==i&&(r.favorite=Number(i)),this._fetchList(Ss,"story",r)}static fetchWithSlides(e,t){return this.placeholders=t,Promise.all(e.map((e=>this.fetch(e,t))))}static fetchOnboardingList(e,t){return this.placeholders=e,this._fetchList(Ss,"story-onboarding",{tags:t})}static fetchOnboardingListWithSlides(e,t){return this.placeholders=t,Promise.all(e.map((e=>this.fetch(e,t))))}attributes(){return ii()(super.attributes(),["title","title_color","source","magazine_name","background","background_color","id","image","display_to","display_from","slides_html","slides_duration","slides_screenshot_share","favorite","like","slides_count","deeplink","hide_in_reader","disable_close","like_functional","favorite_functional","share_functional","is_opened","tags","has_audio","has_placeholder","video_cover","need_placeholders","has_swipe_up","share_url","game_instance","blank","slidesLoaded"])}set image(e){this._image=ys.createFromArray(e)}get image(){return this._image}get issueArticleIds(){return this.parseHtmlSlidesForLinks(),null!==this._parsedIssueArticleIds?this._parsedIssueArticleIds:[]}get articleIds(){return this.parseHtmlSlidesForLinks(),null!==this._parsedArticleIds?this._parsedArticleIds:[]}imagePerSlide(e){var t,i;return this.parseHtmlSlidesForMainImage(),null!==(i=null===(t=this._parsedSlideImage)||void 0===t?void 0:t[e])&&void 0!==i?i:null}parseHtmlSlidesForLinks(){null===this._parsedArticleIds&&null===this._parsedIssueArticleIds&&this.slides_html.forEach((e=>{const t=e.match(/<[^<]*narrative-element-link.*data-link-type="([a-z-]*)".*data-link-target="(\d+)"[^<]*>/i);if(null!==t){const e=t[1],i=parseInt(t[2]);"article"===e?(null===this._parsedArticleIds&&(this._parsedArticleIds=[]),-1===this._parsedArticleIds.indexOf(i)&&this._parsedArticleIds.push(i)):"issue-article"===e&&(null===this._parsedIssueArticleIds&&(this._parsedIssueArticleIds=[]),-1===this._parsedIssueArticleIds.indexOf(i)&&this._parsedIssueArticleIds.push(i))}}))}parseHtmlSlidesForMainImage(){!this._parsedSlideImage&&this.slides_html.length&&(this._parsedSlideImage=this.slides_html.map((e=>this.parseSlideNarrativeImageSrc(e)||this.parseSlideNarrativeVideoPosterSrc(e)||null)))}parseSlideNarrativeImageSrc(e){const t=e.match(/<[^<]*narrative-element-image.*<img[^<]*src="([^"]*)"[^<]*>/i);return null==t?void 0:t[1]}parseSlideNarrativeVideoPosterSrc(e){const t=e.match(/<[^<]*narrative-element-video.*<video[^<]*poster\-remote\-src="([^"]*)"[^<]*>/i);return null==t?void 0:t[1]}set video_cover(e){null!==e&&(this._video_cover=ys.createFromArray(e))}get video_cover(){return this._video_cover}get videoCoverSrc(){if(!1===this._videoCoverSrc)return null;if(null===this._videoCoverSrc){const e=this.video_cover;if(null===e)return this._videoCoverSrc=!1,null;const t=e.findOneByType("h");if(null!==t)return t.url}return"string"==typeof this._videoCoverSrc?this._videoCoverSrc:null}get title(){return this._title}set title(e){if(!0===this.need_placeholders||!0===this.rawData.need_placeholders)for(let t in Ss.placeholders)Ss.placeholders.hasOwnProperty(t)&&(e=Kt(e,`%${t}%`,Ss.placeholders[t]));this.rawData.title=e,this._title=e}get slides_html(){return this._slides_html}set slides_html(e){if(!0===this.need_placeholders||!0===this.rawData.need_placeholders)for(let t in Ss.placeholders)if(Ss.placeholders.hasOwnProperty(t))for(let i=0;i<e.length;i++)e[i]=Kt(e[i],`%${t}%`,Ss.placeholders[t]);const t=ws();for(let i=0;i<e.length;i++)e[i]=Kt(e[i],"{{nonce}}",null!=t?t:"");this._slides_html=e}get isOpened(){return this.is_opened}set isOpened(e){this.is_opened=e,this.rawData.is_opened=e}}Ss.placeholders={};const bs=Ss,_s=p(4871);class xs extends fs{constructor(){super(...arguments),this.style="",this.widgetsData={}}static fetch(e){return this._fetch(xs,"story-context",{id:e.join(",")})}attributes(){return _s(super.attributes(),["style","widgetsData"])}}var Cs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class ks extends ht{constructor(e,t){super(),this.storiesItem=e,this._hasShare=t,this._muted=!0,this._activeSlideIndex=0,this.displayedSlides=[],this.displayedSlides=this.fillSlides(),this.redirectToSlide=this.redirectToSlide.bind(this),this.nextSlide=this.nextSlide.bind(this)}get id(){return this.storiesItem.id}get title(){return this.storiesItem.title}get slidesLoaded(){return this.storiesItem.slidesLoaded}get like(){return this.storiesItem.like}get favorite(){return this.storiesItem.favorite}get needBottomPanel(){return!this.storiesItem.blank&&(this.hasLike||this.hasFavorite||this.hasShare||this.hasAudio)}get hasLike(){return Boolean(this.storiesItem.like_functional)}get hasShare(){return!!Boolean(this.storiesItem.share_functional)&&this._hasShare}get hasFavorite(){return Boolean(this.storiesItem.favorite_functional)}get hasAudio(){return Boolean(this.storiesItem.has_audio)}get slides(){return this.displayedSlides}get activeSlideIndex(){return this._activeSlideIndex}get slidesCount(){var e;return null!==(e=this.storiesItem.slides_count)&&void 0!==e?e:0}get slidesDuration(){return this.storiesItem.slides_duration}get activeSlideDuration(){return this.slidesDuration[this.activeSlideIndex]}get hiddenTimeline(){return Array.isArray(this.storiesItem.slides_duration)&&1===this.storiesItem.slides_duration.length&&0===this.storiesItem.slides_duration[0]}get displayedSlideImage(){return this.storiesItem.blank?null:this.storiesItem.imagePerSlide(this.activeSlideIndex)}get isBlank(){return this.storiesItem.blank}get reachEnd(){return this.activeSlideIndex===this.slidesCount-1}get reachStart(){return 0===this.activeSlideIndex}get disableClose(){return this.storiesItem.disable_close}handleSlideClick(e){e.stopPropagation(),e.preventDefault()}nextSlide(){this.reachEnd||this.toSlide(this.activeSlideIndex+1)}prevSlide(){this.reachStart||this.toSlide(this.activeSlideIndex-1)}toSlide(e){this._activeSlideIndex=e,this.displayedSlides=this.fillSlides(),this.update()}updateStoriesItem(e){this.storiesItem=e,this.displayedSlides=this.fillSlides(),this.update()}fillSlides(){return this.slidesLoaded?Array.isArray(this.storiesItem.slides_html)?this.storiesItem.slides_html.slice(this._activeSlideIndex,this._activeSlideIndex+2):[]:[""]}setLike(e){this.updateStoryLike(e),mt.emit("publicEvents.likeStory",{id:this.id,index:this.activeSlideIndex,value:1===e})}setDislike(e){this.updateStoryLike(e),mt.emit("publicEvents.dislikeStory",{id:this.id,index:this.activeSlideIndex,value:-1===e})}setBookmark(e){return Cs(this,void 0,void 0,(function*(){const t=this.storiesItem.favorite;this.storiesItem.favorite=e,this.update();try{const t=yield Zi.setBookmark(this.id,e);if(null==t.favorite)return;this.storiesItem.favorite=t.favorite,mt.emit("publicEvents.favoriteStory",{id:this.id,index:this.activeSlideIndex,value:t.favorite})}catch(e){this.storiesItem.favorite=t,console.error(e)}finally{this.update()}}))}share(){return Cs(this,void 0,void 0,(function*(){mt.emit("publicEvents.shareStory",{id:this.id,index:this.activeSlideIndex}),this.isShareAsScreenshot()?mt.emit("storySlide.performScreenShotShareAction",{shareId:"slide-screenshot-share",hideElementsSelector:""}):oi()?yield this.performSessionShareAction():this.performWithoutSessionShareAction()}))}markAsOpened(){Zi.markAsOpened(this.id),this.storiesItem.isOpened=!0}updateStoryLike(e){return Cs(this,void 0,void 0,(function*(){try{const t=yield Zi.updateStoryLike(this.id,e);null!=t.like&&(this.storiesItem.like=t.like)}catch(e){console.error(e)}finally{this.update()}}))}isShareAsScreenshot(){var e,t;const i=null!==(t=null===(e=this.storiesItem)||void 0===e?void 0:e.slides_screenshot_share)&&void 0!==t?t:[],r=this._activeSlideIndex;return Boolean(i[r])}performSessionShareAction(){return Cs(this,void 0,void 0,(function*(){try{const{url:e}=yield Zi.getStorySharePath(this.id);if(!e)return;this.storiesItem.share_url=e,this.emitShareStoryWithPathEvent(e);const t={title:this.storiesItem.title,text:"",url:e};mt.emit("storySlide.performShareAction",{shareId:"story-share",config:t})}catch(e){console.error(e)}}))}performWithoutSessionShareAction(){const e=this.storiesItem.share_url;if(!e)return;this.emitShareStoryWithPathEvent(e);const t={title:this.storiesItem.title,text:"",url:e};mt.emit("storySlide.performShareAction",{shareId:"story-share",config:t})}redirectToSlide({slideIndex:e,layerIndex:t}){e!==this.activeSlideIndex&&this.toSlide(e)}emitShareStoryWithPathEvent(e){mt.emit("publicEvents.shareStoryWithPath",{id:this.id,index:this.activeSlideIndex,url:e})}}var As=p(5136);class Ls{constructor(e){this.window=e}get width(){const e=this.window.document.documentElement.clientWidth;return Math.abs(this.window.innerWidth-e)}setScrollbar(e=this.width){this._disableOverFlow(),this._setElementAttributes("body","paddingRight",(t=>t+e))}_disableOverFlow(){const e=this.window.document.body.style.overflow;e&&(this.window.document.body.dataset.overflow=e),this.window.document.body.style.overflow="hidden"}_setElementAttributes(e,t,i){const r=this.width;this.window.document.querySelectorAll(e).forEach((e=>{if(e!==this.window.document.body&&this.window.innerWidth>e.clientWidth+r)return;const s=e.style[t],n=this.window.getComputedStyle(e)[t];e.dataset[t]=s,e.style[t]=`${i(Number.parseFloat(n))}px`}))}resetScrollbar(){this._resetElementAttributes("body","overflow"),this._resetElementAttributes("body","paddingRight")}_resetElementAttributes(e,t){this.window.document.querySelectorAll(e).forEach((e=>{const i=e.dataset[t];void 0===i?e.style.removeProperty(t):(delete e.dataset[t],e.style[t]=i)}))}}var Ms=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Os extends ht{constructor(e,t){super(),this.storyReaderStoriesService=e,this.statisticsService=t,this._stories=[],this.displayedStories=[],this._currentIndex=0,this.activeListType=Se.default,this._hasShare=!1,this._placeholders=[],this.scrollbarHelper=new Ls(window),this.silentClose=!1,this._sourceInfo={},this.windowReferer=we.default,this.handleStoryListEvents(),this.initSlideApi()}initSlideApi(){this.slideApiHandlers=new _n(this),this.slideApi=(0,As.getSlideApi)(this.slideApiHandlers)}handleStoryListEvents(){this.handleClickOnStoryInternal=this.handleClickOnStoryInternal.bind(this),mt.on(`${St.name}.clickOnStoryInternal`,this.handleClickOnStoryInternal)}handleClickOnStoryInternal({payload:e,identityFields:t}){this.showMultipleStories(e,{identityFields:t})}get feedSlug(){var e,t;return null!==(t=null===(e=this.sourceInfo.identityFields)||void 0===e?void 0:e.feedSlug)&&void 0!==t?t:""}get widgetsData(){return he()(this.narrativeContext.widgetsData)?this.narrativeContext.widgetsData:{}}get sourceInfo(){return this._sourceInfo}get stories(){return this.displayedStories}get activeStory(){return this._activeStory}get currentIndex(){return this._currentIndex+1}get hasShare(){return this._hasShare}get placeholders(){return this._placeholders}get reachStart(){return 1===this.currentIndex}get reachEnd(){return this.currentIndex===this.displayedStories.length-2}setStories({listType:e,stories:t}){this.activeListType=e,this._stories=t.filter((e=>!e.hide_in_reader)).map((e=>fs.createInstance(bs,e))),this.displayedStories=[fs.createInstance(bs,{blank:!0,id:-1}),...this._stories,fs.createInstance(bs,{blank:!0,id:-2})].map((e=>new ks(e,this._hasShare))),this.setActiveStoryByIndex(this._currentIndex),this.update()}setNarrativeContext(e){this.narrativeContext=e instanceof xs?e:fs.createInstance(xs,e.rawData),this.initStoryResources(this.narrativeContext)}setActiveStoryById(e){this._currentIndex=this._stories.findIndex((t=>t.id===e)),this._activeStory=this.displayedStories[this._currentIndex+1],this.setNarrativeStory(this._activeStory)}setActiveStoryByIndex(e){this._currentIndex=e,this._activeStory=this.displayedStories[this._currentIndex+1],this.setNarrativeStory(this._activeStory)}getDisplayedStoryByIndex(e){return this.displayedStories[e]}setNarrativeStory(e){this.slideApiHandlers.setNarrativeStory(e)}open(e,t){this.windowReferer=e.windowReferer,this.setScrollBar(e.windowReferer),this._sourceInfo=t,this.setStories({listType:e.listType,stories:e.storyList}),this.setNarrativeContext({rawData:e.storyContext}),this.setActiveStoryById(e.id),this._hasShare=e.hasShare,this._placeholders=e.placeholders,this.activeListType=e.listType,this.statisticsService.init(t),this.update()}setScrollBar(e){e===we.default&&this.scrollbarHelper.setScrollbar()}resetScrollBar(e){e===we.default&&this.scrollbarHelper.resetScrollbar()}initStoryResources(e){(new In).init(e)}setStoriesAndContext(e){this.setStories({listType:e.listType,stories:e.storyList}),this.setNarrativeContext({rawData:e.storyContext})}close(e="closeReaderByCloseBtn"){var t;if(!this.activeStory||(null===(t=this.activeStory)||void 0===t?void 0:t.disableClose))return;this.resetScrollBar(this.windowReferer);const i=this.activeStory.id,r=this.activeStory.activeSlideIndex;this.emit("closeStoryReader"),mt.emit("statistics.closeStoryReader",{storyId:i,slideIndex:r}),mt.emit("publicEvents.closeStory",{id:i,index:r,action:e}),hr(),Cr(),us(),this.activeStory.markAsOpened(),this._sourceInfo={},this._activeStory=void 0,this.statisticsService.destroy(),this.update()}canBeClosed(){return!(!this.activeStory||this.activeStory.isBlank)&&!this.activeStory.disableClose}showSingleStory(e,t,i){return Ms(this,void 0,void 0,(function*(){try{const r=(new Date).getTime(),s=yield this.storyReaderStoriesService.fetchSingleStoryWithoutContext(e,t,i),n=((e,t)=>({windowReferer:we.default,listType:Se.default,id:e,storyContext:Gt.getState(),storyList:[t],hasShare:m.getState().share,placeholders:jt()}))(e,s);this.open(n,{listType:Se.direct,feedSlug:t});const o=yield this.storyReaderStoriesService.fetchSingleStoryContext(e,t);this.sleep(r),this.setStoriesAndContext({listType:Se.direct,storyList:[o],storyContext:Gt.getState()})}catch(e){console.error(e)}}))}showSingleStoryFromSharePage(e,t){return Ms(this,void 0,void 0,(function*(){try{return yield this.showSingleStory(e,"",t),t&&ni(!1),!0}catch(e){return!1}}))}showOnboardingStories(e){return Ms(this,void 0,void 0,(function*(){let t="onboarding";e&&e.feed&&Be()(e.feed)&&(t=e.feed),yield this.storyReaderStoriesService.fetchSessionAndStoriesCompositeFx({onboardingList:t,customTags:null==e?void 0:e.customTags,limit:null==e?void 0:e.limit});const i=$t(Se.onboarding,t);return!!i.length&&(yield this.showMultipleStories({windowReferer:we.default,listType:Se.onboarding,id:i[0].id},{identityFields:{feedSlug:t}}),!0)}))}showMultipleStories(e,t){return Ms(this,void 0,void 0,(function*(){const i=t.identityFields.feedSlug;try{ni(!0);const r=(new Date).getTime(),s=Ht(i),n=((e,t,i)=>{const r=$t(e.listType,i);let s=m.getState().share;return t===Ze.UGC&&(s=!1),Object.assign(Object.assign({},e),{storyContext:Vt(t,Gt.getState()||Ut(t,r.map((e=>e.id)))),storyList:r,hasShare:s,placeholders:jt()})})(e,s,i);this.open(n,{listType:e.listType,identityFields:t.identityFields}),yield this.storyReaderStoriesService.fetchMultipleStoriesContext(e.id,s,i),yield this.storyReaderStoriesService.fetchStoriesSlides(s,i);const o=this.storyReaderStoriesService.getStoryContextInternalModel(s);yield this.sleep(r),this.setStoriesAndContext({listType:e.listType,storyList:$t(e.listType,i),storyContext:Vt(s,o)})}catch(e){if(e instanceof qi)return;this.close()}}))}sleep(e){return Ms(this,void 0,void 0,(function*(){return new Promise((t=>{const i=Math.max(0,300-((new Date).getTime()-e));i?setTimeout(t,i):t()}))}))}nextStory(){var e;this.reachEnd||(null===(e=this.activeStory)||void 0===e||e.markAsOpened(),this.setActiveStoryByIndex(this._currentIndex+1),this.update())}prevStory(){var e;this.reachStart||(null===(e=this.activeStory)||void 0===e||e.markAsOpened(),this.setActiveStoryByIndex(this._currentIndex-1),this.update())}destroy(){mt.off(`${St.name}.clickOnStoryInternal`,this.handleClickOnStoryInternal)}closeGoodsWidget(){mt.emit("goodsWidget.close")}}class Es{constructor(e,t){this.storyManager=e,this.statisticsService=t}handle(e){var t;e.dataForSending=oi()?{data:this.statisticsService.getData()}:null;const i=()=>this.storyManager.clickOnButtonAction({src:yt.STORY_READER,payload:e});!(null===(t=this.storyManager.getConfig())||void 0===t?void 0:t.disableStatistic)&&e.dataForSending&&he()(e.dataForSending)&&Array.isArray(e.dataForSending.data)&&e.dataForSending.data.length>0?(this.statisticsService.cleanupData(),N("session/update",e.dataForSending,i)):i()}}class Is{constructor(e){this.storyManager=e}handle(e,t,i){var r,s,n;const o=i.listType,a=null!==(s=null===(r=i.identityFields)||void 0===r?void 0:r.feedSlug)&&void 0!==s?s:"",l=null===(n=i.identityFields)||void 0===n?void 0:n.filter,d=Ht(a),c={title:null,tags:[],slidesCount:null,feed:null,filter:null,source:null},u=Ke.getState().find((e=>e.id===t.id));if(u&&(c.title=u.stat_title,c.tags=u.tags,c.slidesCount=u.slides_count,u.type===Ze.UGC&&(c.ugcPayload=he()(u.payload)?u.payload:{})),d===Ze.DEFAULT?c.feed=a:d===Ze.UGC&&(c.filter=l),o===Se.direct?c.source=ye.direct:o===Se.default?c.source=ye.list:o===Se.onboarding?c.source=ye.onboarding:o===Se.favorite&&(c.source=ye.favorite),null!=t.index&&-1===["clickOnStory","showStory"].indexOf(e)&&(t.payload=null,u&&u.slides_payload&&Array.isArray(u.slides_payload))){const e=u.slides_payload.find((e=>e.slide_index===t.index));null!=e&&e.payload&&(t.payload=e.payload)}this.storyManager.emit(e,Object.assign(Object.assign({},t),c))}}var Ts=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Rs{constructor(e){this.storyManager=e}updateStatistics(e){return Ts(this,arguments,void 0,(function*({listType:e,updateDto:t}){var i;if(0===t.data.length)return t;let r=!1,s="";if(e===Ze.UGC||(null===(i=this.storyManager.getConfig())||void 0===i?void 0:i.disableStatistic))r=!0;else try{N("session/update",t,(()=>{})),r=!0}catch(e){s=e.toString()}if(r)return t;throw s}))}}var Ps=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Ds{constructor(e){this.storyManager=e}create(){const e=new Zi,t=new Rs(this.storyManager),i=new En(t);return this.storyReaderViewModel=new Os(e,i),this.storyManager.setViewModel(Os.name,this.storyReaderViewModel),this.handleStoryReaderViewModelEvents(i),this.storyReaderViewModel}handleStoryReaderViewModelEvents(e){this.handleEventBusEvents(),this.handlePublicEvents(e),this.handleGameCenterEvents()}handlePublicEvents(e){mt.on("publicEvents.clickOnButton",(t=>{new Es(this.storyManager,e).handle(t)})),this.subscribeToPublicEvents(),this.subscribeToWidgetEvent()}subscribeToWidgetEvent(){mt.on("publicEvents.widgetEvent",(e=>{const t=Xe.getState()[this.storyReaderViewModel.feedSlug];this.storyManager.emit("widgetEvent",{name:e.name,data:Object.assign(Object.assign({},e.devPayload),{feed_id:t})})}))}subscribeToPublicEvents(){const e=new Is(this.storyManager),t=["showSlide","showStory","closeStory","clickOnButton","likeStory","dislikeStory","favoriteStory","shareStory","shareStoryWithPath"];for(const i of t)mt.on(`publicEvents.${i}`,(t=>{const r=this.storyReaderViewModel.sourceInfo;e.handle(i,t,r)}))}handleEventBusEvents(){mt.on("storyReader.redirectToStory",(({storyId:e,feedSlug:t})=>{this.storyReaderViewModel.showSingleStory(e,t)})),mt.on("storyReader.closeStory",(()=>{this.storyReaderViewModel.close()}))}handleGameCenterEvents(){return Ps(this,void 0,void 0,(function*(){mt.on("openGameCenter",(e=>Ps(this,[e],void 0,(function*({gameId:e}){yield this.storyManager.openGame(e),ur(),mt.once(`${So.name}.gameComplete`,(()=>{hr()}))}))))}))}}class Ns extends(V()){constructor(){super(...arguments),this.layers=[]}init(e,t){this.layersContainer=e,this.animationApi=t,this.layers=Array.from(this.layersContainer.querySelectorAll(".narrative-slide.narrative-multi-slide")),this._activeLayer=this.layers.find((e=>!e.classList.value.includes("hidden")))}get activeLayer(){return this._activeLayer}getLayers(){return this.layers}hideLayer(e){this.animationApi.stop(e,!0),e.classList.add("hidden"),this.emit("hideLayer",{layer:e})}showLayer(e){mt.emit("story.showLayerByIndex"),e.classList.remove("hidden"),this.animationApi.start(e,!0),this._activeLayer=e,this.emit("showLayer",{layer:e})}hideAllLayers(){this.getLayers().forEach((e=>this.hideLayer(e)))}showLayerByIndex(e){const t=this.getLayers();t.forEach((e=>this.hideLayer(e)));const i=t[e];i&&this.showLayer(i)}hasValidMultiSlides(){let e=!0,t=this.layersContainer.querySelectorAll(".narrative-slide.narrative-multi-slide");const i=this.layersContainer.querySelectorAll(".narrative-slide.narrative-multi-slide:not(.hidden)");return t.length>0&&0===i.length&&(e=!1),e}}const Bs=function(){const e={step:1,maxSteps:100};var t=Object.prototype.hasOwnProperty;return function(r,s){s||(s={});var n={};for(var o in e)t.call(s,o)?n[o]=s[o]:n[o]=e[o];var a=Object.prototype.toString.call(r);"[object Array]"!==a&&"[object NodeList]"!==a&&"[object HTMLCollection]"!==a&&(r=[r]);for(var l=0;l<r.length;l++)i(r[l],n)};function i(e,t){if(!r(e)||e.getAttribute("textFitted"))return!1;var i,s,n,o;if(!r(s=e.parentElement))return!1;if(i=function(e){var t=window.getComputedStyle(e,null);return e.getBoundingClientRect().height-parseInt(t.getPropertyValue("padding-top"),10)-parseInt(t.getPropertyValue("padding-bottom"),10)}(s),i<=0)console.warn(`Set a static height and width on the target element ${e.outerHTML} before using textFit!`,e);else{e.setAttribute("textFitted","1");var a=t.step,l=o=parseFloat(window.getComputedStyle(e).fontSize);if(!(l<(n=o-a*t.maxSteps)))for(;l>=n;){if(!(e.getBoundingClientRect().height>i))break;l-=a,e.style.fontSize=l+"px"}}}function r(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}}();var Fs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class js{constructor(e){this.videoEl=e,this.parseDefaultMuted()}get $video(){return this.videoEl}get muted(){return this.videoEl.muted}get paused(){return this.videoEl.paused}start(){return Fs(this,void 0,void 0,(function*(){this.videoEl.pause(),this.videoEl.currentTime=0,yield this.play()}))}play(){return Fs(this,void 0,void 0,(function*(){const e=this.videoEl.play();e?yield e:yield new Promise((e=>{setTimeout(e,0)}))}))}pause(){this.videoEl.pause()}resume(){return Fs(this,void 0,void 0,(function*(){this.videoEl.paused&&(yield this.videoEl.play())}))}stop(){this.videoEl.pause(),this.videoEl.currentTime=0}mute(){"1"!==this.videoEl.getAttribute("data-default-muted")&&(this.videoEl.muted=!0)}unmute(){"1"!==this.videoEl.getAttribute("data-default-muted")&&(this.videoEl.muted=!1)}load(){return Fs(this,arguments,void 0,(function*(e=!0){return new Promise((t=>{const i=this.videoEl.oncanplaythrough?"canplaythrough":"canplay";this.videoEl.addEventListener(i,(()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t()}))}))}),{once:!0}),e&&this.videoEl.load()}))}))}on(e,t){return this.videoEl.addEventListener(e,t),this}once(e,t){return this.videoEl.addEventListener(e,t,{once:!0}),this}off(e,t){return this.videoEl.removeEventListener(e,t),this}parseDefaultMuted(){null===this.videoEl.getAttribute("data-default-muted")&&(this.videoEl.muted?this.videoEl.setAttribute("data-default-muted","1"):this.videoEl.setAttribute("data-default-muted","0"))}}var Us=p(3107),Vs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Gs extends js{constructor(e){super(e),this._vodData=null,this.handlePlayerError=this.handlePlayerError.bind(this),this._vodData=Gs.parseData(e)}get vodData(){return this._vodData}static get isBrowserSupported(){return Us.Player.isBrowserSupported()}load(){const e=Object.create(null,{load:{get:()=>super.load}});return Vs(this,void 0,void 0,(function*(){try{Gs.isBrowserSupported?(this.disableVideoPreload(),yield this.initPlayer()):(this.updateVideoSources(),yield e.load.call(this),console.error("[VOD]: Browser not supported!"))}catch(e){this.handlePlayerError({detail:e})}}))}stop(){var e;null===(e=this.player)||void 0===e||e.removeEventListener("error",this.handlePlayerError),super.stop()}static parseData(e){const t=e.getAttribute("data-vod");try{return t&&JSON.parse(t)}catch(e){return null}}initPlayer(){const e=Object.create(null,{stop:{get:()=>super.stop}});return Vs(this,void 0,void 0,(function*(){this.player=new Us.Player,this.player.addEventListener("error",this.handlePlayerError),yield this.attachVideoElement(),yield this.loadVideo(),yield this.play(),e.stop.call(this)}))}disableVideoPreload(){this.videoEl.preload="none"}updateVideoSources(){this.videoEl.innerHTML="";for(const e of this.vodData.formats){const t=document.createElement("source");t.src=e.url,t.type=e.mimeType,t.width=e.width,t.height=e.height,this.videoEl.appendChild(t)}}handlePlayerError(e){const t=e.detail,i=`[VOD]: error code ${t.code}; object ${t}`;throw console.error(i),new Error(i)}attachVideoElement(){return Vs(this,void 0,void 0,(function*(){yield this.player.attach(this.videoEl),ri("[VOD]: video element attached",this.videoEl)}))}loadVideo(){return Vs(this,void 0,void 0,(function*(){const e=Us.Player.convertJsonToUri(this.vodData);yield this.player.load(e,0,"application/json"),ri(`[VOD]: video ${e} successful loaded`)}))}}var zs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Ws{constructor(){this.videos=[]}init(e){return zs(this,void 0,void 0,(function*(){this.videos=[];for(const t of Array.from(e.querySelectorAll("video"))){const e=this.createVideoByElement(t);yield e.load(),this.videos.push(e)}}))}start(){return zs(this,void 0,void 0,(function*(){for(const e of this.videos)yield e.start()}))}pause(){for(const e of this.videos)e.pause()}resume(){return zs(this,void 0,void 0,(function*(){for(const e of this.videos)yield e.play()}))}stop(){for(const e of this.videos)e.stop()}static hasVideo(e){return Boolean(e.querySelector(".narrative-slide__with-video"))}mute(){for(const e of this.videos)e.mute()}unmute(){for(const e of this.videos)e.unmute()}createVideoByElement(e){return Gs.parseData(e)?new Gs(e):new js(e)}}var $s=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Hs{constructor(e){this.layerManager=e,this.videoContexts=new Map,this.muted=!1,this.handleShowLayer=this.handleShowLayer.bind(this),this.handleHideLayer=this.handleHideLayer.bind(this),this.subscribeLayerManager()}init(){return $s(this,void 0,void 0,(function*(){for(const e of this.layerManager.getLayers()){const t=new Ws;yield t.init(e),this.videoContexts.set(e,t)}}))}start(){return $s(this,void 0,void 0,(function*(){const e=this.getActiveVideoContext();yield null==e?void 0:e.start()}))}mute(){this.muted=!0;const e=this.getActiveVideoContext();null==e||e.mute()}unmute(){this.muted=!1;const e=this.getActiveVideoContext();null==e||e.unmute()}resume(){return $s(this,void 0,void 0,(function*(){const e=this.getActiveVideoContext();null==e||e.resume()}))}pause(){const e=this.getActiveVideoContext();null==e||e.pause()}stop(){for(const e of this.videoContexts.values())e.stop();this.videoContexts=new Map,this.unsubscribeLayerManager()}subscribeLayerManager(){this.layerManager.on("showLayer",this.handleShowLayer),this.layerManager.on("hideLayer",this.handleHideLayer)}unsubscribeLayerManager(){this.layerManager.off("showLayer",this.handleShowLayer),this.layerManager.off("hideLayer",this.handleHideLayer)}handleShowLayer({layer:e}){this.intheritMuted();const t=this.videoContexts.get(e);null==t||t.start()}handleHideLayer({layer:e}){const t=this.videoContexts.get(e);null==t||t.stop()}getActiveVideoContext(){const e=this.layerManager.activeLayer;if(e)return this.videoContexts.get(e)}intheritMuted(){this.muted?this.mute():this.unmute()}}var qs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Zs{constructor(e){this.videoContainer=e,this.videoContext=new Ws}init(){return qs(this,void 0,void 0,(function*(){yield this.videoContext.init(this.videoContainer)}))}start(){return qs(this,void 0,void 0,(function*(){yield this.videoContext.start()}))}pause(){this.videoContext.pause()}resume(){return qs(this,void 0,void 0,(function*(){yield this.videoContext.resume()}))}stop(){this.videoContext.stop()}mute(){this.videoContext.mute()}unmute(){this.videoContext.unmute()}}class Ys{static create(e,t){return e.querySelectorAll(".narrative-slide.narrative-multi-slide").length>0?new Hs(t):new Zs(e)}}var Xs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Qs{constructor(e){this.animationApi=e,this.slideElement=null}init(e){this.slideElement=e.querySelector(".narrative-slide")}start(){try{if(!this.slideElement)return;this.animationApi.start(this.slideElement,!0)}catch(e){console.error(e)}}stop(){try{if(!this.slideElement)return;this.animationApi.stop(this.slideElement,!0)}catch(e){console.error(e)}}resume(){this.slideElement&&this.animationApi.resume(this.slideElement)}pause(){this.slideElement&&this.animationApi.pause(this.slideElement)}}var Ks;!function(e){e.None="none",e.Loading="loading",e.Loaded="loaded",e.Started="started",e.Paused="paused",e.Error="error"}(Ks||(Ks={}));var Js=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class en extends U.EventEmitter{constructor(e,t,i,r,s){super(),this.widgetManager=e,this.animationApi=t,this.slideContent=i,this.layersManager=r,this.slideApiHandlers=s,this._state=Ks.None,this.videoManager=null,this._muted=!1,this.narrativeAnimationContext=new Qs(this.animationApi)}get state(){return this._state}get meta(){return this._meta}get muted(){return this._muted}get isNavigationDisabled(){const e=this.slideContent.querySelector(".narrative-slide");return!!e&&"1"===e.dataset.disableNavigation}get isLoading(){return this.state===Ks.Loading||this.state===Ks.Error||!this.meta.slidesLoaded}get isVisible(){return this.state===Ks.Loaded||this.state===Ks.Started||this.state===Ks.Paused}destroy(){this.stop(),this.removeAllListeners()}resume(){return Js(this,void 0,void 0,(function*(){var e;try{if(this.state!==Ks.Paused)return;yield null===(e=this.videoManager)||void 0===e?void 0:e.resume(),this.narrativeAnimationContext.resume(),this.widgetManager.resume(),ri(`[SLIDE][resume]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),this.setState(Ks.Started)}catch(e){console.error(e)}}))}pause(){var e;this.state===Ks.Started&&(null===(e=this.videoManager)||void 0===e||e.pause(),this.narrativeAnimationContext.pause(),this.widgetManager.pause(),ri(`[SLIDE][pause]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),this.setState(Ks.Paused))}mute(){var e;this._muted=!0,null===(e=this.videoManager)||void 0===e||e.mute()}unmute(){var e;this._muted=!1,null===(e=this.videoManager)||void 0===e||e.unmute()}update(e){return Js(this,arguments,void 0,(function*({needSlideInitByFlipping:e,slidesLoaded:t,currentSlideIndex:i,activeSlideIndex:r,activeStoryId:s,currentStoryId:n}){const o=s===n,a=o||e,l=0===i,d=1===i;this.setMeta({activeSlideIndex:r,currentSlideIndex:i+r,currentStoryId:n,activeStoryId:s,slidesLoaded:t}),this.shouldInit(a,t,l)?yield this.init():a||this.stop(),o&&(this.shouldStart(l)?yield this.start():this.shouldStop(d)&&this.stop())}))}shouldInit(e,t,i){return e&&t&&this.state===Ks.None&&i}shouldStart(e){return this.state===Ks.Loaded&&e}shouldStop(e){return this.state===Ks.Started&&e}init(){return Js(this,void 0,void 0,(function*(){this.videoManager=Ys.create(this.slideContent,this.layersManager),this.narrativeAnimationContext.init(this.slideContent),this.slideContentInnerHTML=this.slideContent.innerHTML,ri(`[SLIDE][init]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),yield this.widgetManager.init(this.slideContent),yield this.load()}))}start(){return Js(this,void 0,void 0,(function*(){var e;try{if(this.state!==Ks.Loaded)throw new Error(`You must initialize the slide first. State: ${this.state}`);yield null===(e=this.videoManager)||void 0===e?void 0:e.start(),this.narrativeAnimationContext.start(),ri(`[SLIDE][start]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),this.setState(Ks.Started),this.slideApiHandlers.lock(this),this.slideApiHandlers.exec(),this.emit("start",{index:this.meta.activeSlideIndex,widgetManager:this.widgetManager,slideContent:this.slideContent})}catch(e){console.error(e)}}))}stop(){var e;this.state===Ks.Started&&(this.narrativeAnimationContext.stop(),null===(e=this.videoManager)||void 0===e||e.stop(),this.slideApiHandlers.unlock(this),ri(`[SLIDE][stop]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),this.widgetManager.stop(),this.resetSlideContentHTML(),this.setState(Ks.None))}resetSlideContentHTML(){this.slideContent.innerHTML=this.slideContentInnerHTML}setState(e){this._state=e,this.notifyPropertyChanged("state")}load(){return Js(this,void 0,void 0,(function*(){var e;if(this.state!==Ks.Loaded)try{ri(`[SLIDE][start_load]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),yield this.loadResources(),yield(e=this.slideContent,Xs(void 0,void 0,void 0,(function*(){let t=0;return new Promise((i=>{const r=()=>{t++,e.getBoundingClientRect().height>0||t>10?i():requestAnimationFrame(r)};r()}))}))),this.fitNarrativeTextLines(),this.setState(Ks.Loaded),ri(`[SLIDE][end_load]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`)}catch(e){console.error(e),this.setState(Ks.Error)}}))}loadResources(){return Js(this,void 0,void 0,(function*(){var e;yield this.loadMediaResources(this.slideContent),yield this.loadFonts(),Ws.hasVideo(this.slideContent)&&(this.setState(Ks.Loading),yield null===(e=this.videoManager)||void 0===e?void 0:e.init(this.slideContent))}))}loadFonts(){return new Promise((e=>{"fonts"in document?document.fonts.ready&&document.fonts.ready.catch(e).finally(e):e()}))}loadMediaResources(e){return new Promise((t=>function(e,t){const i=function(e){return new Promise((function(t,i){if("img"===e.tagName.toLowerCase()&&e instanceof HTMLImageElement){const i=()=>{requestAnimationFrame((()=>requestAnimationFrame((()=>{t(e),e.removeEventListener("load",i)}))))};e.addEventListener("load",i),e.complete&&0!==e.naturalHeight&&requestAnimationFrame((function(){requestAnimationFrame((function(){t(e)}))}))}else t(e);e.addEventListener("error",(function(e){var t=e.target instanceof HTMLImageElement;if(e&&e.target&&t&&e.target.style){e.target.style.display="none";var r=e.target.closest(".narrative-element-image");r&&(r.style.display="none")}i(e)}))}))},r=e.querySelectorAll("img,video");let s,n=[];for(s=0;s<r.length;++s)n.push(i(r[s]));n.length,Promise.all(n).then((e=>{t()}))}(e,t)))}fitNarrativeTextLines(){const e=Array.from(this.slideContent.querySelectorAll(".narrative-element-text-wrapper>.narrative-element-text-lines")).slice();Bs(e,{})}notifyPropertyChanged(e,t,i){this.emit("propertyChanged",{propertyName:e,from:t,to:i})}setMeta(e){this._meta=e,this.notifyPropertyChanged("meta")}}const tn=(e,t)=>{var i,r,s,n;const o=t.dataset;let a=null;const l=null!==(i=o.elementId)&&void 0!==i?i:"",d=null!==(r=o.linkType)&&void 0!==r?r:"",c=null!==(s=o.linkTarget)&&void 0!==s?s:"",u={url:()=>{a=decodeURIComponent(c),rn({activeStory:e,url:a,elementId:l}),sn(e,{linkType:d,url:a,elementId:l})},customAction:()=>{a=c,rn({activeStory:e,url:a,elementId:l}),sn(e,{linkType:d,url:a,elementId:l})},slide:()=>{e.redirectToSlide({slideIndex:parseInt(c),layerIndex:0})},story:()=>{const t=parseInt(c);rn({activeStory:e,url:c,elementId:l}),mt.emit("storyReader.redirectToStory",{storyId:t,feedSlug:"default"})},game:()=>{rn({activeStory:e,url:c,elementId:l}),mt.emit("openGameCenter",{gameId:c})},layer:()=>{mt.emit("storySlide.showLayer",{index:parseInt(c)})},closeStory:()=>{mt.emit("storyReader.closeStory")}};null===(n=u[d])||void 0===n||n.call(u)},rn=({activeStory:e,url:t,elementId:i})=>{mt.emit("publicEvents.widgetEvent",{name:"w-link",devPayload:{story_id:e.id,slide_index:e.activeSlideIndex,widget_id:i,widget_label:"",widget_value:t}})},sn=(e,{linkType:t,url:i,elementId:r})=>{e.markAsOpened(),mt.emit("statistics.transitionFromSlide",{storyId:e.id,slideIndex:e.activeSlideIndex}),"url"===t&&mt.emit("publicEvents.clickOnButton",{id:e.id,index:e.activeSlideIndex,url:i,elementId:r})},nn=(e,t)=>{const i={".narrative-element-quiz":Ur.name,".narrative-element-test":Xr.name,".narrative-element-quiz-grouped":Gr.name,".narrative-element-quest":Fr.name};for(const r of Object.keys(i)){if(e.closest(r)){const s=t.findWidgetByType(i[r]);return null==s||s.select(e),!1}}return!0},on=(e,t)=>{const i=t.findWidgetByType(Pr.name),r=t.findWidgetByType(Nr.name);return(null==i?void 0:i.isInited)?(i.select(e),!1):!(null==r?void 0:r.isInited)||(r.select(e),!1)};var an;!function(e){e[e.ALLOW_ALL_CLICKS=0]="ALLOW_ALL_CLICKS",e[e.DENY_NEXT_CLICK=1]="DENY_NEXT_CLICK",e[e.DENY_ALL_CLICKS=2]="DENY_ALL_CLICKS"}(an||(an={}));const ln=e=>e?an.ALLOW_ALL_CLICKS:an.DENY_NEXT_CLICK,dn=e=>{var t,i;const r=e.firstElement;if(!r)return an.ALLOW_ALL_CLICKS;const s={[Ur.name]:()=>{const t=e.slideQuizIsDone(r);return ln(t)},[Gr.name]:()=>{const t=e.slideQuizIsDone(r);return ln(t)},[Xr.name]:()=>{const t=e,i=t.slideTestIsDone(r);return t.slideTestWithTimer(r)&&!i?an.DENY_ALL_CLICKS:ln(i)},[Wr.name]:()=>e.isClickCapturedBySlider(r)?an.DENY_ALL_CLICKS:an.ALLOW_ALL_CLICKS};return null!==(i=null===(t=s[e.getType()])||void 0===t?void 0:t.call(s))&&void 0!==i?i:an.ALLOW_ALL_CLICKS};var cn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class un extends Ar{constructor(e){super(),this.slideApi=e,this.type=un.name}init(e){return cn(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-slide.narrative-multi-slide");try{if(!this.elements.length)return;this.slideApi.WidgetMultiSlide.init(Array.from(this.elements))}catch(e){console.error(e)}}))}destroy(){}}var hn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class pn extends Ar{constructor(e,t){super(),this.slideApi=e,this.story=t,this.type=pn.name,this.handleSwipeUpGesture=this.handleSwipeUpGesture.bind(this)}get swipeUpLinkTarget(){return this._swipeUpLinkTarget}get swipeUpElementId(){return this._swipeUpElementId}init(e){return hn(this,void 0,void 0,(function*(){var t,i;this.slideContent=e,this.elements=e.querySelectorAll(".narrative-element-swipe-up"),this.firstElement&&(this._swipeUpLinkTarget=decodeURIComponent(null!==(t=this.firstElement.getAttribute("data-link-target"))&&void 0!==t?t:""),this._swipeUpElementId=null!==(i=this.firstElement.getAttribute("data-element-id"))&&void 0!==i?i:void 0,mt.on("swipeController.swipeUp",this.handleSwipeUpGesture))}))}destroy(){mt.off("swipeController.swipeUp",this.handleSwipeUpGesture)}handleSwipeUpGesture(){if(!this._swipeUpLinkTarget||!this.slideContent||!this._swipeUpElementId)return;const e=this.slideContent.querySelector(`[data-element-id="${this._swipeUpElementId}"]`);e&&tn(this.story,e)}}var fn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class gn extends Ar{constructor(e){super(),this.slideApi=e,this.type=gn.name,this.handleSwipeUpGesture=this.handleSwipeUpGesture.bind(this),this.handleClick=this.handleClick.bind(this)}get swipeUpLinkTarget(){return this._swipeUpLinkTarget}get swipeUpElementId(){return this._swipeUpElementId}init(e){return fn(this,void 0,void 0,(function*(){var t,i;this.slideContent=e,this.elements=e.querySelectorAll(".narrative-element-swipe-up-items"),this.firstElement&&(this._swipeUpLinkTarget=decodeURIComponent(null!==(t=this.firstElement.getAttribute("data-link-target"))&&void 0!==t?t:""),this._swipeUpElementId=null!==(i=this.firstElement.getAttribute("data-element-id"))&&void 0!==i?i:void 0,this.registerEvents())}))}destroy(){this.unregisterEvents()}close(){ls(),hr(),this.setGoodsElementOpacity(1)}registerEvents(){var e;mt.on("swipeController.swipeUp",this.handleSwipeUpGesture),mt.on("goods.close",this.handleSwipeUpGesture),null===(e=this.firstElement)||void 0===e||e.addEventListener("click",this.handleClick)}unregisterEvents(){var e;mt.off("swipeController.swipeUp",this.handleSwipeUpGesture),null===(e=this.firstElement)||void 0===e||e.removeEventListener("click",this.handleClick)}handleClick(e){e.preventDefault(),e.stopPropagation(),this.open()}handleSwipeUpGesture(){this.open()}open(){if(!this._swipeUpLinkTarget||!this.slideContent||!this._swipeUpElementId)return;const e=decodeURIComponent(this._swipeUpLinkTarget);ur(),as({url:e,elementId:this._swipeUpElementId}),this.setGoodsElementOpacity(0)}setGoodsElementOpacity(e){var t;const i=null===(t=this.slideContent)||void 0===t?void 0:t.querySelector(`[data-element-id="${this._swipeUpElementId}"]`);i&&i.style.setProperty("display",e>0?"block":"none")}}var vn,mn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};!function(e){e.REFRESH_WIDGETS_STATE="REFRESH_WIDGETS_STATE"}(vn||(vn={}));class yn{constructor(e,t,i){this.slideApi=e,this.layersManager=t,this.story=i,this._widgets=[],this.showLayerByIndex=this.showLayerByIndex.bind(this),this.handleRefreshUserData=this.handleRefreshUserData.bind(this),this._widgets=[new Mr(e),new Er(e),new Pr(e),new Nr(e),new Fr(e),new Ur(e),new Gr(e),new Wr(e),new Hr(e),new Zr(e),new Xr(e),new Kr(e),new Tr(e),new un(e),new pn(e,i),new gn(e)]}get widgets(){return this._widgets}init(e){return mn(this,void 0,void 0,(function*(){this.layersManager.init(e,this.slideApi.Animation),mt.on("storySlide.showLayer",this.showLayerByIndex),mt.on(vn.REFRESH_WIDGETS_STATE,this.handleRefreshUserData);for(const t of this._widgets)yield t.init(e);this.layersManager.init(e,this.slideApi.Animation)}))}pause(){for(const e of this._widgets)e.pause()}resume(){for(const e of this._widgets)e.resume()}findWidgetByType(e){const t=this._widgets.find((t=>e===t.getType()));if(null==t?void 0:t.firstElement)return t}stop(){for(const e of this._widgets)e.destroy();mt.off("storySlide.showLayer",this.showLayerByIndex),mt.off(vn.REFRESH_WIDGETS_STATE,this.handleRefreshUserData)}destroy(){this.stop(),this._widgets=[]}handleRefreshUserData(){this._widgets.forEach((e=>e.refreshUserData()))}showLayerByIndex({index:e}){this.layersManager.showLayerByIndex(e)}}class wn{constructor(){this.cache={}}set(e,t){this.cache[e]=t}clear(){this.cache={}}get(e){return this.cache[e]}}class Sn{constructor(){this.actions=[]}push(e){this.actions.push(e)}exec(){for(const e of this.actions)e()}flush(){this.actions=[]}}var bn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class _n{constructor(e){this.storyReaderViewModel=e,this.deferredActionsQueue=new Sn,this.narrativeStoryCache=new wn,this.storySlideEngine=null}lock(e){if(this.storySlideEngine&&this.storySlideEngine!==e)throw new Error(`[SlideApi]: The resource is locked by story with ID ${this.storySlideEngine.meta.activeStoryId} and slide index ${this.storySlideEngine.meta.activeSlideIndex}`);this.storySlideEngine=e}unlock(e){this.storySlideEngine===e&&(this.storySlideEngine=null)}exec(){this.storySlideEngine&&(this.deferredActionsQueue.exec(),this.deferredActionsQueue.flush())}getStoryLocalData(){return bn(this,void 0,void 0,(function*(){if(!this.narrativeStory)return{};let e=sessionStorage.getItem("narrative_"+this.narrativeStory.id+"_data");return e?JSON.parse(e):{}}))}setStoryLocalData(e,t){if(!this.narrativeStory)return;let i=JSON.stringify(e);sessionStorage.setItem("narrative_"+this.narrativeStory.id+"_data",i),t&&oi()&&gs.sentData(this.narrativeStory.id,{data:i},Yt)}getStoryServerData(e){var t,i;return null!==(i=null===(t=this.storyReaderViewModel.widgetsData._narrative_saved_data)||void 0===t?void 0:t[e])&&void 0!==i?i:null}updateStoryServerData(e,t){this.storyReaderViewModel.widgetsData._narrative_saved_data=t}getSlideDuration(e,t){var i,r,s;return null!==(s=null===(r=null===(i=this.storyReaderViewModel.widgetsData._narrative_slides_duration)||void 0===i?void 0:i[e])||void 0===r?void 0:r[t])&&void 0!==s?s:null}pauseUI(){dr()}resumeUI(){cr()}showStoryTextInput(e,t){mt.emit("storySlide.showInputModal",{id:e,config:t})}setStorySessionValue(e,t){this.narrativeStoryCache.set(e,t)}getStorySessionValue(e){return this.narrativeStoryCache.get(e)}getWidgetsSharedData(e,t){var i,r,s;const n=this.storyReaderViewModel.widgetsData;switch(t){case"rangeSlider":return null===(i=n._narrative_range_slider_data)||void 0===i?void 0:i[e];case"poll":return null===(r=n._narrative_poll_data)||void 0===r?void 0:r[e];case"vote":return null===(s=n._narrative_vote_data)||void 0===s?void 0:s[e]}return null}openUrl(e){this.narrativeStory&&(this.narrativeStory.markAsOpened(),mt.emit("statistics.transitionFromSlide",{storyId:this.narrativeStory.id,slideIndex:this.narrativeStory.activeSlideIndex}),window.open(e,"_parent"))}sendApiRequest(e,t,i,r,s,n){return gs.sendApiRequest({url:e,method:t,params:i,headers:r,data:s,profilingKey:n},Yt)}share(e,t){null==e&&(e="story-share"),mt.emit("storySlide.performShareAction",{shareId:e,config:t})}shareSlideScreenshot(e,t){null==e&&(e="slide-screenshot-share"),mt.emit("storySlide.performScreenShotShareAction",{shareId:e,hideElementsSelector:null!=t?t:""})}showLayer(e){mt.emit("storySlide.showLayer",{index:e})}showStorySlide(e){this.pushToDefferedActionsQueueOrExec((()=>{var t;null===(t=this.narrativeStory)||void 0===t||t.redirectToSlide({slideIndex:e})}))}storyShowNext(){mt.emit(`${Os.name}.showNextStory`)}showNextSlide(e){this.pushToDefferedActionsQueueOrExec((()=>{mt.emit("story.showNextSlideWithDelay",e)}))}sendStatisticEvent(e,t,i){mt.emit("publicEvents.widgetEvent",{name:e,devPayload:i})}destroy(){}setNarrativeStory(e){this.narrativeStoryCache.clear(),this.narrativeStory=e,this.storySlideEngine&&this.unlock(this.storySlideEngine)}resetStory(e){return bn(this,void 0,void 0,(function*(){var t;let i={},r=yield this.getStoryLocalData();r=Object.assign({},null!==(t=this.getStoryServerData(e))&&void 0!==t?t:{},r);for(let e in r)r.hasOwnProperty(e)&&/^_gm_[A-z0-9-_]+_attempts$/.test(e)&&(i[e]=r[e]);mt.emit(vn.REFRESH_WIDGETS_STATE),this.updateStoryServerData(e,i),this.setStoryLocalData(i,!0),this.showStorySlide(0),this.showLayer(0)}))}pushToDefferedActionsQueueOrExec(e){this.storySlideEngine?e():this.deferredActionsQueue.push(e)}}var xn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Cn{constructor(e){this.statisticsService=e,this.timerId=null}start(){this.schedule(1e4)}stop(){null!=this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}flush(){return xn(this,void 0,void 0,(function*(){ri(`[${En.name}]: flush statistics by timer`);this.statisticsService.getData().length>0?this.schedule(1e4):this.schedule(3e4),yield this.statisticsService.sendData()}))}schedule(e){ri(`[${En.name}]: schedule flush statistics on ${e}ms`),this.timerId=setTimeout((()=>this.flush()),e)}}class kn{calculate(){const e=Date.now(),t=e-this.slideStartedAt;return this.slideStartedAt=e,t}init(){this.slideStartedAt=Date.now()}}class An{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),mt.on("statistics.closeStoryReader",this.handle)}handle(e){this.statisticsService.addSlideEvent({action:1,storyId:e.storyId,slideIndex:e.slideIndex})}destroy(){mt.off("statistics.closeStoryReader",this.handle)}}class Ln{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),mt.on("statistics.nextSlide",this.handle)}handle(e){this.statisticsService.addSlideEvent({action:1,storyId:e.fromStoryId,slideIndex:e.fromSlideIndex})}destroy(){mt.off("statistics.nextSlide",this.handle)}}class Mn{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),mt.on("statistics.transitionFromSlide",this.handle)}handle(e){this.statisticsService.addSlideEvent({action:2,storyId:e.storyId,slideIndex:e.slideIndex})}destroy(){mt.off("statistics.transitionFromSlide",this.handle)}}var On=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class En extends(V()){constructor(e){super(),this.beaconService=e,this.lastIndex=0,this.data=[],this.sourceInfo=null,this.events=[],this.flushSheduler=new Cn(this),this.slideDurationCalculator=new kn}init(e){this.data=[],this.sourceInfo=e,this.lastIndex=0,this.slideDurationCalculator.init(),this.flushSheduler.start(),this.events=[new An(this),new Ln(this),new Mn(this)]}getData(){return this.data.slice()}getLastIndex(){return this.lastIndex}cleanupData(){this.data=[]}addSlideEvent(e){if(!oi())return;const t=this.slideDurationCalculator.calculate();this.data.push([e.action,this.lastIndex,e.storyId,e.slideIndex,t]),this.lastIndex++}sendData(){return On(this,void 0,void 0,(function*(){const e=this.getData();if(e.length)try{if(!this.sourceInfo)throw new Error(`[${En.name}]: You need pass source info!`);this.cleanupData(),yield this.beaconService.updateStatistics({updateDto:{data:e},listType:Ht(this.sourceInfo.feedSlug)})}catch(t){this.data.push(...e),console.error(t)}}))}destroy(){return On(this,void 0,void 0,(function*(){this.events.forEach((e=>e.destroy())),this.flushSheduler.stop(),yield this.sendData()}))}}class In{init(e){const t="stories-slider-style";let i=document.getElementById(t),r="";null!==e&&(r=e.style),null===i?(i=document.createElement("style"),i.type="text/css",i.id=t,i.attributes.setNamedItem(document.createAttribute("scoped")),i.setAttribute("nonce",ws()),i.styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r)),document.head.appendChild(i)):i.styleSheet?i.styleSheet.cssText=r:(i.textContent="",i.appendChild(document.createTextNode(r)))}}var Tn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Rn{constructor(e){this.storyManager=e}create(e){const t=new Yn(this.storyManager),i=new St(t,e);return this.storyManager.setViewModel(St.name,i),this.handleStoryListViewModelEvents(i,{listType:e.listType,identityFields:e.identityFields,isFavorite:e.isFavorite}),i}handleStoryListViewModelEvents(e,t){e.on("clickOnStoryInternal",(e=>Tn(this,void 0,void 0,(function*(){e.listType=t.isFavorite?Se.favorite:Se.default,e.windowReferer=t.isFavorite?we.favorite:we.default,mt.emit(`${St.name}.clickOnStoryInternal`,{payload:e,identityFields:t.identityFields})})))).on("clickOnStoryDeepLink",(e=>{Zi.markAsOpened(e.id),this.handleClickOnStoryDeepLink(e,{listType:t.listType})})).on("clickOnStoryGame",(({id:e,gameInstanceId:t})=>{Zi.markAsOpened(e),this.storyManager.openGame(t)})).on("clickOnStory",(e=>this.handleClickOnStory(e,t.identityFields)))}handleClickOnStoryDeepLink(e,{listType:t}){var i;const r={data:[[1,0,e.id,0,0]]},s=()=>{e.isDeeplink&&e.url&&this.storyManager.clickOnButtonAction({src:yt.STORY_LIST,payload:e})};t===Ze.UGC||(null===(i=this.storyManager.getConfig())||void 0===i?void 0:i.disableStatistic)?s():N("session/update",r,Do.createFunctionWithTimeout(s,1e3))}handleClickOnStory(e,t){if(0===e.id)return void this.storyManager.emit("clickOnFavoriteCell",{feed:t.feedSlug});const i=t.feedSlug,r=t.filter,s=Ht(i),n=Ke.getState().find((t=>t.id===e.id)),o={title:null,tags:[],slidesCount:null,feed:null,filter:null,source:null};n&&(o.title=n.stat_title,o.tags=n.tags,o.slidesCount=n.slides_count),s===Ze.DEFAULT?o.feed=i:s===Ze.UGC&&(o.filter=r),o.source=ye.list,this.storyManager.emit("clickOnStory",Object.assign(Object.assign({},e),o))}}class Pn{static create(e,t){const i=fs.createInstance(bs,{id:0,title:t.title.content,title_color:t.title.color,is_opened:!0,background_color:"white"});return i.favorite_cell=!0,new bt(e,i)}}class Dn{static create(e,t){let i=[];t.image&&t.image.svgSrc&&t.image.svgSrc.baseState&&i.push({width:100,height:100,type:"h",url:`data:image/svg+xml,${pi(t.image.svgSrc.baseState)}`});const r=fs.createInstance(bs,{id:-100,title:t.title.content,title_color:t.title.color,is_opened:!1,background_color:t.backgroundColor,image:i});return r.ugc_card_cell=!0,new gt(e,r)}}class Nn{constructor(e=0,t=0,i=0,r=0){this.x=e,this.y=t,this.width=i,this.height=r}overlaps(e){return this.x+this.width>=e.x&&this.x<=e.x+e.width&&this.y+this.height>=e.y&&this.y<=e.y+e.height}getIntersection(e){const t=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.x,e.x),r=Math.min(this.y+this.height,e.y+e.height),s=Math.max(this.y,e.y);return new Nn(Math.min(t,i),Math.min(r,s),Math.max(0,t-i),Math.max(0,r-s))}getArea(){return this.width*this.height}getAreaFraction(e){return+(this.getArea()/e.getArea()*100).toFixed(2)}static clone(e){return new Nn(e.x,e.y,e.width,e.height)}}class Bn{constructor(e){this.feedCoverageAnalyticsCalculator=e,this.storiesIds=new Set,this.getNewStoriesIds=e=>{const t=[];for(const i of e)this.storiesIds.has(i)||t.push(i);return t}}markStoryAsFullVisible(e){this.storiesIds.has(e)||(this.storiesIds.add(e),this.feedCoverageAnalyticsCalculator.emit("flushThumbViews",[e]))}calculate(e){const t=this.getNewStoriesIds(e.map((({id:e})=>e)));t.forEach((e=>this.storiesIds.add(e))),0!==t.length&&this.feedCoverageAnalyticsCalculator.emit("flushThumbViews",t)}}class Fn{constructor(e){this.feedCoverageAnalyticsCalculator=e}calculate(e){const t=e.map((({id:e,areaFraction:t})=>({storyId:e,visibleArea:Math.round(t)/100})));0!==t.length&&this.feedCoverageAnalyticsCalculator.emit("visibleAreaUpdated",t)}}class jn extends U.EventEmitter{constructor(){super(),this.storyRects=[],this.viewport=new Nn,this.filterStoryRectIntersections=e=>e.filter((e=>-100!==e.id&&e.areaFraction>0)),this.feedImpressionMetric=new Bn(this),this.visibleAreaMetric=new Fn(this)}calculate(e){const t=this.getScrollViewportByCalculationParams(e),i=this.getStoryRectIntersectionsWithViewport(t),r=this.filterStoryRectIntersections(i);this.calculateMetrics(r)}setViewport(e){this.viewport=e}setStoryRects(e){this.storyRects=e}markStoryAsFullVisible(e){this.feedImpressionMetric.markStoryAsFullVisible(e)}destroy(){this.removeAllListeners()}getScrollViewportByCalculationParams(e){const t=Nn.clone(this.viewport);return t.x+=e.minOffsetLeft,t.y+=e.minOffsetTop,t.width+=e.maxOffsetLeft-e.minOffsetLeft,t.height+=e.maxOffsetTop-e.minOffsetTop,t}calculateMetrics(e){this.feedImpressionMetric.calculate(e),this.visibleAreaMetric.calculate(e)}getStoryRectIntersectionsWithViewport(e){const t=[];for(const i of this.storyRects)if(i.overlaps(e)){const r=i.getIntersection(e);t.push({id:i.id,areaFraction:r.getAreaFraction(i)})}else t.push({id:i.id,areaFraction:0});return t}}class Un extends Nn{constructor(e,t=0,i=0,r=0,s=0){super(t,i,r,s),this.id=e}static clone(e){return new Un(e.id,e.x,e.y,e.width,e.height)}}class Vn{constructor(e){this.feedCoverageAnalyticsCalculator=e,this.viewportPadding={left:0,right:0,top:0,bottom:0},this.minOffsetLeft=0,this.maxOffsetLeft=0,this.minOffsetTop=0,this.maxOffsetTop=0}startScroll({x:e,y:t}){this.minOffsetLeft=e,this.minOffsetTop=t,this.maxOffsetLeft=e,this.maxOffsetTop=t}endScroll({x:e,y:t}){this.minOffsetLeft=Math.min(e,this.minOffsetLeft),this.maxOffsetLeft=Math.max(e,this.maxOffsetLeft),this.minOffsetTop=Math.min(t,this.minOffsetTop),this.maxOffsetTop=Math.max(t,this.maxOffsetTop),this.feedCoverageAnalyticsCalculator.calculate({minOffsetLeft:this.minOffsetLeft,maxOffsetLeft:this.maxOffsetLeft,minOffsetTop:this.minOffsetTop,maxOffsetTop:this.maxOffsetTop})}calculate(e,t){this.feedCoverageAnalyticsCalculator.calculate({minOffsetLeft:e,maxOffsetLeft:e,minOffsetTop:t,maxOffsetTop:t})}updateGeometry({stories:e,storyListRect:t,windowRect:i,viewportPadding:r}){this.viewportPadding=r,this.setViewport(t,i),this.setStoryRects(e,t)}destroy(){this.feedCoverageAnalyticsCalculator.destroy()}markStoryAsFullVisible(e){this.feedCoverageAnalyticsCalculator.markStoryAsFullVisible(e)}setViewport(e,t){const i=this.getViewportByWindowAndStoryList(t,e);this.applyPaddingToViewport(i,e),this.feedCoverageAnalyticsCalculator.setViewport(i)}getViewportByWindowAndStoryList(e,t){let i=new Nn;return t.overlaps(e)?(i=t.getIntersection(e),i):i}applyPaddingToViewport(e,t){t.width<768||(e.x+=this.viewportPadding.left,e.y+=this.viewportPadding.top,e.height-=this.viewportPadding.top+this.viewportPadding.bottom,e.width-=this.viewportPadding.left+this.viewportPadding.right)}setStoryRects(e,t){const i=[];e.forEach(((r,s)=>{const n=Number(r.dataset.id),o=new Un(n,r.offsetLeft,r.offsetTop,r.clientWidth,r.clientHeight);i.push(o),o.x+=t.x,o.y+=t.y,this.applyPaddingAndNegativeMarginToStoryRect(o,s,e.length-1)})),this.feedCoverageAnalyticsCalculator.setStoryRects(i)}applyPaddingAndNegativeMarginToStoryRect(e,t,i){const r=this.viewportPadding;0===t&&(e.x+=r.left,e.width-=r.left),t===i&&(e.width-=r.right)}}class Gn{constructor(e,t){this.storyManager=e,this.params=t,this.handleFlushThumbViews=this.handleFlushThumbViews.bind(this),this.handleVisibleAreaUpdated=this.handleVisibleAreaUpdated.bind(this)}create(){const e=new jn;e.on("flushThumbViews",this.handleFlushThumbViews),e.on("visibleAreaUpdated",this.handleVisibleAreaUpdated);return new Vn(e)}handleFlushThumbViews(e){const t=o.getState();this.params.listType!==Ze.DEFAULT||t.disableStatistic||b(e);const i=this.params.identityFields.feedSlug,r=this.params.identityFields.filter,s=Ht(i),n={stories:e.map((e=>{const t={title:null,tags:[],slidesCount:null},i=Ke.getState().find((t=>t.id===e));return i&&(t.title=i.stat_title,t.tags=i.tags,t.slidesCount=i.slides_count,i.type===Ze.UGC&&(t.ugcPayload=he()(i.payload)?i.payload:{})),Object.assign({id:e},t)})),feed:null,filter:null};s===Ze.DEFAULT?n.feed=i:s===Ze.UGC&&(n.filter=r),this.storyManager.emit("feedImpression",n)}handleVisibleAreaUpdated(e){const t=this.params.identityFields.feedSlug,i=this.params.identityFields.filter,r=Ht(t),s={stories:e.map((({storyId:e,visibleArea:t})=>{const i={title:null,tags:[],slidesCount:null,visibleArea:t},r=Ke.getState().find((t=>t.id===e));return r&&(i.title=r.stat_title,i.tags=r.tags,i.slidesCount=r.slides_count,r.type===Ze.UGC&&(i.ugcPayload=he()(r.payload)?r.payload:{})),Object.assign({id:e},i)})),feed:null,filter:null};r===Ze.DEFAULT?s.feed=t:r===Ze.UGC&&(s.filter=i),this.storyManager.emit("visibleAreaUpdated",s)}}const zn=p(4871);var Wn;!function(e){e.FONT="font-face"}(Wn||(Wn={}));class $n extends fs{attributes(){return zn(super.attributes(),["weight","style","type","url","title","family","format"])}constructor(){super(),this._url=""}set url(e){this._url=e}get url(){let e=window.isSecureContext;return void 0===e&&"https:"===window.location.protocol&&(e=!0),e?this._url:this._url.replace(/^https:\/\//,"http://")}get isFont(){return this.type===Wn.FONT}get fontFaceAsCss(){var e,t,i;if(!this.isFont)return null;let r={"font-family":null!==(e=this.family)&&void 0!==e?e:"normal",src:`url('${this.url}')`,"font-style":null!==(t=this.style)&&void 0!==t?t:"normal","font-weight":null!==(i=this.weight)&&void 0!==i?i:"normal"};return this.title&&(r.src+=`, local('${this.title}')`),`@font-face {${gi(r)}}\n`}}p(3981);class Hn{constructor(){this.resources=[]}static createFromArray(e){const t=new Hn;for(let i in e)e.hasOwnProperty(i)&&t.resources.push($n.createInstance($n,e[i]));return t}get fontsCss(){let e="";return this.resources.forEach((t=>{if(t.isFont){let i=t.fontFaceAsCss;null!==i&&(e+=i)}})),e||null}}class qn extends fs{constructor(){super(),this.id=null,this.expire_in=null,this.closed=!1,this.is_allow_profiling=!1,this.preview_aspect_ratio=1,this._placeholders={}}singleModelWrapper(){return""}attributes(){return ii()(super.attributes(),["server_timestamp","session","cache","share","user_key","placeholders","is_allow_profiling","preview_aspect_ratio"])}static fetch(e){return this._fetch(qn,"session/open?expand=cache",e,"post")}static updateSession(e){return this.update("session/update",e)}set session(e){this.id=e.id,this.expire_in=e.expire_in,void 0!==e.closed&&(this.closed=e.closed)}set cache(e){this._projectResourceCache=Hn.createFromArray(e)}get cache(){return this._projectResourceCache}set placeholders(e){Ee()(e)&&e.forEach((e=>{he()(e)&&void 0!==e.name&&void 0!==e.default_value&&(this._placeholders[e.name]=e.default_value)}))}get placeholders(){return this._placeholders}}var Zn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Yn{constructor(e){this.storyManager=e}loadStories(e){return Zn(this,arguments,void 0,(function*({listType:e,identityFields:t,testKey:i,needFavorite:r=!0}){const s=e===Ze.DEFAULT&&r;yield Ti({defaultList:t,onboardingList:!1,favoriteList:s,testKey:i});const n=$t(Se.default,t.feedSlug),o=t.feedSlug===ho?Ze.UGC:Ze.DEFAULT;const a={stories:n.map((e=>{const t={title:null,tags:[],slidesCount:null};return e&&(t.title=e.stat_title,t.tags=e.tags,t.slidesCount=e.slides_count,e.type===Ze.UGC&&(t.ugcPayload=he()(e.payload)?e.payload:{})),Object.assign({id:e.id},t)})),feed:null,filter:null};o===Ze.DEFAULT?a.feed=t.feedSlug:o===Ze.UGC&&(a.filter=t.filter),this.storyManager.emit("feedLoad",a);return{defaultStories:$t(Se.default,t.feedSlug),favoriteStories:$t(Se.favorite,t.feedSlug)}}))}observeDefaultStories(e){return it.map((t=>{var i;return(null!==(i=t[e])&&void 0!==i?i:[]).map((e=>this.createStoryByData(Object.assign(Object.assign({},e),{slides_html:[]}))))}))}observeFavoriteStories(){return st.map((e=>e.map((e=>this.createStoryByData(Object.assign(Object.assign({},e),{slides_html:[]}))))))}observeSession(){return m.map((e=>fs.createInstance(qn,e)))}createStoryByData(e){return e instanceof bs?e:fs.createInstance(bs,e)}}class Xn{constructor(e){this.lastClientX=0,this.lastClientY=0,this.pushed=!1,this.sliderApi=e,this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleAnimationEnd=this.handleAnimationEnd.bind(this),this.addEventListeners()}addEventListeners(){const e=this.sliderApi.getElementRef();e.addEventListener("mousedown",this.handleMouseDown,Ei),e.addEventListener("touchstart",this.handleMouseDown,Ei),e.addEventListener("transitionend",this.handleAnimationEnd,Ei)}scrollTo(e){const t=this.sliderApi.getElementRef(),i="ltr"===this.sliderApi.dir?-1:1;t.style.transform=`translate3d(${i*e.x}px, ${-1*e.y}px, 0px)`,this.sliderApi.updatePosition(e.x,e.y),this.sliderApi.testAttraction(),this.sliderApi.emit("scroll",e)}scrollWithAnimation(e,t){this.sliderApi.setIsScrolling(!0);const i=this.sliderApi.getCurrentPosition();if(i.x===e.x&&i.y===e.y)return;this.sliderApi.getElementRef().style.transitionDuration=`${t}ms`,this.scrollTo(e)}stopAnimation(){this.sliderApi.setIsScrolling(!1);this.sliderApi.getElementRef().style.transitionDuration="0ms"}destroy(){const e=this.sliderApi.getElementRef();e.removeEventListener("mousedown",this.handleMouseDown,Ei),e.removeEventListener("touchstart",this.handleMouseDown,Ei),e.removeEventListener("mouseup",this.handleMouseUp,Ei),e.removeEventListener("touchend",this.handleMouseUp,Ei),e.removeEventListener("mousemove",this.handleMouseMove,Ei),e.removeEventListener("touchmove",this.handleMouseMove,Ei),e.removeEventListener("transitionend",this.handleAnimationEnd,Ei)}handleAnimationEnd(){this.stopAnimation(),this.sliderApi.emit("scrollend",this.sliderApi.getCurrentPosition())}handleMouseDown(e){this.pushed=!0,this.stopAnimation();const{clientX:t,clientY:i}=this.extractPointerPosition(e);this.lastClientX=t,this.lastClientY=i,window.addEventListener("mouseup",this.handleMouseUp,Ei),window.addEventListener("touchend",this.handleMouseUp,Ei),window.addEventListener("mousemove",this.handleMouseMove,Ei),window.addEventListener("touchmove",this.handleMouseMove,Ei)}handleMouseUp(){this.pushed&&(this.pushed=!1,this.sliderApi.isDragging&&(this.sliderApi.setIsDragging(!1),this.sliderApi.emit("scrollend",this.sliderApi.getCurrentPosition())),window.removeEventListener("mouseup",this.handleMouseUp,Ei),window.removeEventListener("touchend",this.handleMouseUp,Ei),window.removeEventListener("mousemove",this.handleMouseMove,Ei),window.removeEventListener("touchmove",this.handleMouseMove,Ei))}handleMouseMove(e){if(!this.pushed)return;const{clientX:t,clientY:i}=this.extractPointerPosition(e),r=t-this.lastClientX,s=i-this.lastClientY;this.lastClientX=t,this.lastClientY=i;const{x:n,y:o}=this.sliderApi.preparePosition(this.sliderApi.getCurrentPosition().x-r,this.sliderApi.getCurrentPosition().y-s);this.scrollTo({x:n,y:o}),!this.sliderApi.isDragging&&(Math.abs(r)>=1||Math.abs(s)>=1)&&(this.sliderApi.setIsDragging(!0),this.sliderApi.emit("scrollstart",this.sliderApi.getCurrentPosition()))}extractPointerPosition(e){return e instanceof MouseEvent?{clientX:e.clientX,clientY:e.clientY}:{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}}var Qn=p(2784),Kn=p.n(Qn);class Jn{constructor(e){this.rafId=0,this.prevTranslateX=null,this.prevTranslateY=null,this.handleScroll=this.handleScroll.bind(this),this.sliderApi=e,this.handleNativeScrollEnd=Kn()((()=>{this.sliderApi.emit("scrollend",this.sliderApi.getCurrentPosition()),this.sliderApi.setIsScrolling(!1)}),300),this.init(),this.addEventListeners()}destroy(){this.sliderApi.getElementRef().removeEventListener("scroll",this.handleScroll)}init(){const e=this.sliderApi.getElementRef();e.style.overflowX=this.sliderApi.isHorizontal()?"scroll":"hidden",e.style.overflowY=this.sliderApi.isHorizontal()?"hidden":"scroll"}addEventListeners(){this.sliderApi.getElementRef().addEventListener("scroll",this.handleScroll)}scrollTo(e){const t=this.sliderApi.getElementRef(),i="ltr"===this.sliderApi.dir?1:-1;t.scrollLeft=i*e.x,t.scrollTop=e.y,this.sliderApi.updatePosition(e.x,e.y),this.sliderApi.testAttraction(),this.sliderApi.emit("scroll",e)}scrollWithAnimation(e,t){this.performNativeAnimation(e.x,e.y,t)}stopAnimation(){}handleScroll(){this.sliderApi.isScrolling||(this.sliderApi.emit("scrollstart",this.sliderApi.getCurrentPosition()),this.sliderApi.setIsScrolling(!0));const e=this.sliderApi.getElementRef();this.sliderApi.updatePosition(Math.abs(e.scrollLeft),Math.abs(e.scrollTop)),this.sliderApi.testAttraction(),this.sliderApi.emit("scroll",{x:e.scrollLeft,y:e.scrollTop}),this.handleNativeScrollEnd()}performNativeAnimation(e,t,i){const{x:r,y:s}=this.sliderApi.getCurrentPosition(),n=e-r,o=t-s;if(Math.abs(n)<=1&&Math.abs(o)<=1)return;if(this.prevTranslateX===e&&this.prevTranslateY===t)return;this.prevTranslateX=e,this.prevTranslateY=t;let a=performance.now();cancelAnimationFrame(this.rafId);const l=e=>{const t=e-a,d=Math.min(t/i,1),c=d*n+r,u=d*o+s;this.scrollTo({x:c,y:u}),d<1?this.rafId=requestAnimationFrame(l):(this.prevTranslateX=null,this.prevTranslateY=null)};this.rafId=requestAnimationFrame(l)}}var eo;!function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(eo||(eo={}));class to extends U.EventEmitter{constructor(){super(...arguments),this._isScrolling=!1,this._isDragging=!1,this.currentPosition={x:0,y:0},this.direction=eo.Horizontal,this.gap=20,this._reachBeginning=!0,this._reachEnd=!0,this.desktopMode=!0,this._dir="ltr"}get isDragging(){return this._isDragging}get isScrolling(){return this._isScrolling}get slides(){return Array.from(this.slider.children)}get elementRef(){return this.slider}get reachBeginning(){return this._reachBeginning}get reachEnd(){return this._reachEnd}get scrollWidth(){return this.slider.scrollWidth}get dir(){return this._dir}mount(e){this.slider=e,this.changeScrollStrategy()}destroy(){this.removeAllListeners(),this.scrollStrategy.destroy()}getLength(){var e,t;return null!==(t=null===(e=this.slider)||void 0===e?void 0:e.children.length)&&void 0!==t?t:0}changeDirection(e){this.direction=e,this.scrollTo(0,0),this.changeScrollStrategy()}setGap(e){this.gap=e}setDesktopMode(e){this.desktopMode=e,this.changeScrollStrategy()}getGap(){return this.gap}scrollTo(e,t=300){this.isScrolling||this.emit("scrollstart",this.currentPosition);const i=this.preparePosition(e,e);t>0?this.scrollStrategy.scrollWithAnimation(i,t):(this.scrollStrategy.scrollTo(i),this.emit("scrollend",this.currentPosition))}isHorizontal(){return this.direction===eo.Horizontal}updatePosition(e,t){this.currentPosition={x:e,y:t}}getElementRef(){return this.slider}getCurrentPosition(){return this.currentPosition}preparePosition(e,t){let i={x:e,y:t};return this.isHorizontal()?i.y=0:i.x=0,this.attractToBounds(i.x,i.y)}attractToBounds(e,t){return{x:this.attractToBoundsByX(e),y:this.attractToBoundsByY(t)}}attractToBoundsByX(e){return e<=0?0:e+this.slider.clientWidth>=this.slider.scrollWidth?this.slider.scrollWidth-this.slider.clientWidth:e}attractToBoundsByY(e){return e<=0?0:e+this.slider.clientHeight>=this.slider.scrollHeight?this.slider.scrollHeight-this.slider.clientHeight:e}testAttraction(){const{x:e,y:t}=this.getCurrentPosition(),i=e+this.slider.clientWidth>=Math.max(this.slider.scrollWidth-1,0),r=t+this.slider.clientHeight>=Math.max(this.slider.scrollHeight-1,0);this._reachBeginning=0===e&&0===t,this._reachEnd=this.isHorizontal()?i:r,this.emit("reachBeginning",this._reachBeginning),this.emit("reachEnd",this._reachEnd)}setIsScrolling(e){this._isScrolling=e}setIsDragging(e){this._isDragging=e}setTextDirection(e){this._dir=e}scrollBySlideIndex(e,t){this.isHorizontal()?this.scrollTo(this.slides[e].offsetLeft,t):this.scrollTo(this.slides[e].offsetTop,t)}scrollByDirection(e,t){const{x:i,y:r}=this.getCurrentPosition(),s=this.isHorizontal()?i:r,n=this.getSlidesPerView(),o=this.getStoryWidth(),a=this.getStoryHeight(),l=s+e*n*(this.isHorizontal()?o:a);this.scrollTo(l,t)}getSlidesPerView(){if(this.isHorizontal()&&this.slider.clientWidth){const e=this.slider.children[0].clientWidth+this.gap;return Math.round(this.slider.clientWidth/e)}if(!this.isHorizontal()&&this.slider.clientHeight){const e=this.slider.children[0].clientHeight+this.gap;return Math.round(this.slider.clientHeight/e)}return 1}getStoryWidth(){var e;return(null===(e=this.slides[0])||void 0===e?void 0:e.clientWidth)+this.gap}getStoryHeight(){var e;return(null===(e=this.slides[0])||void 0===e?void 0:e.clientHeight)+this.gap}changeScrollStrategy(){this.scrollStrategy&&this.scrollStrategy.destroy(),this.scrollStrategy=this.desktopMode?new Xn(this):new Jn(this)}}const io=.53167701863;class ro{constructor(e,t,i,r,s){this._vw=e,this._vh=t,this.actionPanelHeight=i,this.needBottomPanel=r,this.desktopMode=s,this.viewportRatio=1,this.slideRatio=.64516129032,this.viewportRatio=e/t}get shouldBeShownMobileFrame(){return this.viewportRatio<io}get vw(){return this._vw}get vh(){return this._vh}get shouldBeShownSafeAreaInsets(){return this.viewportRatio<io}getOffset(){const e=this.calculateStoryViewportHeight(!0),t=this.calculateHeight(!0),i=this._vw,r=this.calculateWidth(!0);let s="";return s=this.desktopMode?this.viewportRatio>this.slideRatio?Math.ceil(t-e)/2*-1+"px auto":`0 ${Math.ceil(r-i)/2*-1}px`:t>e?Math.ceil(t-e)/2*-1+"px auto":`0 ${Math.ceil(r-i)/2*-1}px`,s}getOffsetX(){const e=this.calculateWidth(!0),t=this.calculateStoryViewportHeight(!0),i=this.calculateHeight(!0);if(this.desktopMode)return this.viewportRatio>this.slideRatio?"0px":Math.ceil(e-this._vw)/2+"px";{const r=this._vw;return i>t?"0px":Math.ceil(e-r)/2+"px"}}getHeight(e=!1){return this.viewportRatio>this.slideRatio?`${this.calculateHeight(e)}px`:"100%"}getOffsetY(){const e=this.calculateStoryViewportHeight(!0);if(this.desktopMode)return this.viewportRatio>this.slideRatio?`${Math.ceil(this.calculateHeight()-e)}px`:"0px";{const t=this.calculateHeight();return t>e?Math.ceil(t-e)/2+"px":"0px"}}getWidth(e=!1){return this.viewportRatio>this.slideRatio?`${this.calculateWidth(e)}px`:"auto"}getFontSize(){return this.calculateWidth()/20+"px"}getViewportCorrectionPadding(){if(this.desktopMode)return{};const{paddingTop:e,paddingBottom:t}=this.calcFrameWidthByMobileAspectRatio();return{paddingTop:e+"px",paddingBottom:t+"px"}}calculateWidth(e=!1){return this.desktopMode?Math.ceil(this.calculateStoryViewportHeight(e)*this.slideRatio):this.viewportRatio>this.slideRatio?this._vw:Math.ceil(this.calculateStoryViewportHeight(e)*this.slideRatio)}calculateHeight(e=!1){return this.desktopMode?Math.ceil(this.calculateWidth(e)/this.slideRatio):Math.ceil(this._vw/this.slideRatio)}calculateStoryViewportHeight(e=!1){let t=this._vh;const i=this.needBottomPanel?this.actionPanelHeight:0;t-=e?i:0;const{paddingTop:r,paddingBottom:s}=this.calcFrameWidthByMobileAspectRatio();return this.desktopMode?t-=100:t-=r+s,t}calcFrameWidthByMobileAspectRatio(){if(this.desktopMode)return{paddingTop:0,paddingBottom:0};const e=this._vh-this._vw/io,t=Math.max(Math.min(e-this.actionPanelHeight,this.actionPanelHeight),0);return{paddingTop:Math.max(e-t,0),paddingBottom:t}}}var so=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class no{static getUgcEditorConfig(){return so(this,void 0,void 0,(function*(){var e,t;let i=m.getState();(null===(e=null==i?void 0:i.session)||void 0===e?void 0:e.id)||(yield y({})),(null==i?void 0:i.editor)||(yield Nt({}));const r=o.getState(),s=m.getState(),n="0.5.0";return{sessionId:s.session.id,apiKey:r.apiKey,editor:null!==(t=s.editor)&&void 0!==t?t:{},sdkVersion:n,appPackageId:r.appPackageId,deviceId:g.getState(),userId:null!=r.userId?String(r.userId):void 0,lang:r.lang.toString()}}))}}var oo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class ao extends U.EventEmitter{constructor(e,t,i,r){super(),this.storyManager=e,this.storyReaderViewModel=t,this.storyId=i,this.options=r,this.showSharePage=()=>oo(this,void 0,void 0,(function*(){var e;this.handleStartLoad();const t=null===(e=this.storyManager.getConfig())||void 0===e?void 0:e.disableStatistic,i=yield this.storyReaderViewModel.showSingleStoryFromSharePage(this.storyId,t);this.handleEndLoad(i)})),this.handleCloseStoryReader=this.handleCloseStoryReader.bind(this),this.showSharePage(),this.storyReaderViewModel.once("closeStoryReader",this.handleCloseStoryReader)}closeStoryReader(){return oo(this,void 0,void 0,(function*(){this.storyManager.closeStoryReader()}))}handleStartLoad(){setTimeout((()=>{var e;this.emit(ft.START_LOADING),De()(null===(e=this.options)||void 0===e?void 0:e.handleStartLoad)&&this.options.handleStartLoad()}))}handleEndLoad(e){var t;this.emit(ft.END_LOADING,{result:e}),De()(null===(t=this.options)||void 0===t?void 0:t.handleStopLoad)&&this.options.handleStopLoad(e)}handleCloseStoryReader(){var e,t,i;if(De()(null===(e=this.options)||void 0===e?void 0:e.handleStoryReaderClose)||this.listenerCount(ft.CLOSE_STORY_READER)>0)try{De()(null===(t=this.options)||void 0===t?void 0:t.handleStoryReaderClose)&&(null===(i=this.options)||void 0===i||i.handleStoryReaderClose()),this.emit(ft.CLOSE_STORY_READER)}catch(e){console.error(e)}else{const e=window.location;window.open(`${e.protocol}//${e.host}`,"_parent")}}}var lo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class co{constructor(e){this.storyManager=e}get sdkVersionName(){return this.storyManager.sdkVersionName}get sdkVersionCode(){return this.storyManager.sdkVersionCode}set storyLinkClickHandler(e){this.storyManager.storyLinkClickHandler=e}getConfig(){return this.storyManager.getConfig()}showOnboardingStories(e){return lo(this,void 0,void 0,(function*(){return this.storyManager.showOnboardingStories(e)}))}showStory(e){return lo(this,void 0,void 0,(function*(){return this.storyManager.showStory(e)}))}closeAllReaders(){this.storyManager.closeAllReaders()}openGame(e){return lo(this,arguments,void 0,(function*(e,t={}){return this.storyManager.openGame(e,t)}))}closeGame(){return lo(this,void 0,void 0,(function*(){return this.storyManager.closeGame()}))}closeStoryReader(){return lo(this,void 0,void 0,(function*(){return this.storyManager.closeStoryReader()}))}getUgcEditorConfig(){return this.storyManager.getUgcEditorConfig()}showSharePage(e,t){return this.storyManager.showSharePage(e,t)}closeGoodsWidget(){this.storyManager.closeGoodsWidget()}on(e,t){return this.storyManager.on(e,t),this}once(e,t){return this.storyManager.once(e,t),this}off(e,t){return this.storyManager.off(e,t),this}}var uo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const ho="{{__ugc__}}";class po extends U.EventEmitter{constructor(){return super(),this.viewModelStore=new pt,this.config=null,this.callbacks={},this.clickOnButtonAction=({src:e,payload:t})=>{if(De()(this.callbacks.storyLinkClickHandler)||this.listenerCount(_e.CLICK_ON_STORY)>0){const i={src:e,srcRef:"default",data:t};try{De()(this.callbacks.storyLinkClickHandler)&&this.callbacks.storyLinkClickHandler(i),this.emit(_e.CLICK_ON_STORY,i)}catch(e){console.error(e)}}else window.open(t.url,"_self")},this.isSingletonInstanceExists()||(po.instance=this),po.instance}static get combinedPlaceholders(){return jt()}get sdkVersionName(){return"0.5.0"}get sdkVersionCode(){return parseInt(500)}get lang(){return o.getState().lang}set storyLinkClickHandler(e){De()(e)&&(this.callbacks.storyLinkClickHandler=e)}get storyReaderViewModel(){return this.viewModelStore.getOneByName(Os.name)}get gameReaderViewModel(){return this.viewModelStore.getOneByName(So.name)}static getInstance(){return po.instance?po.instance:null}setViewModel(e,t){this.viewModelStore.set(e,t)}getConfig(){return this.config}setConfig(e){this.validateConfig(e),this.initializeConfig(e)}destroy(){if(null!=po.instance){po.instance=null,this.closeAllReaders();for(const e of this.viewModelStore.getAll())e.destroy()}}setTags(e){this.config&&(T.getInstance().checkTagsLength(e),l({tags:e}),this.config.tags=e)}setUserId(e){return uo(this,void 0,void 0,(function*(){(Be()(e)||je()(e))&&this.config&&(this.config.userId=e,T.getInstance().checkUserIdLength(e),d({userId:e}),S(),yield this.closeAllReaders(),yield this.reloadAllStoryLists())}))}setLang(e){Be()(e)&&this.config&&(h({lang:e}),this.config.lang=e)}setApiKey(e){this.config&&(E(e),a({apiKey:e}),S(),this.config.apiKey=e)}setPlaceholders(e){he()(e)&&this.config&&(c({placeholders:e}),Te(e),this.config.placeholders=e)}setImagePlaceholders(e){he()(e)&&this.config&&(u({imagePlaceholders:e}),Ve(e),this.config.imagePlaceholders=e)}showOnboardingStories(e){return uo(this,void 0,void 0,(function*(){return this.storyReaderViewModel.showOnboardingStories(e)}))}showStory(e){return uo(this,void 0,void 0,(function*(){const t=this.storyReaderViewModel;return yield t.showSingleStory(e,"")}))}closeAllReaders(){this.storyReaderViewModel.close(),this.gameReaderViewModel.closeGame()}closeGoodsWidget(){this.storyReaderViewModel.closeGoodsWidget()}openGame(e){return uo(this,arguments,void 0,(function*(e,t={}){const i=this.gameReaderViewModel;try{if(i.isOpened)throw new Error(`Close the launched game with ID "${i.gameInstanceId}"`);yield i.openGame(e,t)}catch(e){console.error(e)}}))}closeGame(){return uo(this,void 0,void 0,(function*(){return this.gameReaderViewModel.closeGame()}))}closeStoryReader(){return uo(this,void 0,void 0,(function*(){this.storyReaderViewModel.close()}))}getUgcEditorConfig(){return uo(this,void 0,void 0,(function*(){return no.getUgcEditorConfig()}))}showSharePage(e,t){return new ao(this,this.storyReaderViewModel,e,t)}reloadAllStoryLists(){const e=this.viewModelStore.getAllByName(St.name);return Promise.all(e.map((e=>e.reload())))}isSingletonInstanceExists(){return!!po.instance&&(console.warn("StoryManager singleton is created multiple times\nuse IAS.StoryManager.getInstance() instead"),!0)}validateConfig(e){if(e.disableDeviceId&&!e.userId)throw new Error("You must pass the `userId` value");T.getInstance().checkUserIdLength(e.userId),T.getInstance().checkTagsLength(e.tags)}initializeConfig(e){E(e.apiKey),a(e),e.placeholders&&Te(e.placeholders),e.imagePlaceholders&&Ve(e.imagePlaceholders),S(),e.disableStatistic="com.inappstory.webpreview"===e.appPackageId,this.config=e}}const fo=new po,go=new co(fo);var vo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const mo=(0,e.createEffect)((e=>vo(void 0,[e],void 0,(function*({gameInstanceId:e,gameOptions:t}){var i,r;(null===(r=null===(i=m.getState())||void 0===i?void 0:i.session)||void 0===r?void 0:r.id)||(yield y({}));const s={};t&&he()(t)&&null!=t.demoMode&&(s.demoMode=Boolean(t.demoMode));const n=yield B.post(`game/${e}/launch?expand=config`,s);if(!n.ok)throw new Error(JSON.stringify(n.data));return n.data.clientConfig=yo(),n.data})))),yo=()=>{let e=m.getState();const t=o.getState();return{sessionId:e.session.id,userKey:e.user_key,apiKey:t.apiKey,sdkVersion:"0.5.0",apiBaseUrl:M.apiUrl,userAgent:P,appPackageId:t.appPackageId,deviceId:g.getState(),userId:t.userId?t.userId:"",lang:t.lang.toString(),placeholders:po.combinedPlaceholders}};var wo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class So extends ht{constructor(){super(),this._isOpened=!1,this._isGameInited=!1,this._isGameLoading=!1,this._gameLaunch=null,this._gameLaunchError=null,this._closeBtnVisible=!1,this.initGameRetryAttempts=0,this.gameCenterMessageService=null,this.safeAreaInsets={top:0,bottom:0,left:0,right:0},this.openGameOptions={},this.desktopMode=!0,this.dir="ltr",this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}destroy(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.destroy(),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}get closeBtnVisible(){return this._closeBtnVisible}get isGameLoading(){return this._isGameLoading}get isGameInited(){return this._isGameInited}get gameLaunchError(){return this._gameLaunchError}get gameLaunch(){return this._gameLaunch}get gameInstanceId(){return this._gameInstanceId}get isOpened(){return this._isOpened}openGame(e,t){return wo(this,void 0,void 0,(function*(){this._gameInstanceId=e,this._isOpened=!0,this.openGameOptions=t,yield this.launchGameById(e)}))}closeGame(){return wo(this,void 0,void 0,(function*(){var e;return!!this._isOpened&&(this._isGameInited?null===(e=this.gameCenterMessageService)||void 0===e||e.sendMessage("cb",{cb:"closeGameReader"}):this.handleGameComplete(),!0)}))}reload(){this._gameLaunch=null,this.gameInstanceId?this.launchGameById(this.gameInstanceId):console.error("The game instance ID is undefined")}sendGameCenterEventByApiRequest(e,t){var i;null===(i=this.gameCenterMessageService)||void 0===i||i.sendMessage("cb",{cb:e,plainData:t})}setSafeAreaInsets(e){this.safeAreaInsets=e}setDesktopMode(e){this.desktopMode=e}setGameCenterIframe(e){var t;if(!this._gameLaunch)throw new Error("GameCenter iframe setup error");if(this._isGameInited)return;null===(t=this.gameCenterMessageService)||void 0===t||t.destroy();const i=new URL(this._gameLaunch.url).origin;this.gameCenterMessageService=new de(e,i),this.initGameCenter(this.gameCenterMessageService,this._gameLaunch)}pauseGameUI(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.sendMessage("cb",{cb:"pauseUI",arguments:JSON.stringify([])})}resumeGameUI(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.sendMessage("cb",{cb:"resumeUI",arguments:JSON.stringify([])})}confirmSharingComplete({shareId:e,isSuccess:t}){var i;null===(i=this.gameCenterMessageService)||void 0===i||i.sendMessage("shareComplete",{id:e,isSuccess:t})}launchGameById(e){return wo(this,void 0,void 0,(function*(){try{this._gameLaunchError=null,this._isGameLoading=!0,this.emit("update"),this._gameLaunch=yield mo({gameInstanceId:e,gameOptions:this.openGameOptions})}catch(e){this._gameLaunchError=e}finally{this.emit("update")}}))}initGameCenter(e,t){this.handleGameCenterEvents(e);const i=this.getGameConfig(t);e.sendMessage("cb",{cb:"initGame",arguments:JSON.stringify([i])})}getGameConfig(e){const t=e.screenOptions;return ne()(e.config,{clientConfig:Object.assign({fullScreen:!1,screenOrientation:t.orientation,safeAreaInsets:this.safeAreaInsets,dir:this.dir,nonce:ws()},e.clientConfig)})}handleGameCenterEvents(e){e.on("gameLoaded",this.handleGameLoaded.bind(this)).on("gameComplete",this.handleGameComplete.bind(this)).on("sendApiRequest",this.handleSendApiRequest.bind(this)).on("openUrl",this.handleOpenUrl.bind(this)).on("event",this.handleGameEvent.bind(this)).on("reloadGameReader",this.handleReloadGameReader.bind(this)).on("gameLoadFailed",this.handleGameLoadFailed.bind(this));const t={share:new ke(e,this,this.desktopMode),storySetLocalData:new Me(e,this),storyGetLocalData:new Le(e,this),gameInstanceGetLocalData:new fe(e,this),gameInstanceSetLocalData:new ge(e,this)};for(const[i,r]of Object.entries(t))e.on(i,((...e)=>r.handle(...e)))}handleGameLoaded(e){this._isGameInited=!0,this._isGameLoading=!1,this.emit(ce.StartGame),document.addEventListener("visibilitychange",this.handleVisibilityChange);const t=JSON.parse(e);he()(t)&&(this._closeBtnVisible=Boolean(t.showClose),this.emit("update"))}handleVisibilityChange(){"hidden"===document.visibilityState?this.pauseGameUI():"visible"===document.visibilityState&&this.resumeGameUI()}handleGameComplete(e){var t;this._isGameInited=!1,this._isOpened=!1,this._gameLaunch=null,null===(t=this.gameCenterMessageService)||void 0===t||t.destroy(),this.emit(ce.GameComplete,e),this.emit("update"),mt.emit(`${So.name}.gameComplete`)}handleSendApiRequest(e){this.emit(ce.SendApiRequest,e)}handleOpenUrl(e){const{url:t}=JSON.parse(e);this.emit(ce.OpenUrl,{url:t})}handleGameEvent(e,t){this.emit(ce.GameInstanceEvent,{name:e,payload:t})}handleReloadGameReader(){const e=this._gameLaunch;this._gameLaunch=null,this.emit("update"),setTimeout((()=>{this._gameLaunch=e,this.emit("update")}))}handleGameLoadFailed(e,t){this.gameLaunch&&t&&this.initGameRetryAttempts<this.gameLaunch.canTryReloadCount?(this.initGameRetryAttempts++,this.handleReloadGameReader()):this._gameLaunchError=new Error(e)}}var bo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class _o extends fs{static save(e,t,i){return bo(this,void 0,void 0,(function*(){try{return{data:(yield i("apiRequest",{url:`game/${e}/instance-user-data`,method:"post",params:null,data:t,headers:null})).data,status:200,headers:[{}]}}catch(e){return{data:e,status:400,headers:[{}]}}}))}}var xo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Co{constructor(e){this.storyManager=e}create(){const e=new So;return this.storyManager.setViewModel(So.name,e),this.handleGameReaderViewModelEvents(e),e}handleGameReaderViewModelEvents(e){e.on(ce.StartGame,(()=>this.storyManager.emit("startGame",{id:e.gameInstanceId}))).on(ce.GameInstanceEvent,(e=>this.storyManager.emit("gameEvent",e))).on(ce.GameComplete,(t=>{ei()(t)?this.storyManager.emit("closeGame",{id:e.gameInstanceId}):this.storyManager.emit("finishGame",{id:e.gameInstanceId,result:t})})).on(ce.OpenUrl,(({url:t})=>{this.storyManager.clickOnButtonAction({src:yt.GAME_READER,payload:{url:t,gameInstanceId:e.gameInstanceId}})})).on(ce.SendApiRequest,(t=>xo(this,void 0,void 0,(function*(){gs.sendApiRequestPromise(t,((t,i)=>e.sendGameCenterEventByApiRequest(t,i)),Yt)})))).on(ce.StorySetLocalData,(e=>xo(this,[e],void 0,(function*({storyId:e,data:t}){gs.sentData(e,t,Yt)})))).on(ce.GameInstanceSetLocalData,(t=>xo(this,[t],void 0,(function*({data:t}){_o.save(e.gameInstanceId,t,Yt)}))))}}Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34});!function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();function ko(){if(window){var e,t=window.screen;return e="function"==typeof window.ScreenOrientation&&t.orientation instanceof ScreenOrientation&&"function"==typeof t.orientation.addEventListener&&null===t.orientation.onchange&&"string"==typeof t.orientation.type?t.orientation:function(){var e={90:Ao.LANDSCAPE_PRIMARY,"-90":Ao.LANDSCAPE_SECONDARY,0:Ao.PORTRAIT_PRIMARY,180:Ao.PORTRAIT_SECONDARY};function t(){}var i=new t,r=function(e){for(var t=["orientationchange","mozorientationchange","msorientationchange"],i=window.screen,r=0;r<t.length;r++)if(null===i["on"+t[r]])return{delegate:i,event:t[r]};if(void 0!==window.onorientationchange)return{delegate:window,event:"orientationchange"};return{delegate:To(e),event:"change"}}(i);return t.prototype.addEventListener=Lo("addEventListener",r.delegate,r.event),t.prototype.dispatchEvent=Lo("dispatchEvent",r.delegate,r.event),t.prototype.removeEventListener=Lo("removeEventListener",r.delegate,r.event),t.prototype.lock=function(){var e,t="lockOrientation() is not available on this device.",i=window.screen;e=void 0===i?function(){return!1}:"function"==typeof i.msLockOrientation?i.msLockOrientation.bind(i):"function"==typeof i.mozLockOrientation?i.mozLockOrientation.bind(i):function(){return!1};return function(i){const r=window.Promise;return e(i)?r.resolve(i):r.reject(new Error(t))}}(),t.prototype.unlock=function(){var e=window.screen;return e&&e.orientation&&e.orientation.unlock.bind(e.orientation)||e.msUnlockOrientation&&e.msUnlockOrientation.bind(e)||e.mozUnlockOrientation&&e.mozUnlockOrientation.bind(e)||function(){}}(),Object.defineProperties(i,{onchange:{get:function(){return r.delegate["on"+r.event]||null},set:function(e){r.delegate["on"+r.event]=Eo(e,i)}},type:{get:function(){var t=window.screen;return t.msOrientation||t.mozOrientation||e[window.orientation+""]||(Ro().matches?"landscape-primary":"portrait-primary")}},angle:{value:0}}),i}(),e}}var Ao;function Lo(e,t,i){var r=this;return function(){var s=Array.prototype.slice.call(arguments);if("change"===(s[0].type?s[0].type:s[0])){s[0].type?s[0]=Io(i,s[0]):s[0]=i;var n,o,a=Eo(s[1],r);return"addEventListener"===e&&function(e,t){var i=Oo.indexOf(e);i>-1?Mo[i]=t:(Oo.push(e),Mo.push(t))}(s[1],a),"removeEventListener"===e&&(n=s[1],(o=Oo.indexOf(n))>-1&&(Oo.splice(o,1),Mo.splice(o,1))),s[1]=a,t[e].apply(t,s)}}}!function(e){e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary",e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary"}(Ao||(Ao={}));var Mo=[],Oo=[];function Eo(e,t){var i=Oo.indexOf(e);return i>-1?Mo[i]:function(i){i.target!==t&&Po(i,"target",t),i.currentTarget!==t&&Po(i,"currentTarget",t),"change"!==i.type&&Po(i,"type","change"),e(i)}}function Io(e,t){var i;try{i=new Event(e,t)}catch(e){i={type:"change"}}return i}function To(e){var t=Object.create({addEventListener:function(e,t){this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)},dispatchEvent:function(t){this.listeners[t.type]&&(this.listeners[t.type].forEach((function(e){e(t)})),"function"==typeof e.onchange&&e.onchange(t))},removeEventListener:function(e,t){if(this.listeners[e]){var i=this.listeners[e].indexOf(t);i>-1&&this.listeners[e].splice(i,1)}}});t.listeners={};var i=Ro();return i&&"boolean"==typeof i.matches&&i.addListener((function(){t.dispatchEvent(Io("change"))})),t}function Ro(){return"function"!=typeof window.matchMedia?{}:window.matchMedia("(orientation: landscape)")}function Po(e,t,i){Object.defineProperty(e,t,{value:i})}class Do{static createFunctionWithTimeout(e,t){let i=!1;function r(){i||(i=!0,e())}return setTimeout(r,t||1e3),r}static convertModelToFormData(e,t,i){t instanceof Object&&Object.keys(t).forEach((r=>{const s=t[r];if(s instanceof Object&&!Array.isArray(s))return this.convertModelToFormData(e,s,r);i&&(r=`${i}[${r}]`),Array.isArray(s)?s.forEach((t=>{e.append(`${r}[]`,t)})):e.append(r,s)}))}}var No=p(1085),Bo=p(9155),Fo=p.n(Bo),jo=p(8384),Uo=p.n(jo);var Vo=function(e,t,i){var r=e.key+"-"+t.name;!1===i&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var Go={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function zo(e){var t=Object.create(null);return function(i){return void 0===t[i]&&(t[i]=e(i)),t[i]}}var Wo=/[A-Z]|^ms/g,$o=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ho=function(e){return 45===e.charCodeAt(1)},qo=function(e){return null!=e&&"boolean"!=typeof e},Zo=zo((function(e){return Ho(e)?e:e.replace(Wo,"-$&").toLowerCase()})),Yo=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace($o,(function(e,t,i){return Qo={name:t,styles:i,next:Qo},t}))}return 1===Go[e]||Ho(e)||"number"!=typeof t||0===t?t:t+"px"};function Xo(e,t,i){if(null==i)return"";if(void 0!==i.__emotion_styles)return i;switch(typeof i){case"boolean":return"";case"object":if(1===i.anim)return Qo={name:i.name,styles:i.styles,next:Qo},i.name;if(void 0!==i.styles){var r=i.next;if(void 0!==r)for(;void 0!==r;)Qo={name:r.name,styles:r.styles,next:Qo},r=r.next;return i.styles+";"}return function(e,t,i){var r="";if(Array.isArray(i))for(var s=0;s<i.length;s++)r+=Xo(e,t,i[s])+";";else for(var n in i){var o=i[n];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=n+"{"+t[o]+"}":qo(o)&&(r+=Zo(n)+":"+Yo(n,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var a=Xo(e,t,o);switch(n){case"animation":case"animationName":r+=Zo(n)+":"+a+";";break;default:r+=n+"{"+a+"}"}}else for(var l=0;l<o.length;l++)qo(o[l])&&(r+=Zo(n)+":"+Yo(n,o[l])+";")}return r}(e,t,i);case"function":if(void 0!==e){var s=Qo,n=i(e);return Qo=s,Xo(e,t,n)}}if(null==t)return i;var o=t[i];return void 0!==o?o:i}var Qo,Ko=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Jo=!!Bo.useInsertionEffect&&Bo.useInsertionEffect,ea=Jo||function(e){return e()},ta=(Jo||Bo.useLayoutEffect,{}.hasOwnProperty),ia=Bo.createContext("undefined"!=typeof HTMLElement?Uo()({key:"css"}):null);ia.Provider;var ra=function(e){return(0,Bo.forwardRef)((function(t,i){var r=(0,Bo.useContext)(ia);return e(t,r,i)}))};var sa=Bo.createContext({});var na="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",oa=function(e,t){var i={};for(var r in t)ta.call(t,r)&&(i[r]=t[r]);return i[na]=e,i},aa=function(e){var t=e.cache,i=e.serialized,r=e.isStringTag;return Vo(t,i,r),ea((function(){return function(e,t,i){Vo(e,t,i);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var s=t;do{e.insert(t===s?"."+r:"",s,e.sheet,!0),s=s.next}while(void 0!==s)}}(t,i,r)})),null},la=ra((function(e,t,i){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var s=e[na],n=[r],o="";"string"==typeof e.className?o=function(e,t,i){var r="";return i.split(" ").forEach((function(i){void 0!==e[i]?t.push(e[i]+";"):r+=i+" "})),r}(t.registered,n,e.className):null!=e.className&&(o=e.className+" ");var a=function(e,t,i){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,s="";Qo=void 0;var n=e[0];null==n||void 0===n.raw?(r=!1,s+=Xo(i,t,n)):s+=n[0];for(var o=1;o<e.length;o++)s+=Xo(i,t,e[o]),r&&(s+=n[o]);Ko.lastIndex=0;for(var a,l="";null!==(a=Ko.exec(s));)l+="-"+a[1];var d=function(e){for(var t,i=0,r=0,s=e.length;s>=4;++r,s-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),i=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(s){case 3:i^=(255&e.charCodeAt(r+2))<<16;case 2:i^=(255&e.charCodeAt(r+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(r)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)}(s)+l;return{name:d,styles:s,next:Qo}}(n,void 0,Bo.useContext(sa));o+=t.key+"-"+a.name;var l={};for(var d in e)ta.call(e,d)&&"css"!==d&&d!==na&&(l[d]=e[d]);return l.ref=i,l.className=o,Bo.createElement(Bo.Fragment,null,Bo.createElement(aa,{cache:t,serialized:a,isStringTag:"string"==typeof s}),Bo.createElement(s,l))}));var da=la,ca=(p(5985),No.Fragment);function ua(e,t,i){return ta.call(t,"css")?No.jsx(da,oa(e,t),i):No.jsx(e,t,i)}function ha(e,t,i){return ta.call(t,"css")?No.jsxs(da,oa(e,t),i):No.jsxs(e,t,i)}var pa=p(992),fa=p.n(pa),ga=p(2591),va=p.n(ga),ma=p(4978),ya={insert:"head",singleton:!1};va()(ma.A,ya);const wa=ma.A.locals||{};var Sa=p(1422),ba={insert:"head",singleton:!1};va()(Sa.A,ba);const _a=Sa.A.locals||{},xa=({onClick:e,className:t})=>ua("div",{className:fa()(_a.icon,t),onClick:e,children:ua("svg",{viewBox:"0 0 24 24",children:ua("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"})})});function Ca(){var e,t,i,r,s,n,o,a,l,d,c;let u=null;try{u=(null===(e=window.parent)||void 0===e?void 0:e.innerWidth)||window.innerWidth||(null===(r=null===(i=null===(t=window.parent)||void 0===t?void 0:t.document)||void 0===i?void 0:i.documentElement)||void 0===r?void 0:r.clientWidth)||(null===(o=null===(n=null===(s=window.parent)||void 0===s?void 0:s.document)||void 0===n?void 0:n.body)||void 0===o?void 0:o.clientWidth)}catch(e){console.error(e)}return u||(null===(l=null===(a=window.document)||void 0===a?void 0:a.documentElement)||void 0===l?void 0:l.clientWidth)||(null===(c=null===(d=window.document)||void 0===d?void 0:d.body)||void 0===c?void 0:c.clientWidth)}function ka(){var e,t,i,r,s,n;let o=null;try{o=(null===(e=window.parent)||void 0===e?void 0:e.innerHeight)||(null===window||void 0===window?void 0:window.innerHeight)||(null===(r=null===(i=null===(t=window.parent)||void 0===t?void 0:t.document)||void 0===i?void 0:i.documentElement)||void 0===r?void 0:r.clientHeight)}catch(e){console.error(e)}return o||(null===(n=null===(s=null===window||void 0===window?void 0:window.document)||void 0===s?void 0:s.documentElement)||void 0===n?void 0:n.clientHeight)}var Aa=p(6644),La={insert:"head",singleton:!1};va()(Aa.A,La);const Ma=Aa.A.locals||{},Oa=310/480,Ea=({desktopMode:e,children:t,verticalPadding:i,style:r,className:s})=>{const[n,o]=(0,Bo.useState)({width:"0px",height:"0px"});(0,Bo.useEffect)((()=>(a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)})),[]);const a=()=>{const e=Ca(),t=f(),i=e/ka(),r=d({aspectRatio:i,vh:t,vw:e}),s=l({aspectRatio:i,vh:t,vw:e});o({width:r,height:s})},l=({aspectRatio:e,vh:t,vw:i})=>{const r=h(e)||p();return e>Oa&&!r?`${u({vh:t,vw:i})}px`:"100%"},d=({aspectRatio:e,vh:t,vw:i})=>e>Oa&&!h(e)?`${c({aspectRatio:e,vh:t,vw:i})}px`:"auto",c=({aspectRatio:t,vh:i,vw:r})=>t>Oa&&!e?r:Math.ceil(i*Oa),u=({vh:t,vw:i})=>e?t:Math.ceil(i/Oa),h=e=>e>Oa&&e-Oa<=.1,p=()=>{let e;return"matchMedia"in window&&void 0!==(e=window.matchMedia("(orientation: portrait)"))&&e.matches},f=()=>{let t=ka();return e?(t-=i,t):t};return ua("div",{className:fa()(Ma["aspect-ratio-box"],s),style:Object.assign(Object.assign({},r),n),children:ua("div",{className:Ma["aspect-ratio-box-inside"],children:t})})};var Ia=p(3639),Ta={insert:"head",singleton:!1};va()(Ia.A,Ta);const Ra=Ia.A.locals||{},Pa=ko(),Da=e=>{const[t,i]=(0,Bo.useState)(!1),r=(0,Bo.useCallback)((()=>{if(e.desktopMode)return;const t=Pa.type!==e.orientation;e.onOrientationChange({type:Pa.type,isWrong:t}),i(t)}),[e.desktopMode,e.orientation]);return(0,Bo.useEffect)((()=>(r(),Pa.addEventListener("change",r),()=>{Pa.removeEventListener("change",r)})),[r]),t?ua("div",{className:Ra["screen-orientation-lock"]}):null};var Na=p(5839),Ba={insert:"head",singleton:!1};va()(Na.A,Ba);const Fa=Na.A.locals||{};var ja=p(7231),Ua={insert:"head",singleton:!1};va()(ja.A,Ua);const Va=ja.A.locals||{},Ga=({shareLink:e,sharePanelOptions:t,onDownloadClick:i})=>{var r,s,n,o;return ha("div",{className:`${Fa["share-panel__body"]} ${Va["share-panel__body_screenshot"]}`,children:[ua("div",{className:`${Fa["share-panel-row"]} ${Va["share-panel-row"]}`,children:ua("a",{className:Va["share-panel-row__image-link"],onClick:i,href:e,download:"image.jpeg",children:ua("img",{src:e,className:Va["share-panel-row__image"]})})}),ua("div",{className:Fa["share-panel-separator"],style:{background:null===(r=t.divider)||void 0===r?void 0:r.background}}),ua("div",{className:`${Fa["share-panel-row"]} ${Va["share-panel-row"]}`,children:ua("a",{className:Va["share-item__download-button"],onClick:i,href:e,download:"image.jpeg",children:ua("div",{dangerouslySetInnerHTML:{__html:null!==(o=null===(n=null===(s=t.downloadButton)||void 0===s?void 0:s.svgSrc)||void 0===n?void 0:n.baseState)&&void 0!==o?o:""}})})})]})};var za=p(9749),Wa={insert:"head",singleton:!1};va()(za.A,Wa);const $a=za.A.locals||{};let Ha;function qa(){let e,t;/ipad|iphone/i.test(navigator.userAgent)?(e=document.createRange(),Ha&&e.selectNodeContents(Ha),t=window.getSelection(),t&&(t.removeAllRanges(),t.addRange(e)),Ha&&Ha.setSelectionRange(0,999999)):null==Ha||Ha.select()}const Za=e=>{!function(e){Ha=document.createElement("textarea"),Ha.value=e,document.body.appendChild(Ha)}(e),qa(),document.execCommand("copy"),Ha&&document.body.removeChild(Ha)};var Ya=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i};const Xa=e=>{var t,i,r,s,n,o,a,l,d,c,u,{shareLink:h,sharePanelOptions:p,onShareComplete:f}=e,g=Ya(e,["shareLink","sharePanelOptions","onShareComplete"]);const v=()=>{try{return new URL(h).host}catch(e){return console.error(e),null}},m=()=>{window.removeEventListener("focus",m),f()},y=()=>v()?"":encodeURIComponent(h),w=e=>{var t,i;const r=(()=>{try{return new URL(h)}catch(e){return console.error(e),null}})();if(!r)return"#";const s=null===(t=p.targetParams)||void 0===t?void 0:t[e];return null===(i=null==s?void 0:s.getUrl)||void 0===i?void 0:i.call(s,{url:r.toString(),text:y()})},S=null===(t=p.title)||void 0===t?void 0:t.favicon,b=p.text;return ha("div",{className:Fa["share-panel__body"],children:[ha("div",{className:`${Fa["share-panel-row"]} ${Fa["title-row"]}`,children:[v()&&Boolean(null==S?void 0:S.display)&&ua("div",{className:Fa["share-url-favicon"],style:{background:null==S?void 0:S.background},children:ua("img",{src:`${null!==(i=g.faviconApiUrl)&&void 0!==i?i:"https://favicon.inappstory.ru"}?sz=64&domain_url=${v()}`})}),ua("span",{className:Fa.title,style:b,children:null===(s=null===(r=p.title)||void 0===r?void 0:r.getValue)||void 0===s?void 0:s.call(r,{url:h,text:y()})})]}),ua("div",{className:Fa["share-panel-separator"],style:{background:null===(n=p.divider)||void 0===n?void 0:n.background}}),ua("div",{className:`${Fa["share-panel-row"]} ${$a["social-list"]}`,children:null===(o=p.targets)||void 0===o?void 0:o.map(((e,t)=>{var i,r,s;const n=null===(i=p.targetParams)||void 0===i?void 0:i[e],o=null!==(s=null===(r=null==n?void 0:n.icon)||void 0===r?void 0:r.svgSrc.baseState)&&void 0!==s?s:"<svg></svg>";return ua("div",{className:$a["social-list__item"],children:ha("a",{href:w(e),onClick:()=>((e,t,i)=>{window.addEventListener("focus",m),window.open(e,t,i)})(w(e),"newwindow","width=650,height=570"),target:"_blank",rel:"noopener noreferrer",className:`${Fa["share-item"]} ${$a["share-item"]}`,children:[ua("div",{dangerouslySetInnerHTML:{__html:o}}),ua("span",{className:Fa["share-item-title"],style:b,children:null==n?void 0:n.label})]})},t)}))}),ua("div",{className:Fa["share-panel-separator"],style:{background:null===(a=p.divider)||void 0===a?void 0:a.background}}),ua("div",{className:Fa["share-panel-row"],children:ha("a",{className:`${Fa["share-item"]} ${$a["share-item"]}`,onClick:()=>{Za(h),f()},children:[ua("div",{dangerouslySetInnerHTML:{__html:null!==(c=null===(d=null===(l=p.copyButton)||void 0===l?void 0:l.svgSrc)||void 0===d?void 0:d.baseState)&&void 0!==c?c:""}}),ua("span",{className:Fa["share-item-title"],style:b,children:null===(u=p.copyButton)||void 0===u?void 0:u.label})]})})]})};var Qa;!function(e){e.Social="social",e.SlideScreenshot="slide-screenshot"}(Qa||(Qa={}));const Ka=({shareType:e,shareLink:t,onShareCompelete:i,sharePanelOptions:r,className:s})=>{const{dir:n}=Ru(),[o,a]=(0,Bo.useState)(!1),[l,d]=(0,Bo.useState)(!0),c=()=>{a(!0),d(!1)};return ha("div",{dir:n,className:fa()(Fa["share-panel-wrapper"],s),onClick:e=>{e.stopPropagation()},onTouchStart:e=>{e.stopPropagation(),e.preventDefault()},children:[ua("div",{className:fa()(Fa["share-panel-backdrop"],{[Fa.fadeIn]:l,[Fa.fadeOut]:!l}),onClick:()=>{a(!1),d(!1)}}),ha("div",{className:fa()(Fa["share-panel"],{[Fa.slideIn]:l,[Fa.slideOut]:!l}),onAnimationEnd:()=>{l||i(o)},style:{"--height":"100%",background:r.background,borderTopLeftRadius:r.borderRadius+"px",borderTopRightRadius:r.borderRadius+"px"},children:[e===Qa.SlideScreenshot&&ua(Ga,{shareLink:t,onDownloadClick:c,sharePanelOptions:r}),e===Qa.Social&&ua(Xa,{shareLink:t,onShareComplete:c,sharePanelOptions:r}),ua("div",{className:Fa["share-panel-separator"]})]})]})},Ja=({gameReaderViewModel:e})=>{var t,i,r,s,n,o,a,l;const{desktopMode:d,dir:c,gameReaderOptions:u,storyReaderOptions:h}=Ru(),p=(0,Bo.useRef)(null),{sharePanelOpeningParams:f,handleShareComplete:g,closeSharePanel:v}=(e=>{const[t,i]=(0,Bo.useState)(null);return(0,Bo.useEffect)((()=>(null==e||e.on("openSharePanel",i),()=>{null==e||e.off("openSharePanel",i)})),[e]),{sharePanelOpeningParams:t,handleShareComplete:r=>{t&&e&&(e.confirmSharingComplete({shareId:t.shareId,isSuccess:r}),i(null))},closeSharePanel:()=>{i(null)}}})(e);Bu((()=>{m()}));const m=()=>{e.closeGame(),v()},{gameLaunch:y,gameLaunchError:w,isGameLoading:S,closeBtnVisible:b}=e,_=fa()(wa["game-reader"],{[wa["desktop-mode"]]:d,[wa.loading]:!e.gameLaunchError&&e.isGameLoading}),x={background:null===(t=u.backdrop)||void 0===t?void 0:t.background,opacity:null!==(r=null===(i=u.backdrop)||void 0===i?void 0:i.opacity)&&void 0!==r?r:0,filter:(null===(s=u.backdrop)||void 0===s?void 0:s.blur)?`blur(${u.backdrop.blur}px)`:"none"},C={backgroundColor:null===(n=u.game)||void 0===n?void 0:n.backdropColor,backgroundImage:(null===(o=null==y?void 0:y.splashScreen)||void 0===o?void 0:o.url)?`url(${y.splashScreen.url})`:void 0};return ua("div",{className:wa["game-reader-container"],children:ha("div",{className:_,children:[ua("div",{className:wa["game-reader__backdrop"],style:x}),ha(Ea,{className:wa["game-box"],desktopMode:d,verticalPadding:100,style:C,children:[w&&ua(xa,{className:wa.refresh,onClick:()=>{e.reload()}}),(S||b)&&ua("button",{dir:c,onClick:m,className:wa["game-reader__close"],"data-position":u.closeButtonPosition,dangerouslySetInnerHTML:{__html:null!==(l=null===(a=u.closeButton)||void 0===a?void 0:a.svgSrc.baseState)&&void 0!==l?l:""}}),y&&ha(ca,{children:[ua("iframe",{src:y.url,onLoad:t=>{p.current=t.target,e.dir=c,e.setGameCenterIframe(p.current)},style:{opacity:S?0:1},frameBorder:"0",className:wa["game-iframe"],sandbox:"allow-same-origin allow-top-navigation allow-forms allow-scripts allow-downloads allow-top-navigation-to-custom-protocols",allow:"fullscreen"}),f&&ua(Ka,{shareType:f.shareType,shareLink:f.shareLink,onShareCompelete:g,sharePanelOptions:h.sharePanel})]})]}),y&&u.forceCheckOrientation&&ua(Da,{orientation:Ao.PORTRAIT_PRIMARY,desktopMode:d,onOrientationChange:({isWrong:t})=>{e.isGameInited&&(t?e.pauseGameUI():e.resumeGameUI())}})]})})};var el=p(1239),tl={insert:"head",singleton:!1};va()(el.A,tl);const il=el.A.locals||{};class rl{constructor(e,t,i){this.storyReaderViewModel=e,this.storiesViewer=t,this.backdropRef=i,this.deltaValY=0,this.windowHeight=0,this.swipeUpGestureInAction=!1}get closeGestureInAction(){return Ki.getState()}startMove(){ir(),this.windowHeight=this.storiesViewer.clientHeight,this.storiesViewer.style.setProperty("transition","")}move(e){e>10||this.closeGestureInAction?(tr(),this.moveDownAndScaleReader(e)):(e<-10||this.swipeUpGestureInAction)&&this.moveUp(e)}endMove(){lr(),this.deltaValY>=0?this.handleSwipeDown():this.handleSwipeUp(),ir()}moveDownAndScaleReader(e){this.deltaValY=e/this.windowHeight;let t=1-(1-.9)*this.deltaValY;t>=1&&(t=1);let i=100*this.deltaValY*.45;i<=0&&(i=0),this.storiesViewer.style.setProperty("transform",`scale(${t}) translateY(${i}%)`)}moveUp(e){this.swipeUpGestureInAction=!0,this.deltaValY=e/this.windowHeight}returnToDefaultState(){this.storiesViewer.style.setProperty("transition","all .3s"),this.storiesViewer.style.setProperty("transform","scale(1) translateY(0%)")}closeStoryReader(){this.storiesViewer.style.setProperty("transition","opacity .3s"),this.storiesViewer.style.setProperty("opacity","0"),this.backdropRef.style.setProperty("transition","opacity .3s"),this.backdropRef.style.setProperty("opacity","0"),setTimeout((()=>{this.storyReaderViewModel.close("swipeDown")}),400)}handleSwipeDown(){this.deltaValY<=.15||!this.storyReaderViewModel.canBeClosed()?this.returnToDefaultState():this.closeStoryReader()}handleSwipeUp(){mt.emit("swipeController.swipeUp")}}const sl=e=>{const[,t]=(0,Bo.useState)(0);(0,Bo.useEffect)((()=>{if(!e)return;const i=()=>t((e=>e+1));return e.on("update",i),()=>{e.off("update",i)}}),[e])};!function(){const e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;window.requestAnimationFrame=e}();const nl=function(){let e,t=document.createElement("div"),i={transition:"transitionend",OTransition:"otransitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(i.hasOwnProperty(e)&&void 0!==t.style[e])return i[e]}();function ol(e,t,i){return new Promise((r=>{let s=!1;const n=()=>{s=!0,clearTimeout(a),void 0!==nl&&e.removeEventListener(nl,o),e.style.setProperty("transition",`${t} 0ms`),r()},o=e=>{e.propertyName===t&&(s||n())};void 0!==nl&&e.addEventListener(nl,o,!1);const a=setTimeout((()=>{s||n()}),i+20);e.style.setProperty("transition",`${t} ${i}ms`)}))}class al extends U.EventEmitter{constructor(){super(...arguments),this.timer=null,this.currentProgress=0,this.progressBeforePause=0,this.timerPaused=!1,this.timeout=0,this.isCompleted=!0}get started(){return!this.isCompleted}setTimer(e){0!==e?(this.timer=setTimeout((()=>this.complete({})),e),this.currentProgress=0,this.cancelAnimationFcn=function(e){let t,i;if("performance"in window==0||"now"in window.performance==0){let e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),i=Date.now()-e}else i=performance.now();return t=requestAnimationFrame((function r(s){let n;if(n=(s-i)/e.duration,n>1&&(n=1),e.forceEnd()&&(n=1),!e.paused()){let i=e.timing(n);e.draw(i),n<1&&(t=requestAnimationFrame(r))}})),()=>{cancelAnimationFrame(t)}}({duration:e,timing:e=>e,draw:e=>this.updateProgress(e),paused:()=>this.timerPaused,forceEnd:()=>!1})):this.forceEnd()}start(e){this.stop(),this.progressBeforePause=0,this.timeout=e,this.isCompleted=!1,this.emit("start"),this.setTimer(e)}stop(){this.isCompleted||(this.clearTimer(),this.timerPaused||(this.emit("stop"),this.isCompleted=!0))}pause(){this.isCompleted||(this.timerPaused=!0,this.stop(),this.progressBeforePause=this.currentProgress,this.emit("pause"))}resume(){if(!this.timerPaused)return;this.timerPaused=!1;const e=1-this.progressBeforePause,t=this.timeout*e;this.setTimer(t),this.emit("resume")}cancelAnimation(){var e;null===(e=this.cancelAnimationFcn)||void 0===e||e.call(this)}forceEnd(){this.complete({forceEnd:!0})}complete({forceEnd:e=!1}){this.isCompleted=!0,this.progressBeforePause=0,this.clearTimer(),this.emit("progress",100),this.emit("complete",{forceEnd:e})}clearTimer(){this.cancelAnimation(),null!==this.timer&&(clearTimeout(this.timer),this.timer=null)}updateProgress(e){const t=1-this.progressBeforePause;this.currentProgress=this.progressBeforePause+e*t;const i=100*this.currentProgress;this.emit("progress",i)}}function ll(e,t){e.forEach(t)}function dl(e,t,i){if(!e)throw Error(`${i?i+": ":""}${t}`)}function cl({node:e=[],from:t,source:i,parent:r=t||i,to:s,target:n,child:o=s||n,scope:a={},meta:l={},family:d={type:"regular"},regional:c}={}){const u=Bl(r),h=Bl(d.links),p=Bl(d.owners),f=[];ll(e,(e=>e&&Il(f,e)));const g={id:Pl(),seq:f,next:Bl(o),meta:l,scope:a,family:{type:d.type||"crosslink",links:h,owners:p}};return ll(h,(e=>Il(vl(e),g))),ll(p,(e=>Il(ml(e),g))),ll(u,(e=>Il(e.next,g))),c&&Dl&&Nl(yl(Dl),[g]),g}function ul(e){const t=()=>e();return t.unsubscribe=()=>e(),t}function hl(e,{scope:t,safe:i}={}){dl(t||Zl||i,"scopeBind: scope not found");const r=t||Zl;return t=>{function i(){Yl(o)}let s,n=0;const o=Zl;Yl(r);try{s=e(t)}catch(e){s=e,n=1}if(i(),n)throw s;return s instanceof Promise&&s.then(i,i),s}}function pl({unit:e,fn:t,scope:i,batch:r}){const s=[$l.run({fn:e=>t(e)})];r&&s.unshift($l.compute({priority:"sampler",batch:1})),xl(e)&&s.unshift($l.mov({store:e.stateRef,to:"stack"}));const n=Array.isArray(e)?e:[e];if(i){const e=[],t=i.additionalLinks;return n.forEach((i=>{const r=t[i.graphite.id]||[];t[i.graphite.id]=r;const n=cl({node:fl(s,i),meta:{watchOp:i.kind}});r.push(n),e.push((()=>{const e=r.indexOf(n);-1!==e&&r.splice(e,1),Jl(n)}))})),ul((()=>{e.forEach((e=>e()))}))}{const e=cl({node:s,parent:n,family:{owners:n}});return ul((()=>{Jl(e)}))}}function fl(e,t){return xl(t)?[$l.mov({store:t.stateRef,to:"stack"}),...e]:e}"undefined"!=typeof Symbol&&Symbol.observable;const gl=e=>e.graphite||e,vl=e=>e.family.owners,ml=e=>e.family.links,yl=e=>e.value,wl=e=>e.subscribers,Sl=(e,t)=>gl(e).meta[t],bl=e=>(jl(e)||Fl(e))&&"kind"in e,_l=e=>t=>bl(t)&&t.kind===e,xl=_l("store"),Cl=_l("event"),kl=_l("effect"),Al=e=>bl(e)&&!!e.targetable,Ll=_l("domain"),Ml=_l("scope");var Ol={__proto__:null,unit:bl,store:xl,event:Cl,effect:kl,targetable:Al,domain:Ll,scope:Ml,attached:e=>kl(e)&&1==Sl(e,"attached")};const El=(e,t)=>{const i=e.indexOf(t);-1!==i&&e.splice(i,1)},Il=(e,t)=>e.push(t),Tl=()=>{let e=0;return()=>""+ ++e},Rl=(Tl(),Tl()),Pl=Tl();Tl();let Dl=null;const Nl=(e,t)=>{const i=gl(e);ll(t,(e=>{const t=gl(e);"domain"!==i.family.type&&(t.family.type="crosslink"),Il(vl(t),i),Il(ml(i),t)}))},Bl=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(gl),Fl=e=>"object"==typeof e&&null!==e,jl=e=>"function"==typeof e,Ul=(e,t,i,r)=>{const s={id:Rl(),type:e,data:t};return i&&(s.order={priority:i},r&&(s.order.barrierID=++Vl)),s};let Vl=0;const Gl=({from:e="store",store:t,target:i,to:r=(i?"store":"stack"),batch:s,priority:n})=>Ul("mov",{from:e,store:t,to:r,target:i},n,s),zl=({fn:e,batch:t,priority:i,safe:r=0,filter:s=0,pure:n=0})=>Ul("compute",{fn:e,safe:r,filter:s,pure:n},i,t),Wl=({fn:e})=>zl({fn:e,priority:"effect"}),$l={mov:Gl,compute:zl,filter:({fn:e,pure:t})=>zl({fn:e,filter:1,pure:t}),run:Wl};const Hl=[];let ql=0;for(;ql<6;)Il(Hl,{first:null,last:null,size:0}),ql+=1;new Set;let Zl;const Yl=e=>{Zl=e};const Xl=(e,t)=>{El(e.next,t),El(vl(e),t),El(ml(e),t)},Ql=(e,t,i)=>{let r;e.next.length=0,e.seq.length=0,e.scope=null;let s=ml(e);for(;r=s.pop();)Xl(r,e),(t||i&&"sample"!==e.meta.op||"crosslink"===r.family.type)&&Ql(r,t,"on"!==r.meta.op&&i);for(s=vl(e);r=s.pop();)Xl(r,e),i&&"crosslink"===r.family.type&&Ql(r,t,"on"!==r.meta.op&&i)},Kl=e=>e.clear(),Jl=(e,{deep:t}={})=>{let i=0;if(e.ownerSet&&e.ownerSet.delete(e),xl(e))Kl(wl(e));else if(Ll(e)){i=1;const t=e.history;Kl(t.events),Kl(t.effects),Kl(t.stores),Kl(t.domains)}Ql(gl(e),!!t,i)};cl({node:[Wl({fn:({fn:e,value:t})=>e(t)})],meta:{op:"fx",fx:"sidechain"}});var ed=p(7121),td=p(8139);function id(e,t){const i=Ol.unit(e);let r={};i?r={unit:e}:"@@unitShape"in e?"function"==typeof e["@@unitShape"]?r=e["@@unitShape"]():nd("expect @@unitShape to be a function"):r=e;const s=Array.isArray(r),n=Bo.useRef({stale:1,justSubscribed:0,scope:t}),[o,a,l,d,c]=Bo.useMemo((()=>{n.current.stale=1;const e=Array.isArray(r)?[]:{},s=[],o=[],a=[],l=[];for(const n in r){if(!{}.hasOwnProperty.call(r,n))continue;const d=r[n];Ol.unit(d)||nd(`expect useUnit ${i?"argument":`value in key "${n}"`} to be a unit`),Ol.event(d)||Ol.effect(d)?(e[n]=t?hl(d,{scope:t}):d,a.push(n),l.push(d)):(e[n]=null,s.push(n),o.push(d))}return[e,s,o,a,l]}),[n,t,...Object.keys(r),...Object.values(r)]),u=Bo.useRef({value:o,storeKeys:a,eventKeys:d,eventValues:c}),h=Bo.useCallback((e=>{const i=n.current;return i.justSubscribed=1,pl({unit:l,fn:()=>{i.stale||(i.stale=1,e())},scope:t,batch:1})}),[l,t,u,n]),p=Bo.useCallback((()=>{const e=u.current,r=n.current;let h,p=0;const f=e.value,g=e.storeKeys,v=e.eventKeys,m=e.eventValues,y=t!==r.scope;if(r.stale||r.justSubscribed||y){p=!r.justSubscribed||y,h=s?[...o]:{...o},g.length===a.length&&v.length===d.length||(p=1);for(let e=0;e<a.length;e++){const i=ld(l[e],t),r=a[e];p||(p=g.includes(r)?f[r]!==i:1),h[r]=i}for(let e=0;e<d.length;e++){const t=c[e],i=d[e];p||(p=v.includes(i)?m[v.indexOf(i)]!==t:1)}}return p&&(e.value=h),e.storeKeys=a,e.eventKeys=d,e.eventValues=c,r.stale=0,r.justSubscribed=!p,r.scope=t,i?e.value.unit:e.value}),[h,l,c,t,u,n]);return od(h,p,p)}function rd(e){const t=Bo.useContext(dd);return e&&!t&&nd("No scope found, consider adding <Provider> to app root"),t}function sd(e,t){return id(e,rd(null==t?void 0:t.forceScope))}const nd=e=>{throw Error(e)},{useSyncExternalStore:od}=("undefined"!=typeof window?Bo.useLayoutEffect:Bo.useEffect,td),{useSyncExternalStoreWithSelector:ad}=ed,ld=(e,t)=>t?t.getState(e):e.getState(),dd=Bo.createContext(null),{Provider:cd}=dd,ud=e=>{const t=(0,Bo.useRef)(null),i=(0,Bo.useRef)(null),{desktopMode:r,storyReaderOptions:s}=Ru();(({storyReaderViewModel:e,storiesViewerRef:t,backdropRef:i})=>{const r=(0,Bo.useRef)(null);(0,Bo.useEffect)((()=>{r.current=new rl(e,t.current,i.current)}),[]);const s=()=>{var e;t.current.classList.add(il["no-select"]),null===(e=r.current)||void 0===e||e.startMove()},n=({y:e,lockX:t})=>{var i;t&&(null===(i=r.current)||void 0===i||i.move(e))},o=({lockX:e})=>{var t;e&&(null===(t=r.current)||void 0===t||t.endMove())},a=()=>{t.current.classList.remove(il["no-select"])};(0,Bo.useEffect)((()=>(mt.on("swipeController.startMove",s),mt.on("swipeController.move",n),mt.on("swipeController.endMove",o),mt.on("swipeController.beforeEndMove",a),()=>{mt.off("swipeController.startMove",s),mt.off("swipeController.move",n),mt.off("swipeController.endMove",o),mt.off("swipeController.beforeEndMove",a)})),[])})({storyReaderViewModel:e.storyReaderViewModel,backdropRef:t,storiesViewerRef:i}),sl(e.storyReaderViewModel.activeStory);return ha(ca,{children:[ha("div",{ref:i,className:fa()("stories-viewer",il["stories-viewer"],il.slider3d),style:Object.assign(Object.assign({},{"--loaderBackgroundColor":null===(n=s.loader)||void 0===n?void 0:n.default.color,"--loaderBackgroundAccentColor":null===(o=s.loader)||void 0===o?void 0:o.default.accentColor,"--timelineBlockTopOffset":`${parseFloat(String(s.timelineBlockTopOffset))}px`,"--slideBorderRadius":`${parseFloat(String(s.borderRadius))}px`}),(()=>{var e,t,i,r;return{backgroundColor:null!==(t=null===(e=s.commonBackdrop)||void 0===e?void 0:e.color)&&void 0!==t?t:void 0,backdropFilter:null!==(r=null===(i=s.commonBackdrop)||void 0===i?void 0:i.backdropFilter)&&void 0!==r?r:void 0}})()),children:[r&&ua("div",{className:il["stories-viewer-background"],style:(()=>{var t,i,r;const n=null===(t=e.storyReaderViewModel.activeStory)||void 0===t?void 0:t.displayedSlideImage,o=[];return null!=s.slideBackdrop&&Array.isArray(s.slideBackdrop.linearGradientOverlay)&&o.push(`linear-gradient(${s.slideBackdrop.linearGradientOverlay.join(", ")})`),null!=n&&o.push(`url(${n})`),{backgroundImage:o.join(", "),opacity:(null===(i=s.slideBackdrop)||void 0===i?void 0:i.opacity)||0,filter:(null===(r=s.slideBackdrop)||void 0===r?void 0:r.blur)?`blur(${s.slideBackdrop.blur}px)`:"none"}})()}),e.children]}),ua("div",{ref:t,className:fa()(il["stories-viewer-backdrop"],{[il._desktopMode]:r})})]});var n,o};var hd=p(417),pd={insert:"head",singleton:!1};va()(hd.A,pd);const fd=hd.A.locals||{};var gd=p(6349),vd={insert:"head",singleton:!1};va()(gd.A,vd);const md=gd.A.locals||{};var yd=p(9322),wd={insert:"head",singleton:!1};va()(yd.A,wd);const Sd=yd.A.locals||{},bd=e=>50+parseFloat(String(e)),_d=({story:e,commonOptions:t,storyReaderOptions:i})=>{const{dir:r}=Ru(),s=sd(er),n=!!e.hasLike&&Boolean(t.hasLike),o=e.hasShare,a=!!e.hasFavorite&&Boolean(t.hasFavorite),l=e.hasAudio,d=e.needBottomPanel?bd(i.actionPanelBottomOffset):0;return ua("div",{dir:r,className:Sd["stories-button-panel"],style:{height:`${d}px`,transform:`translateY(${d}px)`},children:e.needBottomPanel&&ha("div",{className:Sd["stories-button-panel-actions"],children:[(()=>{if(!n)return null;const t=0===e.like||-1===e.like,r=0===e.like||1===e.like;return ha("span",{children:[ua("span",{className:fa()(Sd["button-panel-action"],{"like-up":t,"like-up-filled":1===e.like}),dangerouslySetInnerHTML:{__html:t?i.likeButton.svgSrc.baseState:i.likeButton.svgSrc.activeState},onClick:()=>{e.setLike(1===e.like?0:1)}}),ua("span",{className:fa()(Sd["button-panel-action"],{"like-down":r,"like-down-filled":-1===e.like}),dangerouslySetInnerHTML:{__html:r?i.dislikeButton.svgSrc.baseState:i.dislikeButton.svgSrc.activeState},onClick:()=>{e.setDislike(-1===e.like?0:-1)}})]})})(),a&&ua("span",{children:ua("span",{className:fa()(Sd["button-panel-action"],{bookmark:!e.favorite,"bookmark-filled":e.favorite}),dangerouslySetInnerHTML:{__html:e.favorite?i.favoriteButton.svgSrc.activeState:i.favoriteButton.svgSrc.baseState},onClick:()=>e.setBookmark(!e.favorite)})}),ha("span",{className:Sd["right-container"],children:[l&&ua("span",{children:ua("span",{className:fa()(Sd["button-panel-action"],{"muted-icon":s,"sound-icon":!s}),dangerouslySetInnerHTML:{__html:s?i.muteButton.svgSrc.baseState:i.muteButton.svgSrc.activeState},onClick:()=>{s?or():nr()}})}),o&&ua("span",{className:Sd["button-panel-action"],dangerouslySetInnerHTML:{__html:i.shareButton.svgSrc.baseState},onClick:()=>{e.share()}})]})]})})};var xd=p(2208),Cd={insert:"head",singleton:!1};va()(xd.A,Cd);const kd=xd.A.locals||{},Ad=e=>{var t,i;const{dir:r}=Ru(),s=sd(Xi);return ua("div",{className:kd["story-header"],children:!e.closeDisabled&&ua("button",{dir:r,"data-position":e.options.closeButtonPosition,className:fa()(kd["stories-viewer__close"],{[kd["_paused-ui"]]:s}),onClick:t=>{t.stopPropagation(),t.preventDefault(),e.onClose()},dangerouslySetInnerHTML:{__html:null!==(i=null===(t=e.options.closeButton)||void 0===t?void 0:t.svgSrc.baseState)&&void 0!==i?i:""}})})};var Ld=p(9485),Md={insert:"head",singleton:!1};va()(Ld.A,Md);const Od=Ld.A.locals||{};var Ed=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i};const Id=({activeStory:e,desktopMode:t,geometry:i,navigationDisabled:r,widgetManager:s,slideApiHandlers:n})=>{const{dir:o}=Ru(),a="ltr"===o,l=()=>{e.reachStart?mt.emit(`${Os.name}.showPrevStory`):e.prevSlide()},d=()=>{e.reachEnd?mt.emit(`${Os.name}.showNextStory`):e.nextSlide()},c=(e,t=!1)=>{e<=.3?a?l():d():t||(a?d():l())};return{handleSlideClick:o=>{const a=o.target;if(!a)return;if((e=>["narrative-element-link","narrative-element-image","narrative-element-swipe-up"].some((t=>e.classList.contains(t))))(a))return void tn(e,a);if(!((e,t,i,r)=>{const s=e.classList,n={"narrative-element-quiz-next-button":()=>(t.nextSlide(),mt.emit("story.nextSlide"),!1),"narrative-element-test-next-button":()=>(t.prevSlide(),mt.emit("story.nextSlide"),!1),"narrative-element-quiz-answer":()=>nn(e,i),"narrative-element-test-answer":()=>nn(e,i),"narrative-element-data-input":()=>{var t;return null===(t=i.findWidgetByType(Er.name))||void 0===t||t.click(e),!1},rangeslider:()=>!1,"narrative-element-range-slider-next-button":()=>{var t;return null===(t=i.findWidgetByType(Wr.name))||void 0===t||t.click(e),!1},"narrative-element-poll-button":()=>on(e,i),"narrative-element-vote-answer":()=>{var t;return null===(t=i.findWidgetByType(Kr.name))||void 0===t||t.select(e),!1},"narrative-element-rate-input":()=>{var t;return null===(t=i.findWidgetByType(Hr.name))||void 0===t||t.select(e),!1},"narrative-element-copy":()=>{var t;return null===(t=i.findWidgetByType(Mr.name))||void 0===t||t.click(e),!1},"narrative-element-share":()=>{var t;return null===(t=i.findWidgetByType(Zr.name))||void 0===t||t.click(e),!1},"narrative-element-story-repeat":()=>(r.resetStory(t.id),!1)};for(const e of s)if(n[e])return n[e]();return!0})(a,e,s,n))return;let l=!1;for(const e of s.widgets){const t=dn(e);if(t===an.DENY_ALL_CLICKS)return;t===an.DENY_NEXT_CLICK&&(l=!0)}if(r)return;const d=(e=>{var r;let s=0,n=0;return t?(s=parseFloat(i.getWidth()),n=e.nativeEvent.offsetX):(s=i.vw,n=e.nativeEvent.pageX||(null===(r=e.nativeEvent.touches)||void 0===r?void 0:r[0].pageX)),n/s})(o),u=((t,i)=>{const r=s.findWidgetByType(Fr.name);return!!(null==r?void 0:r.firstElement)&&(r.handleRouteClick({direction:t>=.3?"forward":"backward",slideIndex:e.activeSlideIndex,slidesCount:e.slidesCount,onClick:()=>c(t,i)}),!0)})(d,l);u||c(d,l)}}},Td=(e,t="",i="")=>{pr(),xr({link:i,type:e,id:t})};var Rd=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Pd=(e,t)=>Rd(void 0,void 0,void 0,(function*(){const i=Dd();if(!i)throw new Error;try{pr(),ts({id:e}),yield i(t),is({result:!0})}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return;throw e}finally{is({result:!1})}})),Dd=()=>{var e,t;let i=null===(e=navigator.share)||void 0===e?void 0:e.bind(navigator);return!i&&(null===(t=window.parent)||void 0===t?void 0:t.navigator.share)&&(i=window.parent.navigator.share.bind(window.parent.navigator)),i};var Nd=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Bd=e=>Nd(void 0,[e],void 0,(function*({shareId:e,hideElementsSelector:t,slideContent:i,desktopMode:r}){let s=null;try{const n=yield Li(ki.IOS,i,function(e){let t="";return Array.prototype.slice.call(window.document.styleSheets).forEach((i=>{e(i)&&(t+=Array.prototype.slice.call(i.rules).map((e=>e.cssText)).join(""))})),t}((function(){return!0})),t),o={files:[n]};if(s=URL.createObjectURL(n),r)return void Td(me.SlideScreenshot,e,s);yield Pd(e,o)}catch(t){s&&Td(me.SlideScreenshot,e,s)}}));var Fd=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const jd=e=>{const t={};for(const[i,r]of Object.entries(null!=e?e:{}))null!==r&&(t[i]=r);return t},Ud=e=>{const t=({shareId:t,config:i})=>{var r;r={shareId:t,config:i,desktopMode:e.desktopMode},Fd(void 0,[r],void 0,(function*({shareId:e,config:t,desktopMode:i}){var r;null==e&&(e="story-share");const s=jd(t),n=s.url=null!==(r=s.url)&&void 0!==r?r:s.text;try{if(i)return void Td(me.Social,e,n);yield Pd(e,s)}catch(t){Td(me.Social,e,n)}}))},i=({shareId:t,hideElementsSelector:i})=>{const r=e.slideContentRef.current;Bd({shareId:t,hideElementsSelector:i,slideContent:r,desktopMode:e.desktopMode})};(0,Bo.useEffect)((()=>{if(e.state===Ks.Started)return mt.on("storySlide.performShareAction",t),mt.on("storySlide.performScreenShotShareAction",i),()=>{mt.off("storySlide.performShareAction",t),mt.off("storySlide.performScreenShotShareAction",i)}}),[e.state])};var Vd=p(8624),Gd={insert:"head",singleton:!1};va()(Vd.A,Gd);Vd.A.locals;var zd=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i};const Wd=e=>{var{geometry:t}=e,i=zd(e,["geometry"]);const{desktopMode:r}=Ru(),{slideContentRef:s,widgetManager:n,state:o,navigationDisabled:a,isVisible:l,needLoadingAnimation:d,needLoadingMask:c}=(e=>{var t,i,{activeSlideIndex:r,currentStory:s,activeStoryId:n,slidesLoaded:o,currentSlideIndex:a,needSlideInitByFlipping:l}=e,d=Ed(e,["activeSlideIndex","currentStory","activeStoryId","slidesLoaded","currentSlideIndex","needSlideInitByFlipping"]);const[c,u]=sd([er,Qi]),[h,p]=(0,Bo.useState)(Ks.None),f=(0,Bo.useRef)(null),g=(0,Bo.useRef)(new Ns).current,v=(0,Bo.useRef)(new yn(d.slideApi,g,s)).current,[m,y]=(0,Bo.useState)(null);(0,Bo.useLayoutEffect)((()=>{const e=f.current,t=new en(v,d.slideApi.Animation,e,g,d.slideApiHandlers);return t.on("propertyChanged",(({propertyName:e})=>{"state"===e&&p(t.state)})),y(t),()=>{t.destroy(),v.destroy()}}),[]),(0,Bo.useLayoutEffect)((()=>{null==m||m.update({needSlideInitByFlipping:l,slidesLoaded:o,activeStoryId:n,currentStoryId:s.id,activeSlideIndex:r,currentSlideIndex:a})}),[m,l,o,n,s.id,r,a]),(0,Bo.useEffect)((()=>{m&&(u?m.pause():m.resume())}),[m,u,h]),(0,Bo.useEffect)((()=>{m&&(c?m.mute():m.unmute())}),[m,c,h]),(0,Bo.useEffect)((()=>(null==m||m.on("start",d.onSlideStarted),()=>{null==m||m.off("start",d.onSlideStarted)})),[m,d.onSlideStarted]);const w=h===Ks.Loading||h===Ks.Error||!o,S=h===Ks.Loading||h===Ks.Error||!o;return{slideContentRef:f,widgetManager:v,state:h,navigationDisabled:null===(t=null==m?void 0:m.isNavigationDisabled)||void 0===t||t,needLoadingMask:w,isVisible:null!==(i=null==m?void 0:m.isVisible)&&void 0!==i&&i,needLoadingAnimation:S}})(Object.assign(Object.assign({},i),{activeStoryId:i.activeStory.id}));Ud({slideContentRef:s,desktopMode:r,state:o});const{handleSlideClick:u}=Id({slideApiHandlers:i.slideApiHandlers,activeStory:i.activeStory,desktopMode:r,geometry:t,widgetManager:n,navigationDisabled:a});return ha("div",{onClick:e=>{e.preventDefault(),e.stopPropagation(),i.clickDisabled||u(e)},className:`${Od["stories-slide"]} ${Od[`_position_${i.currentSlideIndex+1}`]} ${fa()({[Od["_with-bottom-panel"]]:i.needBottomPanel,[Od["_desktop-mode"]]:r})}`,children:[ua("div",{className:Od["stories-slide-offset"],style:{margin:t.getOffset(),width:t.getWidth(),height:t.getHeight(),"--y-offset":t.getOffsetY(),"--x-offset":t.getOffsetX()},children:ua("div",{className:Od["stories-slide-box"],"data-testid":"stories-slide-box",children:ua("div",{ref:s,dangerouslySetInnerHTML:{__html:i.slideHtml},className:`${Od["stories-slide-content"]} narrative-slide"`,style:{fontSize:t.getFontSize(),opacity:1}})})}),c&&ua("div",{className:Od["load-mask"],children:d&&ua("div",{className:Od["loading-spinner-default"]})})]})};var $d=p(5196),Hd={insert:"head",singleton:!1};va()($d.A,Hd);const qd=$d.A.locals||{},Zd=(0,Bo.forwardRef)(((e,t)=>{const{desktopMode:i,dir:r}=Ru(),s=sd(Xi);return ua("div",{ref:t,dir:r,className:fa()(qd["stories-pager"],{[qd["_desktop-mode"]]:i,[qd["_paused-ui"]]:s}),children:ua("div",{className:`${qd["stories-pager__ticks"]} ${fa()({[qd.hiddenTimeline]:e.hiddenTimeline})}`,children:new Array(e.slidesLength).fill(0).map(((t,i)=>ha("div",{className:qd["stories-pager__tick"],children:[ua("div",{className:fa()(qd["stories-pager__tick-progress"],{[qd._active]:i+1<=e.activeSlide})}),ua("div",{className:qd["stories-pager__tick-progress-loader"],style:{display:i+1===e.activeSlide+1?"block":"none"}})]},i+1)))})})}));var Yd=p(5729),Xd=p.n(Yd),Qd=p(1869),Kd=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Jd=e=>{const t=(0,Bo.useRef)(null),i=(0,Bo.useRef)(null),r=(0,Bo.useRef)(0),s=(0,Bo.useRef)(0);let n;const o=()=>{i.current&&(s.current=-1*function(e){const t=window.getComputedStyle(e),i=t.transform||t.webkitTransform||t.mozTransform;if("none"===i)return{x:0,y:0,z:0};const r=i.includes("3d")?"3d":"2d",s=i.match(/matrix.*\((.+)\)/)[1].split(", ");return"2d"===r?{x:isNaN(s[4])?0:s[4],y:isNaN(s[5])?0:s[5],z:0}:"3d"===r?{x:isNaN(s[12])?0:s[12],y:isNaN(s[13])?0:s[13],z:isNaN(s[14])?0:s[14]}:{x:0,y:0,z:0}}(i.current).x)},[a,l]=(0,Bo.useState)(!1),[d,c]=(0,Bo.useState)(!1),u=(0,Bo.useRef)(!1),h=()=>{const t=Bo.Children.count(e.children);return i.current&&t?i.current.scrollWidth/t:0};let p=!1;(0,Bo.useEffect)((()=>{var e;return("ontouchstart"in window||window.navigator.msPointerEnabled||"ontouchstart"in document.documentElement)&&(p=!0),p||(i.current&&(n=null===(e=i.current.children[0])||void 0===e?void 0:e.offsetWidth),i.current&&(r.current=i.current.scrollWidth-i.current.clientWidth,o()),r.current===s.current?c(!1):c(!0),0===s.current?l(!1):l(!0)),()=>{}}),[]);const f=(0,Bo.useRef)(!1),g=(0,Bo.useRef)(0);let v=0;const m=(0,Bo.useRef)(!1),[y,w]=(0,Bo.useState)(0),S=e=>{e<0&&(e=0),e>r.current&&(e=r.current),w(e)};(0,Bo.useEffect)((()=>{y===r.current?c(!1):c(!0),l(0!==y)}),[y]);const b=e=>{if(!u.current)if(f.current){const t=e instanceof MouseEvent?e.pageX:e.touches&&e.touches[0].pageX;if(t!==g.current){m.current=!0,v=t;const e=g.current-v,i=s.current+e;S(i)}}else m.current=!1},_=e=>{m.current&&e.preventDefault(),setTimeout((()=>{m.current=!1})),f.current=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",_)};return ha(ec,{cssStyle:e.style,children:[ua(tc,{ref:t,onMouseDown:e=>{u.current||(e.preventDefault(),f.current=!0,g.current=e.pageX,i.current&&(r.current=i.current.scrollWidth-i.current.clientWidth),i.current&&o(),document.addEventListener("mousemove",b),document.addEventListener("mouseup",_))},onTouchStart:e=>{u.current||(e.preventDefault(),f.current=!0,g.current=e.touches&&e.touches[0].pageX,i.current&&(r.current=i.current.scrollWidth-i.current.clientWidth),i.current&&o(),document.addEventListener("touchmove",b),document.addEventListener("touchend",_))},onClickCapture:e=>{m.current&&(e.preventDefault(),e.stopPropagation())},children:ua(ic,{ref:i,style:{transform:`translateX(${-1*y}px)`},children:e.children})}),!p&&ha(ca,{children:[ua(sc,{position:rc.LEFT,show:a,onClick:()=>Kd(void 0,void 0,void 0,(function*(){if(u.current)return;o();const e=s.current-h();S(e),u.current=!0,i.current&&(yield ol(i.current,"transform",300)),u.current=!1})),children:ua("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:ua("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),ua(sc,{position:rc.RIGHT,show:d,onClick:()=>Kd(void 0,void 0,void 0,(function*(){if(u.current)return;o();const e=s.current+h();S(e),u.current=!0,i.current&&(yield ol(i.current,"transform",300)),u.current=!1})),children:ua("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:ua("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})})})]})]})},ec=Xd()("div")({position:"relative"},(e=>Object.assign({},e.cssStyle))),tc=Xd().div`
36
+ */var r=i(9155),s=i(8139);var n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=s.useSyncExternalStore,a=r.useRef,l=r.useEffect,d=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,i,r,s){var u=a(null);if(null===u.current){var h={hasValue:!1,value:null};u.current=h}else h=u.current;u=d((function(){function e(e){if(!l){if(l=!0,o=e,e=r(e),void 0!==s&&h.hasValue){var t=h.value;if(s(t,e))return a=t}return a=e}if(t=a,n(o,e))return t;var i=r(e);return void 0!==s&&s(t,i)?t:(o=e,a=i)}var o,a,l=!1,d=void 0===i?null:i;return[function(){return e(t())},null===d?void 0:function(){return e(d())}]}),[t,i,r,s]);var p=o(e,u[0],u[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),c(p),p}},8139:(e,t,i)=>{"use strict";e.exports=i(4026)},7121:(e,t,i)=>{"use strict";e.exports=i(4965)},8384:e=>{"use strict";e.exports=n},1869:e=>{"use strict";e.exports=l},5729:e=>{"use strict";e.exports=a},5136:e=>{"use strict";e.exports=i},3107:e=>{"use strict";e.exports=r},992:e=>{"use strict";e.exports=o},2840:t=>{"use strict";t.exports=e},9780:e=>{"use strict";e.exports=c},9155:e=>{"use strict";e.exports=s},2265:e=>{"use strict";e.exports=d},7315:e=>{"use strict";e.exports=t}},h={};function p(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={id:e,loaded:!1,exports:{}};return u[e].call(i.exports,i,i.exports,p),i.loaded=!0,i.exports}p.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return p.d(t,{a:t}),t},p.d=(e,t)=>{for(var i in t)p.o(t,i)&&!p.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),p.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},p.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),p.nc=void 0;var f={};return(()=>{"use strict";p.r(f),p.d(f,{CloseButtonPosition:()=>j,FavoriteStoryList:()=>Ch,GoodsWidgetRenderingType:()=>re,IASContainer:()=>Tu,SharePageEvents:()=>ft,StoriesListCardCoverQuality:()=>q,StoriesListCardTitlePosition:()=>H,StoriesListCardTitleTextAlign:()=>$,StoriesListCardViewVariant:()=>W,StoriesListDirection:()=>Z,StoryList:()=>_h,StoryManager:()=>co,StoryReaderSwipeStyle:()=>J,UGCStoryList:()=>xh,storyManager:()=>go});p(5845);var e=p(2840);class t extends Error{constructor(e){super(`Invalid language tag: ${e}. The "lang" value must be comply with the RFC 5646 (also known as BCP 47). Examples of valid language tags include "en-US", "fr-FR", "es-ES", etc.`)}}const i="en-US";class r{constructor(e=i){const t=this.normalizeAndEnsureCompatibility(e),r=this.validateTag(t);this.parseTag(r)}isValidTag(e){return/^[a-z]+-[a-zA-Z]+$/.test(e)}toString(){return this.tag}normalizeAndEnsureCompatibility(e){const t=e.toLowerCase();return this.ensureBackwardCompatibility(t)}ensureBackwardCompatibility(e){var t;return null!==(t={ru:"ru-RU",en:"en-US"}[e])&&void 0!==t?t:e}validateTag(e){return this.isValidTag(e)?e:(console.error(new t(e).message),this.getNavigatorTag())}getNavigatorTag(){const e=navigator.language.toLowerCase();return this.isValidTag(e)?e:(console.error(`Invalid navigator language tag: ${e}`),i)}parseTag(e){const[t,i]=e.split("-");this.languageCode=t,this.countryCode=i.toUpperCase(),this.tag=`${this.languageCode}-${this.countryCode}`}}const s={apiKey:"",disableStatistic:!1,disableDeviceId:!1,lang:new r};var n=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i};const o=(0,e.createStore)(s),a=(0,e.createEvent)();o.on(a,((e,t)=>{var{disableStatistic:i,disableDeviceId:s}=t,o=n(t,["disableStatistic","disableDeviceId"]);return Object.assign(Object.assign({disableStatistic:null!=i?i:e.disableStatistic,disableDeviceId:null!=s?s:e.disableDeviceId},o),{lang:new r(o.lang)})}));const l=(0,e.createEvent)();o.on(l,((e,{tags:t})=>Object.assign(Object.assign({},e),{tags:t})));const d=(0,e.createEvent)();o.on(d,((e,{userId:t})=>Object.assign(Object.assign({},e),{userId:t})));const c=(0,e.createEvent)();o.on(c,((e,{placeholders:t})=>Object.assign(Object.assign({},e),{placeholders:t})));const u=(0,e.createEvent)();o.on(u,((e,{imagePlaceholders:t})=>Object.assign(Object.assign({},e),{imagePlaceholders:t})));const h=(0,e.createEvent)();o.on(h,((e,{lang:t})=>Object.assign(Object.assign({},e),{lang:new r(t)})));const g=(0,e.createStore)(""),v=(0,e.createEvent)();(0,e.sample)({clock:v,target:g});const m=(0,e.createStore)({session:{id:"",expire_in:0},server_timestamp:0,content_base_url:"",user_key:"",share:!1,is_allow_profiling:!1,cache:[],placeholders:[],image_placeholders:[],editor:null,storyWidgetsResources:[],is_allow_ugc:!1}),y=(0,e.createEffect)();m.on(y.doneData,((e,t)=>t));const w=(0,e.createEvent)(),S=(0,e.createEvent)();m.on(S,(e=>{const t=Object.assign({},e);return t.session.id="",t}));const b=(0,e.createEffect)((e=>{N("session/update",e,(()=>{}))})).prepend((e=>({data:[[5,0,...e]]})));var _=p(7315);class x{static createFunctionWithTimeout(e,t){let i=!1;function r(){i||(i=!0,e())}return setTimeout(r,t||1e3),r}static convertModelToFormData(e,t,i){t instanceof Object&&Object.keys(t).forEach((r=>{const s=t[r];if(s instanceof Object&&!Array.isArray(s))return this.convertModelToFormData(e,s,r);i&&(r=`${i}[${r}]`),Array.isArray(s)?s.forEach((t=>{e.append(`${r}[]`,t)})):e.append(r,s)}))}}const C=e=>null==e;function k(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)}function A(e,t){return Object.assign(Object.assign({},e),t)}function L(e){return e.replace(/^\//,"")}const M={baseUrl:"https://sdk.inappstory.ru",apiUrl:"https://api.inappstory.ru",faviconApiUrl:"https://favicon.inappstory.ru"};function O(e){if(e.length>32)try{const t=function(e){const t=(e=e.replace(new RegExp("-","g"),"+").replace(new RegExp("_","g"),"/")).length;return e=function(e,t,i){return void 0===t?e:t.length>=e.length?t:i?(e+t).slice(-e.length):(t+e).substring(0,e.length)}(new Array(t%4).fill("=").join(""),e,!1),window.atob(e)}(e),i=t.charCodeAt(13);if(i>0){let e=t.substr(14,i);e=e.replace(/\0+$/,"");const r="{QQN{xuV?1Dv16j3";let s=r,n=0;for(;s.length<i;)s+=r[n],n++,n===r.length&&(n=0);let o="";for(let t=0;t<i;t++)o+=String.fromCharCode(e.charCodeAt(t)^s.charCodeAt(t));return new URL(`https://${o}`).host}}catch(e){console.error(e)}return null}function E(e){const t=O(e);if(null!=t){const e=t.split(".").slice(1);M.baseUrl=`https://${["sdk",...e].join(".")}`,M.faviconApiUrl=`https://${["favicon",...e].join(".")}`,M.apiUrl=`https://${t}`}}function I(e){let t=e.length;for(let i=e.length-1;i>=0;i--){const r=e.charCodeAt(i);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&i--}return t}class T{constructor(){return this._sdkConfigIsIncorrect=!1,this._userIdByteLimit=255,this._tagsByteLimit=4e3,this.userMessage="",this.tagsMessage="",T.instance||(T.instance=this),T.instance}static getInstance(){return T.instance?T.instance:new T}get sdkConfigIsIncorrect(){return this._sdkConfigIsIncorrect}get sdkConfigErrorsAsArray(){const e=[];return this.userMessage&&e.push(this.userMessage),this.tagsMessage&&e.push(this.tagsMessage),e}checkUserIdLength(e){this.userMessage="",null!=e&&I(String(e))>this._userIdByteLimit&&(console.error(`UserId is bigger then ${this._userIdByteLimit} bytes`),this._sdkConfigIsIncorrect=!0,this.userMessage=`UserId "${String(e)}" is bigger then ${this._userIdByteLimit} bytes`)}checkTagsLength(e){this.tagsMessage="",null!=e&&Array.isArray(e)&&I(e.join(","))>this._tagsByteLimit&&(console.error(`Tags (joined by ',') is bigger then ${this._tagsByteLimit} bytes`),this._sdkConfigIsIncorrect=!0,this.tagsMessage=`Tags (joined by ',') "${e.join(",")}" is bigger then ${this._tagsByteLimit} bytes`)}}var R=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const P=`InAppStoryWebSDK/${parseInt(501)} ${navigator.userAgent}`;const D=new class{constructor(){this._deviceInfoPromise=null,this._baseHeaders={},this.requestInterceptors=[],this.interceptors={request:{use:e=>{this.requestInterceptors.push(e)}}}}set deviceInfoPromise(e){this._deviceInfoPromise=e}set baseHeaders(e){this._baseHeaders=e}get baseURL(){return`${M.apiUrl}/v2/`}request(e){return R(this,void 0,void 0,(function*(){return new Promise(((t,i)=>{const r=()=>R(this,void 0,void 0,(function*(){try{if(k(e.headers)&&null!=e.headers||(e.headers={}),e.headers=A(this._baseHeaders,e.headers),this.requestInterceptors.length)for(const t of this.requestInterceptors)t(e);let i="";!C(e.params)&&k(e.params)&&(i=new URLSearchParams(Object.entries(e.params)).toString());let r=new URL(`${L(e.url)}${i?"?"+i:""}`,this.baseURL),s="get";C(e.method)||(s=e.method);let n={};!C(e.headers)&&k(e.headers)&&(n=e.headers);let o=null;!C(e.data)&&k(e.data)&&(o=JSON.stringify(e.data),n["Content-Type"]="application/json");try{if(T.getInstance().sdkConfigIsIncorrect)return void t({data:{name:"SDK config is incorrect",message:T.getInstance().sdkConfigErrorsAsArray.join(". "),status:400},headersRaw:{},headers:{},status:400,statusText:"SDK config is incorrect",ok:!1})}catch(e){console.error(e)}const a=yield fetch(r.toString(),{method:s,body:o,headers:n,credentials:"omit"}),l=yield a.json();t({data:l,headersRaw:a.headers,headers:Object.fromEntries([...a.headers]),status:a.status,statusText:a.statusText,ok:a.ok})}catch(e){i(e)}}));this._deviceInfoPromise?this._deviceInfoPromise.finally(r):r()}))}))}post(e,t){return R(this,void 0,void 0,(function*(){return this.request({method:"post",url:e,data:t})}))}get(e,t){return R(this,void 0,void 0,(function*(){return this.request({method:"get",url:e,params:t})}))}};function N(e,t,i){var r,s,n;if("sendBeacon"in navigator){const a=new URLSearchParams({access_token:o.getState().apiKey,session_id:null===(s=null===(r=m.getState())||void 0===r?void 0:r.session)||void 0===s?void 0:s.id,x_user_agent:P}),l=o.getState();null!=l.appPackageId&&a.append("x_app_package_id",l.appPackageId);const d=`${n=D.baseURL,n.replace(/\/$/,"")}/${L(e)}?${a.toString()}`,c=new FormData;Object.keys(t).forEach((e=>{x.convertModelToFormData(c,t[e],e)}));let u=!1;null!=Array.from&&null!=c.keys&&(u=0===Array.from(c.keys()).length),u||navigator.sendBeacon(d,c),i()}else D.post(e,t).then((()=>i()),(()=>i()))}D.interceptors.request.use((e=>{var t,i,r;const s=o.getState();return e.headers=A(null!==(t=e.headers)&&void 0!==t?t:{},{Authorization:`Bearer ${s.apiKey}`,"Accept-Language":s.lang||"en","Auth-Session-Id":null===(r=null===(i=m.getState())||void 0===i?void 0:i.session)||void 0===r?void 0:r.id,"X-Device-Id":g.getState(),"X-User-Id":s.userId?s.userId:"","X-Request-Id":(0,_.v4)(),"X-User-Agent":P}),null!=s.appPackageId&&(e.headers["X-App-Package-Id"]=s.appPackageId),s.disableDeviceId||(e.headers["X-Device-Id"]=g.getState()),e}));const B=D;var F;!function(e){e.UPDATE="update"}(F||(F={}));Error;var j,U=p(46),V=p.n(U);!function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(j||(j={}));const G={hasFavorite:!1,hasLike:!1,hasShare:!1,closeButtonPosition:j.END,loader:{default:{color:"white",accentColor:"transparent"},custom:null},closeButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M30 15.2115C30 23.4958 23.2843 30.2115 15 30.2115C6.71573 30.2115 0 23.4958 0 15.2115C0 6.92728 6.71573 0.211548 15 0.211548C23.2843 0.211548 30 6.92728 30 15.2115Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.8309 10.0424C10.0969 9.77646 10.5281 9.77646 10.7941 10.0424L15 14.2483L19.2059 10.0424C19.4719 9.77646 19.9031 9.77646 20.1691 10.0424C20.4351 10.3084 20.4351 10.7397 20.1691 11.0057L15.9632 15.2115L20.1691 19.4174C20.4351 19.6834 20.4351 20.1147 20.1691 20.3807C19.9031 20.6466 19.4719 20.6466 19.2059 20.3807L15 16.1748L10.7941 20.3807C10.5281 20.6466 10.0969 20.6466 9.8309 20.3807C9.56492 20.1147 9.56492 19.6834 9.8309 19.4174L14.0368 15.2115L9.8309 11.0057C9.56492 10.7397 9.56492 10.3084 9.8309 10.0424Z" fill="#C2C2C4"/>\n</svg>'}},forceDesktopMode:void 0};var z,W,$,H,q,Z,Y;!function(e){e.CENTER="center",e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(z||(z={})),function(e){e.CIRCLE="circle",e.QUAD="quad",e.RECTANGLE="rectangle"}(W||(W={})),function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end",e.CENTER="center"}($||($={})),function(e){e.CARD_INSIDE_BOTTOM="cardInsideBottom",e.CARD_OUTSIDE_TOP="cardOutsideTop",e.CARD_OUTSIDE_BOTTOM="cardOutsideBottom"}(H||(H={})),function(e){e.Medium="medium",e.High="high"}(q||(q={})),function(e){e.COLUMN="vertical",e.ROW="horizontal"}(Z||(Z={})),function(e){e.START_LOADER="startLoad",e.END_LOADER="endLoad"}(Y||(Y={}));const X={direction:Z.ROW,card:{title:{font:'14px/1.2 system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',color:"#ffffff",padding:15,textAlign:$.START,position:H.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:q.High,variant:W.CIRCLE,border:{radius:0,color:"black",width:2,gap:3,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null,opened:{border:{radius:null,color:null,width:null,gap:null,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null},coverLazyLoading:!1},favoriteCard:{title:{content:"Избранное",font:"normal",color:"#000",padding:15,textAlign:$.START,position:H.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:q.High,coverLazyLoading:!1,variant:W.CIRCLE,border:{radius:0,color:"black",width:2,gap:3,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null,opened:{border:{radius:null,color:null,width:null,gap:null,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null}},sidePadding:20,topPadding:20,bottomPadding:20,bottomMargin:17,layout:{height:0,backgroundColor:"transparent",sliderAlign:z.START},navigation:{speed:300,showControls:!1,controlsSize:48,controlsBackgroundColor:"white",controlsColor:"black"},ugcCard:{title:{content:null,font:'14px/1.2 system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',color:"#000",padding:15,textAlign:$.START,position:H.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:q.High,coverLazyLoading:!1,variant:W.CIRCLE,border:{radius:0,color:"transparent",width:0,gap:0,gradient:null},boxShadow:null,dropShadow:null,opacity:null,mask:{color:null,linearGradient:null},svgMask:null,image:{svgSrc:{baseState:'<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M50 85.5C69.6061 85.5 85.5 69.6061 85.5 50C85.5 30.3939 69.6061 14.5 50 14.5C30.3939 14.5 14.5 30.3939 14.5 50C14.5 69.6061 30.3939 85.5 50 85.5Z" stroke="white" stroke-width="2"/>\n<path d="M50.5 34.5V65.5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M34.5 49.5H65.5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}},backgroundColor:"#0c62f3"}},Q={label:"X",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" viewBox="0 0 195 195" xmlns="http://www.w3.org/2000/svg">\n<g transform="matrix(.20227 0 0 .20302 -71 -26.7)">\n<circle cx="834.3" cy="610.6" r="481.3" stroke="#fff" strokeMiterlimit="10"/>\n<path d="m537.8 331.8 230 307.6-231.4 250.1h52.2l202.6-219 163.8 219h177.3l-243-324.9 215.5-232.8h-52l-187 201.7-150.7-201.7zm76.6 38.4h81.5l359.7 481h-81.5z" fill="#fff"/>\n</g>\n</svg>\n'}},getUrl:({url:e,text:t})=>`https://twitter.com/share?url=${e}&text=${t}`},K={targets:["vk","ok","facebook","x","linkedin","telegram"],targetParams:{vk:{label:"VK",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">\n<circle cx="24" cy="24" r="21.3" fill="#fff"/>\n<path d="M22.3.7a23.3 23.3 0 0 0-5 45.6A23.4 23.4 0 0 0 30.7 1.7C28 .8 25.2.6 22.3.7Zm1.8 14.5c1.2.1 1.8.3 2 .6l.3.6c.2.4.2.8 0 4.3 0 2.2 0 2.9.2 3.4s.7.8 1.1.6a8 8 0 0 0 1.8-2 29 29 0 0 0 3-5.8c.3-.4.5-.7.8-.8h7.1a.7.7 0 0 1 .5.8c0 .7-.8 2.2-2 4a92.7 92.7 0 0 1-3.5 4.8c-.3.5-.2 1 .2 1.6l1.4 1.4c1.8 1.7 2.6 2.6 3.3 3.6.4.7.6 1.2.5 1.7 0 .2-.2.5-.5.6-.4.2-.9.2-3.7.3H34l-.5-.1c-1-.4-1.8-1-3.5-3-.9-1-1.6-1.5-2-1.5-.5 0-1 .6-1.3 1.3-.1.5-.2.8-.2 1.7-.1 1-.2 1.2-.8 1.5H22a9.5 9.5 0 0 1-4.2-1.4c-1.9-1.1-3-2.2-4.4-3.8a48.7 48.7 0 0 1-7.2-12.5c-.1-.5 0-.9.5-1l3-.1h3c.5.3.7.5 1 1.4L16 22c.5.9 1 1.6 1.5 2 .6.6.9.7 1.3.7.3 0 .4-.1.6-.6.5-1 .6-4.8.1-6.3-.2-.8-.6-1.1-1.7-1.3-.2 0-.2-.2 0-.4.4-.6 1.1-.9 2.6-1H24Z" fill="#45668E"/>\n</svg>'}},getUrl:({url:e,text:t})=>`https://vk.com/share.php?url=${e}&title=${t}`},facebook:{label:"Facebook",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" viewBox="126.4 2.3 589 589" xmlns="http://www.w3.org/2000/svg">\n<circle cx="420.9" cy="296.8" r="294.5" fill="#3c5a9a"/>\n<path d="M516.7 92.7h-65.2c-38.8 0-81.8 16.3-81.8 72.4.2 19.5 0 38.3 0 59.3h-44.8v71.3h46.2V501h84.8V294.4h56l5-70.2h-62.4V184c0-22.2 23-21 24.4-21h37.8V92.8z" fill="#fff"/>\n</svg>\n'}},getUrl:({url:e,text:t})=>`https://www.facebook.com/sharer.php?u=${e}&t=${t}`},x:Q,twitter:Q,linkedin:{label:"LinkedIn",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" enableBackground="new 0 0 550 550" version="1.1" viewBox="0 0 550 550" xmlSpace="preserve" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink">\n<circle cx="275" cy="275" r="256" fill="#04689B"/>\n<path d="m219.2 366.5h-38.8v-124.3h38.8v124.3zm-20.4-139.9h-0.3c-14.1 0-23.2-9.5-23.2-21.6 0-12.3 9.4-21.6 23.7-21.6s23.1 9.3 23.4 21.5c0.1 12.2-9 21.7-23.6 21.7zm175.8 139.9h-44v-64.3c0-16.8-6.9-28.3-22-28.3-11.6 0-18 7.7-21 15.2-1.1 2.7-0.9 6.4-0.9 10.2v67.3h-43.7s0.6-113.9 0-124.3h43.6v19.5c2.6-8.5 16.5-20.7 38.8-20.7 27.6 0 49.3 17.9 49.3 56.4v69z" fill="#fff"/>\n</svg>\n'}},getUrl:({url:e,text:t})=>`https://www.linkedin.com/sharing/share-offsite/?url=${e}&title=${t}`},telegram:{label:"Telegram",icon:{svgSrc:{baseState:'<svg data-v-05f1b0f5="" data-v-b5b60290="" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50px" height="50px"><defs data-v-05f1b0f5=""><linearGradient data-v-05f1b0f5="" id="a" x1="120" y1="240" x2="120" gradientUnits="userSpaceOnUse"><stop data-v-05f1b0f5="" offset="0" stop-color="#1d93d2"></stop><stop data-v-05f1b0f5="" offset="1" stop-color="#38b0e3"></stop></linearGradient></defs><circle data-v-05f1b0f5="" cx="120" cy="120" r="120" fill="url(#a)"></circle><path data-v-05f1b0f5="" d="m81.2 128.8 14.3 39.4s1.7 3.7 3.7 3.7 30.2-29.5 30.2-29.5l31.5-61-79.2 37.2Z" fill="#c8daea"></path><path data-v-05f1b0f5="" d="m100.1 138.9-2.7 29s-1.2 9 7.7 0 17.4-15.7 17.4-15.7" fill="#a9c6d8"></path><path data-v-05f1b0f5="" d="m81.5 130.2-29.3-9.6s-3.5-1.4-2.4-4.6c.3-.7.7-1.2 2.1-2.2C58.4 109.3 172 68.4 172 68.4s3.2-1 5.1-.3a2.8 2.8 0 0 1 2 2 9.4 9.4 0 0 1 .2 2.6l-.2 2.6c-.7 11.1-21.4 94.4-21.4 94.4s-1.2 5-5.7 5a8.1 8.1 0 0 1-5.9-2.2 797.1 797.1 0 0 0-45.5-32.2 1.3 1.3 0 0 1-.5-.9c-.1-.4.4-1 .4-1s52.4-46.6 53.8-51.5c.1-.4-.3-.6-.8-.4C150 87.8 89.6 125.9 83 130a3.2 3.2 0 0 1-1.5 0Z" fill="#fff"></path></svg>\n'}},getUrl:({url:e,text:t})=>`https://t.me/share/url?url=${e}&text=${t}`},ok:{label:"OK",icon:{svgSrc:{baseState:'\n<svg width="50px" height="50px" viewBox="0 0 388.4 387.1" xmlSpace="preserve" xmlns="http://www.w3.org/2000/svg">\n<path d="M331.7 330.2a194.2 193.5 0 0 1-273.9 1.1 194.2 193.5 0 0 1-2.6-272.9A194.2 193.5 0 0 1 329 54.2a194.2 193.5 0 0 1 5.7 273" fill="#faab62" style="mixBlendMode:normal"/>\n<path d="m328.7 327.1a189.2 188.5 0 0 1-266.9 1.2 189.2 188.5 0 0 1-2.5-266 189.2 188.5 0 0 1 266.7-4 189.2 188.5 0 0 1 5.6 265.9" fill="#f7931e" style="mixBlendMode:normal"/>\n<g fill="#fff" style="mixBlendMode:normal">\n<path d="m217.4 253.5c28-5.7 44.7-19 45.6-19.7a19 19 0 0 0-23.8-29.6c-0.2 0.1-18 13.8-47.5 13.8a84.5 84.5 0 0 1-47.8-13.8 19 19 0 0 0-23.8 29.6c1 0.7 18.4 14.3 47.1 19.9l-40 41.9a19 19 0 1 0 27.3 26.3l37.2-39.6 41 39.9a19 19 0 1 0 26.9-26.9z"/>\n<path transform="translate(-1.8 .2)" d="m194.5 57.9a69.9 69.9 0 1 0 0 139.8 69.9 69.9 0 0 0 0-139.8zm0 98.8a28.9 28.9 0 1 1 0-57.8 28.9 28.9 0 0 1 0 57.8z" style="mixBlendMode:normal"/>\n</g>\n</svg>\n'}},getUrl:({url:e,text:t})=>`https://connect.ok.ru/offer?url=${e}&title=${t}`}},copyButton:{label:"Copy link",svgSrc:{baseState:'<svg width="31.5px" height="35px" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 20"><path d="M6.6 0a2 2 0 0 0-2 2v12c0 1.2.9 2 2 2h9a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2h-9Zm0 2h9v12h-9V2Z" fill="currentColor"/><path d="M2.6 20a2 2 0 0 1-2-2V5h2v13h10v2h-10Z" fill="currentColor"/></svg>'}},downloadButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor"><path d="M31 22a1 1 0 0 0-1 1v7H2v-7a1 1 0 0 0-2 0v8c0 .6.4 1 1 1h30c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"/><path d="M15.3 23.7c.4.4 1 .4 1.4 0l7-6.9c.4-.4.4-1 0-1.4a1 1 0 0 0-1.4 0L17 20.6V1a1 1 0 0 0-2 0v19.6l-5.3-5.2a1 1 0 0 0-1.4 0 1 1 0 0 0 0 1.4l7 7z"/></g></svg>'}},title:{favicon:{background:"white",display:!0},getValue:({url:e})=>e},background:"#202125",borderRadius:20,divider:{background:"#36373b"},text:{color:"white",font:"inherit"}};var J;!function(e){e.FLAT="flat",e.COVER="cover",e.CUBE="cube"}(J||(J={}));const ee={gameReaderOptions:{loader:{default:{color:"white",accentColor:"transparent"},custom:null}},scrollStyle:J.FLAT,timelineBlockTopOffset:8,actionPanelBottomOffset:0,borderRadius:12,loader:{default:{color:"white",accentColor:"transparent"},custom:null},recycleStoriesList:!1,closeOnLastSlideByTimer:!0,sharePanel:K,commonBackdrop:{color:"rgba(51, 51, 51, 1)",backdropFilter:null},slideBackdrop:{opacity:.56,blur:30,linearGradientOverlay:["rgba(0, 0, 0, 0.1) 0%","rgba(0, 0, 0, 0.9) 100%"]},faviconApiUrl:"",navigation:{prevButton:{svgSrc:{baseState:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.8076 6.80761L9.20101 17.4142L7.7868 16L18.3934 5.3934L19.8076 6.80761Z" fill="currentColor" />\n <path d="M18.3934 26.6066L7.7868 16L9.20101 14.5858L19.8076 25.1924L18.3934 26.6066Z" fill="currentColor" />\n </svg>'}},nextButton:{svgSrc:{baseState:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12.1924 25.1924L22.799 14.5858L24.2132 16L13.6066 26.6066L12.1924 25.1924Z" fill="currentColor" />\n <path d="M13.6066 5.3934L24.2132 16L22.799 17.4142L12.1924 6.80761L13.6066 5.3934Z" fill="currentColor" />\n </svg>'}}},likeButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.96277 15.177L8.11552 15.1837C8.75334 15.1873 9.26846 15.7054 9.26846 16.3433V22.7329C9.26846 23.376 8.74519 23.8962 8.10215 23.8925L6.94939 23.8859C6.31157 23.8822 5.79645 23.3641 5.79645 22.7263V16.3366C5.79645 15.6936 6.31972 15.1733 6.96277 15.177Z" stroke="white" stroke-width="1.21546"/>\n<path d="M11.2546 15.0917L11.3801 23.0645C11.3867 23.4802 11.6013 23.8648 11.9516 24.0886C12.119 24.1955 12.4834 24.2735 12.4834 24.2735L13.1084 24.3569L13.9973 24.4541L15.9789 24.5912L17.4834 24.6365H18.9642L19.282 24.6229C19.7715 24.6018 20.258 24.5358 20.7354 24.4256L21.1038 24.3406C21.3122 24.2925 21.516 24.2263 21.7128 24.1428L21.7439 24.1295C22.0493 23.9999 22.3342 23.8269 22.59 23.6157L22.717 23.5108C22.873 23.382 23.0108 23.2326 23.1265 23.0666L23.1451 23.04C23.2426 22.9003 23.3217 22.7485 23.3804 22.5886L23.428 22.4586C23.5278 22.1867 23.5473 21.8918 23.4842 21.6092L23.4296 21.3645C23.4285 21.3594 23.4265 21.3544 23.4237 21.3499C23.4102 21.3285 23.4163 21.3002 23.4374 21.2862L23.7911 21.0504V21.0504C23.8452 21.0143 23.8957 20.9723 23.9416 20.9263V20.9263C23.99 20.8728 24.0444 20.8083 24.0805 20.7458L24.1361 20.6625C24.2924 20.3945 24.3931 20.0167 24.4083 19.7069L24.4118 19.6352C24.4205 19.458 24.4079 19.2804 24.3744 19.1062L24.3305 18.8986C24.325 18.8696 24.2749 18.7163 24.2611 18.6902L24.1718 18.5154C24.1644 18.5014 24.1898 18.473 24.1898 18.473L24.3653 18.2658C24.4983 18.1109 24.6033 17.9305 24.673 17.7386C24.7222 17.6035 24.7532 17.4657 24.775 17.3153L24.7889 17.1764L24.7957 17.0468C24.8164 16.8366 24.7978 16.6244 24.7409 16.421C24.6929 16.2496 24.6183 16.0868 24.5198 15.9385L24.1983 15.4542C24.1843 15.4367 24.1808 15.413 24.1891 15.3922L24.3081 15.1055C24.3652 14.9628 24.4224 14.6641 24.4391 14.4717L24.4307 14.2984C24.4026 14.0113 24.2405 13.6815 24.0757 13.4238L23.9912 13.3055C23.7236 12.9608 23.3474 12.7334 22.9388 12.5804L22.706 12.4932C22.3923 12.3758 22.0667 12.3327 21.7279 12.2916L21.3444 12.2597C20.89 12.2378 20.2444 12.2651 19.7945 12.3327L18.1092 12.5861C18.1014 12.5873 18.0935 12.5879 18.0857 12.5879H18.0692C17.991 12.5879 17.9276 12.5245 17.9276 12.4462C17.9276 12.4387 17.9282 12.4312 17.9293 12.4238L18.1222 11.3847L18.5408 9.72426C18.6303 9.39087 18.6888 9.04995 18.7158 8.70582L18.7581 8.1657C18.7857 7.81269 18.746 7.45764 18.6411 7.11944L18.6144 7.03332C18.52 6.72899 18.3649 6.44697 18.1583 6.20434L18.1116 6.14941C17.819 5.80563 17.4249 5.56351 16.9859 5.45788L16.7169 5.39313C16.4437 5.32739 16.1567 5.3518 15.8986 5.46269C15.6593 5.56548 15.4564 5.73766 15.316 5.95699L15.2994 5.98302C15.155 6.20866 15.0783 6.47094 15.0783 6.73882V7.10777C15.0783 7.45352 15.0109 7.79596 14.88 8.11598L14.1668 9.85969C13.9176 10.4691 13.6196 11.0573 13.2758 11.6188L12.5778 12.7586C12.4514 12.9651 12.3013 13.1561 12.1306 13.3278L12.0855 13.3731C11.6243 13.837 11.3317 14.442 11.2546 15.0917Z" stroke="white" stroke-width="1.21546"/>\n</svg>',activeState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.96277 15.1771L8.11552 15.1838C8.75334 15.1875 9.26846 15.7056 9.26846 16.3434V22.733C9.26846 23.3761 8.74519 23.8964 8.10215 23.8926L6.94939 23.886C6.31157 23.8823 5.79645 23.3642 5.79645 22.7264V16.3368C5.79645 15.6937 6.31972 15.1734 6.96277 15.1771Z" fill="white" stroke="white" stroke-width="1.21546"/>\n<path d="M11.2546 15.0918L11.3801 23.0646C11.3867 23.4803 11.6013 23.8649 11.9516 24.0888C12.119 24.1957 12.4834 24.2737 12.4834 24.2737L13.1084 24.357L13.9973 24.4542L15.9789 24.5913L17.4834 24.6367H18.9642L19.282 24.623C19.7715 24.6019 20.258 24.5359 20.7354 24.4257L21.1038 24.3407C21.3122 24.2926 21.516 24.2264 21.7128 24.1429L21.7439 24.1297C22.0493 24.0001 22.3342 23.827 22.59 23.6158L22.717 23.5109C22.873 23.3821 23.0108 23.2327 23.1265 23.0668L23.1451 23.0401C23.2426 22.9004 23.3217 22.7487 23.3804 22.5887L23.428 22.4588C23.5278 22.1868 23.5473 21.892 23.4842 21.6093L23.4296 21.3647C23.4285 21.3595 23.4265 21.3545 23.4237 21.3501C23.4102 21.3286 23.4163 21.3004 23.4374 21.2863L23.7911 21.0505V21.0505C23.8452 21.0144 23.8957 20.9724 23.9416 20.9265V20.9265C23.99 20.8729 24.0444 20.8084 24.0805 20.7459L24.1361 20.6626C24.2924 20.3946 24.3931 20.0168 24.4083 19.707L24.4118 19.6353C24.4205 19.4581 24.4079 19.2805 24.3744 19.1063L24.3305 18.8987C24.325 18.8697 24.2749 18.7165 24.2611 18.6904L24.1718 18.5155C24.1644 18.5015 24.1898 18.4732 24.1898 18.4732L24.3653 18.2659C24.4983 18.1111 24.6033 17.9306 24.673 17.7387C24.7222 17.6036 24.7532 17.4658 24.775 17.3154L24.7889 17.1765L24.7957 17.0469C24.8164 16.8367 24.7978 16.6245 24.7409 16.4211C24.6929 16.2497 24.6183 16.0869 24.5198 15.9386L24.1983 15.4543C24.1843 15.4368 24.1808 15.4131 24.1891 15.3923L24.3081 15.1056C24.3652 14.9629 24.4224 14.6642 24.4391 14.4718L24.4307 14.2985C24.4026 14.0114 24.2405 13.6817 24.0757 13.4239L23.9912 13.3056C23.7236 12.9609 23.3474 12.7336 22.9388 12.5805L22.706 12.4934C22.3923 12.3759 22.0667 12.3329 21.7279 12.2918L21.3444 12.2598C20.89 12.2379 20.2444 12.2652 19.7945 12.3329L18.1092 12.5863C18.1014 12.5874 18.0935 12.588 18.0857 12.588H18.0692C17.991 12.588 17.9276 12.5246 17.9276 12.4464C17.9276 12.4389 17.9282 12.4313 17.9293 12.4239L18.1222 11.3849L18.5408 9.72438C18.6303 9.391 18.6888 9.05007 18.7158 8.70594L18.7581 8.16582C18.7857 7.81281 18.746 7.45776 18.6411 7.11956L18.6144 7.03344C18.52 6.72911 18.3649 6.4471 18.1583 6.20446L18.1116 6.14953C17.819 5.80575 17.4249 5.56363 16.9859 5.458L16.7169 5.39325C16.4437 5.32751 16.1567 5.35192 15.8986 5.46281C15.6593 5.5656 15.4564 5.73778 15.316 5.95711L15.2994 5.98314C15.155 6.20878 15.0783 6.47106 15.0783 6.73895V7.10789C15.0783 7.45364 15.0109 7.79608 14.88 8.1161L14.1668 9.85982C13.9176 10.4692 13.6196 11.0574 13.2758 11.6189L12.5778 12.7588C12.4514 12.9652 12.3013 13.1562 12.1306 13.3279L12.0855 13.3732C11.6243 13.8371 11.3317 14.4421 11.2546 15.0918Z" fill="white" stroke="white" stroke-width="1.21546"/>\n</svg>'}},dislikeButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M24.2033 13.6632C24.2033 14.3062 23.68 14.8265 23.037 14.8228L21.8842 14.8161C21.2464 14.8125 20.7313 14.2944 20.7313 13.6565V7.2669C20.7313 6.62385 21.2546 6.10359 21.8976 6.1073L23.0504 6.11395C23.6882 6.11762 24.2033 6.63572 24.2033 7.27355V13.6632Z" stroke="white" stroke-width="1.21547"/>\n<path d="M18.7451 14.9082L18.6196 6.93531C18.6131 6.51965 18.3984 6.13499 18.0481 5.91118C17.8808 5.80428 17.5164 5.72628 17.5164 5.72628L16.8914 5.64295L16.0025 5.54572L14.0208 5.4086L12.5164 5.36328H11.0356L10.7178 5.37695C10.2283 5.398 9.74173 5.46403 9.26432 5.57421L8.89596 5.65921C8.68758 5.7073 8.4838 5.7735 8.28695 5.85706L8.25581 5.87027C7.95049 5.99987 7.66551 6.17296 7.40975 6.38416L7.28278 6.48901C7.12677 6.61783 6.989 6.76725 6.87323 6.93318L6.85466 6.95981C6.75716 7.09955 6.67809 7.25128 6.6194 7.41124L6.57172 7.54119C6.47196 7.81311 6.45245 8.10797 6.51553 8.39066L6.57011 8.63528C6.57127 8.64045 6.57329 8.64539 6.5761 8.64989C6.58951 8.67134 6.58343 8.69958 6.56238 8.71361L6.20864 8.94944V8.94944C6.15453 8.98551 6.10408 9.0275 6.05811 9.07348V9.07348C6.00973 9.12703 5.95532 9.19155 5.91922 9.25403L5.86366 9.33737C5.70735 9.60533 5.60662 9.98309 5.59145 10.2929L5.58794 10.3646C5.57927 10.5418 5.59182 10.7194 5.62532 10.8937L5.66922 11.1012C5.6748 11.1302 5.72484 11.2835 5.73866 11.3096L5.82792 11.4845C5.83532 11.4984 5.80994 11.5268 5.80994 11.5268L5.63444 11.734C5.50143 11.8889 5.3965 12.0693 5.32674 12.2612C5.27758 12.3964 5.24658 12.5341 5.22478 12.6846L5.21089 12.8235L5.20405 12.953C5.18333 13.1632 5.20192 13.3755 5.25887 13.5788C5.30686 13.7503 5.38145 13.9131 5.47991 14.0614L5.80147 14.5456C5.81547 14.5631 5.81898 14.5868 5.81066 14.6076L5.69163 14.8944C5.63456 15.037 5.57739 15.3357 5.56065 15.5282L5.5691 15.7014C5.5972 15.9885 5.75924 16.3183 5.92402 16.576L6.00853 16.6943C6.2762 17.039 6.65231 17.2664 7.06099 17.4194L7.2938 17.5066C7.60742 17.624 7.93309 17.6671 8.27189 17.7082L8.65531 17.7401C9.10973 17.762 9.75538 17.7347 10.2053 17.6671L11.8906 17.4137C11.8984 17.4125 11.9062 17.4119 11.9141 17.4119H11.9305C12.0088 17.4119 12.0722 17.4753 12.0722 17.5536C12.0722 17.5611 12.0716 17.5686 12.0704 17.576L11.8775 18.6151L11.459 20.2756C11.3695 20.6089 11.3109 20.9499 11.284 21.294L11.2417 21.8341C11.214 22.1871 11.2537 22.5422 11.3586 22.8804L11.3853 22.9665C11.4797 23.2708 11.6349 23.5528 11.8414 23.7955L11.8882 23.8504C12.1808 24.1942 12.5749 24.4363 13.0138 24.5419L13.2829 24.6067C13.556 24.6724 13.8431 24.648 14.1012 24.5371C14.3404 24.4343 14.5434 24.2622 14.6837 24.0428L14.7004 24.0168C14.8448 23.7912 14.9215 23.5289 14.9215 23.261V22.892C14.9215 22.5463 14.9888 22.2039 15.1197 21.8838L15.8329 20.1401C16.0821 19.5308 16.3801 18.9425 16.7239 18.381L17.4219 17.2412C17.5483 17.0347 17.6984 16.8437 17.8691 16.6721L17.9142 16.6267C18.3755 16.1629 18.668 15.5578 18.7451 14.9082Z" stroke="white" stroke-width="1.21547"/>\n</svg>',activeState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M24.2035 13.6629C24.2035 14.3059 23.6803 14.8262 23.0372 14.8225L21.8845 14.8158C21.2466 14.8122 20.7315 14.2941 20.7315 13.6562V7.26655C20.7315 6.62348 21.2548 6.10322 21.8978 6.10693L23.0506 6.11358C23.6884 6.11725 24.2035 6.63535 24.2035 7.27319V13.6629Z" fill="white" stroke="white" stroke-width="1.21547"/>\n<path d="M18.7454 14.9079L18.6199 6.93496C18.6133 6.51929 18.3987 6.13463 18.0484 5.91082C17.881 5.80392 17.5166 5.72592 17.5166 5.72592L16.8916 5.64258L16.0027 5.54536L14.021 5.40824L12.5166 5.36292H11.0358L10.718 5.37659C10.2285 5.39764 9.74192 5.46367 9.26451 5.57384L8.89614 5.65885C8.68776 5.70694 8.48398 5.77314 8.28713 5.8567L8.25599 5.86991C7.95066 5.99951 7.66569 6.1726 7.40992 6.3838L7.28295 6.48865C7.12694 6.61747 6.98917 6.7669 6.8734 6.93283L6.85483 6.95946C6.75733 7.0992 6.67826 7.25093 6.61957 7.41088L6.57189 7.54084C6.47212 7.81276 6.45262 8.10762 6.5157 8.39032L6.57028 8.63494C6.57143 8.64011 6.57346 8.64505 6.57627 8.64954C6.58968 8.671 6.5836 8.69923 6.56255 8.71327L6.2088 8.9491C6.1547 8.98517 6.10425 9.02716 6.05827 9.07314C6.0099 9.12669 5.95549 9.19121 5.91938 9.25369L5.86383 9.33703C5.70751 9.60499 5.60678 9.98276 5.59161 10.2926L5.58811 10.3643C5.57943 10.5415 5.59198 10.7191 5.62549 10.8933L5.66938 11.1009C5.67496 11.1299 5.72501 11.2831 5.73883 11.3092L5.82808 11.4841C5.83549 11.4981 5.8101 11.5264 5.8101 11.5264L5.63461 11.7337C5.50159 11.8886 5.39666 12.069 5.3269 12.2609C5.27775 12.396 5.24674 12.5338 5.22494 12.6842L5.21105 12.8231L5.20421 12.9527C5.18349 13.1629 5.20208 13.3751 5.25903 13.5785C5.30702 13.7499 5.38161 13.9128 5.48007 14.061L5.80163 14.5453C5.81564 14.5628 5.81915 14.5865 5.81082 14.6073L5.69179 14.894C5.63472 15.0367 5.57755 15.3354 5.56081 15.5279L5.56926 15.7011C5.59737 15.9882 5.7594 16.318 5.92419 16.5757L6.0087 16.694C6.27636 17.0387 6.65248 17.2661 7.06116 17.4191L7.29397 17.5063C7.6076 17.6237 7.93327 17.6668 8.27207 17.7079L8.65549 17.7398C9.10991 17.7617 9.75557 17.7344 10.2055 17.6668L11.8908 17.4134C11.8986 17.4122 11.9064 17.4116 11.9143 17.4116H11.9307C12.009 17.4116 12.0724 17.4751 12.0724 17.5533C12.0724 17.5608 12.0718 17.5683 12.0706 17.5757L11.8777 18.6148L11.4592 20.2753C11.3697 20.6087 11.3111 20.9496 11.2842 21.2937L11.2419 21.8339C11.2142 22.1869 11.2539 22.5419 11.3588 22.8801L11.3855 22.9662C11.4799 23.2706 11.6351 23.5526 11.8416 23.7952L11.8884 23.8502C12.181 24.1939 12.5751 24.4361 13.014 24.5417L13.2831 24.6064C13.5562 24.6722 13.8433 24.6478 14.1014 24.5369C14.3407 24.4341 14.5436 24.2619 14.6839 24.0426L14.7006 24.0166C14.845 23.7909 14.9217 23.5286 14.9217 23.2607V22.8918C14.9217 22.546 14.989 22.2036 15.1199 21.8836L15.8331 20.1399C16.0824 19.5305 16.3803 18.9422 16.7241 18.3808L17.4221 17.2409C17.5486 17.0344 17.6987 16.8434 17.8694 16.6718L17.9144 16.6264C18.3757 16.1626 18.6683 15.5575 18.7454 14.9079Z" fill="white" stroke="white" stroke-width="1.21547"/>\n</svg>'}},favoriteButton:{svgSrc:{baseState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.49976 7.25225V23.2366C7.49976 24.6882 9.33429 25.321 10.2292 24.1782L13.7974 19.6218C14.4088 18.8411 15.5907 18.8411 16.2021 19.6218L19.7703 24.1782C20.6652 25.321 22.4998 24.6882 22.4998 23.2366V7.25225C22.4998 5.98711 21.4742 4.96152 20.209 4.96152H9.79048C8.52535 4.96152 7.49976 5.98712 7.49976 7.25225Z" stroke="white" stroke-width="1.29808"/>\n</svg>',activeState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.49976 7.04073V23.0251C7.49976 24.4767 9.33429 25.1095 10.2292 23.9667L13.7974 19.4103C14.4088 18.6296 15.5907 18.6296 16.2021 19.4103L19.7703 23.9667C20.6652 25.1095 22.4998 24.4766 22.4998 23.0251V7.04072C22.4998 5.77559 21.4742 4.75 20.209 4.75H9.79048C8.52535 4.75 7.49976 5.77559 7.49976 7.04073Z" fill="white" stroke="white" stroke-width="1.29808"/>\n</svg>'}},muteButton:{svgSrc:{baseState:'<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M3.40625 13.5734V18.7664C3.40625 19.7239 4.18245 20.5001 5.13993 20.5001H8.04633C8.6342 20.5001 9.17511 20.8213 9.45654 21.3374L11.903 25.8242C12.271 26.4992 12.9783 26.9192 13.7471 26.9192C14.9072 26.9192 15.8477 25.9788 15.8477 24.8187V7.52486C15.8477 6.36469 14.9072 5.42416 13.747 5.42412C12.9783 5.42409 12.2709 5.84393 11.9028 6.51875L9.45651 11.0026C9.17509 11.5184 8.63442 11.8394 8.04683 11.8394H5.14027C4.1826 11.8394 3.40625 12.6157 3.40625 13.5734Z" fill="white"/>\n<path d="M19.8477 13.0466L26.0976 19.2966M26.0976 13.0466L19.8477 19.2966" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>',activeState:'<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M3.40625 12.5733V17.7663C3.40625 18.7238 4.18245 19.5 5.13993 19.5H8.04633C8.6342 19.5 9.17511 19.8212 9.45654 20.3373L11.903 24.8241C12.271 25.4991 12.9783 25.919 13.7471 25.9191C14.9072 25.9191 15.8477 24.9787 15.8477 23.8186V6.52474C15.8477 5.36457 14.9072 4.42404 13.747 4.424C12.9783 4.42397 12.2709 4.84381 11.9028 5.51863L9.45651 10.0025C9.17509 10.5183 8.63442 10.8392 8.04683 10.8392H5.14027C4.1826 10.8392 3.40625 11.6156 3.40625 12.5733Z" fill="white"/>\n<path d="M19.8477 11.4215C20.6323 12.4661 21.0972 13.7645 21.0972 15.1715C21.0972 16.5785 20.6323 17.8769 19.8477 18.9215M22.3472 6.78613C24.6487 8.84608 26.0972 11.8396 26.0972 15.1715C26.0972 18.5034 24.6487 21.4969 22.3472 23.5569" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>'}},shareButton:{svgSrc:{baseState:'<svg width="30" height="31" viewBox="0 0 30 31" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 10.9038C20.8488 10.9038 21.9423 9.81036 21.9423 8.46151C21.9423 7.11266 20.8488 6.01921 19.5 6.01921C18.1512 6.01921 17.0577 7.11266 17.0577 8.46151C17.0577 9.81036 18.1512 10.9038 19.5 10.9038ZM19.5 12.2115C21.5711 12.2115 23.25 10.5326 23.25 8.46151C23.25 6.39045 21.5711 4.71151 19.5 4.71151C17.4289 4.71151 15.75 6.39045 15.75 8.46151C15.75 8.98692 15.8581 9.48709 16.0531 9.94101L12.288 12.4511C11.6202 11.8367 10.7288 11.4615 9.74976 11.4615C7.67869 11.4615 5.99976 13.1404 5.99976 15.2115C5.99976 17.2826 7.67869 18.9615 9.74976 18.9615C10.7325 18.9615 11.6269 18.5835 12.2956 17.9649L16.018 20.5665C15.8451 20.9977 15.75 21.4685 15.75 21.9615C15.75 24.0326 17.4289 25.7115 19.5 25.7115C21.5711 25.7115 23.25 24.0326 23.25 21.9615C23.25 19.8904 21.5711 18.2115 19.5 18.2115C18.3369 18.2115 17.2974 18.7411 16.6096 19.5722L13.0138 17.0591C13.3231 16.5138 13.4998 15.8833 13.4998 15.2115C13.4998 14.5368 13.3216 13.9037 13.0097 13.3567L16.667 10.9185C17.3545 11.7106 18.3688 12.2115 19.5 12.2115ZM12.1921 15.2115C12.1921 16.5604 11.0986 17.6538 9.74976 17.6538C8.40091 17.6538 7.30745 16.5604 7.30745 15.2115C7.30745 13.8627 8.40091 12.7692 9.74976 12.7692C11.0986 12.7692 12.1921 13.8627 12.1921 15.2115ZM21.9423 21.9615C21.9423 23.3104 20.8488 24.4038 19.5 24.4038C18.1512 24.4038 17.0577 23.3104 17.0577 21.9615C17.0577 20.6127 18.1512 19.5192 19.5 19.5192C20.8488 19.5192 21.9423 20.6127 21.9423 21.9615Z" fill="white"/>\n</svg>'}}};var te;!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"}(te||(te={}));const ie={title:{content:"Favorite",font:"1.4rem/1.2 InternalPrimaryFont",color:"white",backgroundColor:"#333333"},headerTopOffset:0,bottomOffset:0,backgroundColor:"#333333"};var re,se=p(2743),ne=p.n(se);!function(e){e.DEFAULT="default",e.CUSTOM_CARD="customCard"}(re||(re={}));const oe={goodsWidgetRenderingType:re.DEFAULT,goodsList:{renderingType:re.DEFAULT,closeBackgroundColor:"#000000",substrateHeight:200,substrateColor:"#FFFFFF",dimColor:"rgba(0, 0, 0, 0.5)"},goodsCard:{mainTextColor:"#000000",oldPriceTextColor:"#CCCCCC",imageBackgroundColor:"transparent",imageCornerRadius:8},openGoodsWidgetHandler:e=>Promise.resolve(e),loader:{default:{color:"gray",accentColor:"transparent"}}},ae={loader:{default:{color:"white",accentColor:"transparent"},custom:null},backdropColor:"#1a1a1a",backdrop:{opacity:1,background:"#1a1a1a"},game:{backdropColor:"rgb(51, 51, 51)"},forceDesktopMode:G.forceDesktopMode,forceCheckOrientation:!0};class le extends U.EventEmitter{constructor(){super(),this._commonOptions=G,this._storiesListOptions=X,this._storyReaderOptions=ee,this._storyFavoriteReaderOptions=ie,this._goodsWidgetOptions=oe,this._gameReaderOptions=ae}setCommonOptions(e,t=!0){return this._commonOptions=ne()(this._commonOptions,e),this.emit(F.UPDATE,this.commonOptions),this}get commonOptions(){return this._commonOptions}setStoriesListOptions(e,t=!0){return this._storiesListOptions=ne()(this._storiesListOptions,e),t&&this.emit(F.UPDATE,this.storiesListOptions),this}get storiesListOptions(){return this._storiesListOptions}setStoryReaderOptions(e,t=!0){return this._storyReaderOptions=ne()(this._storyReaderOptions,e,{arrayMerge:(e,t,i)=>t}),t&&this.emit(F.UPDATE,{storyReaderOptions:this.storyReaderOptions,gameReaderOptions:this.gameReaderOptions,appearanceCommon:this.commonOptions}),this}get storyReaderOptions(){const e={closeButtonPosition:this.commonOptions.closeButtonPosition,closeButton:this.commonOptions.closeButton,loader:this.commonOptions.loader};return Object.assign(Object.assign({},e),this._storyReaderOptions)}setStoryFavoriteReaderOptions(e,t=!0){return this._storyFavoriteReaderOptions=ne()(this._storyFavoriteReaderOptions,e),t&&this.emit(F.UPDATE,this.storyFavoriteReaderOptions),this}get storyFavoriteReaderOptions(){const e={closeButtonPosition:this.commonOptions.closeButtonPosition,closeButton:this.commonOptions.closeButton};return Object.assign(Object.assign({},e),this._storyFavoriteReaderOptions)}setGoodsWidgetOptions(e,t=!0){return this._goodsWidgetOptions=ne()(this._goodsWidgetOptions,e),t&&this.emit(F.UPDATE,this.goodsWidgetOptions),this}get goodsWidgetOptions(){return this._goodsWidgetOptions}setGameReaderOptions(e,t=!0){return this._gameReaderOptions=ne()(this._gameReaderOptions,e),t&&this.emit(F.UPDATE,this.gameReaderOptions),this}get gameReaderOptions(){const e={closeButtonPosition:this.commonOptions.closeButtonPosition,closeButton:this.commonOptions.closeButton,loader:this.commonOptions.loader,forceDesktopMode:this.commonOptions.forceDesktopMode};return Object.assign(Object.assign({},e),this._gameReaderOptions)}}class de extends U.EventEmitter{constructor(e,t){super(),this.iframe=e,this.origin=t,this.messageListener=this.messageListener.bind(this),window.addEventListener("message",this.messageListener,!1)}messageListener(e){if(e.origin!==this.origin)return;const[t,...i]=e.data;try{if(!Array.isArray(e.data))throw new Error(`Invalid MessageEvent data format ${e.data}`);this.emit(t,...i)}catch(e){console.error(e)}}sendMessage(e,t){var i;null===(i=this.iframe.contentWindow)||void 0===i||i.postMessage([e,t],this.origin)}destroy(){window.removeEventListener("message",this.messageListener,!1),this.removeAllListeners()}}var ce,ue=p(1580),he=p.n(ue);class pe{constructor(e,t,i){this.userKey=e,this.gameInstanceId=t,this.instanceUserData=i}set(e){return window.localStorage.setItem(this.key,JSON.stringify(e)),e}get(){var e;let t={};const i=he()(this.instanceUserData)?this.instanceUserData:{};try{const i=JSON.parse(null!==(e=window.localStorage.getItem(this.key))&&void 0!==e?e:"{}");he()(i)&&(t=i)}catch(e){console.error(e)}return ne()(t,i)}get key(){return`game_instance_data_${this.userKey}_${this.gameInstanceId}`}}class fe{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const{id:t,callback:i}=JSON.parse(e),r=this.gameReaderViewModel.gameLaunch;if(!r)return;const s=new pe(r.clientConfig.userKey,r.config.gameInstanceId,r.instanceUserData).get();this.gameCenterMessageService.sendMessage("cb",{cb:i,arguments:JSON.stringify([t,JSON.stringify(s)])})}}!function(e){e.StartGame="startGame",e.GameComplete="gameComplete",e.GameInstanceEvent="gameInstanceEvent",e.OpenUrl="openUrl",e.SendApiRequest="sendApiRequest",e.StorySetLocalData="storySetLocalData",e.GameInstanceSetLocalData="gameInstanceSetLocalData",e.OpenSharePanel="openSharePanel"}(ce||(ce={}));class ge{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const{gameInstanceId:t,data:i}=JSON.parse(e),r=this.gameReaderViewModel.gameLaunch;if(!r)return;const s=new pe(r.clientConfig.userKey,r.config.gameInstanceId,r.instanceUserData).set(i);this.gameReaderViewModel.emit(ce.GameInstanceSetLocalData,{data:JSON.stringify(s)})}}var ve=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};var me,ye,we,Se,be,_e,xe,Ce=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};!function(e){e.Social="social",e.SlideScreenshot="slide-screenshot"}(me||(me={}));class ke{constructor(e,t,i){this.gameCenterMessageService=e,this.gameReaderViewModel=t,this.desktopMode=i}handle(e,t){return Ce(this,void 0,void 0,(function*(){var i,r,s;let n=null!==(i=null==t?void 0:t.url)&&void 0!==i?i:t.text,o=[];t.files&&Array.isArray(t.files)&&t.files.length>0&&(o=yield Promise.all(t.files.map((e=>(e=>ve(void 0,[e],void 0,(function*({file:e,name:t,type:i}){const r=yield fetch(`data:${i};base64,${e}`),s=yield r.blob();return new File([s],t,{type:i,lastModified:(new Date).getTime()})})))(e)))));const a={url:null!=n?n:void 0,files:o.length>0?o:void 0,text:null!==(r=t.text)&&void 0!==r?r:void 0,title:null!==(s=t.title)&&void 0!==s?s:void 0};if(!(a.files&&a.files.length>0||a.url))return void this.gameReaderViewModel.confirmSharingComplete({shareId:e,isSuccess:!1});let l=navigator.share;if(!navigator.share&&window.parent&&window.parent.navigator.share&&(l=window.parent.navigator.share),!this.desktopMode&&l)try{if(!l)return;l(a).then((()=>this.gameReaderViewModel.confirmSharingComplete({shareId:e,isSuccess:!0}))).catch((()=>this.gameReaderViewModel.confirmSharingComplete({shareId:e,isSuccess:!1})))}catch(t){console.error(t),this.openSharePanel({shareConfig:a,sharePath:n,shareId:e})}else this.openSharePanel({shareConfig:a,sharePath:n,shareId:e})}))}openSharePanel({shareConfig:e,sharePath:t,shareId:i}){let r=me.Social,s=t;e.files&&e.files.length>0&&(r=me.SlideScreenshot,s=URL.createObjectURL(e.files[0])),this.gameReaderViewModel.emit(ce.OpenSharePanel,{shareId:i,shareType:r,shareLink:s})}}class Ae{constructor(e){this.storyId=e}set(e){sessionStorage.setItem(this.key,JSON.stringify(e))}get(){var e;const t=null!==(e=sessionStorage.getItem(this.key))&&void 0!==e?e:"{}";return window.__activeNarrativeId?JSON.parse(t):{}}get key(){return`narrative_${this.storyId}_data`}}class Le{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const t=JSON.parse(e);if(!he()(t))return;const{id:i,storyId:r,callback:s}=t;let n=new Ae(r).get();this.gameCenterMessageService.sendMessage("cb",{cb:s,arguments:JSON.stringify([i,JSON.stringify(n)])})}}class Me{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const t=JSON.parse(e);if(!he()(t))return;const{storyId:i,data:r,sendToServer:s}=t;new Ae(i).set(r),s&&this.gameReaderViewModel.emit(ce.StorySetLocalData,{storyId:i,data:JSON.stringify(r)})}}!function(e){e.direct="direct",e.onboarding="onboarding",e.list="list",e.favorite="favorite"}(ye||(ye={})),function(e){e[e.default=0]="default",e[e.favorite=1]="favorite"}(we||(we={})),function(e){e[e.default=0]="default",e[e.onboarding=1]="onboarding",e[e.favorite=2]="favorite",e[e.direct=3]="direct"}(Se||(Se={})),function(e){e.list="list",e.favorite="favorite"}(be||(be={})),function(e){e.CLICK_ON_STORY="clickOnStoryLink"}(_e||(_e={})),function(e){e.TEXT="text",e.IMAGE="image"}(xe||(xe={}));var Oe=p(3142),Ee=p.n(Oe);const Ie=(0,e.createStore)({default:{},user:{}}),{sdkPlaceholdersChanged:Te,addDefaultPlaceholders:Re}=(0,e.createApi)(Ie,{sdkPlaceholdersChanged:(e,t)=>({default:e.default,user:t}),addDefaultPlaceholders:(e,t)=>{let i={default:{},user:e.user};return Ee()(t)&&t.forEach((e=>{he()(e)&&void 0!==e.name&&void 0!==e.default_value&&(i.default[e.name]=e.default_value)})),i}});var Pe=p(3655),De=p.n(Pe),Ne=p(8138),Be=p.n(Ne),Fe=p(986),je=p.n(Fe);const Ue=(0,e.createStore)({default:{},user:{}}),{sdkImagePlaceholdersChanged:Ve,addDefaultImagePlaceholders:Ge}=(0,e.createApi)(Ue,{sdkImagePlaceholdersChanged:(e,t)=>({default:e.default,user:t}),addDefaultImagePlaceholders:(e,t)=>{let i={default:{},user:e.user};return Ee()(t)&&t.forEach((e=>{he()(e)&&void 0!==e.name&&void 0!==e.default_value&&(i.default[e.name]=e.default_value)})),i}}),ze=(e,t,i,r)=>!(!e||t||i)&&(console.error(`Cannot open hidden story id ${r}`),!0),We=(e,t,i)=>{var r;e.isDeeplink?$e(e,t,i):(null===(r=t.gameInstance)||void 0===r?void 0:r.id)?He(e,t,i):qe(e,t,i)},$e=(e,t,i)=>{e.isDeeplink=!0,i.eventPublisher.emit("clickOnStoryDeepLink",e)},He=(e,t,i)=>{var r;i.eventPublisher.emit("clickOnStoryGame",{id:t.id,gameInstanceId:null===(r=t.gameInstance)||void 0===r?void 0:r.id})},qe=(e,t,i)=>{const r={index:e.index,isDeeplink:!1,id:e.id,listType:Se.default,windowReferer:we.default};t.isFavoriteCard?i.eventPublisher.emit("clickOnFavoriteCellInternal",r):t.isUgcCard?i.eventPublisher.emit("clickOnUgcCardCellInternal",r):i.eventPublisher.emit("clickOnStoryInternal",r),i.eventPublisher.emit("clickOnStory",e)};var Ze;!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.UGC=1]="UGC"}(Ze||(Ze={}));const Ye=e=>({id:e,type:Ze.DEFAULT,title:null,title_color:null,background:null,background_color:null,image:null,display_to:null,display_from:null,slides_html:[],slides_screenshot_share:[],slides_duration:[],favorite:null,like:null,slides_count:0,deeplink:null,hide_in_reader:null,disable_close:null,like_functional:null,favorite_functional:null,share_functional:null,is_opened:null,tags:[],has_audio:null,video_cover:null,need_placeholders:null,has_swipe_up:null,slides_payload:[],game_instance:{id:null},share_url:null,slidesLoaded:!1}),Xe=(0,e.createStore)({}),Qe=(0,e.createStore)({default:[]}),Ke=Qe.map((e=>e[m.getState().user_key||"default"]||[]));var Je;!function(e){e.FEEDS="feeds",e.FAVORITE="favorite"}(Je||(Je={}));const et=(0,e.createStore)({default:{[Je.FEEDS]:{},[Je.FAVORITE]:[]}}),tt=et.map((e=>e[m.getState().user_key||"default"]||{})),it=(0,e.createStore)({}),rt=(0,e.createStore)({}),st=(0,e.createStore)([]),nt=(e,t)=>e.map((e=>t.find((t=>t.id===e)))).filter((e=>!!e));it.on([tt,Ke],((e,t)=>{const i=tt.getState(),r=Ke.getState();return((e,t)=>{const i={};for(const[r,s]of Object.entries(e))i[r]=nt(s,t);return i})(i[Je.FEEDS],r)})),rt.on([tt,Ke],((e,t)=>{const i=tt.getState(),r={},s=Ke.getState();for(const e in i[Je.FEEDS])if("onboarding_"===e.substring(0,11)){const t=e.substring(11);r[t]=[],i[Je.FEEDS][e]&&Array.isArray(i[Je.FEEDS][e])&&(r[t]=s.filter((t=>-1!==i[Je.FEEDS][e].indexOf(t.id)&&!t.is_opened)))}return r})),st.on([tt,Ke],((e,t)=>{var i;const r=null!==(i=tt.getState()[Je.FAVORITE])&&void 0!==i?i:[],s={};return Ke.getState().forEach((e=>{s[e.id]=e})),r.map((e=>s[e]))}));const ot=(0,e.createEffect)(),at=(e,t="")=>(e.is_opened,e.is_opened),lt=Ke.map((e=>{const t={};return t[Ze.DEFAULT]=e.filter((e=>!e.slidesLoaded&&e.type===Ze.DEFAULT)).map((e=>e.id)),t[Ze.UGC]=e.filter((e=>!e.slidesLoaded&&e.type===Ze.UGC)).map((e=>e.id)),t})),{storyItemFavoriteChanged:dt,storyItemLikeChanged:ct,storyItemIsOpenedChanged:ut}=(Object.prototype.hasOwnProperty,(0,e.createApi)(Qe,{storyItemFavoriteChanged:(e,{id:t,favorite:i})=>{const r=m.getState().user_key||"default",s=(e[r]||[]).slice(0),n=s.find((e=>e.id===t));return void 0!==n&&(n.favorite=i),Object.assign(Object.assign({},e),{[r]:s})},storyItemLikeChanged:(e,{id:t,like:i})=>{const r=m.getState().user_key||"default",s=(e[r]||[]).slice(0),n=s.find((e=>e.id===t));return void 0!==n&&(n.like=i),Object.assign(Object.assign({},e),{[r]:s})},storyItemIsOpenedChanged:(e,{id:t})=>{const i=m.getState().user_key||"default",r=(e[i]||[]).slice(0),s=r.find((e=>e.id===t));return void 0!==s&&(s.is_opened=!0),Object.assign(Object.assign({},e),{[i]:r})}}));class ht extends U.EventEmitter{update(){this.emit("update")}destroy(){this.removeAllListeners()}}class pt{constructor(){this.viewModels=new Map}set(e,t){if(this.viewModels.has(e)){this.viewModels.get(e).add(t)}else this.viewModels.set(e,new Set([t]))}getAllByName(e){var t;const i=null!==(t=this.viewModels.get(e))&&void 0!==t?t:new Set;return Array.from(i.values())}getAll(){const e=[];for(const t of this.viewModels.values())for(const i of t.values())e.push(i);return e}getOneByName(e){const t=this.getAllByName(e)[0];if(!t)throw new Error(`ViewModel <${e}> is undefined`);return t}has(e){return this.viewModels.has(e)}clear(){for(const e of this.getAll())e.destroy();this.viewModels.clear()}}var ft;!function(e){e.START_LOADING="startLoading",e.END_LOADING="endLoading",e.CLOSE_STORY_READER="closeStoryReader"}(ft||(ft={}));class gt extends ht{constructor(e,t){super(),this.storyListViewModel=e,this.story=t,this.id=this.story.id,this.title=this.story.title,this.titleColor=this.story.title_color,this.magazineName=this.story.magazine_name,this.background=this.story.background,this.backgroundColor=this.story.background_color,this.favorite=this.story.favorite,this.like=this.story.like,this.deeplink=this.story.deeplink,this.hideInReader=this.story.hide_in_reader,this.gameInstance=this.story.game_instance,this.hasAudio=this.story.has_audio,this.isFavoriteCard=this.story.favorite_cell,this.isUgcCard=this.story.ugc_card_cell,this.isOpened=this.story.is_opened,this.image=this.story.image,this.videoCover=this.story._video_cover,this.videoCoverSrc=this.story.videoCoverSrc}getIsTitleCardInner(e){return e===H.CARD_INSIDE_BOTTOM}getIsTitleCardOutsideTop(e){return e===H.CARD_OUTSIDE_TOP}getIsTitleCardOutsideBottom(e){return e===H.CARD_OUTSIDE_BOTTOM}getAspectRatio(e){var t,i;const{aspectRatio:r,variant:s}=e;if(r)return r;switch(s){case te.STYLE_CIRCLE:case te.STYLE_QUAD:return 1;case te.STYLE_RECTANGLE:return null!==(i=null===(t=this.storyListViewModel.session)||void 0===t?void 0:t.preview_aspect_ratio)&&void 0!==i?i:.8;default:return 1}}getImageSrcByCoverQuality(e){var t,i;return null===(i=null===(t=this.story.image)||void 0===t?void 0:t.findOneByCoverQuality(e))||void 0===i?void 0:i.url}onClick(e){this.storyListViewModel.onStoryClick(this,e)}}class vt extends gt{constructor(e,t){super(e,t)}getImageSrcByCoverQuality(e){var t,i;return null===(i=null===(t=this.story.image)||void 0===t?void 0:t.findOneByCoverQuality(e))||void 0===i?void 0:i.url}}const mt=new U.EventEmitter;mt.setMaxListeners(50);var yt,wt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class St extends ht{set modeDesktop(e){this._modeDesktop!==e&&(this._modeDesktop=e,this.emit("update"))}get modeDesktop(){return this._modeDesktop}get session(){return this._session}get defaultStories(){return this._defaultStories.slice()}get favoriteStories(){return this._favoriteStories.slice()}constructor(e,t){super(),this.storiesService=e,this.params=t,this._defaultStories=[],this._favoriteStories=[],this._session=null,this._modeDesktop=!0,this.subscriptions=[],this.setDefaultStories=this.setDefaultStories.bind(this),this.setFavoriteStories=this.setFavoriteStories.bind(this),this.hanldeShowStory=this.hanldeShowStory.bind(this),this.handleCloseStory=this.handleCloseStory.bind(this),this.subscribeToStoriesService(),this.emit("create"),this.registerStoryReaderEvents()}get hasFavoriteCard(){return this.params.hasFavorite&&this._favoriteStories.length>0}get hasUgcCard(){return this.params.useUgcCard}get hasFavoriteStories(){return this.params.hasFavorite&&this.params.listType===Ze.DEFAULT}onStoryClick(e,t=0){((e,t)=>{const{deeplink:i,hideInReader:r,gameInstance:s}=e,n=Be()(i)&&i.trim().length>0,o=null==s?void 0:s.id;if(ze(Boolean(r),n,o,e.id))return;const a={id:e.id,index:t.index,isDeeplink:n,url:n?i:void 0};We(a,e,t)})(e,{eventPublisher:this,index:t})}destroy(){this.emit("destroy"),this.subscriptions.forEach((e=>e.unsubscribe())),this.removeAllListeners(),this.unregisterStoryReaderEvents(),this.subscriptions=[]}registerStoryReaderEvents(){mt.on("publicEvents.showStory",this.hanldeShowStory),mt.on("publicEvents.closeStory",this.handleCloseStory)}unregisterStoryReaderEvents(){mt.off("publicEvents.showStory",this.hanldeShowStory),mt.off("publicEvents.closeStory",this.handleCloseStory)}reload(){return wt(this,void 0,void 0,(function*(){yield this.loadStories({needFavorite:!1})}))}loadStories(e){return wt(this,void 0,void 0,(function*(){var t;const i=Boolean(this.params.hasFavorite)&&e.needFavorite,r={feed:this.params.identityFields.feedSlug,filter:{},defaultListLength:0,favoriteListLength:0,success:!0,error:{name:"",networkStatus:200,networkMessage:""}};try{this.emit("startLoading");const{defaultStories:e,favoriteStories:t}=yield this.storiesService.loadStories(Object.assign(Object.assign({},this.params),{needFavorite:i}));r.success=!0,r.error=null,r.defaultListLength=e.length,this.params.hasFavorite&&this.params.listType===Ze.DEFAULT&&(r.favoriteListLength=t.length)}catch(e){console.error(e),r.success=!1,r.error={name:e.name,networkMessage:e.networkMessage,networkStatus:e.networkStatus}}finally{r.filter=null!==(t=this.params.identityFields.filter)&&void 0!==t?t:{},this.emit("endLoading",r)}}))}hanldeShowStory(e){this.emit("openStory",e.id)}handleCloseStory(e){this.emit("closeStory",e.id)}subscribeToStoriesService(){const e=this.storiesService.observeDefaultStories(this.params.identityFields.feedSlug).watch(this.setDefaultStories);if(this.hasFavoriteStories){const e=this.storiesService.observeFavoriteStories().watch(this.setFavoriteStories);this.subscriptions.push(e)}const t=this.storiesService.observeSession().watch((e=>{this._session=e,this.emit("update")}));this.subscriptions.push(e,t)}setDefaultStories(e){this._defaultStories=e.map((e=>new gt(this,e))),this.emit("update")}setFavoriteStories(e){this._favoriteStories=e.map((e=>new vt(this,e))),this.emit("update")}}class bt extends gt{constructor(e,t){super(e,t),this.favoriteStories=[],this.favoriteStories=this.storyListViewModel.favoriteStories}}!function(e){e.STORY_LIST="storyList",e.STORY_READER="storyReader",e.GAME_READER="gameReader"}(yt||(yt={}));const _t=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();function xt(e){let t=null;if(_t){let i=window.localStorage.getItem(e);null!==i&&Be()(i)&&i.trim().length>0&&(t=JSON.parse(i))}return t}function Ct(e,t){_t&&window.localStorage.setItem(e,JSON.stringify(t))}var kt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};let At=null;function Lt(){return kt(this,void 0,void 0,(function*(){return null!=At?At:new Promise((e=>{!function(e,t){const i=new Image;i.onload=function(){var r=i.width>0&&i.height>0;t(e,r)},i.onerror=function(){t(e,!1)},i.src="data:image/webp;base64,"+{lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}[e]}("lossy",((t,i)=>{At=i,e(i)}))}))}))}var Mt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Ot=p(7315);function Et(){return Mt(this,void 0,void 0,(function*(){const[e,t]=yield Promise.all([Tt(),Lt()]);return{method:"POST",url:"session/open",params:{expand:"cache,storyWidgetsResources",fields:"session,server_timestamp,user_key,share,preview_aspect_ratio,placeholders,image_placeholders,is_allow_ugc"},data:It(e,t)}}))}y.use((()=>Mt(void 0,void 0,void 0,(function*(){return(yield B.request(yield Et())).data})))),(0,e.sample)({clock:w,target:m});const It=(e,t)=>{"iOS"===e.os_name?window.isIos=!0:"Android"===e.os_name&&(window.Android=!0);const i=o.getState();return i&&i.userId&&(e.user_id=i.userId),e.features="animation,data,deeplink,placeholder,resetTimers,gameReader,sendApi,swipeUpItems,imgPlaceholder,vod,closeStoryApi",t&&(e.features+=",webp"),e},Tt=()=>Mt(void 0,void 0,void 0,(function*(){return new Promise(((e,t)=>{let i=xt("device_data"),r=null;if(null!==i&&(r=i.device_id),null!==i&&r&&Be()(r)&&36===r.trim().length)v(r),e(i);else{const t={platform:"web",device_id:Ot.v4()};Ct("device_data",t),v(t.device_id),e(t)}}))}));var Rt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};function Pt(e,t,i=!1,r,s,n){const o=["slides_html","slides_duration","slides_screenshot_share","slides_payload"];s&&o.push("share_url");const a={url:`${t===ho?"ugc/":""}story/${e}`,method:"GET",params:{expand:o.join(",")}};return a.params&&(a.params.once=Number(n)),i||null!=a.params&&(a.params.fields=["id","slides_html","slides_duration","slides_screenshot_share","slides_payload"].join(",")),null!==r&&null!=a.params&&(a.params.session_id=r),a}ot.use((e=>Rt(void 0,[e],void 0,(function*({listType:e}){return B.get("story",Dt())}))));const Dt=(e,t,i,r,s)=>{var n;let a=null===(n=o.getState())||void 0===n?void 0:n.tags;const l={};a&&Ee()(a)&&a.length>0&&(l.tags=a.join(",")),void 0!==t&&Ee()(t)&&t.length>0&&(l.tags=t.join(","));return null==r||"number"!=typeof r&&!(e=>!isNaN(parseFloat(e))&&isFinite(e))(r)||(l.limit=r),e&&(l.session_id=e),null!=i&&(l.test=i),null!=s&&he()(s)&&(l.f=s),{params:l}},Nt=(0,e.createEffect)();var Bt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Nt.use((()=>Bt(void 0,void 0,void 0,(function*(){return(yield B.request(yield function(){return Bt(this,void 0,void 0,(function*(){return{method:"GET",url:"ugc/editor-config",params:{}}}))}())).data})))),m.on(Nt.doneData,((e,t)=>{const i=Object.assign({},e);return i.editor=t,i}));const Ft=Object.prototype.hasOwnProperty,jt=()=>{const e=Ie.getState(),t=Ue.getState(),i=[],r={};for(let t in e.default)Ft.call(e.default,t)&&(r[t]={type:xe.TEXT,name:t,value:e.default[t]});for(let t in e.user)Ft.call(e.user,t)&&(r[t]={type:xe.TEXT,name:t,value:e.user[t]});for(let e in r)Ft.call(r,e)&&i.push(r[e]);const s={};for(let e in t.default)Ft.call(t.default,e)&&(s[e]={type:xe.IMAGE,name:e,value:t.default[e]});for(let e in t.user)Ft.call(t.user,e)&&(s[e]={type:xe.IMAGE,name:e,value:t.user[e]});for(let e in s)Ft.call(s,e)&&i.push(s[e]);return i},Ut=(e,t)=>{const i={};return i[Ze.DEFAULT]=[],i[Ze.UGC]=[],i[e]=t,{storyTypeIds:i,style:"",widgetsData:{}}},Vt=(e,t)=>{let i;return i=null==t?Ut(Ze.DEFAULT,[]):t,{ids:i.storyTypeIds[e],style:i.style,widgetsData:i.widgetsData}},Gt=(0,e.createStore)({style:"",storyTypeIds:{[Ze.DEFAULT]:[],[Ze.UGC]:[]},widgetsData:{}}),zt=(0,e.createEffect)(),Wt=(0,e.createEvent)(),$t=(e,t)=>{let i=[];switch(e){case Se.default:i=t?it.getState()[t]:[];break;case Se.favorite:i=st.getState();break;case Se.onboarding:i=t?rt.getState()[t]:[]}return null!=i?i:[]},Ht=e=>"{{__ugc__}}"===e?Ze.UGC:Ze.DEFAULT;var qt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};var Zt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Yt=(e,t)=>Zt(void 0,void 0,void 0,(function*(){const e=yield(i={data:t},qt(void 0,void 0,void 0,(function*(){var e,t,r,s,n,o,a,l,d;let c=!1,u="",h={url:null!==(t=null===(e=i.data)||void 0===e?void 0:e.url)&&void 0!==t?t:"",method:null!==(s=null===(r=i.data)||void 0===r?void 0:r.method)&&void 0!==s?s:"get"};-1!==["post","put","path"].indexOf(null===(n=i.data)||void 0===n?void 0:n.method)?h.data=null!==(a=null===(o=i.data)||void 0===o?void 0:o.data)&&void 0!==a?a:void 0:h.params=null!==(d=null===(l=i.data)||void 0===l?void 0:l.params)&&void 0!==d?d:void 0;const p={requestId:i.id};try{const e=yield B.request(h);p.data=e.data,p.status=e.status,p.headers=e.headers,c=!0}catch(e){p.data=e,p.status=400,p.headers=[{}],u=e.toString()}return{name:i.cb,payload:{requestId:i.id,success:c,data:p,err:u}}})));var i;if(e.payload.success)return e.payload.data;throw e.payload.err}));var Xt=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};function Qt(e,t){const i={url:"story-context",method:"GET",params:{id:e.join(","),fields:["style","widgetsData"].join(",")}};return null!=t&&null!=i.params&&(i.params.session_id=t),i}function Kt(e,t,i){return String(e).replace(new RegExp(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t),"g"),(()=>i))}zt.use((e=>Xt(void 0,[e],void 0,(function*({ids:e}){return B.request(Qt(e))})))),(0,e.sample)({clock:zt.done.filterMap((({params:e,result:t})=>{const i=t.data,r=Ht(e.feedSlug);if(i&&he()(i)){const t=Ut(r,e.ids);return t.style=i.style,t.widgetsData=i.widgetsData,t}})),target:Gt}),(0,e.sample)({clock:Wt,target:Gt});var Jt=p(3514),ei=p.n(Jt),ti=p(4871),ii=p.n(ti);let ri,si=!0;function ni(e){ri(e),si=e}function oi(){return ri(si),si}ri=function(){};class ai{constructor(){this.__lastUpdated=null,this._receiveTime=0,this._serverTimestamp=0,this.rawData={},this.myDictionary={}}get receiveTime(){return this._receiveTime}singleModelWrapper(){return""}attributes(){return["__lastUpdated"]}static prepareFromResponse(){}setAttributes(e){const t=this.attributes();let i=this;for(let r in e){let s=e[r];-1!==t.indexOf(r)&&(i[r]=s)}}static createInstance(e,t){const i=new e;let r=t;return""!==i.singleModelWrapper()&&void 0!==t[i.singleModelWrapper()]&&(r=t[i.singleModelWrapper()]),i.rawData=t,i.setAttributes(r),i._receiveTime=(new Date).getTime(),void 0!==t.server_timestamp&&(i._serverTimestamp=t.server_timestamp),i}static _fetch(e,t,i,r="get"){return new Promise(((s,n)=>{let o={url:t,method:r};-1!==["post","put","path"].indexOf(r)?o.data=i:o.params=i;B.request(o).then((function(t){let i,r;i=t.data,i&&(i.__lastUpdated=Date.now()),r=ai.createInstance(e,i),s(r)})).catch(n)}))}static _fetchList(e,t,i){return new Promise(((r,s)=>{B.get(t,{params:i}).then((function(t){const i=t.data;let s=[];i.forEach((t=>{s.push(ai.createInstance(e,t))}));let n={models:s,totalCount:Number(t.headers["x-pagination-total-count"]),currentPage:Number(t.headers["x-pagination-current-page"])};r(n)})).catch(s)}))}static emitEvent({type:e,event:t,eventData:i}){return new Promise(((r,s)=>{B.post(`${e}/event/${t}`,i).then((function(e){const t=e.data;r(t)})).catch(s)}))}static update(e,t,i="post"){let r={url:e,method:i};return-1!==["post","put","path"].indexOf(i)?r.data=t:r.params=t,new Promise(((e,t)=>{B.request(r).then((function(t){let i;i=t.data,e(i)})).catch(t)}))}}class li extends ai{attributes(){return["width","height","type","url"]}constructor(){super(),this._url=""}set url(e){this._url=e}get url(){let e=window.isSecureContext;return void 0===e&&"https:"===window.location.protocol&&(e=!0),e?this._url:this._url.replace(/^https:\/\//,"http://")}}const di=p(3981);class ci{constructor(){this.images=[],this.color="",this.gradient=!1}static createFromArray(e){const t=new ci;for(let i in e)e.hasOwnProperty(i)&&t.images.push(li.createInstance(li,e[i]));return t}findOneByType(e){let t=null;return this.images.forEach((i=>{i.type===e&&(t=i)})),t}findOneByWidth(e,t=!1){let i=null;return this.images.forEach((t=>{t.width===e&&(i=t)})),null!==i||t&&void 0!==(i=di(this.images))?i:null}}class ui extends ai{constructor(){super(...arguments),this._cover=null}attributes(){return ii()(super.attributes(),["id","cover","hasFavorite"])}set cover(e){this._cover=ci.createFromArray(e)}get cover(){return this._cover}get coverSrc(){var e;const t=null===(e=this._cover)||void 0===e?void 0:e.findOneByType("h");return null==t?void 0:t.url}}const hi=/[\r\n%#()<>?[\\\]^`{|}]/g;function pi(e,t="double"){return(e=(e=(e="double"===t?e.replace(/"/g,"'"):e.replace(/'/g,'"')).replace(/>\s{1,}</g,"><")).replace(/\s{2,}/g," ")).replace(hi,encodeURIComponent)}const fi=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34});function gi(e){return Object.keys(e).reduce(((t,i)=>t+i.split(/(?=[A-Z])/).join("-").toLowerCase()+":"+e[i]+";"),"")}function vi(e){let t=window.isSecureContext;return void 0===t&&"https:"===window.location.protocol&&(t=!0),t?e:e.replace(/^https:\/\//,"http://")}function mi(e){return e.map((e=>function(e){var t,i,r;if(!e.url)return null;let s={"font-family":null!==(t=e.family)&&void 0!==t?t:"normal",src:`url('${vi(String(e.url))}')`,"font-style":null!==(i=e.style)&&void 0!==i?i:"normal","font-weight":null!==(r=e.weight)&&void 0!==r?r:"normal"};e.title&&(s.src+=`, local('${e.title}')`);return`@font-face {${gi(s)}}\n`}(e))).filter(Boolean).join("")}function yi(e){"fonts"in document?e.forEach((e=>{const t=new FontFace(e.family,`url(${e.url})`,{style:e.style,weight:e.weight,display:"block"});document.fonts.add&&document.fonts.add(t),t.load()})):function(e){const t=mi(e);if(null!=t){const e="stories-font-style";let i=document.getElementById(e);null===i?(i=document.createElement("style"),i.type="text/css",i.id=e,i.attributes.setNamedItem(document.createAttribute("scoped")),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t)),document.body.appendChild(i)):i.styleSheet?i.styleSheet.cssText=t:(i.textContent="",i.appendChild(document.createTextNode(t)))}}(e)}var wi;!function(e){e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary",e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary"}(wi||(wi={}));var Si=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const bi=e=>Si(void 0,void 0,void 0,(function*(){return(yield fetch(e)).blob()})),_i=e=>Si(void 0,void 0,void 0,(function*(){const t=yield bi(e);return function(e,t=!0){return new Promise((function(i){var r=new FileReader;r.onloadend=function(){if(t){var e=String(r.result).replace("data:","").replace(/^.+,/,"");i(e)}else i(String(r.result))},r.readAsDataURL(e)}))}(new File([t],"image",{type:t.type,lastModified:(new Date).getTime()}),!1)}));function xi(e,t,i,r){var s=e.indexOf(i,t);if(-1===s)return null;for(var n="",o=s+i.length;o<e.length&&-1===r.indexOf(e[o]);o++)n+=e[o];return{foundAtIndex:s,value:n}}function Ci(e,t){const i=document.createElementNS("http://www.w3.org/2000/svg",e);for(let e in t)i.setAttributeNS(null,e.replace(/[A-Z]/g,(function(e,t,i,r){return"-"+e.toLowerCase()})),t[e]);return i}var ki;function Ai(e,t,i,r,s,n,o,a,l,d){var c=Ci("svg",{width:String(s),height:String(n),style:"background-color: #fff;"}),u=Ci("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"});c.appendChild(u);try{u.style.fontSize=document.body.style.fontSize}catch(e){console.error(e)}!function(){const h=t.cloneNode(!0);if(null!=r&&"string"==typeof r&&r.length>0){const e=Array.prototype.slice.call(h.querySelectorAll(r));for(let t=0;t<e.length;t++){const i=e[t];i&&i.style&&i.style.setProperty&&i.style.setProperty("display","none")}}u.appendChild(h);var p=[];(function(e){for(var t=[],i=0;;){var r=xi(e,i,"src: url(",[" ",")","\t"]);if(null==r)break;i=r.foundAtIndex+r.value.length,t.push(r.value.replace(/["']/g,""))}return t})(i).forEach((function(e){p.push(new Promise((function(t,r){_i(e).then((function(r){i=i.replace(e,r),t()})).catch((function(e){t()}))})))})),u.querySelectorAll("img").forEach((function(e){e.crossOrigin="Anonymous",p.push(new Promise((function(t,i){_i(e.src).then((function(i){e.onload=i=>e.decode().then((()=>t())),e.onerror=e=>{console.error(e),t()},e.src=i})).catch((function(e){t()}))})))})),u.querySelectorAll("video").forEach((function(e){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),u.querySelectorAll(".narrative-element-video").forEach((function(e){e.classList.add("init")})),Promise.all(p).then((function(){const t=Ci("style",{});t.textContent=i,c.appendChild(t);const r=(new XMLSerializer).serializeToString(c),u=new Image;u.onload=t=>{u.decode().then((function(){setTimeout((function(){const e=document.createElement("canvas"),t=e.getContext("2d");if(t){e.style.width=s+"px",e.style.height=n+"px",e.width=2*s,e.height=2*n,t.scale(2,2),t.drawImage(u,0,0);const i=e.toDataURL(o,a);bi(i).then((function(t){l(t),e.remove()}))}}),e===ki.IOS?200:void 0)})).catch((e=>{console.log({image:u,encodingError:e},"onDecodeError"),d("error render svg image: "+e)}))},u.onerror=e=>{d("error render svg image: "+e)},u.setAttribute("crossOrigin","Anonymous"),u.crossOrigin="Anonymous",u.src="data:image/svg+xml;base64,"+btoa(encodeURIComponent(r).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})))}))}()}function Li(e,t,i,r){return new Promise((function(s,n){null==r&&(r=""),function(e,t,i,r,s,n){Ai(e,t,i,r,t.clientWidth,t.clientHeight,"image/jpeg",1,s,n)}(e,t,i,r,(function(e){s(new File([e],"image.jpeg",{type:e.type,lastModified:(new Date).getTime()}))}),(function(){console.error("Image fail");const e=new Error;e.name="ImageFail",n(e)}))}))}function Mi(e){return"string"==typeof e&&(!isNaN(Number(e))&&!isNaN(parseFloat(e)))}!function(e){e[e.IOS=0]="IOS",e[e.ANDROID=1]="ANDROID",e[e.OTHER=2]="OTHER"}(ki||(ki={}));const Oi=()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:function(){e=!0}}),i=()=>{};window.addEventListener("test",i,t),window.removeEventListener("test",i)}catch(e){}return e},Ei=!!Oi()&&{passive:!0};var Ii=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Ti=(0,e.createEffect)((e=>Ii(void 0,[e],void 0,(function*({defaultList:e,onboardingList:t,favoriteList:i,onboardingTags:r,testKey:s,limit:n}){var o,a,l;const d=[],c=null===(a=null===(o=m.getState())||void 0===o?void 0:o.session)||void 0===a?void 0:a.id;let u=null;if(ei()(c)&&(d.push(Ri(yield Et(),"session")),u="@{session.session.id}"),!1!==e&&he()(e)&&Be()(e.feedSlug)){const t=e.feedSlug,i=null!==(l=e.filter)&&void 0!==l?l:{};t===ho?d.push(Ri(function(e,t,i,r,s){const{params:n}=Dt(i,r,s,null,t);return{method:"GET",url:"ugc/feed",params:n}}(0,i,u,[],s),`storyList_${t}`)):d.push(Ri(function(e,t,i,r){const{params:s}=Dt(t,i,r);return{method:"GET",url:`feed/${e}`,params:s}}(t,u,[],s),`storyList_${t}`))}i&&d.push(Ri(function(e){const{params:t}=Dt(e);return{method:"GET",url:"story",params:Object.assign(Object.assign({},t),{favorite:1})}}(u),"storyFavoriteList")),!1!==t&&Be()(t)&&d.push(Ri(function(e="onboarding",t,i,r){const{params:s}=Dt(t,i,null,r);return{method:"GET",url:`feed/${e}/onboarding`,params:s}}(t,u,r,n),`storyOnboardingList_${t}`));let h=null;try{const e=yield B.post("composite",{compositeRequest:d});if(e.status>=200&&e.status<=299)if(e.data&&e.data.compositeResponse&&Array.isArray(e.data.compositeResponse)){if(e.data.success)return e.data.compositeResponse;for(const t of e.data.compositeResponse){const e=t.status;if(je()(e)&&!(e>=200&&e<=299)){h={name:"networkError",networkStatus:e,networkMessage:String(t.body)};break}}}else h=e.data&&he()(e.data)&&null!=e.data.name&&null!=e.data.message&&null!=e.data.status?{name:e.data.name,networkStatus:e.data.status,networkMessage:e.data.message}:{name:"networkError",networkStatus:null,networkMessage:"Invalid data in API response, data from response as json: "+JSON.stringify(e.data)};else h=e.data&&he()(e.data)&&null!=e.data.name&&null!=e.data.message&&null!=e.data.status?{name:e.data.name,networkStatus:e.data.status,networkMessage:e.data.message}:{name:"networkError",networkStatus:e.status,networkMessage:"Invalid data in API response, data from response as json: "+JSON.stringify(e.data)}}catch(e){try{const t=e;if(t.response&&t.response.status)h={name:"networkError",networkStatus:t.response.status,networkMessage:t.response.statusText};else{let t="";window.navigator&&null!=window.navigator.onLine&&(t=" net::ERR_INTERNET_DISCONNECTED"),h={name:"error",networkStatus:null,networkMessage:e.toString()+t},console.error(e)}}catch(e){h={name:"error",networkStatus:null,networkMessage:e.toString()}}}if(null!==h)throw h;return[]})))),Ri=(e,t)=>({path:e.url,qs:e.params,body:e.data,ref:t,method:e.method}),Pi=e=>{const t=Ie.getState();for(let i in t.user)Ni.call(t.user,i)&&(e=Kt(e,`%${i}%`,t.user[i]));for(let i in t.default)Ni.call(t.default,i)&&(e=Kt(e,`%${i}%`,t.default[i]));const i=Ue.getState();for(let t in i.user)Ni.call(i.user,t)&&(e=Kt(e,`%${t}%`,i.user[t]));for(let t in i.default)Ni.call(i.default,t)&&(e=Kt(e,`%${t}%`,i.default[t]));return e},Di=(e,t)=>Array.isArray(e)?e.map((e=>Object.assign(Object.assign({},e),{title:e.need_placeholders?Pi(e.title):e.title,slidesLoaded:!1,is_opened:at(e),type:t}))):[];(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t;return null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body})),target:m}),(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t,i;return null===(i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body)||void 0===i?void 0:i.placeholders})),target:Re}),(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t,i;return null===(i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body)||void 0===i?void 0:i.image_placeholders})),target:Ge}),(0,e.sample)({clock:y.doneData.filterMap((e=>e.placeholders)),target:Re}),(0,e.sample)({clock:y.doneData.filterMap((e=>e.image_placeholders)),target:Ge});const Ni=Object.prototype.hasOwnProperty;(0,e.sample)({source:Qe,clock:m,fn:(e,t)=>{const i={};for(const r in e)Ni.call(e,r)&&(i[r]=e[r].map((e=>Object.assign(Object.assign({},e),{is_opened:at(e,t.user_key),title:e.need_placeholders?Pi(e.title):e.title}))));return i},target:Qe});const{storiesListIdsChanged:Bi}=(0,e.createApi)(et,{storiesListIdsChanged:(e,{storiesIdsUserEntity:t,feedSlug:i,storyList:r})=>{let s=m.getState().user_key||"default";const n=e[s]||{};return void 0===n[Je.FAVORITE]&&(n[Je.FAVORITE]=[]),void 0===n[Je.FEEDS]&&(n[Je.FEEDS]={}),t===Je.FEEDS&&i&&(n[Je.FEEDS][i]=r.map((e=>e.id))),t===Je.FAVORITE&&(n[Je.FAVORITE]=r.map((e=>e.id))),Object.assign(Object.assign({},e),{[s]:n})}}),{storiesListItemsAdded:Fi}=(0,e.createApi)(Qe,{storiesListItemsAdded:(e,{storiesIdsUserEntity:t,feedSlug:i,storyList:r})=>{let s=m.getState().user_key||"default";const n=e[s]||[],o=n.map((e=>e.id));return Object.assign(Object.assign({},e),{[s]:[...n,...r.filter((e=>-1===o.indexOf(e.id)))]})}});(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t;let i=null;for(const r of e)if(r.ref&&Be()(r.ref)){const e=r.ref.match(/^storyList_(.+)/);if(e&&Array.isArray(e)&&e[1]){let s=null===(t=r.body)||void 0===t?void 0:t.stories;const n=Ht(e[1]);n===Ze.UGC&&(s=r.body);const o=Di(s,n);i={storiesIdsUserEntity:Je.FEEDS,feedSlug:e[1],storyList:o}}}if(i)return i})),target:[Fi,Bi]}),(0,e.sample)({clock:Ti.doneData.filterMap((e=>{var t;let i=null;for(const r of e)if(r.ref&&Be()(r.ref)){const e=r.ref.match(/^storyOnboardingList_(.+)/);if(e&&Array.isArray(e)&&e[1]){const s=Di(null===(t=r.body)||void 0===t?void 0:t.stories,Ze.DEFAULT);i={storiesIdsUserEntity:Je.FEEDS,feedSlug:`onboarding_${e[1]}`,storyList:s}}}if(i)return i})),target:[Fi,Bi]}),(0,e.sample)({clock:Ti.doneData.filterMap((e=>{const t=e.find((e=>"storyFavoriteList"===e.ref));if(void 0===t)return;const i=Di(t.body,Ze.DEFAULT);return{storiesIdsUserEntity:Je.FAVORITE,feedSlug:null,storyList:i}})),target:[Fi,Bi]});const ji=(0,e.createEffect)();ji.use((e=>Ii(void 0,void 0,void 0,(function*(){const t=e.ids.map((t=>Ri(Pt(t,e.feedSlug),`storySlides_${t}`))),i=yield B.post("composite",{compositeRequest:t});return i.data&&i.data.success&&i.data.compositeResponse&&Array.isArray(i.data.compositeResponse)?i.data.compositeResponse:[]}))));const Ui=e=>e&&he()(e)&&"id"in e,Vi=(0,e.createEffect)();Vi.use((e=>Ii(void 0,[e],void 0,(function*({ids:e,id:t,feedSlug:i}){const r=[Ri(Pt(t,i),"storySlides"),Ri(Qt(e),"storyContext")],s=yield B.post("composite",{compositeRequest:r});return s.data&&s.data.success&&s.data.compositeResponse&&Array.isArray(s.data.compositeResponse)?s.data.compositeResponse:[]})))),Qe.on([ji.done,Vi.done],((e,{params:t,result:i})=>{const r=i;if(Array.isArray(r)){const i=Ht(t.feedSlug),s=m.getState().user_key||"default",n=(e[s]||[]).slice(0).map((e=>{var t,s,n,o,a,l,d,c,u,h,p,f,g,v,m;for(let y=0;y<r.length;y++)if(Ui(null===(t=r[y])||void 0===t?void 0:t.body)&&(null===(n=null===(s=r[y])||void 0===s?void 0:s.body)||void 0===n?void 0:n.id)===e.id&&i===e.type)return Object.assign({},e,{slides_html:e.need_placeholders?Array.from(null!==(l=null===(a=null===(o=r[y])||void 0===o?void 0:o.body)||void 0===a?void 0:a.slides_html)&&void 0!==l?l:[]).map((e=>Pi(e))):Array.from(null!==(u=null===(c=null===(d=r[y])||void 0===d?void 0:d.body)||void 0===c?void 0:c.slides_html)&&void 0!==u?u:[]),slides_duration:null===(p=null===(h=r[y])||void 0===h?void 0:h.body)||void 0===p?void 0:p.slides_duration,slides_screenshot_share:null===(g=null===(f=r[y])||void 0===f?void 0:f.body)||void 0===g?void 0:g.slides_screenshot_share,slides_payload:null===(m=null===(v=r[y])||void 0===v?void 0:v.body)||void 0===m?void 0:m.slides_payload,slidesLoaded:!0,is_opened:at(e)});return e}));return Object.assign(Object.assign({},e),{[s]:n})}return e})),(0,e.sample)({clock:Vi.done.filterMap((({params:e,result:t})=>{var i;const r=null===(i=t.find((e=>"storyContext"===e.ref)))||void 0===i?void 0:i.body,s=Ht(e.feedSlug);if(r&&he()(r)){const t=Ut(s,e.ids);return t.widgetsData=r.widgetsData,t.style=r.style,t}})),target:Gt});const Gi=(0,e.createEffect)((e=>Ii(void 0,[e],void 0,(function*({id:e,feedSlug:t,fetchShareUrl:i}){var r,s;const n=[],o=null===(s=null===(r=m.getState())||void 0===r?void 0:r.session)||void 0===s?void 0:s.id;let a=null;ei()(o)&&(n.push(Ri(yield Et(),"session")),a="@{session.session.id}"),n.push(Ri(Pt(e,t,!0,a,i),"story")),n.push(Ri(Qt([e],a),"storyContext"));const l=yield B.post("composite",{compositeRequest:n});if(l.data&&l.data.success&&l.data.compositeResponse&&Array.isArray(l.data.compositeResponse))return l.data.compositeResponse;if(l.data&&!l.data.success)throw Error("composite request error:"+JSON.stringify(l.data.compositeResponse));return[]}))));(0,e.sample)({clock:Gi.doneData.filterMap((e=>{var t;const i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body;if(i&&he()(i)&&i)return i})),target:m}),(0,e.sample)({clock:Gi.doneData.filterMap((e=>{var t,i;return null===(i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body)||void 0===i?void 0:i.placeholders})),target:Re}),(0,e.sample)({clock:Gi.doneData.filterMap((e=>{var t,i;return null===(i=null===(t=e.find((e=>"session"===e.ref)))||void 0===t?void 0:t.body)||void 0===i?void 0:i.image_placeholders})),target:Ge}),(0,e.sample)({clock:Gi.done.filterMap((({params:e,result:t})=>{var i;const r=null===(i=t.find((e=>"storyContext"===e.ref)))||void 0===i?void 0:i.body;if(r&&he()(r)){const t=Ht(e.feedSlug),i=Ut(t,[e.id]);return i.widgetsData=r.widgetsData,i.style=r.style,i}})),target:Gt}),Qe.on(Gi.done.filterMap((({params:e,result:t})=>{var i;const r=null===(i=t.find((e=>"story"===e.ref)))||void 0===i?void 0:i.body;if(r&&he()(r))return r.type=Ht(e.feedSlug),r})),((e,t)=>{if(!Ui(t))return;const i=m.getState().user_key||"default",r=(e[i]||[]).slice(0).filter((e=>e.id!==(null==t?void 0:t.id))).slice(0);return t=Object.assign(t,{slides_html:t.need_placeholders?Array.from(t.slides_html).map((e=>Pi(e))):Array.from(t.slides_html),slides_duration:t.slides_duration,slidesLoaded:!0,is_opened:at(t)}),r.push(t),Object.assign(Object.assign({},e),{[i]:r})})),(0,e.sample)({source:Qe,clock:Ie,fn:(e,t)=>{const i={};for(const t in e)Ni.call(e,t)&&(i[t]=e[t].map((e=>{var t;return Object.assign(Object.assign({},e),{slides_html:e.need_placeholders&&Array.isArray(e.slides_html)?e.slides_html.map((e=>Pi(e))):null!==(t=e.slides_html)&&void 0!==t?t:[]})})));return i},target:Qe}),(0,e.sample)({source:m,clock:m,filter:e=>{var t;return Boolean(null===(t=null==e?void 0:e.session)||void 0===t?void 0:t.id)},target:(0,e.createEffect)((e=>{yi(e.cache.filter((e=>"font-face"===e.type)))}))});const{storyFeedsAdded:zi}=(0,e.createApi)(Xe,{storyFeedsAdded:(e,t)=>t});(0,e.sample)({clock:Ti.doneData.filterMap((e=>{let t={};for(const i of e)if(i.ref&&Be()(i.ref)){const e=i.ref.match(/^storyList_(.+)/);if(e&&Array.isArray(e)&&e[1]){const r=i.body;t[e[1]]=ai.createInstance(ui,r)}}return t})),target:zi});var Wi=p(2438),$i=p.n(Wi),Hi=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class qi extends Error{}class Zi{fetchSessionAndStoriesCompositeFx(e){return Hi(this,void 0,void 0,(function*(){return Ti({defaultList:!1,onboardingList:e.onboardingList,favoriteList:!1,onboardingTags:e?e.customTags:void 0,limit:e?e.limit:void 0})}))}fetchSingleStoryWithoutContext(e,t,i){return Hi(this,void 0,void 0,(function*(){try{yield Gi({id:e,feedSlug:t,fetchShareUrl:i});const r=Ke.getState().find((t=>t.id===e))||Ye(e);return r.slidesLoaded=!1,r}catch(t){return Ye(e)}}))}fetchSingleStoryContext(e,t){return Hi(this,void 0,void 0,(function*(){yield zt({ids:[e],feedSlug:t});const i=Ke.getState().find((t=>t.id===e));if(!i)throw new Error;return i.slidesLoaded=!0,i}))}fetchStoriesSlides(e,t){return Hi(this,void 0,void 0,(function*(){const i=lt.getState()[e];i.length>0&&(yield ji({ids:i,feedSlug:t}))}))}fetchMultipleStoriesContext(e,t,i){return Hi(this,void 0,void 0,(function*(){const r=Vt(t,Gt.getState()),s=Ke.getState().find((i=>i.id===e&&i.type===t));let n=null!==r&&""!==r.style;const o=lt.getState()[t];t===Ze.DEFAULT&&o.length>0&&(null==r?void 0:r.ids)!==o&&(n=!1);const a=!n&&!(null==s?void 0:s.slidesLoaded),l=!n&&o.length;if(a){const r=t===Ze.DEFAULT?o:[];yield Vi({ids:r,id:e,feedSlug:i})}else if(l)yield zt({ids:o,feedSlug:i});else{if(null==s?void 0:s.slidesLoaded)throw new qi;yield ji({ids:[e],feedSlug:i})}}))}getStoryContextInternalModel(e){const t=lt.getState()[e];return Gt.getState()||Ut(e,t)}static updateStoryLike(e,t){return Hi(this,void 0,void 0,(function*(){let i=!1;const r={like:void 0};let s="";try{const n=yield B.post(`story-like/${e}`,{value:t});void 0!==n.data.like?(i=!0,r.like=n.data.like,ct({id:e,like:r.like})):s="response.data.like is undefined"}catch(e){s=e.toString()}if(i)return r;throw s}))}static getStorySharePath(e){return Hi(this,void 0,void 0,(function*(){let t=!1;const i={url:void 0};let r="";try{const s=yield B.get(`story-share/${e}`,{});void 0!==s.data.url?(t=!0,i.url=s.data.url):r="response.data.url is undefined"}catch(e){r=e.toString()}if(t)return i;throw r}))}static markAsOpened(e){if(!ei()(m.getState().user_key)){const t=`u/${m.getState().user_key}/s_opened`;let i=xt(t);Ee()(i)||(i=[]),i.push(e),i=$i()(i),Ct(t,i)}ut({id:e})}static setBookmark(e,t){return Hi(this,void 0,void 0,(function*(){let i=!1;const r={favorite:void 0};let s="";try{const n=yield B.post(`story-favorite/${e}`,{value:t});void 0!==n.data.favorite?(i=!0,r.favorite=Boolean(n.data.favorite),!1===r.favorite?Bi({storiesIdsUserEntity:Je.FAVORITE,feedSlug:null,storyList:st.getState().filter((t=>t.id!==e))}):Bi({storiesIdsUserEntity:Je.FAVORITE,feedSlug:null,storyList:[...st.getState(),...Ke.getState().filter((t=>t.id===e))]}),dt({id:e,favorite:r.favorite})):s="response.data.favorite is undefined"}catch(e){s=e.toString()}if(i)return r;throw s}))}}const Yi=(0,e.createStore)({uiPaused:!1,timerPaused:!1,locked:!1,closeGestureInAction:!1}),Xi=Yi.map((e=>e.uiPaused)),Qi=Yi.map((e=>e.timerPaused)),Ki=(0,e.createStore)(!1),Ji=(0,e.createStore)(!0),er=(0,e.createStore)(!0),tr=(0,e.createEvent)(),ir=(0,e.createEvent)(),rr=(0,e.createEvent)(),sr=(0,e.createEvent)(),nr=(0,e.createEvent)(),or=(0,e.createEvent)(),ar=(0,e.createEvent)(),lr=(0,e.createEvent)(),dr=(0,e.createEvent)(),cr=(0,e.createEvent)(),ur=(0,e.createEvent)(),hr=(0,e.createEvent)(),pr=(0,e.createEvent)(),fr=(0,e.createEvent)(),gr=t=>(0,e.sample)({source:Yi,clock:t,filter:e=>!e.locked}),vr=gr(ar),mr=gr(lr),yr=gr(dr),wr=gr(cr);Yi.on(yr,(e=>Object.assign(Object.assign({},e),{uiPaused:!0,timerPaused:!0}))).on(wr,(e=>Object.assign(Object.assign({},e),{uiPaused:!1,timerPaused:!1}))).on(vr,(e=>e.timerPaused?e:Object.assign(Object.assign({},e),{timerPaused:!0}))).on(mr,(e=>e.timerPaused?Object.assign(Object.assign({},e),{timerPaused:!1}):e)).on(ur,(e=>Object.assign(Object.assign({},e),{uiPaused:!0,timerPaused:!0,locked:!0}))).on(hr,(e=>Object.assign(Object.assign({},e),{uiPaused:!1,timerPaused:!1,locked:!1}))).on(pr,(e=>Object.assign(Object.assign({},e),{timerPaused:!0,locked:!0}))).on(fr,(e=>Object.assign(Object.assign({},e),{timerPaused:!1,locked:!1}))),Ki.on(tr,(e=>!0)).on(ir,(e=>!1)),Ji.on(rr,(()=>!0)).on(sr,(()=>!1)),er.on(nr,(()=>!0)).on(or,(()=>!1));const Sr={id:"",isOpened:!1,type:me.Social,link:""},br=(0,e.createStore)(Sr),_r=br.map((e=>e.isOpened)),xr=(0,e.createEvent)(),Cr=(0,e.createEvent)();br.on(xr,((e,t)=>Object.assign(Object.assign({},e),{link:t.link,type:t.type,id:t.id,isOpened:!0}))).on(Cr,(e=>Sr));var kr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Ar{constructor(){this.type=Ar.name}init(e){return kr(this,void 0,void 0,(function*(){}))}get firstElement(){var e;return null===(e=this.elements)||void 0===e?void 0:e.item(0)}get isInited(){return Boolean(this.firstElement)}pause(){}resume(){}destroy(){}getActiveElement(){var e;return null===(e=this.elements)||void 0===e?void 0:e.item(0)}getActiveElements(){return this.elements}refreshUserData(){}getType(){return this.type}}var Lr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Mr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Mr.name}init(e){return Lr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-copy");try{this.slideApi.WidgetCopy.initWidget(this.elements)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetCopy.refreshUserData(this.elements)}click(e){this.slideApi.WidgetCopy.click(e)}}var Or=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Er extends Ar{constructor(e){super(),this.slideApi=e,this.type=Er.name}init(e){return Or(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-data-input");try{this.slideApi.WidgetDataInput.initWidget(this.elements)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetDataInput.refreshUserData(this.elements)}click(e){this.slideApi.WidgetDataInput.click(e)}setUserData(e,t=""){this.slideApi.WidgetDataInput.setUserData(e,t)}}var Ir=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Tr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Tr.name}init(e){return Ir(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-date-countdown");const t=Array.from(e.querySelectorAll(".narrative-slide.narrative-multi-slide"));try{if(!this.elements.length)return;this.slideApi.WidgetDateCountdown.initWidget(this.elements,t)}catch(e){console.error(e)}}))}pause(){try{if(!this.elements)return;this.slideApi.WidgetDateCountdown.pause(this.elements)}catch(e){console.error(e)}}resume(){try{if(!this.elements)return;this.slideApi.WidgetDateCountdown.resume(this.elements)}catch(e){console.error(e)}}refreshUserData(){this.elements&&this.slideApi.WidgetDateCountdown.refreshUserData(this.elements)}}var Rr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Pr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Pr.name}init(e){return Rr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-poll");try{if(!this.firstElement)return;this.slideApi.WidgetPoll.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetPoll.refreshUserData(this.elements)}select(e){this.slideApi.WidgetPoll.select(e)}setUserData(e,t=""){this.slideApi.WidgetPoll.setUserData(e,t)}}var Dr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Nr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Nr.name}init(e){return Dr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-poll-layers");const t=e.querySelectorAll(".narrative-slide.narrative-multi-slide");try{if(!this.firstElement)return;this.slideApi.WidgetPollLayers.initWidget(this.firstElement,Array.from(t))}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetPollLayers.refreshUserData(this.elements)}select(e){this.slideApi.WidgetPollLayers.select(e)}}var Br=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Fr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Fr.name}init(e){return Br(this,void 0,void 0,(function*(){var t;this.elements=e.querySelectorAll(".narrative-element-quest");const i=e.querySelectorAll(".narrative-slide"),r=null===(t=null==i?void 0:i.item(0))||void 0===t?void 0:t.getAttribute("data-quest-count");this.elements.length||null==r||(this.elements=i);try{if(!this.firstElement)return;yield this.slideApi.WidgetQuest.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetQuest.refreshUserData(this.elements)}select(e){this.slideApi.WidgetQuest.select(e)}handleRouteClick({direction:e,slideIndex:t,slidesCount:i,onClick:r}){this.firstElement&&this.slideApi.WidgetQuest.handleRouteClick(this.firstElement,{direction:e,slideIndex:t,slideCount:i,click:r})}}var jr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Ur extends Ar{constructor(e){super(),this.slideApi=e,this.type=Ur.name}init(e){return jr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-quiz");try{if(!this.firstElement)return;this.slideApi.WidgetQuiz.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetQuiz.refreshUserData(this.elements)}select(e){this.slideApi.WidgetQuiz.select(e)}slideQuizIsDone(e){return this.slideApi.WidgetQuiz.slideQuizIsDone(e)}}var Vr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Gr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Gr.name}init(e){return Vr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-quiz-grouped");try{if(!this.firstElement)return;this.slideApi.WidgetQuizGrouped.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetQuizGrouped.refreshUserData(this.elements)}select(e){this.slideApi.WidgetQuizGrouped.select(e)}slideQuizIsDone(e){return this.slideApi.WidgetQuizGrouped.slideQuizIsDone(e)}}var zr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Wr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Wr.name,this.disableSwipeGesture=this.disableSwipeGesture.bind(this),this.enableSwipeGesture=this.enableSwipeGesture.bind(this)}init(e){return zr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-range-slider"),this.slideContent=e;try{if(!this.firstElement)return;this.slideApi.WidgetRangeSlider.initWidget(this.firstElement),this.registerMouseAndTouchEvents()}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetRangeSlider.refreshUserData(this.elements)}click(e){this.slideApi.WidgetRangeSlider.click(e)}isClickCapturedBySlider(e){return this.slideApi.WidgetRangeSlider.isClickCapturedBySlider(e)}disableSwipeGesture(e){sr()}enableSwipeGesture(e){rr()}registerMouseAndTouchEvents(){this.slideContent.addEventListener("mouseup",this.enableSwipeGesture),this.slideContent.addEventListener("touchend",this.enableSwipeGesture),this.slideContent.addEventListener("mousedown",this.disableSwipeGesture),this.slideContent.addEventListener("touchstart",this.disableSwipeGesture)}unregisterMouseAndTouchEvents(){var e,t,i,r;null===(e=this.slideContent)||void 0===e||e.removeEventListener("mouseup",this.enableSwipeGesture),null===(t=this.slideContent)||void 0===t||t.removeEventListener("touchend",this.enableSwipeGesture),null===(i=this.slideContent)||void 0===i||i.removeEventListener("mousedown",this.disableSwipeGesture),null===(r=this.slideContent)||void 0===r||r.removeEventListener("touchstart",this.disableSwipeGesture)}destroy(){this.unregisterMouseAndTouchEvents()}}var $r=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Hr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Hr.name}init(e){return $r(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-rate");try{this.slideApi.WidgetRate.initWidget(this.elements)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetRate.refreshUserData(this.elements)}select(e){this.slideApi.WidgetRate.select(e)}setUserData(e,t=""){this.slideApi.WidgetRate.setUserData(e,t)}}var qr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Zr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Zr.name,this.handleShareComplete=this.handleShareComplete.bind(this)}init(e){return qr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-share"),this.slideContent=e;const t=e.querySelectorAll(".narrative-slide.narrative-multi-slide");try{this.registerEvents(),this.slideApi.WidgetShare.initWidget(this.elements,Array.from(t))}catch(e){console.error(e)}}))}complete(e,t){this.slideApi.WidgetShare.complete(e,t)}refreshUserData(){this.elements&&this.slideApi.WidgetShare.refreshUserData(this.elements)}click(e){this.slideApi.WidgetShare.click(e)}destroy(){this.unregisterEvents()}registerEvents(){mt.on(`${Zr.name}.shareComplete`,this.handleShareComplete)}unregisterEvents(){mt.off(`${Zr.name}.shareComplete`,this.handleShareComplete)}handleShareComplete({shareId:e,result:t}){ri(`[Share Widget]: share complete, { shareId, result }: ${e}, ${t}}`),this.complete(e,t)}}var Yr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Xr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Xr.name}init(e){return Yr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-test");try{if(!this.firstElement)return;this.slideApi.WidgetTest.initWidget(this.firstElement)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetTest.refreshUserData(this.elements)}select(e){this.slideApi.WidgetTest.select(e)}slideTestIsDone(e){return this.slideApi.WidgetTest.slideTestIsDone(e)}slideTestWithTimer(e){return this.slideApi.WidgetTest.slideTestWithTimer(e)}}var Qr=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Kr extends Ar{constructor(e){super(),this.slideApi=e,this.type=Kr.name}init(e){return Qr(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-vote");try{if(!this.firstElement)return;this.slideApi.WidgetVote.initWidget(this.firstElement);const e="narrative-element-quiz-next-button",t=this.firstElement.querySelector(`.${e}`);t&&t.classList.remove(e)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetVote.refreshUserData(this.elements)}select(e){this.slideApi.WidgetVote.select(e)}click(e){return this.slideApi.WidgetVote.click(e)}}const Jr={id:"",running:!1},es=(0,e.createStore)(Jr),ts=(0,e.createEvent)(),is=(0,e.createEvent)(),rs=(0,e.createEvent)(),ss=(0,e.createEffect)((({shareId:e,result:t})=>{rs(),fr(),mt.emit(`${Zr.name}.shareComplete`,{shareId:e,result:t})}));es.on(ts,((e,t)=>Object.assign(Object.assign({},e),{id:t.id,running:!0}))).on(rs,(()=>Jr)),(0,e.sample)({clock:is,source:es,filter:e=>e.running,fn:(e,t)=>({shareId:e.id,result:t.result}),target:ss});const ns={isOpened:!1,url:"",elementId:""},os=(0,e.createStore)(ns),as=(os.map((e=>e.isOpened)),(0,e.createEvent)()),ls=(0,e.createEvent)();(0,e.sample)({clock:as,target:sr}),(0,e.sample)({clock:ls,target:rr}),os.on(as,((e,t)=>({url:t.url,elementId:t.elementId,isOpened:!0}))).on(ls,(e=>ns));const ds=(0,e.createStore)({prevStoryId:-1,prevSlideIndex:-1}),cs=(0,e.createEvent)(),us=(0,e.createEvent)(),hs=(0,e.createEvent)(),ps=(0,e.createEffect)((e=>{e.prevStoryId!==e.currentStoryId&&mt.emit("publicEvents.showStory",{id:e.currentStoryId,index:e.currentSlideIndex}),-1!==e.prevStoryId&&mt.emit("statistics.nextSlide",{fromStoryId:e.prevStoryId,fromSlideIndex:e.prevSlideIndex}),mt.emit("publicEvents.showSlide",{id:e.currentStoryId,index:e.currentSlideIndex}),hs(e)}));ds.on(hs,((e,t)=>({prevStoryId:t.currentStoryId,prevSlideIndex:t.currentSlideIndex}))),ds.reset(us),(0,e.sample)({clock:cs,source:ds,fn:(e,t)=>Object.assign(Object.assign({},e),t),target:ps});class fs{constructor(){this.__lastUpdated=null,this._receiveTime=0,this._serverTimestamp=0,this.rawData={},this.myDictionary={}}get receiveTime(){return this._receiveTime}singleModelWrapper(){return""}attributes(){return["__lastUpdated"]}static prepareFromResponse(){}setAttributes(e){const t=this.attributes();let i=this;for(let r in e){let s=e[r];-1!==t.indexOf(r)&&(i[r]=s)}}static createInstance(e,t){const i=new e;let r=t;return""!==i.singleModelWrapper()&&void 0!==t[i.singleModelWrapper()]&&(r=t[i.singleModelWrapper()]),i.rawData=t,i.setAttributes(r),i._receiveTime=(new Date).getTime(),void 0!==t.server_timestamp&&(i._serverTimestamp=t.server_timestamp),i}static _fetch(e,t,i,r="get"){return new Promise(((e,t)=>{e({})}))}static _fetchList(e,t,i){return Promise.resolve({})}static emitEvent({type:e,event:t,eventData:i}){return Promise.resolve()}static update(e,t,i="post"){return Promise.resolve()}}class gs extends fs{static sentData(e,t,i){return new Promise((r=>{i("apiRequest",{url:"story-data/"+e,method:"put",params:null,data:t,headers:null}).then((e=>{r({data:e.data,status:200,headers:[{}]})})).catch((e=>{r({data:e,status:400,headers:[{}]})}))}))}static sendApiRequest({url:e,method:t,params:i,headers:r,data:s,profilingKey:n},o){return new Promise((n=>{o("apiRequest",{url:e,method:t,params:i,data:s,headers:r}).then((e=>{n({data:e.data,status:200,headers:[{}]})})).catch((e=>{n({data:e,status:400,headers:[{}]})}))}))}static sendApiRequestPromise(e,t,i){const{id:r,url:s,method:n,params:o,headers:a,data:l,cb:d}=JSON.parse(e);return i("apiRequest",{url:s,method:n,params:o,data:l,headers:a}).then((e=>{let i=JSON.stringify({requestId:r,data:JSON.stringify(e.data),status:e.status,headers:e.headers});t(d,i)}),(e=>{let i=JSON.stringify({requestId:r,data:JSON.stringify(e),status:400,headers:[{}]});t(d,i)}))}}class vs extends fs{attributes(){return["width","height","type","url"]}constructor(){super(),this._url=""}set url(e){this._url=e}get url(){let e=window.isSecureContext;return void 0===e&&"https:"===window.location.protocol&&(e=!0),e?this._url:this._url.replace(/^https:\/\//,"http://")}}const ms=p(3981);class ys{constructor(){this.images=[],this.color="",this.gradient=!1}static createFromArray(e){const t=new ys;for(let i in e)e.hasOwnProperty(i)&&t.images.push(vs.createInstance(vs,e[i]));return t}findOneByType(e){var t;return null!==(t=this.images.find((t=>t.type===e)))&&void 0!==t?t:null}findOneByCoverQuality(e){return this.findOneByType(this.mapCoverQualityToImageType(e))}findOneByWidth(e,t=!1){let i=null;return this.images.forEach((t=>{t.width===e&&(i=t)})),null!==i||t&&void 0!==(i=ms(this.images))?i:null}mapCoverQualityToImageType(e){switch(e){case q.Medium:return"m";case q.High:return"h"}}}const ws=()=>null!==p.nc&&void 0!==p.nc?p.nc:"";class Ss extends fs{constructor(){super(...arguments),this._title="",this.title_color="",this.magazine_name="",this.is_opened=!1,this._slides_html=[],this.slides_duration=[],this.slides_screenshot_share=[],this.source="",this.favorite=!1,this.like=0,this.slides_count=null,this.deeplink=null,this.hide_in_reader=null,this.blank=!1,this.disable_close=!1,this.need_placeholders=null,this._placeholders={},this.favorite_cell=!1,this.ugc_card_cell=!1,this.slidesLoaded=!1,this._imageSrc=null,this._parsedIssueArticleIds=null,this._parsedArticleIds=null,this._parsedSlideImage=null,this._video_cover=null,this._videoCoverSrc=null}static fetch(e,t){return this.placeholders=t,this._fetch(Ss,`story/${e}`,{expand:"slides_html,slides_duration"})}static fetchList(e,t,i){this.placeholders=e;const r={tags:t};return void 0!==i&&(r.favorite=Number(i)),this._fetchList(Ss,"story",r)}static fetchWithSlides(e,t){return this.placeholders=t,Promise.all(e.map((e=>this.fetch(e,t))))}static fetchOnboardingList(e,t){return this.placeholders=e,this._fetchList(Ss,"story-onboarding",{tags:t})}static fetchOnboardingListWithSlides(e,t){return this.placeholders=t,Promise.all(e.map((e=>this.fetch(e,t))))}attributes(){return ii()(super.attributes(),["title","title_color","source","magazine_name","background","background_color","id","image","display_to","display_from","slides_html","slides_duration","slides_screenshot_share","favorite","like","slides_count","deeplink","hide_in_reader","disable_close","like_functional","favorite_functional","share_functional","is_opened","tags","has_audio","has_placeholder","video_cover","need_placeholders","has_swipe_up","share_url","game_instance","blank","slidesLoaded"])}set image(e){this._image=ys.createFromArray(e)}get image(){return this._image}get issueArticleIds(){return this.parseHtmlSlidesForLinks(),null!==this._parsedIssueArticleIds?this._parsedIssueArticleIds:[]}get articleIds(){return this.parseHtmlSlidesForLinks(),null!==this._parsedArticleIds?this._parsedArticleIds:[]}imagePerSlide(e){var t,i;return this.parseHtmlSlidesForMainImage(),null!==(i=null===(t=this._parsedSlideImage)||void 0===t?void 0:t[e])&&void 0!==i?i:null}parseHtmlSlidesForLinks(){null===this._parsedArticleIds&&null===this._parsedIssueArticleIds&&this.slides_html.forEach((e=>{const t=e.match(/<[^<]*narrative-element-link.*data-link-type="([a-z-]*)".*data-link-target="(\d+)"[^<]*>/i);if(null!==t){const e=t[1],i=parseInt(t[2]);"article"===e?(null===this._parsedArticleIds&&(this._parsedArticleIds=[]),-1===this._parsedArticleIds.indexOf(i)&&this._parsedArticleIds.push(i)):"issue-article"===e&&(null===this._parsedIssueArticleIds&&(this._parsedIssueArticleIds=[]),-1===this._parsedIssueArticleIds.indexOf(i)&&this._parsedIssueArticleIds.push(i))}}))}parseHtmlSlidesForMainImage(){!this._parsedSlideImage&&this.slides_html.length&&(this._parsedSlideImage=this.slides_html.map((e=>this.parseSlideNarrativeImageSrc(e)||this.parseSlideNarrativeVideoPosterSrc(e)||null)))}parseSlideNarrativeImageSrc(e){const t=e.match(/<[^<]*narrative-element-image.*<img[^<]*src="([^"]*)"[^<]*>/i);return null==t?void 0:t[1]}parseSlideNarrativeVideoPosterSrc(e){const t=e.match(/<[^<]*narrative-element-video.*<video[^<]*poster\-remote\-src="([^"]*)"[^<]*>/i);return null==t?void 0:t[1]}set video_cover(e){null!==e&&(this._video_cover=ys.createFromArray(e))}get video_cover(){return this._video_cover}get videoCoverSrc(){if(!1===this._videoCoverSrc)return null;if(null===this._videoCoverSrc){const e=this.video_cover;if(null===e)return this._videoCoverSrc=!1,null;const t=e.findOneByType("h");if(null!==t)return t.url}return"string"==typeof this._videoCoverSrc?this._videoCoverSrc:null}get title(){return this._title}set title(e){if(!0===this.need_placeholders||!0===this.rawData.need_placeholders)for(let t in Ss.placeholders)Ss.placeholders.hasOwnProperty(t)&&(e=Kt(e,`%${t}%`,Ss.placeholders[t]));this.rawData.title=e,this._title=e}get slides_html(){return this._slides_html}set slides_html(e){if(!0===this.need_placeholders||!0===this.rawData.need_placeholders)for(let t in Ss.placeholders)if(Ss.placeholders.hasOwnProperty(t))for(let i=0;i<e.length;i++)e[i]=Kt(e[i],`%${t}%`,Ss.placeholders[t]);const t=ws();for(let i=0;i<e.length;i++)e[i]=Kt(e[i],"{{nonce}}",null!=t?t:"");this._slides_html=e}get isOpened(){return this.is_opened}set isOpened(e){this.is_opened=e,this.rawData.is_opened=e}}Ss.placeholders={};const bs=Ss,_s=p(4871);class xs extends fs{constructor(){super(...arguments),this.style="",this.widgetsData={}}static fetch(e){return this._fetch(xs,"story-context",{id:e.join(",")})}attributes(){return _s(super.attributes(),["style","widgetsData"])}}var Cs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class ks extends ht{constructor(e,t){super(),this.storiesItem=e,this._hasShare=t,this._muted=!0,this._activeSlideIndex=0,this.displayedSlides=[],this.displayedSlides=this.fillSlides(),this.redirectToSlide=this.redirectToSlide.bind(this),this.nextSlide=this.nextSlide.bind(this)}get id(){return this.storiesItem.id}get title(){return this.storiesItem.title}get slidesLoaded(){return this.storiesItem.slidesLoaded}get like(){return this.storiesItem.like}get favorite(){return this.storiesItem.favorite}get needBottomPanel(){return!this.storiesItem.blank&&(this.hasLike||this.hasFavorite||this.hasShare||this.hasAudio)}get hasLike(){return Boolean(this.storiesItem.like_functional)}get hasShare(){return!!Boolean(this.storiesItem.share_functional)&&this._hasShare}get hasFavorite(){return Boolean(this.storiesItem.favorite_functional)}get hasAudio(){return Boolean(this.storiesItem.has_audio)}get slides(){return this.displayedSlides}get activeSlideIndex(){return this._activeSlideIndex}get slidesCount(){var e;return null!==(e=this.storiesItem.slides_count)&&void 0!==e?e:0}get slidesDuration(){return this.storiesItem.slides_duration}get activeSlideDuration(){return this.slidesDuration[this.activeSlideIndex]}get hiddenTimeline(){return Array.isArray(this.storiesItem.slides_duration)&&1===this.storiesItem.slides_duration.length&&0===this.storiesItem.slides_duration[0]}get displayedSlideImage(){return this.storiesItem.blank?null:this.storiesItem.imagePerSlide(this.activeSlideIndex)}get isBlank(){return this.storiesItem.blank}get reachEnd(){return this.activeSlideIndex===this.slidesCount-1}get reachStart(){return 0===this.activeSlideIndex}get disableClose(){return this.storiesItem.disable_close}handleSlideClick(e){e.stopPropagation(),e.preventDefault()}nextSlide(){this.reachEnd||this.toSlide(this.activeSlideIndex+1)}prevSlide(){this.reachStart||this.toSlide(this.activeSlideIndex-1)}toSlide(e){this._activeSlideIndex=e,this.displayedSlides=this.fillSlides(),this.update()}updateStoriesItem(e){this.storiesItem=e,this.displayedSlides=this.fillSlides(),this.update()}fillSlides(){return this.slidesLoaded?Array.isArray(this.storiesItem.slides_html)?this.storiesItem.slides_html.slice(this._activeSlideIndex,this._activeSlideIndex+2):[]:[""]}setLike(e){this.updateStoryLike(e),mt.emit("publicEvents.likeStory",{id:this.id,index:this.activeSlideIndex,value:1===e})}setDislike(e){this.updateStoryLike(e),mt.emit("publicEvents.dislikeStory",{id:this.id,index:this.activeSlideIndex,value:-1===e})}setBookmark(e){return Cs(this,void 0,void 0,(function*(){const t=this.storiesItem.favorite;this.storiesItem.favorite=e,this.update();try{const t=yield Zi.setBookmark(this.id,e);if(null==t.favorite)return;this.storiesItem.favorite=t.favorite,mt.emit("publicEvents.favoriteStory",{id:this.id,index:this.activeSlideIndex,value:t.favorite})}catch(e){this.storiesItem.favorite=t,console.error(e)}finally{this.update()}}))}share(){return Cs(this,void 0,void 0,(function*(){mt.emit("publicEvents.shareStory",{id:this.id,index:this.activeSlideIndex}),this.isShareAsScreenshot()?mt.emit("storySlide.performScreenShotShareAction",{shareId:"slide-screenshot-share",hideElementsSelector:""}):oi()?yield this.performSessionShareAction():this.performWithoutSessionShareAction()}))}markAsOpened(){Zi.markAsOpened(this.id),this.storiesItem.isOpened=!0}updateStoryLike(e){return Cs(this,void 0,void 0,(function*(){try{const t=yield Zi.updateStoryLike(this.id,e);null!=t.like&&(this.storiesItem.like=t.like)}catch(e){console.error(e)}finally{this.update()}}))}isShareAsScreenshot(){var e,t;const i=null!==(t=null===(e=this.storiesItem)||void 0===e?void 0:e.slides_screenshot_share)&&void 0!==t?t:[],r=this._activeSlideIndex;return Boolean(i[r])}performSessionShareAction(){return Cs(this,void 0,void 0,(function*(){try{const{url:e}=yield Zi.getStorySharePath(this.id);if(!e)return;this.storiesItem.share_url=e,this.emitShareStoryWithPathEvent(e);const t={title:this.storiesItem.title,text:"",url:e};mt.emit("storySlide.performShareAction",{shareId:"story-share",config:t})}catch(e){console.error(e)}}))}performWithoutSessionShareAction(){const e=this.storiesItem.share_url;if(!e)return;this.emitShareStoryWithPathEvent(e);const t={title:this.storiesItem.title,text:"",url:e};mt.emit("storySlide.performShareAction",{shareId:"story-share",config:t})}redirectToSlide({slideIndex:e,layerIndex:t}){e!==this.activeSlideIndex&&this.toSlide(e)}emitShareStoryWithPathEvent(e){mt.emit("publicEvents.shareStoryWithPath",{id:this.id,index:this.activeSlideIndex,url:e})}}var As=p(5136);class Ls{constructor(e){this.window=e}get width(){const e=this.window.document.documentElement.clientWidth;return Math.abs(this.window.innerWidth-e)}setScrollbar(e=this.width){this._disableOverFlow(),this._setElementAttributes("body","paddingRight",(t=>t+e))}_disableOverFlow(){const e=this.window.document.body.style.overflow;e&&(this.window.document.body.dataset.overflow=e),this.window.document.body.style.overflow="hidden"}_setElementAttributes(e,t,i){const r=this.width;this.window.document.querySelectorAll(e).forEach((e=>{if(e!==this.window.document.body&&this.window.innerWidth>e.clientWidth+r)return;const s=e.style[t],n=this.window.getComputedStyle(e)[t];e.dataset[t]=s,e.style[t]=`${i(Number.parseFloat(n))}px`}))}resetScrollbar(){this._resetElementAttributes("body","overflow"),this._resetElementAttributes("body","paddingRight")}_resetElementAttributes(e,t){this.window.document.querySelectorAll(e).forEach((e=>{const i=e.dataset[t];void 0===i?e.style.removeProperty(t):(delete e.dataset[t],e.style[t]=i)}))}}var Ms=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Os extends ht{constructor(e,t){super(),this.storyReaderStoriesService=e,this.statisticsService=t,this._stories=[],this.displayedStories=[],this._currentIndex=0,this.activeListType=Se.default,this._hasShare=!1,this._placeholders=[],this.scrollbarHelper=new Ls(window),this.silentClose=!1,this._sourceInfo={},this.windowReferer=we.default,this.handleStoryListEvents(),this.initSlideApi()}initSlideApi(){this.slideApiHandlers=new _n(this),this.slideApi=(0,As.getSlideApi)(this.slideApiHandlers)}handleStoryListEvents(){this.handleClickOnStoryInternal=this.handleClickOnStoryInternal.bind(this),mt.on(`${St.name}.clickOnStoryInternal`,this.handleClickOnStoryInternal)}handleClickOnStoryInternal({payload:e,identityFields:t}){this.showMultipleStories(e,{identityFields:t})}get feedSlug(){var e,t;return null!==(t=null===(e=this.sourceInfo.identityFields)||void 0===e?void 0:e.feedSlug)&&void 0!==t?t:""}get widgetsData(){return he()(this.narrativeContext.widgetsData)?this.narrativeContext.widgetsData:{}}get sourceInfo(){return this._sourceInfo}get stories(){return this.displayedStories}get activeStory(){return this._activeStory}get currentIndex(){return this._currentIndex+1}get hasShare(){return this._hasShare}get placeholders(){return this._placeholders}get reachStart(){return 1===this.currentIndex}get reachEnd(){return this.currentIndex===this.displayedStories.length-2}setStories({listType:e,stories:t}){this.activeListType=e,this._stories=t.filter((e=>!e.hide_in_reader)).map((e=>fs.createInstance(bs,e))),this.displayedStories=[fs.createInstance(bs,{blank:!0,id:-1}),...this._stories,fs.createInstance(bs,{blank:!0,id:-2})].map((e=>new ks(e,this._hasShare))),this.setActiveStoryByIndex(this._currentIndex),this.update()}setNarrativeContext(e){this.narrativeContext=e instanceof xs?e:fs.createInstance(xs,e.rawData),this.initStoryResources(this.narrativeContext)}setActiveStoryById(e){this._currentIndex=this._stories.findIndex((t=>t.id===e)),this._activeStory=this.displayedStories[this._currentIndex+1],this.setNarrativeStory(this._activeStory)}setActiveStoryByIndex(e){this._currentIndex=e,this._activeStory=this.displayedStories[this._currentIndex+1],this.setNarrativeStory(this._activeStory)}getDisplayedStoryByIndex(e){return this.displayedStories[e]}setNarrativeStory(e){this.slideApiHandlers.setNarrativeStory(e)}open(e,t){this.windowReferer=e.windowReferer,this.setScrollBar(e.windowReferer),this._sourceInfo=t,this.setStories({listType:e.listType,stories:e.storyList}),this.setNarrativeContext({rawData:e.storyContext}),this.setActiveStoryById(e.id),this._hasShare=e.hasShare,this._placeholders=e.placeholders,this.activeListType=e.listType,this.statisticsService.init(t),this.update()}setScrollBar(e){e===we.default&&this.scrollbarHelper.setScrollbar()}resetScrollBar(e){e===we.default&&this.scrollbarHelper.resetScrollbar()}initStoryResources(e){(new In).init(e)}setStoriesAndContext(e){this.setStories({listType:e.listType,stories:e.storyList}),this.setNarrativeContext({rawData:e.storyContext})}close(e="closeReaderByCloseBtn"){var t;if(!this.activeStory||(null===(t=this.activeStory)||void 0===t?void 0:t.disableClose))return;this.resetScrollBar(this.windowReferer);const i=this.activeStory.id,r=this.activeStory.activeSlideIndex;this.emit("closeStoryReader"),mt.emit("statistics.closeStoryReader",{storyId:i,slideIndex:r}),mt.emit("publicEvents.closeStory",{id:i,index:r,action:e}),hr(),Cr(),us(),this.activeStory.markAsOpened(),this._sourceInfo={},this._activeStory=void 0,this.statisticsService.destroy(),this.update()}canBeClosed(){return!(!this.activeStory||this.activeStory.isBlank)&&!this.activeStory.disableClose}showSingleStory(e,t,i){return Ms(this,void 0,void 0,(function*(){try{const r=(new Date).getTime(),s=yield this.storyReaderStoriesService.fetchSingleStoryWithoutContext(e,t,i),n=((e,t)=>({windowReferer:we.default,listType:Se.default,id:e,storyContext:Gt.getState(),storyList:[t],hasShare:m.getState().share,placeholders:jt()}))(e,s);this.open(n,{listType:Se.direct,feedSlug:t});const o=yield this.storyReaderStoriesService.fetchSingleStoryContext(e,t);this.sleep(r),this.setStoriesAndContext({listType:Se.direct,storyList:[o],storyContext:Gt.getState()})}catch(e){console.error(e)}}))}showSingleStoryFromSharePage(e,t){return Ms(this,void 0,void 0,(function*(){try{return yield this.showSingleStory(e,"",t),t&&ni(!1),!0}catch(e){return!1}}))}showOnboardingStories(e){return Ms(this,void 0,void 0,(function*(){let t="onboarding";e&&e.feed&&Be()(e.feed)&&(t=e.feed),yield this.storyReaderStoriesService.fetchSessionAndStoriesCompositeFx({onboardingList:t,customTags:null==e?void 0:e.customTags,limit:null==e?void 0:e.limit});const i=$t(Se.onboarding,t);return!!i.length&&(yield this.showMultipleStories({windowReferer:we.default,listType:Se.onboarding,id:i[0].id},{identityFields:{feedSlug:t}}),!0)}))}showMultipleStories(e,t){return Ms(this,void 0,void 0,(function*(){const i=t.identityFields.feedSlug;try{ni(!0);const r=(new Date).getTime(),s=Ht(i),n=((e,t,i)=>{const r=$t(e.listType,i);let s=m.getState().share;return t===Ze.UGC&&(s=!1),Object.assign(Object.assign({},e),{storyContext:Vt(t,Gt.getState()||Ut(t,r.map((e=>e.id)))),storyList:r,hasShare:s,placeholders:jt()})})(e,s,i);this.open(n,{listType:e.listType,identityFields:t.identityFields}),yield this.storyReaderStoriesService.fetchMultipleStoriesContext(e.id,s,i),yield this.storyReaderStoriesService.fetchStoriesSlides(s,i);const o=this.storyReaderStoriesService.getStoryContextInternalModel(s);yield this.sleep(r),this.setStoriesAndContext({listType:e.listType,storyList:$t(e.listType,i),storyContext:Vt(s,o)})}catch(e){if(e instanceof qi)return;this.close()}}))}sleep(e){return Ms(this,void 0,void 0,(function*(){return new Promise((t=>{const i=Math.max(0,300-((new Date).getTime()-e));i?setTimeout(t,i):t()}))}))}nextStory(){var e;this.reachEnd||(null===(e=this.activeStory)||void 0===e||e.markAsOpened(),this.setActiveStoryByIndex(this._currentIndex+1),this.update())}prevStory(){var e;this.reachStart||(null===(e=this.activeStory)||void 0===e||e.markAsOpened(),this.setActiveStoryByIndex(this._currentIndex-1),this.update())}destroy(){mt.off(`${St.name}.clickOnStoryInternal`,this.handleClickOnStoryInternal)}closeGoodsWidget(){mt.emit("goodsWidget.close")}}class Es{constructor(e,t){this.storyManager=e,this.statisticsService=t}handle(e){var t;e.dataForSending=oi()?{data:this.statisticsService.getData()}:null;const i=()=>this.storyManager.clickOnButtonAction({src:yt.STORY_READER,payload:e});!(null===(t=this.storyManager.getConfig())||void 0===t?void 0:t.disableStatistic)&&e.dataForSending&&he()(e.dataForSending)&&Array.isArray(e.dataForSending.data)&&e.dataForSending.data.length>0?(this.statisticsService.cleanupData(),N("session/update",e.dataForSending,i)):i()}}class Is{constructor(e){this.storyManager=e}handle(e,t,i){var r,s,n;const o=i.listType,a=null!==(s=null===(r=i.identityFields)||void 0===r?void 0:r.feedSlug)&&void 0!==s?s:"",l=null===(n=i.identityFields)||void 0===n?void 0:n.filter,d=Ht(a),c={title:null,tags:[],slidesCount:null,feed:null,filter:null,source:null},u=Ke.getState().find((e=>e.id===t.id));if(u&&(c.title=u.stat_title,c.tags=u.tags,c.slidesCount=u.slides_count,u.type===Ze.UGC&&(c.ugcPayload=he()(u.payload)?u.payload:{})),d===Ze.DEFAULT?c.feed=a:d===Ze.UGC&&(c.filter=l),o===Se.direct?c.source=ye.direct:o===Se.default?c.source=ye.list:o===Se.onboarding?c.source=ye.onboarding:o===Se.favorite&&(c.source=ye.favorite),null!=t.index&&-1===["clickOnStory","showStory"].indexOf(e)&&(t.payload=null,u&&u.slides_payload&&Array.isArray(u.slides_payload))){const e=u.slides_payload.find((e=>e.slide_index===t.index));null!=e&&e.payload&&(t.payload=e.payload)}this.storyManager.emit(e,Object.assign(Object.assign({},t),c))}}var Ts=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Rs{constructor(e){this.storyManager=e}updateStatistics(e){return Ts(this,arguments,void 0,(function*({listType:e,updateDto:t}){var i;if(0===t.data.length)return t;let r=!1,s="";if(e===Ze.UGC||(null===(i=this.storyManager.getConfig())||void 0===i?void 0:i.disableStatistic))r=!0;else try{N("session/update",t,(()=>{})),r=!0}catch(e){s=e.toString()}if(r)return t;throw s}))}}var Ps=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Ds{constructor(e){this.storyManager=e}create(){const e=new Zi,t=new Rs(this.storyManager),i=new En(t);return this.storyReaderViewModel=new Os(e,i),this.storyManager.setViewModel(Os.name,this.storyReaderViewModel),this.handleStoryReaderViewModelEvents(i),this.storyReaderViewModel}handleStoryReaderViewModelEvents(e){this.handleEventBusEvents(),this.handlePublicEvents(e),this.handleGameCenterEvents()}handlePublicEvents(e){mt.on("publicEvents.clickOnButton",(t=>{new Es(this.storyManager,e).handle(t)})),this.subscribeToPublicEvents(),this.subscribeToWidgetEvent()}subscribeToWidgetEvent(){mt.on("publicEvents.widgetEvent",(e=>{const t=Xe.getState()[this.storyReaderViewModel.feedSlug];this.storyManager.emit("widgetEvent",{name:e.name,data:Object.assign(Object.assign({},e.devPayload),{feed_id:t})})}))}subscribeToPublicEvents(){const e=new Is(this.storyManager),t=["showSlide","showStory","closeStory","clickOnButton","likeStory","dislikeStory","favoriteStory","shareStory","shareStoryWithPath"];for(const i of t)mt.on(`publicEvents.${i}`,(t=>{const r=this.storyReaderViewModel.sourceInfo;e.handle(i,t,r)}))}handleEventBusEvents(){mt.on("storyReader.redirectToStory",(({storyId:e,feedSlug:t})=>{this.storyReaderViewModel.showSingleStory(e,t)})),mt.on("storyReader.closeStory",(()=>{this.storyReaderViewModel.close()}))}handleGameCenterEvents(){return Ps(this,void 0,void 0,(function*(){mt.on("openGameCenter",(e=>Ps(this,[e],void 0,(function*({gameId:e}){yield this.storyManager.openGame(e),ur(),mt.once(`${So.name}.gameComplete`,(()=>{hr()}))}))))}))}}class Ns extends(V()){constructor(){super(...arguments),this.layers=[]}init(e,t){this.layersContainer=e,this.animationApi=t,this.layers=Array.from(this.layersContainer.querySelectorAll(".narrative-slide.narrative-multi-slide")),this._activeLayer=this.layers.find((e=>!e.classList.value.includes("hidden")))}get activeLayer(){return this._activeLayer}getLayers(){return this.layers}hideLayer(e){this.animationApi.stop(e,!0),e.classList.add("hidden"),this.emit("hideLayer",{layer:e})}showLayer(e){mt.emit("story.showLayerByIndex"),e.classList.remove("hidden"),this.animationApi.start(e,!0),this._activeLayer=e,this.emit("showLayer",{layer:e})}hideAllLayers(){this.getLayers().forEach((e=>this.hideLayer(e)))}showLayerByIndex(e){const t=this.getLayers();t.forEach((e=>this.hideLayer(e)));const i=t[e];i&&this.showLayer(i)}hasValidMultiSlides(){let e=!0,t=this.layersContainer.querySelectorAll(".narrative-slide.narrative-multi-slide");const i=this.layersContainer.querySelectorAll(".narrative-slide.narrative-multi-slide:not(.hidden)");return t.length>0&&0===i.length&&(e=!1),e}}const Bs=function(){const e={step:1,maxSteps:100};var t=Object.prototype.hasOwnProperty;return function(r,s){s||(s={});var n={};for(var o in e)t.call(s,o)?n[o]=s[o]:n[o]=e[o];var a=Object.prototype.toString.call(r);"[object Array]"!==a&&"[object NodeList]"!==a&&"[object HTMLCollection]"!==a&&(r=[r]);for(var l=0;l<r.length;l++)i(r[l],n)};function i(e,t){if(!r(e)||e.getAttribute("textFitted"))return!1;var i,s,n,o;if(!r(s=e.parentElement))return!1;if(i=function(e){var t=window.getComputedStyle(e,null);return e.getBoundingClientRect().height-parseInt(t.getPropertyValue("padding-top"),10)-parseInt(t.getPropertyValue("padding-bottom"),10)}(s),i<=0)console.warn(`Set a static height and width on the target element ${e.outerHTML} before using textFit!`,e);else{e.setAttribute("textFitted","1");var a=t.step,l=o=parseFloat(window.getComputedStyle(e).fontSize);if(!(l<(n=o-a*t.maxSteps)))for(;l>=n;){if(!(e.getBoundingClientRect().height>i))break;l-=a,e.style.fontSize=l+"px"}}}function r(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}}();var Fs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class js{constructor(e){this.videoEl=e,this.parseDefaultMuted()}get $video(){return this.videoEl}get muted(){return this.videoEl.muted}get paused(){return this.videoEl.paused}start(){return Fs(this,void 0,void 0,(function*(){this.videoEl.pause(),this.videoEl.currentTime=0,yield this.play()}))}play(){return Fs(this,void 0,void 0,(function*(){const e=this.videoEl.play();e?yield e:yield new Promise((e=>{setTimeout(e,0)}))}))}pause(){this.videoEl.pause()}resume(){return Fs(this,void 0,void 0,(function*(){this.videoEl.paused&&(yield this.videoEl.play())}))}stop(){this.videoEl.pause(),this.videoEl.currentTime=0}mute(){"1"!==this.videoEl.getAttribute("data-default-muted")&&(this.videoEl.muted=!0)}unmute(){"1"!==this.videoEl.getAttribute("data-default-muted")&&(this.videoEl.muted=!1)}load(){return Fs(this,arguments,void 0,(function*(e=!0){return new Promise((t=>{const i=this.videoEl.oncanplaythrough?"canplaythrough":"canplay";this.videoEl.addEventListener(i,(()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t()}))}))}),{once:!0}),e&&this.videoEl.load()}))}))}on(e,t){return this.videoEl.addEventListener(e,t),this}once(e,t){return this.videoEl.addEventListener(e,t,{once:!0}),this}off(e,t){return this.videoEl.removeEventListener(e,t),this}parseDefaultMuted(){null===this.videoEl.getAttribute("data-default-muted")&&(this.videoEl.muted?this.videoEl.setAttribute("data-default-muted","1"):this.videoEl.setAttribute("data-default-muted","0"))}}var Us=p(3107),Vs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Gs extends js{constructor(e){super(e),this._vodData=null,this.handlePlayerError=this.handlePlayerError.bind(this),this._vodData=Gs.parseData(e)}get vodData(){return this._vodData}static get isBrowserSupported(){return Us.Player.isBrowserSupported()}load(){const e=Object.create(null,{load:{get:()=>super.load}});return Vs(this,void 0,void 0,(function*(){try{Gs.isBrowserSupported?(this.disableVideoPreload(),yield this.initPlayer()):(this.updateVideoSources(),yield e.load.call(this),console.error("[VOD]: Browser not supported!"))}catch(e){this.handlePlayerError({detail:e})}}))}stop(){var e;null===(e=this.player)||void 0===e||e.removeEventListener("error",this.handlePlayerError),super.stop()}static parseData(e){const t=e.getAttribute("data-vod");try{return t&&JSON.parse(t)}catch(e){return null}}initPlayer(){const e=Object.create(null,{stop:{get:()=>super.stop}});return Vs(this,void 0,void 0,(function*(){this.player=new Us.Player,this.player.addEventListener("error",this.handlePlayerError),yield this.attachVideoElement(),yield this.loadVideo(),yield this.play(),e.stop.call(this)}))}disableVideoPreload(){this.videoEl.preload="none"}updateVideoSources(){this.videoEl.innerHTML="";for(const e of this.vodData.formats){const t=document.createElement("source");t.src=e.url,t.type=e.mimeType,t.width=e.width,t.height=e.height,this.videoEl.appendChild(t)}}handlePlayerError(e){const t=e.detail,i=`[VOD]: error code ${t.code}; object ${t}`;throw console.error(i),new Error(i)}attachVideoElement(){return Vs(this,void 0,void 0,(function*(){yield this.player.attach(this.videoEl),ri("[VOD]: video element attached",this.videoEl)}))}loadVideo(){return Vs(this,void 0,void 0,(function*(){const e=Us.Player.convertJsonToUri(this.vodData);yield this.player.load(e,0,"application/json"),ri(`[VOD]: video ${e} successful loaded`)}))}}var zs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Ws{constructor(){this.videos=[]}init(e){return zs(this,void 0,void 0,(function*(){this.videos=[];for(const t of Array.from(e.querySelectorAll("video"))){const e=this.createVideoByElement(t);yield e.load(),this.videos.push(e)}}))}start(){return zs(this,void 0,void 0,(function*(){for(const e of this.videos)yield e.start()}))}pause(){for(const e of this.videos)e.pause()}resume(){return zs(this,void 0,void 0,(function*(){for(const e of this.videos)yield e.play()}))}stop(){for(const e of this.videos)e.stop()}static hasVideo(e){return Boolean(e.querySelector(".narrative-slide__with-video"))}mute(){for(const e of this.videos)e.mute()}unmute(){for(const e of this.videos)e.unmute()}createVideoByElement(e){return Gs.parseData(e)?new Gs(e):new js(e)}}var $s=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Hs{constructor(e){this.layerManager=e,this.videoContexts=new Map,this.muted=!1,this.handleShowLayer=this.handleShowLayer.bind(this),this.handleHideLayer=this.handleHideLayer.bind(this),this.subscribeLayerManager()}init(){return $s(this,void 0,void 0,(function*(){for(const e of this.layerManager.getLayers()){const t=new Ws;yield t.init(e),this.videoContexts.set(e,t)}}))}start(){return $s(this,void 0,void 0,(function*(){const e=this.getActiveVideoContext();yield null==e?void 0:e.start()}))}mute(){this.muted=!0;const e=this.getActiveVideoContext();null==e||e.mute()}unmute(){this.muted=!1;const e=this.getActiveVideoContext();null==e||e.unmute()}resume(){return $s(this,void 0,void 0,(function*(){const e=this.getActiveVideoContext();null==e||e.resume()}))}pause(){const e=this.getActiveVideoContext();null==e||e.pause()}stop(){for(const e of this.videoContexts.values())e.stop();this.videoContexts=new Map,this.unsubscribeLayerManager()}subscribeLayerManager(){this.layerManager.on("showLayer",this.handleShowLayer),this.layerManager.on("hideLayer",this.handleHideLayer)}unsubscribeLayerManager(){this.layerManager.off("showLayer",this.handleShowLayer),this.layerManager.off("hideLayer",this.handleHideLayer)}handleShowLayer({layer:e}){this.intheritMuted();const t=this.videoContexts.get(e);null==t||t.start()}handleHideLayer({layer:e}){const t=this.videoContexts.get(e);null==t||t.stop()}getActiveVideoContext(){const e=this.layerManager.activeLayer;if(e)return this.videoContexts.get(e)}intheritMuted(){this.muted?this.mute():this.unmute()}}var qs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Zs{constructor(e){this.videoContainer=e,this.videoContext=new Ws}init(){return qs(this,void 0,void 0,(function*(){yield this.videoContext.init(this.videoContainer)}))}start(){return qs(this,void 0,void 0,(function*(){yield this.videoContext.start()}))}pause(){this.videoContext.pause()}resume(){return qs(this,void 0,void 0,(function*(){yield this.videoContext.resume()}))}stop(){this.videoContext.stop()}mute(){this.videoContext.mute()}unmute(){this.videoContext.unmute()}}class Ys{static create(e,t){return e.querySelectorAll(".narrative-slide.narrative-multi-slide").length>0?new Hs(t):new Zs(e)}}var Xs=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Qs{constructor(e){this.animationApi=e,this.slideElement=null}init(e){this.slideElement=e.querySelector(".narrative-slide")}start(){try{if(!this.slideElement)return;this.animationApi.start(this.slideElement,!0)}catch(e){console.error(e)}}stop(){try{if(!this.slideElement)return;this.animationApi.stop(this.slideElement,!0)}catch(e){console.error(e)}}resume(){this.slideElement&&this.animationApi.resume(this.slideElement)}pause(){this.slideElement&&this.animationApi.pause(this.slideElement)}}var Ks;!function(e){e.None="none",e.Loading="loading",e.Loaded="loaded",e.Started="started",e.Paused="paused",e.Error="error"}(Ks||(Ks={}));var Js=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class en extends U.EventEmitter{constructor(e,t,i,r,s){super(),this.widgetManager=e,this.animationApi=t,this.slideContent=i,this.layersManager=r,this.slideApiHandlers=s,this._state=Ks.None,this.videoManager=null,this._muted=!1,this.narrativeAnimationContext=new Qs(this.animationApi)}get state(){return this._state}get meta(){return this._meta}get muted(){return this._muted}get isNavigationDisabled(){const e=this.slideContent.querySelector(".narrative-slide");return!!e&&"1"===e.dataset.disableNavigation}get isLoading(){return this.state===Ks.Loading||this.state===Ks.Error||!this.meta.slidesLoaded}get isVisible(){return this.state===Ks.Loaded||this.state===Ks.Started||this.state===Ks.Paused}destroy(){this.stop(),this.removeAllListeners()}resume(){return Js(this,void 0,void 0,(function*(){var e;try{if(this.state!==Ks.Paused)return;yield null===(e=this.videoManager)||void 0===e?void 0:e.resume(),this.narrativeAnimationContext.resume(),this.widgetManager.resume(),ri(`[SLIDE][resume]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),this.setState(Ks.Started)}catch(e){console.error(e)}}))}pause(){var e;this.state===Ks.Started&&(null===(e=this.videoManager)||void 0===e||e.pause(),this.narrativeAnimationContext.pause(),this.widgetManager.pause(),ri(`[SLIDE][pause]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),this.setState(Ks.Paused))}mute(){var e;this._muted=!0,null===(e=this.videoManager)||void 0===e||e.mute()}unmute(){var e;this._muted=!1,null===(e=this.videoManager)||void 0===e||e.unmute()}update(e){return Js(this,arguments,void 0,(function*({needSlideInitByFlipping:e,slidesLoaded:t,currentSlideIndex:i,activeSlideIndex:r,activeStoryId:s,currentStoryId:n}){const o=s===n,a=o||e,l=0===i,d=1===i;this.setMeta({activeSlideIndex:r,currentSlideIndex:i+r,currentStoryId:n,activeStoryId:s,slidesLoaded:t}),this.shouldInit(a,t,l)?yield this.init():a||this.stop(),o&&(this.shouldStart(l)?yield this.start():this.shouldStop(d)&&this.stop())}))}shouldInit(e,t,i){return e&&t&&this.state===Ks.None&&i}shouldStart(e){return this.state===Ks.Loaded&&e}shouldStop(e){return this.state===Ks.Started&&e}init(){return Js(this,void 0,void 0,(function*(){this.videoManager=Ys.create(this.slideContent,this.layersManager),this.narrativeAnimationContext.init(this.slideContent),this.slideContentInnerHTML=this.slideContent.innerHTML,ri(`[SLIDE][init]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),yield this.widgetManager.init(this.slideContent),yield this.load()}))}start(){return Js(this,void 0,void 0,(function*(){var e;try{if(this.state!==Ks.Loaded)throw new Error(`You must initialize the slide first. State: ${this.state}`);yield null===(e=this.videoManager)||void 0===e?void 0:e.start(),this.narrativeAnimationContext.start(),ri(`[SLIDE][start]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),this.setState(Ks.Started),this.slideApiHandlers.lock(this),this.slideApiHandlers.exec(),this.emit("start",{index:this.meta.activeSlideIndex,widgetManager:this.widgetManager,slideContent:this.slideContent})}catch(e){console.error(e)}}))}stop(){var e;this.state===Ks.Started&&(this.narrativeAnimationContext.stop(),null===(e=this.videoManager)||void 0===e||e.stop(),this.slideApiHandlers.unlock(this),ri(`[SLIDE][stop]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),this.widgetManager.stop(),this.resetSlideContentHTML(),this.setState(Ks.None))}resetSlideContentHTML(){this.slideContent.innerHTML=this.slideContentInnerHTML}setState(e){this._state=e,this.notifyPropertyChanged("state")}load(){return Js(this,void 0,void 0,(function*(){var e;if(this.state!==Ks.Loaded)try{ri(`[SLIDE][start_load]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`),yield this.loadResources(),yield(e=this.slideContent,Xs(void 0,void 0,void 0,(function*(){let t=0;return new Promise((i=>{const r=()=>{t++,e.getBoundingClientRect().height>0||t>10?i():requestAnimationFrame(r)};r()}))}))),this.fitNarrativeTextLines(),this.setState(Ks.Loaded),ri(`[SLIDE][end_load]:${this.meta.currentStoryId}:${this.meta.currentSlideIndex}`)}catch(e){console.error(e),this.setState(Ks.Error)}}))}loadResources(){return Js(this,void 0,void 0,(function*(){var e;yield this.loadMediaResources(this.slideContent),yield this.loadFonts(),Ws.hasVideo(this.slideContent)&&(this.setState(Ks.Loading),yield null===(e=this.videoManager)||void 0===e?void 0:e.init(this.slideContent))}))}loadFonts(){return new Promise((e=>{"fonts"in document?document.fonts.ready&&document.fonts.ready.catch(e).finally(e):e()}))}loadMediaResources(e){return new Promise((t=>function(e,t){const i=function(e){return new Promise((function(t,i){if("img"===e.tagName.toLowerCase()&&e instanceof HTMLImageElement){const i=()=>{requestAnimationFrame((()=>requestAnimationFrame((()=>{t(e),e.removeEventListener("load",i)}))))};e.addEventListener("load",i),e.complete&&0!==e.naturalHeight&&requestAnimationFrame((function(){requestAnimationFrame((function(){t(e)}))}))}else t(e);e.addEventListener("error",(function(e){var t=e.target instanceof HTMLImageElement;if(e&&e.target&&t&&e.target.style){e.target.style.display="none";var r=e.target.closest(".narrative-element-image");r&&(r.style.display="none")}i(e)}))}))},r=e.querySelectorAll("img,video");let s,n=[];for(s=0;s<r.length;++s)n.push(i(r[s]));n.length,Promise.all(n).then((e=>{t()}))}(e,t)))}fitNarrativeTextLines(){const e=Array.from(this.slideContent.querySelectorAll(".narrative-element-text-wrapper>.narrative-element-text-lines")).slice();Bs(e,{})}notifyPropertyChanged(e,t,i){this.emit("propertyChanged",{propertyName:e,from:t,to:i})}setMeta(e){this._meta=e,this.notifyPropertyChanged("meta")}}const tn=(e,t)=>{var i,r,s,n;const o=t.dataset;let a=null;const l=null!==(i=o.elementId)&&void 0!==i?i:"",d=null!==(r=o.linkType)&&void 0!==r?r:"",c=null!==(s=o.linkTarget)&&void 0!==s?s:"",u={url:()=>{a=decodeURIComponent(c),rn({activeStory:e,url:a,elementId:l}),sn(e,{linkType:d,url:a,elementId:l})},customAction:()=>{a=c,rn({activeStory:e,url:a,elementId:l}),sn(e,{linkType:d,url:a,elementId:l})},slide:()=>{e.redirectToSlide({slideIndex:parseInt(c),layerIndex:0})},story:()=>{const t=parseInt(c);rn({activeStory:e,url:c,elementId:l}),mt.emit("storyReader.redirectToStory",{storyId:t,feedSlug:"default"})},game:()=>{rn({activeStory:e,url:c,elementId:l}),mt.emit("openGameCenter",{gameId:c})},layer:()=>{mt.emit("storySlide.showLayer",{index:parseInt(c)})},closeStory:()=>{mt.emit("storyReader.closeStory")}};null===(n=u[d])||void 0===n||n.call(u)},rn=({activeStory:e,url:t,elementId:i})=>{mt.emit("publicEvents.widgetEvent",{name:"w-link",devPayload:{story_id:e.id,slide_index:e.activeSlideIndex,widget_id:i,widget_label:"",widget_value:t}})},sn=(e,{linkType:t,url:i,elementId:r})=>{e.markAsOpened(),mt.emit("statistics.transitionFromSlide",{storyId:e.id,slideIndex:e.activeSlideIndex}),"url"===t&&mt.emit("publicEvents.clickOnButton",{id:e.id,index:e.activeSlideIndex,url:i,elementId:r})},nn=(e,t)=>{const i={".narrative-element-quiz":Ur.name,".narrative-element-test":Xr.name,".narrative-element-quiz-grouped":Gr.name,".narrative-element-quest":Fr.name};for(const r of Object.keys(i)){if(e.closest(r)){const s=t.findWidgetByType(i[r]);return null==s||s.select(e),!1}}return!0},on=(e,t)=>{const i=t.findWidgetByType(Pr.name),r=t.findWidgetByType(Nr.name);return(null==i?void 0:i.isInited)?(i.select(e),!1):!(null==r?void 0:r.isInited)||(r.select(e),!1)};var an;!function(e){e[e.ALLOW_ALL_CLICKS=0]="ALLOW_ALL_CLICKS",e[e.DENY_NEXT_CLICK=1]="DENY_NEXT_CLICK",e[e.DENY_ALL_CLICKS=2]="DENY_ALL_CLICKS"}(an||(an={}));const ln=e=>e?an.ALLOW_ALL_CLICKS:an.DENY_NEXT_CLICK,dn=e=>{var t,i;const r=e.firstElement;if(!r)return an.ALLOW_ALL_CLICKS;const s={[Ur.name]:()=>{const t=e.slideQuizIsDone(r);return ln(t)},[Gr.name]:()=>{const t=e.slideQuizIsDone(r);return ln(t)},[Xr.name]:()=>{const t=e,i=t.slideTestIsDone(r);return t.slideTestWithTimer(r)&&!i?an.DENY_ALL_CLICKS:ln(i)},[Wr.name]:()=>e.isClickCapturedBySlider(r)?an.DENY_ALL_CLICKS:an.ALLOW_ALL_CLICKS};return null!==(i=null===(t=s[e.getType()])||void 0===t?void 0:t.call(s))&&void 0!==i?i:an.ALLOW_ALL_CLICKS};var cn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class un extends Ar{constructor(e){super(),this.slideApi=e,this.type=un.name}init(e){return cn(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-slide.narrative-multi-slide");try{if(!this.elements.length)return;this.slideApi.WidgetMultiSlide.init(Array.from(this.elements))}catch(e){console.error(e)}}))}destroy(){}}var hn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class pn extends Ar{constructor(e,t){super(),this.slideApi=e,this.story=t,this.type=pn.name,this.handleSwipeUpGesture=this.handleSwipeUpGesture.bind(this)}get swipeUpLinkTarget(){return this._swipeUpLinkTarget}get swipeUpElementId(){return this._swipeUpElementId}init(e){return hn(this,void 0,void 0,(function*(){var t,i;this.slideContent=e,this.elements=e.querySelectorAll(".narrative-element-swipe-up"),this.firstElement&&(this._swipeUpLinkTarget=decodeURIComponent(null!==(t=this.firstElement.getAttribute("data-link-target"))&&void 0!==t?t:""),this._swipeUpElementId=null!==(i=this.firstElement.getAttribute("data-element-id"))&&void 0!==i?i:void 0,mt.on("swipeController.swipeUp",this.handleSwipeUpGesture))}))}destroy(){mt.off("swipeController.swipeUp",this.handleSwipeUpGesture)}handleSwipeUpGesture(){if(!this._swipeUpLinkTarget||!this.slideContent||!this._swipeUpElementId)return;const e=this.slideContent.querySelector(`[data-element-id="${this._swipeUpElementId}"]`);e&&tn(this.story,e)}}var fn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class gn extends Ar{constructor(e){super(),this.slideApi=e,this.type=gn.name,this.handleSwipeUpGesture=this.handleSwipeUpGesture.bind(this),this.handleClick=this.handleClick.bind(this)}get swipeUpLinkTarget(){return this._swipeUpLinkTarget}get swipeUpElementId(){return this._swipeUpElementId}init(e){return fn(this,void 0,void 0,(function*(){var t,i;this.slideContent=e,this.elements=e.querySelectorAll(".narrative-element-swipe-up-items"),this.firstElement&&(this._swipeUpLinkTarget=decodeURIComponent(null!==(t=this.firstElement.getAttribute("data-link-target"))&&void 0!==t?t:""),this._swipeUpElementId=null!==(i=this.firstElement.getAttribute("data-element-id"))&&void 0!==i?i:void 0,this.registerEvents())}))}destroy(){this.unregisterEvents()}close(){ls(),hr(),this.setGoodsElementOpacity(1)}registerEvents(){var e;mt.on("swipeController.swipeUp",this.handleSwipeUpGesture),mt.on("goods.close",this.handleSwipeUpGesture),null===(e=this.firstElement)||void 0===e||e.addEventListener("click",this.handleClick)}unregisterEvents(){var e;mt.off("swipeController.swipeUp",this.handleSwipeUpGesture),null===(e=this.firstElement)||void 0===e||e.removeEventListener("click",this.handleClick)}handleClick(e){e.preventDefault(),e.stopPropagation(),this.open()}handleSwipeUpGesture(){this.open()}open(){if(!this._swipeUpLinkTarget||!this.slideContent||!this._swipeUpElementId)return;const e=decodeURIComponent(this._swipeUpLinkTarget);ur(),as({url:e,elementId:this._swipeUpElementId}),this.setGoodsElementOpacity(0)}setGoodsElementOpacity(e){var t;const i=null===(t=this.slideContent)||void 0===t?void 0:t.querySelector(`[data-element-id="${this._swipeUpElementId}"]`);i&&i.style.setProperty("display",e>0?"block":"none")}}var vn,mn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};!function(e){e.REFRESH_WIDGETS_STATE="REFRESH_WIDGETS_STATE"}(vn||(vn={}));class yn{constructor(e,t,i){this.slideApi=e,this.layersManager=t,this.story=i,this._widgets=[],this.showLayerByIndex=this.showLayerByIndex.bind(this),this.handleRefreshUserData=this.handleRefreshUserData.bind(this),this._widgets=[new Mr(e),new Er(e),new Pr(e),new Nr(e),new Fr(e),new Ur(e),new Gr(e),new Wr(e),new Hr(e),new Zr(e),new Xr(e),new Kr(e),new Tr(e),new un(e),new pn(e,i),new gn(e)]}get widgets(){return this._widgets}init(e){return mn(this,void 0,void 0,(function*(){this.layersManager.init(e,this.slideApi.Animation),mt.on("storySlide.showLayer",this.showLayerByIndex),mt.on(vn.REFRESH_WIDGETS_STATE,this.handleRefreshUserData);for(const t of this._widgets)yield t.init(e);this.layersManager.init(e,this.slideApi.Animation)}))}pause(){for(const e of this._widgets)e.pause()}resume(){for(const e of this._widgets)e.resume()}findWidgetByType(e){const t=this._widgets.find((t=>e===t.getType()));if(null==t?void 0:t.firstElement)return t}stop(){for(const e of this._widgets)e.destroy();mt.off("storySlide.showLayer",this.showLayerByIndex),mt.off(vn.REFRESH_WIDGETS_STATE,this.handleRefreshUserData)}destroy(){this.stop(),this._widgets=[]}handleRefreshUserData(){this._widgets.forEach((e=>e.refreshUserData()))}showLayerByIndex({index:e}){this.layersManager.showLayerByIndex(e)}}class wn{constructor(){this.cache={}}set(e,t){this.cache[e]=t}clear(){this.cache={}}get(e){return this.cache[e]}}class Sn{constructor(){this.actions=[]}push(e){this.actions.push(e)}exec(){for(const e of this.actions)e()}flush(){this.actions=[]}}var bn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class _n{constructor(e){this.storyReaderViewModel=e,this.deferredActionsQueue=new Sn,this.narrativeStoryCache=new wn,this.storySlideEngine=null}lock(e){if(this.storySlideEngine&&this.storySlideEngine!==e)throw new Error(`[SlideApi]: The resource is locked by story with ID ${this.storySlideEngine.meta.activeStoryId} and slide index ${this.storySlideEngine.meta.activeSlideIndex}`);this.storySlideEngine=e}unlock(e){this.storySlideEngine===e&&(this.storySlideEngine=null)}exec(){this.storySlideEngine&&(this.deferredActionsQueue.exec(),this.deferredActionsQueue.flush())}getStoryLocalData(){return bn(this,void 0,void 0,(function*(){if(!this.narrativeStory)return{};let e=sessionStorage.getItem("narrative_"+this.narrativeStory.id+"_data");return e?JSON.parse(e):{}}))}setStoryLocalData(e,t){if(!this.narrativeStory)return;let i=JSON.stringify(e);sessionStorage.setItem("narrative_"+this.narrativeStory.id+"_data",i),t&&oi()&&gs.sentData(this.narrativeStory.id,{data:i},Yt)}getStoryServerData(e){var t,i;return null!==(i=null===(t=this.storyReaderViewModel.widgetsData._narrative_saved_data)||void 0===t?void 0:t[e])&&void 0!==i?i:null}updateStoryServerData(e,t){this.storyReaderViewModel.widgetsData._narrative_saved_data=t}getSlideDuration(e,t){var i,r,s;return null!==(s=null===(r=null===(i=this.storyReaderViewModel.widgetsData._narrative_slides_duration)||void 0===i?void 0:i[e])||void 0===r?void 0:r[t])&&void 0!==s?s:null}pauseUI(){dr()}resumeUI(){cr()}showStoryTextInput(e,t){mt.emit("storySlide.showInputModal",{id:e,config:t})}setStorySessionValue(e,t){this.narrativeStoryCache.set(e,t)}getStorySessionValue(e){return this.narrativeStoryCache.get(e)}getWidgetsSharedData(e,t){var i,r,s;const n=this.storyReaderViewModel.widgetsData;switch(t){case"rangeSlider":return null===(i=n._narrative_range_slider_data)||void 0===i?void 0:i[e];case"poll":return null===(r=n._narrative_poll_data)||void 0===r?void 0:r[e];case"vote":return null===(s=n._narrative_vote_data)||void 0===s?void 0:s[e]}return null}openUrl(e){this.narrativeStory&&(this.narrativeStory.markAsOpened(),mt.emit("statistics.transitionFromSlide",{storyId:this.narrativeStory.id,slideIndex:this.narrativeStory.activeSlideIndex}),window.open(e,"_parent"))}sendApiRequest(e,t,i,r,s,n){return gs.sendApiRequest({url:e,method:t,params:i,headers:r,data:s,profilingKey:n},Yt)}share(e,t){null==e&&(e="story-share"),mt.emit("storySlide.performShareAction",{shareId:e,config:t})}shareSlideScreenshot(e,t){null==e&&(e="slide-screenshot-share"),mt.emit("storySlide.performScreenShotShareAction",{shareId:e,hideElementsSelector:null!=t?t:""})}showLayer(e){mt.emit("storySlide.showLayer",{index:e})}showStorySlide(e){this.pushToDefferedActionsQueueOrExec((()=>{var t;null===(t=this.narrativeStory)||void 0===t||t.redirectToSlide({slideIndex:e})}))}storyShowNext(){mt.emit(`${Os.name}.showNextStory`)}showNextSlide(e){this.pushToDefferedActionsQueueOrExec((()=>{mt.emit("story.showNextSlideWithDelay",e)}))}sendStatisticEvent(e,t,i){mt.emit("publicEvents.widgetEvent",{name:e,devPayload:i})}destroy(){}setNarrativeStory(e){this.narrativeStoryCache.clear(),this.narrativeStory=e,this.storySlideEngine&&this.unlock(this.storySlideEngine)}resetStory(e){return bn(this,void 0,void 0,(function*(){var t;let i={},r=yield this.getStoryLocalData();r=Object.assign({},null!==(t=this.getStoryServerData(e))&&void 0!==t?t:{},r);for(let e in r)r.hasOwnProperty(e)&&/^_gm_[A-z0-9-_]+_attempts$/.test(e)&&(i[e]=r[e]);mt.emit(vn.REFRESH_WIDGETS_STATE),this.updateStoryServerData(e,i),this.setStoryLocalData(i,!0),this.showStorySlide(0),this.showLayer(0)}))}pushToDefferedActionsQueueOrExec(e){this.storySlideEngine?e():this.deferredActionsQueue.push(e)}getStoryFonts(){const e=m.getState().cache;return null!=e&&Array.isArray(e)?m.getState().cache.filter((e=>"font-face"===e.type)):[]}}var xn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Cn{constructor(e){this.statisticsService=e,this.timerId=null}start(){this.schedule(1e4)}stop(){null!=this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}flush(){return xn(this,void 0,void 0,(function*(){ri(`[${En.name}]: flush statistics by timer`);this.statisticsService.getData().length>0?this.schedule(1e4):this.schedule(3e4),yield this.statisticsService.sendData()}))}schedule(e){ri(`[${En.name}]: schedule flush statistics on ${e}ms`),this.timerId=setTimeout((()=>this.flush()),e)}}class kn{calculate(){const e=Date.now(),t=e-this.slideStartedAt;return this.slideStartedAt=e,t}init(){this.slideStartedAt=Date.now()}}class An{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),mt.on("statistics.closeStoryReader",this.handle)}handle(e){this.statisticsService.addSlideEvent({action:1,storyId:e.storyId,slideIndex:e.slideIndex})}destroy(){mt.off("statistics.closeStoryReader",this.handle)}}class Ln{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),mt.on("statistics.nextSlide",this.handle)}handle(e){this.statisticsService.addSlideEvent({action:1,storyId:e.fromStoryId,slideIndex:e.fromSlideIndex})}destroy(){mt.off("statistics.nextSlide",this.handle)}}class Mn{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),mt.on("statistics.transitionFromSlide",this.handle)}handle(e){this.statisticsService.addSlideEvent({action:2,storyId:e.storyId,slideIndex:e.slideIndex})}destroy(){mt.off("statistics.transitionFromSlide",this.handle)}}var On=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class En extends(V()){constructor(e){super(),this.beaconService=e,this.lastIndex=0,this.data=[],this.sourceInfo=null,this.events=[],this.flushSheduler=new Cn(this),this.slideDurationCalculator=new kn}init(e){this.data=[],this.sourceInfo=e,this.lastIndex=0,this.slideDurationCalculator.init(),this.flushSheduler.start(),this.events=[new An(this),new Ln(this),new Mn(this)]}getData(){return this.data.slice()}getLastIndex(){return this.lastIndex}cleanupData(){this.data=[]}addSlideEvent(e){if(!oi())return;const t=this.slideDurationCalculator.calculate();this.data.push([e.action,this.lastIndex,e.storyId,e.slideIndex,t]),this.lastIndex++}sendData(){return On(this,void 0,void 0,(function*(){const e=this.getData();if(e.length)try{if(!this.sourceInfo)throw new Error(`[${En.name}]: You need pass source info!`);this.cleanupData(),yield this.beaconService.updateStatistics({updateDto:{data:e},listType:Ht(this.sourceInfo.feedSlug)})}catch(t){this.data.push(...e),console.error(t)}}))}destroy(){return On(this,void 0,void 0,(function*(){this.events.forEach((e=>e.destroy())),this.flushSheduler.stop(),yield this.sendData()}))}}class In{init(e){const t="stories-slider-style";let i=document.getElementById(t),r="";null!==e&&(r=e.style),null===i?(i=document.createElement("style"),i.type="text/css",i.id=t,i.attributes.setNamedItem(document.createAttribute("scoped")),i.setAttribute("nonce",ws()),i.styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r)),document.head.appendChild(i)):i.styleSheet?i.styleSheet.cssText=r:(i.textContent="",i.appendChild(document.createTextNode(r)))}}var Tn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Rn{constructor(e){this.storyManager=e}create(e){const t=new Yn(this.storyManager),i=new St(t,e);return this.storyManager.setViewModel(St.name,i),this.handleStoryListViewModelEvents(i,{listType:e.listType,identityFields:e.identityFields,isFavorite:e.isFavorite}),i}handleStoryListViewModelEvents(e,t){e.on("clickOnStoryInternal",(e=>Tn(this,void 0,void 0,(function*(){e.listType=t.isFavorite?Se.favorite:Se.default,e.windowReferer=t.isFavorite?we.favorite:we.default,mt.emit(`${St.name}.clickOnStoryInternal`,{payload:e,identityFields:t.identityFields})})))).on("clickOnStoryDeepLink",(e=>{Zi.markAsOpened(e.id),this.handleClickOnStoryDeepLink(e,{listType:t.listType})})).on("clickOnStoryGame",(({id:e,gameInstanceId:t})=>{Zi.markAsOpened(e),this.storyManager.openGame(t)})).on("clickOnStory",(e=>this.handleClickOnStory(e,t.identityFields)))}handleClickOnStoryDeepLink(e,{listType:t}){var i;const r={data:[[1,0,e.id,0,0]]},s=()=>{e.isDeeplink&&e.url&&this.storyManager.clickOnButtonAction({src:yt.STORY_LIST,payload:e})};t===Ze.UGC||(null===(i=this.storyManager.getConfig())||void 0===i?void 0:i.disableStatistic)?s():N("session/update",r,Do.createFunctionWithTimeout(s,1e3))}handleClickOnStory(e,t){if(0===e.id)return void this.storyManager.emit("clickOnFavoriteCell",{feed:t.feedSlug});const i=t.feedSlug,r=t.filter,s=Ht(i),n=Ke.getState().find((t=>t.id===e.id)),o={title:null,tags:[],slidesCount:null,feed:null,filter:null,source:null};n&&(o.title=n.stat_title,o.tags=n.tags,o.slidesCount=n.slides_count),s===Ze.DEFAULT?o.feed=i:s===Ze.UGC&&(o.filter=r),o.source=ye.list,this.storyManager.emit("clickOnStory",Object.assign(Object.assign({},e),o))}}class Pn{static create(e,t){const i=fs.createInstance(bs,{id:0,title:t.title.content,title_color:t.title.color,is_opened:!0,background_color:"white"});return i.favorite_cell=!0,new bt(e,i)}}class Dn{static create(e,t){let i=[];t.image&&t.image.svgSrc&&t.image.svgSrc.baseState&&i.push({width:100,height:100,type:"h",url:`data:image/svg+xml,${pi(t.image.svgSrc.baseState)}`});const r=fs.createInstance(bs,{id:-100,title:t.title.content,title_color:t.title.color,is_opened:!1,background_color:t.backgroundColor,image:i});return r.ugc_card_cell=!0,new gt(e,r)}}class Nn{constructor(e=0,t=0,i=0,r=0){this.x=e,this.y=t,this.width=i,this.height=r}overlaps(e){return this.x+this.width>=e.x&&this.x<=e.x+e.width&&this.y+this.height>=e.y&&this.y<=e.y+e.height}getIntersection(e){const t=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.x,e.x),r=Math.min(this.y+this.height,e.y+e.height),s=Math.max(this.y,e.y);return new Nn(Math.min(t,i),Math.min(r,s),Math.max(0,t-i),Math.max(0,r-s))}getArea(){return this.width*this.height}getAreaFraction(e){return+(this.getArea()/e.getArea()*100).toFixed(2)}static clone(e){return new Nn(e.x,e.y,e.width,e.height)}}class Bn{constructor(e){this.feedCoverageAnalyticsCalculator=e,this.storiesIds=new Set,this.getNewStoriesIds=e=>{const t=[];for(const i of e)this.storiesIds.has(i)||t.push(i);return t}}markStoryAsFullVisible(e){this.storiesIds.has(e)||(this.storiesIds.add(e),this.feedCoverageAnalyticsCalculator.emit("flushThumbViews",[e]))}calculate(e){const t=this.getNewStoriesIds(e.map((({id:e})=>e)));t.forEach((e=>this.storiesIds.add(e))),0!==t.length&&this.feedCoverageAnalyticsCalculator.emit("flushThumbViews",t)}}class Fn{constructor(e){this.feedCoverageAnalyticsCalculator=e}calculate(e){const t=e.map((({id:e,areaFraction:t})=>({storyId:e,visibleArea:Math.round(t)/100})));0!==t.length&&this.feedCoverageAnalyticsCalculator.emit("visibleAreaUpdated",t)}}class jn extends U.EventEmitter{constructor(){super(),this.storyRects=[],this.viewport=new Nn,this.filterStoryRectIntersections=e=>e.filter((e=>-100!==e.id&&e.areaFraction>0)),this.feedImpressionMetric=new Bn(this),this.visibleAreaMetric=new Fn(this)}calculate(e){const t=this.getScrollViewportByCalculationParams(e),i=this.getStoryRectIntersectionsWithViewport(t),r=this.filterStoryRectIntersections(i);this.calculateMetrics(r)}setViewport(e){this.viewport=e}setStoryRects(e){this.storyRects=e}markStoryAsFullVisible(e){this.feedImpressionMetric.markStoryAsFullVisible(e)}destroy(){this.removeAllListeners()}getScrollViewportByCalculationParams(e){const t=Nn.clone(this.viewport);return t.x+=e.minOffsetLeft,t.y+=e.minOffsetTop,t.width+=e.maxOffsetLeft-e.minOffsetLeft,t.height+=e.maxOffsetTop-e.minOffsetTop,t}calculateMetrics(e){this.feedImpressionMetric.calculate(e),this.visibleAreaMetric.calculate(e)}getStoryRectIntersectionsWithViewport(e){const t=[];for(const i of this.storyRects)if(i.overlaps(e)){const r=i.getIntersection(e);t.push({id:i.id,areaFraction:r.getAreaFraction(i)})}else t.push({id:i.id,areaFraction:0});return t}}class Un extends Nn{constructor(e,t=0,i=0,r=0,s=0){super(t,i,r,s),this.id=e}static clone(e){return new Un(e.id,e.x,e.y,e.width,e.height)}}class Vn{constructor(e){this.feedCoverageAnalyticsCalculator=e,this.viewportPadding={left:0,right:0,top:0,bottom:0},this.minOffsetLeft=0,this.maxOffsetLeft=0,this.minOffsetTop=0,this.maxOffsetTop=0}startScroll({x:e,y:t}){this.minOffsetLeft=e,this.minOffsetTop=t,this.maxOffsetLeft=e,this.maxOffsetTop=t}endScroll({x:e,y:t}){this.minOffsetLeft=Math.min(e,this.minOffsetLeft),this.maxOffsetLeft=Math.max(e,this.maxOffsetLeft),this.minOffsetTop=Math.min(t,this.minOffsetTop),this.maxOffsetTop=Math.max(t,this.maxOffsetTop),this.feedCoverageAnalyticsCalculator.calculate({minOffsetLeft:this.minOffsetLeft,maxOffsetLeft:this.maxOffsetLeft,minOffsetTop:this.minOffsetTop,maxOffsetTop:this.maxOffsetTop})}calculate(e,t){this.feedCoverageAnalyticsCalculator.calculate({minOffsetLeft:e,maxOffsetLeft:e,minOffsetTop:t,maxOffsetTop:t})}updateGeometry({stories:e,storyListRect:t,windowRect:i,viewportPadding:r}){this.viewportPadding=r,this.setViewport(t,i),this.setStoryRects(e,t)}destroy(){this.feedCoverageAnalyticsCalculator.destroy()}markStoryAsFullVisible(e){this.feedCoverageAnalyticsCalculator.markStoryAsFullVisible(e)}setViewport(e,t){const i=this.getViewportByWindowAndStoryList(t,e);this.applyPaddingToViewport(i,e),this.feedCoverageAnalyticsCalculator.setViewport(i)}getViewportByWindowAndStoryList(e,t){let i=new Nn;return t.overlaps(e)?(i=t.getIntersection(e),i):i}applyPaddingToViewport(e,t){t.width<768||(e.x+=this.viewportPadding.left,e.y+=this.viewportPadding.top,e.height-=this.viewportPadding.top+this.viewportPadding.bottom,e.width-=this.viewportPadding.left+this.viewportPadding.right)}setStoryRects(e,t){const i=[];e.forEach(((r,s)=>{const n=Number(r.dataset.id),o=new Un(n,r.offsetLeft,r.offsetTop,r.clientWidth,r.clientHeight);i.push(o),o.x+=t.x,o.y+=t.y,this.applyPaddingAndNegativeMarginToStoryRect(o,s,e.length-1)})),this.feedCoverageAnalyticsCalculator.setStoryRects(i)}applyPaddingAndNegativeMarginToStoryRect(e,t,i){const r=this.viewportPadding;0===t&&(e.x+=r.left,e.width-=r.left),t===i&&(e.width-=r.right)}}class Gn{constructor(e,t){this.storyManager=e,this.params=t,this.handleFlushThumbViews=this.handleFlushThumbViews.bind(this),this.handleVisibleAreaUpdated=this.handleVisibleAreaUpdated.bind(this)}create(){const e=new jn;e.on("flushThumbViews",this.handleFlushThumbViews),e.on("visibleAreaUpdated",this.handleVisibleAreaUpdated);return new Vn(e)}handleFlushThumbViews(e){const t=o.getState();this.params.listType!==Ze.DEFAULT||t.disableStatistic||b(e);const i=this.params.identityFields.feedSlug,r=this.params.identityFields.filter,s=Ht(i),n={stories:e.map((e=>{const t={title:null,tags:[],slidesCount:null},i=Ke.getState().find((t=>t.id===e));return i&&(t.title=i.stat_title,t.tags=i.tags,t.slidesCount=i.slides_count,i.type===Ze.UGC&&(t.ugcPayload=he()(i.payload)?i.payload:{})),Object.assign({id:e},t)})),feed:null,filter:null};s===Ze.DEFAULT?n.feed=i:s===Ze.UGC&&(n.filter=r),this.storyManager.emit("feedImpression",n)}handleVisibleAreaUpdated(e){const t=this.params.identityFields.feedSlug,i=this.params.identityFields.filter,r=Ht(t),s={stories:e.map((({storyId:e,visibleArea:t})=>{const i={title:null,tags:[],slidesCount:null,visibleArea:t},r=Ke.getState().find((t=>t.id===e));return r&&(i.title=r.stat_title,i.tags=r.tags,i.slidesCount=r.slides_count,r.type===Ze.UGC&&(i.ugcPayload=he()(r.payload)?r.payload:{})),Object.assign({id:e},i)})),feed:null,filter:null};r===Ze.DEFAULT?s.feed=t:r===Ze.UGC&&(s.filter=i),this.storyManager.emit("visibleAreaUpdated",s)}}const zn=p(4871);var Wn;!function(e){e.FONT="font-face"}(Wn||(Wn={}));class $n extends fs{attributes(){return zn(super.attributes(),["weight","style","type","url","title","family","format"])}constructor(){super(),this._url=""}set url(e){this._url=e}get url(){let e=window.isSecureContext;return void 0===e&&"https:"===window.location.protocol&&(e=!0),e?this._url:this._url.replace(/^https:\/\//,"http://")}get isFont(){return this.type===Wn.FONT}get fontFaceAsCss(){var e,t,i;if(!this.isFont)return null;let r={"font-family":null!==(e=this.family)&&void 0!==e?e:"normal",src:`url('${this.url}')`,"font-style":null!==(t=this.style)&&void 0!==t?t:"normal","font-weight":null!==(i=this.weight)&&void 0!==i?i:"normal"};return this.title&&(r.src+=`, local('${this.title}')`),`@font-face {${gi(r)}}\n`}}p(3981);class Hn{constructor(){this.resources=[]}static createFromArray(e){const t=new Hn;for(let i in e)e.hasOwnProperty(i)&&t.resources.push($n.createInstance($n,e[i]));return t}get fontsCss(){let e="";return this.resources.forEach((t=>{if(t.isFont){let i=t.fontFaceAsCss;null!==i&&(e+=i)}})),e||null}}class qn extends fs{constructor(){super(),this.id=null,this.expire_in=null,this.closed=!1,this.is_allow_profiling=!1,this.preview_aspect_ratio=1,this._placeholders={}}singleModelWrapper(){return""}attributes(){return ii()(super.attributes(),["server_timestamp","session","cache","share","user_key","placeholders","is_allow_profiling","preview_aspect_ratio"])}static fetch(e){return this._fetch(qn,"session/open?expand=cache",e,"post")}static updateSession(e){return this.update("session/update",e)}set session(e){this.id=e.id,this.expire_in=e.expire_in,void 0!==e.closed&&(this.closed=e.closed)}set cache(e){this._projectResourceCache=Hn.createFromArray(e)}get cache(){return this._projectResourceCache}set placeholders(e){Ee()(e)&&e.forEach((e=>{he()(e)&&void 0!==e.name&&void 0!==e.default_value&&(this._placeholders[e.name]=e.default_value)}))}get placeholders(){return this._placeholders}}var Zn=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Yn{constructor(e){this.storyManager=e}loadStories(e){return Zn(this,arguments,void 0,(function*({listType:e,identityFields:t,testKey:i,needFavorite:r=!0}){const s=e===Ze.DEFAULT&&r;yield Ti({defaultList:t,onboardingList:!1,favoriteList:s,testKey:i});const n=$t(Se.default,t.feedSlug),o=t.feedSlug===ho?Ze.UGC:Ze.DEFAULT;const a={stories:n.map((e=>{const t={title:null,tags:[],slidesCount:null};return e&&(t.title=e.stat_title,t.tags=e.tags,t.slidesCount=e.slides_count,e.type===Ze.UGC&&(t.ugcPayload=he()(e.payload)?e.payload:{})),Object.assign({id:e.id},t)})),feed:null,filter:null};o===Ze.DEFAULT?a.feed=t.feedSlug:o===Ze.UGC&&(a.filter=t.filter),this.storyManager.emit("feedLoad",a);return{defaultStories:$t(Se.default,t.feedSlug),favoriteStories:$t(Se.favorite,t.feedSlug)}}))}observeDefaultStories(e){return it.map((t=>{var i;return(null!==(i=t[e])&&void 0!==i?i:[]).map((e=>this.createStoryByData(Object.assign(Object.assign({},e),{slides_html:[]}))))}))}observeFavoriteStories(){return st.map((e=>e.map((e=>this.createStoryByData(Object.assign(Object.assign({},e),{slides_html:[]}))))))}observeSession(){return m.map((e=>fs.createInstance(qn,e)))}createStoryByData(e){return e instanceof bs?e:fs.createInstance(bs,e)}}class Xn{constructor(e){this.lastClientX=0,this.lastClientY=0,this.pushed=!1,this.sliderApi=e,this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleAnimationEnd=this.handleAnimationEnd.bind(this),this.addEventListeners()}addEventListeners(){const e=this.sliderApi.getElementRef();e.addEventListener("mousedown",this.handleMouseDown,Ei),e.addEventListener("touchstart",this.handleMouseDown,Ei),e.addEventListener("transitionend",this.handleAnimationEnd,Ei)}scrollTo(e){const t=this.sliderApi.getElementRef(),i="ltr"===this.sliderApi.dir?-1:1;t.style.transform=`translate3d(${i*e.x}px, ${-1*e.y}px, 0px)`,this.sliderApi.updatePosition(e.x,e.y),this.sliderApi.testAttraction(),this.sliderApi.emit("scroll",e)}scrollWithAnimation(e,t){this.sliderApi.setIsScrolling(!0);const i=this.sliderApi.getCurrentPosition();if(i.x===e.x&&i.y===e.y)return;this.sliderApi.getElementRef().style.transitionDuration=`${t}ms`,this.scrollTo(e)}stopAnimation(){this.sliderApi.setIsScrolling(!1);this.sliderApi.getElementRef().style.transitionDuration="0ms"}destroy(){const e=this.sliderApi.getElementRef();e.removeEventListener("mousedown",this.handleMouseDown,Ei),e.removeEventListener("touchstart",this.handleMouseDown,Ei),e.removeEventListener("mouseup",this.handleMouseUp,Ei),e.removeEventListener("touchend",this.handleMouseUp,Ei),e.removeEventListener("mousemove",this.handleMouseMove,Ei),e.removeEventListener("touchmove",this.handleMouseMove,Ei),e.removeEventListener("transitionend",this.handleAnimationEnd,Ei)}handleAnimationEnd(){this.stopAnimation(),this.sliderApi.emit("scrollend",this.sliderApi.getCurrentPosition())}handleMouseDown(e){this.pushed=!0,this.stopAnimation();const{clientX:t,clientY:i}=this.extractPointerPosition(e);this.lastClientX=t,this.lastClientY=i,window.addEventListener("mouseup",this.handleMouseUp,Ei),window.addEventListener("touchend",this.handleMouseUp,Ei),window.addEventListener("mousemove",this.handleMouseMove,Ei),window.addEventListener("touchmove",this.handleMouseMove,Ei)}handleMouseUp(){this.pushed&&(this.pushed=!1,this.sliderApi.isDragging&&(this.sliderApi.setIsDragging(!1),this.sliderApi.emit("scrollend",this.sliderApi.getCurrentPosition())),window.removeEventListener("mouseup",this.handleMouseUp,Ei),window.removeEventListener("touchend",this.handleMouseUp,Ei),window.removeEventListener("mousemove",this.handleMouseMove,Ei),window.removeEventListener("touchmove",this.handleMouseMove,Ei))}handleMouseMove(e){if(!this.pushed)return;const{clientX:t,clientY:i}=this.extractPointerPosition(e),r=t-this.lastClientX,s=i-this.lastClientY;this.lastClientX=t,this.lastClientY=i;const{x:n,y:o}=this.sliderApi.preparePosition(this.sliderApi.getCurrentPosition().x-r,this.sliderApi.getCurrentPosition().y-s);this.scrollTo({x:n,y:o}),!this.sliderApi.isDragging&&(Math.abs(r)>=1||Math.abs(s)>=1)&&(this.sliderApi.setIsDragging(!0),this.sliderApi.emit("scrollstart",this.sliderApi.getCurrentPosition()))}extractPointerPosition(e){return e instanceof MouseEvent?{clientX:e.clientX,clientY:e.clientY}:{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}}var Qn=p(2784),Kn=p.n(Qn);class Jn{constructor(e){this.rafId=0,this.prevTranslateX=null,this.prevTranslateY=null,this.handleScroll=this.handleScroll.bind(this),this.sliderApi=e,this.handleNativeScrollEnd=Kn()((()=>{this.sliderApi.emit("scrollend",this.sliderApi.getCurrentPosition()),this.sliderApi.setIsScrolling(!1)}),300),this.init(),this.addEventListeners()}destroy(){this.sliderApi.getElementRef().removeEventListener("scroll",this.handleScroll)}init(){const e=this.sliderApi.getElementRef();e.style.overflowX=this.sliderApi.isHorizontal()?"scroll":"hidden",e.style.overflowY=this.sliderApi.isHorizontal()?"hidden":"scroll"}addEventListeners(){this.sliderApi.getElementRef().addEventListener("scroll",this.handleScroll)}scrollTo(e){const t=this.sliderApi.getElementRef(),i="ltr"===this.sliderApi.dir?1:-1;t.scrollLeft=i*e.x,t.scrollTop=e.y,this.sliderApi.updatePosition(e.x,e.y),this.sliderApi.testAttraction(),this.sliderApi.emit("scroll",e)}scrollWithAnimation(e,t){this.performNativeAnimation(e.x,e.y,t)}stopAnimation(){}handleScroll(){this.sliderApi.isScrolling||(this.sliderApi.emit("scrollstart",this.sliderApi.getCurrentPosition()),this.sliderApi.setIsScrolling(!0));const e=this.sliderApi.getElementRef();this.sliderApi.updatePosition(Math.abs(e.scrollLeft),Math.abs(e.scrollTop)),this.sliderApi.testAttraction(),this.sliderApi.emit("scroll",{x:e.scrollLeft,y:e.scrollTop}),this.handleNativeScrollEnd()}performNativeAnimation(e,t,i){const{x:r,y:s}=this.sliderApi.getCurrentPosition(),n=e-r,o=t-s;if(Math.abs(n)<=1&&Math.abs(o)<=1)return;if(this.prevTranslateX===e&&this.prevTranslateY===t)return;this.prevTranslateX=e,this.prevTranslateY=t;let a=performance.now();cancelAnimationFrame(this.rafId);const l=e=>{const t=e-a,d=Math.min(t/i,1),c=d*n+r,u=d*o+s;this.scrollTo({x:c,y:u}),d<1?this.rafId=requestAnimationFrame(l):(this.prevTranslateX=null,this.prevTranslateY=null)};this.rafId=requestAnimationFrame(l)}}var eo;!function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(eo||(eo={}));class to extends U.EventEmitter{constructor(){super(...arguments),this._isScrolling=!1,this._isDragging=!1,this.currentPosition={x:0,y:0},this.direction=eo.Horizontal,this.gap=20,this._reachBeginning=!0,this._reachEnd=!0,this.desktopMode=!0,this._dir="ltr"}get isDragging(){return this._isDragging}get isScrolling(){return this._isScrolling}get slides(){return Array.from(this.slider.children)}get elementRef(){return this.slider}get reachBeginning(){return this._reachBeginning}get reachEnd(){return this._reachEnd}get scrollWidth(){return this.slider.scrollWidth}get dir(){return this._dir}mount(e){this.slider=e,this.changeScrollStrategy()}destroy(){this.removeAllListeners(),this.scrollStrategy.destroy()}getLength(){var e,t;return null!==(t=null===(e=this.slider)||void 0===e?void 0:e.children.length)&&void 0!==t?t:0}changeDirection(e){this.direction=e,this.scrollTo(0,0),this.changeScrollStrategy()}setGap(e){this.gap=e}setDesktopMode(e){this.desktopMode=e,this.changeScrollStrategy()}getGap(){return this.gap}scrollTo(e,t=300){this.isScrolling||this.emit("scrollstart",this.currentPosition);const i=this.preparePosition(e,e);t>0?this.scrollStrategy.scrollWithAnimation(i,t):(this.scrollStrategy.scrollTo(i),this.emit("scrollend",this.currentPosition))}isHorizontal(){return this.direction===eo.Horizontal}updatePosition(e,t){this.currentPosition={x:e,y:t}}getElementRef(){return this.slider}getCurrentPosition(){return this.currentPosition}preparePosition(e,t){let i={x:e,y:t};return this.isHorizontal()?i.y=0:i.x=0,this.attractToBounds(i.x,i.y)}attractToBounds(e,t){return{x:this.attractToBoundsByX(e),y:this.attractToBoundsByY(t)}}attractToBoundsByX(e){return e<=0?0:e+this.slider.clientWidth>=this.slider.scrollWidth?this.slider.scrollWidth-this.slider.clientWidth:e}attractToBoundsByY(e){return e<=0?0:e+this.slider.clientHeight>=this.slider.scrollHeight?this.slider.scrollHeight-this.slider.clientHeight:e}testAttraction(){const{x:e,y:t}=this.getCurrentPosition(),i=e+this.slider.clientWidth>=Math.max(this.slider.scrollWidth-1,0),r=t+this.slider.clientHeight>=Math.max(this.slider.scrollHeight-1,0);this._reachBeginning=0===e&&0===t,this._reachEnd=this.isHorizontal()?i:r,this.emit("reachBeginning",this._reachBeginning),this.emit("reachEnd",this._reachEnd)}setIsScrolling(e){this._isScrolling=e}setIsDragging(e){this._isDragging=e}setTextDirection(e){this._dir=e}scrollBySlideIndex(e,t){this.isHorizontal()?this.scrollTo(this.slides[e].offsetLeft,t):this.scrollTo(this.slides[e].offsetTop,t)}scrollByDirection(e,t){const{x:i,y:r}=this.getCurrentPosition(),s=this.isHorizontal()?i:r,n=this.getSlidesPerView(),o=this.getStoryWidth(),a=this.getStoryHeight(),l=s+e*n*(this.isHorizontal()?o:a);this.scrollTo(l,t)}getSlidesPerView(){if(this.isHorizontal()&&this.slider.clientWidth){const e=this.slider.children[0].clientWidth+this.gap;return Math.round(this.slider.clientWidth/e)}if(!this.isHorizontal()&&this.slider.clientHeight){const e=this.slider.children[0].clientHeight+this.gap;return Math.round(this.slider.clientHeight/e)}return 1}getStoryWidth(){var e;return(null===(e=this.slides[0])||void 0===e?void 0:e.clientWidth)+this.gap}getStoryHeight(){var e;return(null===(e=this.slides[0])||void 0===e?void 0:e.clientHeight)+this.gap}changeScrollStrategy(){this.scrollStrategy&&this.scrollStrategy.destroy(),this.scrollStrategy=this.desktopMode?new Xn(this):new Jn(this)}}const io=.53167701863;class ro{constructor(e,t,i,r,s){this._vw=e,this._vh=t,this.actionPanelHeight=i,this.needBottomPanel=r,this.desktopMode=s,this.viewportRatio=1,this.slideRatio=.64516129032,this.viewportRatio=e/t}get shouldBeShownMobileFrame(){return this.viewportRatio<io}get vw(){return this._vw}get vh(){return this._vh}get shouldBeShownSafeAreaInsets(){return this.viewportRatio<io}getOffset(){const e=this.calculateStoryViewportHeight(!0),t=this.calculateHeight(!0),i=this._vw,r=this.calculateWidth(!0);let s="";return s=this.desktopMode?this.viewportRatio>this.slideRatio?Math.ceil(t-e)/2*-1+"px auto":`0 ${Math.ceil(r-i)/2*-1}px`:t>e?Math.ceil(t-e)/2*-1+"px auto":`0 ${Math.ceil(r-i)/2*-1}px`,s}getOffsetX(){const e=this.calculateWidth(!0),t=this.calculateStoryViewportHeight(!0),i=this.calculateHeight(!0);if(this.desktopMode)return this.viewportRatio>this.slideRatio?"0px":Math.ceil(e-this._vw)/2+"px";{const r=this._vw;return i>t?"0px":Math.ceil(e-r)/2+"px"}}getHeight(e=!1){return this.viewportRatio>this.slideRatio?`${this.calculateHeight(e)}px`:"100%"}getOffsetY(){const e=this.calculateStoryViewportHeight(!0);if(this.desktopMode)return this.viewportRatio>this.slideRatio?`${Math.ceil(this.calculateHeight()-e)}px`:"0px";{const t=this.calculateHeight();return t>e?Math.ceil(t-e)/2+"px":"0px"}}getWidth(e=!1){return this.viewportRatio>this.slideRatio?`${this.calculateWidth(e)}px`:"auto"}getFontSize(){return this.calculateWidth()/20+"px"}getViewportCorrectionPadding(){if(this.desktopMode)return{};const{paddingTop:e,paddingBottom:t}=this.calcFrameWidthByMobileAspectRatio();return{paddingTop:e+"px",paddingBottom:t+"px"}}calculateWidth(e=!1){return this.desktopMode?Math.ceil(this.calculateStoryViewportHeight(e)*this.slideRatio):this.viewportRatio>this.slideRatio?this._vw:Math.ceil(this.calculateStoryViewportHeight(e)*this.slideRatio)}calculateHeight(e=!1){return this.desktopMode?Math.ceil(this.calculateWidth(e)/this.slideRatio):Math.ceil(this._vw/this.slideRatio)}calculateStoryViewportHeight(e=!1){let t=this._vh;const i=this.needBottomPanel?this.actionPanelHeight:0;t-=e?i:0;const{paddingTop:r,paddingBottom:s}=this.calcFrameWidthByMobileAspectRatio();return this.desktopMode?t-=100:t-=r+s,t}calcFrameWidthByMobileAspectRatio(){if(this.desktopMode)return{paddingTop:0,paddingBottom:0};const e=this._vh-this._vw/io,t=Math.max(Math.min(e-this.actionPanelHeight,this.actionPanelHeight),0);return{paddingTop:Math.max(e-t,0),paddingBottom:t}}}var so=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class no{static getUgcEditorConfig(){return so(this,void 0,void 0,(function*(){var e,t;let i=m.getState();(null===(e=null==i?void 0:i.session)||void 0===e?void 0:e.id)||(yield y({})),(null==i?void 0:i.editor)||(yield Nt({}));const r=o.getState(),s=m.getState(),n="0.5.1";return{sessionId:s.session.id,apiKey:r.apiKey,editor:null!==(t=s.editor)&&void 0!==t?t:{},sdkVersion:n,appPackageId:r.appPackageId,deviceId:g.getState(),userId:null!=r.userId?String(r.userId):void 0,lang:r.lang.toString()}}))}}var oo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class ao extends U.EventEmitter{constructor(e,t,i,r){super(),this.storyManager=e,this.storyReaderViewModel=t,this.storyId=i,this.options=r,this.showSharePage=()=>oo(this,void 0,void 0,(function*(){var e;this.handleStartLoad();const t=null===(e=this.storyManager.getConfig())||void 0===e?void 0:e.disableStatistic,i=yield this.storyReaderViewModel.showSingleStoryFromSharePage(this.storyId,t);this.handleEndLoad(i)})),this.handleCloseStoryReader=this.handleCloseStoryReader.bind(this),this.showSharePage(),this.storyReaderViewModel.once("closeStoryReader",this.handleCloseStoryReader)}closeStoryReader(){return oo(this,void 0,void 0,(function*(){this.storyManager.closeStoryReader()}))}handleStartLoad(){setTimeout((()=>{var e;this.emit(ft.START_LOADING),De()(null===(e=this.options)||void 0===e?void 0:e.handleStartLoad)&&this.options.handleStartLoad()}))}handleEndLoad(e){var t;this.emit(ft.END_LOADING,{result:e}),De()(null===(t=this.options)||void 0===t?void 0:t.handleStopLoad)&&this.options.handleStopLoad(e)}handleCloseStoryReader(){var e,t,i;if(De()(null===(e=this.options)||void 0===e?void 0:e.handleStoryReaderClose)||this.listenerCount(ft.CLOSE_STORY_READER)>0)try{De()(null===(t=this.options)||void 0===t?void 0:t.handleStoryReaderClose)&&(null===(i=this.options)||void 0===i||i.handleStoryReaderClose()),this.emit(ft.CLOSE_STORY_READER)}catch(e){console.error(e)}else{const e=window.location;window.open(`${e.protocol}//${e.host}`,"_parent")}}}var lo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class co{constructor(e){this.storyManager=e}get sdkVersionName(){return this.storyManager.sdkVersionName}get sdkVersionCode(){return this.storyManager.sdkVersionCode}set storyLinkClickHandler(e){this.storyManager.storyLinkClickHandler=e}getConfig(){return this.storyManager.getConfig()}showOnboardingStories(e){return lo(this,void 0,void 0,(function*(){return this.storyManager.showOnboardingStories(e)}))}showStory(e){return lo(this,void 0,void 0,(function*(){return this.storyManager.showStory(e)}))}closeAllReaders(){this.storyManager.closeAllReaders()}openGame(e){return lo(this,arguments,void 0,(function*(e,t={}){return this.storyManager.openGame(e,t)}))}closeGame(){return lo(this,void 0,void 0,(function*(){return this.storyManager.closeGame()}))}closeStoryReader(){return lo(this,void 0,void 0,(function*(){return this.storyManager.closeStoryReader()}))}getUgcEditorConfig(){return this.storyManager.getUgcEditorConfig()}showSharePage(e,t){return this.storyManager.showSharePage(e,t)}closeGoodsWidget(){this.storyManager.closeGoodsWidget()}on(e,t){return this.storyManager.on(e,t),this}once(e,t){return this.storyManager.once(e,t),this}off(e,t){return this.storyManager.off(e,t),this}}var uo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const ho="{{__ugc__}}";class po extends U.EventEmitter{constructor(){return super(),this.viewModelStore=new pt,this.config=null,this.callbacks={},this.clickOnButtonAction=({src:e,payload:t})=>{if(De()(this.callbacks.storyLinkClickHandler)||this.listenerCount(_e.CLICK_ON_STORY)>0){const i={src:e,srcRef:"default",data:t};try{De()(this.callbacks.storyLinkClickHandler)&&this.callbacks.storyLinkClickHandler(i),this.emit(_e.CLICK_ON_STORY,i)}catch(e){console.error(e)}}else window.open(t.url,"_self")},this.isSingletonInstanceExists()||(po.instance=this),po.instance}static get combinedPlaceholders(){return jt()}get sdkVersionName(){return"0.5.1"}get sdkVersionCode(){return parseInt(501)}get lang(){return o.getState().lang}set storyLinkClickHandler(e){De()(e)&&(this.callbacks.storyLinkClickHandler=e)}get storyReaderViewModel(){return this.viewModelStore.getOneByName(Os.name)}get gameReaderViewModel(){return this.viewModelStore.getOneByName(So.name)}static getInstance(){return po.instance?po.instance:null}setViewModel(e,t){this.viewModelStore.set(e,t)}getConfig(){return this.config}setConfig(e){this.validateConfig(e),this.initializeConfig(e)}destroy(){if(null!=po.instance){po.instance=null,this.closeAllReaders();for(const e of this.viewModelStore.getAll())e.destroy()}}setTags(e){this.config&&(T.getInstance().checkTagsLength(e),l({tags:e}),this.config.tags=e)}setUserId(e){return uo(this,void 0,void 0,(function*(){(Be()(e)||je()(e))&&this.config&&(this.config.userId=e,T.getInstance().checkUserIdLength(e),d({userId:e}),S(),yield this.closeAllReaders(),yield this.reloadAllStoryLists())}))}setLang(e){Be()(e)&&this.config&&(h({lang:e}),this.config.lang=e)}setApiKey(e){this.config&&(E(e),a({apiKey:e}),S(),this.config.apiKey=e)}setPlaceholders(e){he()(e)&&this.config&&(c({placeholders:e}),Te(e),this.config.placeholders=e)}setImagePlaceholders(e){he()(e)&&this.config&&(u({imagePlaceholders:e}),Ve(e),this.config.imagePlaceholders=e)}showOnboardingStories(e){return uo(this,void 0,void 0,(function*(){return this.storyReaderViewModel.showOnboardingStories(e)}))}showStory(e){return uo(this,void 0,void 0,(function*(){const t=this.storyReaderViewModel;return yield t.showSingleStory(e,"")}))}closeAllReaders(){this.storyReaderViewModel.close(),this.gameReaderViewModel.closeGame()}closeGoodsWidget(){this.storyReaderViewModel.closeGoodsWidget()}openGame(e){return uo(this,arguments,void 0,(function*(e,t={}){const i=this.gameReaderViewModel;try{if(i.isOpened)throw new Error(`Close the launched game with ID "${i.gameInstanceId}"`);yield i.openGame(e,t)}catch(e){console.error(e)}}))}closeGame(){return uo(this,void 0,void 0,(function*(){return this.gameReaderViewModel.closeGame()}))}closeStoryReader(){return uo(this,void 0,void 0,(function*(){this.storyReaderViewModel.close()}))}getUgcEditorConfig(){return uo(this,void 0,void 0,(function*(){return no.getUgcEditorConfig()}))}showSharePage(e,t){return new ao(this,this.storyReaderViewModel,e,t)}reloadAllStoryLists(){const e=this.viewModelStore.getAllByName(St.name);return Promise.all(e.map((e=>e.reload())))}isSingletonInstanceExists(){return!!po.instance&&(console.warn("StoryManager singleton is created multiple times\nuse IAS.StoryManager.getInstance() instead"),!0)}validateConfig(e){if(e.disableDeviceId&&!e.userId)throw new Error("You must pass the `userId` value");T.getInstance().checkUserIdLength(e.userId),T.getInstance().checkTagsLength(e.tags)}initializeConfig(e){E(e.apiKey),a(e),e.placeholders&&Te(e.placeholders),e.imagePlaceholders&&Ve(e.imagePlaceholders),S(),e.disableStatistic="com.inappstory.webpreview"===e.appPackageId,this.config=e}}const fo=new po,go=new co(fo);var vo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const mo=(0,e.createEffect)((e=>vo(void 0,[e],void 0,(function*({gameInstanceId:e,gameOptions:t}){var i,r;(null===(r=null===(i=m.getState())||void 0===i?void 0:i.session)||void 0===r?void 0:r.id)||(yield y({}));const s={};t&&he()(t)&&null!=t.demoMode&&(s.demoMode=Boolean(t.demoMode));const n=yield B.post(`game/${e}/launch?expand=config`,s);if(!n.ok)throw new Error(JSON.stringify(n.data));return n.data.clientConfig=yo(),n.data})))),yo=()=>{let e=m.getState();const t=o.getState();return{sessionId:e.session.id,userKey:e.user_key,apiKey:t.apiKey,sdkVersion:"0.5.1",apiBaseUrl:M.apiUrl,userAgent:P,appPackageId:t.appPackageId,deviceId:g.getState(),userId:t.userId?t.userId:"",lang:t.lang.toString(),placeholders:po.combinedPlaceholders}};var wo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class So extends ht{constructor(){super(),this._isOpened=!1,this._isGameInited=!1,this._isGameLoading=!1,this._gameLaunch=null,this._gameLaunchError=null,this._closeBtnVisible=!1,this.initGameRetryAttempts=0,this.gameCenterMessageService=null,this.safeAreaInsets={top:0,bottom:0,left:0,right:0},this.openGameOptions={},this.desktopMode=!0,this.dir="ltr",this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}destroy(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.destroy(),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}get closeBtnVisible(){return this._closeBtnVisible}get isGameLoading(){return this._isGameLoading}get isGameInited(){return this._isGameInited}get gameLaunchError(){return this._gameLaunchError}get gameLaunch(){return this._gameLaunch}get gameInstanceId(){return this._gameInstanceId}get isOpened(){return this._isOpened}openGame(e,t){return wo(this,void 0,void 0,(function*(){this._gameInstanceId=e,this._isOpened=!0,this.openGameOptions=t,yield this.launchGameById(e)}))}closeGame(){return wo(this,void 0,void 0,(function*(){var e;return!!this._isOpened&&(this._isGameInited?null===(e=this.gameCenterMessageService)||void 0===e||e.sendMessage("cb",{cb:"closeGameReader"}):this.handleGameComplete(),!0)}))}reload(){this._gameLaunch=null,this.gameInstanceId?this.launchGameById(this.gameInstanceId):console.error("The game instance ID is undefined")}sendGameCenterEventByApiRequest(e,t){var i;null===(i=this.gameCenterMessageService)||void 0===i||i.sendMessage("cb",{cb:e,plainData:t})}setSafeAreaInsets(e){this.safeAreaInsets=e}setDesktopMode(e){this.desktopMode=e}setGameCenterIframe(e){var t;if(!this._gameLaunch)throw new Error("GameCenter iframe setup error");if(this._isGameInited)return;null===(t=this.gameCenterMessageService)||void 0===t||t.destroy();const i=new URL(this._gameLaunch.url).origin;this.gameCenterMessageService=new de(e,i),this.initGameCenter(this.gameCenterMessageService,this._gameLaunch)}pauseGameUI(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.sendMessage("cb",{cb:"pauseUI",arguments:JSON.stringify([])})}resumeGameUI(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.sendMessage("cb",{cb:"resumeUI",arguments:JSON.stringify([])})}confirmSharingComplete({shareId:e,isSuccess:t}){var i;null===(i=this.gameCenterMessageService)||void 0===i||i.sendMessage("shareComplete",{id:e,isSuccess:t})}launchGameById(e){return wo(this,void 0,void 0,(function*(){try{this._gameLaunchError=null,this._isGameLoading=!0,this.emit("update"),this._gameLaunch=yield mo({gameInstanceId:e,gameOptions:this.openGameOptions})}catch(e){this._gameLaunchError=e}finally{this.emit("update")}}))}initGameCenter(e,t){this.handleGameCenterEvents(e);const i=this.getGameConfig(t);e.sendMessage("cb",{cb:"initGame",arguments:JSON.stringify([i])})}getGameConfig(e){const t=e.screenOptions;return ne()(e.config,{clientConfig:Object.assign({fullScreen:!1,screenOrientation:t.orientation,safeAreaInsets:this.safeAreaInsets,dir:this.dir,nonce:ws()},e.clientConfig)})}handleGameCenterEvents(e){e.on("gameLoaded",this.handleGameLoaded.bind(this)).on("gameComplete",this.handleGameComplete.bind(this)).on("sendApiRequest",this.handleSendApiRequest.bind(this)).on("openUrl",this.handleOpenUrl.bind(this)).on("event",this.handleGameEvent.bind(this)).on("reloadGameReader",this.handleReloadGameReader.bind(this)).on("gameLoadFailed",this.handleGameLoadFailed.bind(this));const t={share:new ke(e,this,this.desktopMode),storySetLocalData:new Me(e,this),storyGetLocalData:new Le(e,this),gameInstanceGetLocalData:new fe(e,this),gameInstanceSetLocalData:new ge(e,this)};for(const[i,r]of Object.entries(t))e.on(i,((...e)=>r.handle(...e)))}handleGameLoaded(e){this._isGameInited=!0,this._isGameLoading=!1,this.emit(ce.StartGame),document.addEventListener("visibilitychange",this.handleVisibilityChange);const t=JSON.parse(e);he()(t)&&(this._closeBtnVisible=Boolean(t.showClose),this.emit("update"))}handleVisibilityChange(){"hidden"===document.visibilityState?this.pauseGameUI():"visible"===document.visibilityState&&this.resumeGameUI()}handleGameComplete(e){var t;this._isGameInited=!1,this._isOpened=!1,this._gameLaunch=null,null===(t=this.gameCenterMessageService)||void 0===t||t.destroy(),this.emit(ce.GameComplete,e),this.emit("update"),mt.emit(`${So.name}.gameComplete`)}handleSendApiRequest(e){this.emit(ce.SendApiRequest,e)}handleOpenUrl(e){const{url:t}=JSON.parse(e);this.emit(ce.OpenUrl,{url:t})}handleGameEvent(e,t){this.emit(ce.GameInstanceEvent,{name:e,payload:t})}handleReloadGameReader(){const e=this._gameLaunch;this._gameLaunch=null,this.emit("update"),setTimeout((()=>{this._gameLaunch=e,this.emit("update")}))}handleGameLoadFailed(e,t){this.gameLaunch&&t&&this.initGameRetryAttempts<this.gameLaunch.canTryReloadCount?(this.initGameRetryAttempts++,this.handleReloadGameReader()):this._gameLaunchError=new Error(e)}}var bo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class _o extends fs{static save(e,t,i){return bo(this,void 0,void 0,(function*(){try{return{data:(yield i("apiRequest",{url:`game/${e}/instance-user-data`,method:"post",params:null,data:t,headers:null})).data,status:200,headers:[{}]}}catch(e){return{data:e,status:400,headers:[{}]}}}))}}var xo=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};class Co{constructor(e){this.storyManager=e}create(){const e=new So;return this.storyManager.setViewModel(So.name,e),this.handleGameReaderViewModelEvents(e),e}handleGameReaderViewModelEvents(e){e.on(ce.StartGame,(()=>this.storyManager.emit("startGame",{id:e.gameInstanceId}))).on(ce.GameInstanceEvent,(e=>this.storyManager.emit("gameEvent",e))).on(ce.GameComplete,(t=>{ei()(t)?this.storyManager.emit("closeGame",{id:e.gameInstanceId}):this.storyManager.emit("finishGame",{id:e.gameInstanceId,result:t})})).on(ce.OpenUrl,(({url:t})=>{this.storyManager.clickOnButtonAction({src:yt.GAME_READER,payload:{url:t,gameInstanceId:e.gameInstanceId}})})).on(ce.SendApiRequest,(t=>xo(this,void 0,void 0,(function*(){gs.sendApiRequestPromise(t,((t,i)=>e.sendGameCenterEventByApiRequest(t,i)),Yt)})))).on(ce.StorySetLocalData,(e=>xo(this,[e],void 0,(function*({storyId:e,data:t}){gs.sentData(e,t,Yt)})))).on(ce.GameInstanceSetLocalData,(t=>xo(this,[t],void 0,(function*({data:t}){_o.save(e.gameInstanceId,t,Yt)}))))}}Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34});!function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();function ko(){if(window){var e,t=window.screen;return e="function"==typeof window.ScreenOrientation&&t.orientation instanceof ScreenOrientation&&"function"==typeof t.orientation.addEventListener&&null===t.orientation.onchange&&"string"==typeof t.orientation.type?t.orientation:function(){var e={90:Ao.LANDSCAPE_PRIMARY,"-90":Ao.LANDSCAPE_SECONDARY,0:Ao.PORTRAIT_PRIMARY,180:Ao.PORTRAIT_SECONDARY};function t(){}var i=new t,r=function(e){for(var t=["orientationchange","mozorientationchange","msorientationchange"],i=window.screen,r=0;r<t.length;r++)if(null===i["on"+t[r]])return{delegate:i,event:t[r]};if(void 0!==window.onorientationchange)return{delegate:window,event:"orientationchange"};return{delegate:To(e),event:"change"}}(i);return t.prototype.addEventListener=Lo("addEventListener",r.delegate,r.event),t.prototype.dispatchEvent=Lo("dispatchEvent",r.delegate,r.event),t.prototype.removeEventListener=Lo("removeEventListener",r.delegate,r.event),t.prototype.lock=function(){var e,t="lockOrientation() is not available on this device.",i=window.screen;e=void 0===i?function(){return!1}:"function"==typeof i.msLockOrientation?i.msLockOrientation.bind(i):"function"==typeof i.mozLockOrientation?i.mozLockOrientation.bind(i):function(){return!1};return function(i){const r=window.Promise;return e(i)?r.resolve(i):r.reject(new Error(t))}}(),t.prototype.unlock=function(){var e=window.screen;return e&&e.orientation&&e.orientation.unlock.bind(e.orientation)||e.msUnlockOrientation&&e.msUnlockOrientation.bind(e)||e.mozUnlockOrientation&&e.mozUnlockOrientation.bind(e)||function(){}}(),Object.defineProperties(i,{onchange:{get:function(){return r.delegate["on"+r.event]||null},set:function(e){r.delegate["on"+r.event]=Eo(e,i)}},type:{get:function(){var t=window.screen;return t.msOrientation||t.mozOrientation||e[window.orientation+""]||(Ro().matches?"landscape-primary":"portrait-primary")}},angle:{value:0}}),i}(),e}}var Ao;function Lo(e,t,i){var r=this;return function(){var s=Array.prototype.slice.call(arguments);if("change"===(s[0].type?s[0].type:s[0])){s[0].type?s[0]=Io(i,s[0]):s[0]=i;var n,o,a=Eo(s[1],r);return"addEventListener"===e&&function(e,t){var i=Oo.indexOf(e);i>-1?Mo[i]=t:(Oo.push(e),Mo.push(t))}(s[1],a),"removeEventListener"===e&&(n=s[1],(o=Oo.indexOf(n))>-1&&(Oo.splice(o,1),Mo.splice(o,1))),s[1]=a,t[e].apply(t,s)}}}!function(e){e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary",e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary"}(Ao||(Ao={}));var Mo=[],Oo=[];function Eo(e,t){var i=Oo.indexOf(e);return i>-1?Mo[i]:function(i){i.target!==t&&Po(i,"target",t),i.currentTarget!==t&&Po(i,"currentTarget",t),"change"!==i.type&&Po(i,"type","change"),e(i)}}function Io(e,t){var i;try{i=new Event(e,t)}catch(e){i={type:"change"}}return i}function To(e){var t=Object.create({addEventListener:function(e,t){this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)},dispatchEvent:function(t){this.listeners[t.type]&&(this.listeners[t.type].forEach((function(e){e(t)})),"function"==typeof e.onchange&&e.onchange(t))},removeEventListener:function(e,t){if(this.listeners[e]){var i=this.listeners[e].indexOf(t);i>-1&&this.listeners[e].splice(i,1)}}});t.listeners={};var i=Ro();return i&&"boolean"==typeof i.matches&&i.addListener((function(){t.dispatchEvent(Io("change"))})),t}function Ro(){return"function"!=typeof window.matchMedia?{}:window.matchMedia("(orientation: landscape)")}function Po(e,t,i){Object.defineProperty(e,t,{value:i})}class Do{static createFunctionWithTimeout(e,t){let i=!1;function r(){i||(i=!0,e())}return setTimeout(r,t||1e3),r}static convertModelToFormData(e,t,i){t instanceof Object&&Object.keys(t).forEach((r=>{const s=t[r];if(s instanceof Object&&!Array.isArray(s))return this.convertModelToFormData(e,s,r);i&&(r=`${i}[${r}]`),Array.isArray(s)?s.forEach((t=>{e.append(`${r}[]`,t)})):e.append(r,s)}))}}var No=p(1085),Bo=p(9155),Fo=p.n(Bo),jo=p(8384),Uo=p.n(jo);var Vo=function(e,t,i){var r=e.key+"-"+t.name;!1===i&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var Go={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function zo(e){var t=Object.create(null);return function(i){return void 0===t[i]&&(t[i]=e(i)),t[i]}}var Wo=/[A-Z]|^ms/g,$o=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ho=function(e){return 45===e.charCodeAt(1)},qo=function(e){return null!=e&&"boolean"!=typeof e},Zo=zo((function(e){return Ho(e)?e:e.replace(Wo,"-$&").toLowerCase()})),Yo=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace($o,(function(e,t,i){return Qo={name:t,styles:i,next:Qo},t}))}return 1===Go[e]||Ho(e)||"number"!=typeof t||0===t?t:t+"px"};function Xo(e,t,i){if(null==i)return"";if(void 0!==i.__emotion_styles)return i;switch(typeof i){case"boolean":return"";case"object":if(1===i.anim)return Qo={name:i.name,styles:i.styles,next:Qo},i.name;if(void 0!==i.styles){var r=i.next;if(void 0!==r)for(;void 0!==r;)Qo={name:r.name,styles:r.styles,next:Qo},r=r.next;return i.styles+";"}return function(e,t,i){var r="";if(Array.isArray(i))for(var s=0;s<i.length;s++)r+=Xo(e,t,i[s])+";";else for(var n in i){var o=i[n];if("object"!=typeof o)null!=t&&void 0!==t[o]?r+=n+"{"+t[o]+"}":qo(o)&&(r+=Zo(n)+":"+Yo(n,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var a=Xo(e,t,o);switch(n){case"animation":case"animationName":r+=Zo(n)+":"+a+";";break;default:r+=n+"{"+a+"}"}}else for(var l=0;l<o.length;l++)qo(o[l])&&(r+=Zo(n)+":"+Yo(n,o[l])+";")}return r}(e,t,i);case"function":if(void 0!==e){var s=Qo,n=i(e);return Qo=s,Xo(e,t,n)}}if(null==t)return i;var o=t[i];return void 0!==o?o:i}var Qo,Ko=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Jo=!!Bo.useInsertionEffect&&Bo.useInsertionEffect,ea=Jo||function(e){return e()},ta=(Jo||Bo.useLayoutEffect,{}.hasOwnProperty),ia=Bo.createContext("undefined"!=typeof HTMLElement?Uo()({key:"css"}):null);ia.Provider;var ra=function(e){return(0,Bo.forwardRef)((function(t,i){var r=(0,Bo.useContext)(ia);return e(t,r,i)}))};var sa=Bo.createContext({});var na="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",oa=function(e,t){var i={};for(var r in t)ta.call(t,r)&&(i[r]=t[r]);return i[na]=e,i},aa=function(e){var t=e.cache,i=e.serialized,r=e.isStringTag;return Vo(t,i,r),ea((function(){return function(e,t,i){Vo(e,t,i);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var s=t;do{e.insert(t===s?"."+r:"",s,e.sheet,!0),s=s.next}while(void 0!==s)}}(t,i,r)})),null},la=ra((function(e,t,i){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var s=e[na],n=[r],o="";"string"==typeof e.className?o=function(e,t,i){var r="";return i.split(" ").forEach((function(i){void 0!==e[i]?t.push(e[i]+";"):r+=i+" "})),r}(t.registered,n,e.className):null!=e.className&&(o=e.className+" ");var a=function(e,t,i){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,s="";Qo=void 0;var n=e[0];null==n||void 0===n.raw?(r=!1,s+=Xo(i,t,n)):s+=n[0];for(var o=1;o<e.length;o++)s+=Xo(i,t,e[o]),r&&(s+=n[o]);Ko.lastIndex=0;for(var a,l="";null!==(a=Ko.exec(s));)l+="-"+a[1];var d=function(e){for(var t,i=0,r=0,s=e.length;s>=4;++r,s-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),i=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(s){case 3:i^=(255&e.charCodeAt(r+2))<<16;case 2:i^=(255&e.charCodeAt(r+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(r)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)}(s)+l;return{name:d,styles:s,next:Qo}}(n,void 0,Bo.useContext(sa));o+=t.key+"-"+a.name;var l={};for(var d in e)ta.call(e,d)&&"css"!==d&&d!==na&&(l[d]=e[d]);return l.ref=i,l.className=o,Bo.createElement(Bo.Fragment,null,Bo.createElement(aa,{cache:t,serialized:a,isStringTag:"string"==typeof s}),Bo.createElement(s,l))}));var da=la,ca=(p(5985),No.Fragment);function ua(e,t,i){return ta.call(t,"css")?No.jsx(da,oa(e,t),i):No.jsx(e,t,i)}function ha(e,t,i){return ta.call(t,"css")?No.jsxs(da,oa(e,t),i):No.jsxs(e,t,i)}var pa=p(992),fa=p.n(pa),ga=p(2591),va=p.n(ga),ma=p(4978),ya={insert:"head",singleton:!1};va()(ma.A,ya);const wa=ma.A.locals||{};var Sa=p(1422),ba={insert:"head",singleton:!1};va()(Sa.A,ba);const _a=Sa.A.locals||{},xa=({onClick:e,className:t})=>ua("div",{className:fa()(_a.icon,t),onClick:e,children:ua("svg",{viewBox:"0 0 24 24",children:ua("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"})})});function Ca(){var e,t,i,r,s,n,o,a,l,d,c;let u=null;try{u=(null===(e=window.parent)||void 0===e?void 0:e.innerWidth)||window.innerWidth||(null===(r=null===(i=null===(t=window.parent)||void 0===t?void 0:t.document)||void 0===i?void 0:i.documentElement)||void 0===r?void 0:r.clientWidth)||(null===(o=null===(n=null===(s=window.parent)||void 0===s?void 0:s.document)||void 0===n?void 0:n.body)||void 0===o?void 0:o.clientWidth)}catch(e){console.error(e)}return u||(null===(l=null===(a=window.document)||void 0===a?void 0:a.documentElement)||void 0===l?void 0:l.clientWidth)||(null===(c=null===(d=window.document)||void 0===d?void 0:d.body)||void 0===c?void 0:c.clientWidth)}function ka(){var e,t,i,r,s,n;let o=null;try{o=(null===(e=window.parent)||void 0===e?void 0:e.innerHeight)||(null===window||void 0===window?void 0:window.innerHeight)||(null===(r=null===(i=null===(t=window.parent)||void 0===t?void 0:t.document)||void 0===i?void 0:i.documentElement)||void 0===r?void 0:r.clientHeight)}catch(e){console.error(e)}return o||(null===(n=null===(s=null===window||void 0===window?void 0:window.document)||void 0===s?void 0:s.documentElement)||void 0===n?void 0:n.clientHeight)}var Aa=p(6644),La={insert:"head",singleton:!1};va()(Aa.A,La);const Ma=Aa.A.locals||{},Oa=310/480,Ea=({desktopMode:e,children:t,verticalPadding:i,style:r,className:s})=>{const[n,o]=(0,Bo.useState)({width:"0px",height:"0px"});(0,Bo.useEffect)((()=>(a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)})),[]);const a=()=>{const e=Ca(),t=f(),i=e/ka(),r=d({aspectRatio:i,vh:t,vw:e}),s=l({aspectRatio:i,vh:t,vw:e});o({width:r,height:s})},l=({aspectRatio:e,vh:t,vw:i})=>{const r=h(e)||p();return e>Oa&&!r?`${u({vh:t,vw:i})}px`:"100%"},d=({aspectRatio:e,vh:t,vw:i})=>e>Oa&&!h(e)?`${c({aspectRatio:e,vh:t,vw:i})}px`:"auto",c=({aspectRatio:t,vh:i,vw:r})=>t>Oa&&!e?r:Math.ceil(i*Oa),u=({vh:t,vw:i})=>e?t:Math.ceil(i/Oa),h=e=>e>Oa&&e-Oa<=.1,p=()=>{let e;return"matchMedia"in window&&void 0!==(e=window.matchMedia("(orientation: portrait)"))&&e.matches},f=()=>{let t=ka();return e?(t-=i,t):t};return ua("div",{className:fa()(Ma["aspect-ratio-box"],s),style:Object.assign(Object.assign({},r),n),children:ua("div",{className:Ma["aspect-ratio-box-inside"],children:t})})};var Ia=p(3639),Ta={insert:"head",singleton:!1};va()(Ia.A,Ta);const Ra=Ia.A.locals||{},Pa=ko(),Da=e=>{const[t,i]=(0,Bo.useState)(!1),r=(0,Bo.useCallback)((()=>{if(e.desktopMode)return;const t=Pa.type!==e.orientation;e.onOrientationChange({type:Pa.type,isWrong:t}),i(t)}),[e.desktopMode,e.orientation]);return(0,Bo.useEffect)((()=>(r(),Pa.addEventListener("change",r),()=>{Pa.removeEventListener("change",r)})),[r]),t?ua("div",{className:Ra["screen-orientation-lock"]}):null};var Na=p(5839),Ba={insert:"head",singleton:!1};va()(Na.A,Ba);const Fa=Na.A.locals||{};var ja=p(7231),Ua={insert:"head",singleton:!1};va()(ja.A,Ua);const Va=ja.A.locals||{},Ga=({shareLink:e,sharePanelOptions:t,onDownloadClick:i})=>{var r,s,n,o;return ha("div",{className:`${Fa["share-panel__body"]} ${Va["share-panel__body_screenshot"]}`,children:[ua("div",{className:`${Fa["share-panel-row"]} ${Va["share-panel-row"]}`,children:ua("a",{className:Va["share-panel-row__image-link"],onClick:i,href:e,download:"image.jpeg",children:ua("img",{src:e,className:Va["share-panel-row__image"]})})}),ua("div",{className:Fa["share-panel-separator"],style:{background:null===(r=t.divider)||void 0===r?void 0:r.background}}),ua("div",{className:`${Fa["share-panel-row"]} ${Va["share-panel-row"]}`,children:ua("a",{className:Va["share-item__download-button"],onClick:i,href:e,download:"image.jpeg",children:ua("div",{dangerouslySetInnerHTML:{__html:null!==(o=null===(n=null===(s=t.downloadButton)||void 0===s?void 0:s.svgSrc)||void 0===n?void 0:n.baseState)&&void 0!==o?o:""}})})})]})};var za=p(9749),Wa={insert:"head",singleton:!1};va()(za.A,Wa);const $a=za.A.locals||{};let Ha;function qa(){let e,t;/ipad|iphone/i.test(navigator.userAgent)?(e=document.createRange(),Ha&&e.selectNodeContents(Ha),t=window.getSelection(),t&&(t.removeAllRanges(),t.addRange(e)),Ha&&Ha.setSelectionRange(0,999999)):null==Ha||Ha.select()}const Za=e=>{!function(e){Ha=document.createElement("textarea"),Ha.value=e,document.body.appendChild(Ha)}(e),qa(),document.execCommand("copy"),Ha&&document.body.removeChild(Ha)};var Ya=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i};const Xa=e=>{var t,i,r,s,n,o,a,l,d,c,u,{shareLink:h,sharePanelOptions:p,onShareComplete:f}=e,g=Ya(e,["shareLink","sharePanelOptions","onShareComplete"]);const v=()=>{try{return new URL(h).host}catch(e){return console.error(e),null}},m=()=>{window.removeEventListener("focus",m),f()},y=()=>v()?"":encodeURIComponent(h),w=e=>{var t,i;const r=(()=>{try{return new URL(h)}catch(e){return console.error(e),null}})();if(!r)return"#";const s=null===(t=p.targetParams)||void 0===t?void 0:t[e];return null===(i=null==s?void 0:s.getUrl)||void 0===i?void 0:i.call(s,{url:r.toString(),text:y()})},S=null===(t=p.title)||void 0===t?void 0:t.favicon,b=p.text;return ha("div",{className:Fa["share-panel__body"],children:[ha("div",{className:`${Fa["share-panel-row"]} ${Fa["title-row"]}`,children:[v()&&Boolean(null==S?void 0:S.display)&&ua("div",{className:Fa["share-url-favicon"],style:{background:null==S?void 0:S.background},children:ua("img",{src:`${null!==(i=g.faviconApiUrl)&&void 0!==i?i:"https://favicon.inappstory.ru"}?sz=64&domain_url=${v()}`})}),ua("span",{className:Fa.title,style:b,children:null===(s=null===(r=p.title)||void 0===r?void 0:r.getValue)||void 0===s?void 0:s.call(r,{url:h,text:y()})})]}),ua("div",{className:Fa["share-panel-separator"],style:{background:null===(n=p.divider)||void 0===n?void 0:n.background}}),ua("div",{className:`${Fa["share-panel-row"]} ${$a["social-list"]}`,children:null===(o=p.targets)||void 0===o?void 0:o.map(((e,t)=>{var i,r,s;const n=null===(i=p.targetParams)||void 0===i?void 0:i[e],o=null!==(s=null===(r=null==n?void 0:n.icon)||void 0===r?void 0:r.svgSrc.baseState)&&void 0!==s?s:"<svg></svg>";return ua("div",{className:$a["social-list__item"],children:ha("a",{href:w(e),onClick:()=>((e,t,i)=>{window.addEventListener("focus",m),window.open(e,t,i)})(w(e),"newwindow","width=650,height=570"),target:"_blank",rel:"noopener noreferrer",className:`${Fa["share-item"]} ${$a["share-item"]}`,children:[ua("div",{dangerouslySetInnerHTML:{__html:o}}),ua("span",{className:Fa["share-item-title"],style:b,children:null==n?void 0:n.label})]})},t)}))}),ua("div",{className:Fa["share-panel-separator"],style:{background:null===(a=p.divider)||void 0===a?void 0:a.background}}),ua("div",{className:Fa["share-panel-row"],children:ha("a",{className:`${Fa["share-item"]} ${$a["share-item"]}`,onClick:()=>{Za(h),f()},children:[ua("div",{dangerouslySetInnerHTML:{__html:null!==(c=null===(d=null===(l=p.copyButton)||void 0===l?void 0:l.svgSrc)||void 0===d?void 0:d.baseState)&&void 0!==c?c:""}}),ua("span",{className:Fa["share-item-title"],style:b,children:null===(u=p.copyButton)||void 0===u?void 0:u.label})]})})]})};var Qa;!function(e){e.Social="social",e.SlideScreenshot="slide-screenshot"}(Qa||(Qa={}));const Ka=({shareType:e,shareLink:t,onShareCompelete:i,sharePanelOptions:r,className:s})=>{const{dir:n}=Ru(),[o,a]=(0,Bo.useState)(!1),[l,d]=(0,Bo.useState)(!0),c=()=>{a(!0),d(!1)};return ha("div",{dir:n,className:fa()(Fa["share-panel-wrapper"],s),onClick:e=>{e.stopPropagation()},onTouchStart:e=>{e.stopPropagation(),e.preventDefault()},children:[ua("div",{className:fa()(Fa["share-panel-backdrop"],{[Fa.fadeIn]:l,[Fa.fadeOut]:!l}),onClick:()=>{a(!1),d(!1)}}),ha("div",{className:fa()(Fa["share-panel"],{[Fa.slideIn]:l,[Fa.slideOut]:!l}),onAnimationEnd:()=>{l||i(o)},style:{"--height":"100%",background:r.background,borderTopLeftRadius:r.borderRadius+"px",borderTopRightRadius:r.borderRadius+"px"},children:[e===Qa.SlideScreenshot&&ua(Ga,{shareLink:t,onDownloadClick:c,sharePanelOptions:r}),e===Qa.Social&&ua(Xa,{shareLink:t,onShareComplete:c,sharePanelOptions:r}),ua("div",{className:Fa["share-panel-separator"]})]})]})},Ja=({gameReaderViewModel:e})=>{var t,i,r,s,n,o,a,l;const{desktopMode:d,dir:c,gameReaderOptions:u,storyReaderOptions:h}=Ru(),p=(0,Bo.useRef)(null),{sharePanelOpeningParams:f,handleShareComplete:g,closeSharePanel:v}=(e=>{const[t,i]=(0,Bo.useState)(null);return(0,Bo.useEffect)((()=>(null==e||e.on("openSharePanel",i),()=>{null==e||e.off("openSharePanel",i)})),[e]),{sharePanelOpeningParams:t,handleShareComplete:r=>{t&&e&&(e.confirmSharingComplete({shareId:t.shareId,isSuccess:r}),i(null))},closeSharePanel:()=>{i(null)}}})(e);Bu((()=>{m()}));const m=()=>{e.closeGame(),v()},{gameLaunch:y,gameLaunchError:w,isGameLoading:S,closeBtnVisible:b}=e,_=fa()(wa["game-reader"],{[wa["desktop-mode"]]:d,[wa.loading]:!e.gameLaunchError&&e.isGameLoading}),x={background:null===(t=u.backdrop)||void 0===t?void 0:t.background,opacity:null!==(r=null===(i=u.backdrop)||void 0===i?void 0:i.opacity)&&void 0!==r?r:0,filter:(null===(s=u.backdrop)||void 0===s?void 0:s.blur)?`blur(${u.backdrop.blur}px)`:"none"},C={backgroundColor:null===(n=u.game)||void 0===n?void 0:n.backdropColor,backgroundImage:(null===(o=null==y?void 0:y.splashScreen)||void 0===o?void 0:o.url)?`url(${y.splashScreen.url})`:void 0};return ua("div",{className:wa["game-reader-container"],children:ha("div",{className:_,children:[ua("div",{className:wa["game-reader__backdrop"],style:x}),ha(Ea,{className:wa["game-box"],desktopMode:d,verticalPadding:100,style:C,children:[w&&ua(xa,{className:wa.refresh,onClick:()=>{e.reload()}}),(S||b)&&ua("button",{dir:c,onClick:m,className:wa["game-reader__close"],"data-position":u.closeButtonPosition,dangerouslySetInnerHTML:{__html:null!==(l=null===(a=u.closeButton)||void 0===a?void 0:a.svgSrc.baseState)&&void 0!==l?l:""}}),y&&ha(ca,{children:[ua("iframe",{src:y.url,onLoad:t=>{p.current=t.target,e.dir=c,e.setGameCenterIframe(p.current)},style:{opacity:S?0:1},frameBorder:"0",className:wa["game-iframe"],sandbox:"allow-same-origin allow-top-navigation allow-forms allow-scripts allow-downloads allow-top-navigation-to-custom-protocols",allow:"fullscreen"}),f&&ua(Ka,{shareType:f.shareType,shareLink:f.shareLink,onShareCompelete:g,sharePanelOptions:h.sharePanel})]})]}),y&&u.forceCheckOrientation&&ua(Da,{orientation:Ao.PORTRAIT_PRIMARY,desktopMode:d,onOrientationChange:({isWrong:t})=>{e.isGameInited&&(t?e.pauseGameUI():e.resumeGameUI())}})]})})};var el=p(1239),tl={insert:"head",singleton:!1};va()(el.A,tl);const il=el.A.locals||{};class rl{constructor(e,t,i){this.storyReaderViewModel=e,this.storiesViewer=t,this.backdropRef=i,this.deltaValY=0,this.windowHeight=0,this.swipeUpGestureInAction=!1}get closeGestureInAction(){return Ki.getState()}startMove(){ir(),this.windowHeight=this.storiesViewer.clientHeight,this.storiesViewer.style.setProperty("transition","")}move(e){e>10||this.closeGestureInAction?(tr(),this.moveDownAndScaleReader(e)):(e<-10||this.swipeUpGestureInAction)&&this.moveUp(e)}endMove(){lr(),this.deltaValY>=0?this.handleSwipeDown():this.handleSwipeUp(),ir()}moveDownAndScaleReader(e){this.deltaValY=e/this.windowHeight;let t=1-(1-.9)*this.deltaValY;t>=1&&(t=1);let i=100*this.deltaValY*.45;i<=0&&(i=0),this.storiesViewer.style.setProperty("transform",`scale(${t}) translateY(${i}%)`)}moveUp(e){this.swipeUpGestureInAction=!0,this.deltaValY=e/this.windowHeight}returnToDefaultState(){this.storiesViewer.style.setProperty("transition","all .3s"),this.storiesViewer.style.setProperty("transform","scale(1) translateY(0%)")}closeStoryReader(){this.storiesViewer.style.setProperty("transition","opacity .3s"),this.storiesViewer.style.setProperty("opacity","0"),this.backdropRef.style.setProperty("transition","opacity .3s"),this.backdropRef.style.setProperty("opacity","0"),setTimeout((()=>{this.storyReaderViewModel.close("swipeDown")}),400)}handleSwipeDown(){this.deltaValY<=.15||!this.storyReaderViewModel.canBeClosed()?this.returnToDefaultState():this.closeStoryReader()}handleSwipeUp(){mt.emit("swipeController.swipeUp")}}const sl=e=>{const[,t]=(0,Bo.useState)(0);(0,Bo.useEffect)((()=>{if(!e)return;const i=()=>t((e=>e+1));return e.on("update",i),()=>{e.off("update",i)}}),[e])};!function(){const e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;window.requestAnimationFrame=e}();const nl=function(){let e,t=document.createElement("div"),i={transition:"transitionend",OTransition:"otransitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(i.hasOwnProperty(e)&&void 0!==t.style[e])return i[e]}();function ol(e,t,i){return new Promise((r=>{let s=!1;const n=()=>{s=!0,clearTimeout(a),void 0!==nl&&e.removeEventListener(nl,o),e.style.setProperty("transition",`${t} 0ms`),r()},o=e=>{e.propertyName===t&&(s||n())};void 0!==nl&&e.addEventListener(nl,o,!1);const a=setTimeout((()=>{s||n()}),i+20);e.style.setProperty("transition",`${t} ${i}ms`)}))}class al extends U.EventEmitter{constructor(){super(...arguments),this.timer=null,this.currentProgress=0,this.progressBeforePause=0,this.timerPaused=!1,this.timeout=0,this.isCompleted=!0}get started(){return!this.isCompleted}setTimer(e){0!==e?(this.timer=setTimeout((()=>this.complete({})),e),this.currentProgress=0,this.cancelAnimationFcn=function(e){let t,i;if("performance"in window==0||"now"in window.performance==0){let e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),i=Date.now()-e}else i=performance.now();return t=requestAnimationFrame((function r(s){let n;if(n=(s-i)/e.duration,n>1&&(n=1),e.forceEnd()&&(n=1),!e.paused()){let i=e.timing(n);e.draw(i),n<1&&(t=requestAnimationFrame(r))}})),()=>{cancelAnimationFrame(t)}}({duration:e,timing:e=>e,draw:e=>this.updateProgress(e),paused:()=>this.timerPaused,forceEnd:()=>!1})):this.forceEnd()}start(e){this.stop(),this.progressBeforePause=0,this.timeout=e,this.isCompleted=!1,this.emit("start"),this.setTimer(e)}stop(){this.isCompleted||(this.clearTimer(),this.timerPaused||(this.emit("stop"),this.isCompleted=!0))}pause(){this.isCompleted||(this.timerPaused=!0,this.stop(),this.progressBeforePause=this.currentProgress,this.emit("pause"))}resume(){if(!this.timerPaused)return;this.timerPaused=!1;const e=1-this.progressBeforePause,t=this.timeout*e;this.setTimer(t),this.emit("resume")}cancelAnimation(){var e;null===(e=this.cancelAnimationFcn)||void 0===e||e.call(this)}forceEnd(){this.complete({forceEnd:!0})}complete({forceEnd:e=!1}){this.isCompleted=!0,this.progressBeforePause=0,this.clearTimer(),this.emit("progress",100),this.emit("complete",{forceEnd:e})}clearTimer(){this.cancelAnimation(),null!==this.timer&&(clearTimeout(this.timer),this.timer=null)}updateProgress(e){const t=1-this.progressBeforePause;this.currentProgress=this.progressBeforePause+e*t;const i=100*this.currentProgress;this.emit("progress",i)}}function ll(e,t){e.forEach(t)}function dl(e,t,i){if(!e)throw Error(`${i?i+": ":""}${t}`)}function cl({node:e=[],from:t,source:i,parent:r=t||i,to:s,target:n,child:o=s||n,scope:a={},meta:l={},family:d={type:"regular"},regional:c}={}){const u=Bl(r),h=Bl(d.links),p=Bl(d.owners),f=[];ll(e,(e=>e&&Il(f,e)));const g={id:Pl(),seq:f,next:Bl(o),meta:l,scope:a,family:{type:d.type||"crosslink",links:h,owners:p}};return ll(h,(e=>Il(vl(e),g))),ll(p,(e=>Il(ml(e),g))),ll(u,(e=>Il(e.next,g))),c&&Dl&&Nl(yl(Dl),[g]),g}function ul(e){const t=()=>e();return t.unsubscribe=()=>e(),t}function hl(e,{scope:t,safe:i}={}){dl(t||Zl||i,"scopeBind: scope not found");const r=t||Zl;return t=>{function i(){Yl(o)}let s,n=0;const o=Zl;Yl(r);try{s=e(t)}catch(e){s=e,n=1}if(i(),n)throw s;return s instanceof Promise&&s.then(i,i),s}}function pl({unit:e,fn:t,scope:i,batch:r}){const s=[$l.run({fn:e=>t(e)})];r&&s.unshift($l.compute({priority:"sampler",batch:1})),xl(e)&&s.unshift($l.mov({store:e.stateRef,to:"stack"}));const n=Array.isArray(e)?e:[e];if(i){const e=[],t=i.additionalLinks;return n.forEach((i=>{const r=t[i.graphite.id]||[];t[i.graphite.id]=r;const n=cl({node:fl(s,i),meta:{watchOp:i.kind}});r.push(n),e.push((()=>{const e=r.indexOf(n);-1!==e&&r.splice(e,1),Jl(n)}))})),ul((()=>{e.forEach((e=>e()))}))}{const e=cl({node:s,parent:n,family:{owners:n}});return ul((()=>{Jl(e)}))}}function fl(e,t){return xl(t)?[$l.mov({store:t.stateRef,to:"stack"}),...e]:e}"undefined"!=typeof Symbol&&Symbol.observable;const gl=e=>e.graphite||e,vl=e=>e.family.owners,ml=e=>e.family.links,yl=e=>e.value,wl=e=>e.subscribers,Sl=(e,t)=>gl(e).meta[t],bl=e=>(jl(e)||Fl(e))&&"kind"in e,_l=e=>t=>bl(t)&&t.kind===e,xl=_l("store"),Cl=_l("event"),kl=_l("effect"),Al=e=>bl(e)&&!!e.targetable,Ll=_l("domain"),Ml=_l("scope");var Ol={__proto__:null,unit:bl,store:xl,event:Cl,effect:kl,targetable:Al,domain:Ll,scope:Ml,attached:e=>kl(e)&&1==Sl(e,"attached")};const El=(e,t)=>{const i=e.indexOf(t);-1!==i&&e.splice(i,1)},Il=(e,t)=>e.push(t),Tl=()=>{let e=0;return()=>""+ ++e},Rl=(Tl(),Tl()),Pl=Tl();Tl();let Dl=null;const Nl=(e,t)=>{const i=gl(e);ll(t,(e=>{const t=gl(e);"domain"!==i.family.type&&(t.family.type="crosslink"),Il(vl(t),i),Il(ml(i),t)}))},Bl=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(gl),Fl=e=>"object"==typeof e&&null!==e,jl=e=>"function"==typeof e,Ul=(e,t,i,r)=>{const s={id:Rl(),type:e,data:t};return i&&(s.order={priority:i},r&&(s.order.barrierID=++Vl)),s};let Vl=0;const Gl=({from:e="store",store:t,target:i,to:r=(i?"store":"stack"),batch:s,priority:n})=>Ul("mov",{from:e,store:t,to:r,target:i},n,s),zl=({fn:e,batch:t,priority:i,safe:r=0,filter:s=0,pure:n=0})=>Ul("compute",{fn:e,safe:r,filter:s,pure:n},i,t),Wl=({fn:e})=>zl({fn:e,priority:"effect"}),$l={mov:Gl,compute:zl,filter:({fn:e,pure:t})=>zl({fn:e,filter:1,pure:t}),run:Wl};const Hl=[];let ql=0;for(;ql<6;)Il(Hl,{first:null,last:null,size:0}),ql+=1;new Set;let Zl;const Yl=e=>{Zl=e};const Xl=(e,t)=>{El(e.next,t),El(vl(e),t),El(ml(e),t)},Ql=(e,t,i)=>{let r;e.next.length=0,e.seq.length=0,e.scope=null;let s=ml(e);for(;r=s.pop();)Xl(r,e),(t||i&&"sample"!==e.meta.op||"crosslink"===r.family.type)&&Ql(r,t,"on"!==r.meta.op&&i);for(s=vl(e);r=s.pop();)Xl(r,e),i&&"crosslink"===r.family.type&&Ql(r,t,"on"!==r.meta.op&&i)},Kl=e=>e.clear(),Jl=(e,{deep:t}={})=>{let i=0;if(e.ownerSet&&e.ownerSet.delete(e),xl(e))Kl(wl(e));else if(Ll(e)){i=1;const t=e.history;Kl(t.events),Kl(t.effects),Kl(t.stores),Kl(t.domains)}Ql(gl(e),!!t,i)};cl({node:[Wl({fn:({fn:e,value:t})=>e(t)})],meta:{op:"fx",fx:"sidechain"}});var ed=p(7121),td=p(8139);function id(e,t){const i=Ol.unit(e);let r={};i?r={unit:e}:"@@unitShape"in e?"function"==typeof e["@@unitShape"]?r=e["@@unitShape"]():nd("expect @@unitShape to be a function"):r=e;const s=Array.isArray(r),n=Bo.useRef({stale:1,justSubscribed:0,scope:t}),[o,a,l,d,c]=Bo.useMemo((()=>{n.current.stale=1;const e=Array.isArray(r)?[]:{},s=[],o=[],a=[],l=[];for(const n in r){if(!{}.hasOwnProperty.call(r,n))continue;const d=r[n];Ol.unit(d)||nd(`expect useUnit ${i?"argument":`value in key "${n}"`} to be a unit`),Ol.event(d)||Ol.effect(d)?(e[n]=t?hl(d,{scope:t}):d,a.push(n),l.push(d)):(e[n]=null,s.push(n),o.push(d))}return[e,s,o,a,l]}),[n,t,...Object.keys(r),...Object.values(r)]),u=Bo.useRef({value:o,storeKeys:a,eventKeys:d,eventValues:c}),h=Bo.useCallback((e=>{const i=n.current;return i.justSubscribed=1,pl({unit:l,fn:()=>{i.stale||(i.stale=1,e())},scope:t,batch:1})}),[l,t,u,n]),p=Bo.useCallback((()=>{const e=u.current,r=n.current;let h,p=0;const f=e.value,g=e.storeKeys,v=e.eventKeys,m=e.eventValues,y=t!==r.scope;if(r.stale||r.justSubscribed||y){p=!r.justSubscribed||y,h=s?[...o]:{...o},g.length===a.length&&v.length===d.length||(p=1);for(let e=0;e<a.length;e++){const i=ld(l[e],t),r=a[e];p||(p=g.includes(r)?f[r]!==i:1),h[r]=i}for(let e=0;e<d.length;e++){const t=c[e],i=d[e];p||(p=v.includes(i)?m[v.indexOf(i)]!==t:1)}}return p&&(e.value=h),e.storeKeys=a,e.eventKeys=d,e.eventValues=c,r.stale=0,r.justSubscribed=!p,r.scope=t,i?e.value.unit:e.value}),[h,l,c,t,u,n]);return od(h,p,p)}function rd(e){const t=Bo.useContext(dd);return e&&!t&&nd("No scope found, consider adding <Provider> to app root"),t}function sd(e,t){return id(e,rd(null==t?void 0:t.forceScope))}const nd=e=>{throw Error(e)},{useSyncExternalStore:od}=("undefined"!=typeof window?Bo.useLayoutEffect:Bo.useEffect,td),{useSyncExternalStoreWithSelector:ad}=ed,ld=(e,t)=>t?t.getState(e):e.getState(),dd=Bo.createContext(null),{Provider:cd}=dd,ud=e=>{const t=(0,Bo.useRef)(null),i=(0,Bo.useRef)(null),{desktopMode:r,storyReaderOptions:s}=Ru();(({storyReaderViewModel:e,storiesViewerRef:t,backdropRef:i})=>{const r=(0,Bo.useRef)(null);(0,Bo.useEffect)((()=>{r.current=new rl(e,t.current,i.current)}),[]);const s=()=>{var e;t.current.classList.add(il["no-select"]),null===(e=r.current)||void 0===e||e.startMove()},n=({y:e,lockX:t})=>{var i;t&&(null===(i=r.current)||void 0===i||i.move(e))},o=({lockX:e})=>{var t;e&&(null===(t=r.current)||void 0===t||t.endMove())},a=()=>{t.current.classList.remove(il["no-select"])};(0,Bo.useEffect)((()=>(mt.on("swipeController.startMove",s),mt.on("swipeController.move",n),mt.on("swipeController.endMove",o),mt.on("swipeController.beforeEndMove",a),()=>{mt.off("swipeController.startMove",s),mt.off("swipeController.move",n),mt.off("swipeController.endMove",o),mt.off("swipeController.beforeEndMove",a)})),[])})({storyReaderViewModel:e.storyReaderViewModel,backdropRef:t,storiesViewerRef:i}),sl(e.storyReaderViewModel.activeStory);return ha(ca,{children:[ha("div",{ref:i,className:fa()("stories-viewer",il["stories-viewer"],il.slider3d),style:Object.assign(Object.assign({},{"--loaderBackgroundColor":null===(n=s.loader)||void 0===n?void 0:n.default.color,"--loaderBackgroundAccentColor":null===(o=s.loader)||void 0===o?void 0:o.default.accentColor,"--timelineBlockTopOffset":`${parseFloat(String(s.timelineBlockTopOffset))}px`,"--slideBorderRadius":`${parseFloat(String(s.borderRadius))}px`}),(()=>{var e,t,i,r;return{backgroundColor:null!==(t=null===(e=s.commonBackdrop)||void 0===e?void 0:e.color)&&void 0!==t?t:void 0,backdropFilter:null!==(r=null===(i=s.commonBackdrop)||void 0===i?void 0:i.backdropFilter)&&void 0!==r?r:void 0}})()),children:[r&&ua("div",{className:il["stories-viewer-background"],style:(()=>{var t,i,r;const n=null===(t=e.storyReaderViewModel.activeStory)||void 0===t?void 0:t.displayedSlideImage,o=[];return null!=s.slideBackdrop&&Array.isArray(s.slideBackdrop.linearGradientOverlay)&&o.push(`linear-gradient(${s.slideBackdrop.linearGradientOverlay.join(", ")})`),null!=n&&o.push(`url(${n})`),{backgroundImage:o.join(", "),opacity:(null===(i=s.slideBackdrop)||void 0===i?void 0:i.opacity)||0,filter:(null===(r=s.slideBackdrop)||void 0===r?void 0:r.blur)?`blur(${s.slideBackdrop.blur}px)`:"none"}})()}),e.children]}),ua("div",{ref:t,className:fa()(il["stories-viewer-backdrop"],{[il._desktopMode]:r})})]});var n,o};var hd=p(417),pd={insert:"head",singleton:!1};va()(hd.A,pd);const fd=hd.A.locals||{};var gd=p(6349),vd={insert:"head",singleton:!1};va()(gd.A,vd);const md=gd.A.locals||{};var yd=p(9322),wd={insert:"head",singleton:!1};va()(yd.A,wd);const Sd=yd.A.locals||{},bd=e=>50+parseFloat(String(e)),_d=({story:e,commonOptions:t,storyReaderOptions:i})=>{const{dir:r}=Ru(),s=sd(er),n=!!e.hasLike&&Boolean(t.hasLike),o=e.hasShare,a=!!e.hasFavorite&&Boolean(t.hasFavorite),l=e.hasAudio,d=e.needBottomPanel?bd(i.actionPanelBottomOffset):0;return ua("div",{dir:r,className:Sd["stories-button-panel"],style:{height:`${d}px`,transform:`translateY(${d}px)`},children:e.needBottomPanel&&ha("div",{className:Sd["stories-button-panel-actions"],children:[(()=>{if(!n)return null;const t=0===e.like||-1===e.like,r=0===e.like||1===e.like;return ha("span",{children:[ua("span",{className:fa()(Sd["button-panel-action"],{"like-up":t,"like-up-filled":1===e.like}),dangerouslySetInnerHTML:{__html:t?i.likeButton.svgSrc.baseState:i.likeButton.svgSrc.activeState},onClick:()=>{e.setLike(1===e.like?0:1)}}),ua("span",{className:fa()(Sd["button-panel-action"],{"like-down":r,"like-down-filled":-1===e.like}),dangerouslySetInnerHTML:{__html:r?i.dislikeButton.svgSrc.baseState:i.dislikeButton.svgSrc.activeState},onClick:()=>{e.setDislike(-1===e.like?0:-1)}})]})})(),a&&ua("span",{children:ua("span",{className:fa()(Sd["button-panel-action"],{bookmark:!e.favorite,"bookmark-filled":e.favorite}),dangerouslySetInnerHTML:{__html:e.favorite?i.favoriteButton.svgSrc.activeState:i.favoriteButton.svgSrc.baseState},onClick:()=>e.setBookmark(!e.favorite)})}),ha("span",{className:Sd["right-container"],children:[l&&ua("span",{children:ua("span",{className:fa()(Sd["button-panel-action"],{"muted-icon":s,"sound-icon":!s}),dangerouslySetInnerHTML:{__html:s?i.muteButton.svgSrc.baseState:i.muteButton.svgSrc.activeState},onClick:()=>{s?or():nr()}})}),o&&ua("span",{className:Sd["button-panel-action"],dangerouslySetInnerHTML:{__html:i.shareButton.svgSrc.baseState},onClick:()=>{e.share()}})]})]})})};var xd=p(2208),Cd={insert:"head",singleton:!1};va()(xd.A,Cd);const kd=xd.A.locals||{},Ad=e=>{var t,i;const{dir:r}=Ru(),s=sd(Xi);return ua("div",{className:kd["story-header"],children:!e.closeDisabled&&ua("button",{dir:r,"data-position":e.options.closeButtonPosition,className:fa()(kd["stories-viewer__close"],{[kd["_paused-ui"]]:s}),onClick:t=>{t.stopPropagation(),t.preventDefault(),e.onClose()},dangerouslySetInnerHTML:{__html:null!==(i=null===(t=e.options.closeButton)||void 0===t?void 0:t.svgSrc.baseState)&&void 0!==i?i:""}})})};var Ld=p(9485),Md={insert:"head",singleton:!1};va()(Ld.A,Md);const Od=Ld.A.locals||{};var Ed=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i};const Id=({activeStory:e,desktopMode:t,geometry:i,navigationDisabled:r,widgetManager:s,slideApiHandlers:n})=>{const{dir:o}=Ru(),a="ltr"===o,l=()=>{e.reachStart?mt.emit(`${Os.name}.showPrevStory`):e.prevSlide()},d=()=>{e.reachEnd?mt.emit(`${Os.name}.showNextStory`):e.nextSlide()},c=(e,t=!1)=>{e<=.3?a?l():d():t||(a?d():l())};return{handleSlideClick:o=>{const a=o.target;if(!a)return;if((e=>["narrative-element-link","narrative-element-image","narrative-element-swipe-up"].some((t=>e.classList.contains(t))))(a))return void tn(e,a);if(!((e,t,i,r)=>{const s=e.classList,n={"narrative-element-vote-next-button":()=>{var t,r;return null!==(r=null===(t=i.findWidgetByType(Kr.name))||void 0===t?void 0:t.click(e))&&void 0!==r&&r},"narrative-element-quiz-next-button":()=>(t.nextSlide(),mt.emit("story.nextSlide"),!1),"narrative-element-test-next-button":()=>(t.prevSlide(),mt.emit("story.nextSlide"),!1),"narrative-element-quiz-answer":()=>nn(e,i),"narrative-element-test-answer":()=>nn(e,i),"narrative-element-data-input":()=>{var t;return null===(t=i.findWidgetByType(Er.name))||void 0===t||t.click(e),!1},rangeslider:()=>!1,"narrative-element-range-slider-next-button":()=>{var t;return null===(t=i.findWidgetByType(Wr.name))||void 0===t||t.click(e),!1},"narrative-element-poll-button":()=>on(e,i),"narrative-element-vote-answer":()=>{var t;return null===(t=i.findWidgetByType(Kr.name))||void 0===t||t.select(e),!1},"narrative-element-rate-input":()=>{var t;return null===(t=i.findWidgetByType(Hr.name))||void 0===t||t.select(e),!1},"narrative-element-copy":()=>{var t;return null===(t=i.findWidgetByType(Mr.name))||void 0===t||t.click(e),!1},"narrative-element-share":()=>{var t;return null===(t=i.findWidgetByType(Zr.name))||void 0===t||t.click(e),!1},"narrative-element-story-repeat":()=>(r.resetStory(t.id),!1)};for(const e of s)if(n[e])return n[e]();return!0})(a,e,s,n))return;let l=!1;for(const e of s.widgets){const t=dn(e);if(t===an.DENY_ALL_CLICKS)return;t===an.DENY_NEXT_CLICK&&(l=!0)}if(r)return;const d=(e=>{var r;let s=0,n=0;return t?(s=parseFloat(i.getWidth()),n=e.nativeEvent.offsetX):(s=i.vw,n=e.nativeEvent.pageX||(null===(r=e.nativeEvent.touches)||void 0===r?void 0:r[0].pageX)),n/s})(o),u=((t,i)=>{const r=s.findWidgetByType(Fr.name);return!!(null==r?void 0:r.firstElement)&&(r.handleRouteClick({direction:t>=.3?"forward":"backward",slideIndex:e.activeSlideIndex,slidesCount:e.slidesCount,onClick:()=>c(t,i)}),!0)})(d,l);u||c(d,l)}}},Td=(e,t="",i="")=>{pr(),xr({link:i,type:e,id:t})};var Rd=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Pd=(e,t)=>Rd(void 0,void 0,void 0,(function*(){const i=Dd();if(!i)throw new Error;try{pr(),ts({id:e}),yield i(t),is({result:!0})}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return;throw e}finally{is({result:!1})}})),Dd=()=>{var e,t;let i=null===(e=navigator.share)||void 0===e?void 0:e.bind(navigator);return!i&&(null===(t=window.parent)||void 0===t?void 0:t.navigator.share)&&(i=window.parent.navigator.share.bind(window.parent.navigator)),i};var Nd=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Bd=e=>Nd(void 0,[e],void 0,(function*({shareId:e,hideElementsSelector:t,slideContent:i,desktopMode:r}){let s=null;try{const n=yield Li(ki.IOS,i,function(e){let t="";return Array.prototype.slice.call(window.document.styleSheets).forEach((i=>{e(i)&&(t+=Array.prototype.slice.call(i.rules).map((e=>e.cssText)).join(""))})),t}((function(){return!0})),t),o={files:[n]};if(s=URL.createObjectURL(n),r)return void Td(me.SlideScreenshot,e,s);yield Pd(e,o)}catch(t){s&&Td(me.SlideScreenshot,e,s)}}));var Fd=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const jd=e=>{const t={};for(const[i,r]of Object.entries(null!=e?e:{}))null!==r&&(t[i]=r);return t},Ud=e=>{const t=({shareId:t,config:i})=>{var r;r={shareId:t,config:i,desktopMode:e.desktopMode},Fd(void 0,[r],void 0,(function*({shareId:e,config:t,desktopMode:i}){var r;null==e&&(e="story-share");const s=jd(t),n=s.url=null!==(r=s.url)&&void 0!==r?r:s.text;try{if(i)return void Td(me.Social,e,n);yield Pd(e,s)}catch(t){Td(me.Social,e,n)}}))},i=({shareId:t,hideElementsSelector:i})=>{const r=e.slideContentRef.current;Bd({shareId:t,hideElementsSelector:i,slideContent:r,desktopMode:e.desktopMode})};(0,Bo.useEffect)((()=>{if(e.state===Ks.Started)return mt.on("storySlide.performShareAction",t),mt.on("storySlide.performScreenShotShareAction",i),()=>{mt.off("storySlide.performShareAction",t),mt.off("storySlide.performScreenShotShareAction",i)}}),[e.state])};var Vd=p(8624),Gd={insert:"head",singleton:!1};va()(Vd.A,Gd);Vd.A.locals;var zd=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i};const Wd=e=>{var{geometry:t}=e,i=zd(e,["geometry"]);const{desktopMode:r}=Ru(),{slideContentRef:s,widgetManager:n,state:o,navigationDisabled:a,isVisible:l,needLoadingAnimation:d,needLoadingMask:c}=(e=>{var t,i,{activeSlideIndex:r,currentStory:s,activeStoryId:n,slidesLoaded:o,currentSlideIndex:a,needSlideInitByFlipping:l}=e,d=Ed(e,["activeSlideIndex","currentStory","activeStoryId","slidesLoaded","currentSlideIndex","needSlideInitByFlipping"]);const[c,u]=sd([er,Qi]),[h,p]=(0,Bo.useState)(Ks.None),f=(0,Bo.useRef)(null),g=(0,Bo.useRef)(new Ns).current,v=(0,Bo.useRef)(new yn(d.slideApi,g,s)).current,[m,y]=(0,Bo.useState)(null);(0,Bo.useLayoutEffect)((()=>{const e=f.current,t=new en(v,d.slideApi.Animation,e,g,d.slideApiHandlers);return t.on("propertyChanged",(({propertyName:e})=>{"state"===e&&p(t.state)})),y(t),()=>{t.destroy(),v.destroy()}}),[]),(0,Bo.useLayoutEffect)((()=>{null==m||m.update({needSlideInitByFlipping:l,slidesLoaded:o,activeStoryId:n,currentStoryId:s.id,activeSlideIndex:r,currentSlideIndex:a})}),[m,l,o,n,s.id,r,a]),(0,Bo.useEffect)((()=>{m&&(u?m.pause():m.resume())}),[m,u,h]),(0,Bo.useEffect)((()=>{m&&(c?m.mute():m.unmute())}),[m,c,h]),(0,Bo.useEffect)((()=>(null==m||m.on("start",d.onSlideStarted),()=>{null==m||m.off("start",d.onSlideStarted)})),[m,d.onSlideStarted]);const w=h===Ks.Loading||h===Ks.Error||!o,S=h===Ks.Loading||h===Ks.Error||!o;return{slideContentRef:f,widgetManager:v,state:h,navigationDisabled:null===(t=null==m?void 0:m.isNavigationDisabled)||void 0===t||t,needLoadingMask:w,isVisible:null!==(i=null==m?void 0:m.isVisible)&&void 0!==i&&i,needLoadingAnimation:S}})(Object.assign(Object.assign({},i),{activeStoryId:i.activeStory.id}));Ud({slideContentRef:s,desktopMode:r,state:o});const{handleSlideClick:u}=Id({slideApiHandlers:i.slideApiHandlers,activeStory:i.activeStory,desktopMode:r,geometry:t,widgetManager:n,navigationDisabled:a});return ha("div",{onClick:e=>{e.preventDefault(),e.stopPropagation(),i.clickDisabled||u(e)},className:`${Od["stories-slide"]} ${Od[`_position_${i.currentSlideIndex+1}`]} ${fa()({[Od["_with-bottom-panel"]]:i.needBottomPanel,[Od["_desktop-mode"]]:r})}`,children:[ua("div",{className:Od["stories-slide-offset"],style:{margin:t.getOffset(),width:t.getWidth(),height:t.getHeight(),"--y-offset":t.getOffsetY(),"--x-offset":t.getOffsetX()},children:ua("div",{className:Od["stories-slide-box"],"data-testid":"stories-slide-box",children:ua("div",{ref:s,dangerouslySetInnerHTML:{__html:i.slideHtml},className:`${Od["stories-slide-content"]} narrative-slide"`,style:{fontSize:t.getFontSize(),opacity:1}})})}),c&&ua("div",{className:Od["load-mask"],children:d&&ua("div",{className:Od["loading-spinner-default"]})})]})};var $d=p(5196),Hd={insert:"head",singleton:!1};va()($d.A,Hd);const qd=$d.A.locals||{},Zd=(0,Bo.forwardRef)(((e,t)=>{const{desktopMode:i,dir:r}=Ru(),s=sd(Xi);return ua("div",{ref:t,dir:r,className:fa()(qd["stories-pager"],{[qd["_desktop-mode"]]:i,[qd["_paused-ui"]]:s}),children:ua("div",{className:`${qd["stories-pager__ticks"]} ${fa()({[qd.hiddenTimeline]:e.hiddenTimeline})}`,children:new Array(e.slidesLength).fill(0).map(((t,i)=>ha("div",{className:qd["stories-pager__tick"],children:[ua("div",{className:fa()(qd["stories-pager__tick-progress"],{[qd._active]:i+1<=e.activeSlide})}),ua("div",{className:qd["stories-pager__tick-progress-loader"],style:{display:i+1===e.activeSlide+1?"block":"none"}})]},i+1)))})})}));var Yd=p(5729),Xd=p.n(Yd),Qd=p(1869),Kd=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};const Jd=e=>{const t=(0,Bo.useRef)(null),i=(0,Bo.useRef)(null),r=(0,Bo.useRef)(0),s=(0,Bo.useRef)(0);let n;const o=()=>{i.current&&(s.current=-1*function(e){const t=window.getComputedStyle(e),i=t.transform||t.webkitTransform||t.mozTransform;if("none"===i)return{x:0,y:0,z:0};const r=i.includes("3d")?"3d":"2d",s=i.match(/matrix.*\((.+)\)/)[1].split(", ");return"2d"===r?{x:isNaN(s[4])?0:s[4],y:isNaN(s[5])?0:s[5],z:0}:"3d"===r?{x:isNaN(s[12])?0:s[12],y:isNaN(s[13])?0:s[13],z:isNaN(s[14])?0:s[14]}:{x:0,y:0,z:0}}(i.current).x)},[a,l]=(0,Bo.useState)(!1),[d,c]=(0,Bo.useState)(!1),u=(0,Bo.useRef)(!1),h=()=>{const t=Bo.Children.count(e.children);return i.current&&t?i.current.scrollWidth/t:0};let p=!1;(0,Bo.useEffect)((()=>{var e;return("ontouchstart"in window||window.navigator.msPointerEnabled||"ontouchstart"in document.documentElement)&&(p=!0),p||(i.current&&(n=null===(e=i.current.children[0])||void 0===e?void 0:e.offsetWidth),i.current&&(r.current=i.current.scrollWidth-i.current.clientWidth,o()),r.current===s.current?c(!1):c(!0),0===s.current?l(!1):l(!0)),()=>{}}),[]);const f=(0,Bo.useRef)(!1),g=(0,Bo.useRef)(0);let v=0;const m=(0,Bo.useRef)(!1),[y,w]=(0,Bo.useState)(0),S=e=>{e<0&&(e=0),e>r.current&&(e=r.current),w(e)};(0,Bo.useEffect)((()=>{y===r.current?c(!1):c(!0),l(0!==y)}),[y]);const b=e=>{if(!u.current)if(f.current){const t=e instanceof MouseEvent?e.pageX:e.touches&&e.touches[0].pageX;if(t!==g.current){m.current=!0,v=t;const e=g.current-v,i=s.current+e;S(i)}}else m.current=!1},_=e=>{m.current&&e.preventDefault(),setTimeout((()=>{m.current=!1})),f.current=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",_)};return ha(ec,{cssStyle:e.style,children:[ua(tc,{ref:t,onMouseDown:e=>{u.current||(e.preventDefault(),f.current=!0,g.current=e.pageX,i.current&&(r.current=i.current.scrollWidth-i.current.clientWidth),i.current&&o(),document.addEventListener("mousemove",b),document.addEventListener("mouseup",_))},onTouchStart:e=>{u.current||(e.preventDefault(),f.current=!0,g.current=e.touches&&e.touches[0].pageX,i.current&&(r.current=i.current.scrollWidth-i.current.clientWidth),i.current&&o(),document.addEventListener("touchmove",b),document.addEventListener("touchend",_))},onClickCapture:e=>{m.current&&(e.preventDefault(),e.stopPropagation())},children:ua(ic,{ref:i,style:{transform:`translateX(${-1*y}px)`},children:e.children})}),!p&&ha(ca,{children:[ua(sc,{position:rc.LEFT,show:a,onClick:()=>Kd(void 0,void 0,void 0,(function*(){if(u.current)return;o();const e=s.current-h();S(e),u.current=!0,i.current&&(yield ol(i.current,"transform",300)),u.current=!1})),children:ua("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:ua("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),ua(sc,{position:rc.RIGHT,show:d,onClick:()=>Kd(void 0,void 0,void 0,(function*(){if(u.current)return;o();const e=s.current+h();S(e),u.current=!0,i.current&&(yield ol(i.current,"transform",300)),u.current=!1})),children:ua("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:ua("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})})})]})]})},ec=Xd()("div")({position:"relative"},(e=>Object.assign({},e.cssStyle))),tc=Xd().div`
37
37
  position: relative;
38
38
  overflow: hidden;
39
39
  `,ic=Xd().div`