@inappstory/js-sdk 3.0.0-rc.0
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.
- package/LICENSE +22 -0
- package/README.md +19 -0
- package/dist/index.esm.mjs +31 -0
- package/dist/index.umd.js +28 -0
- package/dist/types/appearance-manager/appearanceCommon.d.ts +29 -0
- package/dist/types/appearance-manager/appearanceManager.d.ts +34 -0
- package/dist/types/appearance-manager/gameReader.d.ts +34 -0
- package/dist/types/appearance-manager/goodsWidget.d.ts +45 -0
- package/dist/types/appearance-manager/index.d.ts +7 -0
- package/dist/types/appearance-manager/sharePanel.d.ts +44 -0
- package/dist/types/appearance-manager/storiesList.d.ts +155 -0
- package/dist/types/appearance-manager/storyFavoriteReader.d.ts +20 -0
- package/dist/types/appearance-manager/storyReader.ts +73 -0
- package/dist/types/global.d.ts +23 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/publicEvents.d.ts +104 -0
- package/dist/types/share-page/index.d.ts +1 -0
- package/dist/types/share-page/sharePage.d.ts +14 -0
- package/dist/types/story-list/StoryList.d.ts +19 -0
- package/dist/types/story-list/UGCStoryList.d.ts +19 -0
- package/dist/types/story-list/index.d.ts +4 -0
- package/dist/types/story-list/stackedStoryList.d.ts +35 -0
- package/dist/types/story-list/storiesListType.d.ts +4 -0
- package/dist/types/story-list/storyListLoadStatus.ts +12 -0
- package/dist/types/storyManager.d.ts +91 -0
- package/package.json +66 -0
- package/plugins/dotLottie/dotLottie.d.ts +28 -0
- package/plugins/dotLottie/dotLottie.umd.js +1 -0
- package/plugins/dotLottie/package.json +5 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("effector"),require("uuid"),require("@inappstory/video-player"),require("@inappstory/slide-api"),require("react"),require("react-dom"),require("classnames"),require("react-input-mask"),require("parse-css-sides"));else if("function"==typeof define&&define.amd)define(["effector","uuid","@inappstory/video-player","@inappstory/slide-api","react","react-dom","classnames","react-input-mask","parse-css-sides"],t);else{var i="object"==typeof exports?t(require("effector"),require("uuid"),require("@inappstory/video-player"),require("@inappstory/slide-api"),require("react"),require("react-dom"),require("classnames"),require("react-input-mask"),require("parse-css-sides")):t(e.effector,e.uuid,e["@inappstory/video-player"],e["@inappstory/slide-api"],e.react,e["react-dom"],e.classnames,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)=>(()=>{var d={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}})},2432:(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-story-list-modal--xWjHA{position:fixed;inset:0px;z-index:1090}.favorite-story-list-modal--xWjHA .container--GZBjv{width:100%;height:100%;background:var(--storiesFavoriteBackgroundColor, #333333);display:flex;flex-direction:column;position:relative;overflow-y:auto}.favorite-story-list-modal--xWjHA .header--TjHMD{display:flex;align-content:center;justify-content:center;align-items:center;flex-shrink:0;position:-webkit-sticky;position:sticky;top:0;z-index:100;background:var(--storiesFavoriteTitleBackgroundColor, #333333);box-shadow:0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12),0 1px 3px 0 rgba(0,0,0,.2);padding-top:var(--storiesFavoriteHeaderTopOffset, 0px);margin-bottom:25px}.favorite-story-list-modal--xWjHA .header--TjHMD .title--Dk04x{margin-top:1rem;margin-bottom:1rem;font-size:1.2em;color:var(--storiesFavoriteTitleColor, white);font-family:var(--storiesFavoriteTitleFontFamily);font-weight:normal;font-size:1.4rem;line-height:normal;font:var(--storiesFavoriteTitleFont, normal)}@media(min-width: 640px){.favorite-story-list-modal--xWjHA .header--TjHMD .title--Dk04x{margin-top:25px;margin-bottom:25px}}@media(min-width: 640px){.favorite-story-list-modal--xWjHA .header--TjHMD{margin-bottom:50px}}.favorite-story-list-modal--xWjHA .header__close-btn--Jojm-{border:0;padding:0;background:rgba(0,0,0,0);position:absolute;top:50%;transform:translateY(-50%);z-index:1140;pointer-events:all;cursor:pointer;outline:none;right:10px;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.favorite-story-list-modal--xWjHA .header__close-btn--Jojm-:focus{outline:none}.favorite-story-list-modal--xWjHA .header__close-btn--Jojm- svg{overflow:visible}.favorite-story-list-modal--xWjHA .footer--edEpn{width:100%;height:25px}@media(min-width: 640px){.favorite-story-list-modal--xWjHA .footer--edEpn{height:50px}}.favorite-story-list-modal--xWjHA .bottom-offset--baiTh{position:-webkit-sticky;position:sticky;z-index:100;background:inherit;bottom:0;width:100%;height:var(--storiesFavoriteBottomOffset, 0px)}.favorite-story-list-modal--xWjHA .content--qCPkX{display:flex;justify-content:center;width:100%;padding-bottom:25px}.favorite-story-list-modal--xWjHA .content--qCPkX .favorite-story-list--MISMx{width:100%}@media(min-width: 640px){.favorite-story-list-modal--xWjHA .content--qCPkX .favorite-story-list--MISMx{max-width:640px}}@media(min-width: 768px){.favorite-story-list-modal--xWjHA .content--qCPkX .favorite-story-list--MISMx{max-width:768px}}@media(min-width: 1024px){.favorite-story-list-modal--xWjHA .content--qCPkX .favorite-story-list--MISMx{max-width:1024px}}@media(min-width: 1280px){.favorite-story-list-modal--xWjHA .content--qCPkX .favorite-story-list--MISMx{max-width:1280px}}",""]),s.locals={"favorite-story-list-modal":"favorite-story-list-modal--xWjHA",container:"container--GZBjv",header:"header--TjHMD",title:"title--Dk04x","header__close-btn":"header__close-btn--Jojm-",footer:"footer--edEpn","bottom-offset":"bottom-offset--baiTh",content:"content--qCPkX","favorite-story-list":"favorite-story-list--MISMx"};const n=s},5669:(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--u2SLt{overflow:hidden;position:relative}.aspect-ratio-box--u2SLt.aspect-ratio-box--centered--ZWs8d{width:auto;height:100%;left:50%;transform:translateX(-50%)}.aspect-ratio-box-inside--U\\+o3F{position:absolute;top:0;left:0;width:100%;height:100%}",""]),s.locals={"aspect-ratio-box":"aspect-ratio-box--u2SLt","aspect-ratio-box--centered":"aspect-ratio-box--centered--ZWs8d","aspect-ratio-box-inside":"aspect-ratio-box-inside--U+o3F"};const n=s},9843:(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,".close-btn--KhMED{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}.close-btn--KhMED:focus{outline:none}.close-btn--KhMED svg{overflow:visible}.close-btn--KhMED[data-position=start],.close-btn--KhMED[data-position=left]{left:10px}.close-btn--KhMED[data-position=start][dir=rtl],.close-btn--KhMED[data-position=left][dir=rtl]{left:auto;right:10px}.close-btn--KhMED[data-position=end],.close-btn--KhMED[data-position=right]{right:10px}.close-btn--KhMED[data-position=end][dir=rtl],.close-btn--KhMED[data-position=right][dir=rtl]{left:10px;right:auto}",""]),s.locals={"close-btn":"close-btn--KhMED"};const n=s},7495:(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--JuRkn{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.splash-container--4toz\\+{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:-1}.splash-container--4toz\\+ .splash-container__image--\\+1PkF{position:absolute;inset:0px;z-index:0}.splash-container--4toz\\+ .splash-container__image--\\+1PkF img{width:100%;height:100%;object-fit:cover}.splash-container--4toz\\+ .splash-container__lottie--f24Xy{position:absolute;inset:0px;z-index:1}.splash-container--4toz\\+ .splash-container__lottie--f24Xy canvas{width:100%;height:100%}.splash-container--4toz\\+.splash-container--isLoading--d8pYm:after{display:inline-block;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--JuRkn .6s infinite linear;z-index:10}.splash-container--4toz\\+.splash-container--fadeIn--TD58C{opacity:1;transition:opacity ease-in .2s}.splash-container--4toz\\+.splash-container--fadeOut--GW15o{opacity:0;transition:opacity ease-out .3s}',""]),s.locals={"splash-container":"splash-container--4toz+","splash-container__image":"splash-container__image--+1PkF","splash-container__lottie":"splash-container__lottie--f24Xy","splash-container--isLoading":"splash-container--isLoading--d8pYm",spin:"spin--JuRkn","splash-container--fadeIn":"splash-container--fadeIn--TD58C","splash-container--fadeOut":"splash-container--fadeOut--GW15o"};const n=s},4289:(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,'.game-reader-container--qAxmf{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--vz8\\+v{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--vz8\\+v.game-reader--desktop-mode--hEnbE{padding:50px 0}.game-reader--vz8\\+v.game-reader--desktop-mode--hEnbE .game-reader__game-box--tDgOl{border-radius:var(--game-box-border-radius)}.game-reader--vz8\\+v.game-reader--widescreen--4rob-{padding:0 0}.game-reader--vz8\\+v.game-reader--widescreen--4rob- .game-reader__game-box--tDgOl{border-radius:0px}.game-reader--vz8\\+v .game-reader__refresh-btn--gKfAr{cursor:pointer;position:absolute;left:50%;top:50%;transform:translate3d(-50%, -50%, 0);z-index:2}.game-reader--vz8\\+v .game-reader__game-box--tDgOl.game-reader__game-box--widescreen--DD\\+rV{border-radius:0px}.game-reader--vz8\\+v .game-reader__iframe--e3dlS{width:100%;height:100%;transition:opacity ease-in .3s}.game-reader--vz8\\+v .game-reader__backdrop--g2Ozw{position:fixed;inset:0;z-index:-1}',""]),s.locals={"game-reader-container":"game-reader-container--qAxmf","game-reader":"game-reader--vz8+v","game-reader--desktop-mode":"game-reader--desktop-mode--hEnbE","game-reader__game-box":"game-reader__game-box--tDgOl","game-reader--widescreen":"game-reader--widescreen--4rob-","game-reader__refresh-btn":"game-reader__refresh-btn--gKfAr","game-reader__game-box--widescreen":"game-reader__game-box--widescreen--DD+rV","game-reader__iframe":"game-reader__iframe--e3dlS","game-reader__backdrop":"game-reader__backdrop--g2Ozw"};const n=s},7314:(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},1938:(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--\\+MxOM{background-color:var(--background-color, transparent);height:auto;padding:0;position:relative}.stories-list-wrapper--\\+MxOM.mode-desktop--Blm52.with-list-controls--CGYBY{position:relative}.stories-list--deukx{position:relative;overflow:visible}@media(min-width: 767.99px){.stories-list--deukx{overflow:hidden}}.stories-list__actions--p-QOR{position:absolute;right:0;top:0}.stories-list__viewport--m27BY{overflow:hidden;height:auto}.stories-list__viewport--m27BY:not(.mode-desktop--Blm52){display:flex}.stories-list__viewport-inner--oy\\+N4{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--oy\\+N4::-webkit-scrollbar{display:none}.stories-list__viewport-inner--oy\\+N4.mode-desktop--Blm52{scroll-behavior:unset;cursor:grab}.stories-list__viewport-inner--oy\\+N4.isVerticalDirection--P3UBw{flex-flow:row wrap}.stories-list__viewport-inner--oy\\+N4.align-center--9y43R{margin-left:auto;margin-right:auto}.stories-list__viewport-inner--oy\\+N4.align-left--Dm8Do{margin-right:auto}.stories-list__viewport-inner--oy\\+N4.align-right--bQ1a2{margin-left:auto}.stories-list__viewport-inner--oy\\+N4.isTitleCardOutsideTop--AeG\\+D{align-items:flex-end}.stories-list__viewport-inner--oy\\+N4.isTitleCardOutsideBottom--1P95a{align-items:flex-start}",""]),s.locals={"stories-list-wrapper":"stories-list-wrapper--+MxOM","mode-desktop":"mode-desktop--Blm52","with-list-controls":"with-list-controls--CGYBY","stories-list":"stories-list--deukx","stories-list__actions":"stories-list__actions--p-QOR","stories-list__viewport":"stories-list__viewport--m27BY","stories-list__viewport-inner":"stories-list__viewport-inner--oy+N4",isVerticalDirection:"isVerticalDirection--P3UBw","align-center":"align-center--9y43R","align-left":"align-left--Dm8Do","align-right":"align-right--bQ1a2",isTitleCardOutsideTop:"isTitleCardOutsideTop--AeG+D",isTitleCardOutsideBottom:"isTitleCardOutsideBottom--1P95a"};const n=s},7533:(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--ypxcM{display:flex;flex-direction:row;flex-wrap:wrap;padding:var(--storiesListCardFavoriteTitle, --storiesListItemTitlePadding, 0px);gap:var(--storiesListCardFavoriteGap, 3px);box-sizing:border-box}.favorite-image-wrapper--iFI60{flex:0 1 calc(50% - var(--storiesListCardFavoriteGap, 3px));position:relative}.favorite-image--H\\+mP1{position:relative}.favorite-image-item--ylNcQ{position:absolute;inset:0px;border-radius:calc(var(--storiesListInnerBorderRadiusRead, 0)/4);background-position:50% 50%;background-size:cover}.circle_style--umugM .favorite-image-item--ylNcQ{border-radius:50%}",""]),s.locals={"favorite-images-wrapper":"favorite-images-wrapper--ypxcM","favorite-image-wrapper":"favorite-image-wrapper--iFI60","favorite-image":"favorite-image--H+mP1","favorite-image-item":"favorite-image-item--ylNcQ",circle_style:"circle_style--umugM"};const n=s},2811:(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--\\+5j4I:not(:last-child){margin-right:var(--storiesGap, 20px)}.stories-slide-wrapper--\\+5j4I{display:flex;flex-direction:column;flex:0 0 auto;box-sizing:content-box;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--\\+5j4I:hover{text-decoration:none}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO{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--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU{border-radius:var(--storiesListBorderRadius, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL .stories-slide-image--cxCFY,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU .stories-slide-image--cxCFY{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL .stories-slide-image__image--mNEIE,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL .stories-slide-image__image--mNEIE video,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU .stories-slide-image__image--mNEIE,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU .stories-slide-image__image--mNEIE video{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL .stories-slide__mask--p6utN,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU .stories-slide__mask--p6utN{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL .stories-slide__content--QrUVw,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU .stories-slide__content--QrUVw{border-radius:var(--storiesListInnerBorderRadiusNotRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL._is-read--xEVZe,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU._is-read--xEVZe{border-radius:var(--storiesListBorderRadiusRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL._is-read--xEVZe .stories-slide-image--cxCFY,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU._is-read--xEVZe .stories-slide-image--cxCFY{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL._is-read--xEVZe .stories-slide-image__image--mNEIE,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL._is-read--xEVZe .stories-slide-image__image--mNEIE video,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU._is-read--xEVZe .stories-slide-image__image--mNEIE,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU._is-read--xEVZe .stories-slide-image__image--mNEIE video{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL._is-read--xEVZe .stories-slide__mask--p6utN,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU._is-read--xEVZe .stories-slide__mask--p6utN{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-quad--InfBL._is-read--xEVZe .stories-slide__content--QrUVw,.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._format-rectangle--koqBU._is-read--xEVZe .stories-slide__content--QrUVw{border-radius:var(--storiesListInnerBorderRadiusRead, 5px)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._is-read--xEVZe{border:var(--storiesListBorderReadWidth, 1px) solid var(--storiesBorderReadColor, #ededed)}.stories-slide-wrapper--\\+5j4I.isTitleCardOutsideTop--EmWjs{justify-content:flex-end}.stories-slide-wrapper--\\+5j4I.isTitleCardOutsideBottom--W1JSg{justify-content:flex-start}.stories-slide-wrapper--\\+5j4I .stories-slide__inner--doJqj{display:block;position:relative;width:100%;height:100%}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-black--M47zI{background:#000}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-white--0Coab{background:#fff}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-red--UU5V7{background:#ff1a36}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-yellow--0cCZc{background:#fff000}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-green--10A4n{background:#0be361}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-violet--bnIBG{background:#b300bc}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-blue--lpzRG{background:#0761db}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-grey--nbEfc{background:#a8a8a8}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-black-gradient--q\\+aHV{background:#fff;background:linear-gradient(0deg, #c1c1c1, #000)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-white-gradient--YqOjh{background:#fff;background:linear-gradient(180deg, #fff, #ffc800)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-red-gradient---eK73{background:#ff1a36;background:linear-gradient(180deg, #c90174, #eb5c57)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-yellow-gradient--xg23E{background:#fff000;background:linear-gradient(0deg, #fbda61, #f76b1c)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-green-gradient--LfrRF{background:#0be361;background:linear-gradient(0deg, #b4ed50, #429321)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-violet-gradient--EQOBs{background:#b300bc;background:linear-gradient(180deg, #c90174, #0164fd)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-blue-gradient--TJV7z{background:#0761db;background:linear-gradient(180deg, #3023ae, #53a0fe 48%, #b4ed50)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._background-color-grey-gradient--4zJ9u{background:#a8a8a8;background:linear-gradient(0deg, #e2e2e2, #959595)}.stories-slide-wrapper--\\+5j4I .stories-slide-image--cxCFY{position:relative;width:100%;height:100%}.stories-slide-wrapper--\\+5j4I .stories-slide-image__wrap--kAiGt{position:absolute;top:0;bottom:0;left:0;right:0}.stories-slide-wrapper--\\+5j4I .stories-slide-image__image--mNEIE{position:relative;opacity:1;transition:opacity .3s ease-in-out;overflow:hidden}.stories-slide-wrapper--\\+5j4I .stories-slide-image__image--mNEIE._mode_list--K7WdU{width:100%;height:100%}.stories-slide-wrapper--\\+5j4I .stories-slide-image__image--mNEIE.ugc-card-cell--Hmi8u img{object-fit:contain}.stories-slide-wrapper--\\+5j4I .stories-slide-image__image--mNEIE img{width:100%;height:100%;object-fit:cover}.stories-slide-wrapper--\\+5j4I .stories-slide-image__image--mNEIE 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--\\+5j4I .stories-slide-image__image--mNEIE.video-loaded--380fQ img{display:none}.stories-slide-wrapper--\\+5j4I .stories-slide-image__image--mNEIE.video-loaded--380fQ video{opacity:1}.stories-slide-wrapper--\\+5j4I .stories-slide__mask--p6utN{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--\\+5j4I .stories-slide--KQzLO._is-read--xEVZe .stories-slide__mask--p6utN{background-color:var(--storiesListItemOpenedMaskColor, rgba(0, 0, 0, 0));background-image:var(--storiesListItemOpenedMaskLinearGradient, none)}.stories-slide-wrapper--\\+5j4I .stories-slide--KQzLO._ugc-cell--yAsON .stories-slide__mask--p6utN{background-color:var(--storiesListCardUgcMaskColor, rgba(0, 0, 0, 0));background-image:var(--storiesListCardUgcMaskLinearGradient, none)}.stories-slide-wrapper--\\+5j4I .stories-slide__content--QrUVw{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;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--\\+5j4I .stories-slide__content--QrUVw.__position_outside_top--5TlyN,.stories-slide-wrapper--\\+5j4I .stories-slide__content--QrUVw.__position_outside_bottom--pXuxb{position:relative;top:unset;right:unset;bottom:unset;left:unset;height:auto}.stories-slide-wrapper--\\+5j4I .clamp--X7TaH{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.stories-slide-wrapper--\\+5j4I .stories-slide__title--XeSlz{white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:none;user-select:none}.stories-slide-wrapper--\\+5j4I .stories-slide__title--XeSlz.align-left--PkXxY{text-align:left}.stories-slide-wrapper--\\+5j4I .stories-slide__title--XeSlz.align-center--9Flsz{text-align:center}.stories-slide-wrapper--\\+5j4I .stories-slide__title--XeSlz.align-right--wSGXZ{text-align:right}.stories-slide--KQzLO._format-circle--yaqgh,.stories-slide--KQzLO._format-circle--yaqgh .stories-slide-image__image--mNEIE,.stories-slide--KQzLO._format-circle--yaqgh .stories-slide-image__image--mNEIE video,.stories-slide--KQzLO._format-circle--yaqgh .stories-slide__mask--p6utN,.stories-slide--KQzLO._format-circle--yaqgh .stories-slide-image--cxCFY{border-radius:50%}.stories-slide--KQzLO._favorite-cell--CbxlS .stories-slide__mask--p6utN{background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%)}.stories-slide--KQzLO._favorite-cell--CbxlS._format-circle--yaqgh .stories-slide-image__wrap--kAiGt{display:flex}.stories-slide--KQzLO._favorite-cell--CbxlS._format-circle--yaqgh .stories-slide-image__image--mNEIE{width:85%;height:85%;overflow:visible;margin:auto}.stories-slide--KQzLO._favorite-cell--CbxlS._format-circle--yaqgh .favorite-images-wrapper--zfyVz{margin:0;padding:0}.stories-slide--KQzLO._has-drop-shadow--GdCOv{filter:drop-shadow(var(--storiesListCardDropShadow, none))}.stories-slide--KQzLO._has-drop-shadow--GdCOv._is-read--xEVZe{filter:drop-shadow(var(--storiesListCardOpenedDropShadow, none))}.stories-slide--KQzLO._has-drop-shadow--GdCOv._favorite-cell--CbxlS{filter:drop-shadow(var(--storiesListCardFavoriteDropShadow, none))}.stories-slide--KQzLO._has-drop-shadow--GdCOv._ugc-cell--yAsON{filter:drop-shadow(var(--storiesListCardUgcDropShadow, none))}.stories-slide--KQzLO._has-card-svg-mask--0vIiG .stories-slide__inner--doJqj{-webkit-mask-image:var(--storiesListCardMask);mask-image:var(--storiesListCardMask)}.stories-slide--KQzLO._has-card-svg-mask--0vIiG._is-read--xEVZe .stories-slide__inner--doJqj{-webkit-mask-image:var(--storiesListCardOpenedMask);mask-image:var(--storiesListCardOpenedMask)}.stories-slide--KQzLO._has-card-svg-mask--0vIiG._favorite-cell--CbxlS .stories-slide__inner--doJqj{-webkit-mask-image:var(--storiesListCardFavoriteMask);mask-image:var(--storiesListCardFavoriteMask)}.stories-slide--KQzLO._has-card-svg-mask--0vIiG._ugc-cell--yAsON .stories-slide__inner--doJqj{-webkit-mask-image:var(--storiesListCardUgcMask);mask-image:var(--storiesListCardUgcMask)}.stories-slide--KQzLO .card-overlay-svg-mask--NPptq{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--KQzLO._has-border-gradient-color--JRjv-{border-color:rgba(0,0,0,0)}.stories-slide--KQzLO._has-border-gradient-color--JRjv-: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--KQzLO._has-border-gradient-color--JRjv-._is-read--xEVZe{border-color:rgba(0,0,0,0)}.stories-slide--KQzLO._has-border-gradient-color--JRjv-._is-read--xEVZe: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--KQzLO._has-border-gradient-color--JRjv-._favorite-cell--CbxlS{border-color:rgba(0,0,0,0)}.stories-slide--KQzLO._has-border-gradient-color--JRjv-._favorite-cell--CbxlS: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--KQzLO._has-border-gradient-color--JRjv-._ugc-cell--yAsON{border-color:rgba(0,0,0,0)}.stories-slide--KQzLO._has-border-gradient-color--JRjv-._ugc-cell--yAsON: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--+5j4I","stories-slide":"stories-slide--KQzLO","_format-quad":"_format-quad--InfBL","_format-rectangle":"_format-rectangle--koqBU","stories-slide-image":"stories-slide-image--cxCFY","stories-slide-image__image":"stories-slide-image__image--mNEIE","stories-slide__mask":"stories-slide__mask--p6utN","stories-slide__content":"stories-slide__content--QrUVw","_is-read":"_is-read--xEVZe",isTitleCardOutsideTop:"isTitleCardOutsideTop--EmWjs",isTitleCardOutsideBottom:"isTitleCardOutsideBottom--W1JSg","stories-slide__inner":"stories-slide__inner--doJqj","_background-color-black":"_background-color-black--M47zI","_background-color-white":"_background-color-white--0Coab","_background-color-red":"_background-color-red--UU5V7","_background-color-yellow":"_background-color-yellow--0cCZc","_background-color-green":"_background-color-green--10A4n","_background-color-violet":"_background-color-violet--bnIBG","_background-color-blue":"_background-color-blue--lpzRG","_background-color-grey":"_background-color-grey--nbEfc","_background-color-black-gradient":"_background-color-black-gradient--q+aHV","_background-color-white-gradient":"_background-color-white-gradient--YqOjh","_background-color-red-gradient":"_background-color-red-gradient---eK73","_background-color-yellow-gradient":"_background-color-yellow-gradient--xg23E","_background-color-green-gradient":"_background-color-green-gradient--LfrRF","_background-color-violet-gradient":"_background-color-violet-gradient--EQOBs","_background-color-blue-gradient":"_background-color-blue-gradient--TJV7z","_background-color-grey-gradient":"_background-color-grey-gradient--4zJ9u","stories-slide-image__wrap":"stories-slide-image__wrap--kAiGt",_mode_list:"_mode_list--K7WdU","ugc-card-cell":"ugc-card-cell--Hmi8u","video-loaded":"video-loaded--380fQ","_ugc-cell":"_ugc-cell--yAsON",__position_outside_top:"__position_outside_top--5TlyN",__position_outside_bottom:"__position_outside_bottom--pXuxb",clamp:"clamp--X7TaH","stories-slide__title":"stories-slide__title--XeSlz","align-left":"align-left--PkXxY","align-center":"align-center--9Flsz","align-right":"align-right--wSGXZ","_format-circle":"_format-circle--yaqgh","_favorite-cell":"_favorite-cell--CbxlS","favorite-images-wrapper":"favorite-images-wrapper--zfyVz","_has-drop-shadow":"_has-drop-shadow--GdCOv","_has-card-svg-mask":"_has-card-svg-mask--0vIiG","card-overlay-svg-mask":"card-overlay-svg-mask--NPptq","_has-border-gradient-color":"_has-border-gradient-color--JRjv-"};const n=s},2731:(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--sC1DN{pointer-events:none}.stories-list-controls--sC1DN .control-start--NWniL,.stories-list-controls--sC1DN .control-end--Ezk33{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--sC1DN .control-icon--D3DFc{width:7px;height:12px;background-color:var(--storiesListControlsColor, black)}.stories-list-controls--sC1DN.horizontal--g63LL .control-start--NWniL{left:0;transform:translateY(-50%)}.stories-list-controls--sC1DN.horizontal--g63LL .control-start--NWniL.control-start_dir_rtl--7Opm5{left:auto;right:0}.stories-list-controls--sC1DN.horizontal--g63LL .control-end--Ezk33{right:0;transform:translateY(-50%)}.stories-list-controls--sC1DN.horizontal--g63LL .control-end--Ezk33.control-end_dir_rtl--twvGk{left:0;right:auto}.stories-list-controls--sC1DN.vertical--1a8qJ .control-start--NWniL{top:var(--storiesListTopPadding, 0);left:50%;transform:translate3d(-50%, 0, 0) rotate(90deg)}.stories-list-controls--sC1DN.vertical--1a8qJ .control-end--Ezk33{top:auto;bottom:var(--storiesListBottomPadding, 0);right:50%;transform:translate3d(50%, 0, 0) rotate(90deg)}.stories-list-controls--sC1DN .control-start--NWniL{display:flex}.stories-list-controls--sC1DN .control-start--NWniL .control-icon--D3DFc{-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--sC1DN .control-start--NWniL.control-start_reach-start--sBg3n{display:none}.stories-list-controls--sC1DN .control-end--Ezk33{display:flex}.stories-list-controls--sC1DN .control-end--Ezk33 .control-icon--D3DFc{-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\")}.stories-list-controls--sC1DN .control-end--Ezk33.control-end_reach-end--\\+gjXw{display:none}",""]),s.locals={"stories-list-controls":"stories-list-controls--sC1DN","control-start":"control-start--NWniL","control-end":"control-end--Ezk33","control-icon":"control-icon--D3DFc",horizontal:"horizontal--g63LL","control-start_dir_rtl":"control-start_dir_rtl--7Opm5","control-end_dir_rtl":"control-end_dir_rtl--twvGk",vertical:"vertical--1a8qJ","control-start_reach-start":"control-start_reach-start--sBg3n","control-end_reach-end":"control-end_reach-end--+gjXw"};const n=s},6950:(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,".story-reader-controls--4Ne0X .slider3d__btn_next--rEtuH,.story-reader-controls--4Ne0X .slider3d__btn_prev--TqA52{display:none}.story-reader-controls--4Ne0X._desktop_mode--di8mV .slider3d__btn_next--rEtuH,.story-reader-controls--4Ne0X._desktop_mode--di8mV .slider3d__btn_prev--TqA52{display:block;position:absolute;top:50%;transform:translateY(-50%);left:50%}.story-reader-controls--4Ne0X .btn-icon---M5ff{-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}.story-reader-controls--4Ne0X .btn-icon---M5ff:focus{outline:0}.story-reader-controls--4Ne0X .btn-icon---M5ff:disabled{color:#464646;cursor:not-allowed}",""]),s.locals={"story-reader-controls":"story-reader-controls--4Ne0X",slider3d__btn_next:"slider3d__btn_next--rEtuH",slider3d__btn_prev:"slider3d__btn_prev--TqA52",_desktop_mode:"_desktop_mode--di8mV","btn-icon":"btn-icon---M5ff"};const n=s},2130:(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--U\\+VEJ{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--U\\+VEJ:-webkit-full-screen,.stories-viewer--U\\+VEJ:-moz-full-screen,.stories-viewer--U\\+VEJ:-ms-fullscreen,.stories-viewer--U\\+VEJ :fullscreen{width:100% !important;height:100% !important}.stories-viewer-background--rxrSL{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--GqsGY{position:fixed;top:0;right:0;bottom:0;left:0;z-index:11;background-color:rgba(255,255,255,.5)}.stories-viewer-backdrop--GqsGY._desktopMode--5f5bI{display:none}.slider3d--fgseF{position:fixed !important}.slider3d--fgseF.no-select--qQk5D{user-select:none}",""]),s.locals={"stories-viewer":"stories-viewer--U+VEJ","stories-viewer-background":"stories-viewer-background--rxrSL","stories-viewer-backdrop":"stories-viewer-backdrop--GqsGY",_desktopMode:"_desktopMode--5f5bI",slider3d:"slider3d--fgseF","no-select":"no-select--qQk5D"};const n=s},187:(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--tzCuh{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--tzCuh[dir=rtl] .stories-button-panel-actions--I0rFL .right-container--Ax9TH{margin-left:0;margin-right:auto}.stories-button-panel-actions--I0rFL{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--I0rFL>span{display:flex}.stories-button-panel-actions--I0rFL .right-container--Ax9TH{margin-left:auto}.button-panel-action--rHoQs{cursor:pointer;pointer-events:all;display:flex;align-items:center;justify-content:center;height:50px;width:38px}.button-panel-action--rHoQs>*{pointer-events:none}",""]),s.locals={"stories-button-panel":"stories-button-panel--tzCuh","stories-button-panel-actions":"stories-button-panel-actions--I0rFL","right-container":"right-container--Ax9TH","button-panel-action":"button-panel-action--rHoQs"};const n=s},2939:(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 fadeInFrames--mV6xK{from{opacity:0}to{opacity:1}}@keyframes fadeOutFrames--nU\\+-4{from{opacity:1}to{opacity:0}}.goods-container--b9DqD{position:relative;margin-left:auto;margin-right:auto;display:flex;flex-direction:column;width:100%;height:100%;margin-top:0px}.goods-container--visible--aTEPw{animation:300ms fadeInFrames--mV6xK}.goods-container--hidden--l-0Za{animation:300ms normal forwards fadeOutFrames--nU\\+-4}.goods-container__backdrop--ZHB2U{flex:1}.goods-list--OjENo{position:relative;display:flex;flex-direction:column}",""]),s.locals={"goods-container":"goods-container--b9DqD","goods-container--visible":"goods-container--visible--aTEPw",fadeInFrames:"fadeInFrames--mV6xK","goods-container--hidden":"goods-container--hidden--l-0Za",fadeOutFrames:"fadeOutFrames--nU+-4","goods-container__backdrop":"goods-container__backdrop--ZHB2U","goods-list":"goods-list--OjENo"};const n=s},9108:(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-card--BAL7e{width:100px}.goods-card--BAL7e:first-of-type{margin-left:.5rem}.goods-card--BAL7e:not(:last-child){margin-right:.5rem}.prices--u3Ojw{display:flex}.prices--u3Ojw>div:not(:last-child){margin-right:.5rem}.typography--qlRjl{text-decoration:none}.typography--old-price--SnUxk{text-decoration:line-through}.figure--UwMfT{margin:0;margin-bottom:.5rem;width:100px;height:100px}.figure--UwMfT>img{width:inherit;height:inherit;max-width:100%;border-radius:var(--figure-border-radius, 0px);background-color:var(--figure-background-color, #ffffff)}",""]),s.locals={"goods-card":"goods-card--BAL7e",prices:"prices--u3Ojw",typography:"typography--qlRjl","typography--old-price":"typography--old-price--SnUxk",figure:"figure--UwMfT"};const n=s},6212:(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,".scrolling-carousel--lZnvG{position:relative}.scrolling-carousel__wrapper--Doobh{position:relative;overflow:hidden}.scrolling-carousel__item--A9ial{display:flex;flex-wrap:nowrap;cursor:pointer}.scrolling-carousel__arrow-button--HrmVa{width:36px;height:36px;color:#757575;margin-top:auto;margin-bottom:auto;box-shadow:0 0 0 1px rgba(0,0,0,.04),0 4px 8px 0 rgba(0,0,0,.2);background:#fff;border-radius:50%;cursor:pointer;position:absolute;top:0;bottom:0;opacity:0;transition:opacity .5s}.scrolling-carousel__arrow-button--HrmVa>svg{position:absolute;left:0;right:0;bottom:0;top:0;margin:auto;width:24px;height:24px;fill:#757575}.scrolling-carousel__arrow-button--HrmVa:hover svg{fill:#000}.scrolling-carousel__arrow-button--show--do24\\+{opacity:.9}.scrolling-carousel__arrow-button--show--do24\\+:hover{opacity:1}.scrolling-carousel__arrow-button--right--Werat{right:-18px}.scrolling-carousel__arrow-button--left--M-xt3{left:-18px}@media(pointer: coarse){.scrolling-carousel__arrow-button--HrmVa{display:none !important}}",""]),s.locals={"scrolling-carousel":"scrolling-carousel--lZnvG","scrolling-carousel__wrapper":"scrolling-carousel__wrapper--Doobh","scrolling-carousel__item":"scrolling-carousel__item--A9ial","scrolling-carousel__arrow-button":"scrolling-carousel__arrow-button--HrmVa","scrolling-carousel__arrow-button--show":"scrolling-carousel__arrow-button--show--do24+","scrolling-carousel__arrow-button--right":"scrolling-carousel__arrow-button--right--Werat","scrolling-carousel__arrow-button--left":"scrolling-carousel__arrow-button--left--M-xt3"};const n=s},8161:(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,".btn--dxsSR{margin:auto auto 10px;padding:10px;cursor:pointer}",""]),s.locals={btn:"btn--dxsSR"};const n=s},1277:(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--Mv6zz{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.spinner--xVBKd{position:absolute;top:calc(50% - 1rem);left:calc(50% - 1rem);width:2rem;height:2rem;border-radius:50%;animation:spin--Mv6zz .6s infinite linear;border:var(--border, 2px solid transparent);border-color:var(--border-color, black)}",""]),s.locals={spinner:"spinner--xVBKd",spin:"spin--Mv6zz"};const n=s},4940:(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--tR-eJ{position:absolute;inset:0;z-index:3000;text-align:left}",""]),s.locals={"goods-container":"goods-container--tR-eJ"};const n=s},2349:(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--zjUnU{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--zjUnU:focus{outline:none}.stories-viewer__close--zjUnU svg{overflow:visible}.stories-viewer__close--zjUnU._paused-ui--wbADu{opacity:0}.stories-viewer__close--zjUnU[data-position=start],.stories-viewer__close--zjUnU[data-position=left]{left:10px}.stories-viewer__close--zjUnU[data-position=start][dir=rtl],.stories-viewer__close--zjUnU[data-position=left][dir=rtl]{left:auto;right:10px}.stories-viewer__close--zjUnU[data-position=end],.stories-viewer__close--zjUnU[data-position=right]{right:10px}.stories-viewer__close--zjUnU[data-position=end][dir=rtl],.stories-viewer__close--zjUnU[data-position=right][dir=rtl]{left:10px;right:auto}.story-header--iD7hE{position:relative;z-index:1140}",""]),s.locals={"stories-viewer__close":"stories-viewer__close--zjUnU","_paused-ui":"_paused-ui--wbADu","story-header":"story-header--iD7hE"};const n=s},9137:(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--JtIm1{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--JtIm1._desktop-mode--MFqdz{border-top-left-radius:5px;border-top-right-radius:5px}.stories-pager--JtIm1._paused-ui--YKpOe{opacity:0}.stories-pager__ticks--IooJa{height:3px;display:flex;margin:8px 8px;margin-top:var(--timelineBlockTopOffset, 8px);opacity:1}.stories-pager__ticks--IooJa.hiddenTimeline--uwXIm{opacity:0}.stories-pager__tick--L96Px{background-color:var(--stories-pager-background, rgba(255, 255, 255, 0.6));width:100%;margin:0 2px;overflow:hidden;position:relative;border-radius:10px}.stories-pager__tick--L96Px:first-child{margin-left:0}.stories-pager__tick--L96Px:last-child{margin-right:0}.stories-pager__tick-progress--lwEYc{width:100%;height:3px}.stories-pager__tick-progress--lwEYc._active---U7hY{background-color:var(--stories-pager-tick-foreground, rgb(255, 255, 255))}.stories-pager__tick-progress-loader--DJvQ6{width:100%;height:3px;position:absolute;top:0;left:0;background:linear-gradient(to right, var(--stories-pager-tick-foreground, rgb(255, 255, 255)) var(--tick), transparent 0)}.stories-pager--JtIm1[dir=rtl] .stories-pager__tick-progress-loader--DJvQ6{background:linear-gradient(to left, var(--stories-pager-tick-foreground, rgb(255, 255, 255)) var(--tick), transparent 0)}",""]),s.locals={"stories-pager":"stories-pager--JtIm1","_desktop-mode":"_desktop-mode--MFqdz","_paused-ui":"_paused-ui--YKpOe","stories-pager__ticks":"stories-pager__ticks--IooJa",hiddenTimeline:"hiddenTimeline--uwXIm","stories-pager__tick":"stories-pager__tick--L96Px","stories-pager__tick-progress":"stories-pager__tick-progress--lwEYc",_active:"_active---U7hY","stories-pager__tick-progress-loader":"stories-pager__tick-progress-loader--DJvQ6"};const n=s},3278:(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--8v5Pf{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--8v5Pf._dummy--Llble{background-color:#fff}.stories-slide--8v5Pf .load-mask--5XCq2{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--8v5Pf._with-bottom-panel--2p7Pi._desktop-mode--CJL90,.stories-slide--8v5Pf._with-bottom-panel--2p7Pi._desktop-mode--CJL90 .narrative-slide-background--hMuFX,.stories-slide--8v5Pf._with-bottom-panel--2p7Pi._desktop-mode--CJL90 .narrative-slide-elements--i0a24{border-bottom-right-radius:0;border-bottom-left-radius:0}.stories-slide--8v5Pf .stories-slide__refresh-btn--MEBPq{color:#fff;cursor:pointer;position:absolute;left:50%;top:50%;transform:translate3d(-50%, -50%, 0);pointer-events:auto;padding:10px;width:32px;height:32px;box-sizing:content-box}.loading-spinner-default--ltiyb{-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--T3-dY .6s infinite linear;animation:loading-spinner--T3-dY .6s infinite linear}@keyframes loading-spinner--T3-dY{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.stories-slide--8v5Pf{z-index:1100}.stories-slide--8v5Pf._position_1--uVk5r{z-index:1130}.stories-slide--8v5Pf._position_2--Kuqp7{z-index:1120;visibility:hidden}.stories-slide-offset--R5f2H{pointer-events:none;position:relative;height:100%}.stories-slide-box--Br9iz{position:relative;padding:154.838709677% 0 0 0}.stories-slide-content--CKfk0{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--8v5Pf",_dummy:"_dummy--Llble","load-mask":"load-mask--5XCq2","_with-bottom-panel":"_with-bottom-panel--2p7Pi","_desktop-mode":"_desktop-mode--CJL90","narrative-slide-background":"narrative-slide-background--hMuFX","narrative-slide-elements":"narrative-slide-elements--i0a24","stories-slide__refresh-btn":"stories-slide__refresh-btn--MEBPq","loading-spinner-default":"loading-spinner-default--ltiyb","loading-spinner":"loading-spinner--T3-dY",_position_1:"_position_1--uVk5r",_position_2:"_position_2--Kuqp7","stories-slide-offset":"stories-slide-offset--R5f2H","stories-slide-box":"stories-slide-box--Br9iz","stories-slide-content":"stories-slide-content--CKfk0"};const n=s},2594:(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--s9hOL{visibility:visible;position:absolute;width:100%;height:auto;bottom:0;border-radius:inherit;backface-visibility:hidden}.slider3d__item--7j2AS{position:absolute;left:0;top:0;width:100%;backface-visibility:hidden;transform-style:preserve-3d}",""]),s.locals={"stories-item":"stories-item--s9hOL",slider3d__item:"slider3d__item--7j2AS"};const n=s},3390:(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--49G6v{left:50%;transform:translateX(-50%);overflow:hidden;box-sizing:border-box}.slider3d__wrapper--49G6v.slider3d__wrapper_swipe-up--r1InL.slider3d__wrapper_swipe-up--r1InL{background-color:rgba(0,0,0,0)}.slider3d__wrapper--49G6v .game-reader-wrapper--vHugs,.slider3d__wrapper--49G6v .share-panel-wrapper--zNSqw{overflow:hidden}.slider3d__wrapper--49G6v._desktop_mode--m7fGP{padding:50px 0}.slider3d__wrapper--49G6v._desktop_mode--m7fGP>.share-panel-wrapper--zNSqw{top:50px;bottom:50px;border-radius:5px}.slider3d__wrapper--49G6v._desktop_mode--m7fGP>.share-panel-wrapper--zNSqw.share-panel-wrapper--zNSqw{border-bottom-left-radius:0;border-bottom-right-radius:0}.slider3d__wrapper--49G6v *,.slider3d__wrapper--49G6v ::after,.slider3d__wrapper--49G6v ::before{box-sizing:border-box}.slider3d__wrapper--49G6v .stories-item--i1n9b,.slider3d__wrapper--49G6v .stories-slide--KXt9a,.slider3d__wrapper--49G6v .narrative-slide-background--LO2L6,.slider3d__wrapper--49G6v .narrative-slide-elements--bUq5g{border-radius:var(--slideBorderRadius, 0)}.slider3d--pT6gr{position:fixed !important}.slider3d--pT6gr.no-select--zMya8{user-select:none}.slider3d__wrapper--49G6v{z-index:1;position:relative;height:100%}.stories-face--tqFop{position:absolute !important;top:0;left:0;right:0;width:100%;width:calc(100% + .01px);height:100%}.slider3d__rotater--eYXIw{--tick: 0%;--tickOpacity: 0}.slider3d__inner--EFsin,.slider3d__rotater--eYXIw{position:relative;height:100%;transform-style:preserve-3d}",""]),s.locals={slider3d__wrapper:"slider3d__wrapper--49G6v","slider3d__wrapper_swipe-up":"slider3d__wrapper_swipe-up--r1InL","game-reader-wrapper":"game-reader-wrapper--vHugs","share-panel-wrapper":"share-panel-wrapper--zNSqw",_desktop_mode:"_desktop_mode--m7fGP","stories-item":"stories-item--i1n9b","stories-slide":"stories-slide--KXt9a","narrative-slide-background":"narrative-slide-background--LO2L6","narrative-slide-elements":"narrative-slide-elements--bUq5g",slider3d:"slider3d--pT6gr","no-select":"no-select--zMya8","stories-face":"stories-face--tqFop",slider3d__rotater:"slider3d__rotater--eYXIw",slider3d__inner:"slider3d__inner--EFsin"};const n=s},4169:(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--A3xCJ{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--A3xCJ .backdrop--CPTm4{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--2Iqns{position:absolute;z-index:2;user-select:none;display:flex;flex-direction:column;text-rendering:geometricprecision;overflow:hidden}.main--2Iqns .question--mn519{width:100%;height:auto}.main--2Iqns .question--mn519:empty{display:none}.main--2Iqns .input-group--jE\\+PN{display:flex}.main--2Iqns .input-group--jE\\+PN .input--Z388z{width:100%}.main--2Iqns .input-group--jE\\+PN .input-group__prepend--KtZUG{display:flex;flex:.35}.main--2Iqns .input-group--jE\\+PN .input-group__separator--44goC{border-right:1px solid #fff;margin-right:.5rem}.main--2Iqns .input-group--jE\\+PN .input--Z388z{flex:1}.main--2Iqns .input-wrapper--yYgPA{overflow:hidden;box-sizing:content-box;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.main--2Iqns .input-wrapper--yYgPA .input--Z388z{background:none;-webkit-tap-highlight-color:rgba(0,0,0,0);text-rendering:inherit;outline:none;border:none}.main--2Iqns .input-wrapper--yYgPA .input--Z388z::placeholder{color:inherit}.main--2Iqns .input-wrapper--yYgPA .input--Z388z.input_centered--0yBvl{text-align:center}.main--2Iqns .input-wrapper--yYgPA.is-invalid--PDNfg{border-color:#dc3545 !important;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.textarea-grow-wrap----9bt{display:grid;max-width:100%;word-break:break-all}.textarea-grow-wrap----9bt::after{content:attr(data-replicated-value) " ";white-space:pre-wrap;visibility:hidden}.textarea-grow-wrap----9bt>.input--Z388z{resize:none;overflow:hidden}.textarea-grow-wrap----9bt>.input--Z388z,.textarea-grow-wrap----9bt::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--u94hX{width:100%}.button-wrapper--u94hX .button--bQRP7{width:100%;cursor:pointer}.button-wrapper--u94hX .button--bQRP7:disabled,.button-wrapper--u94hX .button--bQRP7[disabled=true]{cursor:not-allowed;pointer-events:none;background-color:#272727 !important}@keyframes fadeIn--b16pe{from{opacity:0}to{opacity:1}}@keyframes fadeOut--DquTc{from{opacity:1}to{opacity:0}}.fadeIn--b16pe{animation:fadeIn--b16pe 300ms forwards}.fadeOut--DquTc{animation:fadeOut--DquTc 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--A3xCJ",backdrop:"backdrop--CPTm4",main:"main--2Iqns",question:"question--mn519","input-group":"input-group--jE+PN",input:"input--Z388z","input-group__prepend":"input-group__prepend--KtZUG","input-group__separator":"input-group__separator--44goC","input-wrapper":"input-wrapper--yYgPA",input_centered:"input_centered--0yBvl","is-invalid":"is-invalid--PDNfg","textarea-grow-wrap":"textarea-grow-wrap----9bt","button-wrapper":"button-wrapper--u94hX",button:"button--bQRP7",fadeIn:"fadeIn--b16pe",fadeOut:"fadeOut--DquTc"};const n=s},5757:(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--lAOKa{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--lAOKa"};const n=s},1196:(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--uZCkX{display:flex;flex-direction:column}.share-panel__body_screenshot--uZCkX .btn--VzRxf.btn-copy--dhlh1{cursor:pointer;background:rgba(0,0,0,0);border:none;width:100%;height:100%;display:flex;text-align:left;justify-content:center;align-items:center;color:#fff}.share-panel__body_screenshot--uZCkX .btn--VzRxf.btn-copy--dhlh1 .btn-copy__icon--w7FbM{margin-right:5px;position:relative;width:30px;height:30px;flex-shrink:0}.share-panel__body_screenshot--uZCkX .btn--VzRxf.btn-copy--dhlh1 .btn-copy__icon--w7FbM .btn-copy__icon-state--aOFwh{position:absolute;inset:0px;opacity:0;transition:opacity 300ms ease-in-out}.share-panel__body_screenshot--uZCkX .btn--VzRxf.btn-copy--dhlh1 .btn-copy__icon--w7FbM .btn-copy__icon-state--aOFwh.btn-copy__icon-state_default--n6LWH{opacity:1;visibility:visible}.share-panel__body_screenshot--uZCkX .btn--VzRxf.btn-copy--dhlh1 .btn-copy__icon--w7FbM .btn-copy__icon-state--aOFwh.btn-copy__icon-state_done--r-uzJ{opacity:1;visibility:visible}.share-panel__body_screenshot--uZCkX .btn--VzRxf.btn-copy--dhlh1 .btn-copy__text--IQD4A{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:5px}.share-panel__body_screenshot--uZCkX .btn--VzRxf.btn-copy--dhlh1:active{transform:scale(0.96)}.share-panel__body_screenshot--uZCkX .share-panel-row--LzAa0{justify-content:center;height:auto;padding:16px}.share-panel__body_screenshot--uZCkX .share-panel-row--LzAa0:first-child{height:450px;box-sizing:border-box}.share-panel__body_screenshot--uZCkX .share-panel-row__image-link--RXIki{width:100%;height:100%;display:flex;justify-content:center}.share-panel__body_screenshot--uZCkX .share-panel-row__image--HyVwP{max-width:100%;height:100%;object-fit:cover;border-radius:20px}.share-panel__body_screenshot--uZCkX .share-item__download-button--ypCUc{align-self:center;cursor:pointer;height:100%;width:100%;text-decoration:none;color:#fff;display:flex;align-items:center;justify-content:center}.share-panel__body_screenshot--uZCkX .share-item__download-button--ypCUc:active{transform:scale(0.96)}",""]),s.locals={"share-panel__body_screenshot":"share-panel__body_screenshot--uZCkX",btn:"btn--VzRxf","btn-copy":"btn-copy--dhlh1","btn-copy__icon":"btn-copy__icon--w7FbM","btn-copy__icon-state":"btn-copy__icon-state--aOFwh","btn-copy__icon-state_default":"btn-copy__icon-state_default--n6LWH","btn-copy__icon-state_done":"btn-copy__icon-state_done--r-uzJ","btn-copy__text":"btn-copy__text--IQD4A","share-panel-row":"share-panel-row--LzAa0","share-panel-row__image-link":"share-panel-row__image-link--RXIki","share-panel-row__image":"share-panel-row__image--HyVwP","share-item__download-button":"share-item__download-button--ypCUc"};const n=s},610:(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--OHeZZ{color:#fff}a.share-item--OHeZZ{color:#fff;transition:none}a.share-item--OHeZZ:hover{color:#fff}.social-list--5d274{flex-wrap:wrap;height:auto;padding-bottom:1rem}.social-list--5d274 .social-list__item--PmqO7{margin-top:1rem}",""]),s.locals={"share-item":"share-item--OHeZZ","social-list":"social-list--5d274","social-list__item":"social-list__item--PmqO7"};const n=s},8778:(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--x2oi3{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--x2oi3 .share-panel-backdrop--wh9uo{display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(0,0,0,.5)}.share-panel--Qm-mD{position:absolute;top:auto;left:0;right:0;bottom:0;z-index:2;user-select:none}.share-panel-row--LPdKG{width:100%;height:150px;display:flex;flex-direction:row;align-items:center}.share-panel-row--LPdKG .share-item--ZalUh{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--LPdKG .share-item--ZalUh:first-child{margin-left:20px}.share-panel-row--LPdKG .share-item--ZalUh:last-child{margin-right:20px}.share-panel-row--LPdKG .share-item--ZalUh,.share-panel-row--LPdKG .share-item--ZalUh:visited,.share-panel-row--LPdKG .share-item--ZalUh:active,.share-panel-row--LPdKG .share-item--ZalUh:focus{text-decoration:none}.share-panel-row--LPdKG .share-item--ZalUh .share-item-title--RxVKy{margin-top:20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:.2rem}.share-panel-row--LPdKG.title-row--Vfan2{height:120px;padding-top:30px;padding-bottom:30px;padding-left:20px;padding-right:20px}.share-panel-row--LPdKG.title-row--Vfan2 .share-url-favicon--cGryk{width:60px;height:60px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.share-panel-row--LPdKG.title-row--Vfan2 .share-url-favicon--cGryk img{width:30px;height:30px}.share-panel-row--LPdKG.title-row--Vfan2 .title--ZQZ6c{font-size:16px;line-height:1.4rem;margin-left:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.share-panel-separator--NXYXt{width:100%;height:1px}.share-panel--Qm-mD{will-change:transform;transition:transform 300ms}.share-panel__body--7Ljnv{width:100%;height:100%}@keyframes slideIn--CzJft{from{transform:translateY(100%)}to{transform:translateY(0%)}}@keyframes slideOut--lNjIY{from{transform:translateY(0%)}to{transform:translateY(100%)}}@keyframes fadeIn--qopSX{from{opacity:0}to{opacity:1}}@keyframes fadeOut--bA6JG{from{opacity:1}to{opacity:0}}.fadeIn--qopSX{animation:fadeIn--qopSX 300ms forwards}.fadeOut--bA6JG{animation:fadeOut--bA6JG 300ms forwards}.slideIn--CzJft{animation:slideIn--CzJft 300ms forwards}.slideOut--lNjIY{animation:slideOut--lNjIY 300ms forwards}',""]),s.locals={"share-panel-wrapper":"share-panel-wrapper--x2oi3","share-panel-backdrop":"share-panel-backdrop--wh9uo","share-panel":"share-panel--Qm-mD","share-panel-row":"share-panel-row--LPdKG","share-item":"share-item--ZalUh","share-item-title":"share-item-title--RxVKy","title-row":"title-row--Vfan2","share-url-favicon":"share-url-favicon--cGryk",title:"title--ZQZ6c","share-panel-separator":"share-panel-separator--NXYXt","share-panel__body":"share-panel__body--7Ljnv",fadeIn:"fadeIn--qopSX",fadeOut:"fadeOut--bA6JG",slideIn:"slideIn--CzJft",slideOut:"slideOut--lNjIY"};const n=s},7081:(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--5RBkn{width:2rem;height:2rem}",""]),s.locals={icon:"icon--5RBkn"};const n=s},6323:(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}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-barcode{pointer-events:all;cursor:pointer}.narrative-slide.narrative-slide .narrative-slide-elements .narrative-element-barcode *{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):[]}},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 x(){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),x.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=d=h=void 0},x.flush=function(){return void 0===h?u:b(s())},x}},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):[]}},5873:(e,t,i)=>{"use strict";var r=i(9514);t.H=r.createRoot,r.hydrateRoot},3335:(e,t,i)=>{"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var r=i(9155),s=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(e,t,i){var r,n={},d=null,c=null;for(r in void 0!==i&&(d=""+i),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,r)&&!l.hasOwnProperty(r)&&(n[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===n[r]&&(n[r]=t[r]);return{$$typeof:s,type:e,key:d,ref:c,props:n,_owner:a.current}}t.Fragment=n,t.jsx=d,t.jsxs=d},1085:(e,t,i)=>{"use strict";e.exports=i(3335)},2591:(e,t,i)=>{"use strict";var r,s=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},n=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),o=[];function a(e){for(var t=-1,i=0;i<o.length;i++)if(o[i].identifier===e){t=i;break}return t}function l(e,t){for(var i={},r=[],s=0;s<e.length;s++){var n=e[s],l=t.base?n[0]+t.base:n[0],d=i[l]||0,c="".concat(l," ").concat(d);i[l]=d+1;var u=a(c),h={css:n[1],media:n[2],sourceMap:n[3]};-1!==u?(o[u].references++,o[u].updater(h)):o.push({identifier:c,updater:v(h,t),references:1}),r.push(c)}return r}function d(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var s=i.nc;s&&(r.nonce=s)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=n(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function h(e,t,i,r){var s=i?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(t,s);else{var n=document.createTextNode(s),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(n,o[t]):e.appendChild(n)}}function p(e,t,i){var r=i.css,s=i.media,n=i.sourceMap;if(s?e.setAttribute("media",s):e.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,g=0;function v(e,t){var i,r,s;if(t.singleton){var n=g++;i=f||(f=d(t)),r=h.bind(null,i,n,!1),s=h.bind(null,i,n,!0)}else i=d(t),r=p.bind(null,i,t),s=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else s()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=s());var i=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<i.length;r++){var s=a(i[r]);o[s].references--}for(var n=l(e,t),d=0;d<i.length;d++){var c=a(i[d]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}i=n}}}},6704:(e,t,i)=>{"use strict";const r=document.querySelector("[nonce]");r&&(i.nc=r.nonce||r.getAttribute("nonce"))},4026:(e,t,i)=>{"use strict";
|
|
11
|
+
/**
|
|
12
|
+
* @license React
|
|
13
|
+
* use-sync-external-store-shim.production.min.js
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/var r=i(9155);var s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=r.useState,o=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function d(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!s(e,i)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var i=t(),r=n({inst:{value:i,getSnapshot:t}}),s=r[0].inst,c=r[1];return a((function(){s.value=i,s.getSnapshot=t,d(s)&&c({inst:s})}),[e,i,t]),o((function(){return d(s)&&c({inst:s}),e((function(){d(s)&&c({inst:s})}))}),[e]),l(i),i};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},4965:(e,t,i)=>{"use strict";
|
|
20
|
+
/**
|
|
21
|
+
* @license React
|
|
22
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
23
|
+
*
|
|
24
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
25
|
+
*
|
|
26
|
+
* This source code is licensed under the MIT license found in the
|
|
27
|
+
* LICENSE file in the root directory of this source tree.
|
|
28
|
+
*/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)},5136:e=>{"use strict";e.exports=r},3107:e=>{"use strict";e.exports=i},992:e=>{"use strict";e.exports=o},2840:t=>{"use strict";t.exports=e},9780:e=>{"use strict";e.exports=l},9155:e=>{"use strict";e.exports=s},9514:e=>{"use strict";e.exports=n},2265:e=>{"use strict";e.exports=a},7315:e=>{"use strict";e.exports=t}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={id:e,loaded:!1,exports:{}};return d[e].call(i.exports,i,i.exports,u),i.loaded=!0,i.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),u.nc=void 0;var h={};return(()=>{"use strict";u.r(h),u.d(h,{AppearanceCommonOptionsDefault:()=>$,AppearanceManager:()=>ue,CloseButtonPosition:()=>z,GameReaderOptionsDefault:()=>ce,GoodsWidgetOptionsDefault:()=>de,GoodsWidgetRenderingType:()=>oe,SharePageEvents:()=>Rt,SharePanelDefault:()=>te,StoriesListCardCoverQuality:()=>Y,StoriesListCardTitlePosition:()=>K,StoriesListCardTitleTextAlign:()=>Q,StoriesListCardViewVariant:()=>q,StoriesListDirection:()=>Z,StoriesListEvents:()=>X,StoriesListOptionsDefault:()=>J,StoriesListSliderAlign:()=>H,StoryFavoriteReaderOptionsDefault:()=>ne,StoryManager:()=>Xh,StoryManagerConfigDefault:()=>s,StoryReaderOptionsDefault:()=>re,StoryReaderSwipeStyle:()=>ie,WidgetStoriesOptions:()=>se});var e=u(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 p=(0,e.createEvent)();o.on(p,((e,{imagePlaceholders:t})=>Object.assign(Object.assign({},e),{imagePlaceholders:t})));const f=(0,e.createEvent)();o.on(f,((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)(),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=>{F("session/update",e,(()=>{}))})).prepend((e=>({data:[[5,0,...e]]})));m.map((e=>e.storyWidgetsResources));var x=u(7315);class _{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 L(e,t){return Object.assign(Object.assign({},e),t)}function A(e){return e.replace(/^\//,"")}const M={baseUrl:"https://cdn.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://${["cdn",...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=u(1580),P=u.n(R);class j extends Error{constructor(e,t,i){super(),this.name=e,this.networkStatus=t,this.networkMessage=i,console.error({name:e,networkStatus:t,networkMessage:i})}static containErrorDataInResponse(e){const t=e.data;return t&&P()(t)&&null!=t.name&&null!=t.message&&null!=t.status}static createByRequestError(e){return j.containErrorDataInResponse(e)?new j(e.data.name,e.data.status,e.data.message):new j("networkError",null,"Invalid data in API response, data from response as json: "+JSON.stringify(e.data))}static createByFetchError(e){if(e.response&&e.response.status)return new j("networkError",e.response.status,e.response.statusText);{let t="";return window.navigator&&!window.navigator.onLine&&(t=" net::ERR_INTERNET_DISCONNECTED"),new j("error",null,e.toString()+t)}}}var D=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 B=`InAppStoryWebSDK/${parseInt(3e4)} ${(e=>{let t="";for(let i=0;i<e.length;i++){t+=e.charCodeAt(i)<=255?e[i]:"?"}return t})(navigator.userAgent)}`;const N=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 D(this,void 0,void 0,(function*(){return new Promise(((t,i)=>{const r=()=>D(this,void 0,void 0,(function*(){try{if(k(e.headers)&&null!=e.headers||(e.headers={}),e.headers=L(this._baseHeaders,e.headers),this.requestInterceptors.length)for(const t of this.requestInterceptors)t(e);let r="";!C(e.params)&&k(e.params)&&(r=new URLSearchParams(Object.entries(e.params)).toString());let s=new URL(`${A(e.url)}${r?"?"+r:""}`,this.baseURL),n="get";C(e.method)||(n=e.method);let o={};!C(e.headers)&&k(e.headers)&&(o=e.headers);let a=null;!C(e.data)&&k(e.data)&&(a=JSON.stringify(e.data),o["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 l=yield fetch(s.toString(),{method:n,body:a,headers:o,credentials:"omit"}),d={data:yield l.json(),headersRaw:l.headers,headers:Object.fromEntries([...l.headers]),status:l.status,statusText:l.statusText,ok:l.ok};if(!l.ok)return void i(j.createByRequestError(d));t(d)}catch(e){i(j.createByFetchError(e))}}));this._deviceInfoPromise?this._deviceInfoPromise.finally(r):r()}))}))}post(e,t){return D(this,arguments,void 0,(function*(e,t,i={}){return this.request({method:"post",url:e,data:t,params:i})}))}get(e,t){return D(this,void 0,void 0,(function*(){return this.request({method:"get",url:e,params:t})}))}};function F(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:B}),l=o.getState();null!=l.appPackageId&&a.append("x_app_package_id",l.appPackageId);const d=`${n=N.baseURL,n.replace(/\/$/,"")}/${A(e)}?${a.toString()}`,c=new FormData;Object.keys(t).forEach((e=>{_.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 N.post(e,t).then((()=>i()),(()=>i()))}N.interceptors.request.use((e=>{var t,i,r;const s=o.getState();return e.headers=L(null!==(t=e.headers)&&void 0!==t?t:{},{Authorization:`Bearer ${s.apiKey}`,"Accept-Language":s.lang.toString(),"Auth-Session-Id":null===(r=null===(i=m.getState())||void 0===i?void 0:i.session)||void 0===r?void 0:r.id,"X-User-Id":s.userId?s.userId:"","X-Request-Id":(0,x.v4)(),"X-User-Agent":B}),null!=s.appPackageId&&(e.headers["X-App-Package-Id"]=s.appPackageId),s.disableDeviceId||(e.headers["X-Device-Id"]=g.getState()),e}));const U=N;var V;!function(e){e.UPDATE="update",e.EVENT_UPDATED_COMMON_OPTIONS="updatedCommonOptions",e.EVENT_UPDATED_STORIES_LIST_OPTIONS="updatedStoriesListOptions",e.EVENT_UPDATED_STORY_READER_OPTIONS="updatedStoryReaderOptions",e.EVENT_UPDATED_FAVORITE_READER_OPTIONS="updatedFavoriteReaderOptions",e.EVENT_UPDATED_GAME_READER_OPTIONS="updatedGameReaderOptions",e.EVENT_UPDATED_GOODS_WIDGET_OPTIONS="updatedGoodsWidgetOptions",e.EVENT_UPDATED_INAPPMESSAGING_WIDGET_OPTIONS="updatedInAppMessagingWidgetOptions"}(V||(V={}));Error;var z,G=u(46),W=u.n(G);!function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(z||(z={}));const $={hasFavorite:!1,hasLike:!1,hasShare:!1,closeButtonPosition:z.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 H,q,Q,K,Y,Z,X;!function(e){e.CENTER="center",e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end"}(H||(H={})),function(e){e.CIRCLE="circle",e.QUAD="quad",e.RECTANGLE="rectangle"}(q||(q={})),function(e){e.LEFT="left",e.RIGHT="right",e.START="start",e.END="end",e.CENTER="center"}(Q||(Q={})),function(e){e.CARD_INSIDE_BOTTOM="cardInsideBottom",e.CARD_OUTSIDE_TOP="cardOutsideTop",e.CARD_OUTSIDE_BOTTOM="cardOutsideBottom"}(K||(K={})),function(e){e.Medium="medium",e.High="high"}(Y||(Y={})),function(e){e.COLUMN="vertical",e.ROW="horizontal"}(Z||(Z={})),function(e){e.START_LOADER="startLoad",e.END_LOADER="endLoad"}(X||(X={}));const J={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"',padding:15,textAlign:Q.START,position:K.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:Y.High,variant:q.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:Q.START,position:K.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:Y.High,coverLazyLoading:!1,variant:q.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:H.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:Q.START,position:K.CARD_INSIDE_BOTTOM,display:!0,lineClamp:3},gap:10,height:70,aspectRatio:null,coverQuality:Y.High,coverLazyLoading:!1,variant:q.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"}},ee={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}`},te={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:ee,twitter:ee,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="30px" height="30px" 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>',doneState:'<svg width="30px" height="30px" fill="none" viewBox="0 0 386 264" xmlns="http://www.w3.org/2000/svg">\n<path d="m379.05 7.3156c8.855 8.8533 8.855 23.207 0 32.06l-210.67 210.67c-17.707 17.707-46.414 17.707-64.121 0l-97.319-97.319c-8.8531-8.855-8.8531-23.208 0-32.061 8.853-8.853 23.207-8.853 32.06 0l97.319 97.319 210.67-210.67c8.852-8.8531 23.206-8.8531 32.058 0z" clip-rule="evenodd" fill="currentColor" fill-rule="evenodd"/>\n</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 ie;!function(e){e.FLAT="flat",e.COVER="cover",e.CUBE="cube"}(ie||(ie={}));const re={gameReaderOptions:{loader:{default:{color:"white",accentColor:"transparent"},custom:null}},scrollStyle:ie.FLAT,timelineBlockTopOffset:8,actionPanelBottomOffset:0,borderRadius:12,loader:{default:{color:"white",accentColor:"transparent"},custom:null},recycleStoriesList:!1,closeOnLastSlideByTimer:!0,sharePanel:te,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 se;!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"}(se||(se={}));const ne={title:{content:"Favorite",font:"1.4rem/1.2 InternalPrimaryFont",color:"white",backgroundColor:"#333333"},headerTopOffset:0,bottomOffset:0,backgroundColor:"#333333"};var oe,ae=u(2743),le=u.n(ae);!function(e){e.DEFAULT="default",e.CUSTOM_CARD="customCard"}(oe||(oe={}));const de={goodsWidgetRenderingType:oe.DEFAULT,goodsList:{renderingType:oe.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"}}},ce={borderRadius:5,loader:{default:{color:"white",accentColor:"transparent"},custom:null},backdropColor:"#1a1a1a",backdrop:{opacity:1,background:"#1a1a1a"},game:{backdropColor:"rgb(51, 51, 51)"},forceDesktopMode:$.forceDesktopMode,forceCheckOrientation:!0};class ue extends G.EventEmitter{constructor(){super(),this._commonOptions=$,this._storiesListOptions=J,this._storyReaderOptions=re,this._storyFavoriteReaderOptions=ne,this._goodsWidgetOptions=de,this._gameReaderOptions=ce}setCommonOptions(e,t=!0){return this._commonOptions=le()(this._commonOptions,e),this.emit(V.UPDATE,this.commonOptions),this}get commonOptions(){return this._commonOptions}setStoriesListOptions(e,t=!0){return this._storiesListOptions=le()(this._storiesListOptions,e),t&&(this.emit(V.UPDATE,this.storiesListOptions),this.emit(V.EVENT_UPDATED_STORIES_LIST_OPTIONS,this.storiesListOptions)),this}get storiesListOptions(){return this._storiesListOptions}setStoryReaderOptions(e,t=!0){return this._storyReaderOptions=le()(this._storyReaderOptions,e,{arrayMerge:(e,t,i)=>t}),t&&this.emit(V.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=le()(this._storyFavoriteReaderOptions,e),t&&this.emit(V.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=le()(this._goodsWidgetOptions,e),t&&this.emit(V.UPDATE,this.goodsWidgetOptions),this}get goodsWidgetOptions(){return this._goodsWidgetOptions}setGameReaderOptions(e,t=!0){return this._gameReaderOptions=le()(this._gameReaderOptions,e),t&&this.emit(V.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 he extends G.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)}pauseGameUI(){null==this||this.sendMessage("cb",{cb:"pauseUI",arguments:JSON.stringify([])})}resumeGameUI(){null==this||this.sendMessage("cb",{cb:"resumeUI",arguments:JSON.stringify([])})}shareComplete(e,t){this.sendMessage("shareComplete",{id:e,isSuccess:t})}closeGameReader(){this.sendMessage("closeGameReader")}initGame(e){this.sendMessage("cb",{cb:"initGame",arguments:JSON.stringify([e])})}sendGameCenterEventByApiRequest(e,t){this.sendMessage("cb",{cb:e,plainData:t})}notifyGameCanBeStarted(){this.sendMessage("gameShouldForeground")}destroy(){window.removeEventListener("message",this.messageListener,!1),this.removeAllListeners()}}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=P()(this.instanceUserData)?this.instanceUserData:{};try{const i=JSON.parse(null!==(e=window.localStorage.getItem(this.key))&&void 0!==e?e:"{}");P()(i)&&(t=i)}catch(e){console.error(e)}return le()(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)])})}}var ge=u(3142),ve=u.n(ge);const me=(0,e.createStore)({default:{},user:{}}),{sdkImagePlaceholdersChanged:ye,addDefaultImagePlaceholders:we}=(0,e.createApi)(me,{sdkImagePlaceholdersChanged:(e,t)=>({default:e.default,user:t}),addDefaultImagePlaceholders:(e,t)=>{let i={default:{},user:e.user};return ve()(t)&&t.forEach((e=>{P()(e)&&void 0!==e.name&&void 0!==e.default_value&&(i.default[e.name]=e.default_value)})),i}}),Se=(0,e.createStore)({default:{},user:{}}),{sdkPlaceholdersChanged:be,addDefaultPlaceholders:xe}=(0,e.createApi)(Se,{sdkPlaceholdersChanged:(e,t)=>({default:e.default,user:t}),addDefaultPlaceholders:(e,t)=>{let i={default:{},user:e.user};return ve()(t)&&t.forEach((e=>{P()(e)&&void 0!==e.name&&void 0!==e.default_value&&(i.default[e.name]=e.default_value)})),i}});var _e,Ce,ke,Le,Ae,Me;!function(e){e.direct="direct",e.onboarding="onboarding",e.list="list",e.favorite="favorite"}(_e||(_e={})),function(e){e[e.default=0]="default",e[e.favorite=1]="favorite",e[e.stacked=2]="stacked"}(Ce||(Ce={})),function(e){e[e.default=0]="default",e[e.onboarding=1]="onboarding",e[e.favorite=2]="favorite",e[e.direct=3]="direct"}(ke||(ke={})),function(e){e.list="list",e.favorite="favorite"}(Le||(Le={})),function(e){e.CLICK_ON_STORY="clickOnStoryLink"}(Ae||(Ae={})),function(e){e.TEXT="text",e.IMAGE="image"}(Me||(Me={}));const Oe=Object.prototype.hasOwnProperty,Ee=()=>{const e=Se.getState(),t=me.getState(),i=[],r={};for(let t in e.default)Oe.call(e.default,t)&&(r[t]={type:Me.TEXT,name:t,value:e.default[t]});for(let t in e.user)Oe.call(e.user,t)&&(r[t]={type:Me.TEXT,name:t,value:e.user[t]});for(let e in r)Oe.call(r,e)&&i.push(r[e]);const s={};for(let e in t.default)Oe.call(t.default,e)&&(s[e]={type:Me.IMAGE,name:e,value:t.default[e]});for(let e in t.user)Oe.call(t.user,e)&&(s[e]={type:Me.IMAGE,name:e,value:t.user[e]});for(let e in s)Oe.call(s,e)&&i.push(s[e]);return i},Ie=(0,e.createStore)({style:"",widgetsData:{}}),Te=(0,e.createEffect)(),Re=(0,e.createEffect)();var Pe;!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.UGC=1]="UGC"}(Pe||(Pe={}));const je=e=>({id:e,type:Pe.DEFAULT,title:null,title_color:null,background:{},background_color:null,image:null,display_to:null,display_from:null,favorite:null,like:null,deeplink:null,hide_in_reader:null,hide_timeline:!1,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,game_instance:{id:null},share_url:null,slidesLoaded:!1,error:null,slides_count:0,slides:[]}),De=(0,e.createStore)({}),Be=(0,e.createStore)({default:[]}),Ne=Be.map((e=>e[m.getState().user_key||"default"]||[]));var Fe;!function(e){e.FEEDS="feeds",e.FAVORITE="favorite"}(Fe||(Fe={}));const Ue=(0,e.createStore)({default:{[Fe.FEEDS]:{},[Fe.FAVORITE]:[]}}),Ve=Ue.map((e=>e[m.getState().user_key||"default"]||{})),ze=(0,e.createStore)({}),Ge=(0,e.createStore)({}),We=(0,e.createStore)([]),$e=(e,t)=>e.map((e=>t.find((t=>t.id===e)))).filter((e=>!!e));ze.on([Ve,Ne],((e,t)=>{const i=Ve.getState(),r=Ne.getState();return((e,t)=>{const i={};for(const[r,s]of Object.entries(e))i[r]=$e(s,t);return i})(i[Fe.FEEDS],r)})),Ge.on([Ve,Ne],((e,t)=>{const i=Ve.getState(),r={};for(const e in i[Fe.FEEDS])if("onboarding_"===e.substring(0,11)){const t=e.substring(11);if(r[t]=[],i[Fe.FEEDS][e]&&Array.isArray(i[Fe.FEEDS][e])){const s={};Ne.getState().filter((e=>!e.is_opened)).forEach((e=>{s[e.id]=e})),r[t]=i[Fe.FEEDS][e].filter((e=>s[e])).map((e=>s[e]))}}return r})),We.on([Ve,Ne],((e,t)=>{var i;const r=null!==(i=Ve.getState()[Fe.FAVORITE])&&void 0!==i?i:[],s={};return Ne.getState().forEach((e=>{s[e.id]=e})),r.map((e=>s[e]))}));const He=(e,t="")=>e.is_opened,{storyItemFavoriteChanged:qe,storyItemLikeChanged:Qe,storyItemIsOpenedChanged:Ke}=(Ne.map((e=>{const t={};return t[Pe.DEFAULT]=e.filter((e=>!e.slidesLoaded&&e.type===Pe.DEFAULT)).map((e=>e.id)),t[Pe.UGC]=e.filter((e=>!e.slidesLoaded&&e.type===Pe.UGC)).map((e=>e.id)),t})),Object.prototype.hasOwnProperty,(0,e.createApi)(Be,{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})}}));var Ye=u(4871),Ze=u.n(Ye);let Xe,Je=!0;function et(e){Xe(e),Je=e}function tt(){return Xe(Je),Je}Xe=function(){};class it{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;U.request(o).then((function(t){let i,r;i=t.data,i&&(i.__lastUpdated=Date.now()),r=it.createInstance(e,i),s(r)})).catch(n)}))}static _fetchList(e,t,i){return new Promise(((r,s)=>{U.get(t,{params:i}).then((function(t){const i=t.data;let s=[];i.forEach((t=>{s.push(it.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)=>{U.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)=>{U.request(r).then((function(t){let i;i=t.data,e(i)})).catch(t)}))}}var rt;!function(e){e[e.BottomSheet=1]="BottomSheet",e[e.Modal=2]="Modal",e[e.Fullscreen=3]="Fullscreen"}(rt||(rt={}));const st=(e,t)=>{let i=[];switch(e){case ke.default:i=t?ze.getState()[t]:[];break;case ke.favorite:i=We.getState();break;case ke.onboarding:i=t?Ge.getState()[t]:[];break;case ke.direct:i=Ne.getState()}return null!=i?i:[]},nt="{{__ugc__}}",ot=e=>e===nt?Pe.UGC:Pe.DEFAULT,at=e=>({windowReferer:Ce.default,listType:ke.direct,id:e.id,storyContext:Ie.getState(),storyList:[e],hasShare:m.getState().share,placeholders:Ee()}),lt=e=>"{{__ugc__}}"===e?Pe.UGC:Pe.DEFAULT;var dt=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 ct=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 ut=(e,t)=>ct(void 0,void 0,void 0,(function*(){const e=yield(i={data:t},dt(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 U.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}));class ht{constructor(){this.rawData={}}singleModelWrapper(){return""}attributes(){return[]}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}}var pt=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 ft extends ht{static save(e,t,i){return pt(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:[{}]}}}))}}class gt{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);ft.save(this.gameReaderViewModel.gameInstanceId,JSON.stringify(s),ut)}}var vt=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 mt;!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"}(mt||(mt={}));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())}))};!function(e){e.Social="social",e.SlideScreenshot="slide-screenshot"}(yt||(yt={}));class St{constructor(e,t,i){this.gameCenterMessageService=e,this.gameReaderViewModel=t,this.desktopMode=i}handle(e,t){return wt(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=>vt(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=yt.Social,s=t;e.files&&e.files.length>0&&(r=yt.SlideScreenshot,s=URL.createObjectURL(e.files[0])),this.gameReaderViewModel.emit(mt.OpenSharePanel,{shareId:i,shareType:r,shareLink:s})}}class bt{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 xt{constructor(e,t){this.gameCenterMessageService=e,this.gameReaderViewModel=t}handle(e){const t=JSON.parse(e);if(!P()(t))return;const{id:i,storyId:r,callback:s}=t;let n=new bt(r).get();this.gameCenterMessageService.sendMessage("cb",{cb:s,arguments:JSON.stringify([i,JSON.stringify(n)])})}}class _t extends ht{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 Ct{constructor(){}handle(e){const t=JSON.parse(e);if(!P()(t))return;const{storyId:i,data:r,sendToServer:s}=t;new bt(i).set(r),s&&_t.sentData(i,JSON.stringify(r),ut)}}var kt,Lt=u(3655),At=u.n(Lt),Mt=u(8138),Ot=u.n(Mt),Et=u(986),It=u.n(Et);!function(e){e.Update="update"}(kt||(kt={}));class Tt extends G.EventEmitter{update(){this.emit("update")}destroy(){this.removeAllListeners()}}var Rt,Pt=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 jt{constructor(){this.viewModels=new Map,this.observersByKey=new Map}set(e,t){this.viewModels.set(e,t),this.notifyViewModelSet(e)}get(e){return this.viewModels.get(e)}wait(e){return Pt(this,void 0,void 0,(function*(){const t=this.viewModels.get(e);return t||new Promise((t=>{let i=this.observersByKey.get(e);i||(i=[]);const r=()=>{const s=this.viewModels.get(e);if(!s)throw new Error;i.splice(i.indexOf(r),1),t(s)};i.push(r),this.observersByKey.set(e,i)}))}))}getAll(){return Array.from(this.viewModels.values())}getAllOfType(e){return Array.from(this.viewModels.values()).filter(e)}has(e){return this.viewModels.has(e)}delete(e){this.viewModels.delete(e)}clear(){this.viewModels.clear()}notifyViewModelSet(e){var t;null===(t=this.observersByKey.get(e))||void 0===t||t.forEach((e=>e()))}}!function(e){e.START_LOADING="startLoading",e.END_LOADING="endLoading",e.CLOSE_STORY_READER="closeStoryReader"}(Rt||(Rt={}));class Dt extends Tt{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}getAspectRatio(e){var t,i;switch(e){case se.STYLE_CIRCLE:case se.STYLE_QUAD:return 1;case se.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 Bt extends Dt{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 Nt=new G.EventEmitter;var Ft;Nt.setMaxListeners(50),function(e){e.STORY_LIST="storyList",e.STORY_READER="storyReader",e.GAME_READER="gameReader",e.STACK_STORY_LIST="stackStoryList"}(Ft||(Ft={}));class Ut{constructor(e,t){this.storyManager=e,this.statisticsService=t}handle(e){var t;e.dataForSending=tt()?{data:this.statisticsService.getData()}:null;const i=()=>this.storyManager.clickOnButtonAction({src:Ft.STORY_READER,payload:e});!(null===(t=this.storyManager.getConfig())||void 0===t?void 0:t.disableStatistic)&&e.dataForSending&&P()(e.dataForSending)&&Array.isArray(e.dataForSending.data)&&e.dataForSending.data.length>0?(this.statisticsService.cleanupData(),F("session/update",e.dataForSending,i)):i()}}class Vt{constructor(e){this.storyManager=e}handle(e,t,i){var r,s;const n=i.listType,o=null!==(r=i.feedSlug)&&void 0!==r?r:"",a=i.filter,l=lt(o),d={title:null,tags:[],slidesCount:null,feed:null,filter:null,source:null},c=Ne.getState().find((e=>e.id===t.id));if(c&&(d.title=c.stat_title,d.tags=c.tags,d.slidesCount=c.slides_count,c.type===Pe.UGC&&(d.ugcPayload=P()(c.payload)?c.payload:{})),l===Pe.DEFAULT?d.feed=o:l===Pe.UGC&&(d.filter=a),n===ke.direct?d.source=_e.direct:n===ke.default?d.source=_e.list:n===ke.onboarding?d.source=_e.onboarding:n===ke.favorite&&(d.source=_e.favorite),null!=t.index&&-1===["clickOnStory","showStory"].indexOf(e)){t.payload=null;const e=null===(s=null==c?void 0:c.slides[t.index])||void 0===s?void 0:s.event_payload;(null==e?void 0:e.payload)&&(t.payload=e.payload)}this.storyManager.emit(e,Object.assign(Object.assign({},t),d))}}function zt(e,t,i){return String(e).replace(new RegExp(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(t),"g"),(()=>i))}const Gt=()=>null!==u.nc&&void 0!==u.nc?u.nc:"";class Wt extends ht{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://")}}var $t=u(3981),Ht=u.n($t);class qt{constructor(){this.images=[],this.color="",this.gradient=!1}static createFromArray(e){const t=new qt;for(let i in e)e.hasOwnProperty(i)&&t.images.push(Wt.createInstance(Wt,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){var i;let r=null;return this.images.forEach((t=>{t.width===e&&(r=t)})),null!==r?r:(r=null!==(i=Ht()(this.images))&&void 0!==i?i:null,t&&null!=r?r:null)}mapCoverQualityToImageType(e){switch(e){case Y.Medium:return"m";case Y.High:return"h"}}}class Qt extends ht{constructor(){super(...arguments),this._title="",this.title_color="",this.magazine_name="",this.is_opened=!1,this.slides_count=null,this._slides=[],this.source="",this.favorite=!1,this.like=0,this.deeplink=null,this.hide_in_reader=null,this.blank=!1,this.disable_close=!1,this.need_placeholders=null,this.hide_timeline=!1,this._placeholders={},this.favorite_cell=!1,this.ugc_card_cell=!1,this.slidesLoaded=!1,this.error=null,this._parsedSlideImage=null,this._video_cover=null,this._videoCoverSrc=null}attributes(){return Ze()(super.attributes(),["title","title_color","source","magazine_name","background","background_color","id","image","display_to","display_from","favorite","like","deeplink","hide_in_reader","hide_timeline","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","slides","slides_count","slidesLoaded","error"])}set image(e){this._image=qt.createFromArray(e)}get image(){return this._image}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}parseHtmlSlidesForMainImage(){!this._parsedSlideImage&&this.slides_count&&(this._parsedSlideImage=this.slides.map((e=>this.parseSlideNarrativeImageSrc(e.html)||this.parseSlideNarrativeVideoPosterSrc(e.html)||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=qt.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 Qt.placeholders)Qt.placeholders.hasOwnProperty(t)&&(e=zt(e,`%${t}%`,Qt.placeholders[t]));this.rawData.title=e,this._title=e}get slides(){return this._slides}set slides(e){var t;for(const i of e)i.html=zt(i.html,"{{nonce}}",null!==(t=Gt())&&void 0!==t?t:"");this._slides=e}get isOpened(){return this.is_opened}set isOpened(e){this.is_opened=e,this.rawData.is_opened=e}}Qt.placeholders={};const Kt=Qt,Yt=u(4871);class Zt extends ht{constructor(){super(...arguments),this.style="",this.widgetsData={}}attributes(){return Yt(super.attributes(),["style","widgetsData"])}}const Xt=(0,e.createStore)({uiPaused:!1,timerPaused:!1,locked:!1,closeGestureInAction:!1}),Jt=Xt.map((e=>e.uiPaused)),ei=Xt.map((e=>e.timerPaused)),ti=(0,e.createStore)(!1),ii=(0,e.createStore)(!0),ri=(0,e.createStore)(!0),si=(0,e.createEvent)(),ni=(0,e.createEvent)(),oi=(0,e.createEvent)(),ai=(0,e.createEvent)(),li=(0,e.createEvent)(),di=(0,e.createEvent)(),ci=(0,e.createEvent)(),ui=(0,e.createEvent)(),hi=(0,e.createEvent)(),pi=(0,e.createEvent)(),fi=(0,e.createEvent)(),gi=(0,e.createEvent)(),vi=(0,e.createEvent)(),mi=(0,e.createEvent)(),yi=t=>(0,e.sample)({source:Xt,clock:t,filter:e=>!e.locked}),wi=yi(ci),Si=yi(ui),bi=yi(hi),xi=yi(pi);Xt.on(bi,(e=>Object.assign(Object.assign({},e),{uiPaused:!0,timerPaused:!0}))).on(xi,(e=>Object.assign(Object.assign({},e),{uiPaused:!1,timerPaused:!1}))).on(wi,(e=>e.timerPaused?e:Object.assign(Object.assign({},e),{timerPaused:!0}))).on(Si,(e=>e.timerPaused?Object.assign(Object.assign({},e),{timerPaused:!1}):e)).on(fi,(e=>Object.assign(Object.assign({},e),{uiPaused:!0,timerPaused:!0,locked:!0}))).on(gi,(e=>Object.assign(Object.assign({},e),{uiPaused:!1,timerPaused:!1,locked:!1}))).on(vi,(e=>Object.assign(Object.assign({},e),{timerPaused:!0,locked:!0}))).on(mi,(e=>Object.assign(Object.assign({},e),{timerPaused:!1,locked:!1}))),ti.on(si,(e=>!0)).on(ni,(e=>!1)),ii.on(oi,(()=>!0)).on(ai,(()=>!1)),ri.on(li,(()=>!0)).on(di,(()=>!1));const _i={id:"",isOpened:!1,type:yt.Social,link:""},Ci=(0,e.createStore)(_i),ki=Ci.map((e=>e.isOpened)),Li=(0,e.createEvent)(),Ai=(0,e.createEvent)();Ci.on(Li,((e,t)=>Object.assign(Object.assign({},e),{link:t.link,type:t.type,text:t.text,id:t.id,isOpened:!0}))).on(Ai,(e=>_i));class Mi extends(W()){constructor(e){super(),this.story=e,this.initialLayer=null,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"))),this.initialLayer=this._activeLayer}reset(){var e;this.hideAllLayers(),null===(e=this.initialLayer)||void 0===e||e.classList.remove("hidden")}get activeLayer(){return this._activeLayer}getLayers(){return this.layers}hideLayer(e){e.classList.contains("hidden")||(this.animationApi.stop(e,!0),e.classList.add("hidden"),this.emit("hideLayer",{layer:e}))}showLayer(e){this.startTimer(),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}startTimer(){var e;this.story.timer.start(null!==(e=this.story.activeSlide.duration)&&void 0!==e?e:0)}}const Oi=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 Ei=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 Ii{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 Ei(this,void 0,void 0,(function*(){this.videoEl.pause(),this.videoEl.currentTime=0,yield this.play()}))}play(){return Ei(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 Ei(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 Ei(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}destroy(){return Ei(this,void 0,void 0,(function*(){return Promise.resolve()}))}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 Ti=u(3107),Ri=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 Pi extends Ii{constructor(e){super(e),this._vodData=null,this.handlePlayerError=this.handlePlayerError.bind(this),this._vodData=Pi.parseData(e)}get vodData(){return this._vodData}static get isBrowserSupported(){return Ti.Player.isBrowserSupported()}load(){const e=Object.create(null,{load:{get:()=>super.load}});return Ri(this,void 0,void 0,(function*(){try{Pi.isBrowserSupported?(this.disableVideoPreload(),yield this.initPlayer()):(this.updateVideoSources(),yield e.load.call(this),console.error("[VOD]: Browser not supported!"))}catch(e){throw this.handlePlayerError({detail:e}),e}}))}destroy(){return Ri(this,void 0,void 0,(function*(){var e;this.stop(),null===(e=this.player)||void 0===e||e.removeEventListener("error",this.handlePlayerError),yield this.detachVideoElement(),yield this.player.destroy()}))}static parseData(e){const t=e.getAttribute("data-vod");try{return t&&JSON.parse(t)}catch(e){return null}}initPlayer(){return Ri(this,void 0,void 0,(function*(){this.player=new Ti.Player,this.player.addEventListener("error",this.handlePlayerError),yield this.attachVideoElement(),yield this.loadVideo(),yield this.play(),this.stop()}))}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){this.detachVideoElement().catch(console.error);const t=e.detail,i=`[VOD]: error code ${t.code}; object ${t}`;console.error(i)}attachVideoElement(){return Ri(this,void 0,void 0,(function*(){yield this.player.attach(this.videoEl),Xe("[VOD]: video element attached",this.videoEl)}))}loadVideo(){return Ri(this,void 0,void 0,(function*(){const e=Ti.Player.convertJsonToUri(this.vodData);yield this.player.load(e,0,"application/json"),Xe(`[VOD]: video ${e} successful loaded`)}))}detachVideoElement(){return Ri(this,void 0,void 0,(function*(){yield this.player.detach(this.videoEl),Xe("[VOD]: video element detached",this.videoEl)}))}}var ji=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 Di{constructor(){this.videos=[]}init(e){return ji(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 ji(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 ji(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()}destroy(){return ji(this,void 0,void 0,(function*(){for(const e of this.videos)yield e.destroy()}))}createVideoByElement(e){return Pi.parseData(e)?new Pi(e):new Ii(e)}}var Bi=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 Ni{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 Bi(this,void 0,void 0,(function*(){for(const e of this.layerManager.getLayers()){const t=new Di;yield t.init(e),this.videoContexts.set(e,t)}}))}start(){return Bi(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 Bi(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()}destroy(){return Bi(this,void 0,void 0,(function*(){for(const e of this.videoContexts.values())yield e.destroy();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 Fi=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 Ui{constructor(e){this.videoContainer=e,this.videoContext=new Di}init(){return Fi(this,void 0,void 0,(function*(){yield this.videoContext.init(this.videoContainer)}))}start(){return Fi(this,void 0,void 0,(function*(){yield this.videoContext.start()}))}pause(){this.videoContext.pause()}resume(){return Fi(this,void 0,void 0,(function*(){yield this.videoContext.resume()}))}stop(){this.videoContext.stop()}mute(){this.videoContext.mute()}unmute(){this.videoContext.unmute()}destroy(){return Fi(this,void 0,void 0,(function*(){return this.videoContext.destroy()}))}}class Vi{static create(e,t){return e.querySelectorAll(".narrative-slide.narrative-multi-slide").length>0?new Ni(t):new Ui(e)}}var zi,Gi=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"}(zi||(zi={}));class Wi{constructor(e,t,i){this.slideApi=e,this.layersManager=t,this.story=i,this._widgets=new Map,this.showLayerByIndex=this.showLayerByIndex.bind(this),this.handleRefreshUserData=this.handleRefreshUserData.bind(this);for(const t of Wi.widgetClasses.values()){const r=new t(e,i);this._widgets.set(r.getType(),r)}}static register(e){Wi.widgetClasses.add(e)}get widgets(){return Array.from(this._widgets.values())}init(e){return Gi(this,void 0,void 0,(function*(){this.layersManager.init(e,this.slideApi.Animation),Nt.on(Qn.ShowLayer,this.showLayerByIndex),Nt.on(zi.REFRESH_WIDGETS_STATE,this.handleRefreshUserData);for(const t of this._widgets.values())yield t.init(e);this.layersManager.init(e,this.slideApi.Animation)}))}pause(){for(const e of this._widgets.values())e.pause()}resume(){for(const e of this._widgets.values())e.resume()}findWidgetByType(e){const t=this._widgets.get(e);if(null==t?void 0:t.firstElement)return t}stop(){for(const e of this._widgets.values())e.destroy();Nt.off(Qn.ShowLayer,this.showLayerByIndex),Nt.off(zi.REFRESH_WIDGETS_STATE,this.handleRefreshUserData)}destroy(){this.stop()}handleRefreshUserData(){this._widgets.forEach((e=>e.refreshUserData()))}showLayerByIndex({index:e}){this.layersManager.showLayerByIndex(e)}}Wi.widgetClasses=new Set;class $i{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(){if(!this.type)throw new Error("[StoryWidget]: widget must have a type");return this.type}}var 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 $i{constructor(e){super(),this.slideApi=e,this.type=qi.name}init(e){return Hi(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-barcode");try{this.slideApi.WidgetBarcode.initWidget(this.elements)}catch(e){console.error(e)}}))}refreshUserData(){this.elements&&this.slideApi.WidgetBarcode.refreshUserData(this.elements)}click(e){e.target===this.firstElement&&(this.slideApi.WidgetBarcode.click(e.target),e.navigationController.preventDefault())}}var Qi=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 Ki extends $i{constructor(e){super(),this.slideApi=e,this.type=Ki.name}init(e){return Qi(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){e.target===this.firstElement&&(this.slideApi.WidgetCopy.click(e.target),e.navigationController.preventDefault())}}var Yi=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 Zi extends $i{constructor(e){super(),this.slideApi=e,this.type=Zi.name}init(e){return Yi(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){e.target===this.firstElement&&(this.slideApi.WidgetDataInput.click(e.target),e.navigationController.preventDefault())}setUserData(e,t=""){this.slideApi.WidgetDataInput.setUserData(e,t)}}var Xi=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 Ji extends $i{constructor(e){super(),this.slideApi=e,this.type=Ji.name}init(e){return Xi(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)}click(){}}var er=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 $i{constructor(e){super(),this.slideApi=e,this.type=tr.name}init(e){return er(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)}}))}click(){}destroy(){}}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 rr extends $i{constructor(e){super(),this.slideApi=e,this.type=rr.name}init(e){return ir(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)}click(e){e.target.classList.contains("narrative-element-poll-button")&&(this.select(e.target),e.navigationController.preventDefault())}}var sr=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 $i{constructor(e){super(),this.slideApi=e,this.type=nr.name}init(e){return sr(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)}click(e){e.target.classList.contains("narrative-element-poll-button")&&(this.select(e.target),e.navigationController.preventDefault())}}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 ar extends $i{constructor(e,t){super(),this.slideApi=e,this.story=t,this.type=ar.name}init(e){return or(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)}click(e){e.target.classList.contains("narrative-element-test-answer")?this.handleTestAnswer(e):this.handleRouteClick(e)}handleTestAnswer(e){this.select(e.target),e.navigationController.preventDefault()}handleRouteClick(e){e.navigationController.navigationDisabled||(e.navigationController.preventDefault(),this.slideApi.WidgetQuest.handleRouteClick(this.firstElement,{direction:e.navigationController.direction>0?"forward":"backward",slideIndex:this.story.activeSlideIndex,slideCount:this.story.slidesCount,click:()=>{e.navigationController.navigate()}}))}}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 dr extends $i{constructor(e,t){super(),this.slideApi=e,this.story=t,this.type=dr.name}init(e){return lr(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)}click(e){e.target.classList.contains("narrative-element-quiz-next-button")?this.handleNextButton(e):e.target.classList.contains("narrative-element-quiz-answer")?this.handleAnswer(e):this.handleQuizIsDone(e)}handleQuizIsDone(e){this.slideQuizIsDone(this.firstElement)||e.navigationController.disableNextClick()}handleNextButton(e){this.story.nextSlide(),e.navigationController.preventDefault()}handleAnswer(e){this.select(e.target),e.navigationController.preventDefault()}}var cr=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 $i{constructor(e,t){super(),this.slideApi=e,this.story=t,this.type=ur.name}init(e){return cr(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)}click(e){e.target.classList.contains("narrative-element-quiz-next-button")?this.handleNextButton(e):e.target.classList.contains("narrative-element-quiz-answer")?this.handleAnswer(e):this.handleQuizIsDone(e)}handleNextButton(e){this.story.nextSlide(),e.navigationController.preventDefault()}handleQuizIsDone(e){this.slideQuizIsDone(this.firstElement)||e.navigationController.disableNextClick()}handleAnswer(e){this.select(e.target),e.navigationController.preventDefault()}}var hr=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 $i{constructor(e){super(),this.slideApi=e,this.type=pr.name,this.disableSwipeGesture=this.disableSwipeGesture.bind(this),this.enableSwipeGesture=this.enableSwipeGesture.bind(this)}init(e){return hr(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){e.target.classList.contains("rangeslider")?this.handleClickSlider(e):e.target.classList.contains("narrative-element-range-slider-next-button")?this.handleClickSliderNextButton(e):this.handleCaptureClick(e)}isClickCapturedBySlider(e){return this.slideApi.WidgetRangeSlider.isClickCapturedBySlider(e)}destroy(){this.unregisterMouseAndTouchEvents()}handleClickSlider(e){e.navigationController.preventDefault()}handleCaptureClick(e){this.isClickCapturedBySlider(this.firstElement)&&e.navigationController.preventDefault()}handleClickSliderNextButton(e){this.slideApi.WidgetRangeSlider.click(e.target),e.navigationController.preventDefault()}disableSwipeGesture(e){ai()}enableSwipeGesture(e){oi()}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)}}var fr=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 $i{constructor(e){super(),this.slideApi=e,this.type=gr.name}init(e){return fr(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)}}))}click(e){e.target.classList.contains("narrative-element-rate-input")&&(this.select(e.target),e.navigationController.preventDefault())}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 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 mr extends $i{constructor(e){super(),this.slideApi=e,this.type=mr.name,this.handleShareComplete=this.handleShareComplete.bind(this)}init(e){return vr(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){e.target===this.firstElement&&(this.slideApi.WidgetShare.click(e.target),e.navigationController.preventDefault())}destroy(){this.unregisterEvents()}registerEvents(){Nt.on(`${mr.name}.shareComplete`,this.handleShareComplete)}unregisterEvents(){Nt.off(`${mr.name}.shareComplete`,this.handleShareComplete)}handleShareComplete({shareId:e,result:t}){Xe(`[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 wr extends $i{constructor(e){super(),this.slideApi=e,this.type=wr.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 yr(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())}))}click(e){}destroy(){this.unregisterEvents()}close(){Fr(),gi(),this.setGoodsElementOpacity(1)}registerEvents(){var e;Nt.on("swipeController.swipeUp",this.handleSwipeUpGesture),Nt.on("goods.close",this.handleSwipeUpGesture),null===(e=this.firstElement)||void 0===e||e.addEventListener("click",this.handleClick)}unregisterEvents(){var e;Nt.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);fi(),Nr({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 Sr=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 br extends $i{constructor(e,t){super(),this.slideApi=e,this.story=t,this.type=br.name,this.handleSwipeUpGesture=this.handleSwipeUpGesture.bind(this)}get swipeUpLinkTarget(){return this._swipeUpLinkTarget}get swipeUpElementId(){return this._swipeUpElementId}init(e){return Sr(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,Nt.on("swipeController.swipeUp",this.handleSwipeUpGesture))}))}click(e){}destroy(){Nt.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&&Gn(this.story,e)}}var xr=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 _r extends $i{constructor(e){super(),this.slideApi=e,this.type=_r.name}init(e){return xr(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){if(e.target.classList.contains("narrative-element-vote-next-button")){if(!this.slideApi.WidgetVote.click(e.target))return void e.navigationController.preventDefault()}e.target.classList.contains("narrative-element-vote-answer")&&(this.slideApi.WidgetVote.select(e.target),e.navigationController.preventDefault())}}var Cr=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 $i{constructor(e,t){super(),this.slideApi=e,this.story=t,this.type=kr.name}init(e){return Cr(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)}click(e){e.target.classList.contains("narrative-element-test-next-button")?this.handleNextButton(e):e.target.classList.contains("narrative-element-test-answer")?this.handleAnswer(e):this.handleTestIsDone(e)}handleNextButton(e){this.story.nextSlide(),e.navigationController.preventDefault()}handleAnswer(e){this.select(e.target),e.navigationController.preventDefault()}handleTestIsDone(e){const t=this.slideTestIsDone(this.firstElement);!this.slideTestWithTimer(this.firstElement)||t?t||e.navigationController.disableNextClick():e.navigationController.preventDefault()}}var Lr,Ar=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 $i{constructor(e,t){super(),this.slideApi=e,this.story=t,this.type=Mr.name}init(e){return Ar(this,void 0,void 0,(function*(){this.elements=e.querySelectorAll(".narrative-element-story-repeat")}))}click(e){e.target===this.firstElement&&(this.story.reset().catch(console.error),e.navigationController.preventDefault())}}Wi.register(qi),Wi.register(Ki),Wi.register(Zi),Wi.register(Ji),Wi.register(tr),Wi.register(rr),Wi.register(nr),Wi.register(ar),Wi.register(dr),Wi.register(ur),Wi.register(pr),Wi.register(gr),Wi.register(mr),Wi.register(wr),Wi.register(br),Wi.register(_r),Wi.register(kr),Wi.register(Mr),function(e){e[e.None=0]="None",e[e.DisableNext=1]="DisableNext",e[e.DisablePrev=2]="DisablePrev"}(Lr||(Lr={}));class Or{constructor(e,t,i,r,s){this.slide=e,this.event=t,this.geometry=i,this.dir=r,this.desktopMode=s,this._mode=Lr.None,this._defaultPrevented=!1,this._direction=0,this._direction=this.calcDirection()}get mode(){return this._mode}get direction(){return this._direction}get defaultPrevented(){return this._defaultPrevented||this.slide.navigationDisabled}get navigationDisabled(){return this.slide.navigationDisabled}preventDefault(){this._defaultPrevented=!0}disableNextClick(){this._mode=Lr.DisableNext}navigate(){this.direction<0?this.toPrev():this.mode!==Lr.DisableNext&&this.toNext()}toPrev(){"ltr"===this.dir?this.prevSlideOrStory():this.nextSlideOrStory()}toNext(){"ltr"===this.dir?this.nextSlideOrStory():this.prevSlideOrStory()}prevSlideOrStory(){this.slide.story.reachStart?Nt.emit(`${ao.name}.showPrevStory`):this.slide.story.prevSlide()}nextSlideOrStory(){this.slide.story.reachEnd?Nt.emit(`${ao.name}.showNextStory`):this.slide.story.nextSlide()}calcClickPosition(){var e;let t=0,i=0;return this.desktopMode?(t=this.geometry.calculateWidth(),i=this.event.nativeEvent.offsetX):(t=this.geometry.vw,i=this.event.nativeEvent.pageX||(null===(e=this.event.nativeEvent.touches)||void 0===e?void 0:e[0].pageX)),i/t}calcDirection(){return this.calcClickPosition()<=.3?-1:1}}const Er={id:"",running:!1},Ir=(0,e.createStore)(Er),Tr=(0,e.createEvent)(),Rr=(0,e.createEvent)(),Pr=(0,e.createEvent)(),jr=(0,e.createEffect)((({shareId:e,result:t})=>{Pr(),mi(),Nt.emit(`${mr.name}.shareComplete`,{shareId:e,result:t})}));Ir.on(Tr,((e,t)=>Object.assign(Object.assign({},e),{id:t.id,running:!0}))).on(Pr,(()=>Er)),(0,e.sample)({clock:Rr,source:Ir,filter:e=>e.running,fn:(e,t)=>({shareId:e.id,result:t.result}),target:jr});const Dr={isOpened:!1,url:"",elementId:""},Br=(0,e.createStore)(Dr),Nr=(Br.map((e=>e.isOpened)),(0,e.createEvent)()),Fr=(0,e.createEvent)();(0,e.sample)({clock:Nr,target:ai}),(0,e.sample)({clock:Fr,target:oi}),Br.on(Nr,((e,t)=>({url:t.url,elementId:t.elementId,isOpened:!0}))).on(Fr,(e=>Dr));class Ur{init(e){var t;const i="stories-slider-style";let r=document.getElementById(i),s="";null!==e&&(s=null!==(t=e.style)&&void 0!==t?t:""),null===r?(r=document.createElement("style"),r.type="text/css",r.id=i,r.attributes.setNamedItem(document.createAttribute("scoped")),r.setAttribute("nonce",Gt()),r.styleSheet?r.styleSheet.cssText=s:r.appendChild(document.createTextNode(s)),document.head.appendChild(r)):r.styleSheet?r.styleSheet.cssText=s:(r.textContent="",r.appendChild(document.createTextNode(s)))}}class Vr{constructor(){this.cache={}}set(e,t){this.cache[e]=t}clear(){this.cache={}}get(e){return this.cache[e]}}class zr{constructor(){this.actions=[]}push(e){this.actions.push(e)}exec(){for(const e of this.actions)e()}flush(){this.actions=[]}}var Gr=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{constructor(e){this.statisticsService=e,this.timerId=null}start(){this.schedule(1e4)}stop(){null!=this.timerId&&(clearTimeout(this.timerId),this.timerId=null)}flush(){return Gr(this,void 0,void 0,(function*(){Xe(`[${Zr.name}]: flush statistics by timer`);this.statisticsService.getData().length>0?this.schedule(1e4):this.schedule(3e4),yield this.statisticsService.sendData()}))}schedule(e){Xe(`[${Zr.name}]: schedule flush statistics on ${e}ms`),this.timerId=setTimeout((()=>this.flush()),e)}}class $r{calculate(){const e=Date.now(),t=e-this.slideStartedAt;return this.slideStartedAt=e,t}init(){this.slideStartedAt=Date.now()}}class Hr{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),Nt.on(Kr.CloseStoryReader,this.handle)}handle(e){this.statisticsService.addSlideEvent({action:1,storyId:e.storyId,slideIndex:e.slideIndex})}destroy(){Nt.off(Kr.CloseStoryReader,this.handle)}}class qr{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),Nt.on(Kr.NextSlide,this.handle)}handle(e){this.statisticsService.addSlideEvent({action:1,storyId:e.fromStoryId,slideIndex:e.fromSlideIndex})}destroy(){Nt.off(Kr.NextSlide,this.handle)}}class Qr{constructor(e){this.statisticsService=e,this.handle=this.handle.bind(this),Nt.on(Kr.TransitionFromSlide,this.handle)}handle(e){this.statisticsService.addSlideEvent({action:2,storyId:e.storyId,slideIndex:e.slideIndex})}destroy(){Nt.off(Kr.TransitionFromSlide,this.handle)}}var Kr,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())}))};!function(e){e.CloseStoryReader="statistics.closeStoryReader",e.NextSlide="statistics.nextSlide",e.TransitionFromSlide="statistics.transitionFromSlide"}(Kr||(Kr={}));class Zr extends(W()){constructor(e){super(),this.beaconService=e,this.lastIndex=0,this.data=[],this.sourceInfo=null,this.events=[],this.flushSheduler=new Wr(this),this.slideDurationCalculator=new $r}init(e){this.data=[],this.sourceInfo=e,this.lastIndex=0,this.slideDurationCalculator.init(),this.flushSheduler.start(),this.events=[new Hr(this),new qr(this),new Qr(this)]}getData(){return this.data.slice()}getLastIndex(){return this.lastIndex}cleanupData(){this.data=[]}addSlideEvent(e){if(!tt())return;const t=this.slideDurationCalculator.calculate();this.data.push([e.action,this.lastIndex,e.storyId,e.slideIndex,t]),this.lastIndex++}sendData(){return Yr(this,void 0,void 0,(function*(){const e=this.getData();if(e.length)try{if(!this.sourceInfo)throw new Error(`[${Zr.name}]: You need pass source info!`);this.cleanupData(),yield this.beaconService.updateStatistics({updateDto:{data:e},listType:ot(this.sourceInfo.feedSlug)})}catch(t){this.data.push(...e),console.error(t)}}))}destroy(){return Yr(this,void 0,void 0,(function*(){this.events.forEach((e=>e.destroy())),this.flushSheduler.stop(),yield this.sendData()}))}}var Xr=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 Jr{constructor(e){this.storyManager=e}updateStatistics(e){return Xr(this,arguments,void 0,(function*({listType:e,updateDto:t}){var i;if(0===t.data.length)return t;let r=!1,s="";if(e===Pe.UGC||(null===(i=this.storyManager.getConfig())||void 0===i?void 0:i.disableStatistic))r=!0;else try{F("session/update",t,(()=>{})),r=!0}catch(e){s=e.toString()}if(r)return t;throw s}))}}var es=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 ts{constructor(e){this.storyReaderViewModel=e,this.deferredActionsQueue=new zr,this.narrativeStoryCache=new Vr,this.activeStorySlide=null,this.activeStory=null}lock(e){if(this.activeStorySlide&&this.activeStorySlide!==e)throw new Error(`[SlideApi]: The resource is locked by story with ID ${this.activeStorySlide.story.id} and slide index ${this.activeStorySlide.index}`);this.activeStorySlide=e}unlock(e){this.activeStorySlide===e&&(this.activeStorySlide=null)}exec(){this.activeStorySlide&&(this.deferredActionsQueue.exec(),this.deferredActionsQueue.flush())}getStoryLocalData(){return es(this,void 0,void 0,(function*(){if(!this.activeStory)return{};let e=sessionStorage.getItem("narrative_"+this.activeStory.id+"_data");return e?JSON.parse(e):{}}))}setStoryLocalData(e,t){if(!this.activeStory)return;let i=JSON.stringify(e);sessionStorage.setItem("narrative_"+this.activeStory.id+"_data",i),t&&tt()&&_t.sentData(this.activeStory.id,{data:i},ut)}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(){hi()}resumeUI(){pi()}showStoryTextInput(e,t){Nt.emit(Qn.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.activeStory&&(this.activeStory.markAsOpened(),Nt.emit(Kr.TransitionFromSlide,{storyId:this.activeStory.id,slideIndex:this.activeStory.activeSlideIndex}),window.open(e,"_parent"))}sendApiRequest(e,t,i,r,s,n){return _t.sendApiRequest({url:e,method:t,params:i,headers:r,data:s,profilingKey:n},ut)}share(e,t){null==e&&(e="story-share"),Nt.emit(Qn.PerformShareAction,{shareId:e,config:t})}shareSlideScreenshot(e,t,i){null==e&&(e="slide-screenshot-share"),Nt.emit(Qn.PerformScreenShotShareAction,{shareId:e,hideElementsSelector:null!=t?t:"",shareText:i})}showLayer(e){Nt.emit(Qn.ShowLayer,{index:e})}showStorySlide(e){this.pushToDefferedActionsQueueOrExec((()=>{var t;null===(t=this.activeStory)||void 0===t||t.redirectToSlide({slideIndex:e})}))}storyShowNext(){Nt.emit(`${ao.name}.showNextStory`)}showNextSlide(e){this.pushToDefferedActionsQueueOrExec((()=>{e?this.activeStory.timer.start(e):this.activeStory.nextSlide()}))}sendStatisticEvent(e,t,i){Nt.emit("publicEvents.widgetEvent",{name:e,devPayload:i})}destroy(){}setActiveStory(e){this.narrativeStoryCache.clear(),this.activeStory=e,this.activeStorySlide&&this.unlock(this.activeStorySlide)}resetStory(e){return es(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]);Nt.emit(zi.REFRESH_WIDGETS_STATE),this.updateStoryServerData(e,i),this.setStoryLocalData(i,!0),this.showStorySlide(0),this.showLayer(0)}))}pushToDefferedActionsQueueOrExec(e){this.activeStorySlide?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)):[]}updateTimeline(e,t,i,r,s,n){}showToast(e){Nt.emit(Qn.ShowToast,{content:e})}}const is=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();function rs(e){let t=null;if(is){let i=window.localStorage.getItem(e);null!==i&&Ot()(i)&&i.trim().length>0&&(t=JSON.parse(i))}return t}function ss(e,t){is&&window.localStorage.setItem(e,JSON.stringify(t))}var ns=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 os=null;function as(){return ns(this,void 0,void 0,(function*(){return null!=os?os: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)=>{os=i,e(i)}))}))}))}var ls=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 ds=new class{openSession(e){return ls(this,void 0,void 0,(function*(){var t;return(yield U.post(e.url,null!==(t=e.data)&&void 0!==t?t:{},e.params)).data}))}};function cs(e,t,i=!1,r,s){const n=["slides"];r&&n.push("share_url");const o={url:`${t===nt?"ugc/":""}story/${e}`,method:"GET",params:{expand:n.join(",")}};return o.params.once=Number(Boolean(s)),i||null!=o.params&&(o.params.fields=["id","slides"].join(",")),o}const us=(e,t,i,r)=>{var s;let n=null===(s=o.getState())||void 0===s?void 0:s.tags;const a={};n&&ve()(n)&&n.length>0&&(a.tags=n.join(",")),void 0!==e&&ve()(e)&&e.length>0&&(a.tags=e.join(","));return null==i||"number"!=typeof i&&!(e=>!isNaN(parseFloat(e))&&isFinite(e))(i)||(a.limit=i),null!=t&&(a.test=t),null!=r&&P()(r)&&(a.f=JSON.stringify(r)),{params:a}};var hs=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())}))};Te.use((e=>hs(void 0,void 0,void 0,(function*(){return Ie.getState().style||(yield Re()),gs.fetchStoryContext(e)})))),Re.use((()=>hs(void 0,void 0,void 0,(function*(){return gs.fetchStoryStyles()}))));Ie.on([Te.doneData,Re.doneData],((e,t)=>{var i;const r=Object.assign(Object.assign({},e),{widgetsData:Object.assign({},e.widgetsData)});return r.style=null!==(i=null==t?void 0:t.style)&&void 0!==i?i:e.style,r.widgetsData=t.widgetsData?((e,t)=>{for(const[i,r]of Object.entries(t)){const t=Array.isArray(r)?{}:r;e[i]=Object.assign(Object.assign({},e[i]),t)}return e})(r.widgetsData,t.widgetsData):r.widgetsData,r}));class ps extends Error{constructor(e){super(`Story with ID ${e} has already been shown to the user`),this.name=ps.name}}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())}))};const gs=new class{fetchUgcFeed(e){return fs(this,arguments,void 0,(function*({filter:e,testKey:t}){var i;const r=function(e,t,i,r){const{params:s}=us(i,r,null,t);return{method:"GET",url:"ugc/feed",params:s}}(0,e,[],t);return(yield U.get(r.url,null!==(i=r.params)&&void 0!==i?i:{})).data}))}fetchFeed(e){return fs(this,arguments,void 0,(function*({feedSlug:e,testKey:t}){var i;const r=function(e,t,i){const{params:r}=us(t,i);return{method:"GET",url:`feed/${e}`,params:r}}(e,[],t),s=yield U.get(r.url,null!==(i=r.params)&&void 0!==i?i:{});return s.data.feedSlug=e,s.data}))}fetchFavoriteList(){return fs(this,void 0,void 0,(function*(){var e;const t=function(){const{params:e}=us();return{method:"GET",url:"story",params:Object.assign(Object.assign({},e),{favorite:1})}}();return(yield U.get(t.url,null!==(e=t.params)&&void 0!==e?e:{})).data}))}fetchOnboardingList(e){return fs(this,arguments,void 0,(function*({onboardingList:e,onboardingTags:t,limit:i}){var r;const s=function(e="onboarding",t,i){const{params:r}=us(t,null,i);return{method:"GET",url:`feed/${e}/onboarding`,params:r}}(e,t,i),n=yield U.get(s.url,null!==(r=s.params)&&void 0!==r?r:{});return n.data.feedSlug=e,n.data}))}fetchStorySlides(e){return fs(this,arguments,void 0,(function*({id:e,feedSlug:t}){var i;const r=cs(e,t);return(yield U.get(r.url,null!==(i=r.params)&&void 0!==i?i:{})).data}))}fetchStory(e){return fs(this,arguments,void 0,(function*({id:e,feedSlug:t,fetchShareUrl:i,once:r}){var s;const n=cs(e,t,!0,i,r),o=yield U.get(n.url,null!==(s=n.params)&&void 0!==s?s:{});if(204===o.status&&r)throw new ps(e.toString());return o.data}))}fetchStoryContext(e){return fs(this,arguments,void 0,(function*({ids:e}){var t;const i=function(e){return{url:"story-context",method:"GET",params:{id:e.join(","),fields:"widgetsData"}}}(e);return(yield U.get(i.url,null!==(t=i.params)&&void 0!==t?t:{})).data}))}fetchStoryStyles(){return fs(this,void 0,void 0,(function*(){var e;const t={url:"story-context",method:"GET",params:{fields:"style"}};return(yield U.get(t.url,null!==(e=t.params)&&void 0!==e?e:{})).data}))}},vs=/[\r\n%#()<>?[\\\]^`{|}]/g;function ms(e,t="double"){return(e=(e=(e="double"===t?e.replace(/"/g,"'"):e.replace(/'/g,'"')).replace(/>\s{1,}</g,"><")).replace(/\s{2,}/g," ")).replace(vs,encodeURIComponent)}const ys=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});var ws;!function(e){e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary",e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary"}(ws||(ws={}));var Ss=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 bs=e=>Ss(void 0,void 0,void 0,(function*(){return(yield fetch(e)).blob()})),xs=e=>Ss(void 0,void 0,void 0,(function*(){const t=yield bs(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 _s(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 Cs(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 ks;function Ls(e,t,i,r,s,n,o,a,l,d){var c=Cs("svg",{width:String(s),height:String(n),style:"background-color: #fff;"}),u=Cs("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=_s(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){xs(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){xs(e.src).then((function(i){e.onload=i=>e.decode().then((()=>t())),e.onerror=e=>{console.error(e),t()},e.decoding="sync",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=Cs("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);bs(i).then((function(t){l(t),e.remove()}))}}),e===ks.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.decoding="sync",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 As(e,t,i,r){return new Promise((function(s,n){null==r&&(r=""),function(e,t,i,r,s,n){Ls(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 Ms(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"}(ks||(ks={}));const Os=()=>{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},Es=!!Os()&&{passive:!0};!function(){const e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;window.requestAnimationFrame=e}();const Is=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 Ts(e,t,i){return new Promise((r=>{let s=!1;const n=()=>{s=!0,clearTimeout(a),void 0!==Is&&e.removeEventListener(Is,o),e.style.setProperty("transition",`${t} 0ms`),r()},o=e=>{e.propertyName===t&&(s||n())};void 0!==Is&&e.addEventListener(Is,o,!1);const a=setTimeout((()=>{s||n()}),i+20);e.style.setProperty("transition",`${t} ${i}ms`)}))}var Rs=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 Ps=(e,...t)=>Rs(void 0,[e,...t],void 0,(function*(e,t=300){return new Promise((i=>{const r=Math.max(0,t-((new Date).getTime()-e));r?setTimeout(i,r):i()}))}));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 Ds{fetchStoryAndContextById(e){return js(this,arguments,void 0,(function*({storyId:e,feed:t,fetchShareUrl:i,once:r}){try{const s=(new Date).getTime();return yield y(),yield Te({ids:[e],feedSlug:t}),yield Js({id:e,feedSlug:t,fetchShareUrl:i,once:r}),yield Ps(s),this.getOrCreateDirectStoryById(e)}catch(t){if(r)throw t;const i=this.getOrCreateDirectStoryById(e);return i.error=t,i}}))}fetchStoriesSlidesAndContextByStoryId(e){return js(this,arguments,void 0,(function*({storyId:e,listType:t,feed:i=""}){const r=this.getVisibleStoriesByListTypeAndFeed(t,i),s=r.findIndex((t=>t.id===e));return yield this.fetchStoriesSlidesAndContextByRange({stories:r,storyIndex:s,listType:t,feed:i}),this.getStoriesWithSlidesAndContext({listType:t,feed:i})}))}fetchStoriesSlidesAndContextByNextStoryIndex(e){return js(this,arguments,void 0,(function*({nextStoryIndex:e,listType:t,feed:i}){const r=this.getVisibleStoriesByListTypeAndFeed(t,i);return yield this.fetchStoriesSlidesAndContextByRange({stories:r,storyIndex:e,listType:t,feed:i}),this.getStoriesWithSlidesAndContext({listType:t,feed:i})}))}getOrCreateDirectStoryById(e){var t;return null!==(t=st(ke.direct).find((t=>t.id===e||t.string_id===e.toString())))&&void 0!==t?t:je(e)}getStoriesWithSlidesAndContext({listType:e,feed:t}){return{storyList:st(e,t).filter((e=>!e.hide_in_reader)),storyContext:Ie.getState(),listType:e}}fetchStoriesSlidesAndContextByRange(e){return js(this,void 0,void 0,(function*(){const t=this.getStoryIdsByStoriesRange(e.stories,e.storyIndex);if(!t.length)return null;yield this.fetchSlidesAndContext({feed:e.feed,storyIds:t})}))}getStoryIdsByStoriesRange(e,t){const i=t-2,r=t+2;return e.slice(Math.max(i,0),r+1).filter((e=>!e.slidesLoaded)).map((e=>e.id))}fetchSlidesAndContext(e){return js(this,arguments,void 0,(function*({feed:e,storyIds:t}){const i=(new Date).getTime();try{yield Te({ids:t,feedSlug:e}),yield Promise.allSettled(t.map((t=>Xs({id:t,feedSlug:e})))),yield Ps(i)}catch(e){}}))}getVisibleStoriesByListTypeAndFeed(e,t){return st(e,t).filter((e=>!e.hide_in_reader))}}var Bs=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 Ns=u(7315);y.use((()=>Bs(void 0,void 0,void 0,(function*(){const e=m.getState();if(e.session.id)return e;const t=yield function(){return Bs(this,void 0,void 0,(function*(){const[e,t]=yield Promise.all([Us(),as()]);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:Fs(e,t)}}))}();return ds.openSession(t)})))),(0,e.sample)({clock:w,target:m});const Fs=(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},Us=()=>Bs(void 0,void 0,void 0,(function*(){return new Promise(((e,t)=>{let i=rs("device_data"),r=null;if(null!==i&&(r=i.device_id),null!==i&&r&&Ot()(r)&&36===r.trim().length)v(r),e(i);else{const t={platform:"web",device_id:Ns.v4()};ss("device_data",t),v(t.device_id),e(t)}}))})),Vs=(0,e.createEffect)();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())}))};Vs.use((()=>zs(void 0,void 0,void 0,(function*(){return(yield U.request(yield function(){return zs(this,void 0,void 0,(function*(){return{method:"GET",url:"ugc/editor-config",params:{}}}))}())).data})))),m.on(Vs.doneData,((e,t)=>{const i=Object.assign({},e);return i.editor=t,i}));class Gs extends it{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 Ws=u(3981);class $s{constructor(){this.images=[],this.color="",this.gradient=!1}static createFromArray(e){const t=new $s;for(let i in e)e.hasOwnProperty(i)&&t.images.push(Gs.createInstance(Gs,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=Ws(this.images))?i:null}}class Hs extends it{constructor(){super(...arguments),this._cover=null,this.hasFavorite=!1,this.stories=[]}attributes(){return Ze()(super.attributes(),["id","cover","hasFavorite","stories"])}set cover(e){this._cover=$s.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}}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())}))};const Qs=(0,e.createEffect)((e=>qs(void 0,void 0,void 0,(function*(){return gs.fetchUgcFeed(e)})))),Ks=(0,e.createEffect)((e=>qs(void 0,void 0,void 0,(function*(){return gs.fetchFeed(e)})))),Ys=(0,e.createEffect)((()=>qs(void 0,void 0,void 0,(function*(){return gs.fetchFavoriteList()})))),Zs=(0,e.createEffect)((e=>qs(void 0,void 0,void 0,(function*(){return gs.fetchOnboardingList(e)})))),Xs=(0,e.createEffect)((e=>qs(void 0,void 0,void 0,(function*(){return gs.fetchStorySlides(e)})))),Js=(0,e.createEffect)((e=>qs(void 0,void 0,void 0,(function*(){return gs.fetchStory(e)})))),en=(0,e.createEvent)(),tn=(0,e.createEffect)((e=>qs(void 0,[e],void 0,(function*({defaultList:e,onboardingList:t,favoriteList:i,onboardingTags:r,testKey:s,limit:n}){var o;if(yield y(),!1!==e&&P()(e)&&Ot()(e.feedSlug)){const t=e.feedSlug,i=null!==(o=e.filter)&&void 0!==o?o:{};t===nt?yield Qs({filter:i,testKey:s}):yield Ks({feedSlug:t,testKey:s})}i&&(yield Ys()),!1!==t&&Ot()(t)&&(yield Zs({onboardingList:t,onboardingTags:r,limit:n}))})))),rn=e=>{const t=Se.getState();for(let i in t.user)nn.call(t.user,i)&&(e=zt(e,`%${i}%`,t.user[i]));for(let i in t.default)nn.call(t.default,i)&&(e=zt(e,`%${i}%`,t.default[i]));const i=me.getState();for(let t in i.user)nn.call(i.user,t)&&(e=zt(e,`%${t}%`,i.user[t]));for(let t in i.default)nn.call(i.default,t)&&(e=zt(e,`%${t}%`,i.default[t]));return e},sn=(e,t)=>Array.isArray(e)?e.map((e=>Object.assign(Object.assign({},e),{title:e.need_placeholders?rn(e.title):e.title,slidesLoaded:!1,is_opened:He(e),type:t}))):[];(0,e.sample)({clock:y.doneData,filter:m.map((e=>!e.session.id)),target:m}),(0,e.sample)({clock:m.map((e=>e.placeholders)),target:xe}),(0,e.sample)({clock:m.map((e=>e.image_placeholders)),target:we});const nn=Object.prototype.hasOwnProperty;(0,e.sample)({source:Be,clock:m,fn:(e,t)=>{const i={};for(const r in e)nn.call(e,r)&&(i[r]=e[r].map((e=>Object.assign(Object.assign({},e),{is_opened:He(e,t.user_key),title:e.need_placeholders?rn(e.title):e.title}))));return i},target:Be});const{storiesListIdsChanged:on}=(0,e.createApi)(Ue,{storiesListIdsChanged:(e,{storiesIdsUserEntity:t,feedSlug:i,storyList:r})=>{let s=m.getState().user_key||"default";const n=e[s]||{};return void 0===n[Fe.FAVORITE]&&(n[Fe.FAVORITE]=[]),void 0===n[Fe.FEEDS]&&(n[Fe.FEEDS]={}),t===Fe.FEEDS&&i&&(n[Fe.FEEDS][i]=r.map((e=>e.id))),t===Fe.FAVORITE&&(n[Fe.FAVORITE]=r.map((e=>e.id))),Object.assign(Object.assign({},e),{[s]:n})}}),{storiesListItemsAdded:an}=(0,e.createApi)(Be,{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))).map((e=>Object.assign(Object.assign({},e),{slides:[]})))]})}}),{storyFeedsAdded:ln}=(0,e.createApi)(De,{storyFeedsAdded:(e,t)=>Object.assign(Object.assign({},e),t)});(0,e.sample)({clock:Ks.doneData.map((e=>{let t={};return t[e.feedSlug]=it.createInstance(Hs,e),t})),target:[ln]}),(0,e.sample)({clock:Qs.doneData.map((e=>{let t={};return t[nt]=it.createInstance(Hs,e),t})),target:[ln]}),(0,e.sample)({clock:Ks.doneData.map((e=>{const t=sn(e.stories,Pe.DEFAULT);return{storiesIdsUserEntity:Fe.FEEDS,feedSlug:e.feedSlug,storyList:t}})),target:[an,on]}),(0,e.sample)({clock:Qs.doneData.map((e=>{const t=sn(e,Pe.UGC);return{storiesIdsUserEntity:Fe.FEEDS,feedSlug:nt,storyList:t}})),target:[an,on]}),(0,e.sample)({clock:Zs.doneData.map((e=>{const t=sn(e.stories,Pe.DEFAULT);return{storiesIdsUserEntity:Fe.FEEDS,feedSlug:`onboarding_${e.feedSlug}`,storyList:t}})),target:[an,on]}),(0,e.sample)({clock:Ys.doneData.map((e=>{const t=sn(e,Pe.DEFAULT);return{storiesIdsUserEntity:Fe.FAVORITE,feedSlug:null,storyList:t}})),target:[an,on]});const dn=(e,t)=>Object.assign(Object.assign({},e),{slidesLoaded:!0,error:null,is_opened:He(e),slides:t.slides.map((t=>Object.assign(Object.assign({},t),{html:e.need_placeholders?rn(t.html):t.html})))}),cn=()=>m.getState().user_key||"default",un=(e,t)=>(e[t]||[]).slice(),hn=(e,t)=>e.findIndex((e=>e.id===t)),pn=(e,t)=>{const i=cn(),r=un(e,i),s=hn(r,t.id);return-1===s?r.push(dn(t,t)):r[s]=dn(r[s],t),Object.assign(Object.assign({},e),{[i]:r})},fn=(e,{params:{id:t},error:i})=>{const r=cn(),s=un(e,r),n=hn(s,t);if(-1===n){const e=je(t);e.error=i,s.push(e)}else s[n]=Object.assign(Object.assign({},s[n]),{slidesLoaded:!1,error:i});return Object.assign(Object.assign({},e),{[r]:s})};Be.on(Te.fail,((e,{params:{ids:t},error:i})=>{const r=cn(),s=un(e,r);for(const e of t){const t=hn(s,e);if(-1===t){const t=je(e);t.error=i,s.push(t)}else s[t]=Object.assign(Object.assign({},s[t]),{slidesLoaded:!1,error:i})}return Object.assign(Object.assign({},e),{[r]:s})})),Be.on(Xs.doneData,pn),Be.on(Js.doneData,pn),Be.on(Xs.fail,fn),Be.on(Js.fail,fn),Be.on(en,((e,{id:t,story:i})=>{const r=cn(),s=un(e,r),n=hn(s,t);return-1===n?e:(s[n]=Object.assign(Object.assign({},s[n]),i),Object.assign(Object.assign({},e),{[r]:s}))})),(0,e.sample)({source:Be,clock:Se,fn:e=>{const t={};for(const i in e)nn.call(e,i)&&(t[i]=e[i].map((e=>Object.assign(Object.assign({},e),{slides:e.slides.map((t=>Object.assign(Object.assign({},t),{html:e.need_placeholders?rn(t.html):t.html})))}))));return t},target:Be});var gn=u(3514),vn=u.n(gn),mn=u(2438),yn=u.n(mn),wn=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 Sn{static updateStoryLike(e,t){return wn(this,void 0,void 0,(function*(){let i=!1;const r={like:void 0};let s="";try{const n=yield U.post(`story-like/${e}`,{value:t});void 0!==n.data.like?(i=!0,r.like=n.data.like,Qe({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 wn(this,void 0,void 0,(function*(){let t=!1;const i={url:void 0};let r="";try{const s=yield U.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(!vn()(m.getState().user_key)){const t=`u/${m.getState().user_key}/s_opened`;let i=rs(t);ve()(i)||(i=[]),i.push(e),i=yn()(i),ss(t,i)}Ke({id:e})}static setBookmark(e,t){return wn(this,void 0,void 0,(function*(){let i=!1;const r={favorite:void 0};let s="";try{const n=yield U.post(`story-favorite/${e}`,{value:t});void 0!==n.data.favorite?(i=!0,r.favorite=Boolean(n.data.favorite),!1===r.favorite?on({storiesIdsUserEntity:Fe.FAVORITE,feedSlug:null,storyList:We.getState().filter((t=>t.id!==e))}):on({storiesIdsUserEntity:Fe.FAVORITE,feedSlug:null,storyList:[...We.getState(),...Ne.getState().filter((t=>t.id===e))]}),qe({id:e,favorite:r.favorite})):s="response.data.favorite is undefined"}catch(e){s=e.toString()}if(i)return r;throw s}))}}class bn{constructor(){this.prevStoryId=-1,this.prevSlideIndex=-1}update({currentSlideIndex:e,currentStoryId:t}){this.prevStoryId!==t&&Nt.emit("publicEvents.showStory",{id:t,index:e}),-1!==this.prevStoryId&&Nt.emit(Kr.NextSlide,{fromStoryId:this.prevStoryId,fromSlideIndex:this.prevSlideIndex}),Nt.emit("publicEvents.showSlide",{id:t,index:e}),this.prevStoryId=t,this.prevSlideIndex=e}reset(){this.prevStoryId=-1,this.prevSlideIndex=-1}}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 _n extends Error{constructor(){super("The list of onboarding stories is empty")}}class Cn{constructor(e,t){this.showMultipleStoriesStrategy=e,this.storyManager=t}show(e){return xn(this,void 0,void 0,(function*(){let t="onboarding";e.feed&&(t=e.feed),yield tn({defaultList:!1,favoriteList:!1,onboardingList:t,onboardingTags:e.customTags,limit:e.limit});const i=st(ke.onboarding,t);if(!i.length)throw new _n;this.emitFeedLoad(t,i),yield this.showMultipleStoriesStrategy.show({windowReferer:Ce.default,listType:ke.onboarding,storyId:i[0].id,feed:t})}))}emitFeedLoad(e,t){const i={stories:t.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),Object.assign({id:e.id},t)})),feed:null,filter:null};i.feed=e,this.storyManager.emit("feedLoad",i)}reload(e){return xn(this,void 0,void 0,(function*(){this.showMultipleStoriesStrategy.reload(e)}))}}var kn=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 Ln{constructor(e,t){this.storyReaderViewModel=e,this.storyReaderStoriesService=t}show(e){return kn(this,void 0,void 0,(function*(){const t=ot(e.feed),i=((e,t,i)=>{const r=st(e.listType,i);let s=m.getState().share;return t===Pe.UGC&&(s=!1),Object.assign(Object.assign({},e),{id:e.storyId,storyContext:Ie.getState(),storyList:r,hasShare:s,placeholders:Ee()})})(e,t,e.feed);this.storyReaderViewModel.open(i,{listType:e.listType,feedSlug:e.feed,filter:e.filter});const r=yield this.storyReaderStoriesService.fetchStoriesSlidesAndContextByStoryId({storyId:e.storyId,listType:e.listType,feed:e.feed});this.storyReaderViewModel.setStoriesAndContext(r)}))}reload(e){return kn(this,void 0,void 0,(function*(){const t=yield this.storyReaderStoriesService.fetchStoriesSlidesAndContextByStoryId(e);this.storyReaderViewModel.setStoriesAndContext(t)}))}}var An=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 Mn{constructor(e){this.showStoryStrategy=e}show(e){return An(this,void 0,void 0,(function*(){try{return yield this.showStoryStrategy.show({storyId:e.storyId,feed:"",fetchShareUrl:e.fetchShareUrl}),e.fetchShareUrl&&et(!1),!0}catch(e){return!1}}))}reload(e){return An(this,void 0,void 0,(function*(){return this.showStoryStrategy.reload(e)}))}}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{constructor(e,t){this.storyReaderViewModel=e,this.storyReaderStoriesService=t}show(e){return On(this,void 0,void 0,(function*(){var t;try{let i=this.storyReaderStoriesService.getOrCreateDirectStoryById(e.storyId);if(i.is_opened)throw new ps(e.storyId.toString());if(!i.slidesLoaded){if(i=null!==(t=yield this.storyReaderStoriesService.fetchStoryAndContextById({storyId:e.storyId,feed:"",once:!0,listType:ke.direct}))&&void 0!==t?t:i,i.error)throw i.error;i.slidesLoaded=!1}const r=at(i);this.storyReaderViewModel.open(r,{listType:ke.direct,feedSlug:"",once:!0}),i.slidesLoaded||(yield Ps((new Date).getTime()),i.slidesLoaded=!0,this.storyReaderViewModel.setStoriesAndContext({listType:ke.direct,storyList:[i],storyContext:Ie.getState()}))}catch(e){throw this.storyReaderViewModel.close(),e}}))}reload(e){return On(this,void 0,void 0,(function*(){var t;const i=yield this.storyReaderStoriesService.fetchStoryAndContextById(Object.assign(Object.assign({},e),{feed:null!==(t=e.feed)&&void 0!==t?t:""}));this.storyReaderViewModel.setStoriesAndContext({listType:ke.direct,storyList:[i],storyContext:Ie.getState()})}))}}var In,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,t){this.storyReaderViewModel=e,this.storyReaderStoriesService=t}show(e){return Tn(this,void 0,void 0,(function*(){var t,i;let r=this.storyReaderStoriesService.getOrCreateDirectStoryById(e.storyId);if(!r.slidesLoaded){if(r=yield this.storyReaderStoriesService.fetchStoryAndContextById({storyId:e.storyId,feed:null!==(t=e.feed)&&void 0!==t?t:"",listType:ke.direct,fetchShareUrl:e.fetchShareUrl}),r.error)throw r.error;r.slidesLoaded=!1}const s=at(r);this.storyReaderViewModel.open(s,{listType:ke.direct,feedSlug:null!==(i=e.feed)&&void 0!==i?i:"",fetchShareUrl:e.fetchShareUrl}),r.slidesLoaded||(yield Ps((new Date).getTime()),r.slidesLoaded=!0,this.storyReaderViewModel.setStoriesAndContext({listType:ke.direct,storyList:[r],storyContext:Ie.getState()}))}))}reload(e){return Tn(this,void 0,void 0,(function*(){var t;const i=yield this.storyReaderStoriesService.fetchStoryAndContextById(Object.assign(Object.assign({},e),{feed:null!==(t=e.feed)&&void 0!==t?t:""}));this.storyReaderViewModel.setStoriesAndContext({listType:ke.direct,storyList:[i],storyContext:Ie.getState()})}))}}!function(e){e[e.ShowStory=0]="ShowStory",e[e.ShowStoryOnce=1]="ShowStoryOnce",e[e.ShowStoryFromSharePage=2]="ShowStoryFromSharePage",e[e.ShowOnboardingStories=3]="ShowOnboardingStories",e[e.ShowMultipleStories=4]="ShowMultipleStories"}(In||(In={}));class Pn{create(e,t,i,r){switch(e){case In.ShowStory:return new Rn(t,i);case In.ShowStoryOnce:return new En(t,i);case In.ShowStoryFromSharePage:return new Mn(new Rn(t,i));case In.ShowOnboardingStories:return new Cn(new Ln(t,i),r);case In.ShowMultipleStories:return new Ln(t,i);default:throw new Error(`Strategy for type "${e}" not found.`)}}}const jn=.53167701863,Dn=.64516129032;class Bn{constructor(e,t,i){this._vw=e,this._vh=t,this.padding=i,this.viewportRatio=e/t}get vw(){return this._vw}get vh(){return this._vh}get vhWitoutPadding(){return this._vh-this.padding.top-this.padding.bottom}getOffset(e){const t=this._vw,i=this.vhWitoutPadding-e,r=this.calculateWidthWithActionPanel(e),s=this.calculateHeightWithActionPanel(e);return this.viewportRatio>Dn?Math.ceil(s-i)/2*-1+"px auto":`0 ${Math.ceil(r-t)/2*-1}px`}getOffsetX(e){const t=this.calculateWidthWithActionPanel(e);return this.viewportRatio>Dn?"0px":Math.ceil(t-this._vw)/2+"px"}getOffsetY(e){const t=this.vhWitoutPadding-e;return this.viewportRatio>Dn?`${Math.ceil(this.calculateHeight()-t)}px`:"0px"}getWidth(){return this.viewportRatio>Dn?`${this.calculateWidth()}px`:"auto"}getHeight(){return this.viewportRatio>Dn?`${this.calculateHeight()}px`:"100%"}getFontSize(){return this.calculateWidth()/20+"px"}calculateWidth(){return Math.ceil(this.vhWitoutPadding*Dn)}calculateHeight(){return Math.ceil(this.calculateWidth()/Dn)}calculateWidthWithActionPanel(e){const t=this.vhWitoutPadding-e;return Math.ceil(t*Dn)}calculateHeightWithActionPanel(e){return Math.ceil(this.calculateWidthWithActionPanel(e)/Dn)}}class Nn{constructor(e,t,i){this._vw=e,this._vh=t,this.padding=i,this.viewportRatio=e/t}get vw(){return this._vw}get vh(){return this._vh}get vhWitoutPadding(){return this._vh-this.padding.top-this.padding.bottom}getOffset(e){const t=this._vw,i=this.vhWitoutPadding-e,r=this.calculateWidthWithActionPanel(e),s=this.calculateHeight();return s>i?Math.ceil(s-i)/2*-1+"px auto":`0 ${Math.ceil(r-t)/2*-1}px`}getOffsetX(e){const t=this.calculateWidthWithActionPanel(e),i=this.vhWitoutPadding-e,r=this.calculateHeight(),s=this._vw;return r>i?"0px":Math.ceil(t-s)/2+"px"}getOffsetY(e){const t=this.vhWitoutPadding-e,i=this.calculateHeight();return i>t?Math.ceil(i-t)/2+"px":"0px"}getWidth(){return this.viewportRatio>Dn?`${this.calculateWidth()}px`:"auto"}getHeight(){return this.viewportRatio>Dn?`${this.calculateHeight()}px`:"100%"}getFontSize(){return this.calculateWidth()/20+"px"}calculateWidth(){return this.viewportRatio>Dn?this._vw:Math.ceil(this.vhWitoutPadding*Dn)}calculateHeight(){return Math.ceil(this._vw/Dn)}calculateWidthWithActionPanel(e){const t=this.vhWitoutPadding-e;return this.viewportRatio>Dn?this._vw:Math.ceil(t*Dn)}}class Fn{constructor(e){this.safeAreaFrameCalculator=e}create(e){const t=e.vw/e.vh;return e.desktopMode&&t>Dn?this.createDesktopStoryGeometry(e):this.createMobileStoryGeometry(e)}createDesktopStoryGeometry(e){return new Bn(e.vw,e.vh,{top:50,bottom:50})}createMobileStoryGeometry(e){var t,i;const{paddingTop:r,paddingBottom:s}=this.safeAreaFrameCalculator.getViewportCorrectionPadding();return new Nn(e.vw,e.vh,{top:null!==(t=parseFloat(r))&&void 0!==t?t:0,bottom:null!==(i=parseFloat(s))&&void 0!==i?i:0})}}class Un{constructor(e,t,i){this._vw=e,this._vh=t,this.actionPanelHeight=i,this.viewportRatio=e/t}get shouldBeShownSafeAreaInsets(){return this.viewportRatio<jn}getViewportCorrectionPadding(){const{paddingTop:e,paddingBottom:t}=this.calcFrameWidthByMobileAspectRatio();return{paddingTop:e+"px",paddingBottom:t+"px"}}calcFrameWidthByMobileAspectRatio(){const e=this._vh-this._vw/jn,t=Math.max(Math.min(e-this.actionPanelHeight,this.actionPanelHeight),0);return{paddingTop:Math.max(e-t,0),paddingBottom:t}}}class Vn extends G.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)}}var zn;!function(e){e.None="none",e.Init="init",e.StartLoading="startLoading",e.Loading="loading",e.Loaded="loaded",e.Starting="starting",e.Started="started",e.Paused="paused",e.Error="error",e.Destroyed="destroyed"}(zn||(zn={}));const Gn=(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),Wn({activeStory:e,url:a,elementId:l}),$n(e,{linkType:d,url:a,elementId:l})},customAction:()=>{a=c,Wn({activeStory:e,url:a,elementId:l}),$n(e,{linkType:d,url:a,elementId:l})},slide:()=>{e.redirectToSlide({slideIndex:parseInt(c),layerIndex:0})},story:()=>{const t=parseInt(c);Wn({activeStory:e,url:c,elementId:l}),Nt.emit(`${ao.name}.redirectToStory`,{storyId:t,feedSlug:"default"})},game:()=>{Wn({activeStory:e,url:c,elementId:l}),Nt.emit(`${sa.name}.openGame`,{gameId:c})},layer:()=>{Nt.emit(Qn.ShowLayer,{index:parseInt(c)})},closeStory:()=>{Nt.emit(`${ao.name}.closeStory`)}};null===(n=u[d])||void 0===n||n.call(u)},Wn=({activeStory:e,url:t,elementId:i})=>{Nt.emit("publicEvents.widgetEvent",{name:"w-link",devPayload:{story_id:e.id,slide_index:e.activeSlideIndex,widget_id:i,widget_label:"",widget_value:t}})},$n=(e,{linkType:t,url:i,elementId:r})=>{e.markAsOpened(),Nt.emit(Kr.TransitionFromSlide,{storyId:e.id,slideIndex:e.activeSlideIndex}),"url"===t&&Nt.emit("publicEvents.clickOnButton",{id:e.id,index:e.activeSlideIndex,url:i,elementId:r})};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 qn{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 Qn,Kn,Yn=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.PerformShareAction="performShareAction",e.PerformScreenShotShareAction="performScreenShotShareAction",e.ShowToast="showToast",e.ShowInputModal="showInputModal",e.ShowLayer="showLayer"}(Qn||(Qn={})),function(e){e.Start="start",e.ChangeState="changeState"}(Kn||(Kn={}));class Zn extends G.EventEmitter{constructor(e,t,i,r,s,n,o){super(),this._story=e,this._index=t,this.widgetManager=i,this.animationApi=r,this.layersManager=s,this.slideApiHandlers=n,this.slideDto=o,this.id=Date.now(),this._state=zn.None,this.videoManager=null,this._muted=!1,this._navigationDisabled=!1,this.narrativeAnimationContext=new qn(this.animationApi)}get state(){return this._state}get index(){return this._index}get story(){return this._story}get muted(){return this._muted}get navigationDisabled(){return this._navigationDisabled}get widgets(){return this.widgetManager.widgets.filter((e=>e.isInited))}get timeline(){return this.slideDto.timeline}get duration(){return this.slideDto.duration}get screenshotShare(){return this.slideDto.screenshot_share}get html(){return this.slideDto.html}get eventPayload(){return this.slideDto.event_payload}findWidgetByType(e){return this.widgetManager.findWidgetByType(e)}resume(){return Yn(this,void 0,void 0,(function*(){var e;try{if(this.state!==zn.Paused)return;yield null===(e=this.videoManager)||void 0===e?void 0:e.resume(),this.narrativeAnimationContext.resume(),this.widgetManager.resume(),Xe(`[SLIDE][resume]:${this.story.id}:${this.index}`),this.setState(zn.Started)}catch(e){console.error(e)}}))}pause(){var e;this.state===zn.Started&&(null===(e=this.videoManager)||void 0===e||e.pause(),this.narrativeAnimationContext.pause(),this.widgetManager.pause(),Xe(`[SLIDE][pause]:${this.story.id}:${this.index}`),this.setState(zn.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()}showLayerByIndex(e){this.layersManager.showLayerByIndex(e)}reload(){return Yn(this,void 0,void 0,(function*(){yield this.load(),this.state===zn.Loaded&&this.start()}))}init(e){return Yn(this,void 0,void 0,(function*(){this._state===zn.None&&(this.setState(zn.Init),this.slideContent=e,this.slideContentInnerHTML=this.slideContent.innerHTML,this.parseNavigationDisable(),this.videoManager=Vi.create(this.slideContent,this.layersManager),this.narrativeAnimationContext.init(this.slideContent),Xe(`[SLIDE][init]:${this.story.id}:${this.index}`),yield this.widgetManager.init(this.slideContent),yield this.load())}))}start(){return Yn(this,void 0,void 0,(function*(){var e;try{if(this.state===zn.Starting)return;if(this.state!==zn.Loaded)throw new Error(`You must initialize the slide first. State: ${this.state}`);this.setState(zn.Starting),yield null===(e=this.videoManager)||void 0===e?void 0:e.start(),this.narrativeAnimationContext.start(),Xe(`[SLIDE][start]:${this.story.id}:${this.index}`),this.setState(zn.Started),this.slideApiHandlers.lock(this),this.slideApiHandlers.exec(),this.story.updateNavigationHistory(),this.startTimer(),this.emit(Kn.Start)}catch(e){console.error(e)}}))}stop(){var e;this.state===zn.Started&&(this.narrativeAnimationContext.stop(),this.slideApiHandlers.unlock(this),Xe(`[SLIDE][stop]:${this.story.id}:${this.index}`),this.widgetManager.stop(),this.resetSlideContentHTML(),this.setState(zn.None),null===(e=this.videoManager)||void 0===e||e.destroy().catch(console.error))}resetSlideContentHTML(){this.slideContent.innerHTML=this.slideContentInnerHTML}setState(e){this._state=e,this.changeTimelineVisibilityByState(),this.emit(Kn.ChangeState,e)}load(){return Yn(this,void 0,void 0,(function*(){var e;if(this.state!==zn.Loaded)try{Xe(`[SLIDE][start_load]:${this.story.id}:${this.index}`),this.setState(zn.StartLoading),yield this.loadResources(),yield(e=this.slideContent,Hn(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(zn.Loaded),Xe(`[SLIDE][end_load]:${this.story.id}:${this.index}`)}catch(e){console.error(e),this.setState(zn.Error)}}))}loadResources(){return Yn(this,void 0,void 0,(function*(){return new Promise(((e,t)=>Yn(this,void 0,void 0,(function*(){var i;let r=setTimeout((()=>{Xe("[SLIDE]: Resources were not loaded"),t()}),4e3);try{yield this.loadMediaResources(this.slideContent),yield this.loadFonts(),Di.hasVideo(this.slideContent)&&(this.setState(zn.Loading),yield null===(i=this.videoManager)||void 0===i?void 0:i.init(this.slideContent)),e()}catch(e){t(e)}finally{clearTimeout(r)}}))))}))}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();Oi(e,{})}parseNavigationDisable(){const e=this.slideContent.querySelector(".narrative-slide");if(!e)return!1;this._navigationDisabled="1"===e.dataset.disableNavigation}changeTimelineVisibilityByState(){this.state===zn.Error||this.state===zn.Loading?this.story.hideTimeline():this.story.showTimeline()}startTimer(){var e;this.story.timer.started||this.story.timer.start(null!==(e=this.duration)&&void 0!==e?e:0)}}class Xn{create({story:e,slideApi:t,slideApiHandlers:i,slideDto:r,index:s}){const n=new Mi(e),o=new Wi(t,n,e);return new Zn(e,s,o,t.Animation,n,i,r)}}var Jn=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 eo extends Tt{constructor(e,t,i,r){super(),this.storiesItem=e,this.slideApi=t,this.slideApiHandlers=i,this.navigationHistory=r,this._hasShare=!1,this._muted=!0,this._activeSlideIndex=0,this._displayedSlides=[],this._hiddenTimeline=!1,this.slides=[],this._timer=new Vn,this.slides=this.createSlidesViewModelsByDto(e.slides),this._displayedSlides=this.getDisplayedSlides(),this.redirectToSlide=this.redirectToSlide.bind(this),this.nextSlide=this.nextSlide.bind(this),this._hasShare=m.getState().share}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 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 displayedSlides(){return this._displayedSlides}get activeSlideIndex(){return this._activeSlideIndex}get activeSlide(){return this.slides[this._activeSlideIndex]}get slidesCount(){var e;return null!==(e=this.storiesItem.slides_count)&&void 0!==e?e:0}get hiddenTimeline(){return 1===this.storiesItem.slides.length&&0===this.storiesItem.slides[0].duration||this.storiesItem.hide_timeline||this._hiddenTimeline||!this.slidesLoaded}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}get error(){return this.storiesItem.error}get timer(){return this._timer}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.getDisplayedSlides(),this.timer.stop(),this.update()}updateStoriesItem(e){this.storiesItem=e,this.slides=this.createSlidesViewModelsByDto(e.slides),this._displayedSlides=this.getDisplayedSlides(),this.update()}updateNavigationHistory(){this.navigationHistory.update({currentSlideIndex:this.activeSlideIndex,currentStoryId:this.id})}setLike(e){this.updateStoryLike(e),Nt.emit("publicEvents.likeStory",{id:this.id,index:this.activeSlideIndex,value:1===e})}setDislike(e){this.updateStoryLike(e),Nt.emit("publicEvents.dislikeStory",{id:this.id,index:this.activeSlideIndex,value:-1===e})}setBookmark(e){return Jn(this,void 0,void 0,(function*(){const t=this.storiesItem.favorite;this.storiesItem.favorite=e,this.update();try{const t=yield Sn.setBookmark(this.id,e);if(null==t.favorite)return;this.storiesItem.favorite=t.favorite,Nt.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 Jn(this,void 0,void 0,(function*(){var e;Nt.emit("publicEvents.shareStory",{id:this.id,index:this.activeSlideIndex}),(null===(e=this.activeSlide)||void 0===e?void 0:e.screenshotShare)?Nt.emit(Qn.PerformScreenShotShareAction,{shareId:"slide-screenshot-share",hideElementsSelector:""}):tt()?yield this.performSessionShareAction():this.performWithoutSessionShareAction()}))}markAsOpened(){Sn.markAsOpened(this.id),this.storiesItem.isOpened=!0}hideTimeline(){this._hiddenTimeline=!0,this.update()}showTimeline(){this._hiddenTimeline=!1,this.update()}reset(){return this.slideApiHandlers.resetStory(this.id)}redirectToSlide({slideIndex:e,layerIndex:t}){e!==this.activeSlideIndex&&this.toSlide(e)}getDisplayedSlides(){const e=new Xn;return this.slidesLoaded?this.slides.slice(this._activeSlideIndex,this._activeSlideIndex+2):[e.create({story:this,index:0,slideApi:this.slideApi,slideApiHandlers:this.slideApiHandlers,slideDto:{index:0,timeline:{foreground:"",background:""},duration:0,screenshot_share:!1,html:""}})]}createSlidesViewModelsByDto(e){if(this.slides.length===e.length)return this.slides;const t=new Xn;return e.map(((e,i)=>t.create({story:this,index:i,slideApi:this.slideApi,slideApiHandlers:this.slideApiHandlers,slideDto:e})))}updateStoryLike(e){return Jn(this,void 0,void 0,(function*(){try{const t=yield Sn.updateStoryLike(this.id,e);null!=t.like&&(this.storiesItem.like=t.like)}catch(e){console.error(e)}finally{this.update()}}))}performSessionShareAction(){return Jn(this,void 0,void 0,(function*(){try{const{url:e}=yield Sn.getStorySharePath(this.id);if(!e)return;this.storiesItem.share_url=e,this.emitShareStoryWithPathEvent(e);const t={title:this.storiesItem.title,text:"",url:e};Nt.emit(Qn.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};Nt.emit(Qn.PerformShareAction,{shareId:"story-share",config:t})}emitShareStoryWithPathEvent(e){Nt.emit("publicEvents.shareStoryWithPath",{id:this.id,index:this.activeSlideIndex,url:e})}}var to=u(5136);class io{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 ro,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())}))};!function(e){e.ReloadStory="StoryReaderViewModel.reloadStory"}(ro||(ro={}));class no{constructor(e,t,i){this.storyManager=e,this.storyReaderViewModel=t,this.statisticsService=i,this.publicEventsSubscriptions=[],this.handleShowMultipleStories=this.handleShowMultipleStories.bind(this),this.handleCloseStoryReader=this.handleCloseStoryReader.bind(this),this.handleRedirectToStory=this.handleRedirectToStory.bind(this),this.handleReloadStory=this.handleReloadStory.bind(this),this.handleWidgetEvent=this.handleWidgetEvent.bind(this),this.handleClickOnButton=this.handleClickOnButton.bind(this),this.subscribeToEventBusEvents()}subscribeToEventBusEvents(){Nt.on(`${ao.name}.showMultipleStories`,this.handleShowMultipleStories),Nt.on(`${ao.name}.redirectToStory`,this.handleRedirectToStory),Nt.on(`${ao.name}.closeStory`,this.handleCloseStoryReader),Nt.on(ro.ReloadStory,this.handleReloadStory),Nt.on("publicEvents.widgetEvent",this.handleWidgetEvent),Nt.on("publicEvents.clickOnButton",this.handleClickOnButton),this.subscribeToPublicEvents()}unsubscribeEventBusEvents(){Nt.off(`${ao.name}.showMultipleStories`,this.handleShowMultipleStories),Nt.off(`${ao.name}.redirectToStory`,this.handleRedirectToStory),Nt.off(`${ao.name}.closeStory`,this.handleCloseStoryReader),Nt.off(ro.ReloadStory,this.handleReloadStory),Nt.off("publicEvents.widgetEvent",this.handleWidgetEvent),Nt.off("publicEvents.clickOnButton",this.handleClickOnButton),this.unsubscribeFromPublicEvents()}handleShowMultipleStories({payload:e,sourceInfo:t}){this.storyReaderViewModel.showMultipleStories({storyId:e.id,feed:t.feedSlug,listType:t.listType,filter:t.filter})}handleRedirectToStory(e){return so(this,arguments,void 0,(function*({storyId:e,feedSlug:t=""}){try{yield this.storyReaderViewModel.showStory(e,t)}catch(e){console.error(e)}}))}handleCloseStoryReader(){this.storyReaderViewModel.close()}handleWidgetEvent(e){this.storyManager.emit("widgetEvent",{name:e.name,data:Object.assign(Object.assign({},e.devPayload),{feed:this.storyReaderViewModel.feedSlug})})}subscribeToPublicEvents(){const e=new Vt(this.storyManager),t=this.storyReaderViewModel.sourceInfo,i=["showSlide","showStory","closeStory","clickOnButton","likeStory","dislikeStory","favoriteStory","shareStory","shareStoryWithPath"];for(const r of i){const i=i=>e.handle(r,i,t);Nt.on(`publicEvents.${r}`,i),this.publicEventsSubscriptions.push((()=>{Nt.off(`publicEvents.${r}`,i)}))}}unsubscribeFromPublicEvents(){this.publicEventsSubscriptions.forEach((e=>e()))}handleClickOnButton(e){new Ut(this.storyManager,this.statisticsService).handle(e)}handleReloadStory(e){return so(this,void 0,void 0,(function*(){try{yield this.storyReaderViewModel.reloadStory(e)}catch(e){console.error(e)}}))}destroy(){this.unsubscribeEventBusEvents()}}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 Tt{constructor(e,t,i){super(),this.storyManager=e,this.storyReaderStoriesService=t,this.statisticsService=i,this._currentIndex=1,this._placeholders=[],this.scrollbarHelper=new io(window),this._sourceInfo={listType:ke.default,feedSlug:""},this.windowReferer=Ce.default,this.storyViewModels=new Map,this.currentStoryDisplayStrategy=null,this.navigationHistory=new bn,this.initSlideApi(),this.storyReaderViewModelEventBusListener=new no(e,this,i)}initSlideApi(){this.slideApiHandlers=new ts(this),this.slideApi=(0,to.getSlideApi)(this.slideApiHandlers)}get feedSlug(){var e;return null!==(e=this.sourceInfo.feedSlug)&&void 0!==e?e:""}get widgetsData(){return P()(this.narrativeContext.widgetsData)?this.narrativeContext.widgetsData:{}}get sourceInfo(){return this._sourceInfo}get stories(){return Array.from(this.storyViewModels.values())}get activeStory(){return this._activeStory}get currentIndex(){return this._currentIndex}get placeholders(){return this._placeholders}get reachStart(){return 1===this.currentIndex}get reachEnd(){return this.currentIndex===this.storyViewModels.size-2}setStories({listType:e,stories:t}){let i=t.filter((e=>!e.hide_in_reader)).map((e=>ht.createInstance(Kt,e)));i=[ht.createInstance(Kt,{blank:!0,id:-1}),...i,ht.createInstance(Kt,{blank:!0,id:-2})];for(const e of i)this.storyViewModels.has(e.id)?this.storyViewModels.get(e.id).updateStoriesItem(e):this.storyViewModels.set(e.id,new eo(e,this.slideApi,this.slideApiHandlers,this.navigationHistory));this.update()}setNarrativeContext(e){this.narrativeContext=e instanceof Zt?e:ht.createInstance(Zt,e.rawData),this.initStoryResources(this.narrativeContext)}setActiveStoryById(e){this._currentIndex=Array.from(this.storyViewModels.keys()).indexOf(e),this._activeStory=this.storyViewModels.get(e),this.setSlideApiActiveStory(this._activeStory)}setActiveStoryByIndex(e){this._currentIndex=e,this._activeStory=this.getDisplayedStoryByIndex(this._currentIndex),this.setSlideApiActiveStory(this._activeStory),this.handleActiveStoryError(this._activeStory)}getDisplayedStoryByIndex(e){return Array.from(this.storyViewModels.values())[e]}setSlideApiActiveStory(e){this.slideApiHandlers.setActiveStory(e)}open(e,t){this.storyViewModels.clear(),this.windowReferer=e.windowReferer,this.setScrollBar(e.windowReferer),this._sourceInfo=t,this.setStoriesAndContext({listType:e.listType,storyList:e.storyList,storyContext:e.storyContext}),this.setActiveStoryById(e.id),this._placeholders=e.placeholders,this.statisticsService.init(t),et(!0),this.update()}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"),Nt.emit(Kr.CloseStoryReader,{storyId:i,slideIndex:r}),Nt.emit("publicEvents.closeStory",{id:i,index:r,action:e}),gi(),Ai(),this.navigationHistory.reset(),this.activeStory.markAsOpened(),this._sourceInfo={listType:ke.default,feedSlug:""},this._activeStory=void 0,this.statisticsService.destroy(),this.storyViewModels.clear(),this.update()}setScrollBar(e){e===Ce.default&&this.scrollbarHelper.setScrollbar()}resetScrollBar(e){e===Ce.default&&this.scrollbarHelper.resetScrollbar()}initStoryResources(e){(new Ur).init(e)}handleActiveStoryError(e){e.error&&this.storyManager.emit("showStoryFailed",Object.assign({id:e.id,title:e.title},e.error))}setStoriesAndContext(e){this.setStories({listType:e.listType,stories:e.storyList}),this.setNarrativeContext({rawData:e.storyContext})}canBeClosed(){return!(!this.activeStory||this.activeStory.isBlank)&&!this.activeStory.disableClose}showStory(e,t){return oo(this,void 0,void 0,(function*(){this.currentStoryDisplayStrategy=this.createStoryDisplayStrategyByType(In.ShowStory),yield this.currentStoryDisplayStrategy.show({storyId:e,feed:t})}))}showStoryOnce(e){return oo(this,void 0,void 0,(function*(){this.currentStoryDisplayStrategy=this.createStoryDisplayStrategyByType(In.ShowStoryOnce),yield this.currentStoryDisplayStrategy.show({storyId:e})}))}showStoryFromSharePage(e,t){return oo(this,void 0,void 0,(function*(){return this.currentStoryDisplayStrategy=this.createStoryDisplayStrategyByType(In.ShowStoryFromSharePage),this.currentStoryDisplayStrategy.show({storyId:e,fetchShareUrl:t})}))}showOnboardingStories(e){return oo(this,void 0,void 0,(function*(){var t;this.currentStoryDisplayStrategy=this.createStoryDisplayStrategyByType(In.ShowOnboardingStories),yield this.currentStoryDisplayStrategy.show({feed:null!==(t=null==e?void 0:e.feed)&&void 0!==t?t:"",customTags:null==e?void 0:e.customTags,limit:null==e?void 0:e.limit})}))}showMultipleStories(e){return oo(this,void 0,void 0,(function*(){var t,i;this.currentStoryDisplayStrategy=this.createStoryDisplayStrategyByType(In.ShowMultipleStories),yield this.currentStoryDisplayStrategy.show({storyId:e.storyId,listType:null!==(t=e.listType)&&void 0!==t?t:ke.default,windowReferer:null!==(i=e.windowReferer)&&void 0!==i?i:Ce.default,feed:e.feed,filter:e.filter})}))}createStoryDisplayStrategyByType(e){return(new Pn).create(e,this,this.storyReaderStoriesService,this.storyManager)}fetchStoriesSlidesAndContextByNextStoryIndex(e){return oo(this,void 0,void 0,(function*(){const t=yield this.storyReaderStoriesService.fetchStoriesSlidesAndContextByNextStoryIndex({nextStoryIndex:e,listType:this.sourceInfo.listType,feed:this.sourceInfo.feedSlug});t.storyList.length&&this.setStoriesAndContext(t)}))}reloadStory(e){return oo(this,void 0,void 0,(function*(){var t,i;en({id:e.id,story:{error:null}});const r=Object.assign(Object.assign({},this.sourceInfo),{feed:null!==(t=this.sourceInfo.feedSlug)&&void 0!==t?t:""});let s=this.storyReaderStoriesService.getStoriesWithSlidesAndContext(r);this.setStoriesAndContext(s),null===(i=this.currentStoryDisplayStrategy)||void 0===i||i.reload({storyId:e.id,listType:this.sourceInfo.listType,feed:this.sourceInfo.feedSlug})}))}nextStory(){var e;this.reachEnd||(null===(e=this.activeStory)||void 0===e||e.markAsOpened(),this.setActiveStoryByIndex(this._currentIndex+1),this.fetchStoriesSlidesAndContextByNextStoryIndex(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.fetchStoriesSlidesAndContextByNextStoryIndex(this._currentIndex-1),this.update())}destroy(){this.removeAllListeners(),this.storyReaderViewModelEventBusListener.destroy()}closeGoodsWidget(){Nt.emit("goodsWidget.close")}}class lo{constructor(e){this.storyManager=e}create(){const e=new Ds,t=new Jr(this.storyManager),i=new Zr(t);return new ao(this.storyManager,e,i)}}class co{constructor(e,t){this.storyManager=e,this.storyListViewModel=t}handle(e,t){Sn.markAsOpened(e.id),this.handleClickOnStoryCardDeepLink({id:e.id,index:t.index,isDeeplink:!0,url:e.deeplink},{listType:this.storyListViewModel.params.listType})}handleClickOnStoryCardDeepLink(e,{listType:t}){var i;const r={data:[[1,0,e.id,0,0]]},s=()=>{e.isDeeplink&&e.url&&this.storyManager.clickOnButtonAction({src:Ft.STORY_LIST,payload:e})};t===Pe.UGC||(null===(i=this.storyManager.getConfig())||void 0===i?void 0:i.disableStatistic)?s():F("session/update",r,_.createFunctionWithTimeout(s,1e3))}}class uo{constructor(e,t){this.storyManager=e,this.storyListViewModel=t}handle(e,t){var i;Sn.markAsOpened(e.id),Nt.emit(`${sa.name}.openGame`,{gameId:null===(i=e.gameInstance)||void 0===i?void 0:i.id})}}class ho{constructor(e,t){this.storyManager=e,this.storyListViewModel=t}handle(e,t){const i={index:t.index,isDeeplink:!1,id:e.id,listType:ke.default,windowReferer:Ce.default};e.isFavoriteCard?this.storyListViewModel.emit("clickOnFavoriteCellInternal",i):e.isUgcCard?this.storyListViewModel.emit("clickOnUgcCardCellInternal",i):this.openStoryReader(i),this.emitClickOnStory({id:e.id,index:t.index,isDeeplink:!1},{feedSlug:this.storyListViewModel.params.feedSlug,filter:this.storyListViewModel.params.filter})}openStoryReader(e){const t=this.storyListViewModel.params.feedSlug;e.listType=this.storyListViewModel.params.isFavorite?ke.favorite:ke.default,e.windowReferer=this.storyListViewModel.params.isFavorite?Ce.favorite:Ce.default,Nt.emit(`${ao.name}.showMultipleStories`,{payload:e,sourceInfo:{feedSlug:t,listType:e.listType,filter:this.storyListViewModel.params.filter}})}emitClickOnStory(e,t){if(0===e.id)return void this.storyManager.emit("clickOnFavoriteCell",{feed:t.feedSlug});const i=t.feedSlug,r=t.filter,s=lt(i),n=Ne.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===Pe.DEFAULT?o.feed=i:s===Pe.UGC&&(o.filter=r),o.source=_e.list,this.storyManager.emit("clickOnStory",Object.assign(Object.assign({},e),o))}}class po{static createHandler(e,t,i){const{deeplink:r,hideInReader:s,gameInstance:n}=e,o=Ot()(r)&&r.trim().length>0,a=null==n?void 0:n.id;return this.isInvalidStoryClick(Boolean(s),o,a,e.id)?null:o?new co(t,i):a?new uo(t,i):new ho(t,i)}static isInvalidStoryClick(e,t,i,r){return!(!e||t||i)&&(console.error(`Cannot open hidden story id ${r}`),!0)}}var fo=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 go extends Tt{set modeDesktop(e){this._modeDesktop!==e&&(this._modeDesktop=e,this.update())}get modeDesktop(){return this._modeDesktop}get session(){return this._session}get defaultStories(){return this._defaultStories.slice()}get favoriteStories(){return this._favoriteStories.slice()}get params(){return this._params}constructor(e,t){super(),this.storyManager=e,this.storiesService=t,this._defaultStories=[],this._favoriteStories=[],this._session=null,this._modeDesktop=!0,this.subscriptions=[],this._params={listType:Pe.DEFAULT,feedSlug:"",useUgcCard:!1,isFavorite:!1,hasFavorite:!1},this.isLoading=!1,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.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===Pe.DEFAULT}setParams(e){this.unsubscribeStoriesService(),this._params=e,this.subscribeToStoriesService(),this.update()}onStoryClick(e,t=0){var i;null===(i=po.createHandler(e,this.storyManager,this))||void 0===i||i.handle(e,{index:t})}destroy(){this.emit("destroy"),this.removeAllListeners(),this.unregisterStoryReaderEvents(),this.unsubscribeStoriesService()}reload(){return fo(this,void 0,void 0,(function*(){yield this.loadStories({needFavorite:!1})}))}loadStories(e){return fo(this,void 0,void 0,(function*(){var t;if(this.isLoading)return;const i=Boolean(this._params.hasFavorite)&&e.needFavorite,r={feed:this._params.feedSlug,filter:{},defaultListLength:0,favoriteListLength:0,success:!0,error:{name:"",networkStatus:200,networkMessage:""}};try{this.emit("startLoading"),this.isLoading=!0;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===Pe.DEFAULT&&(r.favoriteListLength=t.length)}catch(e){console.error(e),r.success=!1,e instanceof j&&(r.error={name:e.name,networkMessage:e.networkMessage,networkStatus:e.networkStatus})}finally{this.isLoading=!1,r.filter=null!==(t=this._params.filter)&&void 0!==t?t:{},this.emit("endLoading",r)}}))}registerStoryReaderEvents(){Nt.on("publicEvents.showStory",this.hanldeShowStory),Nt.on("publicEvents.closeStory",this.handleCloseStory)}unregisterStoryReaderEvents(){Nt.off("publicEvents.showStory",this.hanldeShowStory),Nt.off("publicEvents.closeStory",this.handleCloseStory)}hanldeShowStory(e){this.emit("openStory",e.id)}handleCloseStory(e){this.emit("closeStory",e.id)}subscribeToStoriesService(){const e=this.storiesService.observeDefaultStories(this._params.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.update()}));this.subscriptions.push(e,t)}unsubscribeStoriesService(){this.subscriptions.forEach((e=>e.unsubscribe())),this.subscriptions=[]}setDefaultStories(e){this._defaultStories=e.map((e=>new Dt(this,e))),this.update()}setFavoriteStories(e){this._favoriteStories=e.map((e=>new Bt(this,e))),this.update()}}class vo extends Dt{constructor(e,t){super(e,t),this.favoriteStories=[],this.favoriteStories=this.storyListViewModel.favoriteStories}}class mo{constructor(e){this.storyManager=e}create(){const e=new To(this.storyManager);return new go(this.storyManager,e)}}class yo{static create(e,t){const i=ht.createInstance(Kt,{id:0,title:t.title.content,title_color:t.title.color,is_opened:!0,background_color:"white"});return i.favorite_cell=!0,new vo(e,i)}}class wo{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,${ms(t.image.svgSrc.baseState)}`});const r=ht.createInstance(Kt,{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 Dt(e,r)}}class So{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 So(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 So(e.x,e.y,e.width,e.height)}}class bo{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("feedImpression",[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("feedImpression",t)}}class xo{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 _o extends G.EventEmitter{constructor(){super(),this.storyRects=[],this.viewport=new So,this.filterStoryRectIntersections=e=>e.filter((e=>-100!==e.id&&e.areaFraction>0)),this.feedImpressionMetric=new bo(this),this.visibleAreaMetric=new xo(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=So.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 Co extends So{constructor(e,t=0,i=0,r=0,s=0){super(t,i,r,s),this.id=e}static clone(e){return new Co(e.id,e.x,e.y,e.width,e.height)}}class ko{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 So;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 Co(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 Lo{constructor(e,t){this.storyManager=e,this.params=t,this.handle=this.handle.bind(this)}handle(e){const t=o.getState();this.params.listType!==Pe.DEFAULT||t.disableStatistic||b(e);const i=this.params.feed,r=this.params.filter,s=lt(i),n={stories:e.map((e=>{const t={title:null,tags:[],slidesCount:null},i=Ne.getState().find((t=>t.id===e));return i&&(t.title=i.stat_title,t.tags=i.tags,t.slidesCount=i.slides_count,i.type===Pe.UGC&&(t.ugcPayload=P()(i.payload)?i.payload:{})),Object.assign({id:e},t)})),feed:null,filter:null};s===Pe.DEFAULT?n.feed=i:s===Pe.UGC&&(n.filter=r),this.storyManager.emit("feedImpression",n)}}class Ao{constructor(e,t){this.storyManager=e,this.params=t,this.handle=this.handle.bind(this)}handle(e){const t=this.params.feed,i=this.params.filter,r=lt(t),s={stories:e.map((({storyId:e,visibleArea:t})=>{const i={title:null,tags:[],slidesCount:null,visibleArea:t},r=Ne.getState().find((t=>t.id===e));return r&&(i.title=r.stat_title,i.tags=r.tags,i.slidesCount=r.slides_count,r.type===Pe.UGC&&(i.ugcPayload=P()(r.payload)?r.payload:{})),Object.assign({id:e},i)})),feed:null,filter:null};r===Pe.DEFAULT?s.feed=t:r===Pe.UGC&&(s.filter=i),this.storyManager.emit("visibleAreaUpdated",s)}}class Mo{constructor(e,t){this.storyManager=e,this.params=t}create(){const e=new _o,t=new Lo(this.storyManager,this.params),i=new Ao(this.storyManager,this.params);e.on("feedImpression",t.handle),e.on("visibleAreaUpdated",i.handle);return new ko(e)}}const Oo=(e,t)=>{let i=[];switch(e){case ke.default:i=t?ze.getState()[t]:[];break;case ke.favorite:i=We.getState();break;case ke.onboarding:i=t?Ge.getState()[t]:[]}return null!=i?i:[]};class Eo extends ht{constructor(){super(),this.id=null,this.expire_in=null,this.closed=!1,this.is_allow_profiling=!1,this.preview_aspect_ratio=1}singleModelWrapper(){return""}attributes(){return Ze()(super.attributes(),["server_timestamp","session","cache","share","user_key","placeholders","is_allow_profiling","preview_aspect_ratio"])}}var Io=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 To{constructor(e){this.storyManager=e}loadStories(e){return Io(this,arguments,void 0,(function*({feedSlug:e,filter:t,listType:i,testKey:r,needFavorite:s=!0}){const n=i===Pe.DEFAULT&&s;yield tn({defaultList:{feedSlug:e,filter:t},onboardingList:!1,favoriteList:n,testKey:r});const o=Oo(ke.default,e),a=(e=>e===Zo?Pe.UGC:Pe.DEFAULT)(e),l={stories:o.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===Pe.UGC&&(t.ugcPayload=P()(e.payload)?e.payload:{})),Object.assign({id:e.id},t)})),feed:null,filter:null};a===Pe.DEFAULT?l.feed=e:a===Pe.UGC&&(l.filter=t),this.storyManager.emit("feedLoad",l);return{defaultStories:Oo(ke.default,e),favoriteStories:Oo(ke.favorite,e)}}))}observeDefaultStories(e){return ze.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 We.map((e=>e.map((e=>this.createStoryByData(Object.assign(Object.assign({},e),{slides_html:[]}))))))}observeSession(){return m.map((e=>ht.createInstance(Eo,e)))}createStoryByData(e){return e instanceof Kt?e:ht.createInstance(Kt,e)}}var Ro=u(2784),Po=u.n(Ro);class jo{constructor(e){this.sliderApi=e,this.handleScroll=this.handleScroll.bind(this),this.handleNativeScrollEnd=Po()((()=>{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){const i=this.sliderApi.getElementRef(),r="ltr"===this.sliderApi.dir?1:-1;i.scrollTo({left:r*e.x,top:e.y,behavior:"smooth"}),this.sliderApi.updatePosition(e.x,e.y),this.sliderApi.testAttraction(),this.sliderApi.emit("scroll",e)}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()}}class Do{constructor(e){this.sliderApi=e,this.lastClientX=0,this.lastClientY=0,this.pushed=!1,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,Es),e.addEventListener("touchstart",this.handleMouseDown,Es),e.addEventListener("transitionend",this.handleAnimationEnd,Es)}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,Es),e.removeEventListener("touchstart",this.handleMouseDown,Es),e.removeEventListener("mouseup",this.handleMouseUp,Es),e.removeEventListener("touchend",this.handleMouseUp,Es),e.removeEventListener("mousemove",this.handleMouseMove,Es),e.removeEventListener("touchmove",this.handleMouseMove,Es),e.removeEventListener("transitionend",this.handleAnimationEnd,Es)}handleAnimationEnd(e){e.target===this.sliderApi.getElementRef()&&(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,Es),window.addEventListener("touchend",this.handleMouseUp,Es),window.addEventListener("mousemove",this.handleMouseMove,Es),window.addEventListener("touchmove",this.handleMouseMove,Es)}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,Es),window.removeEventListener("touchend",this.handleMouseUp,Es),window.removeEventListener("mousemove",this.handleMouseMove,Es),window.removeEventListener("touchmove",this.handleMouseMove,Es))}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}}}class Bo extends Do{constructor(e,t){super(e),this.nativeScrollStrategy=t}scrollTo(e){this.nativeScrollStrategy.scrollTo(e)}scrollWithAnimation(e,t){this.nativeScrollStrategy.scrollWithAnimation(e,t)}stopAnimation(){this.nativeScrollStrategy.stopAnimation()}destroy(){super.destroy(),this.nativeScrollStrategy.destroy()}}var No;!function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(No||(No={}));class Fo extends G.EventEmitter{constructor(){super(...arguments),this._isScrolling=!1,this._isDragging=!1,this.currentPosition={x:0,y:0},this.direction=No.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){const i=this.preparePosition(e,e);this.isTheSamePosition(i.x,i.y)||(this.isScrolling||this.emit("scrollstart",this.currentPosition),t>0?this.scrollStrategy.scrollWithAnimation(i,t):(this.scrollStrategy.scrollTo(i),this.emit("scrollend",this.currentPosition)))}isHorizontal(){return this.direction===No.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)}isTheSamePosition(e,t){return e===this.currentPosition.x&&t===this.currentPosition.y}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 Bo(this,new jo(this)):new jo(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())}))};class Vo{static getUgcEditorConfig(){return Uo(this,void 0,void 0,(function*(){var e;let t=m.getState();yield y(),(null==t?void 0:t.editor)||(yield Vs({}));const i=o.getState(),r=m.getState(),s="3.0.0-rc.0";return{sessionId:r.session.id,apiKey:i.apiKey,editor:null!==(e=r.editor)&&void 0!==e?e:{},sdkVersion:s,appPackageId:i.appPackageId,deviceId:g.getState(),userId:null!=i.userId?String(i.userId):void 0,lang:i.lang.toString()}}))}}var zo=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 Go extends G.EventEmitter{constructor(e,t,i,r){super(),this.storyManager=e,this.storyReaderViewModel=t,this.storyId=i,this.options=r,this.showSharePage=()=>zo(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.showStoryFromSharePage(this.storyId,t);this.handleEndLoad(i)})),this.handleCloseStoryReader=this.handleCloseStoryReader.bind(this),this.showSharePage(),this.storyReaderViewModel.once("closeStoryReader",this.handleCloseStoryReader)}closeStoryReader(){return zo(this,void 0,void 0,(function*(){this.storyManager.closeStoryReader()}))}handleStartLoad(){setTimeout((()=>{var e;this.emit(Rt.START_LOADING),At()(null===(e=this.options)||void 0===e?void 0:e.handleStartLoad)&&this.options.handleStartLoad()}))}handleEndLoad(e){var t;this.emit(Rt.END_LOADING,{result:e}),At()(null===(t=this.options)||void 0===t?void 0:t.handleStopLoad)&&this.options.handleStopLoad(e)}handleCloseStoryReader(){var e,t,i;if(At()(null===(e=this.options)||void 0===e?void 0:e.handleStoryReaderClose)||this.listenerCount(Rt.CLOSE_STORY_READER)>0)try{At()(null===(t=this.options)||void 0===t?void 0:t.handleStoryReaderClose)&&(null===(i=this.options)||void 0===i||i.handleStoryReaderClose()),this.emit(Rt.CLOSE_STORY_READER)}catch(e){console.error(e)}else{const e=window.location;window.open(`${e.protocol}//${e.host}`,"_parent")}}}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 $o{constructor(e){this.storyManager=e,this.plugins=new Map}install(e,t){this.plugins.set(e.name,e),Xe(`[PluginManager]: plugin ${e.name} registered`),e.install(this.storyManager,t),Xe(`[PluginManager]: plugin ${e.name} installed`)}uninstall(e){e.uninstall(this.storyManager),this.plugins.delete(e.name),Xe(`[PluginManager]: plugin ${e.name} uninstalled`)}get(e){return this.plugins.get(e)}}class Ho{constructor(e,t){var i,r,s,n,o,a;this.storyFeed=t,this.hideInReader=!1,this.hideTimeline=!1;const l=ht.createInstance(Kt,Object.assign(Object.assign({},e),{slides:[]}));this.id=l.id,this.title=l.title,this.titleColor=l.title_color,this.hasAudio=null!==(i=l.has_audio)&&void 0!==i&&i,this.hasSwipeUp=null!==(r=l.has_swipe_up)&&void 0!==r&&r,this.isOpened=l.is_opened,this.deeplink=null!==(s=l.deeplink)&&void 0!==s?s:void 0,this.gameInstanceId=null!==(o=null===(n=l.game_instance)||void 0===n?void 0:n.id)&&void 0!==o?o:void 0,this.hideInReader=null!==(a=l.hide_in_reader)&&void 0!==a&&a,this.hideTimeline=l.hide_timeline,this.isOpened=l.isOpened,this.storyItem=l}getCover(e){var t,i,r,s;return{imageSrc:null===(i=null===(t=this.storyItem.image)||void 0===t?void 0:t.findOneByCoverQuality(e))||void 0===i?void 0:i.url,videoSrc:null!==(r=this.storyItem.videoCoverSrc)&&void 0!==r?r:void 0,backgroundColor:this.storyItem.background_color,feedCoverSrc:null===(s=this.storyFeed)||void 0===s?void 0:s.coverSrc}}}class qo extends Tt{constructor(e={feed:"default"}){super(),this.options=e,this.storyModels=[],this.unreadedStoryModels=new Map,this._activeIndex=-1,this.handleStoriesChange=this.handleStoriesChange.bind(this),this.handleFeedsChange=this.handleFeedsChange.bind(this),this.storiesSubscription=ze.watch(this.handleStoriesChange),this.feedsSubscription=De.watch(this.handleFeedsChange)}get stories(){return this.storyModels.map((e=>this.createStackFeedStoryByModel(e)))}get length(){return this.storyModels.length}get activeIndex(){return this._activeIndex}get feedCoverSrc(){var e;return null===(e=this.feed)||void 0===e?void 0:e.coverSrc}get top(){return this.topStory}reload(){this.storyModels=[],this.unreadedStoryModels=new Map}destroy(){this.storiesSubscription.unsubscribe(),this.feedsSubscription.unsubscribe(),this.emit("destroy")}markStoryAsOpened(e){this.unreadedStoryModels.delete(e),this.resetUnreadedStories(),this.update()}resetUnreadedStories(){0===this.unreadedStoryModels.size&&(this.unreadedStoryModels=new Map(this.storyModels.map((e=>[e.id,e]))))}handleStoriesChange(e){var t;const i=null!==(t=e[this.options.feed])&&void 0!==t?t:[];0!==i.length&&(this.storyModels=i.slice(),this.resetUnreadedStories(),this.update())}handleFeedsChange(e){this.feed=e[this.options.feed]}createStackFeedStoryByModel(e){return new Ho(e,this.feed)}update(){const e=this.unreadedStoryModels.values().next().value;if(!e)throw new Error("[StackedStoryList]: Empty stacked story list");this._activeIndex=this.storyModels.indexOf(e),this.topStory=this.createStackFeedStoryByModel(e),this.onUpdateTopStory(this.topStory),this.emit("update",this.topStory)}}var Qo=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 Ko extends qo{constructor(e,t){super(t),this.storyManager=e,this.feedCoverageAnalyticsCalculator=new _o,this.firstStoryShown=!1,this.handleShowStory=this.handleShowStory.bind(this),this.handleCloseStoryReader=this.handleCloseStoryReader.bind(this),this.handleEventBusEvents=this.handleEventBusEvents.bind(this),this.subscribeToStoryReader(),this.subscribeToFeedCoverageAnalytics(),setTimeout((()=>{this.loadStories()}),0)}reload(){const e=Object.create(null,{reload:{get:()=>super.reload}});return Qo(this,void 0,void 0,(function*(){return this.firstStoryShown=!1,e.reload.call(this),this.loadStories()}))}destroy(){const e=this.storyManager.storyReaderViewModel;null==e||e.off("showStory",this.handleShowStory),null==e||e.off("closeStoryReader",this.handleCloseStoryReader),Nt.off("openGame",this.handleShowStory),Nt.off("clickOnStoryDeepLink",this.handleShowStory),this.feedCoverageAnalyticsCalculator.destroy(),super.destroy()}showStory(e){var t;const i=Xo.instance,r=Ot()(e.deeplink)&&e.deeplink.trim().length>0,s=e.gameInstanceId;if(!e.hideInReader||r||s){if(r&&null!==e.deeplink){const t={index:0,id:e.id,story:e,isDeeplink:!0,url:e.deeplink};return i.clickOnButtonAction({src:Ft.STACK_STORY_LIST,payload:t}),void this.markStoryAsOpened(e.id)}if(s)return i.openGame(s),void this.markStoryAsOpened(e.id);null===(t=this.storyManager.storyReaderViewModel)||void 0===t||t.showMultipleStories({storyId:e.id,listType:ke.default,windowReferer:Ce.stacked,feed:this.options.feed}),this.markStoryAsOpened(e.id)}else console.error("[StackedStoryList]: Cannot open hidden story id "+e.id)}handleCloseStoryReader(){this.top&&this.feedCoverageAnalyticsCalculator.markStoryAsFullVisible(this.top.id)}markStoryAsOpened(e){Sn.markAsOpened(e),this.feedCoverageAnalyticsCalculator.markStoryAsFullVisible(e),super.markStoryAsOpened(e)}onUpdateTopStory(e){this.firstStoryShown||(this.firstStoryShown=!0,this.feedCoverageAnalyticsCalculator.markStoryAsFullVisible(e.id))}subscribeToStoryReader(){return Qo(this,void 0,void 0,(function*(){try{const e=this.storyManager.storyReaderViewModel;Nt.on("openGame",this.handleEventBusEvents),Nt.on("clickOnStoryDeepLink",this.handleEventBusEvents),null==e||e.on("showStory",this.handleShowStory),null==e||e.on("closeStoryReader",this.handleCloseStoryReader)}catch(e){console.error("[StackedStoryList]: error while story reader init")}}))}handleShowStory({id:e}){this.markStoryAsOpened(e)}handleEventBusEvents({id:e}){this.markStoryAsOpened(e)}loadStories(){return Qo(this,void 0,void 0,(function*(){try{this.emit("startLoad"),yield tn({defaultList:{feedSlug:this.options.feed,filter:{}},onboardingList:!1,favoriteList:!1}),this.emit("endLoad")}catch(e){console.error("[StackedStoryList]: error while story list loaded")}}))}subscribeToFeedCoverageAnalytics(){const e=new Lo(this.storyManager,{listType:Pe.DEFAULT,feed:this.options.feed,filter:{}});this.feedCoverageAnalyticsCalculator.on("feedImpression",e.handle)}}var Yo=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 Zo="{{__ugc__}}";class Xo extends G.EventEmitter{constructor(){return super(),this.viewModelStore=new jt,this.config=null,this.callbacks={},this.pluginManager=new $o(this),this.clickOnButtonAction=({src:e,payload:t})=>{if(At()(this.callbacks.storyLinkClickHandler)||this.listenerCount(Ae.CLICK_ON_STORY)>0){const i={src:e,data:t};try{At()(this.callbacks.storyLinkClickHandler)&&this.callbacks.storyLinkClickHandler(i),this.emit(Ae.CLICK_ON_STORY,i)}catch(e){console.error(e)}}else window.open(t.url,"_self")},Xo.isSingletonInstanceExists()||(Xo.instance=this),Xo.instance}static get combinedPlaceholders(){return Ee()}get sdkVersionName(){return"3.0.0-rc.0"}get sdkVersionCode(){return parseInt(3e4)}get lang(){return o.getState().lang}set storyLinkClickHandler(e){At()(e)&&(this.callbacks.storyLinkClickHandler=e)}get storyReaderViewModel(){return this.viewModelStore.get(ao.name)}get gameReaderViewModel(){return this.viewModelStore.get(sa.name)}static getInstance(){return Xo.instance?Xo.instance:null}setViewModel(e,t){this.viewModelStore.set(e,t)}deleteViewModel(e){this.viewModelStore.delete(e)}getViewModelByKey(e){return this.viewModelStore.get(e)}getConfig(){return this.config}setConfig(e){this.validateConfig(e),this.initializeConfig(e)}destroy(){if(null!=Xo.instance){Xo.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 Yo(this,void 0,void 0,(function*(){(Ot()(e)||It()(e))&&this.config&&this.config.userId!==e&&(this.config.userId=e,T.getInstance().checkUserIdLength(e),d({userId:e}),S(),yield this.closeAllReaders(),yield this.reloadAllStoryLists(),yield this.reloadAllStackedStoryLists())}))}setLang(e){return Yo(this,void 0,void 0,(function*(){this.config&&Ot()(e)&&this.config.lang!==e&&(f({lang:e}),this.config.lang=e,S(),yield this.closeAllReaders(),yield this.reloadAllStoryLists(),yield this.reloadAllStackedStoryLists())}))}setApiKey(e){this.config&&(E(e),a({apiKey:e}),S(),this.config.apiKey=e)}setPlaceholders(e){P()(e)&&this.config&&(c({placeholders:e}),be(e),this.config.placeholders=e)}setImagePlaceholders(e){P()(e)&&this.config&&(p({imagePlaceholders:e}),ye(e),this.config.imagePlaceholders=e)}showOnboardingStories(e){return Yo(this,void 0,void 0,(function*(){return yield this.viewModelStore.wait(ao.name),this.storyReaderViewModel.showOnboardingStories(e)}))}showStory(e){return Yo(this,void 0,void 0,(function*(){"string"==typeof e&&(e=+e||e),yield this.viewModelStore.wait(ao.name);return this.storyReaderViewModel.showStory(e,"")}))}showStoryOnce(e){return Yo(this,void 0,void 0,(function*(){"string"==typeof e&&(e=+e||e),yield this.viewModelStore.wait(ao.name);return this.storyReaderViewModel.showStoryOnce(e)}))}closeAllReaders(){var e,t;null===(e=this.storyReaderViewModel)||void 0===e||e.close(),null===(t=this.gameReaderViewModel)||void 0===t||t.closeGame()}closeGoodsWidget(){var e;null===(e=this.storyReaderViewModel)||void 0===e||e.closeGoodsWidget()}openGame(e){return Yo(this,arguments,void 0,(function*(e,t={}){const i=this.gameReaderViewModel;try{yield i.openGame(e,t)}catch(e){console.error(e)}}))}closeGame(){return Yo(this,void 0,void 0,(function*(){return this.gameReaderViewModel.closeGame()}))}closeStoryReader(){return Yo(this,void 0,void 0,(function*(){this.storyReaderViewModel.close()}))}getUgcEditorConfig(){return Yo(this,void 0,void 0,(function*(){return Vo.getUgcEditorConfig()}))}showSharePage(e,t){return Yo(this,void 0,void 0,(function*(){return"string"==typeof e&&(e=+e||e),yield this.viewModelStore.wait(ao.name),new Go(this,this.storyReaderViewModel,e,t)}))}reloadAllStoryLists(){const e=this.viewModelStore.getAllOfType((e=>e instanceof go));return Promise.all(e.map((e=>e.reload())))}reloadAllStackedStoryLists(){const e=this.viewModelStore.getAllOfType((e=>e instanceof Ko));return Promise.all(e.map((e=>e.reload())))}static isSingletonInstanceExists(){return!!Xo.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&&be(e.placeholders),e.imagePlaceholders&&ye(e.imagePlaceholders),S(),e.disableStatistic="com.inappstory.webpreview"===e.appPackageId,this.config=e}use(e,t){this.pluginManager.install(e,t)}getPlugin(e){return this.pluginManager.get(e)}}const Jo=new Xo;new class{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()}getNonce(){return Gt()}showOnboardingStories(e){return Wo(this,void 0,void 0,(function*(){return this.storyManager.showOnboardingStories(e)}))}showStory(e){return Wo(this,void 0,void 0,(function*(){return this.storyManager.showStory(e)}))}showStoryOnce(e){return Wo(this,void 0,void 0,(function*(){return this.storyManager.showStoryOnce(e)}))}closeAllReaders(){this.storyManager.closeAllReaders()}openGame(e){return Wo(this,arguments,void 0,(function*(e,t={}){return this.storyManager.openGame(e,t)}))}closeGame(){return Wo(this,void 0,void 0,(function*(){return this.storyManager.closeGame()}))}closeStoryReader(){return Wo(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}static use(e,t){Jo.use(e,t)}}(Jo);var ea=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 ta=(0,e.createEffect)((e=>ea(void 0,[e],void 0,(function*({gameInstanceId:e,gameOptions:t}){yield y();const i={};t&&P()(t)&&null!=t.demoMode&&(i.demoMode=Boolean(t.demoMode));const r=yield U.post(`game/${e}/launch?expand=config`,i);if(!r.ok)throw new Error(JSON.stringify(r.data));return r.data.clientConfig=ia(),r.data})))),ia=()=>{var e;let t=m.getState();const i=o.getState();return{sessionId:t.session.id,userKey:t.user_key,apiKey:i.apiKey,sdkVersion:"3.0.0",apiBaseUrl:M.apiUrl,userAgent:B,appPackageId:i.appPackageId,deviceId:g.getState(),userId:null!==(e=i.userId)&&void 0!==e?e:"",lang:i.lang.toString(),placeholders:Xo.combinedPlaceholders}};var ra=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 sa extends Tt{constructor(e){super(),this.storyManager=e,this._isOpened=!1,this._isGameInited=!1,this._isGameLoading=!1,this._gameLaunch=null,this._gameLaunchError=null,this._closeBtnVisible=!1,this._gameShouldBeShown=!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),this.handleOpenGameCenterEvent=this.handleOpenGameCenterEvent.bind(this),document.addEventListener("visibilitychange",this.handleVisibilityChange),Nt.on(`${sa.name}.openGame`,this.handleOpenGameCenterEvent)}destroy(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.destroy(),document.removeEventListener("visibilitychange",this.handleVisibilityChange),Nt.off(`${sa.name}.openGame`,this.handleOpenGameCenterEvent)}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}get gameShouldBeShown(){return this._gameShouldBeShown}get isWidescreen(){var e,t;return this.desktopMode&&(null===(t=null===(e=this.gameLaunch)||void 0===e?void 0:e.screenOptions.widescreen)||void 0===t||t)}openGame(e,t){return ra(this,void 0,void 0,(function*(){if(this.isOpened)throw new Error(`Close the launched game with ID "${this.gameInstanceId}"`);this._gameInstanceId=e,this._isOpened=!0,this.openGameOptions=t,this._gameShouldBeShown=!1,yield this.launchGameById(e)}))}closeGame(){return ra(this,void 0,void 0,(function*(){var e;return!!this._isOpened&&(this._isGameInited?null===(e=this.gameCenterMessageService)||void 0===e||e.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.sendGameCenterEventByApiRequest(e,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 he(e,i),this.initGameCenter(this.gameCenterMessageService,this._gameLaunch)}pauseGameUI(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.pauseGameUI()}resumeGameUI(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.resumeGameUI()}confirmSharingComplete({shareId:e,isSuccess:t}){var i;null===(i=this.gameCenterMessageService)||void 0===i||i.shareComplete(e,t)}notifyGameCanBeStarted(){var e;null===(e=this.gameCenterMessageService)||void 0===e||e.notifyGameCanBeStarted()}launchGameById(e){return ra(this,void 0,void 0,(function*(){try{this._gameLaunchError=null,this._isGameLoading=!0,this.update(),this._gameLaunch=yield ta({gameInstanceId:e,gameOptions:this.openGameOptions})}catch(e){this._gameLaunchError=e}finally{this.update()}}))}initGameCenter(e,t){var i;this.handleGameCenterEvents(e);const r=this.getGameConfig(t);null===(i=this.gameCenterMessageService)||void 0===i||i.initGame(r)}getGameConfig(e){const t=e.screenOptions;return le()(e.config,{clientConfig:Object.assign({fullScreen:!1,screenOrientation:t.orientation,safeAreaInsets:this.safeAreaInsets,widescreen:this.isWidescreen,dir:this.dir,nonce:Gt(),sdkFeatures:{gameShouldForegroundCallback:!0}},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)).on("gameShouldForegroundCallback",this.handleGameShouldBeShown.bind(this));const t={share:new St(e,this,this.desktopMode),storySetLocalData:new Ct,storyGetLocalData:new xt(e,this),gameInstanceGetLocalData:new fe(e,this),gameInstanceSetLocalData:new gt(e,this)};for(const[i,r]of Object.entries(t))e.on(i,((...e)=>r.handle(...e)))}handleGameShouldBeShown(e){this._gameShouldBeShown=!0;const t=JSON.parse(e);P()(t)&&(this._closeBtnVisible=Boolean(t.showClose),this.update())}handleGameLoaded(){try{this.initGame(),this.startGame(),this.update()}catch(e){console.error(e)}}initGame(){this._isGameInited=!0,this._isGameLoading=!1}completeGame(){this._isGameInited=!1,this._isOpened=!1,this._gameLaunch=null}startGame(){this.storyManager.emit("startGame",{id:this.gameInstanceId})}handleVisibilityChange(){"hidden"===document.visibilityState?this.pauseGameUI():"visible"===document.visibilityState&&this.resumeGameUI()}handleGameComplete(e,t,i,r,s){var n;this.completeGame(),null===(n=this.gameCenterMessageService)||void 0===n||n.destroy(),this.emitGameCompleteEventByStoryManager(e),(null==s?void 0:s.id)&&this.openGame(s.id,{}),(null==r?void 0:r.id)&&this.storyManager.showStory(r.id),this.update(),gi()}emitGameCompleteEventByStoryManager(e){vn()(e)?this.storyManager.emit("closeGame",{id:this.gameInstanceId}):this.storyManager.emit("finishGame",{id:this.gameInstanceId,result:e})}handleSendApiRequest(e){_t.sendApiRequestPromise(e,((e,t)=>this.sendGameCenterEventByApiRequest(e,t)),ut)}handleOpenUrl(e){const{url:t}=JSON.parse(e);this.storyManager.clickOnButtonAction({src:Ft.GAME_READER,payload:{url:t,gameInstanceId:this.gameInstanceId}})}handleGameEvent(e,t){this.storyManager.emit("gameEvent",{name:e,payload:t})}handleReloadGameReader(){const e=this._gameLaunch;this._gameLaunch=null,this.update(),setTimeout((()=>{this._gameLaunch=e,this.update()}))}handleGameLoadFailed(e,t){this.gameLaunch&&t&&this.initGameRetryAttempts<this.gameLaunch.canTryReloadCount?(this.initGameRetryAttempts++,this.handleReloadGameReader()):this._gameLaunchError=new Error(e)}handleOpenGameCenterEvent(e){return ra(this,arguments,void 0,(function*({gameId:e}){yield this.openGame(e,{}),fi()}))}update(){this.emit("update")}}class na{constructor(e){this.storyManager=e}create(){return new sa(this.storyManager)}}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 oa(){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:aa.LANDSCAPE_PRIMARY,"-90":aa.LANDSCAPE_SECONDARY,0:aa.PORTRAIT_PRIMARY,180:aa.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:pa(e),event:"change"}}(i);return t.prototype.addEventListener=la("addEventListener",r.delegate,r.event),t.prototype.dispatchEvent=la("dispatchEvent",r.delegate,r.event),t.prototype.removeEventListener=la("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]=ua(e,i)}},type:{get:function(){var t=window.screen;return t.msOrientation||t.mozOrientation||e[window.orientation+""]||(fa().matches?"landscape-primary":"portrait-primary")}},angle:{value:0}}),i}(),e}}var aa;function la(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]=ha(i,s[0]):s[0]=i;var n,o,a=ua(s[1],r);return"addEventListener"===e&&function(e,t){var i=ca.indexOf(e);i>-1?da[i]=t:(ca.push(e),da.push(t))}(s[1],a),"removeEventListener"===e&&(n=s[1],(o=ca.indexOf(n))>-1&&(ca.splice(o,1),da.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"}(aa||(aa={}));var da=[],ca=[];function ua(e,t){var i=ca.indexOf(e);return i>-1?da[i]:function(i){i.target!==t&&ga(i,"target",t),i.currentTarget!==t&&ga(i,"currentTarget",t),"change"!==i.type&&ga(i,"type","change"),e(i)}}function ha(e,t){var i;try{i=new Event(e,t)}catch(e){i={type:"change"}}return i}function pa(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=fa();return i&&"boolean"==typeof i.matches&&i.addListener((function(){t.dispatchEvent(ha("change"))})),t}function fa(){return"function"!=typeof window.matchMedia?{}:window.matchMedia("(orientation: landscape)")}function ga(e,t,i){Object.defineProperty(e,t,{value:i})}class va{constructor(){this._storyLists=[]}get storyLists(){return this._storyLists}addStoryList(e){this._storyLists.push(e)}updateStoryListById(e,t){const i=this._storyLists.findIndex((t=>t.mountSelector===e));this._storyLists[i]=Object.assign(Object.assign({},this._storyLists[i]),t)}removeStoryListById(e){const t=this._storyLists.findIndex((t=>t.mountSelector===e));this._storyLists.splice(t,1)}}class ma extends Error{constructor(e){super(`Appearance Manager must be an object, but passed ${e.toUpperCase()}. Please check your code.`)}}const ya=e=>{if(null==e||"object"!=typeof e)throw new ma(null==e?"null":typeof e)};var wa=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 Sa extends G.EventEmitter{constructor(e,t,i,r){super(),this._mountSelector=e,this._appearanceManager=t,this.params=i,this.app=r,this.storyListManager=new va,this._ugcCardClickHandler=()=>{},ya(t),this.storyListManager.addStoryList(this),this.app.setStoryList(this.storyListManager.storyLists)}get mountSelector(){return this._mountSelector}get appearanceManager(){return this._appearanceManager}get type(){return Pe.DEFAULT}get identityFields(){return{feedSlug:this.feedSlug}}get feedSlug(){return this.params.feed}get testKey(){return this.params.testKey}get useUgcCard(){return this.params.useUgcCard}set ugcCardClickHandler(e){this._ugcCardClickHandler=e}get ugcCardClickHandler(){return this._ugcCardClickHandler}set api(e){this._api=e}reload(){return wa(this,void 0,void 0,(function*(){var e;return null===(e=this._api)||void 0===e?void 0:e.reload()}))}destroy(){this.storyListManager.removeStoryListById(this.mountSelector),this.app.setStoryList(this.storyListManager.storyLists)}}var ba=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 xa extends G.EventEmitter{constructor(e,t,i,r){super(),this._mountSelector=e,this._appearanceManager=t,this.params=i,this.app=r,this.storyListManager=new va,this._ugcCardClickHandler=()=>{},ya(t),this.storyListManager.addStoryList(this),this.app.setUGCStoryList(this.storyListManager.storyLists)}get mountSelector(){return this._mountSelector}get appearanceManager(){return this._appearanceManager}get type(){return Pe.UGC}get identityFields(){return{feedSlug:this.feedSlug}}get feedSlug(){return Zo}get testKey(){return this.params.testKey}get useUgcCard(){return this.params.useUgcCard}set api(e){this._api=e}set ugcCardClickHandler(e){this._ugcCardClickHandler=e}get ugcCardClickHandler(){return this._ugcCardClickHandler}reload(){return ba(this,void 0,void 0,(function*(){var e;return null===(e=this._api)||void 0===e?void 0:e.reload()}))}destroy(){this.storyListManager.removeStoryListById(this.mountSelector)}}var _a=u(1085),Ca=u(5873),ka=u(9155),La=u.n(ka),Aa=(u(6704),u(992)),Ma=u.n(Aa),Oa=u(2591),Ea=u.n(Oa),Ia=u(4289),Ta={insert:"head",singleton:!1};Ea()(Ia.A,Ta);const Ra=Ia.A.locals||{};var Pa=u(7081),ja={insert:"head",singleton:!1};Ea()(Pa.A,ja);const Da=Pa.A.locals||{},Ba=({onClick:e,className:t})=>(0,_a.jsx)("div",{className:Ma()(Da.icon,t),onClick:e,children:(0,_a.jsx)("svg",{viewBox:"0 0 24 24",children:(0,_a.jsx)("path",{fill:"currentColor",d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"})})});var Na=u(5669),Fa={insert:"head",singleton:!1};Ea()(Na.A,Fa);const Ua=Na.A.locals||{},Va=310/480,za=({desktopMode:e,children:t,verticalPadding:i,style:r,isWidescreen:s,className:n})=>{const[o,a]=(0,ka.useState)({width:"0px",height:"0px"});(0,ka.useEffect)((()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)})),[]);const l=()=>{const e=window.innerWidth,t=g(),i=e/window.innerHeight,r=c({aspectRatio:i,vh:t,vw:e}),s=d({aspectRatio:i,vh:t,vw:e});a({width:r,height:s})},d=({aspectRatio:e,vh:t,vw:i})=>{const r=p(e)||f();return e>Va&&!r?`${h({vh:t,vw:i})}px`:"100%"},c=({aspectRatio:e,vh:t,vw:i})=>e>Va&&!p(e)?`${u({aspectRatio:e,vh:t,vw:i})}px`:"auto",u=({aspectRatio:t,vh:i,vw:r})=>t>Va&&!e?r:Math.ceil(i*Va),h=({vh:t,vw:i})=>e?t:Math.ceil(i/Va),p=e=>e>Va&&e-Va<=.1,f=()=>{let e;return"matchMedia"in window&&void 0!==(e=window.matchMedia("(orientation: portrait)"))&&e.matches},g=()=>{let t=window.innerHeight;return e?(t-=i,t):t},v=s?{width:"100%",height:"100%"}:o;return(0,_a.jsx)("div",{className:Ma()(Ua["aspect-ratio-box"],n,{[Ua["aspect-ratio-box--centered"]]:!s}),style:Object.assign(Object.assign({},r),v),children:(0,_a.jsx)("div",{className:Ua["aspect-ratio-box-inside"],children:t})})};var Ga=u(5757),Wa={insert:"head",singleton:!1};Ea()(Ga.A,Wa);const $a=Ga.A.locals||{},Ha=oa(),qa=e=>{const[t,i]=(0,ka.useState)(!1),r=(0,ka.useCallback)((()=>{if(e.desktopMode)return;const t=Ha.type!==e.orientation;e.onOrientationChange({type:Ha.type,isWrong:t}),i(t)}),[e.desktopMode,e.orientation]);return(0,ka.useEffect)((()=>(r(),Ha.addEventListener("change",r),()=>{Ha.removeEventListener("change",r)})),[r]),t?(0,_a.jsx)("div",{className:$a["screen-orientation-lock"]}):null};var Qa=u(8778),Ka={insert:"head",singleton:!1};Ea()(Qa.A,Ka);const Ya=Qa.A.locals||{};var Za=u(1196),Xa={insert:"head",singleton:!1};Ea()(Za.A,Xa);const Ja=Za.A.locals||{};let el;function tl(){let e,t;/ipad|iphone/i.test(navigator.userAgent)?(e=document.createRange(),el&&e.selectNodeContents(el),t=window.getSelection(),t&&(t.removeAllRanges(),t.addRange(e)),el&&el.setSelectionRange(0,999999)):null==el||el.select()}const il=e=>{!function(e){el=document.createElement("textarea"),el.value=e,document.body.appendChild(el)}(e),tl(),document.execCommand("copy"),el&&document.body.removeChild(el)},rl=({shareText:e,shareLink:t,sharePanelOptions:i,onShareComplete:r})=>{var s,n,o,a,l,d,c,u,h,p,f;const[g,v]=(0,ka.useState)(!1),[m,y]=(0,ka.useState)(!1),w=()=>{y(!0),!g&&e||r()};return(0,_a.jsxs)("div",{className:`${Ya["share-panel__body"]} ${Ja["share-panel__body_screenshot"]}`,children:[(0,_a.jsx)("div",{className:`${Ya["share-panel-row"]} ${Ja["share-panel-row"]}`,children:(0,_a.jsx)("a",{className:Ja["share-panel-row__image-link"],onClick:w,href:t,download:"image.jpeg",children:(0,_a.jsx)("img",{src:t,className:Ja["share-panel-row__image"]})})}),(0,_a.jsx)("div",{className:Ya["share-panel-separator"],style:{background:null===(s=i.divider)||void 0===s?void 0:s.background}}),(0,_a.jsx)("div",{className:`${Ya["share-panel-row"]} ${Ja["share-panel-row"]}`,children:(0,_a.jsx)("a",{className:Ja["share-item__download-button"],onClick:w,href:t,download:"image.jpeg",children:(0,_a.jsx)("div",{dangerouslySetInnerHTML:{__html:null!==(a=null===(o=null===(n=i.downloadButton)||void 0===n?void 0:n.svgSrc)||void 0===o?void 0:o.baseState)&&void 0!==a?a:""}})})}),e?(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsx)("div",{className:Ya["share-panel-separator"],style:{background:null===(l=i.divider)||void 0===l?void 0:l.background}}),(0,_a.jsx)("div",{className:`${Ya["share-panel-row"]} ${Ja["share-panel-row"]}`,children:(0,_a.jsxs)("button",{className:Ma()(Ja.btn,Ja["btn-copy"]),onClick:()=>{il(null!=e?e:""),v(!0),m&&r()},children:[(0,_a.jsxs)("div",{className:Ja["btn-copy__icon"],children:[(0,_a.jsx)("span",{className:Ma()(Ja["btn-copy__icon-state"],{[Ja["btn-copy__icon-state_default"]]:!g}),dangerouslySetInnerHTML:{__html:null!==(u=null===(c=null===(d=i.copyButton)||void 0===d?void 0:d.svgSrc)||void 0===c?void 0:c.baseState)&&void 0!==u?u:""}}),(0,_a.jsx)("span",{className:Ma()(Ja["btn-copy__icon-state"],{[Ja["btn-copy__icon-state_done"]]:g}),dangerouslySetInnerHTML:{__html:null!==(f=null===(p=null===(h=i.copyButton)||void 0===h?void 0:h.svgSrc)||void 0===p?void 0:p.doneState)&&void 0!==f?f:""}})]}),(0,_a.jsx)("div",{className:Ja["btn-copy__text"],children:e})]})})]}):null]})};var sl=u(610),nl={insert:"head",singleton:!1};Ea()(sl.A,nl);const ol=sl.A.locals||{};var al=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 ll=e=>{var t,i,r,s,n,o,a,l,d,c,u,{shareLink:h,sharePanelOptions:p,onShareComplete:f}=e,g=al(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(0,_a.jsxs)("div",{className:Ya["share-panel__body"],children:[(0,_a.jsxs)("div",{className:`${Ya["share-panel-row"]} ${Ya["title-row"]}`,children:[v()&&Boolean(null==S?void 0:S.display)&&(0,_a.jsx)("div",{className:Ya["share-url-favicon"],style:{background:null==S?void 0:S.background},children:(0,_a.jsx)("img",{src:`${null!==(i=g.faviconApiUrl)&&void 0!==i?i:"https://favicon.inappstory.ru"}?sz=64&domain_url=${v()}`})}),(0,_a.jsx)("span",{className:Ya.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()})})]}),(0,_a.jsx)("div",{className:Ya["share-panel-separator"],style:{background:null===(n=p.divider)||void 0===n?void 0:n.background}}),(0,_a.jsx)("div",{className:`${Ya["share-panel-row"]} ${ol["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(0,_a.jsx)("div",{className:ol["social-list__item"],children:(0,_a.jsxs)("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:`${Ya["share-item"]} ${ol["share-item"]}`,children:[(0,_a.jsx)("div",{dangerouslySetInnerHTML:{__html:o}}),(0,_a.jsx)("span",{className:Ya["share-item-title"],style:b,children:null==n?void 0:n.label})]})},t)}))}),(0,_a.jsx)("div",{className:Ya["share-panel-separator"],style:{background:null===(a=p.divider)||void 0===a?void 0:a.background}}),(0,_a.jsx)("div",{className:Ya["share-panel-row"],children:(0,_a.jsxs)("a",{className:`${Ya["share-item"]} ${ol["share-item"]}`,onClick:()=>{il(h),f()},children:[(0,_a.jsx)("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:""}}),(0,_a.jsx)("span",{className:Ya["share-item-title"],style:b,children:null===(u=p.copyButton)||void 0===u?void 0:u.label})]})})]})};var dl;!function(e){e.Social="social",e.SlideScreenshot="slide-screenshot"}(dl||(dl={}));const cl=({shareType:e,shareLink:t,shareText:i,onShareCompelete:r,sharePanelOptions:s,className:n})=>{const{dir:o}=Hu(),[a,l]=(0,ka.useState)(!1),[d,c]=(0,ka.useState)(!0),u=()=>{l(!0),c(!1)};return(0,_a.jsxs)("div",{dir:o,className:Ma()(Ya["share-panel-wrapper"],n),onClick:e=>{e.stopPropagation()},onTouchStart:e=>{e.stopPropagation(),e.preventDefault()},children:[(0,_a.jsx)("div",{className:Ma()(Ya["share-panel-backdrop"],{[Ya.fadeIn]:d,[Ya.fadeOut]:!d}),onClick:()=>{l(!1),c(!1)}}),(0,_a.jsxs)("div",{className:Ma()(Ya["share-panel"],{[Ya.slideIn]:d,[Ya.slideOut]:!d}),onAnimationEnd:()=>{d||r(a)},style:{"--height":"100%",background:s.background,borderTopLeftRadius:s.borderRadius+"px",borderTopRightRadius:s.borderRadius+"px"},children:[e===dl.SlideScreenshot&&(0,_a.jsx)(rl,{shareText:i,shareLink:t,onShareComplete:u,sharePanelOptions:s}),e===dl.Social&&(0,_a.jsx)(ll,{shareLink:t,onShareComplete:u,sharePanelOptions:s}),(0,_a.jsx)("div",{className:Ya["share-panel-separator"]})]})]})};var ul=u(7495),hl={insert:"head",singleton:!1};Ea()(ul.A,hl);const pl=ul.A.locals||{},fl=e=>{const t=(0,ka.useRef)(null),[i,r]=(0,ka.useState)(null);return(0,ka.useEffect)((()=>{const i=e.plugin.createLottiePlayer(t.current,e.config);return r(i),()=>{i.destroy()}}),[e.config.sha1]),(0,ka.useEffect)((()=>{i&&e.forceEnd&&i.stop()}),[i,e.forceEnd]),(0,ka.useEffect)((()=>{if(i)return i.on("play",e.onPlay),i.on("complete",e.onComplete),i.on("beforeLoad",e.onBeforeLoad),i.on("load",e.onLoad),i.on("minPlayingTimeExpired",e.onMinPlayingTimeExpired),i.on("error",e.onError),()=>{i.off("play",e.onPlay),i.off("complete",e.onComplete),i.off("beforeLoad",e.onBeforeLoad),i.off("load",e.onLoad),i.off("minPlayingTimeExpired",e.onMinPlayingTimeExpired),i.off("error",e.onError)}}),[i,e.onError,e.onPlay,e.onComplete,e.onLoad,e.onBeforeLoad,e.onMinPlayingTimeExpired]),(0,_a.jsx)("canvas",{ref:t,style:{width:"100%",height:"100%"}})},gl=e=>{var t,i,r;const{storyManager:s}=Hu(),[n,o]=(0,ka.useState)(!1),[a,l]=(0,ka.useState)(!1),[d,c]=(0,ka.useState)(!1),[u,h]=(0,ka.useState)(!1),[p,f]=(0,ka.useState)(!1),[g,v]=(0,ka.useState)(!1),m=a||u||e.isGameLoading||!e.gameShouldBeShown,y=(0,ka.useMemo)((()=>s.getPlugin("dot-lottie")),[s]),w=!d&&y?(null===(i=null===(t=e.game)||void 0===t?void 0:t.splashLottieScreen)||void 0===i?void 0:i.url)&&(null===(r=e.game)||void 0===r?void 0:r.splashLottieScreen):null,S=e.game&&!e.isGameLoadingError&&m&&!a&&!w,b=()=>{var t,i,r,s;return e.desktopMode&&(null===(i=null===(t=e.game)||void 0===t?void 0:t.splashLandscapeScreen)||void 0===i?void 0:i.url)?e.game.splashLandscapeScreen.url:null===(s=null===(r=e.game)||void 0===r?void 0:r.splashScreen)||void 0===s?void 0:s.url},x=e.isGameInited&&(!w||p);(0,ka.useEffect)((()=>{x&&e.onSplashCanBeHidden()}),[x]);return(0,_a.jsxs)("div",{className:Ma()(pl["splash-container"],{[pl["splash-container--fadeIn"]]:e.game,[pl["splash-container--fadeOut"]]:e.gameShouldBeShown,[pl["splash-container--isLoading"]]:S}),children:[(0,_a.jsx)("div",{className:pl["splash-container__image"],style:{backgroundColor:e.splashImageBackgroundColor},children:b()&&(0,_a.jsx)("img",{src:b(),onLoad:()=>{v(!0)}})}),w&&y&&(0,_a.jsx)("div",{className:pl["splash-container__lottie"],children:(0,_a.jsx)(fl,{plugin:y,forceEnd:e.gameShouldBeShown,config:w,onError:()=>{c(!0)},onPlay:()=>{l(!0),o(!1)},onComplete:()=>{l(!1),o(!0)},onLoad:()=>{h(!1)},onBeforeLoad:()=>{h(!0)},onMinPlayingTimeExpired:()=>{f(!0)}})})]})};var vl=u(9843),ml={insert:"head",singleton:!1};Ea()(vl.A,ml);const yl=vl.A.locals||{},wl=e=>{var t,i;return(0,_a.jsx)("button",{dir:e.dir,onClick:e.onCloseGame,className:yl["close-btn"],"data-position":e.closeButtonPosition,dangerouslySetInnerHTML:{__html:null!==(i=null===(t=e.closeButtonOptions)||void 0===t?void 0:t.svgSrc.baseState)&&void 0!==i?i:""}})},Sl=({gameReaderViewModel:e})=>{var t,i,r,s,n,o,a,l;const{desktopMode:d,dir:c,gameReaderOptions:u,storyReaderOptions:h}=Hu(),p=(0,ka.useRef)(null),{sharePanelOpeningParams:f,handleShareComplete:g,closeSharePanel:v}=(e=>{const[t,i]=(0,ka.useState)(null);return(0,ka.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);Yu((()=>{m()}));const m=()=>{e.closeGame(),v()},{gameLaunch:y,gameLaunchError:w,isGameLoading:S,closeBtnVisible:b}=e,x=Ma()(Ra["game-reader"],{[Ra["game-reader--desktop-mode"]]:d,[Ra["game-reader--widescreen"]]:e.isWidescreen}),_={background:null!==(i=null===(t=u.backdrop)||void 0===t?void 0:t.background)&&void 0!==i?i:"",opacity:null!==(s=null===(r=u.backdrop)||void 0===r?void 0:r.opacity)&&void 0!==s?s:0,filter:(null===(n=u.backdrop)||void 0===n?void 0:n.blur)?`blur(${u.backdrop.blur}px)`:"none"},C=null!==(a=null===(o=u.game)||void 0===o?void 0:o.backdropColor)&&void 0!==a?a:"";return(0,_a.jsx)("div",{className:Ra["game-reader-container"],style:{"--game-box-border-radius":`${parseFloat(String(u.borderRadius))}px`},children:(0,_a.jsxs)("div",{className:x,children:[(0,_a.jsx)("div",{className:Ra["game-reader__backdrop"],style:_}),(0,_a.jsxs)(za,{className:Ra["game-reader__game-box"],isWidescreen:e.isWidescreen,desktopMode:d,verticalPadding:100,children:[(0,_a.jsx)(gl,{onSplashCanBeHidden:()=>{e.notifyGameCanBeStarted()},desktopMode:d,isGameInited:e.isGameInited,isGameLoading:S,isGameLoadingError:Boolean(e.gameLaunchError),gameShouldBeShown:e.gameShouldBeShown,game:null!==(l=e.gameLaunch)&&void 0!==l?l:void 0,splashImageBackgroundColor:e.gameLaunch?C:_.background}),w&&(0,_a.jsx)(Ba,{className:Ra["game-reader__refresh-btn"],onClick:()=>{e.reload()}}),(!e.gameShouldBeShown||b)&&(0,_a.jsx)(wl,{closeButtonPosition:u.closeButtonPosition,dir:c,onCloseGame:m,closeButtonOptions:u.closeButton}),y&&(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsx)("iframe",{src:y.url,onLoad:t=>{p.current=t.target,e.dir=c,e.setGameCenterIframe(p.current)},style:{opacity:e.gameShouldBeShown?1:0},frameBorder:"0",className:Ra["game-reader__iframe"],sandbox:"allow-same-origin allow-top-navigation allow-forms allow-scripts allow-downloads allow-top-navigation-to-custom-protocols",allow:"fullscreen"}),f&&(0,_a.jsx)(cl,{shareType:f.shareType,shareLink:f.shareLink,onShareCompelete:g,sharePanelOptions:h.sharePanel})]})]}),y&&u.forceCheckOrientation&&(0,_a.jsx)(qa,{orientation:aa.PORTRAIT_PRIMARY,desktopMode:d,onOrientationChange:({isWrong:t})=>{e.isGameInited&&(t?e.pauseGameUI():e.resumeGameUI())}})]})})};var bl=u(2130),xl={insert:"head",singleton:!1};Ea()(bl.A,xl);const _l=bl.A.locals||{};class Cl{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 ti.getState()}startMove(){ni(),this.windowHeight=this.storiesViewer.clientHeight,this.storiesViewer.style.setProperty("transition","")}move(e){e>10||this.closeGestureInAction?(si(),this.moveDownAndScaleReader(e)):(e<-10||this.swipeUpGestureInAction)&&this.moveUp(e)}endMove(){ui(),this.deltaValY>=0?this.handleSwipeDown():this.handleSwipeUp(),ni()}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(){Nt.emit("swipeController.swipeUp")}}const kl=e=>{const[,t]=(0,ka.useState)(0);(0,ka.useEffect)((()=>{if(!e)return;const i=()=>t((e=>e+1));return e.on("update",i),()=>{e.off("update",i)}}),[e])};function Ll(e,t){e.forEach(t)}function Al(e,t,i){if(!e)throw Error(`${i?i+": ":""}${t}`)}function Ml({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=td(r),h=td(d.links),p=td(d.owners),f=[];Ll(e,(e=>e&&Kl(f,e)));const g={id:Xl(),seq:f,next:td(o),meta:l,scope:a,family:{type:d.type||"crosslink",links:h,owners:p}};return Ll(h,(e=>Kl(Pl(e),g))),Ll(p,(e=>Kl(jl(e),g))),Ll(u,(e=>Kl(e.next,g))),c&&Jl&&ed(Dl(Jl),[g]),g}function Ol(e){const t=()=>e();return t.unsubscribe=()=>e(),t}function El(e,{scope:t,safe:i}={}){Al(t||hd||i,"scopeBind: scope not found");const r=t||hd;return t=>{function i(){pd(o)}let s,n=0;const o=hd;pd(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 Il({unit:e,fn:t,scope:i,batch:r}){const s=[dd.run({fn:e=>t(e)})];r&&s.unshift(dd.compute({priority:"sampler",batch:1})),Vl(e)&&s.unshift(dd.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=Ml({node:Tl(s,i),meta:{watchOp:i.kind}});r.push(n),e.push((()=>{const e=r.indexOf(n);-1!==e&&r.splice(e,1),md(n)}))})),Ol((()=>{e.forEach((e=>e()))}))}{const e=Ml({node:s,parent:n,family:{owners:n}});return Ol((()=>{md(e)}))}}function Tl(e,t){return Vl(t)?[dd.mov({store:t.stateRef,to:"stack"}),...e]:e}"undefined"!=typeof Symbol&&Symbol.observable;const Rl=e=>e.graphite||e,Pl=e=>e.family.owners,jl=e=>e.family.links,Dl=e=>e.value,Bl=e=>e.subscribers,Nl=(e,t)=>Rl(e).meta[t],Fl=e=>(rd(e)||id(e))&&"kind"in e,Ul=e=>t=>Fl(t)&&t.kind===e,Vl=Ul("store"),zl=Ul("event"),Gl=Ul("effect"),Wl=e=>Fl(e)&&!!e.targetable,$l=Ul("domain"),Hl=Ul("scope");var ql={__proto__:null,unit:Fl,store:Vl,event:zl,effect:Gl,targetable:Wl,domain:$l,scope:Hl,attached:e=>Gl(e)&&1==Nl(e,"attached")};const Ql=(e,t)=>{const i=e.indexOf(t);-1!==i&&e.splice(i,1)},Kl=(e,t)=>e.push(t),Yl=()=>{let e=0;return()=>""+ ++e},Zl=(Yl(),Yl()),Xl=Yl();Yl();let Jl=null;const ed=(e,t)=>{const i=Rl(e);Ll(t,(e=>{const t=Rl(e);"domain"!==i.family.type&&(t.family.type="crosslink"),Kl(Pl(t),i),Kl(jl(i),t)}))},td=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(Rl),id=e=>"object"==typeof e&&null!==e,rd=e=>"function"==typeof e,sd=(e,t,i,r)=>{const s={id:Zl(),type:e,data:t};return i&&(s.order={priority:i},r&&(s.order.barrierID=++nd)),s};let nd=0;const od=({from:e="store",store:t,target:i,to:r=(i?"store":"stack"),batch:s,priority:n})=>sd("mov",{from:e,store:t,to:r,target:i},n,s),ad=({fn:e,batch:t,priority:i,safe:r=0,filter:s=0,pure:n=0})=>sd("compute",{fn:e,safe:r,filter:s,pure:n},i,t),ld=({fn:e})=>ad({fn:e,priority:"effect"}),dd={mov:od,compute:ad,filter:({fn:e,pure:t})=>ad({fn:e,filter:1,pure:t}),run:ld};const cd=[];let ud=0;for(;ud<6;)Kl(cd,{first:null,last:null,size:0}),ud+=1;new Set;let hd;const pd=e=>{hd=e};const fd=(e,t)=>{Ql(e.next,t),Ql(Pl(e),t),Ql(jl(e),t)},gd=(e,t,i)=>{let r;e.next.length=0,e.seq.length=0,e.scope=null;let s=jl(e);for(;r=s.pop();)fd(r,e),(t||i&&"sample"!==e.meta.op||"crosslink"===r.family.type)&&gd(r,t,"on"!==r.meta.op&&i);for(s=Pl(e);r=s.pop();)fd(r,e),i&&"crosslink"===r.family.type&&gd(r,t,"on"!==r.meta.op&&i)},vd=e=>e.clear(),md=(e,{deep:t}={})=>{let i=0;if(e.ownerSet&&e.ownerSet.delete(e),Vl(e))vd(Bl(e));else if($l(e)){i=1;const t=e.history;vd(t.events),vd(t.effects),vd(t.stores),vd(t.domains)}gd(Rl(e),!!t,i)};Ml({node:[ld({fn:({fn:e,value:t})=>e(t)})],meta:{op:"fx",fx:"sidechain"}});var yd=u(7121),wd=u(8139);function Sd(e,t){const i=ql.unit(e);let r={};i?r={unit:e}:"@@unitShape"in e?"function"==typeof e["@@unitShape"]?r=e["@@unitShape"]():_d("expect @@unitShape to be a function"):r=e;const s=Array.isArray(r),n=ka.useRef({stale:1,justSubscribed:0,scope:t}),[o,a,l,d,c]=ka.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];ql.unit(d)||_d(`expect useUnit ${i?"argument":`value in key "${n}"`} to be a unit`),ql.event(d)||ql.effect(d)?(e[n]=t?El(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=ka.useRef({value:o,storeKeys:a,eventKeys:d,eventValues:c}),h=ka.useCallback((e=>{const i=n.current;return i.justSubscribed=1,Il({unit:l,fn:()=>{i.stale||(i.stale=1,e())},scope:t,batch:1})}),[l,t,u,n]),p=ka.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 Cd(h,p,p)}function bd(e){const t=ka.useContext(Ad);return e&&!t&&_d("No scope found, consider adding <Provider> to app root"),t}function xd(e,t){return Sd(e,bd(null==t?void 0:t.forceScope))}const _d=e=>{throw Error(e)},{useSyncExternalStore:Cd}=("undefined"!=typeof window?ka.useLayoutEffect:ka.useEffect,wd),{useSyncExternalStoreWithSelector:kd}=yd,Ld=(e,t)=>t?t.getState(e):e.getState(),Ad=ka.createContext(null),{Provider:Md}=Ad,Od=(oa(),()=>{const e=window.innerWidth;return{vh:window.innerHeight,vw:e}}),Ed=Math.tan(.375*Math.PI),Id=!!Os()&&{passive:!0};class Td extends G.EventEmitter{constructor(){super(),this.startValX=0,this.startValY=0,this.globalHorizontalSwipeGesture=!1,this.globalVerticalSwipeGesture=!1,this.enabled=!0,this.touchGestureRegistered=!1,this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),window.addEventListener("mousedown",this.handleMouseDown,!1),window.addEventListener("touchstart",this.handleMouseDown,Id)}enable(){this.enabled=!0}disable(){this.enabled=!1}handleMouseDown(e){this.enabled&&ii.getState()&&(this.pauseMouseDownTimer(),this.initStartPoint(e),this.globalHorizontalSwipeGesture=!1,this.globalVerticalSwipeGesture=!1,Nt.emit("swipeController.startMove"),this.registerMoveAndUpEvents())}pauseMouseDownTimer(){this.touchGestureTimerId=setTimeout((()=>{ci(),this.touchGestureRegistered=!0}),200)}resumeMouseDownTimer(e){this.touchGestureRegistered?e.preventDefault():clearTimeout(this.touchGestureTimerId)}initStartPoint(e){this.startValX=e.pageX||e.touches&&e.touches[0].pageX,this.startValY=e.pageY||e.touches&&e.touches[0].pageY}handleMouseMove(e){const t=e.pageX||e.touches&&e.touches[0].pageX,i=e.pageY||e.touches&&e.touches[0].pageY,r=t-this.startValX,s=i-this.startValY,n=Math.abs(r/s);let o=!1,a=!1,l=!1;Math.abs(r)>0||Math.abs(s)>0?(o=!0,n<=Ed&&(a=!0)):l=!0,a&&!this.globalHorizontalSwipeGesture?this.moveVertical(s):o&&!this.globalVerticalSwipeGesture&&this.moveHorizontal(t)}handleMouseUp(e){this.resumeMouseDownTimer(e),window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("touchmove",this.handleMouseMove,Id),window.removeEventListener("mouseup",this.handleMouseUp),window.removeEventListener("touchend",this.handleMouseUp),Nt.emit("swipeController.beforeEndMove"),this.touchGestureRegistered=!1,this.globalHorizontalSwipeGesture||this.globalVerticalSwipeGesture?this.globalVerticalSwipeGesture?this.completeVerticalSwipe():this.completeHorizontalSwipe():ui()}moveVertical(e){this.globalVerticalSwipeGesture=!0,Nt.emit("swipeController.move",{startY:this.startValY,startX:this.startValX,y:e,x:0,lockY:!1,lockX:!0})}moveHorizontal(e){this.globalHorizontalSwipeGesture=!0,Nt.emit("swipeController.move",{startY:this.startValY,startX:this.startValX,y:0,x:e,lockY:!0,lockX:!1})}completeVerticalSwipe(){Nt.emit("swipeController.endMove",{lockY:!1,lockX:!0}),this.globalVerticalSwipeGesture=!1}completeHorizontalSwipe(){Nt.emit("swipeController.endMove",{lockY:!0,lockX:!1}),this.globalHorizontalSwipeGesture=!1}registerMoveAndUpEvents(){window.addEventListener("mousemove",this.handleMouseMove,!1),window.addEventListener("touchmove",this.handleMouseMove,Id),window.addEventListener("mouseup",this.handleMouseUp,!1),window.addEventListener("touchend",this.handleMouseUp,!1)}destroy(){window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("touchstart",this.handleMouseDown,Id)}}const Rd=e=>50+parseFloat(String(e)),Pd=(e,t)=>{const i=e.hasLike&&Boolean(t.hasLike),r=e.hasShare&&Boolean(t.hasShare),s=e.hasFavorite&&Boolean(t.hasFavorite),n=e.hasAudio;return!e.isBlank&&(i||s||r||n)},jd=e=>{const{desktopMode:t,storyReaderOptions:i}=Hu();return(0,ka.useMemo)((()=>{const r=Rd(i.actionPanelBottomOffset),s=new Un(e.vw,e.vh,r),n=new Fn(s).create({vw:e.vw,vh:e.vh,desktopMode:t}),o=n instanceof Nn,a=o?s.getViewportCorrectionPadding():{};return{actionPanelHeight:r,safeAreaFrameCalculator:s,storyGeometry:n,isMobileGeometry:o,correctionPaddingStyle:a}}),[i.actionPanelBottomOffset,e,t])},Dd=e=>{const t=(0,ka.useRef)(null),i=(0,ka.useRef)(null),{desktopMode:r,storyReaderOptions:s}=Hu();(({storyReaderViewModel:e,storiesViewerRef:t,backdropRef:i})=>{const r=(0,ka.useRef)(null);(0,ka.useEffect)((()=>{r.current=new Cl(e,t.current,i.current)}),[]);const s=()=>{var e;t.current.classList.add(_l["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(_l["no-select"])};(0,ka.useEffect)((()=>(Nt.on("swipeController.startMove",s),Nt.on("swipeController.move",n),Nt.on("swipeController.endMove",o),Nt.on("swipeController.beforeEndMove",a),()=>{Nt.off("swipeController.startMove",s),Nt.off("swipeController.move",n),Nt.off("swipeController.endMove",o),Nt.off("swipeController.beforeEndMove",a)})),[])})({storyReaderViewModel:e.storyReaderViewModel,backdropRef:t,storiesViewerRef:i}),kl(e.storyReaderViewModel.activeStory);const{safeAreaFrameCalculator:n,isMobileGeometry:o}=jd(e.viewport),a=!o||n.shouldBeShownSafeAreaInsets?parseFloat(String(s.borderRadius)):0;return(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsxs)("div",{ref:i,className:Ma()("stories-viewer",_l["stories-viewer"],_l.slider3d),style:Object.assign(Object.assign({},{"--loaderBackgroundColor":null===(l=s.loader)||void 0===l?void 0:l.default.color,"--loaderBackgroundAccentColor":null===(d=s.loader)||void 0===d?void 0:d.default.accentColor,"--timelineBlockTopOffset":`${parseFloat(String(s.timelineBlockTopOffset))}px`,"--slideBorderRadius":`${a}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&&(0,_a.jsx)("div",{className:_l["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]}),(0,_a.jsx)("div",{ref:t,className:Ma()(_l["stories-viewer-backdrop"],{[_l._desktopMode]:r})})]});var l,d};var Bd=u(3390),Nd={insert:"head",singleton:!1};Ea()(Bd.A,Nd);const Fd=Bd.A.locals||{};var Ud=u(2594),Vd={insert:"head",singleton:!1};Ea()(Ud.A,Vd);const zd=Ud.A.locals||{};var Gd=u(187),Wd={insert:"head",singleton:!1};Ea()(Gd.A,Wd);const $d=Gd.A.locals||{},Hd=({story:e,commonOptions:t,storyReaderOptions:i})=>{const{dir:r}=Hu(),s=xd(ri),n=e.hasLike&&Boolean(t.hasLike),o=e.hasShare&&Boolean(t.hasShare),a=e.hasFavorite&&Boolean(t.hasFavorite),l=e.hasAudio,d=Pd(e,t)?Rd(i.actionPanelBottomOffset):0;return(0,_a.jsx)("div",{dir:r,className:$d["stories-button-panel"],style:{height:`${d}px`,transform:`translateY(${d}px)`},children:Pd(e,t)&&(0,_a.jsxs)("div",{className:$d["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(0,_a.jsxs)("span",{children:[(0,_a.jsx)("span",{className:Ma()($d["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)}}),(0,_a.jsx)("span",{className:Ma()($d["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&&(0,_a.jsx)("span",{children:(0,_a.jsx)("span",{className:Ma()($d["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)})}),(0,_a.jsxs)("span",{className:$d["right-container"],children:[l&&(0,_a.jsx)("span",{children:(0,_a.jsx)("span",{className:Ma()($d["button-panel-action"],{"muted-icon":s,"sound-icon":!s}),dangerouslySetInnerHTML:{__html:s?i.muteButton.svgSrc.baseState:i.muteButton.svgSrc.activeState},onClick:()=>{s?di():li()}})}),o&&(0,_a.jsx)("span",{className:$d["button-panel-action"],dangerouslySetInnerHTML:{__html:i.shareButton.svgSrc.baseState},onClick:()=>{e.share()}})]})]})})};var qd=u(2349),Qd={insert:"head",singleton:!1};Ea()(qd.A,Qd);const Kd=qd.A.locals||{},Yd=e=>{var t,i;const{dir:r}=Hu(),s=xd(Jt);return(0,_a.jsx)("div",{className:Kd["story-header"],children:!e.closeDisabled&&(0,_a.jsx)("button",{dir:r,"data-position":e.options.closeButtonPosition,className:Ma()(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 Zd=u(3278),Xd={insert:"head",singleton:!1};Ea()(Zd.A,Xd);const Jd=Zd.A.locals||{};var ec=u(6323),tc={insert:"head",singleton:!1};Ea()(ec.A,tc);ec.A.locals;const ic=e=>{const[,t]=(0,ka.useState)(0),i=()=>t((e=>e+1)),r=e.slide;(0,ka.useLayoutEffect)((()=>(r.on(Kn.ChangeState,i),()=>{r.off(Kn.ChangeState,i),r.stop()})),[r]);const{slideContentRef:s}=(({slide:e,activeStory:t,currentStory:i,needSlideInitByFlipping:r,currentSlideIndex:s,slidesLoaded:n})=>{const o=(0,ka.useRef)(null),[a,l]=xd([ri,ei]),d=t.id===i.id,c=d||r,u=0===s,h=1===s,p=c&&n&&e.state===zn.None&&u,f=e.state===zn.Started&&h||!c,g=d&&e.state===zn.Loaded&&u;return(0,ka.useLayoutEffect)((()=>{p&&e.init(o.current)}),[e,p]),(0,ka.useLayoutEffect)((()=>{g&&e.start()}),[d,g]),(0,ka.useLayoutEffect)((()=>{f&&e.stop()}),[f]),(0,ka.useEffect)((()=>{l?e.pause():e.resume()}),[e,l,e.state]),(0,ka.useEffect)((()=>{a?e.mute():e.unmute()}),[e,a,e.state]),{slideContentRef:o}})(e),n=r.state===zn.Loading||!e.slidesLoaded,o=r.state===zn.Loading||!e.slidesLoaded;return{slideContentRef:s,needLoadingMask:n,isVisible:r.state===zn.Loaded||r.state===zn.Started||r.state===zn.Paused,needLoadingAnimation:o}},rc=e=>{var t,i;vi(),Li({text:e.text,link:null!==(t=e.url)&&void 0!==t?t:"",type:e.type,id:null!==(i=e.id)&&void 0!==i?i:""})};var sc=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 nc=(e,t)=>sc(void 0,void 0,void 0,(function*(){const i=oc();if(!i)throw new Error;try{vi(),Tr({id:e}),yield i(t),Rr({result:!0})}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return;throw e}finally{Rr({result:!1})}})),oc=()=>{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 ac=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 lc=e=>ac(void 0,[e],void 0,(function*({shareId:e,shareText:t,hideElementsSelector:i,slideContent:r,desktopMode:s}){let n=null;try{const o=yield As(ks.IOS,r,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})),i),a={files:[o],text:t};if(n=URL.createObjectURL(o),s)return void rc({type:yt.SlideScreenshot,id:e,url:n,text:t});yield nc(e,a)}catch(i){console.error(i),n&&rc({type:yt.SlideScreenshot,id:e,url:n,text:t})}}));var dc=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 cc=e=>{const t={};for(const[i,r]of Object.entries(null!=e?e:{}))null!==r&&(t[i]=r);return t},uc=e=>{const t=({shareId:t,config:i})=>{var r;r={shareId:t,config:i,desktopMode:e.desktopMode},dc(void 0,[r],void 0,(function*({shareId:e,config:t,desktopMode:i}){var r;null==e&&(e="story-share");const s=cc(t),n=s.url=null!==(r=s.url)&&void 0!==r?r:s.text,o={type:yt.Social,id:e,url:n};try{if(i)return void rc(o);yield nc(e,s)}catch(e){rc(o)}}))},i=({shareId:t,hideElementsSelector:i,shareText:r})=>{const s=e.slideContentRef.current;lc({shareId:t,hideElementsSelector:i,shareText:r,slideContent:s,desktopMode:e.desktopMode})};(0,ka.useEffect)((()=>{if(e.activeStoryId===e.currentStoryId&&0===e.currentSlideIndex)return Nt.on(Qn.PerformShareAction,t),Nt.on(Qn.PerformScreenShotShareAction,i),()=>{Nt.off(Qn.PerformShareAction,t),Nt.off(Qn.PerformScreenShotShareAction,i)}}),[e.activeStoryId,e.currentStoryId,e.currentSlideIndex])};class hc{constructor(e){let t;this.getMountPoint=()=>document.body,this.timeout_id=null,this.duration=3e3,this.content="",this.position="bottom",e&&"object"==typeof e&&(e.duration&&(this.duration="string"==typeof e.duration?parseFloat(e.duration):e.duration),e.content&&(this.content=e.content),e.getMountPoint&&(this.getMountPoint=e.getMountPoint),e.position&&(t=e.position.toLowerCase(),this.position="top"===t||"bottom"===t?t:"bottom"),this.show())}show(){var e;if(!this.content)return!1;this.timeout_id&&clearTimeout(this.timeout_id);const t=document.getElementById("toast_container");t&&(null===(e=t.parentNode)||void 0===e||e.removeChild(t));const i=document.createElement("div");i.setAttribute("id","toast_container"),i.setAttribute("class","toast_fadein");const r=document.createElement("div");r.setAttribute("id","toast"),i.appendChild(r);const s=document.createElement("span");return s.innerHTML=this.content,r.appendChild(s),this.getMountPoint().appendChild(i),this.timeout_id=window.setTimeout(this.hide,this.duration),!0}hide(){const e=document.getElementById("toast_container");if(!e)return!1;function t(){var e;const t=document.getElementById("toast_container");if(!t)return!1;null===(e=t.parentNode)||void 0===e||e.removeChild(t)}return this.timeout_id&&clearTimeout(this.timeout_id),e.className+=" toast_fadeout",e.addEventListener("webkitAnimationEnd",t),e.addEventListener("animationEnd",t),e.addEventListener("msAnimationEnd",t),e.addEventListener("oAnimationEnd",t),!0}}var pc=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 fc=e=>{var{geometry:t}=e,i=pc(e,["geometry"]);const{desktopMode:r}=Hu(),{slideContentRef:s,needLoadingAnimation:n,needLoadingMask:o}=ic(i),{slideStyle:a,slideContentStyle:l,needBottomPanel:d}=(({geometry:e,currentStory:t})=>{const{storyReaderOptions:i,commonOptions:r}=Hu(),s=(0,ka.useMemo)((()=>Pd(t,r)),[t,r]),n=s?Rd(i.actionPanelBottomOffset):0;return{needBottomPanel:s,slideStyle:(0,ka.useMemo)((()=>({margin:e.getOffset(n),width:e.getWidth(),height:e.getHeight(),"--y-offset":e.getOffsetY(n),"--x-offset":e.getOffsetX(n)})),[n,e]),slideContentStyle:(0,ka.useMemo)((()=>({fontSize:e.getFontSize()})),[e])}})({geometry:t,currentStory:i.currentStory});uc({slideContentRef:s,desktopMode:r,activeStoryId:i.activeStory.id,currentStoryId:i.currentStory.id,currentSlideIndex:i.currentSlideIndex}),(({slideContentRef:e,state:t})=>{const i=t=>{new hc(Object.assign({getMountPoint:()=>e.current},t))};(0,ka.useEffect)((()=>{if(t===zn.Started)return Nt.on(Qn.ShowToast,i),()=>{Nt.off(Qn.ShowToast,i)}}),[t])})({slideContentRef:s,state:i.slide.state});const{handleSlideClick:c}=(({desktopMode:e,geometry:t,slide:i})=>{const{dir:r}=Hu(),s=e=>["narrative-element-link","narrative-element-image","narrative-element-swipe-up"].some((t=>e.classList.contains(t))),n=(s,n)=>{const o=new Or(i,n,t,r,e);for(const e of i.widgets)if(e.click({target:s,navigationController:o}),o.defaultPrevented)break;o.defaultPrevented||o.navigate()};return{handleSlideClick:e=>{const t=e.target;s(t)?Gn(i.story,t):n(t,e)}}})({activeStory:i.activeStory,desktopMode:r,geometry:t,slide:i.slide}),u=i.networkError||i.slide.state===zn.Error;return(0,_a.jsxs)("div",{onClick:e=>{e.preventDefault(),e.stopPropagation(),i.clickDisabled||c(e)},className:`${Jd["stories-slide"]} ${Jd[`_position_${i.currentSlideIndex+1}`]} ${Ma()({[Jd["_with-bottom-panel"]]:d,[Jd["_desktop-mode"]]:t instanceof Bn})}`,children:[(0,_a.jsx)("div",{className:Jd["stories-slide-offset"],style:a,children:(0,_a.jsx)("div",{className:Jd["stories-slide-box"],"data-testid":"stories-slide-box",children:(0,_a.jsx)("div",{ref:s,dangerouslySetInnerHTML:{__html:i.slide.html},className:`${Jd["stories-slide-content"]} narrative-slide"`,style:l})})}),(o||u)&&(0,_a.jsx)("div",{className:Jd["load-mask"],onClick:e=>{e.stopPropagation(),e.preventDefault()},children:u?(0,_a.jsx)(Ba,{className:Jd["stories-slide__refresh-btn"],onClick:()=>{i.networkError?i.onReloadStory():i.slide.reload()}}):n&&(0,_a.jsx)("div",{className:Jd["loading-spinner-default"]})})]})};var gc=u(9137),vc={insert:"head",singleton:!1};Ea()(gc.A,vc);const mc=gc.A.locals||{},yc=(0,ka.forwardRef)(((e,t)=>{const{desktopMode:i,dir:r}=Hu(),s=xd(Jt);return(0,_a.jsx)("div",{ref:t,dir:r,className:Ma()(mc["stories-pager"],{[mc["_desktop-mode"]]:i,[mc["_paused-ui"]]:s}),style:{"--stories-pager-tick-foreground":e.timeline.foreground,"--stories-pager-background":e.timeline.background},children:(0,_a.jsx)("div",{className:`${mc["stories-pager__ticks"]} ${Ma()({[mc.hiddenTimeline]:e.hiddenTimeline})}`,children:new Array(e.slidesLength).fill(0).map(((t,i)=>(0,_a.jsxs)("div",{className:mc["stories-pager__tick"],children:[(0,_a.jsx)("div",{className:Ma()(mc["stories-pager__tick-progress"],{[mc._active]:i+1<=e.activeSlideIndex})}),(0,_a.jsx)("div",{className:mc["stories-pager__tick-progress-loader"],style:{display:i+1===e.activeSlideIndex+1?"block":"none"}})]},i+1)))})})}));var wc=u(6212),Sc={insert:"head",singleton:!1};Ea()(wc.A,Sc);const bc=wc.A.locals||{};var xc=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 _c=e=>{const t=(0,ka.useRef)(null),i=(0,ka.useRef)(null),r=(0,ka.useRef)(0),s=(0,ka.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,ka.useState)(!1),[d,c]=(0,ka.useState)(!1),u=(0,ka.useRef)(!1),h=()=>{const t=ka.Children.count(e.children);return i.current&&t?i.current.scrollWidth/t:0};let p=!1;(0,ka.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,ka.useRef)(!1),g=(0,ka.useRef)(0);let v=0;const m=(0,ka.useRef)(!1),[y,w]=(0,ka.useState)(0),S=e=>{e<0&&(e=0),e>r.current&&(e=r.current),w(e)};(0,ka.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},x=e=>{m.current&&e.preventDefault(),setTimeout((()=>{m.current=!1})),f.current=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",x),document.removeEventListener("touchmove",b),document.removeEventListener("touchend",x)};return(0,_a.jsxs)("div",{className:bc["scrolling-carousel"],style:e.style,children:[(0,_a.jsx)("div",{className:bc["scrolling-carousel__wrapper"],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",x))},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",x))},onClickCapture:e=>{m.current&&(e.preventDefault(),e.stopPropagation())},children:(0,_a.jsx)("div",{className:bc["scrolling-carousel__item"],ref:i,style:{transform:`translateX(${-1*y}px)`},children:e.children})}),!p&&(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsx)("div",{className:Ma()(bc["scrolling-carousel__arrow-button"],bc["scrolling-carousel__arrow-button--left"],{[bc["scrolling-carousel__arrow-button--show"]]:a}),onClick:()=>xc(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 Ts(i.current,"transform",300)),u.current=!1})),children:(0,_a.jsx)("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_a.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),(0,_a.jsx)("div",{className:Ma()(bc["scrolling-carousel__arrow-button"],bc["scrolling-carousel__arrow-button--right"],{[bc["scrolling-carousel__arrow-button--show"]]:d}),onClick:()=>xc(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 Ts(i.current,"transform",300)),u.current=!1})),children:(0,_a.jsx)("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,_a.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})})})]})]})},Cc=({children:e,style:t,color:i,font:r,className:s})=>(0,_a.jsx)("div",{className:s,style:Object.assign({color:i,font:r},t),children:e});var kc=u(9108),Lc={insert:"head",singleton:!1};Ea()(kc.A,Lc);const Ac=kc.A.locals||{},Mc=({goods:e,onClick:t,options:i})=>{var r;const{imgSrc:s,title:n,subTitle:o,price:a,oldPrice:l}=e;return(0,_a.jsxs)("div",{className:Ma()(Ac["goods-card"]),style:{color:null!==(r=i.mainTextColor)&&void 0!==r?r:"black"},onClick:t,children:[(0,_a.jsx)("div",{className:Ma()(Ac.figure),style:{borderRadius:i.imageCornerRadius+"px",backgroundColor:i.imageBackgroundColor},children:s&&(0,_a.jsx)("img",{src:s,alt:n,style:{borderRadius:i.imageCornerRadius+"px",backgroundColor:i.imageBackgroundColor}})}),(0,_a.jsx)(Cc,{font:i.subtitleFont,children:o}),(0,_a.jsx)(Cc,{font:i.titleFont,children:n}),(0,_a.jsxs)("div",{className:Ac.prices,children:[(0,_a.jsx)(Cc,{font:i.priceFont,children:a}),(0,_a.jsx)(Cc,{className:Ac["typography--old-price"],font:i.oldPriceFont,color:i.oldPriceTextColor,children:l})]})]})},Oc=e=>{const t=e.goodsWidgetOptions,i=t.goodsWidgetRenderingType||t.goodsList.renderingType;let r=[];return i===oe.DEFAULT?r=e.goodsList.map(((i,r)=>(0,_a.jsx)(Mc,{options:t.goodsCard,goods:i,onClick:()=>e.onGoodsCardClick(i)},r))):i===oe.CUSTOM_CARD&&At()(t.getCardHtml)&&(r=e.goodsList.map(((i,r)=>{var s,n;return(0,_a.jsx)("div",{dangerouslySetInnerHTML:{__html:null!==(n=null===(s=t.getCardHtml)||void 0===s?void 0:s.call(t,i,r))&&void 0!==n?n:""},onClick:()=>e.onGoodsCardClick(i)},r)}))),(0,_a.jsx)(_c,{style:{marginTop:"-15px"},children:r})};var Ec=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 Ic=e=>{var{arrowColor:t}=e,i=Ec(e,["arrowColor"]);return(0,_a.jsx)("svg",Object.assign({},i,{width:"32",height:"12.5",viewBox:"0 0 64 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,_a.jsx)("path",{d:"M56.293 1.23375C58.054 -0.41125 60.846 -0.41125 62.607 1.23375C64.464 2.96775 64.464 5.85675 62.607 7.59075L35.157 23.2288C33.396 24.8738 30.604 24.8738 28.843 23.2288L1.393 7.59075C0.494002 6.75175 0 5.62775 0 4.41275C0 3.19775 0.494002 2.07375 1.393 1.23475C3.154 -0.410251 5.946 -0.410251 7.707 1.23475L32 13.9237L56.293 1.23375Z",fill:t})}))};var Tc=u(8161),Rc={insert:"head",singleton:!1};Ea()(Tc.A,Rc);const Pc=Tc.A.locals||{},jc=({closeImage:e,arrowColor:t,onClick:i})=>(0,_a.jsx)("div",{className:Pc.btn,onClick:i,onTouchStart:i,children:e?(0,_a.jsx)("div",{dangerouslySetInnerHTML:{__html:e}}):(0,_a.jsx)(Ic,{arrowColor:t})});var Dc=u(1277),Bc={insert:"head",singleton:!1};Ea()(Dc.A,Bc);const Nc=Dc.A.locals||{},Fc=({isLoading:e,backgroundColor:t="white",accentBackgroundColor:i="transparent"})=>e?(0,_a.jsx)("div",{className:Nc.spinner,style:{border:`solid 2px ${t}`,borderColor:`${i} ${t} ${t} ${t}`}}):null;var Uc=u(2939),Vc={insert:"head",singleton:!1};Ea()(Uc.A,Vc);const zc=Uc.A.locals||{};var Gc;!function(e){e[e.IN=0]="IN",e[e.OUT=1]="OUT"}(Gc||(Gc={}));const Wc=({goodsWidgetOptions:e,onClose:t,onGoodsCardClick:i,goods:r})=>{const s=(0,ka.useRef)(null),[n,o]=(0,ka.useState)(Gc.IN),a=e,{dimColor:l,substrateHeight:d,substrateColor:c,closeImage:u,closeBackgroundColor:h}=a.goodsList,p=()=>{o(Gc.OUT)};(0,ka.useEffect)((()=>(Nt.addListener("goodsWidget.close",p),()=>{Nt.removeListener("goodsWidget.close",p)})),[]),(0,ka.useEffect)((()=>{const e=s.current;if(n===Gc.OUT)return e.addEventListener("animationend",t),()=>{e.removeEventListener("animationend",t)}}),[n]);const f=a.loader.custom?(0,_a.jsx)("div",{dangerouslySetInnerHTML:{__html:a.loader.custom}}):(0,_a.jsx)(Fc,{isLoading:!r,backgroundColor:a.loader.default.color,accentBackgroundColor:a.loader.default.accentColor});return(0,_a.jsxs)("div",{className:Ma()(zc["goods-container"],{[zc["goods-container--visible"]]:n===Gc.IN,[zc["goods-container--hidden"]]:n===Gc.OUT}),ref:s,children:[(0,_a.jsx)("div",{className:Ma()(zc["goods-container__backdrop"]),style:{backgroundColor:l},onClick:p,onTouchStart:p}),(0,_a.jsxs)("div",{className:Ma()(zc["goods-container"]),style:{height:d+"px",backgroundColor:null!=c?c:"white"},children:[f,r&&(0,_a.jsx)(Oc,{goodsList:r,onGoodsCardClick:i,goodsWidgetOptions:e}),(0,_a.jsx)(jc,{onClick:p,closeImage:u,arrowColor:h})]})]})};var $c=u(4940),Hc={insert:"head",singleton:!1};Ea()($c.A,Hc);const qc=$c.A.locals||{};var Qc=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 Kc=e=>{const[t,i]=(0,ka.useState)([]);(0,ka.useEffect)((()=>{Nt.emit("publicEvents.widgetEvent",{name:"w-goods-open",devPayload:{story_id:e.story.id,slide_index:e.story.activeSlideIndex,widget_id:e.elementId}})}),[]),(0,ka.useEffect)((()=>{e.url&&r()}),[e.url]);const r=()=>Qc(void 0,void 0,void 0,(function*(){const t=s(),r=yield e.goodsWidgetOptions.openGoodsWidgetHandler(t);i(r)})),s=()=>{try{return JSON.parse(e.url).map((e=>({sku:e,title:"",subTitle:"",price:"",oldPrice:"",rawData:{}})))}catch(e){return console.error(e),[]}};return(0,_a.jsx)("div",{className:qc["goods-container"],children:(0,_a.jsx)(Wc,{goods:t,goodsWidgetOptions:e.goodsWidgetOptions,onClose:e.onClose,onGoodsCardClick:t=>{var i,r;Nt.emit("publicEvents.widgetEvent",{name:"w-goods-click",devPayload:{story_id:e.story.id,slide_index:e.story.activeSlideIndex,widget_id:e.elementId,widget_value:t.sku}}),null===(r=(i=e.goodsWidgetOptions).itemClickHandler)||void 0===r||r.call(i,t)}})})},Yc={247:"9999",376:"99 99 99",971:"99 999 9999",93:"99 999 9999",1268:"999 9999",1264:"999 9999",355:"999 999 999",374:"99 999 999",599:"999 9999",244:"999 999 999",672:"9 99 999",54:"999 999 9999",1684:"999 9999",43:"999 999 9999",61:"9 9999 9999",297:"999 9999",994:"99 999 99 99",387:"99 999 999",1246:"999 9999",880:"99 999 999",32:"999 999 999",226:"99 99 9999",359:"999 999 999",973:"9999 9999",257:"99 99 9999",229:"99 99 9999",1441:"999 9999",673:"999 9999",591:"9 999 9999",55:"99 99999 9999",1242:"999 9999",975:"99 999 999",267:"99 999 999",375:"99 999 99 99",501:"999 9999",243:"999 999 999",236:"99 99 9999",242:"99 999 9999",41:"99 999 9999",225:"99 999 999",682:"99 999",56:"9 9999 9999",237:"9999 9999",86:"999 9999 9999",57:"999 999 9999",506:"9999 9999",53:"9 999 9999",238:"999 99 99",357:"99 999 999",420:"999 999 999",49:"9999 999 9999",253:"99 99 99 99",45:"99 99 99 99",1767:"999 9999",1809:"999 9999",1829:"999 9999",1849:"999 9999",213:"99 999 9999",593:"99 999 9999",372:"9999 9999",20:"999 999 9999",291:"9 999 999",34:"999 999 999",251:"99 999 9999",358:"999 999 99 99",679:"99 99999",500:"99999",691:"999 9999",298:"999 999",262:"99999 9999",33:"999 999 999",508:"99 9999",590:"999 999 999",241:"9 99 99 99",1473:"999 9999",995:"999 999 999",594:"99999 9999",233:"999 999 999",350:"999 99999",299:"99 99 99",220:"999 99 99",224:"99 999 999",240:"99 999 9999",30:"999 999 9999",502:"9 999 9999",1671:"999 9999",245:"9 999999",592:"999 9999",852:"9999 9999",504:"9999 9999",385:"99 999 999",509:"99 99 9999",36:"999 999 999",628:"99 999 9999",62:"99 999 99",353:"999 999 999",972:"99 999 9999",91:"9999 999 999",246:"999 9999",964:"999 999 9999",98:"999 999 9999",354:"999 9999",39:"999 9999 999",1876:"999 9999",962:"9 9999 9999",81:"99 9999 9999",254:"999 999999",996:"999 999 999",855:"99 999 999",686:"99 999",269:"99 99999",1869:"999 9999",850:"999 999 9999",82:"99 999 9999",965:"9999 9999",1345:"999 9999",76:"99 999 99 99",77:"99 999 99 99",856:"99 99 999 999",961:"99 999 999",1758:"999 9999",423:"999 999 9999",94:"99 999 9999",231:"99 999 999",266:"9 999 9999",370:"999 99 999",352:"999 999 999",371:"99 999 999",218:"99 999 9999",212:"99 9999 999",377:"9999 9999",373:"9999 9999",382:"99 999 999",261:"99 99 99999",692:"999 9999",389:"99 999 999",223:"99 99 9999",95:"99 999 999",976:"99 99 9999",853:"9999 9999",1670:"999 9999",596:"999 99 99 99",222:"99 99 9999",1664:"999 9999",356:"9999 9999",230:"999 9999",960:"999 9999",265:"99 999 9999",52:"999 999 9999",60:"99 999 9999",258:"99 999 999",264:"99 999 9999",687:"99 9999",227:"99 99 9999",234:"999 999 9999",505:"9999 9999",31:"99 999 9999",47:"999 99 999",977:"99 999 999",674:"999 9999",683:"9999",64:"999 999 999",968:"99 999 999",507:"999 9999",51:"999 999 999",689:"99 99 99",675:"999 99 999",63:"999 999 9999",92:"999 999 9999",48:"999 999 999",970:"99 999 9999",351:"99 999 9999",680:"999 9999",595:"999 999 999",974:"9999 9999",40:"99 999 9999",381:"99 999 9999",7:"999 999 99 99",250:"999 999 999",966:"99 999 9999",677:"999 9999",248:"9 999 999",249:"99 999 9999",46:"99 999 9999",65:"9999 9999",290:"99 999",386:"99 999 999",421:"999 999 999",232:"99 999999",378:"9999 999999",221:"99 999 9999",252:"99 999 999",597:"999 9999",211:"99 999 9999",239:"99 99999",503:"99 99 9999",1721:"999 9999",963:"99 9999 999",268:"99 99 9999",1649:"999 9999",235:"99 99 99 99",228:"99 999 999",66:"99 999 9999",992:"99 999 9999",690:"9999",670:"999 9999",993:"9 999 9999",216:"99 999 999",676:"99999",90:"999 999 9999",1868:"999 9999",688:"99 9999",886:"999 999 999",255:"99 999 9999",380:"99 999 99 99",256:"999 999 999",44:"99 9999 9999",598:"9 999 99 99",998:"99 999 9999",396:"999 99999",1784:"999 9999",58:"999 999 9999",1284:"999 9999",1340:"999 9999",84:"99 9999 999",678:"99 99999",681:"99 9999",685:"99 9999",967:"999 999 999",27:"99 999 9999",260:"99 999 9999",263:"9 999999",1:"999 999 9999",383:"9999 9999"};class Zc{static isEmailValid(e){return/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(e)}static isTelephoneValid(e,t){return e?e.replace(/\s/g,"").length===t.length&&t.length>0:/^\d+$/.test(t)}}const Xc=e=>{switch(e){case"":default:return"text";case"tel":return"tel";case"email":return"email"}},Jc=e=>{const[t,i]=(0,ka.useState)({countryCode:"",phone:""}),[r,s]=(0,ka.useState)(""),[n,o]=(0,ka.useState)(!0),a=i=>{var r;const s=Xc(null!==(r=null==e?void 0:e.configV2.main.input.type)&&void 0!==r?r:"");return"email"===s?Zc.isEmailValid(i):"tel"!==s||Zc.isTelephoneValid((()=>{var e;const i=t.countryCode.substring(1);return i&&null!==(e=Yc[i])&&void 0!==e?e:""})(),t.phone)};return{value:r,telephone:t,isValid:n,handleTelephoneChange:e=>{i(e),e.phone.length>0?s(e.countryCode+e.phone):s("")},handleChange:e=>{s(e.trim())},handleSubmit:e=>{const t=a(r);o(t),t&&e({value:r})},reset:()=>{o(!0),s(""),i({countryCode:"",phone:""})}}};var eu=u(4169),tu={insert:"head",singleton:!1};Ea()(eu.A,tu);const iu=eu.A.locals||{},ru=(0,ka.forwardRef)(((e,t)=>{const i=(0,ka.useRef)(null);return(0,ka.useEffect)((()=>{var e;null===(e=i.current)||void 0===e||e.focus()}),[]),(0,_a.jsx)("input",{type:"email",className:Ma()(iu.input,iu.input_centered),placeholder:e.placeholder,value:e.value,ref:i,onChange:t=>e.onChange(t.target.value)})}));var su=u(2265),nu=u.n(su);const ou=(0,ka.forwardRef)(((e,t)=>{const i=(0,ka.useRef)(null),r=(0,ka.useRef)(null),s=t=>{const i=t.target;i&&(i.value=i.value.replace(/\D/g,""),e.onChange({countryCode:e.value.countryCode,phone:i.value}))};(0,ka.useEffect)((()=>{(()=>{let t=i.current;e.value.countryCode.length&&(t=r.current),null==t||t.focus()})()}),[]);const n=e.value.countryCode.substring(1),o=n?Yc[n]:"";return(0,_a.jsxs)("div",{className:iu["input-group"],children:[(0,_a.jsxs)("div",{className:iu["input-group__prepend"],children:[(0,_a.jsx)(nu(),{type:"tel",mask:"+999",maskChar:null,className:iu.input,onChange:t=>{e.onChange({countryCode:t.currentTarget.value,phone:e.value.phone})},value:e.value.countryCode,placeholder:"+",inputRef:i}),(0,_a.jsx)("div",{className:iu["input-group__separator"]})]}),o?(0,_a.jsx)(nu(),{type:"tel",className:iu.input,mask:o,maskChar:"-",alwaysShowMask:!0,placeholder:e.placeholder,inputRef:r,value:e.value.phone,onChange:s}):(0,_a.jsx)("input",{type:"tel",className:iu.input,placeholder:e.placeholder,ref:r,value:e.value.phone,onChange:s})]})})),au=(0,ka.forwardRef)(((e,t)=>{const i=(0,ka.useRef)(null),r=(0,ka.useRef)(null);(0,ka.useEffect)((()=>{var t;r.current.dataset.replicatedValue=e.value,null===(t=i.current)||void 0===t||t.focus()}),[]);return(0,_a.jsx)("div",{className:iu["textarea-grow-wrap"],ref:r,style:e.style,children:(0,_a.jsx)("textarea",{className:iu.input,placeholder:e.placeholder,rows:1,ref:i,maxLength:e.maxLength,value:e.value,onChange:t=>e.onChange(t.target.value),onInput:e=>{r.current.dataset.replicatedValue=e.currentTarget.value}})})}));var lu=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 du=e=>{var{form:t,config:i}=e,r=lu(e,["form","config"]);const[s,n]=(0,ka.useState)(!0),{getMainStyle:o,getMainElementsStyle:a,getQuestionStyle:l,getInputWrapperStyle:d,getButtonStyle:c,getTextareaStyle:u}=(({config:e})=>{const t=t=>t*(e.size.viewportWidth/(e.size.viewportWidth/e.size.fontSize));return{getMainStyle:()=>{const i=e.configV2.main;return{width:`${e.size.absolute.width}px`,height:"auto",left:e.size.absolute.center.x-e.size.absolute.width/2-e.size.slideOffsetX+"px",top:e.size.absolute.center.y-e.size.absolute.height/2-e.size.slideOffsetY+"px",backgroundColor:`${i.background.color}`,border:`${i.border.visible&&`${t(i.border.width)}px solid ${i.border.color}`}`,borderRadius:`${t(i.border.radius)}px`}},getMainElementsStyle:()=>{const i=e.configV2.main;return{width:"100%",padding:`${t(i.padding.top)}px ${t(i.padding.right)}px ${t(i.padding.bottom)}px ${t(i.padding.left)}px`}},getQuestionStyle:()=>{const i=e.configV2.main.question;return{padding:`${t(i.padding.top)}px ${t(i.padding.right)}px ${t(i.padding.bottom)}px ${t(i.padding.left)}px`,color:`${i.text.color}`,fontSize:`${t(i.text.size)}px`,lineHeight:`${i.text.lineHeight}`,textAlign:`${i.text.align}`,fontFamily:`${i.text.type}`,fontWeight:`${i.text.weight}`,fontStyle:`${i.text.style}`}},getInputWrapperStyle:()=>{const i=e.configV2.main.input;let r=e.configV2.main.input.text.maxLines;return r=r>0?r:1,{padding:`${t(i.padding.top)}px ${t(i.padding.right)}px ${t(i.padding.bottom)}px ${t(i.padding.left)}px`,backgroundColor:`${i.background.color}`,border:`${t(i.border.width)}px solid ${i.border.color}`,borderRadius:`${t(i.border.radius)}px`,lineHeight:`${i.text.lineHeight}`,maxHeight:i.text.lineHeight*r+"em",fontSize:`${t(i.text.size)}px`,overflowY:"scroll",scrollbarWidth:"none"}},getButtonStyle:()=>{const i=e.configV2.main.button;return{padding:`${t(i.padding.top)}px ${t(i.padding.right)}px ${t(i.padding.bottom)}px ${t(i.padding.left)}px`,backgroundColor:`${i.background.color}`,border:`${t(i.border.width)}px solid ${i.border.color}`,color:`${i.text.color}`,fontSize:`${t(i.text.size)}px`,lineHeight:`${i.text.lineHeight}`,textAlign:`${i.text.align}`,fontFamily:`${i.text.type}`,fontWeight:`${i.text.weight}`,fontStyle:`${i.text.style}`}},getTextareaStyle:()=>{const i=e.configV2.main.input;return{color:`${i.text.color}`,fontSize:`${t(i.text.size)}px`,lineHeight:`${i.text.lineHeight}`,textAlign:`${i.text.align}`,fontFamily:`${i.text.type}`,fontWeight:`${i.text.weight}`,fontStyle:`${i.text.style}`}}}})({config:i}),h=Math.max(i.configV2.main.input.text.limit,0),p=String(i.configV2.main.input.text.placeholder).trim(),f=String(i.configV2.main.button.text.value).trim(),g=String(i.configV2.main.question.text.value).trim(),v=Xc(i.configV2.main.input.type),m=({value:e})=>{r.onComplete({result:!0,value:e}),n(!1)};return(0,_a.jsxs)("div",{className:iu.wrapper,children:[(0,_a.jsx)("div",{className:Ma()(iu.backdrop,{[iu.fadeIn]:s,[iu.fadeOut]:!s}),onAnimationEnd:()=>{s||r.onClose()},onClick:()=>{r.onComplete({result:!1,value:t.value}),n(!1)}}),(0,_a.jsxs)("div",{className:iu.main,style:o(),children:[(0,_a.jsxs)("div",{className:iu["main-elements"],style:a(),children:[(0,_a.jsx)("div",{className:iu.question,style:l(),children:g}),(0,_a.jsxs)("div",{className:Ma()(iu["input-wrapper"],{[iu["is-invalid"]]:!t.isValid}),style:d(),children:["text"===v&&(0,_a.jsx)(au,{value:t.value,onChange:t.handleChange,style:u(),placeholder:p,maxLength:h}),"email"===v&&(0,_a.jsx)(ru,{value:t.value,onChange:t.handleChange,placeholder:p}),"tel"===v&&(0,_a.jsx)(ou,{value:t.telephone,onChange:t.handleTelephoneChange,placeholder:p})]})]}),t.value.trim().length>0&&(0,_a.jsx)("div",{className:iu["button-wrapper"],children:(0,_a.jsx)("button",{className:iu.button,style:c(),onClick:()=>t.handleSubmit(m),children:f})})]})]})},cu=({storyGeometry:e,activeSlide:t,storyRef:i})=>{const[r,s]=(0,ka.useState)(null),[n,o]=(0,ka.useState)(null),a=Jc(n);(0,ka.useEffect)((()=>(Nt.on(Qn.ShowInputModal,l),()=>{Nt.off(Qn.ShowInputModal,l)})),[]);const l=({id:t,config:r})=>{fi(),ai(),s(t),(t=>{t.size.fontSize=parseFloat(e.getFontSize()),t.size.viewportWidth=e.calculateWidth();const r=i.current.getBoundingClientRect();t.size.slideOffsetX=r.x,t.size.slideOffsetY=r.y,t.size.slideHeight=r.height,o(t)})(r)};return(0,ka.useLayoutEffect)((()=>()=>{a.reset()}),[r]),n?(0,_a.jsx)(du,{form:a,config:n,onComplete:e=>{if(!r)throw new Error;((e,i)=>{var r,s,n;null===(r=t.findWidgetByType(Zi.name))||void 0===r||r.setUserData(e,i),null===(s=t.findWidgetByType(rr.name))||void 0===s||s.setUserData(e,i),null===(n=t.findWidgetByType(gr.name))||void 0===n||n.setUserData(e,i)})(r,e.result?e.value:""),gi()},onClose:()=>{o(null),oi()}}):null};var uu=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 hu=e=>{var{story:t,geometry:i,className:r}=e,s=uu(e,["story","geometry","className"]);const n=(0,ka.useRef)(null),o=xd(Br),a=(0,ka.useRef)(null);kl(t),(({story:e,progressBarRef:t,nextFlippingStoryIndex:i,activeStory:r})=>{const s=e.timer,n=xd(ei),o=e===r&&-1===i;(0,ka.useEffect)((()=>{const i=e=>{var i;null===(i=t.current)||void 0===i||i.style.setProperty("--tick",e+"%")},r=({forceEnd:t})=>{t||(e.reachEnd?Nt.emit(`${ao.name}.showNextStory`,{action:"auto"}):e.nextSlide())},n=()=>{var e;null===(e=t.current)||void 0===e||e.style.setProperty("--tick","0%")},o=()=>{var e;null===(e=t.current)||void 0===e||e.style.setProperty("--tick","0%")};return s.on("start",n),s.on("stop",o),s.on("progress",i),s.on("complete",r),()=>{s.off("start",n),s.off("progress",i),s.off("complete",r),s.off("stop",o)}}),[e]),(0,ka.useEffect)((()=>{n?s.pause():s.resume()}),[n]),(0,ka.useEffect)((()=>{o||s.stop()}),[o])})({activeStory:s.activeStory,story:t,nextFlippingStoryIndex:s.nextFlippingStoryIndex,progressBarRef:a});const l=s.index===s.nextFlippingStoryIndex,d=()=>{Nt.emit(ro.ReloadStory,t)};return(0,_a.jsxs)("div",{ref:n,className:Ma()(zd["stories-item"],zd.slider3d__item,r),onMouseDown:()=>{Rr({result:!1})},onTouchStart:()=>{Rr({result:!1})},"data-testid":"story",style:s.style,children:[(0,_a.jsx)(Yd,{closeDisabled:t.disableClose,options:s.storyReaderOptions,onClose:s.onClose}),t.activeSlide&&(0,_a.jsx)(yc,{ref:a,hiddenTimeline:t.hiddenTimeline,slidesLength:t.slidesCount,timeline:t.activeSlide.timeline,activeSlideIndex:t.activeSlideIndex}),t.displayedSlides.map(((e,r)=>(0,_a.jsx)(fc,{clickDisabled:s.slideClickDisabled,onReloadStory:d,activeSlideIndex:t.activeSlideIndex,currentSlideIndex:r,needSlideInitByFlipping:l,networkError:Boolean(t.error),currentStory:t,activeStory:s.activeStory,geometry:i,slide:e,slidesLoaded:t.slidesLoaded},e.html))),(0,_a.jsx)(Hd,{story:t,commonOptions:s.commonOptions,storyReaderOptions:s.storyReaderOptions}),o.isOpened&&s.activeStory===t&&(0,_a.jsx)(Kc,{url:o.url,story:t,elementId:o.elementId,goodsWidgetOptions:s.goodsWidgetOptions,onClose:()=>{var e,i;null===(i=null===(e=t.activeSlide)||void 0===e?void 0:e.findWidgetByType(wr.name))||void 0===i||i.close()}}),s.activeStory===t&&t.activeSlide&&(0,_a.jsx)(cu,{storyRef:n,storyGeometry:i,activeSlide:t.activeSlide})]})},pu=({className:e,style:t})=>(0,_a.jsx)("div",{className:Ma()(zd["stories-item"],e),style:t,children:(0,_a.jsx)("div",{className:`${Jd["stories-slide"]} ${Jd._dummy}`})});var fu=u(6950),gu={insert:"head",singleton:!1};Ea()(fu.A,gu);const vu=fu.A.locals||{};var mu=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 yu=e=>{var{width:t,navigationOptions:i}=e,r=mu(e,["width","navigationOptions"]);const{desktopMode:s,dir:n}=Hu(),[o,a]=xd([Jt,ki]),l=o||a,d="ltr"===n,c=(d?r.isNextStoryBlank:r.isPrevStoryBlank)||l,u=(d?r.isPrevStoryBlank:r.isNextStoryBlank)||l;return(0,_a.jsxs)("div",{className:Ma()([vu["story-reader-controls"]],{[vu._desktop_mode]:s}),children:[(0,_a.jsx)("div",{className:vu.slider3d__btn_next,style:{transform:`translateY(-50%) translateX(calc(${t/2}px + 100%))`},children:(0,_a.jsx)("button",{className:vu["btn-icon"],onClick:e=>{e.stopPropagation(),e.preventDefault(),r.disabled||(d?r.onNext():r.onPrev())},disabled:c,dangerouslySetInnerHTML:{__html:i.nextButton.svgSrc.baseState}})}),(0,_a.jsx)("div",{className:vu.slider3d__btn_prev,style:{transform:`translateY(-50%) translateX(calc(-${t/2}px - 200%))`},children:(0,_a.jsx)("button",{className:vu["btn-icon"],onClick:e=>{e.stopPropagation(),e.preventDefault(),r.disabled||(d?r.onPrev():r.onNext())},disabled:u,dangerouslySetInnerHTML:{__html:i.prevButton.svgSrc.baseState}})})]})},wu=45,Su=350,bu="linear",xu=1.6,_u=2*Math.tan(wu*Math.PI/360),Cu=Su/1e3;class ku{constructor(e){this.slider=e,this.newAngle=0,this.angleDelta=0,this.normalizedShift=0,this.movementStartAt=0,this._currentAngle=0}get currentAngle(){return this._currentAngle}get perspective(){return 0}get depth(){return 0}startMove(){this.newAngle=0,this.angleDelta=0,this.normalizedShift=0,this.movementStartAt=Date.now()}move(e){this.normalizedShift=e/this.slider.clientWidth*xu,this.newAngle=this._currentAngle+this.normalizedShift*wu,this.angleDelta=this.newAngle-this._currentAngle}endMove(){if(!this.normalizedShift)return;let e=Math.round(this.angleDelta/wu);e=this.limitByFastMovement(e),e=this.limitBySliderEdges(e),this.slider.emit("touchEnd",e)}limitByFastMovement(e){return this.isFastMovement(e)?this.normalizedShift<0?-1:1:e}isFastMovement(e){return Date.now()-this.movementStartAt<=500&&0===e}limitBySliderEdges(e){return e<0&&this.slider.isBeginning||e>0&&this.slider.isEnd?0:e}}const Lu=.05;class Au extends ku{init(){this._currentAngle=this.slider.currentIndex*wu}transform(e){const t=this.slider.leftElement,i=this.slider.rightElement,r=this.slider.frontElement;null==t||t.style.setProperty("transform",`translateZ(0) translateX(${-100*(.1- -1*e/10)}%) scale(${Math.min(.9+-1*e/10,1)})`),null==i||i.style.setProperty("transform",`translateZ(0) translateX(${100*(1-e)}%)`),null==r||r.style.setProperty("transform",`translateZ(0) translateX(${e<=0?-100*e:-100*(0- -1*e/10)}%) scale(${e<=0?1:1+-1*e/10})`)}move(e){super.move(e),this.normalizedShift=this.applyBoundsConstraint(this.normalizedShift),this.transform(this.normalizedShift)}getCSSStyle(e,t){return{display:Math.abs(e-t)<=1?"block":"none",transition:"inherit",transform:`translateZ(0) translateX(${0===e?-10:-100*t+100*e}%) scale(${0===e?.9:1})`}}applyBoundsConstraint(e){return this.slider.isBeginning||this.slider.isEnd?e>=Lu&&this.slider.isEnd?Lu:e<=-.05&&this.slider.isBeginning?-.05:e:e}}const Mu=.05;class Ou extends ku{init(){this._currentAngle=this.slider.currentIndex*wu}transform(e){const t=this.slider.leftElement,i=this.slider.rightElement,r=this.slider.frontElement;null==t||t.style.setProperty("transform",`translateZ(0) translateX(${-100*(1+e)}%)`),null==i||i.style.setProperty("transform",`translateZ(0) translateX(${100*(1-e)}%)`),null==r||r.style.setProperty("transform",`translateZ(0) translateX(${-100*e}%)`)}move(e){super.move(e),this.normalizedShift=this.applyBoundsConstraint(this.normalizedShift),this.transform(this.normalizedShift)}getCSSStyle(e,t){return{display:Math.abs(e-t)<=1?"block":"none",transition:"inherit",transform:`translateZ(0) translateX(${-100*t+100*e}%)`}}applyBoundsConstraint(e){return this.slider.isBeginning||this.slider.isEnd?e>=Mu&&this.slider.isEnd?Mu:e<=-.05&&this.slider.isBeginning?-.05:e:e}}var Eu=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 Iu extends ku{get perspective(){return this.slider.clientWidth*xu}get depth(){return this.slider.clientWidth/_u}init(){this.transform(this.slider.currentIndex)}transform(e){return Eu(this,void 0,void 0,(function*(){this._currentAngle=this._currentAngle+e*wu,this.slider.setTransform(`rotateY(${-this._currentAngle}deg)`)}))}move(e){super.move(e),this.newAngle=this.applyBoundsConstraint(this.angleDelta),this.slider.setTransform(`rotateY(${-this.newAngle}deg)`)}getCSSStyle(e,t){return{display:Math.abs(e-t)<=1?"block":"none",transition:"",transform:"rotateY("+e*wu+`deg) translateZ(${this.depth}px)`}}applyBoundsConstraint(e){return this.slider.isBeginning||this.slider.isEnd?e>=5&&this.slider.isEnd?this._currentAngle+5:e<=-5&&this.slider.isBeginning?this._currentAngle-5:this.newAngle:this.newAngle}}class Tu{static create(e,t){switch(t){case ie.FLAT:return new Ou(e);case ie.COVER:return new Au(e);case ie.CUBE:return new Iu(e);default:return new Ou(e)}}}var Ru=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 Pu extends G.EventEmitter{constructor(){super(...arguments),this._animating=!1,this._currentIndex=0,this.effect=null}get clientWidth(){return this.$el.clientWidth}get animating(){return this._animating}get leftElement(){return this.$el.children.item(this._currentIndex-1)}get rightElement(){return this.$el.children.item(this._currentIndex+1)}get frontElement(){return this.$el.children.item(this._currentIndex)}get isBeginning(){return this._currentIndex-1==0}get isEnd(){return this._currentIndex+1===this.$el.children.length-1}get perspective(){var e,t;return null!==(t=null===(e=this.effect)||void 0===e?void 0:e.perspective)&&void 0!==t?t:0}get depth(){var e,t;return null!==(t=null===(e=this.effect)||void 0===e?void 0:e.depth)&&void 0!==t?t:0}get currentIndex(){return this._currentIndex}set currentIndex(e){this._currentIndex=e}getCSSStyle(e,t){var i,r;return null!==(r=null===(i=this.effect)||void 0===i?void 0:i.getCSSStyle(e,t))&&void 0!==r?r:{}}init({$el:e,transformStyle:t}){this.$el=e,this.effect=Tu.create(this,t),this.effect.init(),this.setTransition("transform 0s"),this.updateSlidesStyle(0)}transformWithAmimation(e){return Ru(this,void 0,void 0,(function*(){this.emit("transitionStart"),this._animating=!0,this.setTransition(`transform ${Cu}s ${bu}`),this.effect.transform(e),yield this.waitTransitionEnd(),this.updateSlidesStyle(e),this._animating=!1,this.emit("transitionEnd")}))}startMove(){this.effect.startMove()}move(e){this._animating=!0,this.emit("touchMove"),this.effect.move(e)}endMove(){this._animating=!1,this.effect.endMove()}setTransform(e){this.$el.style.setProperty("transform",e)}updateSlidesStyle(e){const t=Array.from(this.$el.children);for(let i=0;i<t.length;i++){const r=t[i],s=this.effect.getCSSStyle(i,this.currentIndex+e);r.style.display=s.display,r.style.transform=s.transform,r.style.transition=s.transition}}setTransition(e){this.$el.style.setProperty("transition",e)}waitTransitionEnd(){return new Promise((e=>{const t=i=>{Math.round(100*i.elapsedTime)/100===Cu&&"transform"===i.propertyName&&(this.setTransition("transform 0s"),this.$el.removeEventListener("transitionend",t),e())};this.$el.addEventListener("transitionend",t)}))}}const ju=e=>{const[t,i]=(0,ka.useState)(!1),{storyReaderOptions:r}=Hu(),[,s]=(0,ka.useState)([]),n=(0,ka.useRef)(null),o=(0,ka.useRef)(new Pu).current;(({storiesSlider:e})=>{const t=()=>{null==e||e.startMove()},i=({startX:t,x:i,lockX:r})=>{if(r)return;const s=t-i;null==e||e.move(s)},r=({lockX:t})=>{t||null==e||e.endMove()};(0,ka.useEffect)((()=>(Nt.on("swipeController.startMove",t),Nt.on("swipeController.move",i),Nt.on("swipeController.endMove",r),()=>{Nt.off("swipeController.startMove",t),Nt.off("swipeController.move",i),Nt.off("swipeController.endMove",r)})),[])})({storiesSlider:o});const a=r.scrollStyle,l=e.stories;o.currentIndex=e.currentIndex,(0,ka.useLayoutEffect)((()=>{const e=()=>{o.init({$el:n.current,transformStyle:a}),s([])};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[l.length,a]),(0,ka.useEffect)((()=>(o.on("transitionStart",c),o.on("transitionEnd",u),o.on("touchMove",d),()=>{o.off("transitionStart",c),o.off("transitionEnd",u),o.off("touchMove",d)})),[]);const d=()=>{ai()},c=()=>{i(!0),ai()},u=()=>{i(!1),oi()};return{ref:n,api:o,perspective:o.perspective,depth:o.depth,animating:t}};var Du=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 Bu=(e,t)=>{const{storyReaderOptions:i}=Hu(),[r,s]=(0,ka.useState)(-1);(0,ka.useEffect)((()=>(Nt.on(`${ao.name}.showNextStory`,l),Nt.on(`${ao.name}.showPrevStory`,d),()=>{Nt.off(`${ao.name}.showNextStory`,l),Nt.off(`${ao.name}.showPrevStory`,d)})),[]),(0,ka.useEffect)((()=>(t.on("touchEnd",n),()=>{t.off("touchEnd",n)})),[t]);const n=i=>Du(void 0,void 0,void 0,(function*(){ui(),0===i?yield t.transformWithAmimation(0):a(e.currentIndex+i,"swipe")})),o=t=>{Nt.emit("publicEvents.closeStory",{id:e.activeStory.id,index:e.activeStory.activeSlideIndex,action:t})},a=(t,i="lastSlideClick")=>{s(t),e.setSlideApiActiveStory(e.getDisplayedStoryByIndex(t)),c(t,i)},l=t=>{const r=null==t?void 0:t.action;e.reachEnd?(t=>{"auto"!==t?(o("closeStoryByScrolling"),e.close("lastSlideClick")):i.closeOnLastSlideByTimer&&(o("closeStoryByScrolling"),e.close("auto"))})(r):a(e.currentIndex+1,r)},d=t=>{e.reachStart||a(e.currentIndex-1,null==t?void 0:t.action)},c=(i,r)=>Du(void 0,void 0,void 0,(function*(){if(-1===i)return;const n=e.currentIndex<i?1:-1;yield t.transformWithAmimation(n),((t,i)=>{o(i),1==(e.currentIndex<t?1:-1)?e.nextStory():e.prevStory(),s(-1)})(i,r)}));return{nextFlippingStoryIndex:r,nextStory:l,prevStory:d,navigateStory:a}},Nu=e=>{const{storyReaderOptions:t,commonOptions:i,goodsWidgetOptions:r}=Hu(),[s,n]=xd([Jt,ti]),{isOpened:o,sharePanelOpeningParams:a,handleShareComplete:l}=(()=>{const{isOpened:e,id:t,type:i,link:r,text:s}=xd(Ci);return{isOpened:e,sharePanelOpeningParams:{shareId:t,shareType:i,shareLink:r,shareText:s},handleShareComplete:e=>{mi(),Nt.emit(`${mr.name}.shareComplete`,{shareId:t,result:e}),Ai()},closeSharePanel:()=>{mi(),Ai()}}})(),d=ju(e.storyReaderViewModel),c=Bu(e.storyReaderViewModel,d.api),{actionPanelHeight:u,safeAreaFrameCalculator:h,isMobileGeometry:p,storyGeometry:f,correctionPaddingStyle:g}=jd(e.viewport),v=e.storyReaderViewModel.activeStory;return(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsxs)("div",{className:Ma()(Fd.slider3d__wrapper,{[Fd["slider3d__wrapper_swipe-up"]]:n,[Fd._desktop_mode]:!p}),style:Object.assign({WebkitPerspective:`${d.perspective}px`,perspective:`${d.perspective}px`,width:f.getWidth(),backgroundColor:p&&h.shouldBeShownSafeAreaInsets&&"#000"},g),children:[(0,_a.jsx)("div",{className:Fd.slider3d__inner,style:{transform:`translateZ(-${d.depth}px)`},children:(0,_a.jsx)("div",{className:Ma()(Fd["stories-face"],Fd.slider3d__rotater),ref:d.ref,children:e.storyReaderViewModel.stories.map(((n,o)=>n.isBlank?(0,_a.jsx)(pu,{style:{bottom:0}},n.id):(0,_a.jsx)(hu,{slideClickDisabled:s||d.animating,index:o,story:n,activeStory:v,nextFlippingStoryIndex:c.nextFlippingStoryIndex,geometry:f,style:{bottom:Pd(n,i)?`${u}px`:0},commonOptions:i,storyReaderOptions:t,goodsWidgetOptions:r,onClose:e.onCloseStory},n.id)))})}),o&&(0,_a.jsx)(cl,{className:Fd["share-panel-wrapper"],shareText:a.shareText,shareType:a.shareType,shareLink:a.shareLink,onShareCompelete:l,sharePanelOptions:t.sharePanel})]}),(0,_a.jsx)(yu,{disabled:d.animating,isNextStoryBlank:e.storyReaderViewModel.reachEnd,isPrevStoryBlank:e.storyReaderViewModel.reachStart,navigationOptions:t.navigation,width:f.calculateWidth(),onNext:c.nextStory,onPrev:c.prevStory})]})},Fu=({storyReaderViewModel:e,desktopMode:t})=>{const i=(()=>{const[e,t]=(0,ka.useState)((()=>Od())),i=(0,ka.useCallback)((()=>{t(Od())}),[]);return(0,ka.useEffect)((()=>(window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)})),[]),e})();(()=>{const e=()=>{"hidden"===document.visibilityState&&ci(),"visible"===document.visibilityState&&ui()};(0,ka.useEffect)((()=>(document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)})),[])})(),(()=>{const{desktopMode:e}=Hu(),[t,i]=xd([ki,ii]),r=(0,ka.useRef)();(0,ka.useEffect)((()=>(r.current=new Td,()=>{var e;null===(e=r.current)||void 0===e||e.destroy()})),[]),(0,ka.useEffect)((()=>{const s=r.current;s&&(e||t||!i?s.disable():s.enable())}),[e,t,i])})(),Yu((()=>{e.close("closeReaderByEscBtn")}));return(0,_a.jsxs)(Dd,{viewport:i,storyReaderViewModel:e,children:[(0,_a.jsx)(Nu,{viewport:i,storyReaderViewModel:e,onCloseStory:()=>{e.close()}}),(0,_a.jsx)(qa,{orientation:aa.PORTRAIT_PRIMARY,desktopMode:t,onOrientationChange:({isWrong:e})=>{e?fi():gi()}})]})};var Uu=u(7314),Vu={insert:"head",singleton:!1};Ea()(Uu.A,Vu);Uu.A.locals;const zu=({storyManager:e,desktopMode:t})=>{const[,i]=(0,ka.useState)(0),[r,s]=(0,ka.useState)(null),n=(()=>{const e=(0,ka.useRef)();return e.current||(e.current=(()=>{const e=getComputedStyle(document.documentElement),t=t=>parseFloat(e.getPropertyValue(t)),i=t("--ias-sat"),r=t("--ias-sab");return{left:t("--ias-sal"),right:t("--ias-sar"),top:i,bottom:r}})()),e.current})(),o=()=>requestAnimationFrame((()=>i((e=>++e))));return(0,ka.useEffect)((()=>{const t=new na(e).create();return t.setSafeAreaInsets(n),t.on("update",o),s(t),e.setViewModel(sa.name,t),()=>{e.deleteViewModel(sa.name),t.destroy()}}),[e]),(0,ka.useEffect)((()=>{null==r||r.setDesktopMode(t)}),[r,t]),r},Gu=La().createContext({dir:"ltr",storyManager:Jo,desktopMode:!1,commonOptions:$,storyReaderOptions:re,gameReaderOptions:ce,goodsWidgetOptions:de});let Wu=!1;const $u=e=>{Zu(e.config),Xu(e);const{commonOptions:t,gameReaderOptions:i,storyReaderOptions:r,goodsWidgetOptions:s}=Ju(e),n=Ku(),o=(({storyManager:e})=>{const[,t]=(0,ka.useState)(0),[i,r]=(0,ka.useState)(null),s=()=>requestAnimationFrame((()=>t((e=>++e))));return(0,ka.useEffect)((()=>{const t=new lo(e).create();return t.on("update",s),r(t),e.setViewModel(ao.name,t),()=>{e.deleteViewModel(ao.name),t.destroy()}}),[e]),i})({storyManager:Jo}),a=zu({storyManager:Jo,desktopMode:n});(0,ka.useEffect)((()=>{if(Wu)throw new Error("There can only be one instance of <IASContainer /> per application");return Wu=!0,()=>{Wu=!1}}),[]);const l=getComputedStyle(document.documentElement).direction;return(0,_a.jsxs)(Gu.Provider,{value:{storyManager:Jo,desktopMode:n,dir:l,commonOptions:t,gameReaderOptions:i,storyReaderOptions:r,goodsWidgetOptions:s},children:[(null==a?void 0:a.isOpened)&&(0,_a.jsx)(Sl,{gameReaderViewModel:a}),(null==o?void 0:o.activeStory)&&(0,_a.jsx)(Fu,{storyReaderViewModel:o,desktopMode:n}),e.children]})},Hu=()=>(0,ka.useContext)(Gu);var qu=u(3643);const Qu=u.n(qu)().getParser(window.navigator.userAgent).parse(),Ku=()=>{const[e,t]=(0,ka.useState)(!1);(0,ka.useLayoutEffect)((()=>(i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)})),[]);const i=()=>{"mobile"===Qu.parsedResult.platform.type?t(!1):t(!0)};return e},Yu=e=>{const t=t=>{t.keyCode===ys.esc&&e()};(0,ka.useEffect)((()=>(window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)})),[])},Zu=e=>{(0,ka.useEffect)((()=>{e.lang&&Jo.setLang(e.lang)}),[e.lang]),(0,ka.useEffect)((()=>{Jo.setApiKey(e.apiKey)}),[e.apiKey]),(0,ka.useEffect)((()=>{e.userId&&Jo.setUserId(e.userId)}),[e.userId]),(0,ka.useEffect)((()=>{e.tags&&Jo.setTags(e.tags)}),[JSON.stringify(e.tags)]),(0,ka.useEffect)((()=>{e.placeholders&&Jo.setPlaceholders(e.placeholders)}),[JSON.stringify(e.placeholders)]),(0,ka.useEffect)((()=>{e.imagePlaceholders&&Jo.setImagePlaceholders(e.imagePlaceholders)}),[JSON.stringify(e.imagePlaceholders)]),(0,ka.useEffect)((()=>{Jo.setConfig(e)}),[])},Xu=({onClickOnStory:e,onShowStory:t,onCloseStory:i,onShowSlide:r,onClickOnButton:s,onLikeStory:n,onDislikeStory:o,onFavoriteStory:a,onShareStory:l,onShareStoryWithPath:d,onFeedImpression:c,onVisibleAreaUpdated:u,onWidgetEvent:h})=>{(0,ka.useEffect)((()=>(e&&Jo.on("clickOnStory",e),t&&Jo.on("showStory",t),i&&Jo.on("closeStory",i),r&&Jo.on("showSlide",r),s&&Jo.on("clickOnButton",s),n&&Jo.on("likeStory",n),o&&Jo.on("dislikeStory",o),a&&Jo.on("favoriteStory",a),l&&Jo.on("shareStory",l),d&&Jo.on("shareStoryWithPath",d),c&&Jo.on("feedImpression",c),u&&Jo.on("visibleAreaUpdated",u),h&&Jo.on("widgetEvent",h),()=>{e&&Jo.off("clickOnStory",e),t&&Jo.off("showStory",t),i&&Jo.off("closeStory",i),r&&Jo.off("showSlide",r),s&&Jo.off("clickOnButton",s),n&&Jo.off("likeStory",n),o&&Jo.off("dislikeStory",o),a&&Jo.off("favoriteStory",a),l&&Jo.off("shareStory",l),d&&Jo.off("shareStoryWithPath",d),c&&Jo.off("feedImpression",c),u&&Jo.off("visibleAreaUpdated",u),h&&Jo.off("widgetEvent",h)})),[e,t,i,r,s,n,o,a,l,d,c,u,h])},Ju=({commonOptions:e,gameReaderOptions:t,storyReaderOptions:i,goodsWidgetOptions:r})=>{const s=(0,ka.useRef)(new ue).current,n=(0,ka.useMemo)((()=>(e&&s.setCommonOptions(e),s.commonOptions)),[JSON.stringify(e)]),o=(0,ka.useMemo)((()=>(t&&s.setGameReaderOptions(t),s.gameReaderOptions)),[JSON.stringify(t)]),a=(0,ka.useMemo)((()=>(r&&s.setGoodsWidgetOptions(r),s.goodsWidgetOptions)),[JSON.stringify(r),null==r?void 0:r.itemClickHandler,null==r?void 0:r.openGoodsWidgetHandler]);return{commonOptions:n,gameReaderOptions:o,storyReaderOptions:(0,ka.useMemo)((()=>(i&&s.setStoryReaderOptions(i),s.storyReaderOptions)),[JSON.stringify(i)]),goodsWidgetOptions:a}};var eh=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 th=e=>{var{listType:t,feedSlug:i,testKey:r,storyManager:s,options:n,filter:o,useUgcCard:a=!1,hasFavorite:l,isFavorite:d}=e,c=eh(e,["listType","feedSlug","testKey","storyManager","options","filter","useUgcCard","hasFavorite","isFavorite"]);const u=(0,ka.useRef)(0),[,h]=(0,ka.useState)(0),[p,f]=(0,ka.useState)(),{desktopMode:g}=Hu(),{storyListOptions:v}=(e=>{const t=(0,ka.useRef)(new ue).current;return{storyListOptions:(0,ka.useMemo)((()=>(e&&t.setStoriesListOptions(e),t.storiesListOptions)),[JSON.stringify(e)])}})(n),m=()=>{requestAnimationFrame((()=>h((e=>++e))))},y=()=>{var e;null===(e=c.onLoadStart)||void 0===e||e.call(c)},w=e=>{var t;null===(t=c.onLoadEnd)||void 0===t||t.call(c,e)};return(0,ka.useEffect)((()=>{const e=new mo(s).create();e.on("update",m),e.on("startLoading",y),e.on("endLoading",w),f(e);const t=(u.current++,go.name+u.current);return s.setViewModel(t,e),()=>{s.deleteViewModel(t),e.destroy()}}),[s]),(0,ka.useEffect)((()=>{null==p||p.setParams({listType:t,testKey:r,feedSlug:i,filter:o,useUgcCard:a,isFavorite:d,hasFavorite:l}),d||null==p||p.loadStories({needFavorite:!0})}),[p,r,i,o]),(0,ka.useEffect)((()=>{if(p)return c.onFavoriteCardClick&&p.on("clickOnFavoriteCellInternal",c.onFavoriteCardClick),c.onUgcCardClick&&p.on("clickOnUgcCardCellInternal",c.onUgcCardClick),()=>{c.onFavoriteCardClick&&p.off("clickOnFavoriteCellInternal",c.onFavoriteCardClick),c.onUgcCardClick&&p.off("clickOnUgcCardCellInternal",c.onUgcCardClick)}}),[p,c.onUgcCardClick,c.onFavoriteCardClick]),(0,ka.useEffect)((()=>{p&&(p.modeDesktop=g)}),[g,p]),{storyListViewModel:p,storyListOptions:v}};function ih(e){return!/^(-?\d|--)/.test(e)}function rh(e){const t=[];let i="",r="",s=7;for(let n,o=0;n=e.charAt(o);o++)if(/[a-zA-Z\d\xa0-\uffff_-]/.test(n)&&7===s)i+=n;else if("\\"===n&&7===s)s=6;else if(" "===n&&7===s){if(""!==i){if(!ih(i))return null;t.push(i),i=""}}else if(6===s)/[0-9a-f]/i.test(n)?(r+=n,s=8):(i+=n,s=7);else{if(8!==s)return null;/[0-9a-f]/i.test(n)&&r.length<6?r+=n:(i+=String.fromCodePoint(parseInt(r,16)),i+=n,r="",s=7)}if(""!==i){if(!ih(i))return null;t.push(i)}return t.join(" ")}function sh(e,t){let i=t,r="";const s={"font-family":[]};for(let t,n=0;t=e.charAt(n);n+=1)if(4!==i||'"'!==t&&"'"!==t)if(3===i&&","===t)i=4,r="";else if(4===i&&","===t){const e=rh(r);e&&s["font-family"].push(e),r=""}else if(5===i&&" "===t)/^(?:\+|-)?(?:[0-9]*\.)?[0-9]+(?:deg|grad|rad|turn)$/.test(r)?(s["font-style"]+=" "+r,r=""):n-=1,i=1;else if(1!==i||" "!==t&&"/"!==t)2===i&&" "===t?(/^(?:\+|-)?([0-9]*\.)?[0-9]+(?:em|ex|ch|rem|vh|vw|vmin|vmax|px|mm|cm|in|pt|pc|%)?$/.test(r)&&(s["line-height"]=r),i=4,r=""):r+=t;else{if(/^(?:(?:xx|x)-large|(?:xx|s)-small|small|large|medium)$/.test(r)||/^(?:larg|small)er$/.test(r)||/^(?:\+|-)?(?:[0-9]*\.)?[0-9]+(?:em|ex|ch|rem|vh|vw|vmin|vmax|px|mm|cm|in|pt|pc|%)$/.test(r))i="/"===t?2:4,s["font-size"]=r;else if(/^italic$/.test(r))s["font-style"]=r;else if(/^oblique$/.test(r))s["font-style"]=r,i=5;else if(/^small-caps$/.test(r))s["font-variant"]=r;else if(/^(?:bold(?:er)?|lighter|normal)$/.test(r))s["font-weight"]=r;else if(/^[+-]?(?:[0-9]*\.)?[0-9]+(?:e[+-]?(?:0|[1-9][0-9]*))?$/.test(r)){const e=parseFloat(r);e>=1&&e<=1e3&&(s["font-weight"]=r)}else/^(?:(?:ultra|extra|semi)-)?(?:condensed|expanded)$/.test(r)&&(s["font-stretch"]=r);r=""}else{let o=n+1;do{if(o=e.indexOf(t,o)+1,!o)return null}while("\\"===e.charAt(o-2));s["font-family"].push(e.slice(n+1,o-1).replace(/\\('|")/g,"$1")),n=o-1,i=3,r=""}if(3===i&&!/^\s*$/.test(r))return null;if(4===i){const e=rh(r);e&&s["font-family"].push(e)}return s}var nh=u(9780),oh=u.n(nh);class ah{toString(){return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${this.fontSize}px/${this.lineHeight} ${this.fontFamily.join(", ")}`}clone(){const e=new ah;return e.fontStyle=this.fontStyle,e.fontVariant=this.fontVariant,e.fontWeight=this.fontWeight,e.fontSize=this.fontSize,e.lineHeight=this.lineHeight,e.fontFamily=this.fontFamily.slice(),e}}class lh{constructor(e,t){this.obj=e,this.cardTitleOptions=t,this.cardTitleFont=this.getCardTitleParsedFont(t.font)}getCardTitleFont(){return this.cardTitleFont.clone()}getScaledFontSizeInWebView(){const e=this.measureScaledFontSizeInWebView(this.cardTitleFont.fontSize)/this.cardTitleFont.fontSize;return this.cardTitleFont.fontSize/e}getStoryTitleBlockHeight(){if(!this.isOutsideTitle())return 0;const e=this.cardTitleOptions.padding,t={top:0,bottom:0};try{if("number"==typeof e)t.top=e,t.bottom=e;else{const i=oh()(e);t.top=parseFloat(i.top),t.bottom=parseFloat(i.bottom)}}catch(e){console.error(e)}const i=this.cardTitleOptions.lineClamp,r=Math.round(this.cardTitleFont.fontSize*this.cardTitleFont.lineHeight*100)/100;return t.top+t.bottom+i*r}measureScaledFontSizeInWebView(e){const t=document.createElement("span");t.style.fontSize=e+"px",t.style.display="none",this.obj.append(t);const i=getComputedStyle(t).fontSize;return this.obj.removeChild(t),parseFloat(i)||e}isOutsideTitle(){return this.cardTitleOptions.display&&(this.cardTitleOptions.position===K.CARD_OUTSIDE_TOP||this.cardTitleOptions.position===K.CARD_OUTSIDE_BOTTOM)}getCardTitleParsedFont(e){const t=new ah;t.fontStyle="normal",t.fontVariant="normal",t.fontWeight="normal",t.fontSize=14,t.lineHeight=1.2,t.fontFamily=["system-ui",'"Segoe UI"',"Roboto","Helvetica","Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'];try{const i=function(e){const t=sh(e,1);return null!==t&&t["font-size"]&&t["font-family"].length?t:null}(e);if(null!=i["font-style"]&&(t.fontStyle=i["font-style"]),null!=i["font-variant"]&&(t.fontVariant=i["font-variant"]),null!=i["font-weight"]&&(t.fontWeight=i["font-weight"]),null!=i["font-size"]){const e=parseFloat(i["font-size"]);String(`${e}px`)===i["font-size"]&&(t.fontSize=e)}if(null!=i["line-height"]){const e=parseFloat(i["line-height"]);String(`${e}px`)===i["line-height"]?t.lineHeight=Math.round(e/t.fontSize*100)/100:String(e)===i["line-height"]&&(t.lineHeight=parseFloat(i["line-height"]))}null!=i["font-family"]&&Array.isArray(i["font-family"])&&(t.fontFamily=i["font-family"])}catch(e){console.error(e)}return t}}class dh{constructor(e){this.storiesListOptions=e}getStoriesListStyleOptions(e){var t,i,r,s,n,o;const a={storiesHeight:null!==(i=null===(t=this.storiesListOptions.card)||void 0===t?void 0:t.height)&&void 0!==i?i:70,storiesLayoutHeight:null!==(s=null===(r=this.storiesListOptions.layout)||void 0===r?void 0:r.height)&&void 0!==s?s:0,storiesListTopPadding:null!==(n=this.storiesListOptions.topPadding)&&void 0!==n?n:0,storiesListBottomPadding:null!==(o=this.storiesListOptions.bottomPadding)&&void 0!==o?o:0};let l=parseFloat(a.storiesHeight),d=l;if(parseFloat(a.storiesLayoutHeight))return l=parseFloat(a.storiesLayoutHeight),{storiesListHeight:l,storiesListInnerHeight:d};return l+=parseFloat(a.storiesListTopPadding)+parseFloat(a.storiesListBottomPadding)+e,d+=e,{storiesListHeight:l,storiesListInnerHeight:d}}}const ch=(e,t)=>{const{dir:i,desktopMode:r}=Hu(),[s,n]=(0,ka.useState)(!1),[o,a]=(0,ka.useState)(null),{ref:l}=(e=>{const t=(0,ka.useRef)(null);return(0,ka.useEffect)((()=>{if(!t.current)return;const i=new Fo;return i.mount(t.current),e(i),()=>{i.destroy()}}),[]),{ref:t}})((e=>{a(e),e.on("scrollstart",(()=>n(!0))),e.on("scrollend",(()=>setTimeout((()=>n(!1)),100)))}));(0,ka.useEffect)((()=>{o&&(o.setGap(e.card.gap),o.setDesktopMode(r),o.changeDirection(e.direction))}),[o,e.card.gap,r,e.direction]),(0,ka.useEffect)((()=>{o&&(o.setTextDirection(i),o.scrollTo(0,0))}),[o,i]);const d=(0,ka.useCallback)(Po()((()=>{null==o||o.testAttraction(),null==o||o.emit("scroll")}),0),[o,t]);return(0,ka.useEffect)((()=>(null==o||o.scrollTo(0,0),d(),window.addEventListener("resize",d),()=>{window.addEventListener("resize",d)})),[o,d]),{sliderRef:l,slider:o,isScrolling:s}};var uh=u(1938),hh={insert:"head",singleton:!1};Ea()(uh.A,hh);const ph=uh.A.locals||{},fh=({slider:e,storyListViewModel:t,storyListOptions:i,isFavorite:r,listType:s,feed:n,filter:o,storyManager:a})=>{const l=(({storyManager:e,listType:t,feed:i,filter:r})=>{const[s,n]=(0,ka.useState)();return(0,ka.useEffect)((()=>{const s=new Mo(e,{listType:t,feed:i,filter:r}).create();return n(s),()=>{s.destroy()}}),[i,JSON.stringify(r)]),s})({listType:s,feed:n,filter:o,storyManager:a}),d=(0,ka.useCallback)(Po()((()=>{if(!e||!l)return;const{x:t,y:i}=e.getCurrentPosition();l.calculate(t,i)}),300),[e,l]),c=(0,ka.useCallback)((()=>{if(!e||!l)return;const t=e.elementRef.getBoundingClientRect(),i=new So(t.left,t.top,t.width,t.height),r=Array.from(e.slides),s=new So(0,0,window.innerWidth,window.innerHeight),n=u();l.updateGeometry({stories:r,storyListRect:i,windowRect:s,viewportPadding:n}),d()}),[e,l,d]);(0,ka.useEffect)((()=>{if(!e||r||!l)return;const t=l.startScroll.bind(l),i=l.endScroll.bind(l);return e.addListener("scrollstart",t),e.addListener("scrollend",i),window.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{e.removeListener("scrollstart",t),e.removeListener("scrollend",i),window.removeEventListener("scroll",c),window.removeEventListener("resize",c)}}),[e,r,c]),(0,ka.useEffect)((()=>{r||c()}),[i.direction,i.card.aspectRatio,i.card.height,t.defaultStories.length,r,c]),(0,ka.useEffect)((()=>{if(!l)return;const e=e=>l.markStoryAsFullVisible(e);return t.on("openStory",e),()=>{t.off("openStory",e)}}),[l,t]);const u=()=>{const e=i.sidePadding,t={left:e,right:e,top:i.topPadding,bottom:i.bottomPadding};return"vertical"===i.direction&&(t.left=0,t.right=0),t}},gh=(e,t,i,r)=>{const{dir:s}=Hu();(0,ka.useEffect)((()=>{if(e)return t.on("closeStory",n),()=>{t.off("closeStory",n)}}),[e]);const n=t=>{if(!e)return;const n=((e,t)=>e.slides.find((e=>Number(e.dataset.id)===t)))(e,t);if(!n)return;const o=(e=>{const{x:t,y:i}=e.getCurrentPosition(),s=r.current.getBoundingClientRect();return new So(s.x+t,s.y+i,s.width,s.height)})(e),a=((e,t)=>new So("ltr"===s?e.offsetLeft:t.width-e.offsetLeft-e.clientWidth,e.offsetTop,e.clientWidth,e.clientHeight))(n,o);if(a.overlaps(o))return;const l="horizontal"===i.direction?a.x:n.offsetTop;e.scrollTo(l)}},vh=(0,ka.forwardRef)(((e,t)=>{const i=e.sliderOptions.card,r=e.sliderOptions.favoriteCard,s=i.border,n=i.opened.border,o=e.sliderOptions.navigation,a=()=>{var e,t,i;return(null!==(e=n.radius)&&void 0!==e?e:s.radius)-parseFloat(null!==(t=n.width)&&void 0!==t?t:s.width)-parseFloat(null!==(i=n.gap)&&void 0!==i?i:s.gap)};return(0,_a.jsx)("div",{dir:e.dir,ref:t,className:e.className,style:Object.assign(Object.assign({},(()=>{var t,l,d,c,u,h,p,f,g,v,m,y,w,S,b,x,_,C,k,L,A;const M=e=>{let t="";return null!=e&&Array.isArray(e.linearGradient)&&(t=e.linearGradient.map((({direction:e,points:t})=>`linear-gradient(${[e,t].filter(Boolean).join(", ")})`)).join(", ")),t},O={"--storiesBorderNotReadColor":s.color,"--storiesBorderReadColor":null!==(t=n.color)&&void 0!==t?t:s.color,"--storiesBorderNotReadGradientColor":null==s?void 0:s.gradient,"--storiesBorderReadGradientColor":null!==(l=null==n?void 0:n.gradient)&&void 0!==l?l:null==s?void 0:s.gradient,"--storiesListCardFavoriteGradientColor":null===(d=e.sliderOptions.favoriteCard.border)||void 0===d?void 0:d.gradient,"--storiesListCardUgcGradientColor":null===(c=e.sliderOptions.ugcCard.border)||void 0===c?void 0:c.gradient,"--storiesGap":i.gap+"px","--storiesHeight":i.height+"px","--storiesListSidePadding":e.sliderOptions.sidePadding+"px","--storiesListBorderNotReadWidth":s.width+"px","--storiesListBorderReadWidth":(null!==(u=n.width)&&void 0!==u?u:n.width)+"px","--storiesListBorderGapNotRead":s.gap+"px","--storiesListBorderGapRead":(null!==(h=n.gap)&&void 0!==h?h:n.gap)+"px","--storiesListBorderRadius":s.radius+"px","--storiesListBorderRadiusRead":(null!==(p=n.radius)&&void 0!==p?p:n.radius)+"px","--storiesListItemMaskColor":i.mask.color,"--storiesListItemOpenedMaskColor":null!==(f=i.opened.mask.color)&&void 0!==f?f:i.mask.color,"--storiesListItemMaskLinearGradient":M(i.mask),"--storiesListItemOpenedMaskLinearGradient":M(null!=(null===(v=null===(g=i.opened)||void 0===g?void 0:g.mask)||void 0===v?void 0:v.linearGradient)?i.opened.mask:i.mask),"--storiesListCardFavoriteTitle":Ms(r.title.padding.toString())?r.title.padding+"px":r.title.padding,"--storiesListCardFavoriteGap":Ms(r.gap.toString())?r.gap+"px":r.gap,"--storiesListCardUgcMaskColor":e.sliderOptions.ugcCard.mask.color,"--storiesListCardUgcMaskLinearGradient":M(e.sliderOptions.ugcCard.mask),"--storiesListItemTitleFontFamily":"InternalPrimaryFont","--storiesListItemTitleFont":i.title.font,"--storiesListItemTitlePadding":Ms(i.title.padding.toString())?i.title.padding+"px":i.title.padding,"--storiesListControlsSize":Ms(o.controlsSize.toString())?o.controlsSize+"px":o.controlsSize,"--storiesListControlsBackgroundColor":o.controlsBackgroundColor,"--storiesListControlsColor":o.controlsColor,"--storiesListInnerBorderRadiusNotRead":s.radius-parseFloat(s.width)-parseFloat(s.gap)+"px","--storiesListInnerBorderRadiusRead":a()+"px","--storiesListCardDropShadow":i.dropShadow,"--storiesListCardOpenedDropShadow":null!==(m=i.opened.dropShadow)&&void 0!==m?m:i.dropShadow,"--storiesListCardFavoriteDropShadow":e.sliderOptions.favoriteCard.dropShadow,"--storiesListCardUgcDropShadow":e.sliderOptions.ugcCard.dropShadow,"--storiesListCardMask":(null===(y=i.svgMask)||void 0===y?void 0:y.cardMask)?`url("data:image/svg+xml,${ms(null===(w=i.svgMask)||void 0===w?void 0:w.cardMask)}")`:null,"--storiesListCardOpenedMask":(null===(S=i.opened.svgMask)||void 0===S?void 0:S.cardMask)?`url("data:image/svg+xml,${ms(null===(b=i.opened.svgMask)||void 0===b?void 0:b.cardMask)}")`:null,"--storiesListCardFavoriteMask":(null===(x=e.sliderOptions.ugcCard.svgMask)||void 0===x?void 0:x.cardMask)?`url("data:image/svg+xml,${ms(null===(_=e.sliderOptions.ugcCard.svgMask)||void 0===_?void 0:_.cardMask)}")`:null};let E=null;return E=null===(C=i.svgMask)||void 0===C?void 0:C.overlayMask,null!=E&&Array.isArray(E)&&E.forEach(((e,t)=>O[`--storiesListCardOverlay${t}Mask`]=e.mask?`url("data:image/svg+xml,${ms(e.mask)}")`:null)),E=null===(k=i.opened.svgMask)||void 0===k?void 0:k.overlayMask,null!=E&&Array.isArray(E)&&E.forEach(((e,t)=>O[`--storiesListCardOpenedOverlay${t}Mask`]=e.mask?`url("data:image/svg+xml,${ms(e.mask)}")`:null)),E=null===(L=e.sliderOptions.favoriteCard.svgMask)||void 0===L?void 0:L.overlayMask,null!=E&&Array.isArray(E)&&E.forEach(((e,t)=>O[`--storiesListCardFavoriteOverlay${t}Mask`]=e.mask?`url("data:image/svg+xml,${ms(e.mask)}")`:null)),E=null===(A=e.sliderOptions.ugcCard.svgMask)||void 0===A?void 0:A.overlayMask,null!=E&&Array.isArray(E)&&E.forEach(((e,t)=>O[`--storiesListCardUgcOverlay${t}Mask`]=e.mask?`url("data:image/svg+xml,${ms(e.mask)}")`:null)),O})()),e.style),children:e.children})})),mh=navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS"),yh=({videoCoverSrc:e,onVideoCoverLoaded:t})=>{const i=(0,ka.useRef)(null);return(0,ka.useEffect)((()=>{(()=>{if(!e)return;const r=i.current,s=()=>{r.play().then((()=>{if(mh){let e=1;const i=()=>{e>=2&&(r.removeEventListener("timeupdate",i),r.currentTime=0,t()),e++};r.addEventListener("timeupdate",i,!1)}else t()})).catch((e=>{console.error(e)})),r.removeEventListener("canplaythrough",s)};r.addEventListener("canplaythrough",s),r.load()})()}),[]),(0,_a.jsx)("video",{ref:i,src:e,loop:!0,muted:!0,playsInline:!0,"webkit-playsinline":"true",preload:"auto"})},wh=({story:e,cardOptions:t,favoriteCardOptions:i,ugcCardOptions:r})=>{const s=(e,t)=>null!=t&&Array.isArray(t)?t.map(((t,i)=>n(t,e,i))):[],n=(e,t,i)=>({maskImage:`var(--${t}${i}Mask)`,WebKitMaskImage:`var(--${t}${i}Mask)`,background:e.background});return{getAllCardsOverlayMaskStyles:()=>{let n=[];var o;return e.isFavoriteCard&&(n=n.concat(s("storiesListCardFavoriteOverlay",null===(o=i.svgMask)||void 0===o?void 0:o.overlayMask))),n=e.isUgcCard?n.concat((()=>{var e;return s("storiesListCardUgcOverlay",null===(e=r.svgMask)||void 0===e?void 0:e.overlayMask)})()):e.isOpened?n.concat((()=>{var e;return s("storiesListCardOpenedOverlay",null===(e=t.opened.svgMask)||void 0===e?void 0:e.overlayMask)})()):n.concat((()=>{var e;return s("storiesListCardOverlay",null===(e=t.svgMask)||void 0===e?void 0:e.overlayMask)})()),n}}};var Sh=u(2811),bh={insert:"head",singleton:!1};Ea()(Sh.A,bh);const xh=Sh.A.locals||{},_h=({story:e,cardOptions:t,favoriteCardOptions:i,ugcCardOptions:r,isScrolling:s,wrapperStyle:n,children:o,onClick:a})=>{const l={story:e,cardOptions:t,favoriteCardOptions:i,ugcCardOptions:r},[d,c]=(0,ka.useState)(!1),{getAllCardsOverlayMaskStyles:u}=wh(l),{getCardTitleAlignClass:h,getTitleStyle:p,getTitleWrapperStyle:f}=(({story:e,cardOptions:t,favoriteCardOptions:i,ugcCardOptions:r})=>{const{dir:s}=Hu();return{getCardTitleAlignClass:()=>{const e=t.title.textAlign,i=e===Q.START||e===Q.LEFT,r=e===Q.END||e===Q.RIGHT,n="ltr"===s;return{[xh["align-left"]]:i&&n||r&&!n,[xh["align-center"]]:e===Q.CENTER,[xh["align-right"]]:r&&n||i&&!n}},getTitleStyle:()=>{const i={};return e.titleColor&&t.title.position===K.CARD_INSIDE_BOTTOM&&Object.assign(i,{color:e.titleColor}),i.WebkitLineClamp=String(parseInt(t.title.lineClamp)),i},getTitleWrapperStyle:()=>{let t={};return e.titleColor&&e.isFavoriteCard&&(t=Object.assign(Object.assign({},t),{color:i.title.color})),e.titleColor&&e.isUgcCard&&(t=Object.assign(Object.assign({},t),{color:r.title.color})),t}}})(l),{getSlideClassList:g,getSlideStyleList:v,getSlideWrapperStyle:m}=(({story:e,cardOptions:t,favoriteCardOptions:i,ugcCardOptions:r})=>{var s;const n=null!==(s=t.aspectRatio)&&void 0!==s?s:e.getAspectRatio(t.variant);return{getSlideClassList:()=>{var s,n;const o=e.background;let a="";void 0!==o&&(a=xh[`_background-color-${o.color}`+(!0===o.gradient?"-gradient":"")]);const l=(()=>{let s;return s=e.isFavoriteCard?i:e.isUgcCard?r:e.isOpened&&t.opened||t,s})(),d=Boolean(l.dropShadow),c=Boolean(null===(s=l.svgMask)||void 0===s?void 0:s.cardMask),u=Boolean(null===(n=l.border)||void 0===n?void 0:n.gradient);return[a,{[xh["_is-read"]]:e.isOpened},{[xh["_format-rectangle"]]:t.variant===se.STYLE_RECTANGLE},{[xh["_format-circle"]]:t.variant===se.STYLE_CIRCLE},{[xh["_format-quad"]]:t.variant===se.STYLE_QUAD},{[xh["_favorite-cell"]]:e.isFavoriteCard},{[xh["_ugc-cell"]]:e.isUgcCard},{[xh["_has-drop-shadow"]]:d},{[xh["_has-card-svg-mask"]]:c},{[xh["_has-border-gradient-color"]]:u}]},getSlideStyleList:()=>{const i={width:n*t.height+"px",opacity:null!==t.opacity?t.opacity:1,boxShadow:t.boxShadow||"unset",height:`${t.height}px`};return e.isOpened&&(i.boxShadow=t.opened.boxShadow||i.boxShadow,i.opacity=null!==t.opened.opacity?t.opened.opacity:i.opacity),i},getSlideWrapperStyle:()=>{const e={};return e.width=n*t.height+"px",e}}})(l),y=e.getImageSrcByCoverQuality(t.coverQuality),w=t.title.position===K.CARD_INSIDE_BOTTOM,S=t.title.position===K.CARD_OUTSIDE_TOP,b=t.title.position===K.CARD_OUTSIDE_BOTTOM;return(0,_a.jsxs)("a",{"data-id":e.id,className:Ma()(xh["stories-slide-wrapper"],{[xh.isTitleCardOutsideTop]:S,[xh.isTitleCardOutsideBottom]:b}),style:Object.assign(Object.assign({},m()),n),rel:"noreferrer",onClick:t=>{t.stopPropagation(),t.preventDefault(),s||a(e)},children:[t.title.display&&S&&(0,_a.jsx)("div",{className:Ma()(xh["stories-slide__content"],xh.__position_outside_top),style:f(),children:(0,_a.jsx)("div",{className:Ma()(xh["stories-slide__title"],xh.clamp,h()),style:p(),children:e.title})}),(0,_a.jsxs)("div",{className:Ma()(xh["stories-slide"],g()),style:v(),children:[(0,_a.jsxs)("div",{className:xh["stories-slide__inner"],children:[(0,_a.jsx)("div",{className:xh["stories-slide-image"],style:{backgroundColor:e.backgroundColor?e.backgroundColor:"transparent"},children:(0,_a.jsx)("div",{className:xh["stories-slide-image__wrap"],children:(0,_a.jsxs)("div",{className:Ma()(xh["stories-slide-image__image"],xh._mode_list,{[xh["video-loaded"]]:d,[xh["ugc-card-cell"]]:e.isUgcCard}),children:[y&&(0,_a.jsx)("img",{src:y,alt:e.title,loading:t.coverLazyLoading?"lazy":"eager"}),e.videoCoverSrc&&(0,_a.jsx)(yh,{onVideoCoverLoaded:()=>c(!0),videoCoverSrc:e.videoCoverSrc}),o]})})}),(0,_a.jsx)("div",{className:xh["stories-slide__mask"]}),t.title.display&&w&&(0,_a.jsx)("div",{className:xh["stories-slide__content"],style:f(),children:(0,_a.jsx)("div",{className:Ma()(xh["stories-slide__title"],xh.clamp,h()),style:p(),children:e.title})})]}),u().map(((e,t)=>(0,_a.jsx)("div",{style:e,className:xh["card-overlay-svg-mask"]},t)))]}),t.title.display&&b&&(0,_a.jsx)("div",{className:Ma()(xh["stories-slide__content"],xh.__position_outside_bottom),style:f(),children:(0,_a.jsx)("div",{className:Ma()(xh["stories-slide__title"],xh.clamp,h()),style:p(),children:e.title})})]})};var Ch=u(2731),kh={insert:"head",singleton:!1};Ea()(Ch.A,kh);const Lh=Ch.A.locals||{};var Ah=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 Mh=e=>{var{sliderDirection:t,slider:i}=e,r=Ah(e,["sliderDirection","slider"]);const[s,n]=(0,ka.useState)(!0),[o,a]=(0,ka.useState)(!1),l=r.navigationOptions.speed;(0,ka.useEffect)((()=>(i.on("scroll",d),()=>{i.off("scroll",d)})),[i]);const d=()=>{n(i.reachBeginning),a(i.reachEnd)};return r.navigationView?r.navigationView({dir:r.dir,defaultStyles:Lh,reachStart:s,reachEnd:o,onPrev:()=>i.scrollByDirection(-1,l),onNext:()=>i.scrollByDirection(1,l),slider:{direction:t,viewport:i.elementRef.getBoundingClientRect()}}):r.navigationOptions.showControls?(0,_a.jsxs)("div",{className:Ma()(Lh["stories-list-controls"],Lh[t]),children:[(0,_a.jsx)("div",{onClick:()=>i.scrollByDirection(-1,l),className:Ma()(Lh["control-start"],{[Lh["control-start_dir_rtl"]]:"rtl"===r.dir,[Lh["control-start_reach-start"]]:s}),children:(0,_a.jsx)("div",{className:Lh["control-icon"]})}),(0,_a.jsx)("div",{onClick:()=>i.scrollByDirection(1,l),className:Ma()(Lh["control-end"],{[Lh["control-end_dir_rtl"]]:"rtl"===r.dir,[Lh["control-end_reach-end"]]:o}),children:(0,_a.jsx)("div",{className:Lh["control-icon"]})})]}):null};var Oh=u(7533),Eh={insert:"head",singleton:!1};Ea()(Oh.A,Eh);const Ih=Oh.A.locals||{},Th=({favoriteStories:e,cardOptions:t,favoriteCardOptions:i})=>{const r=e=>{var i;return{paddingTop:1/(null!==(i=t.aspectRatio)&&void 0!==i?i:e.getAspectRatio(t.variant))*100+"%"}},s=e=>{const t=e.getImageSrcByCoverQuality(i.coverQuality),r={};return t?r.backgroundImage=`url('${t}')`:r.backgroundColor=e.backgroundColor,r};return(0,_a.jsx)("div",{className:Ih["favorite-images-wrapper"],children:e.slice(0,4).map(((e,i)=>(0,_a.jsx)("div",{className:Ih["favorite-image-wrapper"],children:(0,_a.jsx)("div",{style:r(e),className:Ma()(Ih["favorite-image"],{[Ih.circle_style]:t.variant===se.STYLE_CIRCLE}),children:(0,_a.jsx)("div",{className:Ih["favorite-image-item"],style:s(e)})})},i)))})};var Rh=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 Ph=(0,ka.forwardRef)(((e,t)=>{var{isFavorite:i=!1,storyListViewModel:r}=e,s=Rh(e,["isFavorite","storyListViewModel"]);const n=(0,ka.useRef)(null),o=(0,ka.useRef)(null);((e,t)=>{(0,ka.useImperativeHandle)(e,(()=>({reload:t.reload.bind(t)})),[t])})(t,r);const a=((e,t)=>{const[i,r]=(0,ka.useState)(t);(0,ka.useLayoutEffect)((()=>{const i=e.current;s(i,t),r(t)}),[JSON.stringify(t)]);const s=(e,t)=>{const i=new lh(e,t.card.title);n(i,t),o(i,t)},n=(e,t)=>{const i=e.getCardTitleFont();i.fontSize=e.getScaledFontSizeInWebView(),t.card.title.font=i.toString()},o=(e,t)=>{const i=new dh(t),{storiesListHeight:r,storiesListInnerHeight:s}=i.getStoriesListStyleOptions(e.getStoryTitleBlockHeight()),n=t.layout.height;t.layout.height=It()(n)?`${r}px`:n};return i})(n,s.storyListOptions),l=(({isFavorite:e,storyListViewModel:t,storyListOptions:i})=>{let r=[];return e?r=t.favoriteStories:(r=t.defaultStories,t.hasFavoriteCard&&r.push(yo.create(t,i.favoriteCard)),t.hasUgcCard&&r.unshift(wo.create(t,i.ugcCard))),r})({isFavorite:i,storyListViewModel:r,storyListOptions:a}),{sliderRef:d,slider:c,isScrolling:u}=ch(a,l.length);fh({slider:c,storyListViewModel:r,storyListOptions:a,isFavorite:i,listType:s.listType,feed:s.feedSlug,filter:s.filter,storyManager:s.storyManager}),((e,t,i)=>{const{desktopMode:r}=Hu();(0,ka.useEffect)((()=>{e&&r&&s(e,i.current)}),[e,r]);const s=(e,i)=>{if(t.layout.sliderAlign!==H.CENTER)return;const r=e.scrollWidth;if(r>0&&r<i.clientWidth){const t=i.clientWidth-r/2;e.scrollTo(t)}}})(c,a,o),gh(c,r,a,o);const{getRootStyle:h,getStoryWrapperStyle:p,viewportInnerClassList:f,viewportInnerStyle:g}=(e=>{const{dir:t,desktopMode:i}=Hu();return{getRootStyle:()=>({"--background-color":e.layout.backgroundColor,paddingLeft:e.sidePadding+"px",paddingRight:e.sidePadding+"px","--storiesListTopPadding":e.topPadding+"px","--storiesListBottomPadding":e.bottomPadding+"px","--storiesListSidePadding":e.sidePadding+"px",backgroundColor:e.layout.backgroundColor}),getStoryWrapperStyle:(t,i)=>{const r={marginRight:"0",paddingLeft:"0",paddingRight:"0"};return"vertical"===e.direction||(t!==i-1?r.marginRight=e.card.gap+"px":r.paddingRight=e.sidePadding+"px",0===t&&(r.paddingLeft=e.sidePadding+"px")),r},viewportInnerClassList:i?Ma()(ph["stories-list__viewport-inner"],ph["mode-desktop"],{[ph["with-list-controls"]]:e.navigation.showControls,[ph.isTitleCardOutsideTop]:e.card.title.position===K.CARD_OUTSIDE_TOP,[ph.isTitleCardOutsideBottom]:e.card.title.position===K.CARD_OUTSIDE_BOTTOM,[ph.isVerticalDirection]:"vertical"===e.direction}):Ma()(ph["stories-list__viewport-inner"],Object.assign(Object.assign({},(()=>{const i=e.layout.sliderAlign,r=i===H.START||i===H.LEFT,s=i===H.END||i===H.RIGHT,n="ltr"===t;return{[ph["align-left"]]:r&&n||s&&!n,[ph["align-center"]]:i===H.CENTER,[ph["align-right"]]:s&&n||r&&!n}})()),{[ph.isTitleCardOutsideTop]:e.card.title.position===K.CARD_OUTSIDE_TOP,[ph.isTitleCardOutsideBottom]:e.card.title.position===K.CARD_OUTSIDE_BOTTOM,[ph.isVerticalDirection]:"vertical"===e.direction})),viewportInnerStyle:{height:e.layout.height,gap:"vertical"===e.direction?`${e.card.gap}px`:0}}})(a),v=a.card,m=a.favoriteCard,y=a.ugcCard;return(0,_a.jsxs)(vh,{className:Ma()(ph["stories-list-wrapper"],{[ph["mode-desktop"]]:r.modeDesktop,[ph["with-list-controls"]]:a.navigation.showControls}),dir:s.dir,style:h(),sliderOptions:a,ref:n,children:[(0,_a.jsx)("div",{className:ph["stories-list"],children:(0,_a.jsx)("div",{ref:o,className:Ma()(ph["stories-list__viewport"],{[ph["mode-desktop"]]:r.modeDesktop}),style:"horizontal"===a.direction?{marginLeft:-a.sidePadding+"px",marginRight:-a.sidePadding+"px"}:{},children:(0,_a.jsx)("div",{ref:d,className:f,style:g,children:l.map(((e,t)=>{var i;const n=e instanceof vo,o=s.storyCardView&&!n;return n&&s.favoriteCardView?(0,_a.jsx)(La().Fragment,{children:s.favoriteCardView(e)},t):(0,_a.jsx)(La().Fragment,{children:o?null===(i=s.storyCardView)||void 0===i?void 0:i.call(s,e):(0,_a.jsx)(_h,{story:e,cardOptions:v,favoriteCardOptions:m,ugcCardOptions:y,wrapperStyle:p(t,l.length),isScrolling:u,onClick:e=>{var i;null===(i=s.onStoryCardClick)||void 0===i||i.call(s,e),r.onStoryClick(e,t)},children:n&&(0,_a.jsx)(Th,{favoriteStories:r.favoriteStories,favoriteCardOptions:a.favoriteCard,cardOptions:v})},t)},t)}))})})}),c&&(0,_a.jsx)(Mh,{dir:s.dir,navigationOptions:a.navigation,navigationView:s.navigationView,sliderDirection:a.direction,storiesLength:l.length,slider:c})]})})),jh=(0,ka.forwardRef)(((e,t)=>{var i,r;const{storyManager:s,dir:n}=Hu(),o=null!==(i=e.feedSlug)&&void 0!==i?i:"default",a=Pe.DEFAULT,{storyListViewModel:l,storyListOptions:d}=th(Object.assign(Object.assign({},e),{storyManager:s,feedSlug:o,listType:a,hasFavorite:Boolean(e.hasFavorite),isFavorite:!1}));return l?(0,_a.jsx)(Ph,Object.assign({},e,{dir:n,storyManager:s,feedSlug:null!==(r=e.feedSlug)&&void 0!==r?r:"default",listType:Pe.DEFAULT,storyListViewModel:l,storyListOptions:d,onStoryCardClick:e.onStoryCardClick,ref:t})):null})),Dh=(0,ka.forwardRef)(((e,t)=>{const{storyManager:i,dir:r}=Hu(),s=Zo,n=Pe.UGC,{storyListViewModel:o,storyListOptions:a}=th(Object.assign(Object.assign({},e),{storyManager:i,feedSlug:s,listType:n,isFavorite:!1,hasFavorite:!1}));return o?(0,_a.jsx)(Ph,Object.assign({},e,{ref:t,dir:r,storyListOptions:a,storyManager:i,listType:Pe.UGC,feedSlug:Zo,storyListViewModel:o,onStoryCardClick:e.onStoryCardClick})):null})),Bh=e=>{const{storyManager:t,dir:i}=Hu(),r="default",s=Pe.DEFAULT,{storyListViewModel:n,storyListOptions:o}=th(Object.assign(Object.assign({},e),{storyManager:t,feedSlug:r,listType:s,isFavorite:!0,hasFavorite:!0}));return n?(0,_a.jsx)(Ph,Object.assign({},e,{storyListOptions:o,storyManager:t,dir:i,feedSlug:r,listType:s,storyListViewModel:n,isFavorite:!0})):null};var Nh=u(2432),Fh={insert:"head",singleton:!1};Ea()(Nh.A,Fh);const Uh=Nh.A.locals||{},Vh=({open:e,options:t,storyListOptions:i,onClose:r})=>{var s,n;const{dir:o}=Hu();(0,ka.useLayoutEffect)((()=>{if(!e)return;const t=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=t}}),[e]);return e?(0,_a.jsx)("div",{className:Uh["favorite-story-list-modal"],style:(()=>{var e,i,r,s;return{"--storiesFavoriteTitleColor":t.title.color,"--storiesFavoriteTitleFontFamily":"InternalPrimaryFont","--storiesFavoriteTitleFont":t.title.font,"--storiesFavoriteTitleBackgroundColor":t.title.backgroundColor,"--storiesFavoriteHeaderTopOffset":parseFloat(null!==(i=null===(e=t.headerTopOffset)||void 0===e?void 0:e.toString())&&void 0!==i?i:"0")+"px","--storiesFavoriteBottomOffset":parseFloat(null!==(s=null===(r=t.bottomOffset)||void 0===r?void 0:r.toString())&&void 0!==s?s:"0")+"px","--storiesFavoriteBackgroundColor":t.backgroundColor}})(),children:(0,_a.jsxs)("div",{className:Uh.container,children:[(0,_a.jsxs)("div",{className:Uh.header,children:[(0,_a.jsx)("p",{className:Uh.title,children:t.title.content}),(0,_a.jsx)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),r()},className:Uh["header__close-btn"],style:(()=>{const e="start"===t.closeButtonPosition||"left"===t.closeButtonPosition,i="ltr"===o;return{[e&&i||!e&&!i?"left":"right"]:"10px"}})(),dangerouslySetInnerHTML:{__html:null!==(n=null===(s=t.closeButton)||void 0===s?void 0:s.svgSrc.baseState)&&void 0!==n?n:""}})]}),(0,_a.jsx)("div",{className:Uh.content,children:(0,_a.jsx)("div",{className:Uh["favorite-story-list"],children:(0,_a.jsx)(Bh,{options:Object.assign(Object.assign(Object.assign({},i),{sidePadding:0}),{direction:Z.COLUMN,layout:{height:"auto"}})})})}),(0,_a.jsx)("div",{className:Uh.footer}),(0,_a.jsx)("div",{className:Uh["bottom-offset"]})]})}):null};var zh=u(9514);const Gh=({storyList:e,onStoryCardClick:t,onFavoriteCardClick:i})=>{const[r,s]=(0,ka.useState)(e.appearanceManager.storiesListOptions),n=(0,ka.useRef)(null);return(0,ka.useEffect)((()=>{e.api=n.current}),[]),(0,ka.useEffect)((()=>(e.appearanceManager.on(V.EVENT_UPDATED_STORIES_LIST_OPTIONS,s),()=>{e.appearanceManager.off(V.EVENT_UPDATED_STORIES_LIST_OPTIONS,s)})),[e.appearanceManager]),(0,zh.createPortal)((0,_a.jsx)(jh,{ref:n,options:r,hasFavorite:e.appearanceManager.commonOptions.hasFavorite,testKey:e.testKey,useUgcCard:e.useUgcCard,feedSlug:e.feedSlug,onLoadStart:()=>{e.emit(X.START_LOADER)},onLoadEnd:t=>{e.emit(X.END_LOADER,t)},onUgcCardClick:()=>{e.ugcCardClickHandler()},onFavoriteCardClick:i,onStoryCardClick:t},e.mountSelector),document.querySelector(e.mountSelector))},Wh=({ugcStoryList:e,onStoryCardClick:t})=>{const[i,r]=(0,ka.useState)(e.appearanceManager.storiesListOptions),s=(0,ka.useRef)(null);return(0,ka.useEffect)((()=>{e.api=s.current}),[]),(0,ka.useEffect)((()=>(e.appearanceManager.on(V.EVENT_UPDATED_STORIES_LIST_OPTIONS,r),()=>{e.appearanceManager.off(V.EVENT_UPDATED_STORIES_LIST_OPTIONS,r)})),[e.appearanceManager]),(0,zh.createPortal)((0,_a.jsx)(Dh,{ref:s,options:i,testKey:e.testKey,useUgcCard:e.useUgcCard,onStoryCardClick:t,onLoadStart:()=>{e.emit(X.START_LOADER)},onLoadEnd:t=>{e.emit(X.END_LOADER,t)},onUgcCardClick:()=>{e.ugcCardClickHandler()}}),document.querySelector(e.mountSelector))},$h=e=>{const[t,i]=(0,ka.useState)(!1);return(0,_a.jsxs)($u,{config:e.storyManagerConfigDto,storyReaderOptions:e.appearanceManager.storyReaderOptions,commonOptions:e.appearanceManager.commonOptions,gameReaderOptions:e.appearanceManager.gameReaderOptions,goodsWidgetOptions:e.appearanceManager.goodsWidgetOptions,children:[e.storyLists.map((t=>(0,_a.jsx)(Gh,{onFavoriteCardClick:()=>{i(!0)},onStoryCardClick:()=>{e.onAppearanceManagerChange(t.appearanceManager)},storyList:t},t.mountSelector))),e.ugcStoryLists.map((t=>(0,_a.jsx)(Wh,{ugcStoryList:t,onStoryCardClick:()=>{e.onAppearanceManagerChange(t.appearanceManager)}},t.mountSelector))),(0,_a.jsx)(Vh,{open:t,onClose:()=>i(!1),options:e.appearanceManager.storyFavoriteReaderOptions,storyListOptions:e.appearanceManager.storiesListOptions})]})};class Hh{constructor(){this.storyLists=[],this.ugcStoryLists=[],this.appearanceManager=new ue,this.createAppRoot(),this.handleAppearanceManagerUpdate=this.handleAppearanceManagerUpdate.bind(this),this.setAppearanceManager=this.setAppearanceManager.bind(this)}setStoryList(e){this.storyLists=e.slice(),this.render()}setUGCStoryList(e){this.ugcStoryLists=e.slice(),this.render()}setStoryManagerConfig(e){this.storyManagerConfigDto=Object.assign(Object.assign({},this.storyManagerConfigDto),e),this.render()}setAppearanceManager(e){this.unscubscribeToAppearanceManagerEvents(),this.appearanceManager=e,this.subscribeToAppearanceManagerEvents(),this.render()}render(){this.root.render((0,_a.jsx)($h,{storyManagerConfigDto:this.storyManagerConfigDto,appearanceManager:this.appearanceManager,ugcStoryLists:this.ugcStoryLists,storyLists:this.storyLists,onAppearanceManagerChange:this.setAppearanceManager}))}createAppRoot(){const e=document.createElement("div");e.id="ias-app",document.body.append(e),this.root=(0,Ca.H)(e)}subscribeToAppearanceManagerEvents(){this.appearanceManager.on(V.UPDATE,this.handleAppearanceManagerUpdate)}unscubscribeToAppearanceManagerEvents(){this.appearanceManager.off(V.UPDATE,this.handleAppearanceManagerUpdate)}handleAppearanceManagerUpdate(){this.render()}}var qh=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 Qh extends G.EventEmitter{constructor(e,t,i,r,s){super(),this.storyManager=i,this.app=r,this.sharePage=null,ya(t),this.showSharePage(e,t,s)}showSharePage(e,t,i){return qh(this,void 0,void 0,(function*(){this.app.setAppearanceManager(t),this.sharePage=yield this.storyManager.showSharePage(e,i)}))}closeStoryReader(){return qh(this,void 0,void 0,(function*(){var e;null===(e=this.sharePage)||void 0===e||e.closeStoryReader()}))}}var Kh=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 Yh extends(W()){constructor(e,t,i,r){super(),this.appearanceManager=e,this.options=t,this.storyManager=i,this.app=r,ya(e),this.handleUpdate=this.handleUpdate.bind(this),this.stackedStoryListViewModel=new Ko(this.storyManager,{feed:t.feed}),this.stackedStoryListViewModel.on(kt.Update,this.handleUpdate)}get stories(){return this.stackedStoryListViewModel.stories}get length(){return this.stackedStoryListViewModel.length}get activeIndex(){return this.stackedStoryListViewModel.activeIndex}get feedCoverSrc(){return this.stackedStoryListViewModel.feedCoverSrc}get top(){return this.stackedStoryListViewModel.top}reload(){return Kh(this,void 0,void 0,(function*(){return this.stackedStoryListViewModel.reload()}))}destroy(){this.stackedStoryListViewModel.destroy(),this.stackedStoryListViewModel.removeAllListeners()}showStory(e){this.app.setAppearanceManager(this.appearanceManager),this.stackedStoryListViewModel.showStory(e)}on(e,t){return"update"===e?super.on(e,t):(this.stackedStoryListViewModel.on(e,t),this)}once(e,t){return this.stackedStoryListViewModel.once(e,t),this}off(e,t){return this.stackedStoryListViewModel.off(e,t),this}handleUpdate(e){this.emit("update",{id:e.id,title:e.title,titleColor:e.titleColor,hasAudio:e.hasAudio,hasSwipeUp:e.hasSwipeUp,isOpened:e.isOpened,deeplink:e.deeplink,gameInstanceId:e.gameInstanceId,hideInReader:e.hideInReader,hide_timeline:e.hideTimeline,cover:e.getCover(this.appearanceManager.storiesListOptions.card.coverQuality)})}}var Zh=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 Xh{constructor(e){return this.storyManagerConfigDto=e,this.app=new Hh,this.StoriesList=class extends Sa{constructor(e,t,i){super(e,t,i,Xh.instance.app)}},this.UGCStoriesList=class extends xa{constructor(e,t,i){super(e,t,i,Xh.instance.app)}},this.SharePage=class extends Qh{constructor(e,t,i){super(e,t,Jo,Xh.instance.app,i)}},this.StackedStoryList=class extends Yh{constructor(e,t){super(e,t,Jo,Xh.instance.app)}},Xh.instance?(console.warn("StoryManager singleton is created multiple times\nuse IAS.StoryManager.getInstance() instead"),Xh.instance):(Xh.instance=this,this.app.setStoryManagerConfig(e),Xh.instance)}get sdkVersionName(){return Jo.sdkVersionName}get sdkVersionCode(){return Jo.sdkVersionCode}set storyLinkClickHandler(e){Jo.storyLinkClickHandler=e}static getInstance(){return Xh.instance?Xh.instance:null}static use(e,t){Jo.use(e,t)}getConfig(){return Jo.getConfig()}showOnboardingStories(e,t){return Zh(this,void 0,void 0,(function*(){return ya(e),this.app.setAppearanceManager(e),Jo.showOnboardingStories(t)}))}showStory(e,t){return Zh(this,void 0,void 0,(function*(){ya(t),this.app.setAppearanceManager(t),yield Jo.showStory(e)}))}showStoryOnce(e,t){return Zh(this,void 0,void 0,(function*(){return ya(t),this.app.setAppearanceManager(t),Jo.showStoryOnce(e)}))}closeAllReaders(){Jo.closeAllReaders()}openGame(e,t){return Zh(this,arguments,void 0,(function*(e,t,i={}){return ya(t),this.app.setAppearanceManager(t),Jo.openGame(e,i)}))}closeGame(){return Zh(this,void 0,void 0,(function*(){return Jo.closeGame()}))}closeStoryReader(){return Zh(this,void 0,void 0,(function*(){return Jo.closeStoryReader()}))}getUgcEditorConfig(){return Jo.getUgcEditorConfig()}closeGoodsWidget(){Jo.closeGoodsWidget()}setLang(e){this.storyManagerConfigDto.lang=e,this.app.setStoryManagerConfig(this.storyManagerConfigDto)}getNonce(){return Gt()}setUserId(e){return Zh(this,void 0,void 0,(function*(){this.storyManagerConfigDto.userId=e,this.app.setStoryManagerConfig(this.storyManagerConfigDto)}))}setTags(e){this.storyManagerConfigDto.tags=e,this.app.setStoryManagerConfig(this.storyManagerConfigDto)}setPlaceholders(e){this.storyManagerConfigDto.placeholders=e,this.app.setStoryManagerConfig(this.storyManagerConfigDto)}setImagePlaceholders(e){this.storyManagerConfigDto.imagePlaceholders=e,this.app.setStoryManagerConfig(this.storyManagerConfigDto)}on(e,t){return Jo.on(e,t),this}once(e,t){return Jo.once(e,t),this}off(e,t){return Jo.off(e,t),this}destroy(){Jo.destroy()}}})(),h})()));
|