{"version":3,"sources":["components/IntegerSelector/IntegerSelector.module.css","screens/CodeActivated/CodeActivated.module.css","core/config/config.ts","navigation/domainRouter.ts","components/CertificateBlock/CertificateBlock.tsx","components/Footer/Footer.tsx","themes/default/defaultThemeText.ts","themes/black/blackThemeText.ts","themes/useTheme.tsx","screens/CertificateScreen/CertificateScreen.tsx","components/AdvicesBlock/AdvicesBlock.tsx","components/CustomButton/CustomButton.tsx","components/BottomMainBlock/BottomMainBlock.tsx","components/CustomInput/CustomInput.tsx","components/CustomCheckbox/CustomCheckbox.tsx","components/Selector/SubscriptionSelect.tsx","components/PaymentMethodSelector/PaymentMethodSelector.tsx","components/Calculator/Calculator.tsx","core/http/fetch.hook.ts","components/IntegerSelector/IntegerSelector.tsx","components/Selector/Selector.tsx","core/http/HttpService.ts","core/activateCodePromocode/api.ts","core/activateCodePromocode/controller.ts","components/PromoCalculator/PromoCalculator.tsx","components/UpperMainBlock/UpperMainBlock.tsx","themes/useTimer.tsx","core/buyGiftSubscription/api.ts","core/buyGiftSubscription/controller.ts","screens/MainScreen/MainScreen.tsx","screens/CertificateOpen/PartnerCertificate.tsx","screens/CertificateOpen/CertificateSheet.tsx","screens/CertificateOpen/CertificateOpen.tsx","navigation/MainRoutes.tsx","core/activatePromoCode/api.ts","core/activatePromoCode/controller.ts","screens/CodeActivation/CodeActivation.tsx","screens/CodeActivated/CodeActivated.tsx","navigation/CodeRoutes.tsx","components/CorporateCalculator/CorporateRadio.tsx","components/CorporateCalculator/CorporateCalculator.tsx","components/UpperCorporateBlock/UpperCorporateBlock.tsx","screens/CorporateSubscription/CorporateSubscription.tsx","core/buyCorporateSubscription/controller.ts","screens/ManagerScreen/ManagerScreen.tsx","navigation/CorporativeRoutes.tsx","core/buySubscription/api.ts","screens/BuySubscription/BuySubscription.tsx","core/buySubscription/controller.ts","navigation/DomainRoutes.tsx","navigation/PromoRoutes.tsx","index.tsx","components/CorporateCalculator/CorporateCalculator.module.css","screens/ManagerScreen/ManagerScreen.module.css","components/CorporateCalculator/CorporateRadio.module.css","themes/default/default.module.css","themes/pink/pink.module.css","themes/black/black.module.css","components/UpperCorporateBlock/UpperCorporateBlock.module.css"],"names":["module","exports","config","apiUrl","window","_prosto_env_","REACT_APP_API_URL","process","tinkoffTerminalKey","REACT_APP_TERMINAL_KEY","giftRoute","REACT_APP_GIFT_ROUTE","codeRoute","REACT_APP_CODE_ROUTE","corpRoute","REACT_APP_CORP_ROUTE","promoRoute","REACT_APP_PROMO_ROUTE","privacyUrl","rulesUrl","domainRouter","go","domain","location","host","currentHost","podarokItems","image","text","isForeverItems","pinkItems","blackFridayItems","CertificateInstructionsBlock","isBlackFriday","isPink","isForever","items","color","className","map","item","key","src","height","style","Footer","backgroundColor","textColor","linkColor","showSellerInfo","thisYear","Date","getFullYear","borderColor","href","defaultThemeText","calcTitle","calcSubtitle","title","subtitle","subtitleExtra","useHolidaysTheme","themeText","styles","nextTimeout","isHoliday","today","moment","get","thisMonth","format","isBirthday","defaultStyles","currentDayNumber","daysLeft","CertificateScreen","search","substring","yandexMetrikaCounters","accounts","options","ymOptions","version","display","flexDirection","alignItems","gap","width","marginTop","justifyContent","textAlign","marginBottom","marginLeft","letter","certificate","wallet","corpItems","AdvicesBlock","isCorp","CustomButton","onClick","icon","disabled","downloadIcon","BottomMainBlock","onActivateClick","removeTitle","buttonTitle","firstImage","firstText","secondText","mainScreen","zIndex","id","CustomInput","placeholder","defaultValue","onChange","inputClassName","minLength","maxLength","type","CustomCheckbox","value","checked","htmlFor","fontFamily","fontSize","dates","SubscriptionSelect","availableSubscriptions","activeSubscription","onSelect","onSelectChange","useCallback","event","target","find","availableSubscription","months","Number","subscription","toString","alt","PaymentMethodSelector","onPaymentMethodChange","newValue","currentTarget","Root","RadioItem","RadioInput","Text","Calculator","data","onDataChange","setAvailableSubscriptions","useState","setActiveSubscription","price","discount1","discount2","finalPrice","response","subscriptionPrices","url","isLoading","setIsLoading","setResponse","useEffect","fetch","then","res","json","catch","err","console","log","useFetch","handleEmailChange","email","toLowerCase","trim","emailCheckboxTouched","setEmailCheckboxTouched","handleConfirmEmailCheckbox","isValidEmail","confirmEmail","onSelectSubscription","undefined","podarok","avo","length","sort","a","b","createMarkup","split","str","margin","paddingLeft","paymentMethod","loading","canPay","checkCanDecrease","IntegerSelector","setValue","canIncrease","setCanIncrease","canDecrease","setCanDecrease","updateCans","handleIncreaseClick","handleDecreaseClick","handleInputBlur","handleInputChange","parseInt","isNaN","IconContainer","LeftIcon","Disabled","InputContainer","Input","onBlur","RightIcon","Selector","getPrice","showCountSelector","useCorporateDiscount","promoCalculator","useAvoDiscount","count","setCount","setPrice","discount","setDiscount","corporateDiscount","setCorporateDiscount","benefit","Math","round","preciseBenefit","ceil","newPrice","month","handleMonthsChange","handleCountChange","async","request","method","timeout","headers","axiosResponse","axios","prepareData","transformRequest","requestData","requestHeaders","setHeaderContentType","serverData","makeResponse","httpStatus","status","responseStatus","statusCode","success","timestamp","message","error","e","params","FormData","JSON","stringify","httpService","queryData","settings","this","addQueryParams","post","delete","put","patch","resultUrl","isFirst","PROMO_CODES_CODE_URL","ActivatePromoCodeCodeApi","activate","promocode","encoding","ACTIVATE_ERRORS","ActivateCodePromocodeController","api","activateCodePromocode","errorMessage","PromoCalculator","controller","promocodeDiscount","setPromocodeDiscount","phone","setPhone","phoneFlag","setPhoneFlag","code","setCode","codeData","setCodeData","setError","codeReq","setCodeReq","dayDiscount","dayDiscountWithPromocode","priceInfo","floor","handleCodeChange","replace","toUpperCase","handlePhone","onClickCode","activateResult","sumBenefit","onClickResetCode","country","inputProps","required","autoFocus","specialLabel","toLocaleString","UpperMainBlock","onBuyClick","show","tillDate","useLayoutEffect","MegaTimer","UpperMainRoot","ProstoAppIcon","Timer","TimerText","BackgroundImageContainer","BackgroundImage","MainBlock","LeftTextContainer","MainContainer","HowItWorks","TextContainer","MainTitle","MainSubtitle","AdditionalText","WavesBackground","MobileTitle","PROMO_CODES_URL","BuyGiftSubscriptionApi","createPromoCode","BuyGiftSubscriptionController","buyPromoCode","promoCode","isCorporate","amountTotal","paymentLink","link","requestUserPayment","form","createTinkoffForm","totalPrice","orderId","description","pay","receiptData","Email","EmailCompany","Taxation","Items","Name","Price","Quantity","Amount","Tax","document","createElement","fields","createDocumentFragment","appendChild","createInput","name","input","test","MainScreen","screenState","setScreenState","promocodeId","handleDataChange","newState","handleBuyClick","debounce","generalPixel","postClick","alert","leading","trailing","handleActivateClick","PARTNERS","present","logo","gift","instructionsLink","info","PartnerCertificate","partner","copiedToClipboard","setCopiedToClipboard","copyCodeToClipboard","navigator","clipboard","writeText","paddingTop","lineHeight","alignSelf","background","borderRadius","padding","overflow","marginRight","alignContent","paddingRight","cursor","CertificateSheet","visible","setVisible","downloadPdf","PDF_DOWNLOAD_URL","position","top","opacity","transition","paddingBottom","fontWeight","textDecoration","border","flex","animationOptions","loop","autoplay","animationData","require","rendererSettings","preserveAspectRatio","introAnimation","introAnimationMobile","openAnimation","openAnimationMobile","openAnimationYear","openAnimationYearMobile","CertificateOpen","isMobile","screen","availWidth","URLSearchParams","introPlayed","setIntroPlayed","showOpenAnimation","setShowOpenAnimation","showCertificateSheet","setShowCertificateSheet","openCertificate","isClickToPauseDisabled","eventListeners","eventName","callback","MainRoutes","exact","path","component","ActivatePromoCodeApi","activatePromoCode","activatePromoCodeData","CodeActivation","activationType","setActivationType","setEmail","confirmCorrectInput","setConfirmCorrectInput","history","useHistory","validateForm","handleActivation","push","handleBuy","handleCode","phoneNumber","handleEmail","changeActivationType","enableLongNumbers","CodeActivated","handleIOsClick","handleAndroidClick","AppIcon","UpperBlock","ActivatedIcon","TitleText","Buttons","Button","CodeRoutes","CorporateRadio","handleChange","CorporateCalculator","handlePhoneChange","handleCompanyChange","companyName","handleINNChange","inn","handleWorkPhoneChange","workPhone","handleAddressChange","legalAddress","subscriptionCount","subscriptionDuration","subscriptionPrice","handlePromoCodeChange","handlePayMethodChange","payMethod","CalculatorBlock","CalculatorTitleContainer","CalculatorTitle","PhoneInput","CalculatorAdditionalText","CalculatorBottomBlock","CalculatorBottomLeftBlock","CalculatorTextFirst","CalculatorTextSecond","CalculatorText","CalculatorBottomRightBlock","CalculatorBottomRightBlockText","CalculatorText2x","PromoCodeInput","CalculatorFooter","CalculatorOffer","UpperCorporateBlock","discountCorporation","EMAIL_REG","isValidPhone","INN_REG","PROMO_CODE_REG","isValidPromoCode","isValidName","CorporateSubscription","screenStateCard","setScreenStateCard","ManagerScreen","ManagerIcon","CorporativeRoutes","BuySubscriptionApi","createSubscription","buySubscription","BuySubscription","pathname","state","SCREENS","clickmap","trackLinks","accurateTrackBounce","webvisor","trackHash","DomainRoutes","Screen","ReactDOM","render","StrictMode","getElementById"],"mappings":"4OACAA,EAAOC,QAAU,CAAC,KAAO,8BAA8B,cAAgB,uCAAuC,SAAW,kCAAkC,SAAW,kCAAkC,UAAY,mCAAmC,eAAiB,wCAAwC,MAAQ,+B,2CCAxTD,EAAOC,QAAU,CAAC,KAAO,4BAA4B,QAAU,+BAA+B,cAAgB,qCAAqC,UAAY,iCAAiC,KAAO,4BAA4B,QAAU,+BAA+B,OAAS,8B,0njtXC4BtQC,MA7BA,CACbC,OACEC,OAAOC,aAAaC,mBACpBC,0KAAYD,mBACZ,GACFE,mBACEJ,OAAOC,aAAaI,wBACpBF,gBAEFG,UACEN,OAAOC,aAAaM,sBACpBJ,0KAAYI,sBACZ,GACFC,UACER,OAAOC,aAAaQ,sBACpBN,0KAAYM,sBACZ,GACFC,UACEV,OAAOC,aAAaU,sBACpBR,0KAAYQ,sBACZ,GACFC,WACAZ,OAAOC,aAAaY,uBACpBV,0KAAYU,uBACZ,GACAC,WAAY,+CACZC,SAAU,sCCfGC,MADM,IAVrB,MACEC,GAAGC,GACDlB,OAAOmB,SAASC,KAAOF,CACxB,CAED,eAAIG,GACF,OAAOrB,OAAOmB,SAASC,IACxB,G,aCJH,MAIME,EAAe,CACnB,CAAEC,MAAO,iCAAkCC,KAAM,2IACjD,CAAED,MAAO,oBAAqBC,KAAM,gZACpC,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Aa,0BAA0B,YAAc,2BAA2B,UAAY,yBAAyB,qBAAuB,oCAAoC,gBAAkB,+BAA+B,yBAA2B,wCAAwC,kBAAoB,iC,oBCA33BD,EAAOC,QAAU,CAAC,KAAO,kCAAkC,UAAY,uCAAuC,cAAgB,2CAA2C,gBAAkB,6CAA6C,UAAY,uCAAuC,eAAiB,4CAA4C,cAAgB,2CAA2C,cAAgB,2CAA2C,kBAAoB,+CAA+C,WAAa,wCAAwC,yBAA2B,sD","file":"static/js/main.3409e786.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"Root\":\"IntegerSelector_Root__2_qT1\",\"IconContainer\":\"IntegerSelector_IconContainer__3WLTM\",\"Disabled\":\"IntegerSelector_Disabled__2zrZc\",\"LeftIcon\":\"IntegerSelector_LeftIcon__3nkpj\",\"RightIcon\":\"IntegerSelector_RightIcon__2fXI3\",\"InputContainer\":\"IntegerSelector_InputContainer__1C84y\",\"Input\":\"IntegerSelector_Input__Y_SrT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Root\":\"CodeActivated_Root__KLABe\",\"AppIcon\":\"CodeActivated_AppIcon__20Hhz\",\"ActivatedIcon\":\"CodeActivated_ActivatedIcon__3PowN\",\"TitleText\":\"CodeActivated_TitleText__3HKP_\",\"Text\":\"CodeActivated_Text__HU0qG\",\"Buttons\":\"CodeActivated_Buttons__3cBC2\",\"Button\":\"CodeActivated_Button__Tr0UK\"};","const config = {\n apiUrl:\n window._prosto_env_.REACT_APP_API_URL ||\n process.env.REACT_APP_API_URL ||\n \"\",\n tinkoffTerminalKey:\n window._prosto_env_.REACT_APP_TERMINAL_KEY ||\n process.env.REACT_APP_TERMINAL_KEY ||\n \"\",\n giftRoute:\n window._prosto_env_.REACT_APP_GIFT_ROUTE ||\n process.env.REACT_APP_GIFT_ROUTE ||\n \"\",\n codeRoute:\n window._prosto_env_.REACT_APP_CODE_ROUTE ||\n process.env.REACT_APP_CODE_ROUTE ||\n \"\",\n corpRoute:\n window._prosto_env_.REACT_APP_CORP_ROUTE ||\n process.env.REACT_APP_CORP_ROUTE ||\n \"\",\n promoRoute:\n window._prosto_env_.REACT_APP_PROMO_ROUTE ||\n process.env.REACT_APP_PROMO_ROUTE ||\n \"\",\n privacyUrl: 'https://help.prostoapp.ru/#!/tab/437811820-1',\n rulesUrl: 'https://help.prostoapp.ru/birthday',\n};\n\nexport default config;\n","class DomainRouter {\n go(domain: string): void {\n window.location.host = domain;\n }\n\n get currentHost(): string {\n return window.location.host;\n }\n}\n\nconst domainRouter = new DomainRouter();\nexport default domainRouter;\n","import React from 'react';\nimport './CertificateBlock.css';\n\nconst sleep = \"images/black-friday/sleep.png\";\nconst meditation = \"images/black-friday/meditation.png\";\nconst irena = \"images/black-friday/irena.png\";\n\nconst podarokItems = [\n { image: \"images/CertificateDownload.png\", text: 'Скачайте доÑтуп из пиÑьма' },\n { image: \"images/Letter.png\", text: 'РаÑпечатайте доÑтуп и подарите, или перешлите его тому, кому делаете подарок' },\n { image: \"images/Certificate.png\", text: 'Получатель доÑтупа Ñможет легко активировать промокод. ИнÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ ÐµÑÑ‚ÑŒ во вложении пиÑьма' },\n { image: \"images/screenshot.png\", text: 'Выложи Ñкриншот о покупке в stories, отметь @prosto.meditation и учаÑтвуй в розыгрыше ценных призов' }\n]\n\nconst isForeverItems = [\n { image: \"images/forever/download.png\", text: 'Скачайте доÑтуп из пиÑьма' },\n { image: \"images/forever/letter.png\", text: 'РаÑпечатайте доÑтуп и подарите, или перешлите его тому, кому делаете подарок' },\n { image: \"images/forever/certificate.png\", text: 'Получатель Ñможет легко активировать промокод. ИнÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ ÐµÑÑ‚ÑŒ во вложении пиÑьма' },\n { image: \"images/forever/screenshot.png\", text: 'Выложи Ñкриншот о покупке в stories, отметь @prosto.meditation и учаÑтвуй в розыгрыше ценных призов' }\n]\n\nconst pinkItems = [\n { image: \"images/pink/download.png\", text: 'Скачайте доÑтуп из пиÑьма' },\n { image: \"images/pink/letter.png\", text: 'РаÑпечатайте доÑтуп и подарите, или перешлите его тому, кому делаете подарок' },\n { image: \"images/pink/ticket.png\", text: 'Получатель Ñертификата Ñможет легко активировать промокод. ИнÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ ÐµÑÑ‚ÑŒ в Ñертификате' },\n { image: \"images/pink/screenshot.png\", text: 'Выложи Ñкриншот о покупке в stories, отметь @prosto.meditation и учаÑтвуй в розыгрыше ценных призов' }\n]\n\nconst blackFridayItems = [\n { image: sleep, text: '«Prosto: Ð¼ÐµÐ´Ð¸Ñ‚Ð°Ñ†Ð¸Ñ Ð¸ Ñон» Ñтанет вашей внутренней опорой и поможет выработать привычку медитировать каждый день.' },\n { image: meditation, text: 'Практики ментальной уÑтойчивоÑти помогут побороть ÑтреÑÑ, тревогу, злоÑÑ‚ÑŒ, Ñрывы в питании и проблемы Ñо Ñном.' },\n { image: irena, text: 'Prosto.ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ð¿Ð¾Ð¼Ð¾Ð¶ÐµÑ‚ выÑтроить гармоничные Ð¾Ñ‚Ð½Ð¾ÑˆÐµÐ½Ð¸Ñ Ñ Ð¾ÐºÑ€ÑƒÐ¶Ð°ÑŽÑ‰Ð¸Ð¼ миром.' }\n]\n\ninterface IProps {\n isBlackFriday?: boolean\n isPink?: boolean\n isHoliday?: boolean\n isForever?: boolean\n}\n\nconst CertificateInstructionsBlock: React.FC<IProps> = ({\n isBlackFriday = false, isPink, isForever\n}) => {\n const items = isBlackFriday ? blackFridayItems :\n isPink ? pinkItems :\n isForever ? isForeverItems :\n podarokItems\n\n const color = isForever || isBlackFriday ? '#fff' : '#000'\n\n return (\n <div className=\"CertificateMainBlock\">\n {items.map((item, key) => (\n <div key={key} className=\"CertificateContainer\">\n <img className=\"CertificateImage\" src={item.image} height={isBlackFriday ? 120 : 50} />\n <p className=\"CertificateText\" style={{ color }}>{item.text}</p>\n </div>\n ))}\n {/* {isHoliday &&\n <div className=\"CertificateContainer\">\n <img className=\"CertificateImage\" src={screenshot} style={{marginTop: -15}} />\n <p className=\"CertificateText\" style={{ color }}>\n Выложи Ñкриншот<br />\n о покупке в stories,<br />\n отметь <b>@prosto.meditation</b> <br />\n и учаÑтвуй в розыгрыше <br />\n ценных призов</p>\n </div>\n } */}\n </div>\n );\n}\n\nexport default CertificateInstructionsBlock;\n","import React from 'react';\nimport './Footer.css';\n\ninterface IProps {\n backgroundColor?: string;\n textColor?: string;\n linkColor?: string;\n showSellerInfo?: boolean\n}\nconst Footer: React.FC<IProps> = ({ backgroundColor, textColor, linkColor = '#33B49D', showSellerInfo = true }) => {\n const thisYear = new Date().getFullYear()\n\n return (\n <div className=\"FooterBlock\" style={{ backgroundColor: backgroundColor || '#fff' }}>\n <p className=\"FooterText\" style={{ color: textColor || '#000' }}>© ПроÑто {thisYear}</p>\n <div className=\"FooterButtonContainer\">\n <a style={{ color: linkColor, borderColor: linkColor }} className=\"FooterLink\" href=\"https://apps.apple.com/ru/app/проÑто-медитациÑ-и-Ñон/id1490891826?mt=8\">\n Appstore\n </a>\n <a style={{ color: linkColor, borderColor: linkColor }} className=\"FooterLink\" href='https://play.google.com/store/apps/details?id=com.prostoapp&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'>\n GooglePlay\n </a>\n </div>\n <p className=\"FooterText\" style={{ color: textColor || '#000' }}>\n Служба поддержки\n <a style={{ color: linkColor, borderColor: linkColor }} href=\"mailto: pr@prostoapp.com\" className=\"FooterMail\"> pr@prostoapp.com </a>\n </p>\n <br />\n\n <p className=\"FooterText\">\n *лучшее приложение Ð´Ð»Ñ Ð¼ÐµÐ´Ð¸Ñ‚Ð°Ñ†Ð¸Ð¸<br />\n на руÑÑком Ñзыке по верÑии data.ai\n </p>\n {showSellerInfo &&\n <p className=\"FooterText\">\n ИÐДИВИДУÐЛЬÐЫЙ ПРЕДПРИÐИМÐТЕЛЬ БÐРСУКОВ ÐЛЕКСÐÐДРÐЛЕКСÐÐДРОВИЧ,\n ИÐÐ 366208819519, ОГРР316366800118452,\n pr@prostoapp.com, 89608576775\n </p>\n }\n\n </div>\n );\n}\n\n\nexport default Footer;\n","export const defaultThemeText = {\n calcTitle: 'Оплатить Ñертификат',\n calcSubtitle: '',\n title: 'Prosto — Ñ‚Ð²Ð¾Ñ Ð²Ð½ÑƒÑ‚Ñ€ÐµÐ½Ð½ÑÑ Ð¾Ð¿Ð¾Ñ€Ð°',\n subtitle: 'Многие из Ð²Ð°Ñ ÑтолкнулиÑÑŒ Ñ Ñ‚ÐµÐ¼, что не могут продлить подпиÑку на приложение в Apple Store и Google Play.',\n subtitleExtra: 'Чтобы вне завиÑимоÑти от обÑтоÑтельÑтв вы имели доÑтуп к Prosto app, вы можете ÑÐµÐ³Ð¾Ð´Ð½Ñ Ð¾Ð¿Ð»Ð°Ñ‚Ð¸Ñ‚ÑŒ Ñертификат Ð´Ð»Ñ ÑÐµÐ±Ñ Ð¸Ð»Ð¸ близкого человека на удобный Ð´Ð»Ñ Ð²Ð°Ñ Ð¿ÐµÑ€Ð¸Ð¾Ð´, а активировать его позже.',\n}","export const blackThemeText = {\n calcTitle: `Prosto Box Ð´Ð»Ñ \n ментального здоровьÑ`,\n calcSubtitle: 'Ñо Ñкидкой 74%',\n title: 'Впервые за вÑÑŽ иÑторию проекта мы уÑтраиваем Чёрную пÑтницу',\n subtitle: `Только 24 ноÑÐ±Ñ€Ñ Ð² продаже Ð±Ð¾ÐºÑ Ð´Ð»Ñ Ð¼ÐµÐ½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð·Ð´Ð¾Ñ€Ð¾Ð²ÑŒÑ Ð²Ð°ÑˆÐµÐ¹ Кукушечки:`,\n subtitleExtra: `\n • ДоÑтуп Prosto на 3 года\n • Онлайн-практикум ментальной уÑтойчивоÑти, доÑтуп на 6 меÑÑцев \n • Онлайн-ÐºÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Prosto, доÑтуп навÑегда\n â¤ï¸ Можно оплатить банковÑкой картой\n â¤ï¸ ДоÑтупны ко вÑем материалам придут вам на почту\n â¤ï¸ Ð’Ñе покупатели набора в Черную пÑтницу могут выиграть призы\n `,\n}","import { defaultThemeText } from \"./default/defaultThemeText\";\nimport { pinkThemeText } from \"./pink/pinkThemeText\";\nimport { birthdayThemeText } from \"./birthday/birthdayThemeText\";\nimport defaultStyles from './default/default.module.css';\nimport pinkStyles from './pink/pink.module.css';\nimport blackStyles from './black/black.module.css';\nimport moment from 'moment-timezone';\nimport { blackThemeText } from \"./black/blackThemeText\";\n\nexport const useHolidaysTheme = () => {\n let themeText, styles, isHoliday = false, nextTimeout\n const today = moment().get('date')\n let daysLeft = 0\n let currentDayNumber = 0\n const thisMonth = moment().format('MM')\n const thisYear = moment().get('year')\n // const isPink = moment().isBetween(`${thisYear}-01-11 10:00`, `${thisYear}-02-13 23:59`)\n const isPink = false\n // const isBirthday = moment().isBetween(`${thisYear}-09-21 10:30`, `${thisYear}-09-24 12:01`)\n const isBirthday = false\n // const isBlackFriday = moment().isBetween(`${thisYear}-11-22 00:00`, +moment.tz(`${thisYear}-11-25 13:30`, \"Europe/Moscow\").toDate())\n const isBlackFriday = false\n isHoliday = isBirthday || isPink || isBlackFriday\n if (isBirthday) {\n nextTimeout = +moment.tz(`${thisYear}-09-24 12:00`, \"Europe/Moscow\").toDate()\n themeText = birthdayThemeText\n styles = defaultStyles\n } else if (isPink) {\n nextTimeout = +moment.tz(`${thisYear}-02-14 20:00`, \"Europe/Moscow\").toDate()\n // daysLeft = 14 - today\n // currentDayNumber = today - 10\n themeText = pinkThemeText\n styles = pinkStyles\n } else if (isBlackFriday) {\n nextTimeout = +moment.tz(`${thisYear}-11-25 13:30`, \"Europe/Moscow\").toDate()\n themeText = blackThemeText\n styles = blackStyles\n } else {\n themeText = defaultThemeText\n styles = defaultStyles\n }\n\n return {\n today,\n thisMonth,\n currentDayNumber,\n daysLeft,\n themeText,\n styles,\n isHoliday,\n isPink,\n isBirthday,\n isBlackFriday,\n nextTimeout,\n }\n}","import React, { } from 'react';\nimport CertificateInstructionsBlock from '../../components/CertificateBlock/CertificateBlock';\nimport CustomButton from '../../components/CustomButton/CustomButton';\nimport Footer from '../../components/Footer/Footer';\nimport { useHolidaysTheme } from '../../themes/useTheme';\nimport './CertificateScreen.css';\nimport { YMInitializer } from 'react-yandex-metrika';\nimport { ymOptions } from '../../navigation/DomainRoutes';\n\nconst voices = \"images/voices.png\";\nconst voicesMobile = \"images/voices-mobile.png\";\n\nconst CertificateScreen: React.FC = () => {\n // domainRouter.currentHost\n // console.log('domainRouter.currentHost', domainRouter.currentHost)\n const isForever = window.location.search.substring(1) === 'isForever'\n const isHoliday = true\n const { isBirthday, isBlackFriday, isPink, styles } = useHolidaysTheme()\n const yandexMetrikaCounters = isForever ? [98501558] : [98498599]\n // console.log('yandexMetrikaCounters', yandexMetrikaCounters)\n\n return (\n <>\n <YMInitializer accounts={yandexMetrikaCounters} options={ymOptions} version=\"2\" />\n <div className={isForever ? \"ForeverCertificateBlock\" : \"CertificateBlock\"}>\n {/* {isBirthday && <img className=\"AppIcon\" src={birthdayIcon} />}\n {isPink && <img className={styles.AppIcon || \"AppIcon\"} src={\"images/pink/pink-logo.png\"} />} */}\n <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 15 }}>\n {isForever ? <>\n <img width={270} height={92} src={\"images/forever/certificate-icon.png\"} />\n <img width={114} height={69} src={\"images/letter-sent-white.png\"} />\n </> : <>\n <img width={76} height={76} src={\"images/app-icon.png\"} />\n <img width={114} height={69} src={\"images/letter-sent.png\"} />\n </>}\n </div>\n\n {/* {isPink && <img className={styles.CertificatesTitleImage || \"AppIcon\"} src={\"images/pink/sent-letter.png\"} />} */}\n\n <div className=\"hideOnMobile\">\n <div style={{ width: '100%', display: 'flex', flexDirection: 'column' }}>\n <p className=\"TitleText\" style={{ color: isForever ? '#fff' : '#000', marginTop: 10 }}>\n ПоздравлÑем Ñ Ð¿Ð¾ÐºÑƒÐ¿ÐºÐ¾Ð¹ доÑтупа\n <br />\n {isForever ?\n <>\n Prosto ÐавÑегда\n {/* <span style={{ color: '#FFB700' }}>Ñо Ñкидкой 67%</span> */}\n 🎉\n </> : <>\n Prosto на год\n {/* <span style={{ color: '#33B49D' }}>Ñо Ñкидкой 67%</span> */}\n 🎉\n </>\n }\n <br />\n Проверьте вашу почту!\n </p>\n <div style={{ display: 'flex', justifyContent: 'center' }}>\n <img width={550} src={voices} />\n <p className=\"CertificateText\"\n style={{ color: isForever ? '#fff' : '#000', width: 260, textAlign: 'left' }}\n >\n С нами более <b>3 миллионов пользователей</b> — приÑоединÑйÑÑ!\n <br /><br />\n РоÑÑийÑкие звёзды медитируют Ñами и их голоÑа ведут Ñ‚ÐµÐ±Ñ Ð² медитациÑÑ…:\n <br /><br />\n Юра БориÑов<br />\n Ðикита Ефремов<br />\n МакÑим Матвеев<br />\n Равшана Куркова<br />\n Ð”Ð°Ñ€ÑŒÑ ÐœÐµÐ»ÑŒÐ½Ð¸ÐºÐ¾Ð²Ð°<br />\n Марина ÐлекÑандрова<br />\n Ирена Понарошку<br />\n Сергей Чонишвили<br />\n Ð. Ð. Дроздов<br />\n </p>\n </div>\n </div>\n </div>\n\n <div className=\"hideOnDesktop\">\n\n <div style={{ width: '100%', display: 'flex', flexDirection: 'column' }}>\n <p className=\"TitleText\" style={{ color: isForever ? '#fff' : '#000', marginTop: 10 }}>\n ПоздравлÑем Ñ Ð¿Ð¾ÐºÑƒÐ¿ÐºÐ¾Ð¹ <br />\n доÑтупа Prosto\n <br />\n {isForever ?\n <>\n ÐавÑегда \n {/* <span style={{ color: '#FFB700' }}>Ñо Ñкидкой 67%</span> */}\n 🎉\n </> : <>\n на год \n {/* <span style={{ color: '#33B49D' }}>Ñо Ñкидкой 67%</span> */}\n 🎉\n </>\n }\n <br />\n Проверьте вашу почту!\n </p>\n <p className=\"CertificateText\" style={{ color: isForever ? '#fff' : '#000' }}>\n С нами более <b>3 000 000</b> человек — <br />\n приÑоединÑйÑÑ!\n <br /><br />\n РоÑÑийÑкие звёзды медитируют Ñами <br />\n и их голоÑа ведут Ñ‚ÐµÐ±Ñ Ð² медитациÑÑ…:\n <br />\n </p>\n <br />\n <p className=\"CertificateText\"\n style={{ color: isForever ? '#fff' : '#000', marginBottom: -200, textAlign: 'left', marginLeft: '50%' }}\n >\n Юра БориÑов<br />\n Ðикита Ефремов<br />\n МакÑим Матвеев<br />\n Равшана Куркова<br />\n Ð”Ð°Ñ€ÑŒÑ ÐœÐµÐ»ÑŒÐ½Ð¸ÐºÐ¾Ð²Ð°<br />\n Марина ÐлекÑандрова<br />\n Ирена Понарошку<br />\n Сергей Чонишвили<br />\n Ð. Ð. Дроздов<br />\n </p>\n <img src={voicesMobile} width={'100%'} />\n </div>\n </div>\n\n <CertificateInstructionsBlock\n isHoliday={isHoliday}\n isBlackFriday={isBlackFriday}\n isPink={isPink}\n isForever={isForever}\n />\n\n {/* {\n isHoliday && (\n <>\n <p className={styles.TitleTextBottom || \"TitleTextBottom\"}\n style={{ color: isForever ? '#fff' : '#000', }}\n >\n УчаÑтвуй в розыгрыше подарков\n общей ÑтоимоÑтью более <br className='hideOnDesktop' />1 000 000₽\n в наших ÑоцÑетÑÑ…! <br />\n Жми, чтобы увидеть уÑÐ»Ð¾Ð²Ð¸Ñ ðŸ‘‡\n </p>\n\n <div style={{ display: 'flex', justifyContent: 'center', marginBottom: 20 }}>\n <a className=\"Link\" href=\"https://www.instagram.com/prosto.meditation\" target='_blanc'>\n <CustomButton\n className={'CustomButton'}\n style={{\n backgroundColor: isForever ? '#FFB700' : '#33B49D',\n color: isForever ? '#000' : '#fff'\n }}\n title={'УчаÑтвовать'}\n icon={isForever ? 'images/instagram-black.png' : 'images/instagram-white.png'}\n />\n </a>\n </div>\n </>\n )\n } */}\n\n <Footer\n showSellerInfo={false}\n backgroundColor={'transparent'}\n textColor={isForever ? '#fff' : '#000'}\n linkColor={isForever ? '#fff' : '#33B49D'}\n />\n </div >\n </>\n );\n}\n\nexport default CertificateScreen;\n","import React from 'react';\nimport './AdvicesBlock.css';\n\ninterface IProps {\n isBlackFriday?: boolean\n isPink?: boolean\n isCorp?: boolean\n firstImage?: string;\n firstText?: string;\n secondText?: string;\n items?: any\n}\n\nconst letter = \"images/Letter.png\";\nconst certificate = \"images/Certificate.png\";\nconst certificateInLetter = \"images/CertificateInLetter.png\"\nconst blackCertificateInLetter = \"images/black-friday/BlackCertificateInLetter.png\"\nconst wallet = \"images/Wallet.png\";\nconst access = \"images/black-friday/access.png\"\nconst hours24 = \"images/black-friday/24.png\"\nconst envelope = \"images/black-friday/letter.png\"\n\nconst blackFridayItems = [\n {\n image: access,\n text: `Ð’Ñ‹ покупаете доÑтуп к ÑкÑклюзивному контенту Prosto: конференции и онлайн-интенÑива нет в открытом доÑтупе`\n },\n {\n image: hours24,\n text: `Только 24 чаÑа на покупку Prosto Box Ð´Ð»Ñ Ð¼ÐµÐ½Ñ‚Ð°Ð»ÑŒÐ½Ð¾Ð³Ð¾ Ð·Ð´Ð¾Ñ€Ð¾Ð²ÑŒÑ Ñо Ñкидкой 74%`\n },\n {\n image: envelope,\n text: `ДоÑтупы и инÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ Ð¿Ñ€Ð¸Ð´ÑƒÑ‚ вам на почту поÑле оплаты`\n },\n]\n\nconst corpItems = [\n {\n image: wallet,\n text: \"Оплатите подарочный Ñертификат на подпиÑку Ð´Ð»Ñ Ð²Ð°ÑˆÐ¸Ñ… Ñотрудников\"\n },\n {\n image: letter,\n text: \"Ð’Ñ‹ получите Ñертификат, который можно раÑпечатать или отправить через меÑÑенджер\"\n },\n {\n image: certificate,\n text: `Получатель Ñертификата Ñможет легко активировать промокод, инÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ ÐµÑÑ‚ÑŒ в Ñертификате`\n },\n]\n\nconst podarokItems = [\n {\n image: wallet,\n text: \"Купи Ñертификат на подпиÑку в подарок или Ñебе\"\n },\n {\n image: letter,\n text: \"Ð’Ñ‹ получите Ñертификат, который можно раÑпечатать или отправить через меÑÑенджер\"\n },\n {\n image: certificate,\n text: `Получатель Ñертификата Ñможет легко активировать промокод, инÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ ÐµÑÑ‚ÑŒ в Ñертификате`\n },\n]\n\nconst pinkItems = [\n {\n image: \"images/pink/wallet.png\",\n text: \"Оплатите подарочный Ñертификат Ð´Ð»Ñ ÑÐµÐ±Ñ Ð¸Ð»Ð¸ близкого\"\n },\n {\n image: \"images/pink/letter.png\",\n text: \"Ð’Ñ‹ получите Ñертификат, который можно раÑпечатать или отправить через меÑÑенджер\"\n },\n {\n image: \"images/pink/certificate.png\",\n text: `Получатель Ñертификата Ñможет легко активировать промокод, инÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ ÐµÑÑ‚ÑŒ в Ñертификате`\n },\n]\n\n\nconst AdvicesBlock: React.FC<IProps> = ({\n isBlackFriday = false, isPink, isCorp = false\n}) => {\n const items = isBlackFriday ? blackFridayItems :\n isCorp ? corpItems :\n isPink ? pinkItems : podarokItems\n\n return (\n <div className=\"AdvicesBlock\">\n <div>\n {items.map((item, key) => (\n <div key={key} className=\"AdvicesContainer\">\n <img className=\"AdvicesImage\" src={item.image} />\n <p className=\"AdvicesTextFirst\">{item.text}</p>\n </div>\n ))}\n </div>\n <div>\n <img className=\"AdvicesLetterImage\" src={isBlackFriday ? blackCertificateInLetter : certificateInLetter} />\n </div>\n </div>\n );\n}\n\nexport default AdvicesBlock;\n","import React from 'react';\nimport './CustomButton.css';\n\nconst downloadIconImage = \"images/Download.png\";\n\nexport interface ICustomButtonProps {\n title: string;\n onClick?: () => void;\n icon?: string\n disabled?: boolean;\n downloadIcon?: boolean;\n className?: string;\n style?: any\n}\n\nconst CustomButton: React.FC<ICustomButtonProps> = ({ title, onClick, icon, disabled, downloadIcon, className = \"\", style = {} }) => {\n return (\n <div className={`CustomButtonBlock ${className}`}>\n <button className=\"CustomButton\" onClick={onClick} disabled={disabled} style={style}>\n {icon && <img className=\"ButtonIcon\" src={icon} />}\n {downloadIcon && <img className=\"ButtonIcon\" src={downloadIconImage} />}\n <span>{title}</span>\n </button>\n </div>\n );\n}\n\nexport default CustomButton;\n","import React from 'react';\nimport AdvicesBlock from '../AdvicesBlock/AdvicesBlock';\nimport CustomButton from '../CustomButton/CustomButton';\nimport { useHolidaysTheme } from '../../themes/useTheme';\nimport './BottomMainBlock.css';\n\ninterface IProps {\n onActivateClick: () => void;\n removeTitle?: boolean;\n buttonTitle?: string;\n downloadIcon?: boolean;\n firstImage?: string;\n firstText?: string;\n secondText?: string;\n mainScreen?: boolean;\n isCorp?: boolean\n}\n\nconst BottomMainBlock: React.FC<IProps> = ({ onActivateClick, removeTitle, buttonTitle, downloadIcon, firstImage, firstText, secondText, mainScreen = true, isCorp = false }) => {\n const { isBlackFriday, isPink, styles } = useHolidaysTheme()\n\n return (\n <div className=\"MainBottomBlock\" style={{\n zIndex: 1,\n backgroundColor: isBlackFriday ? '#EFECEC' : '#fff'\n }}>\n <a id=\"advices\" className=\"Title\">Как Ñто работает?</a>\n\n <AdvicesBlock\n isCorp={isCorp}\n isBlackFriday={isBlackFriday}\n isPink={isPink}\n />\n\n <div className=\"BottomMainBlockButton\">\n <CustomButton\n className={styles['CustomButton']}\n downloadIcon={downloadIcon}\n title={buttonTitle || 'Ðктивировать промокод'}\n onClick={onActivateClick}\n />\n </div>\n </div>\n );\n}\n\nexport default BottomMainBlock;\n","import React from 'react';\nimport './CustomInput.css';\n\nexport interface ICustomInputProps {\n placeholder: string;\n defaultValue?: string;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n className?: string;\n inputClassName?: string;\n minLength?: number;\n maxLength?: number;\n type?: string;\n}\n\nconst CustomInput: React.FC<ICustomInputProps> = ({\n placeholder,\n defaultValue = '',\n onChange,\n className, inputClassName= \"Email\",\n minLength, maxLength,\n type\n}) => {\n return (\n <div className={className}>\n <input\n className={inputClassName}\n placeholder={placeholder}\n onChange={onChange}\n minLength={minLength}\n maxLength={maxLength}\n type={type}\n defaultValue={defaultValue}\n />\n </div>\n );\n}\n\nexport default CustomInput;\n","import React from 'react';\nimport './CustomCheckbox.css';\n\nexport interface ICustomCheckboxProps {\n title: string;\n value: boolean;\n onChange: (val: boolean) => void;\n disabled?: boolean;\n}\n\nconst CustomCheckbox: React.FC<ICustomCheckboxProps> = ({ title, value, onChange, disabled }) => {\n return (\n <div className=\"checkbox\">\n <input\n title='confirm-checkbox'\n className=\"custom-checkbox\"\n id=\"confirm-checkbox\"\n type=\"checkbox\"\n checked={value}\n onChange={() => { }}\n />\n <label\n htmlFor=\"confirm-checkbox\"\n style={{\n fontFamily: 'Gotham Pro Regular',\n fontSize: 16\n }}\n onClick={() => !disabled && onChange(!value)}>{title}</label>\n </div>\n );\n}\n\nexport default CustomCheckbox;\n","import React, { useCallback } from 'react';\nimport './Selector.css';\nimport IntegerSelector from \"../IntegerSelector/IntegerSelector\";\nimport { ISubscription } from '../Calculator/Calculator';\n\nconst selectorIcon = \"images/Selector.png\";\n\ninterface IDates {\n [key: string]: string;\n}\n\nconst dates: IDates = {\n 1: \"1 меÑÑц\",\n 3: \"3 меÑÑца\",\n 6: \"6 меÑÑцев\",\n 12: \"12 меÑÑцев\",\n};\n\ninterface IProps {\n availableSubscriptions: ISubscription[]\n activeSubscription: ISubscription\n onSelect: (subscription: ISubscription) => void\n}\n\nconst SubscriptionSelect: React.FC<IProps> = ({\n availableSubscriptions, activeSubscription, onSelect,\n}) => {\n\n // const handleCountChange = useCallback((newValue: number) => {\n // if (newValue >= 3) {\n // setCount(newValue);\n // }\n // }, [])\n\n const onSelectChange = useCallback((event: React.ChangeEvent<HTMLSelectElement>) => {\n const { value } = event.target\n onSelect(availableSubscriptions.find(\n availableSubscription => availableSubscription.months === Number(value)\n ) || availableSubscriptions[0])\n }, [onSelect, availableSubscriptions])\n\n return (\n <div>\n {/* {showCountSelector && <IntegerSelector className=\"IntegerSelector\" onChange={handleCountChange} />} */}\n <div className=\"Selector\">\n <div>\n <select\n title='select'\n onChange={onSelectChange}\n className=\"InputDate\"\n value={activeSubscription.months}\n // defaultValue={availableSubscriptions[0]?.months}\n // disabled={useAvoDiscount}\n >\n {\n availableSubscriptions.map((subscription) => (\n <option key={subscription.months} value={subscription.months}>\n {dates[subscription.months.toString()]}\n </option>\n ))\n }\n </select>\n {dates[activeSubscription.months]}\n <img alt='select' className=\"SelectorImage\" src={selectorIcon} />\n </div>\n </div>\n </div>\n );\n};\n\nexport default SubscriptionSelect;\n","import React, { useCallback } from \"react\";\nimport { Label, Radio } from \"theme-ui\";\nimport { TPaymentMethod } from \"../../core/buyGiftSubscription/controller\";\n\nimport styles from \"../CorporateCalculator/CorporateRadio.module.css\";\n\n\ninterface IPaymentMethodSelectorProps {\n value: TPaymentMethod;\n onChange: (value: TPaymentMethod) => void;\n}\n\nexport const PaymentMethodSelector = ({ value, onChange }: IPaymentMethodSelectorProps) => {\n\n const onPaymentMethodChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.currentTarget.value;\n if (newValue !== value) {\n onChange(newValue as TPaymentMethod);\n }\n }, [onChange, value]);\n\n return (\n <div className={styles.Root}>\n <Label className={styles.RadioItem}>\n <Radio\n className={styles.RadioInput}\n value=\"tinkoff\"\n checked={value === \"tinkoff\"}\n onChange={onPaymentMethodChange}\n />\n <span className={styles.Text}>Карта роÑÑийÑкого банка</span>\n </Label>\n <Label className={styles.RadioItem}>\n <Radio\n className={styles.RadioInput}\n value=\"stripe\"\n checked={value === \"stripe\"}\n onChange={onPaymentMethodChange}\n />\n <span className={styles.Text}>Карта Visa, Mastercard (не РоÑÑиÑ)</span>\n </Label>\n </div>\n )\n}\n","import React, { useCallback, useEffect, useState } from 'react';\nimport CustomButton from '../CustomButton/CustomButton';\nimport CustomInput from '../CustomInput/CustomInput';\nimport './Calculator.css';\nimport { IMainScreenState } from \"../../types/IMainScreenState\";\nimport CustomCheckbox from '../CustomCheckbox/CustomCheckbox';\nimport SubscriptionSelect from '../Selector/SubscriptionSelect';\nimport { useFetch } from '../../core/http/fetch.hook';\nimport { PaymentMethodSelector } from '../PaymentMethodSelector/PaymentMethodSelector';\nimport config from '../../core/config/config';\nimport { useHolidaysTheme } from '../../themes/useTheme';\nimport { isValidEmail } from '../../screens/MainScreen/MainScreen';\nimport domainRouter from '../../navigation/domainRouter';\n\nexport interface ISubscription {\n months: number;\n price: number;\n discount1: number;\n discount2: number;\n finalPrice: number;\n}\n\nexport interface ICalculatorProps {\n title?: string\n subtitle?: string\n data: IMainScreenState;\n onClick?: () => void;\n onDataChange?: (state: IMainScreenState) => void;\n}\n\n// Podarok\nconst Calculator: React.FC<ICalculatorProps> = ({ title = 'Оплатить Ñертификат', subtitle, data, onClick, onDataChange = () => { } }) => {\n const { isBlackFriday, styles } = useHolidaysTheme()\n\n const [availableSubscriptions, setAvailableSubscriptions] = useState<ISubscription[]>([])\n const [activeSubscription, setActiveSubscription] = useState<ISubscription>(\n {\n months: 1,\n price: 379,\n discount1: 0,\n discount2: 0,\n finalPrice: 379\n }\n );\n\n const { response: subscriptionPrices } = useFetch('promocodes/prices')\n\n const handleEmailChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n const email = event.target.value ?? \"\";\n onDataChange({\n ...data,\n email: email.toLowerCase().trim(),\n })\n }, [data, onDataChange])\n\n const [emailCheckboxTouched, setEmailCheckboxTouched] = useState(false)\n const handleConfirmEmailCheckbox = useCallback((value) => {\n setEmailCheckboxTouched(value)\n if (data.email === '') return\n if (!isValidEmail(data.email)) return\n onDataChange({\n ...data,\n confirmEmail: data.confirmEmail ? false : true,\n })\n }, [data, onDataChange])\n\n const onSelectSubscription = useCallback((subscription: ISubscription) => {\n setActiveSubscription(subscription)\n onDataChange({\n ...data,\n months: subscription.months,\n price: subscription.finalPrice,\n // discount: subscription.discount,\n });\n }, [data, onDataChange])\n\n useEffect(() => {\n if (isBlackFriday) {\n onSelectSubscription({\n months: 36,\n price: 4550,\n discount1: 0,\n discount2: 0,\n finalPrice: 4550,\n })\n } else {\n if (subscriptionPrices !== undefined) {\n const currentHost = domainRouter.currentHost\n console.log('currentHost', currentHost)\n console.log('subscriptionPrices', subscriptionPrices)\n const { podarok, avo } = subscriptionPrices\n if (currentHost === 'avo.prostoapp.ru' && avo?.length) {\n avo.sort((a: ISubscription, b: ISubscription) => (\n (a.months < b.months) ? 1 : -1\n ))\n setAvailableSubscriptions(avo)\n setActiveSubscription(avo[0])\n onSelectSubscription(avo[0])\n } else if (podarok?.length) {\n podarok.sort((a: ISubscription, b: ISubscription) => (\n (a.months < b.months) ? 1 : -1\n ))\n setAvailableSubscriptions(podarok)\n setActiveSubscription(podarok[0])\n onSelectSubscription(podarok[0])\n }\n }\n }\n\n }, [subscriptionPrices])\n\n const createMarkup = (text?: string) => {\n if (!text) return ''\n return text.split('\\n').map((str, key) => <p key={key} style={{ margin: 0 }}>{str}</p>)\n }\n\n return (\n <div className=\"CalculatorBlock\">\n <div>\n <div className=\"CalculatorTitle\">\n {createMarkup(title)}\n <p className=\"CalculatorSubitle\">{createMarkup(subtitle)}</p>\n </div>\n\n <CustomInput\n placeholder=\"Ваша ÑÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ð¿Ð¾Ñ‡Ñ‚Ð°*\"\n onChange={handleEmailChange}\n />\n\n <p className=\"CalculatorAdditionalText\">\n {isBlackFriday ? 'Ðа указанную почту будут отправлены доÑтупы' : 'Ðа указанную почту будет отправлен Ñертификат'}\n </p>\n {isBlackFriday ?\n <>\n <div className='FlexBlock'>\n <p className=\"CalculatorText\">\n ДоÑтуп в приложение<br />\n Prosto <a className='Muted'>6300 ₽</a>\n </p>\n <p className=\"CalculatorTextBordered\">3 года</p>\n </div>\n <div className='FlexBlock'>\n <p className=\"CalculatorText\">\n Практикум ментальной<br />\n уÑтойчивоÑти <a className='Muted'>5100 ₽</a>\n </p>\n <p className=\"CalculatorTextBordered\">6 меÑÑцев</p>\n </div>\n <div className='FlexBlock'>\n <p className=\"CalculatorText\">\n Онлайн-ÐºÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ <br /><a className='Muted'>4900 ₽</a>\n </p>\n <p className=\"CalculatorTextBordered\">навÑегда</p>\n </div>\n <div className='FlexBlock'>\n <p className=\"CalculatorText\">\n Итого к оплате\n </p>\n <p className=\"CalculatorText\"><a className='Muted'>17 100 ₽</a></p>\n <p className=\"CalculatorText\"><b>4 550 ₽</b></p>\n </div>\n </> :\n <div className=\"CalculatorBottomBlock\">\n <div className=\"CalculatorBottomLeftBlock\">\n <p className=\"CalculatorTextFirst\">МеÑÑцев</p>\n <p className=\"CalculatorText\">Цена</p>\n {!!activeSubscription.discount1 && <p className=\"CalculatorText\">Скидка</p>}\n {!!activeSubscription.discount2 && <p className=\"CalculatorText\">Доп.Ñкидка</p>}\n {!!activeSubscription.discount1 && <p className=\"CalculatorText\">Итого к оплате</p>}\n </div>\n <div className=\"CalculatorBottomRightBlock\">\n <SubscriptionSelect\n availableSubscriptions={availableSubscriptions}\n activeSubscription={activeSubscription}\n onSelect={onSelectSubscription}\n />\n <div className=\"CalculatorBottomRightBlockText\">\n <p className=\"CalculatorText\">\n {activeSubscription.price} <span className=\"RubleIcon\">₽</span>\n </p>\n {!!activeSubscription.discount1 && <p className=\"CalculatorText\">-{activeSubscription.discount1}%</p>}\n {!!activeSubscription.discount2 && <p className=\"CalculatorText\">-{activeSubscription.discount2}%</p>}\n {!!activeSubscription.discount1 &&\n <p className=\"CalculatorText\">\n {activeSubscription.finalPrice} <span className=\"RubleIcon\">₽</span>\n </p>}\n </div>\n </div>\n </div>\n }\n\n </div>\n <div className=\"CalculatorFooter\">\n <div style={{ paddingLeft: 70}}>\n <CustomCheckbox\n title=\"Подтверждаю, что Email введен верно\"\n value={data.confirmEmail}\n onChange={handleConfirmEmailCheckbox}\n />\n </div>\n\n {emailCheckboxTouched && data.email === '' &&\n <p style={{ textAlign: 'center', color: 'red' }}>Ðеобходимо ввеÑти Email</p>\n }\n {emailCheckboxTouched && data.email !== '' && !isValidEmail(data.email) &&\n <p style={{ textAlign: 'center', color: 'red' }}>Ðеверный формат Email</p>\n }\n <PaymentMethodSelector\n value={data.paymentMethod}\n onChange={(value) => {\n onDataChange({\n ...data,\n paymentMethod: value,\n })\n }}\n />\n <CustomButton\n className={styles['CustomButton']}\n title={data.loading ? \"Обработка ...\" : \"Оплатить\"}\n onClick={onClick}\n disabled={!data.canPay}\n />\n <p className=\"CalculatorOffer\">\n {\"ОформлÑÑ Ð¿Ð¾ÐºÑƒÐ¿ÐºÑƒ, вы ÑоглашаетеÑÑŒ Ñ \"}\n <a className=\"CalculatorLink\" href={config.privacyUrl} target='_blanc'>Договором оферты</a>\n </p>\n </div>\n </div >\n );\n}\n\nexport default Calculator;\n","import { useEffect, useState } from \"react\";\nimport config from \"../config/config\";\n\nexport const useFetch = (url: string) => {\n const [isLoading, setIsLoading] = useState(false)\n const [response, setResponse] = useState<any>()\n\n useEffect(() => {\n setIsLoading(true)\n fetch(`${config.apiUrl}/${url}`)\n .then(res => res.json())\n .then((response) => {\n setResponse(response.data)\n setIsLoading(false)\n })\n .catch((err) => {\n console.log('fetch err', err);\n setIsLoading(false)\n })\n }, [])\n\n return {\n isLoading,\n response\n }\n}","import React, { useCallback, useState } from \"react\";\nimport styles from \"./IntegerSelector.module.css\";\n\ninterface IProps {\n className?: string;\n value?: number;\n onChange?: (newValue: number) => void;\n}\n\nconst IntegerSelector: React.FC<IProps> = ({ className = \"\", onChange = () => {} }) => {\n const [value, setValue] = useState<number>(3);\n const [canIncrease, setCanIncrease] = useState(checkCanIncrease(value));\n const [canDecrease, setCanDecrease] = useState(checkCanDecrease(value));\n\n const updateCans = useCallback((newValue: number) => {\n setCanIncrease(checkCanIncrease(newValue));\n setCanDecrease(checkCanDecrease(newValue));\n }, []);\n\n const handleIncreaseClick = useCallback(() => {\n if (canIncrease) {\n const newValue = value + 1;\n updateCans(newValue);\n setValue(newValue);\n onChange(newValue);\n }\n }, [canIncrease, value, updateCans, onChange]);\n\n const handleDecreaseClick = useCallback(() => {\n if (canDecrease) {\n const newValue = value - 1;\n updateCans(newValue);\n setValue(newValue);\n onChange(newValue);\n }\n }, [canDecrease, value, updateCans, onChange]);\n\n const handleInputBlur = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n if (value >= 3) {\n setValue(value);\n onChange(value);\n updateCans(value);\n } else {\n setValue(3);\n onChange(3);\n updateCans(3);\n }\n },\n [onChange, value, updateCans],\n );\n\n const handleInputChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n if (event.target.value === '') {\n return setValue(0)\n }\n const newValue = Number.parseInt(event.target.value);\n if (!Number.isNaN(newValue) && newValue >= 1) {\n setValue(newValue);\n }\n },\n [],\n );\n\n return (\n <div className={`${styles.Root} ${className}`}>\n <div\n className={`${styles.IconContainer} ${styles.LeftIcon} ${canDecrease ? \"\" : styles.Disabled}`}\n onClick={handleDecreaseClick}\n >\n -\n </div>\n <div className={styles.InputContainer}>\n <input className={styles.Input} type=\"number\" value={value || ''} onChange={handleInputChange} onBlur={handleInputBlur} />\n </div>\n <div\n className={`${styles.IconContainer} ${styles.RightIcon} ${canIncrease ? \"\" : styles.Disabled}`}\n onClick={handleIncreaseClick}\n >\n +\n </div>\n </div>\n )\n}\n\nfunction checkCanIncrease(value: number): boolean {\n return true;\n}\n\nfunction checkCanDecrease(value: number): boolean {\n return value > 3;\n}\n\nexport default IntegerSelector;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { ICalculator } from '../../types/ICalculator';\nimport './Selector.css';\nimport IntegerSelector from \"../IntegerSelector/IntegerSelector\";\n\nconst monthPrice = 379;\nconst selectorIcon = \"images/Selector.png\";\n\nexport interface ISelectorProps {\n getPrice: (data: ICalculator) => void;\n showCountSelector?: boolean;\n useCorporateDiscount?: boolean;\n promoCalculator?: boolean;\n useAvoDiscount?: boolean;\n}\n\ninterface IDates {\n [key: string]: string;\n}\n\nconst dates: IDates = {\n \"1\": \"1 меÑÑц\",\n \"3\": \"3 меÑÑца\",\n \"6\": \"6 меÑÑцев\",\n \"12\": \"12 меÑÑцев\",\n};\n\nconst Selector: React.FC<ISelectorProps> = ({ getPrice, showCountSelector, useCorporateDiscount, promoCalculator, useAvoDiscount }) => {\n\n const [count, setCount] = useState(3);\n const [value, setValue] = useState(!promoCalculator ? 12 : 6);\n const [price, setPrice] = useState(monthPrice * (!promoCalculator ? 12 : 6));\n const [discount, setDiscount] = useState(!promoCalculator ? 52 : 40);\n const [corporateDiscount, setCorporateDiscount] = useState(40);\n\n useEffect(() => {\n let benefit = Math.round(price * discount / 100);\n\n if (useCorporateDiscount) {\n if (discount === 0) {\n benefit = 0;\n } else {\n const preciseBenefit = price * (1 - (1 - discount / 100) * (1 - corporateDiscount / 100));\n benefit = Math.ceil(preciseBenefit);\n }\n }\n\n if (useAvoDiscount) {\n benefit = benefit + Math.ceil((price - benefit) * 0.55);\n }\n\n getPrice(\n {\n count,\n newPrice: price,\n discount,\n corporateDiscount,\n benefit,\n month: value\n }\n )\n }, [value, count]);\n\n const handleMonthsChange = useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n setPrice(parseInt(event.target.value) * monthPrice);\n setValue(parseInt(event.target.value));\n if (parseInt(event.target.value) === 12) {\n setDiscount(52);\n setCorporateDiscount(40);\n } else if (parseInt(event.target.value) === 6) {\n setDiscount(useCorporateDiscount ? 40 : 54);\n setCorporateDiscount(40);\n } else if (parseInt(event.target.value) === 3) {\n setDiscount(30);\n setCorporateDiscount(0);\n } else {\n setDiscount(0);\n setCorporateDiscount(0);\n }\n },\n [setValue, setDiscount, useCorporateDiscount],\n );\n\n const handleCountChange = useCallback((newValue: number) => {\n \n if (newValue >= 3) {\n setCount(newValue);\n }\n }, [])\n\n return (\n <div>\n {showCountSelector && <IntegerSelector className=\"IntegerSelector\" onChange={handleCountChange} />}\n <div className=\"Selector\">\n <div>\n <select onChange={handleMonthsChange} className=\"InputDate\" defaultValue={12} disabled={useAvoDiscount}>\n {!useCorporateDiscount && ( // it's a bad way to write something like this, but no time for refactoring\n <option value={1}>1 меÑÑц</option>\n )}\n {!useCorporateDiscount && ( // it's a bad way to write something like this, but no time for refactoring\n <option value={3}>3 меÑÑца</option>\n )}\n <option value={6}>6 меÑÑцев</option>\n <option value={12}>12 меÑÑцев</option>\n </select>\n {dates[value.toString()]}\n <img className=\"SelectorImage\" src={selectorIcon} />\n </div>\n </div>\n </div>\n );\n};\n\nexport default Selector;\n","import axios from \"axios\";\n\nexport interface IResponse {\n httpStatus: number;\n responseStatus: number | null;\n success: boolean;\n timestamp: string | null;\n data: any | null;\n error: string | null;\n message: string | null;\n}\n\nexport type TQueryData = Record<string, unknown>;\n\nexport type THeaders = Record<string, string | number>;\n\nexport interface IRequestSettings {\n headers?: THeaders;\n retryCount?: number;\n timeout?: number;\n encoding?: string;\n}\n\nclass HttpService {\n get(url: string, queryData: TQueryData = {}, settings: IRequestSettings = {}): Promise<IResponse> {\n const urlWithQuery = this.addQueryParams(url, queryData);\n return request({\n method: \"GET\",\n url: urlWithQuery,\n ...settings,\n });\n }\n\n post(url: string, data: unknown = {}, settings: IRequestSettings = {}): Promise<IResponse> {\n return request({\n url,\n data,\n method: \"POST\",\n ...settings,\n });\n }\n\n delete(url: string, settings: IRequestSettings = {}): Promise<IResponse> {\n return request({\n url,\n method: \"DELETE\",\n ...settings,\n });\n }\n\n put(url: string, data: unknown = {}, settings: IRequestSettings = {}): Promise<IResponse> {\n return request({\n url,\n data,\n method: \"PUT\",\n ...settings,\n });\n }\n\n patch(url: string, data: unknown = {}, settings: IRequestSettings = {}): Promise<IResponse> {\n return request({\n url,\n data,\n method: \"PATCH\",\n ...settings,\n });\n }\n\n addQueryParams(url: string, params: TQueryData) {\n let resultUrl = url;\n let isFirst = true;\n for (const key in params) {\n const prefix = isFirst ? \"?\" : \"&\";\n resultUrl += `${prefix}${key}=${params[key]}`;\n isFirst = false;\n }\n return resultUrl;\n }\n}\n\ninterface IRequestParams {\n method: \"GET\" | \"POST\" | \"DELETE\" | \"PATCH\" | \"PUT\";\n url: string;\n data?: unknown;\n headers?: THeaders;\n retryCount?: number;\n timeout?: number;\n}\n\nasync function request({ data, method, timeout, url, headers = {} }: IRequestParams): Promise<IResponse> {\n try {\n const axiosResponse = await axios.request({\n method,\n url,\n headers,\n timeout,\n data: prepareData(data),\n transformRequest: (requestData, requestHeaders) => {\n setHeaderContentType(requestHeaders);\n return requestData;\n },\n });\n\n const serverData = axiosResponse.data;\n return makeResponse({\n httpStatus: axiosResponse.status,\n responseStatus: serverData.statusCode,\n success: serverData.success,\n timestamp: serverData.timestamp,\n data: serverData.data ?? null,\n message: serverData.message ?? null,\n error: serverData.error ?? null,\n });\n } catch (e) {\n const serverData = e?.response?.data ?? {};\n return makeResponse({\n httpStatus: e?.response?.status ?? 0,\n responseStatus: serverData.statusCode ?? null,\n success: false,\n data: serverData.data ?? null,\n error: serverData.error ?? null,\n message: serverData.message ?? null,\n });\n }\n}\n\nfunction makeResponse(params: Partial<IResponse>): IResponse {\n return {\n httpStatus: params.httpStatus ?? 0,\n responseStatus: params.responseStatus ?? null,\n success: params.success ?? false,\n data: params.data ?? null,\n timestamp: params.timestamp ?? null,\n error: params.error ?? null,\n message: params.message ?? null,\n };\n}\n\nfunction setHeaderContentType(headers: THeaders) {\n if (!headers[\"Content-Type\"]) {\n headers[\"Content-Type\"] = \"application/json; charset=utf-8\";\n }\n}\n\nfunction prepareData(data: unknown) {\n if (data instanceof FormData) {\n return data;\n }\n\n if (typeof data == \"object\" && data != null) {\n return JSON.stringify(data);\n }\n\n return data;\n}\n\nconst httpService = new HttpService();\nexport default httpService;\n","import config from \"../config/config\";\nimport httpService, {IResponse} from \"../http/HttpService\";\n\nconst PROMO_CODES_CODE_URL = `${config.apiUrl}/promocode-certificates`;\n\ninterface IActivatePromocode {\n promocode: string;\n}\n\nclass ActivatePromoCodeCodeApi {\n activate(data: IActivatePromocode): Promise<IResponse> {\n return httpService.get(`${PROMO_CODES_CODE_URL}/verification?promocode=${data.promocode}`, undefined, {headers: {\"Content-type\": \"application/pdf\"}, encoding: \"binary\",});\n }\n}\n\nexport default ActivatePromoCodeCodeApi;\n\n","import ActivatePromoCodeCodeApi from \"./api\";\n\nconst ACTIVATE_ERRORS: Record<number, string> = {\n 1013: \"Промокод уже активирован\",\n 1014: \"Промокод не найден\",\n 1015: \"Промокод не оплачен\",\n 1016: \"Ðекорректные Ñимволы в промокоде\",\n 1017: \"Ð’Ñ‹ уже активировали Ñтот промокод\",\n};\n\ninterface IActivateResult {\n success: boolean;\n data: any;\n errorMessage?: string;\n}\n\nclass ActivateCodePromocodeController {\n private api = new ActivatePromoCodeCodeApi();\n\n async activateCodePromocode(promocode: string): Promise<IActivateResult> {\n const response = await this.api.activate({\n promocode\n });\n\n return {\n success: response.success,\n data: response.data,\n errorMessage: ACTIVATE_ERRORS[response.responseStatus!] ?? undefined,\n };\n }\n}\n\nexport default ActivateCodePromocodeController;\n","import React, { useCallback, useState } from 'react';\nimport CustomButton from '../CustomButton/CustomButton';\nimport Selector from '../Selector/Selector';\nimport './PromoCalculator.css';\nimport { IMainScreenState } from \"../../types/IMainScreenState\";\nimport PhoneInput from 'react-phone-input-2';\nimport CustomInput from '../CustomInput/CustomInput';\nimport ActivateCodePromocodeController from '../../core/activateCodePromocode/controller';\nimport config from '../../core/config/config';\n\nexport interface ICalculatorProps {\n data: IMainScreenState;\n onClick?: () => void;\n onDataChange?: (state: IMainScreenState) => void;\n promoCalculator: boolean;\n}\n\nconst PromoCalculator: React.FC<ICalculatorProps> = ({ data, onClick, onDataChange = () => { }, promoCalculator }) => {\n const [price, setPrice] = useState(\n {\n newPrice: 379,\n discount: 34,\n benefit: 0,\n month: 12,\n }\n );\n const controller = new ActivateCodePromocodeController();\n const [promocodeDiscount, setPromocodeDiscount] = useState(1);\n const [phone, setPhone] = useState(\"\");\n const [phoneFlag, setPhoneFlag] = useState(false);\n const [code, setCode] = useState(false);\n const [codeData, setCodeData] = useState(\"\");\n const [error, setError] = useState(false);\n const [codeReq, setCodeReq] = useState(true);\n const dayDiscount = (price.newPrice / price.month) - ((price.newPrice / price.month) * (price.discount / 100));\n const dayDiscountWithPromocode = (code && !error) ? (dayDiscount * (promocodeDiscount / 100)) : 0;\n\n\n const getPrice = useCallback((priceInfo) => {\n setPrice(priceInfo);\n onDataChange({\n ...data,\n months: priceInfo.month,\n price: Math.floor((priceInfo.newPrice - priceInfo.benefit - ((code && !error) ? (((priceInfo.newPrice - priceInfo.benefit) * promocodeDiscount) / 100) : 0))),\n discount: priceInfo.discount,\n });\n }, [data, onDataChange, setPrice]);\n\n const handleCodeChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const text = event.target.value.replace(/\\W/g, '').toUpperCase();\n setCodeData(text);\n if(text.length > 3) {\n setCodeReq(false);\n } else {\n setCodeReq(true);\n }\n }, [setCodeData, codeData])\n\n const handlePhone = useCallback(\n (phone: string) => {\n setPhone(phone);\n onDataChange({\n ...data,\n phone,\n })\n if (phone.length >= 4 && phone.length <= 20) {\n setPhoneFlag(true);\n } else {\n setPhoneFlag(false);\n }\n }, [setPhone, setPhoneFlag, data, onDataChange])\n\n const onClickCode = useCallback(async () => {\n const activateResult = await controller.activateCodePromocode(codeData);\n if (activateResult.success) {\n setCode(true);\n setError(false);\n setPromocodeDiscount(activateResult.data.discount);\n const sumBenefit = price.newPrice - price.benefit;\n onDataChange({\n ...data,\n price: Math.floor((sumBenefit - ((sumBenefit * activateResult.data.discount) / 100) )),\n });\n return;\n } else {\n const sumBenefit = price.newPrice - price.benefit;\n setError(true);\n setCode(false);\n setPromocodeDiscount(1);\n onDataChange({\n ...data,\n price: Math.floor(sumBenefit),\n });\n }\n }, [setCode, codeData, onDataChange, setPromocodeDiscount, promocodeDiscount])\n\n const onClickResetCode = useCallback(() => {\n setCodeData('');\n const sumBenefit = price.newPrice - price.benefit;\n setPromocodeDiscount(1);\n onDataChange({\n ...data,\n price: Math.floor(sumBenefit),\n });\n setCodeReq(true);\n setCode(false);\n }, [setCode])\n\n return (\n <div className=\"CalculatorBlock\">\n <div>\n <p className=\"CalculatorTitle\">Оформить подпиÑку</p>\n <div className=\"CalculatorPhoneInput\">\n <PhoneInput country={'ru'} value={phone} inputProps={{required: true, autoFocus: true}} onChange={handlePhone} specialLabel=\"\" />\n </div>\n <p className=\"CalculatorAdditionalText\">Ðа Ñтот номер телефона будет оформлена подпиÑка</p>\n <div className=\"CalculatorBottomBlock\">\n <div className=\"CalculatorBottomLeftBlock\">\n <p className=\"CalculatorTextFirst\">МеÑÑцев</p>\n <p className=\"CalculatorText\">Цена</p>\n {price.month !== 1 && <p className=\"CalculatorText\">Скидка за период</p>}\n {code && <p className=\"CalculatorText\">Скидка по коду</p>}\n {<p className=\"CalculatorTextSum\">Итого к оплате</p>}\n {price.month !== 1 && <p className=\"CalculatorTextGray\">Цена за 1 меÑÑц</p>}\n </div>\n <div className=\"CalculatorBottomRightBlock\">\n <Selector getPrice={getPrice} promoCalculator={promoCalculator} />\n <div className=\"CalculatorBottomRightBlockText\">\n <p className=\"CalculatorText\">{(price.newPrice).toLocaleString('ru-RU') || 0} <span className=\"RubleIcon\">₽</span></p>\n {price.month !== 1 && <p className=\"CalculatorText\">-{price.discount}%</p>}\n {code && <p className=\"CalculatorText\">-{promocodeDiscount}%</p>}\n {<p className=\"CalculatorTextSum\">{(price.newPrice - price.benefit - ((code && !error) ? (((price.newPrice - price.benefit) * promocodeDiscount) / 100) : 0)).toLocaleString('ru-RU') || 0} <span className=\"RubleIcon\">₽</span></p>}\n {price.month !== 1 && <p className=\"CalculatorTextGray\">{((price.newPrice / price.month) - ((price.newPrice / price.month) * (price.discount / 100)) - dayDiscountWithPromocode).toLocaleString('ru-RU') || 0} <span className=\"RubleIconGray\">₽</span></p>}\n </div>\n </div>\n </div>\n \n </div>\n <div className=\"CalculatorFooter\">\n <div className=\"CalculatorDiscountContainer\">\n <div className=\"CalculatorDiscountBlock\">\n {!code && <CustomInput placeholder=\"У Ð¼ÐµÐ½Ñ ÐµÑÑ‚ÑŒ код на Ñкидку\" onChange={(value) => handleCodeChange(value)} inputClassName=\"CalculatorDiscountInput\" minLength={4} maxLength={20} />}\n {code && !error && <p className=\"CalculatorCodeText\">Ваш код уÑпешно применен</p>}\n {!code && <CustomButton title=\"Применить\" onClick={onClickCode} className=\"CalculatorDiscountButton\" disabled={codeReq} />}\n </div>\n {code && <div className=\"CalculatorErrorBlock\">\n <CustomButton title=\"Отменить\" onClick={onClickResetCode} className=\"CalculatorDiscountButton\" />\n </div>}\n </div>\n {error && <div className=\"CalculatorErrorBlock\">\n <p className=\"CalculatorCodeTextError\">Указанный код на Ñкидку не найден или не дейÑтвителен</p>\n </div>}\n \n <CustomButton title=\"Перейти к оплате\" onClick={onClick} disabled={!phoneFlag} />\n <p className=\"CalculatorOffer\">\n {\"ОформлÑÑ Ð¿Ð¾ÐºÑƒÐ¿ÐºÑƒ, вы ÑоглашаетеÑÑŒ Ñ \"}\n <a className=\"CalculatorLink\" href={config.privacyUrl} target='_blanc'>Договором оферты</a>\n </p>\n </div>\n </div>\n );\n}\n\nexport default PromoCalculator;\nfunction setError(arg0: any) {\n throw new Error('Function not implemented.');\n}\n\n","import React, { } from 'react';\nimport Calculator from '../Calculator/Calculator';\nimport { IMainScreenState } from \"../../types/IMainScreenState\";\nimport PromoCalculator from '../PromoCalculator/PromoCalculator';\nimport { useHolidaysTheme } from '../../themes/useTheme';\nimport { useTimer } from '../../themes/useTimer';\nconst birthdayIcon = \"images/BirthdayIcon.png\";\nconst giftBox = \"images/GiftBox.png\";\n\ninterface IProps {\n promoCalculator?: boolean;\n data: IMainScreenState;\n onBuyClick: () => void;\n onDataChange: (newState: IMainScreenState) => void;\n}\n\nconst UpperMainBlock: React.FC<IProps> = ({ data, onBuyClick, onDataChange, promoCalculator }) => {\n const { currentDayNumber, daysLeft, themeText, styles, isHoliday, isPink, isBirthday, isBlackFriday, nextTimeout } = useHolidaysTheme()\n // console.log('isHoliday', isHoliday)\n useTimer(isHoliday, nextTimeout)\n // console.log('nextTimeout', nextTimeout)\n const createMarkup = (text: string, margin?: number) => {\n if (!text) return ''\n return text.split('\\n').map((str, key) => <p key={key} style={{ margin: margin || 0 }}>{str}</p>)\n }\n\n return (\n <div className={styles.UpperMainRoot}>\n {isBirthday ?\n <img className=\"AppIcon\" src={birthdayIcon} /> :\n <div className={styles.ProstoAppIcon}></div>\n }\n {(isHoliday && nextTimeout) &&\n <div className={styles.Timer} style={{ textAlign: 'center' }}>\n <div className={styles.TimerText}>\n До конца {isPink && daysLeft > 0 ? currentDayNumber + ' днÑ' : ''} акции оÑталоÑÑŒ:\n </div>\n <div style={{ height: 100 }} id=\"timercec83824777491b4b59b1d363b66b0190\"></div>\n </div>\n }\n <div className={styles.BackgroundImageContainer}>\n <div className={styles.BackgroundImage} />\n </div>\n <div className={styles.MainBlock}>\n <div className={styles.LeftTextContainer} />\n <div className={styles.MainContainer}>\n {promoCalculator\n ? <PromoCalculator data={data} onClick={onBuyClick} onDataChange={onDataChange} promoCalculator={promoCalculator} />\n : <Calculator\n title={themeText.calcTitle}\n subtitle={themeText.calcSubtitle}\n data={data}\n onClick={onBuyClick}\n onDataChange={onDataChange}\n />}\n </div>\n <a className={styles.HowItWorks} href=\"#advices\">Как Ñто работает?</a>\n <div className={styles.TextContainer}>\n <div className={styles.MainTitle}>{createMarkup(themeText.title, 15)}</div>\n <div className={styles.MainSubtitle || styles.AdditionalText}>{createMarkup(themeText.subtitle, 15)}</div>\n <div className={styles.AdditionalText}>{createMarkup(themeText.subtitleExtra, 15)}</div>\n </div>\n\n {isBlackFriday && <div className={styles.WavesBackground} />}\n {isBlackFriday &&\n <p className={styles.MobileTitle}>\n {createMarkup(themeText.calcTitle)}\n <p className=\"CalculatorSubitle\">{themeText.calcSubtitle}</p>\n <img src={giftBox} width={'100%'} />\n </p>\n }\n </div>\n </div>\n );\n}\n\nexport default UpperMainBlock;\n","import moment from \"moment\";\nimport { useLayoutEffect } from \"react\";\n\nexport const useTimer = (show: boolean, tillDate?: number) => {\n // console.log('tillDate', tillDate)\n\n // from https://megatimer.ru\n\n useLayoutEffect(() => {\n if (!show) return\n var _id = \"cec83824777491b4b59b1d363b66b0190\";\n new window.MegaTimer(\n _id, {\n \"view\": [1, 1, 1, 1],\n \"type\": {\n \"currentType\": \"1\",\n \"params\": { \"usertime\": false, \"tz\": \"3\", \"utc\": tillDate }\n },\n \"design\": {\n \"type\": \"plate\", \n \"params\": {\n \"round\": \"0\", \n \"background\": \"opacity\", \n \"effect\": \"slide\", \n \"space\": \"0\", \n \"separator-margin\": \"19\",\n \"number-font-family\": { \n \"family\": \"Comfortaa\", \"link\": \"<link href='//fonts.googleapis.com/css?family=Comfortaa&subset=latin,cyrillic' rel='stylesheet' type='text/css'>\" \n },\n \"number-font-size\": \"24\", \n \"number-font-color\": \"#919191\", \n \"padding\": \"6\", \n \"separator-on\": true, \n \"separator-text\": \":\", \n \"text-on\": true,\n \"text-font-family\": { \n \"family\": \"Arial\" \n }, \n \"text-font-size\": \"12\", \n \"text-font-color\": \"#999999\"\n }\n }, \n \"designId\": 4, \n \"theme\": \"white\", \n \"width\": 630, \n \"height\": 98\n })\n }, [show])\n \n}","import { TPayMethod } from \"../../types/TPayMethod\";\nimport config from \"../config/config\";\nimport httpService from \"../http/HttpService\";\nimport { TPaymentMethod } from \"./controller\";\n\nconst PROMO_CODES_URL = `${config.apiUrl}/promocodes`;\n\ninterface ICreatePromoCodeRequest {\n phone?: string;\n email: string;\n months: number;\n amountTotal: number;\n price: number;\n isCorporate: boolean;\n method: TPayMethod;\n text?: string;\n discount?: number;\n discountCorporation?: number;\n companyName?: string,\n inn?: string,\n workPhone?: string,\n legalAddress?: string,\n paymentMethod?: TPaymentMethod,\n isForever?: boolean\n}\n\ninterface ICreatePromoCodeResponse {\n id: number;\n text: string;\n amountTotal: number;\n amountLeft: number;\n months: number;\n price: number;\n phone: string;\n email: string;\n method: string;\n isCorporate: boolean;\n creationDate: string;\n paymentDate: string;\n link?: string;\n}\n\nclass BuyGiftSubscriptionApi {\n async createPromoCode(data: ICreatePromoCodeRequest): Promise<ICreatePromoCodeResponse | null> {\n const response = await httpService.post(`${PROMO_CODES_URL}/buy`, data);\n return response.success ? response.data as ICreatePromoCodeResponse : null;\n }\n}\n\nexport default BuyGiftSubscriptionApi;\n","import BuyGiftSubscriptionApi from \"./api\";\nimport config from \"../config/config\";\nimport \"./TinkoffFrameFix.css\";\n\ninterface IPromoCode {\n id: number;\n text: string;\n price: number;\n amountTotal: number;\n paymentLink?: string;\n}\n\nexport type TPaymentMethod = 'tinkoff' | 'stripe'\n\nclass BuyGiftSubscriptionController {\n private api = new BuyGiftSubscriptionApi();\n\n async buyPromoCode(email: string, months: number, price: number, discount: number, paymentMethod: TPaymentMethod, isForever?: boolean): Promise<IPromoCode | false> {\n const promoCode = await this.createPromoCode(email, months, price, discount, paymentMethod, isForever);\n if (!promoCode) {\n return false\n }\n // if (!await this.requestUserPayment(email, promoCode, months)) {\n // return false;\n // }\n\n return promoCode;\n }\n\n private async createPromoCode(email: string, months: number, price: number, discount: number, paymentMethod?: TPaymentMethod, isForever?: boolean): Promise<IPromoCode | null> {\n const response = await this.api.createPromoCode({\n isCorporate: false,\n method: \"card\",\n amountTotal: 1,\n email,\n months,\n price,\n discount,\n paymentMethod,\n isForever\n })\n\n if (!response) {\n return null;\n }\n\n return {\n id: response.id,\n text: response.text,\n price: response.price,\n amountTotal: response.amountTotal,\n paymentLink: response.link,\n }\n }\n\n private async requestUserPayment(email: string, promoCode: IPromoCode, months: number): Promise<boolean> {\n const form = this.createTinkoffForm({\n totalPrice: promoCode.amountTotal * promoCode.price,\n orderId: promoCode.id,\n description: `ПодпиÑка на ${months} меÑÑцев Ð´Ð»Ñ ${email}`,\n email\n })\n window.pay(form);\n return true;\n }\n\n private createTinkoffForm(params: {\n totalPrice: number,\n orderId: number,\n description: string,\n email: string,\n }) {\n const receiptData =\n {\n Email: params.email,\n EmailCompany: \"help@prostoapp.com\",\n Taxation: \"usn_income\",\n Items: [{\n Name: \"Cертификат на подпиÑку на приложение Prosto\",\n Price: params.totalPrice * 100,\n Quantity: 1.00,\n Amount: params.totalPrice * 100,\n Tax: \"none\",\n }],\n }\n\n const form = document.createElement(\"form\");\n\n const fields = document.createDocumentFragment();\n fields.appendChild(this.createInput(\"terminalkey\", config.tinkoffTerminalKey));\n fields.appendChild(this.createInput(\"frame\", \"true\"));\n fields.appendChild(this.createInput(\"language\", \"ru\"));\n fields.appendChild(this.createInput(\"amount\", params.totalPrice.toString()));\n fields.appendChild(this.createInput(\"order\", params.orderId.toString()));\n fields.appendChild(this.createInput(\"description\", params.description));\n fields.appendChild(this.createInput(\"email\", params.email));\n fields.appendChild(this.createInput(\"receipt\", JSON.stringify(receiptData)));\n\n\n form.appendChild(fields);\n\n return form;\n }\n\n private createInput(name: string, value: string) {\n const input = document.createElement(\"input\");\n input.type = \"hidden\";\n input.name = name;\n input.value = value;\n return input;\n }\n}\n\nexport default BuyGiftSubscriptionController\n","import React, { useCallback, useEffect, useState } from 'react';\nimport BottomMainBlock from '../../components/BottomMainBlock/BottomMainBlock';\nimport Footer from '../../components/Footer/Footer';\nimport UpperMainBlock from '../../components/UpperMainBlock/UpperMainBlock';\nimport BuyGiftSubscriptionController from \"../../core/buyGiftSubscription/controller\";\nimport { IMainScreenState } from \"../../types/IMainScreenState\";\nimport config from '../../core/config/config';\nimport domainRouter from \"../../navigation/domainRouter\";\nimport debounce from \"lodash.debounce\";\nimport { useHolidaysTheme } from '../../themes/useTheme';\nimport ym from 'react-yandex-metrika';\n\nconst controller = new BuyGiftSubscriptionController();\nconst MainScreen: React.FC = () => {\n console.log('podarok')\n const { isBlackFriday} = useHolidaysTheme()\n\n const [screenState, setScreenState] = useState<IMainScreenState>({\n email: \"\",\n confirmEmail: false,\n promocodeId: null,\n text: \"\",\n months: 0,\n price: 0,\n phone: \"\",\n discount: 0,\n canPay: false,\n paymentMethod: 'tinkoff',\n });\n\n const handleDataChange = useCallback((newState: IMainScreenState) => {\n setScreenState({\n ...newState,\n canPay: isValidEmail(newState.email) && newState.confirmEmail,\n });\n }, []);\n\n const handleBuyClick = useCallback(debounce(async () => {\n // ym('reachGoal', 'oplatit');\n window.generalPixel.postClick('a2');\n const { email, months, price, discount, paymentMethod } = screenState\n const promocode = await controller.buyPromoCode(email, months, price, discount, paymentMethod);\n\n setScreenState({ ...screenState, loading: true })\n\n if (!promocode) {\n setScreenState({ ...screenState, loading: false })\n alert(\"Ðе получилоÑÑŒ. Попробуйте ещё раз.\");\n return;\n }\n\n if (promocode.paymentLink) {\n window.location.href = promocode.paymentLink\n } else {\n setScreenState({ ...screenState, loading: false })\n alert(\"Ðе получилоÑÑŒ Ñгенерировать форму Ð´Ð»Ñ Ð¾Ð¿Ð»Ð°Ñ‚Ñ‹! Попробуйте ещё раз.\");\n }\n\n }, 2000, { leading: true, trailing: false }), [screenState])\n\n const handleActivateClick = useCallback(() => {\n domainRouter.go(config.codeRoute);\n }, []);\n\n // useEffect(() => {\n // window.location.replace(\"https://wow.prostoapp.ru\");\n // }, [])\n\n return (\n <>\n <UpperMainBlock\n data={screenState}\n onDataChange={handleDataChange}\n onBuyClick={handleBuyClick}\n />\n <BottomMainBlock\n onActivateClick={handleActivateClick}\n />\n <Footer backgroundColor={isBlackFriday ? '#EFECEC' : '#fff'} />\n </>\n );\n}\n\nexport function isValidEmail(value: string): boolean {\n const EMAIL_REG = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return EMAIL_REG.test(value);\n}\n\nexport const createMarkup = (text?: string) => {\n if (!text) return ''\n return text.split('\\n').map((str, key) => <p key={key} style={{ margin: 0 }}>{str}</p>)\n}\n\nexport default MainScreen;\n","import React, { useCallback, useState } from 'react';\n\ntype CertificateSheetProps = {\n partner?: string | null\n}\n\nconst PARTNERS: any = {\n 'empty': {},\n 'fitstars': {\n name: 'Fitstars',\n color: '#FD2BE6',\n present: \"images/partners/fitstars-present.png\",\n logo: \"images/partners/fitstars.png\",\n title: 'â„–1 фитнеÑ-платформа Ð´Ð»Ñ Ð´Ð¾Ð¼Ð°ÑˆÐ½Ð¸Ñ… тренировок в РоÑÑии',\n gift: 'МеÑÑц тренировок без оплаты',\n code: 'PROSTOAPP',\n instructionsLink: 'http://wow.prostoapp.ru/fitstars',\n info: \"images/partners/fitstars-info.png\",\n },\n 'yasno': {\n name: 'ЯÑно',\n color: '#42B2FC',\n present: \"images/partners/yasno-present.png\",\n logo: \"images/partners/yasno.png\",\n title: 'ÑÐµÑ€Ð²Ð¸Ñ Ð¿Ð¾Ð´Ð±Ð¾Ñ€Ð° и конÑультаций Ñ Ð¿Ñихологом онлайн',\n gift: 'Скидка 20% на первые 3 конÑультации',\n code: 'YASNO',\n instructionsLink: 'http://wow.prostoapp.ru/yasno',\n info: \"images/partners/yasno-info.png\",\n },\n 'synchro': {\n name: 'СинхронизациÑ',\n color: '#A67CB6',\n present: \"images/partners/synchro-present.png\",\n logo: \"images/partners/synchro.png\",\n title: `Ñто онлайн-лекторий Ñ ÐºÑƒÑ€Ñами, которые вдохновлÑÑŽÑ‚. \nВырвитеÑÑŒ из рутины и найдите новые \nтемы Ð´Ð»Ñ Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ð±Ð»Ð¸Ð·ÐºÐ¸Ð¼Ð¸, подарив\nÑебе интереÑный и развивающий доÑуг \nна полгода вперед`,\n gift: 'Скидка 30% на 6 меÑÑцев подпиÑки',\n code: 'ПРОСТО',\n instructionsLink: 'http://wow.prostoapp.ru/synchronize',\n info: \"images/partners/synchro-info.png\",\n },\n 'sekta': {\n name: '#Sekta',\n color: '#3ED8C4',\n present: \"images/partners/sekta-present.png\",\n logo: \"images/partners/sekta.png\",\n title: `онлайн-школа фитнеÑа Ñ Ð½Ð°ÑƒÑ‡Ð½Ñ‹Ð¼ подходом `,\n gift: 'Скидка 10% при оплате любого комплекÑного курÑа',\n code: 'PROSTO',\n instructionsLink: 'http://wow.prostoapp.ru/sektaschool',\n info: \"images/partners/sekta-info.png\",\n },\n 'studio': {\n name: 'Prosto Studio',\n color: '#5C84B2',\n present: \"images/partners/studio-present.png\",\n logo: \"images/partners/studio.png\",\n title: `телеÑные практики Ð´Ð»Ñ ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñмоциональным ÑоÑтоÑнием.`,\n gift: 'ДоÑтуп к 3 занÑтиÑм без оплаты',\n code: 'PROSTO',\n instructionsLink: 'https://t.me/+UWSImQtTFVs2ZDNi',\n info: \"images/partners/studio-info.png\",\n }\n}\n\nconst PartnerCertificate = ({ partner }: CertificateSheetProps) => {\n\n const params = PARTNERS[partner || 'empty']\n\n const [copiedToClipboard, setCopiedToClipboard] = useState(false)\n\n const copyCodeToClipboard = useCallback(() => {\n if (copiedToClipboard) {\n return setCopiedToClipboard(false)\n }\n navigator.clipboard.writeText(params.code || '')\n setCopiedToClipboard(true)\n }, [params, copiedToClipboard])\n\n return (\n params?.name ?\n <>\n <div className='hideOnMobile' style={{\n paddingTop: 64,\n display: 'flex',\n flexDirection: 'column',\n fontFamily: 'Gotham Pro Regular',\n fontSize: '16px',\n lineHeight: '20px',\n }}>\n <div>\n <img src={params.present} width=\"100\" height=\"72\" />\n </div>\n\n <p style={{\n fontFamily: 'Gilroy Semibold',\n fontSize: 32,\n marginTop: 12,\n }}>\n Подарок от партнёра\n </p>\n <div style={{\n width: 886,\n alignSelf: 'center',\n display: \"flex\",\n flexDirection: 'row',\n justifyContent: 'center',\n background: '#F5F1EF',\n borderRadius: 16,\n padding: 32,\n overflow: \"hidden\"\n }}>\n <div style={{ marginRight: 16 }}>\n <img src={params.logo} width=\"auto\" height=\"60\" />\n </div>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n alignContent: 'flex-start',\n paddingRight: 80\n }}>\n <p style={{ textAlign: 'left', marginTop: 6, }}>\n <b style={{ color: params.color }}>{params.name}</b> - {params.title}\n </p>\n <p style={{\n marginTop: 6,\n textAlign: 'left',\n fontFamily: 'Gilroy Semibold',\n fontSize: 26,\n lineHeight: '28px',\n color: params.color,\n }}>\n {params.gift}\n </p>\n {partner === 'studio' ? <>\n <div style={{ display: 'flex', flexDirection: \"column\", alignItems: 'flex-start' }}>\n <a href={params.instructionsLink}>\n <img src={'images/partners/studio-link.png'} width=\"274\" height=\"48\" />\n </a>\n <div style={{ display: 'flex', gap: 15, alignItems: 'center', marginTop: 15 }}>\n СоÑтоÑние\n <img src={'images/partners/studio-arrow.png'} width=\"23\" height=\"15\" />\n ДейÑтвие\n <img src={'images/partners/studio-arrow.png'} width=\"23\" height=\"15\" />\n Результат\n </div>\n </div>\n </> : <>\n <div style={{\n display: 'flex',\n alignItems: 'center',\n fontFamily: 'Gilroy Semibold',\n fontSize: 20,\n }}>\n Промокод\n <div style={{\n marginLeft: 16,\n width: 236,\n height: 38,\n background: copiedToClipboard ? \"#000\" : \"#fff\",\n borderRadius: 8,\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer'\n }}\n onClick={copyCodeToClipboard}\n >\n {copiedToClipboard ?\n <p style={{\n margin: '0 auto',\n padding: 0,\n color: \"#fff\",\n fontFamily: 'Gilroy Semibold',\n fontSize: 18,\n }}\n >\n {'Скопировано'}\n </p> :\n <>\n <p style={{\n margin: '0 auto',\n padding: 0,\n fontFamily: 'Gilroy Bold',\n fontSize: 22,\n }}\n >\n {params.code}\n </p>\n <img\n src=\"images/pink/copy.png\"\n width=\"24\"\n height=\"24\"\n style={{ marginRight: 16 }}\n />\n </>\n }\n </div>\n </div>\n <p style={{\n marginTop: 32,\n textAlign: 'left',\n }}>ИнÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ Ð¿Ð¾ промокоду —\n <a style={{\n color: params.color,\n marginLeft: 5\n }}\n href={params.instructionsLink}>по ÑÑылке.</a>\n </p>\n </>\n }\n\n </div>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n width: 355,\n }}>\n <img src={params.info} width=\"345\" height=\"auto\" />\n </div>\n </div>\n </div >\n <div className='hideOnDesktop' style={{\n paddingTop: 64,\n display: 'flex',\n flexDirection: 'column',\n fontFamily: 'Gotham Pro Regular',\n fontSize: '16px',\n lineHeight: '20px',\n }}>\n\n <div style={{\n width: 343,\n alignSelf: 'center',\n background: '#F5F1EF',\n borderRadius: 16,\n overflow: \"hidden\"\n }}>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n alignItems: 'center',\n padding: 16,\n paddingTop: 32\n }}>\n <img src={params.present} width=\"100\" height=\"72\" />\n <p style={{\n fontFamily: 'Gilroy Semibold',\n fontSize: 24,\n lineHeight: '32px',\n marginTop: 12,\n }}>\n Подарок <br />\n от партнёра\n </p>\n <div style={{ display: 'flex' }}>\n <div style={{ marginRight: 16 }}>\n <img src={params.logo} width=\"auto\" height=\"60\" />\n </div>\n <p style={{ textAlign: 'left', fontSize: 14, marginTop: 0, }}>\n <b style={{ color: params.color }}>{params.name}</b> - {params.title}\n </p>\n </div>\n <p style={{\n marginTop: 6,\n textAlign: 'center',\n fontFamily: 'Gilroy Semibold',\n fontSize: 22,\n lineHeight: '28px',\n color: params.color,\n }}>\n {params.gift}\n </p>\n {partner === 'studio' ? <>\n <div style={{ display: 'flex', flexDirection: \"column\", alignItems: 'center' }}>\n <a href={params.instructionsLink}>\n <img src={'images/partners/studio-link.png'} width=\"274\" height=\"48\" />\n </a>\n <div style={{ display: 'flex', gap: 10, alignItems: 'center', marginTop: 15, marginBottom: 25, fontSize: 14, }}>\n СоÑтоÑние\n <img src={'images/partners/studio-arrow.png'} width=\"23\" height=\"15\" />\n ДейÑтвие\n <img src={'images/partners/studio-arrow.png'} width=\"23\" height=\"15\" />\n Результат\n </div>\n </div>\n </> : <>\n <div style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n }}>\n <p style={{\n padding: 0,\n margin: 0,\n fontFamily: 'Gilroy Semibold',\n fontSize: 18,\n marginBottom: 15\n }}>Промокод</p>\n\n <div style={{\n marginLeft: 16,\n width: 236,\n height: 38,\n background: copiedToClipboard ? \"#000\" : \"#fff\",\n borderRadius: 8,\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer'\n }}\n onClick={copyCodeToClipboard}\n >\n {copiedToClipboard ?\n <p style={{\n margin: '0 auto',\n padding: 0,\n color: \"#fff\",\n fontFamily: 'Gilroy Semibold',\n fontSize: 18,\n }}\n >\n {'Скопировано'}\n </p> :\n <>\n <p style={{\n margin: '0 auto',\n padding: 0,\n fontFamily: 'Gilroy Bold',\n fontSize: 22,\n }}\n >\n {params.code}\n </p>\n <img\n src=\"images/pink/copy.png\"\n width=\"24\"\n height=\"24\"\n style={{ marginRight: 16 }}\n />\n </>\n }\n </div>\n </div>\n <p style={{\n marginTop: 32,\n textAlign: 'center',\n fontSize: 14,\n marginBottom: 30,\n }}>ИнÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ Ð¿Ð¾ промокоду — <br />\n <a style={{\n color: params.color,\n marginLeft: 5\n }}\n href={params.instructionsLink}>по ÑÑылке.</a>\n </p>\n </>\n }\n <div style={{\n display: \"flex\",\n alignSelf: 'center',\n flexDirection: 'column',\n }}>\n <img src={params.info} width=\"301\" height=\"auto\" />\n </div>\n\n </div>\n </div>\n </div >\n </>\n : <></>\n );\n}\n\nexport default PartnerCertificate;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport PartnerCertificate from './PartnerCertificate';\nimport config from '../../core/config/config';\n\ntype CertificateSheetProps = {\n visible: boolean\n code: string | null,\n id: string | null,\n isForever: string | null,\n partner: string | null,\n}\n\nconst CertificateSheet = ({ code, id, isForever, partner }: CertificateSheetProps) => {\n // console.log('visible', visible)\n const [visible, setVisible] = useState(false)\n const [copiedToClipboard, setCopiedToClipboard] = useState(false)\n\n const copyCodeToClipboard = useCallback(() => {\n if (copiedToClipboard) {\n return setCopiedToClipboard(false)\n }\n navigator.clipboard.writeText(code || '')\n setCopiedToClipboard(true)\n }, [code, copiedToClipboard])\n\n const downloadPdf = useCallback(() => {\n if (id === null) return alert('Сертификат не валидный')\n const PDF_DOWNLOAD_URL = `${config.apiUrl}/promocodes`;\n window.location.href = `${PDF_DOWNLOAD_URL}/${id}/certificate?text=${code}`\n }, [code, id])\n\n useEffect(() => {\n setVisible(true)\n })\n\n return (\n <>\n <div className='hideOnMobile' style={{\n position: 'absolute',\n top: 0,\n opacity: visible ? 1 : 0,\n zIndex: 1000,\n transition: 'opacity ease 500ms',\n alignSelf: \"center\",\n width: '100%',\n flexDirection: 'column',\n backgroundColor: '#fff',\n margin: '0 auto',\n textAlign: 'center',\n paddingBottom: 32,\n }}>\n <div style={{ padding: 30 }}>\n <img src=\"https://icons.prostoapp.com/podarok/pink/icon.png\" width=\"60\" height=\"60\" />\n </div>\n <div style={{ zIndex: 2, width: 886, alignSelf: 'center' }}>\n <img\n src=\"images/pink/certificate-top-banner.png\"\n width=\"886\"\n height=\"340\"\n />\n {isForever === null ?\n <></> :\n <p style={{\n position: \"absolute\",\n marginLeft: 550,\n marginTop: -150,\n width: 245,\n fontSize: '18px',\n lineHeight: '28px',\n textAlign: 'center',\n color: '#EB7D8F'\n }}>\n ПоздравлÑем Ñ Ð¿Ð¾ÐºÑƒÐ¿ÐºÐ¾Ð¹\n доÑтупа Prosto {isForever === 'true' ? 'ÐавÑегда ' : 'на год '} <br />\n Ñо Ñкидкой 72%!\n </p>\n }\n </div>\n\n <div style={{\n marginTop: -170,\n alignSelf: \"center\",\n backgroundColor: '#FEE8EB',\n width: 1104,\n borderRadius: 16,\n overflow: 'hidden',\n paddingTop: 190,\n }}>\n <p className=\"TitleText\"\n style={{\n margin: '0 auto',\n padding: 0,\n }}\n >\n Подарочный Ñертификат\n </p>\n <div style={{\n width: 414,\n height: 56,\n margin: '30px auto 10px auto',\n background: copiedToClipboard ? \"#EB7D8F\" : \"#fff\",\n borderRadius: 12,\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer'\n }}\n onClick={copyCodeToClipboard}\n >\n {copiedToClipboard ?\n <p style={{\n margin: '0 auto',\n padding: 0,\n color: \"#fff\",\n fontWeight: 'bold'\n }}\n >\n {'Скопировано'}\n </p> :\n <>\n <p className=\"TitleText\"\n style={{\n margin: '0 auto',\n padding: 0,\n }}\n >\n {code || ''}\n </p>\n <img\n src=\"images/pink/copy.png\"\n width=\"24\"\n height=\"24\"\n style={{ marginRight: 16 }}\n />\n </>\n }\n </div>\n <a style={{ textDecoration: 'none', color: '#000' }} href='https://code.prostoapp.ru'>\n Ðктивируйте на Ñайте <b>code.prostoapp.ru</b>\n </a>\n <div style={{\n width: 196,\n height: 30,\n margin: '40px auto',\n borderRadius: 8,\n border: '1px solid #000',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'pointer'\n }}\n onClick={downloadPdf}\n >\n <img\n src=\"images/pink/print.png\"\n width=\"16\"\n height=\"16\"\n />\n <p style={{ marginLeft: 8 }}>\n {'РаÑпечатать'}\n </p>\n </div>\n {/* <div style={{\n position: 'absolute',\n marginTop: -288,\n }}>\n <img\n src=\"images/pink/YuraYulia.png\"\n width=\"306\"\n height=\"288\"\n />\n </div> */}\n </div>\n\n <p style={{\n fontFamily: 'Gilroy Semibold',\n fontSize: 32,\n }}>\n Как пользоватьÑÑ?\n </p>\n <div style={{\n display: \"flex\",\n flexDirection: 'row',\n justifyContent: 'center'\n }}>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n alignContent: 'flex-start',\n paddingRight: 80\n }}>\n <div style={{\n display: \"flex\",\n flexDirection: 'row',\n marginTop: 20,\n }}>\n <img\n src={\"images/pink/ticket.png\"}\n width={50}\n height={35}\n style={{\n marginTop: 30,\n paddingRight: 30\n }}\n />\n <p className=\"CertificateText\" style={{ textAlign: 'left', }}>\n Зайдите на Ñайт <br />\n <a style={{ color: '#EB7D8F' }}\n href='https://code.prostoapp.ru'> code.prostoapp.ru </a><br />\n и активируйте промокод\n </p>\n </div>\n\n <div style={{\n display: \"flex\",\n flexDirection: 'row',\n }}>\n <img\n src={\"images/pink/letter.png\"}\n width={40}\n height={48}\n style={{\n marginTop: 30,\n paddingRight: 30\n }}\n />\n <p className=\"CertificateText\" style={{ textAlign: 'left', }}>\n Выберите номер телефона или адреÑ<br />\n почты, который будете иÑпользовать<br />\n Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в приложение\n </p>\n\n </div>\n\n <div style={{\n display: \"flex\",\n flexDirection: 'row',\n // marginTop: 20,\n }}>\n <img\n src={\"images/pink/logo.png\"}\n width={40}\n height={53}\n style={{\n marginTop: 30,\n paddingRight: 30\n }}\n />\n <p className=\"CertificateText\" style={{ textAlign: 'left', }}>\n ЕÑли у Ð²Ð°Ñ ÐµÑÑ‚ÑŒ аккаунт Prosto,<br />\n проверьте логин в профиле — Ñто <br />\n номер/почта, или еÑли Apple ID/Google,<br />\n то добавьте Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ñ‡Ñ‚Ñ‹ и иÑпользуйте <br />\n его Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ð¸Ð¸\n </p>\n </div>\n\n <div style={{\n display: \"flex\",\n flexDirection: 'row',\n }}>\n <img\n src={\"images/pink/phone.png\"}\n width={35}\n height={61}\n style={{\n marginTop: 30,\n paddingRight: 30\n }}\n />\n <p className=\"CertificateText\" style={{ textAlign: 'left', }}>\n ПоÑле активации промокода войдите <br />\n в приложение под указанным номером<br />\n телефона или почтой.\n <span style={{ color: '#EB7D8F', marginLeft: 5 }}>\n ЕÑли у Ð²Ð°Ñ Ð±Ñ‹Ð»Ð° <br />\n Ð°ÐºÑ‚Ð¸Ð²Ð½Ð°Ñ Ð¿Ð¾Ð´Ð¿Ð¸Ñка — отмените ее\n </span>\n </p>\n\n </div>\n\n </div>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n }}>\n <img\n src={isForever === 'true' ? \"images/pink/present-banner.png\" : \"images/pink/present-banner-year.png\"}\n width=\"413\"\n height=\"456\"\n />\n </div>\n </div>\n\n <PartnerCertificate partner={partner} />\n\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n width: 170,\n alignSelf: 'center',\n alignItems: \"center\",\n marginTop: 40,\n marginBottom: 20\n }}>\n <img width={50} height={50} src={\"images/app-icon.png\"} />\n <p className=\"FooterText\" style={{ color: '#000', fontSize: 12 }}>\n Служба заботы<br />\n С 09:00 до 21:00<br /><br />\n <a href=\"mailto: help@prostoapp.com\" className=\"FooterMail\" style={{ textDecoration: 'none' }}>\n help@prostoapp.com\n </a>\n <br /><br />\n </p>\n <div style={{ display: 'flex' }}>\n <a className=\"FooterLink\" href=\"https://apps.apple.com/ru/app/проÑто-медитациÑ-и-Ñон/id1490891826?mt=8\">\n Appstore\n </a>\n <a className=\"FooterLink\" href='https://play.google.com/store/apps/details?id=com.prostoapp&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'>\n GooglePlay\n </a>\n </div>\n </div>\n\n </div >\n\n <div className='hideOnDesktop' style={{\n position: 'absolute',\n top: 0,\n opacity: visible ? 1 : 0,\n zIndex: 1000,\n transition: 'opacity ease 500ms',\n alignSelf: \"center\",\n width: '100%',\n flexDirection: 'column',\n backgroundColor: '#fff',\n margin: '0 auto',\n textAlign: 'center',\n paddingBottom: 32,\n }}>\n <div style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: \"center\",\n padding: 30\n }}>\n <img src=\"https://icons.prostoapp.com/podarok/pink/icon.png\" width=\"60\" height=\"60\" />\n <p style={{\n padding: 0,\n margin: 0,\n marginTop: 10,\n fontSize: 14,\n color: 'rgba(0,0,0,0.4)'\n }}>\n Prosto — Nº1 приложение<br />\n Ð´Ð»Ñ Ð¼ÐµÐ´Ð¸Ñ‚Ð°Ñ†Ð¸Ð¸ и Ñна в РоÑÑии\n </p>\n </div>\n <div style={{ zIndex: 2, width: 343, alignSelf: 'center' }}>\n <img\n src=\"images/pink/certificate-top-banner-mobile.png\"\n width=\"343\"\n height=\"533\"\n />\n {isForever === null ?\n <></> :\n <p style={{\n position: \"absolute\",\n marginLeft: 90,\n marginTop: -436,\n width: 210,\n fontSize: '16px',\n lineHeight: '25px',\n textAlign: 'center',\n color: '#EB7D8F'\n }}>\n ПоздравлÑем Ñ Ð¿Ð¾ÐºÑƒÐ¿ÐºÐ¾Ð¹\n доÑтупа Prosto {isForever === 'true' ? 'ÐавÑегда ' : 'на год '} <br />\n Ñо Ñкидкой 72%!\n </p>\n }\n </div>\n\n <div style={{\n marginTop: -170,\n alignSelf: \"center\",\n backgroundColor: '#FEE8EB',\n width: '100%',\n borderRadius: 16,\n overflow: 'hidden',\n paddingTop: 190,\n }}>\n <p className=\"TitleText\"\n style={{\n margin: '0 auto',\n padding: 0,\n fontSize: 30\n }}\n >\n Подарочный<br /> Ñертификат\n </p>\n <div style={{\n width: 300,\n height: 56,\n margin: '20px auto 20px auto',\n background: copiedToClipboard ? \"#EB7D8F\" : \"#fff\",\n borderRadius: 12,\n display: 'flex',\n alignItems: 'center',\n cursor: 'pointer'\n }}\n onClick={copyCodeToClipboard}\n >\n {copiedToClipboard ?\n <p style={{\n margin: '0 auto',\n padding: 0,\n color: \"#fff\",\n fontWeight: 'bold'\n }}\n >\n {'Скопировано'}\n </p> :\n <div style={{\n display: 'flex',\n flex: 1,\n justifyContent: 'space-between',\n alignItems: \"center\"\n }}>\n <p className=\"TitleText\"\n style={{\n margin: 0,\n padding: 0,\n paddingLeft: 50,\n }}\n >\n {code || ''}\n </p>\n <img\n src=\"images/pink/copy.png\"\n width=\"24\"\n height=\"24\"\n style={{ marginRight: 16 }}\n />\n </div>\n }\n </div>\n <a style={{ textDecoration: 'none', color: '#000' }} href='https://code.prostoapp.ru'>\n Ðктивируйте на Ñайте <br />\n <b>code.prostoapp.ru</b>\n </a>\n <div style={{\n width: 196,\n height: 30,\n margin: '40px auto',\n borderRadius: 8,\n border: '1px solid #000',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'pointer'\n }}\n onClick={downloadPdf}\n >\n <img\n src=\"images/pink/print.png\"\n width=\"16\"\n height=\"16\"\n />\n <p style={{ marginLeft: 8 }}>\n {'РаÑпечатать'}\n </p>\n </div>\n {/* <img\n src=\"images/pink/YuraYulia-mobile.png\"\n width=\"376\"\n height=\"241\"\n /> */}\n </div>\n\n <p style={{\n fontFamily: 'Gilroy Semibold',\n fontSize: 26,\n }}>\n Как пользоватьÑÑ?\n </p>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n }}>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n }}>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n alignItems: 'center'\n }}>\n <img\n src={\"images/pink/ticket.png\"}\n width={50}\n height={35}\n />\n <p className=\"CertificateText\">\n Зайдите на Ñайт <br />\n <a style={{ color: '#EB7D8F' }}\n href='https://code.prostoapp.ru'> code.prostoapp.ru </a><br />\n и активируйте<br />\n промокод\n </p>\n </div>\n\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n alignItems: 'center',\n marginTop: 20,\n }}>\n <img\n src={\"images/pink/letter.png\"}\n width={40}\n height={48}\n />\n <p className=\"CertificateText\">\n Выберите номер телефона<br />\n или Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ñ‡Ñ‚Ñ‹, который <br />\n будете иÑпользовать<br />\n Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в приложение\n </p>\n </div>\n\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n alignItems: 'center',\n marginTop: 20,\n }}>\n <img\n src={\"images/pink/logo.png\"}\n width={40}\n height={53}\n />\n <p className=\"CertificateText\">\n ЕÑли у Ð²Ð°Ñ ÐµÑÑ‚ÑŒ аккаунт Prosto,<br />\n проверьте логин в профиле — <br />\n Ñто номер/почта, или еÑли Apple <br />\n ID/Google, то добавьте Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ñ‡Ñ‚Ñ‹<br />\n и иÑпользуйте его Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ð¸Ð¸\n </p>\n </div>\n\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n alignItems: 'center',\n marginTop: 20,\n }}>\n <img\n src={\"images/pink/phone.png\"}\n width={35}\n height={61}\n />\n <p className=\"CertificateText\">\n ПоÑле активации промокода <br />\n войдите в приложение под <br />\n указанным номером <br />\n телефона или почтой.<br />\n <span style={{ color: '#EB7D8F' }}>\n ЕÑли у Ð²Ð°Ñ Ð±Ñ‹Ð»Ð° Ð°ÐºÑ‚Ð¸Ð²Ð½Ð°Ñ <br />подпиÑка — отмените ее\n </span>\n </p>\n\n </div>\n\n </div>\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n alignSelf: 'center',\n marginTop: 30\n }}>\n <img\n src={isForever === 'true' ? \"images/pink/present-banner.png\" : \"images/pink/present-banner-year.png\"}\n width=\"343\"\n height=\"384\"\n />\n </div>\n </div>\n\n <PartnerCertificate partner={partner} />\n\n <div style={{\n display: \"flex\",\n flexDirection: 'column',\n width: 170,\n alignSelf: 'center',\n alignItems: \"center\",\n marginTop: 40,\n marginBottom: 20\n }}>\n <img width={50} height={50} src={\"images/app-icon.png\"} />\n <p className=\"FooterText\" style={{ color: '#000', fontSize: 12 }}>\n Служба заботы<br />\n С 09:00 до 21:00<br /><br />\n <a href=\"mailto: help@prostoapp.com\" className=\"FooterMail\" style={{ textDecoration: 'none' }}>\n help@prostoapp.com\n </a>\n <br /><br />\n </p>\n <div style={{ display: 'flex' }}>\n <a className=\"FooterLink\" href=\"https://apps.apple.com/ru/app/проÑто-медитациÑ-и-Ñон/id1490891826?mt=8\">\n Appstore\n </a>\n <a className=\"FooterLink\" href='https://play.google.com/store/apps/details?id=com.prostoapp&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'>\n GooglePlay\n </a>\n </div>\n </div>\n\n </div >\n\n </>\n );\n}\n\nexport default CertificateSheet;\n","import React, { useCallback, useState } from 'react';\nimport Lottie from 'react-lottie';\nimport CertificateSheet from './CertificateSheet';\n\nconst animationOptions = {\n loop: false,\n autoplay: true,\n animationData: require('../../assets/animations/1.json'),\n rendererSettings: {\n preserveAspectRatio: 'xMidYMid meet'\n }\n};\n\nconst introAnimation = require('../../assets/animations/1.json')\nconst introAnimationMobile = require('../../assets/animations/1-mobile.json')\n\nconst openAnimation = require('../../assets/animations/2.json')\nconst openAnimationMobile = require('../../assets/animations/2-mobile.json')\nconst openAnimationYear = require('../../assets/animations/2-year.json')\nconst openAnimationYearMobile = require('../../assets/animations/2-year-mobile.json')\n\nconst CertificateOpen: React.FC = () => {\n const isMobile = window.screen.availWidth < 801\n // console.log('isMobile', isMobile)\n const params = new URLSearchParams(window.location.search)\n const code = params.get(\"code\")\n const id = params.get(\"id\")\n const isForever = params.get(\"isForever\")\n const partner = params.get(\"partner\")\n const [introPlayed, setIntroPlayed] = useState(false)\n const [showOpenAnimation, setShowOpenAnimation] = useState(false)\n const [showCertificateSheet, setShowCertificateSheet] = useState(false)\n\n const openCertificate = useCallback(() => {\n if (!introPlayed) return\n setShowOpenAnimation(true)\n }, [introPlayed])\n\n return (\n <div style={{\n position: 'absolute',\n background: '#fff',\n width: '100%',\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center'\n }}>\n {!showOpenAnimation ?\n <div style={{\n zIndex: 999,\n cursor: 'pointer',\n width: '100%',\n height: '100%',\n }}\n onClick={openCertificate}\n >\n <Lottie\n isClickToPauseDisabled\n options={{\n ...animationOptions,\n animationData: isMobile ? introAnimationMobile : introAnimation\n }}\n eventListeners={[\n {\n eventName: 'complete',\n callback: () => setIntroPlayed(true),\n },\n ]}\n />\n </div> :\n <div\n style={{\n width: '100%',\n height: '100%',\n zIndex: 999,\n }}\n >\n <Lottie\n isClickToPauseDisabled\n options={{\n ...animationOptions,\n // animationData: openAnimation\n animationData: isMobile ?\n (isForever === 'true' ? openAnimationMobile : openAnimationYearMobile) :\n (isForever === 'true' ? openAnimation : openAnimationYear)\n // animationData: openAnimationYear\n }}\n eventListeners={[\n {\n eventName: 'complete',\n callback: () => setShowCertificateSheet(true),\n },\n ]}\n />\n </div >\n }\n {showCertificateSheet &&\n <CertificateSheet\n visible\n code={code}\n id={id}\n isForever={isForever}\n partner={partner}\n />}\n </div>\n );\n}\n\nexport default CertificateOpen;\n","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport CertificateScreen from '../screens/CertificateScreen/CertificateScreen';\nimport MainScreen from \"../screens/MainScreen/MainScreen\";\nimport HB24Screen from '../screens/HB24Screen/HB24Screen';\nimport ForeverScreen from '../screens/ForeverScreen/ForeverScreen';\nimport CertificateOpen from '../screens/CertificateOpen/CertificateOpen';\n\nconst MainRoutes: React.FC = () => {\n\n return (\n <div>\n <Switch>\n <Route\n exact path='/'\n component={MainScreen}\n />\n <Route\n exact path='/certificate'\n component={CertificateScreen}\n />\n <Route\n exact path='/open-certificate'\n component={CertificateOpen}\n />\n {/* <Route\n exact path='/hb24'\n component={HB24Screen}\n /> */}\n {/* <Route\n exact path='/forever'\n component={ForeverScreen}\n /> */}\n </Switch>\n </div>\n );\n}\n\nexport default MainRoutes;\n","import config from \"../config/config\";\nimport httpService, {IResponse} from \"../http/HttpService\";\n\nconst PROMO_CODES_URL = `${config.apiUrl}/promocodes`;\n\ninterface IActivateRequest {\n phone: string;\n promocode: string;\n}\n\nclass ActivatePromoCodeApi {\n activate(data: IActivateRequest): Promise<IResponse> {\n return httpService.post(`${PROMO_CODES_URL}/activate`, data);\n }\n}\n\nexport default ActivatePromoCodeApi;\n","import ActivatePromoCodeApi from \"./api\";\n\nconst ACTIVATE_ERRORS: Record<number, string> = {\n 1013: \"Промокод уже активирован\",\n 1014: \"Промокод не найден\",\n 1015: \"Промокод не оплачен\",\n 1016: \"Ðекорректные Ñимволы в промокоде\",\n 1017: \"Ð’Ñ‹ уже активировали Ñтот промокод\",\n};\n\ninterface IActivateResult {\n success: boolean;\n errorMessage?: string;\n}\n\nclass ActivatePromoCodeController {\n private api = new ActivatePromoCodeApi();\n\n async activatePromoCode(activatePromoCodeData: any): Promise<IActivateResult> {\n \n const response = await this.api.activate(activatePromoCodeData);\n\n return {\n success: response.success,\n errorMessage: ACTIVATE_ERRORS[response.responseStatus!] ?? undefined,\n };\n }\n}\n\nexport default ActivatePromoCodeController;\n","import React, { useCallback, useState } from 'react';\nimport { useHistory } from \"react-router-dom\";\nimport CustomButton from '../../components/CustomButton/CustomButton';\nimport Footer from '../../components/Footer/Footer';\nimport PhoneInput from 'react-phone-input-2'\nimport './CodeActivation.css';\nimport ActivatePromoCodeController from '../../core/activatePromoCode/controller';\nimport domainRouter from \"../../navigation/domainRouter\";\nimport config from '../../core/config/config';\nimport CustomCheckbox from '../../components/CustomCheckbox/CustomCheckbox';\nimport { isValidEmail } from '../MainScreen/MainScreen';\nimport CustomInput from '../../components/CustomInput/CustomInput';\n\nconst prostoAppIcon = \"images/ProstoappIcon.png\";\nconst CodeActivationPresent = \"images/Present.png\";\n\nconst controller = new ActivatePromoCodeController();\n\nconst CodeActivation: React.FC = () => {\n const [activationType, setActivationType] = useState<'email' | 'phone'>('email');\n const [code, setCode] = useState(\"\");\n const [phone, setPhone] = useState(\"\");\n const [email, setEmail] = useState(\"\");\n const [confirmCorrectInput, setConfirmCorrectInput] = useState(false);\n const [error, setError] = useState<string | null>(null)\n const history = useHistory();\n\n const validateForm = useCallback(() => {\n // validate promo code\n const reg = /[A-Za-z0-9]+/;\n const validation = reg.test(code);\n if (!validation || code.length < 4) {\n setError('Ðеверный промокод')\n return false\n }\n // validate email\n if (activationType === 'email') {\n if (!isValidEmail(email)) {\n setError('Ðеверный email')\n return false\n }\n } else {\n console.log('phone', phone)\n if (phone.length < 4 || phone.length > 20) {\n setError('Ðеверный номер телефона')\n return false\n }\n }\n setConfirmCorrectInput(true)\n return true\n }, [activationType, code, phone, email, setError]);\n\n const handleActivation = useCallback(async () => {\n if (validateForm()) {\n const activatePromoCodeData: any = { promocode: code }\n\n if (activationType === 'email') {\n activatePromoCodeData['email'] = email\n } else {\n activatePromoCodeData['phone'] = phone\n }\n\n const activateResult = await controller.activatePromoCode(activatePromoCodeData);\n\n if (activateResult.success) {\n history.push(\"/activated\");\n return;\n }\n\n setError(activateResult.errorMessage ?? \"ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°\");\n }\n }, [activationType, code, phone, email, setError]);\n\n const handleBuy = useCallback(() => {\n domainRouter.go(config.giftRoute);\n }, [])\n\n const handleCode = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const text = event.target.value.replace(/\\W/g, '').toUpperCase();\n setCode(text);\n setError(null)\n }, [setCode, setError])\n\n const handlePhone = useCallback(\n (phoneNumber: string) => {\n setPhone(phoneNumber)\n setError(null)\n }, [setPhone, setError])\n\n const handleEmail = useCallback(\n (email: string) => {\n setEmail(email)\n setError(null)\n }, [setEmail, setError])\n\n const changeActivationType = useCallback((type: 'email' | 'phone') => {\n setActivationType(type)\n setConfirmCorrectInput(false)\n setError(null)\n }, [])\n\n\n return (\n <div className=\"CodeActivationBlock\">\n <img className=\"ProstoAppIconMain\" src={prostoAppIcon} />\n <div className=\"CodeActivationUpper\">\n <p className=\"CodeActivationTitle\">ÐÐºÑ‚Ð¸Ð²Ð°Ñ†Ð¸Ñ Ð¿Ñ€Ð¾Ð¼Ð¾ÐºÐ¾Ð´Ð°</p>\n <div className=\"ActivationTypeSelector\">\n <button\n className={\n activationType === 'email' ? \"ActivationTypeSelectorButtonActive\" : \"ActivationTypeSelectorButton\"\n }\n onClick={() => changeActivationType('email')}>\n Email\n </button>\n <button\n className={\n activationType === 'phone' ? \"ActivationTypeSelectorButtonActive\" : \"ActivationTypeSelectorButton\"\n }\n onClick={() => changeActivationType('phone')} >\n Телефон\n </button>\n </div>\n <div className=\"CodeActivationInfo\">\n Выберите номер телефона или Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ñ‡Ñ‚Ñ‹,\n который будете иÑпользовать Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° в приложение.\n </div>\n <div className=\"CodeActivationInfo\">\n <b>ЕÑли у Ð²Ð°Ñ ÐµÑÑ‚ÑŒ аккаунт Prosto</b>, проверьте логин в профиле —\n Ñто номер/почта, или еÑли Apple ID/Google,\n то добавьте Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ñ‡Ñ‚Ñ‹ и иÑпользуйте его Ð´Ð»Ñ Ð°ÐºÑ‚Ð¸Ð²Ð°Ñ†Ð¸Ð¸\n </div>\n <div className=\"CodeActivationInputBlock\">\n <div className=\"CodeActivationInput\">\n {activationType === 'phone' ?\n <PhoneInput\n enableLongNumbers\n country={'ru'}\n value={phone}\n inputProps={{ required: true, autoFocus: false }}\n onChange={handlePhone}\n specialLabel=\"\"\n /> :\n <CustomInput\n className=\"CodeActivationEmailInput\"\n placeholder=\"ÐÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ð¿Ð¾Ñ‡Ñ‚Ð°\"\n defaultValue={email}\n onChange={(e) => handleEmail(e.target.value)}\n />\n }\n </div>\n <div className=\"CodeActivationInput\">\n <input placeholder=\"Промокод\" onChange={handleCode} value={code} minLength={4} maxLength={20} />\n </div>\n <div style={{ paddingLeft: 20, paddingBottom: 15, marginTop: -25 }}>\n <CustomCheckbox title=\"Данные введены верно\" value={confirmCorrectInput} onChange={validateForm} />\n {\n error && <p style={{ color: 'red' }}>{error}</p>\n }\n </div>\n <div className=\"CodeActivationInput\">\n <CustomButton title=\"Ðктивировать\" onClick={handleActivation} disabled={!confirmCorrectInput} />\n </div>\n </div>\n <div className=\"CodeActivationBuy\">\n <img className=\"CodeActivationPresent\" src={CodeActivationPresent} />\n <div className=\"CodeActivationBuyButton\">\n <CustomButton title=\"Купить подпиÑку в подарок\" onClick={handleBuy} />\n </div>\n </div>\n </div>\n <Footer />\n </div>\n );\n}\n\nexport default CodeActivation;\n","import styles from \"./CodeActivated.module.css\";\nimport React, { useCallback } from \"react\";\nimport CustomButton from \"../../components/CustomButton/CustomButton\";\nimport Footer from \"../../components/Footer/Footer\";\n\nconst prostoAppIcon = \"images/ProstoappIcon.png\";\nconst activatedIcon = \"images/Firework.png\";\n\nconst CodeActivated: React.FC = () => {\n const handleIOsClick = useCallback(() => {\n window.location.href = \"https://apps.apple.com/ru/app/проÑто-медитациÑ-и-Ñон/id1490891826?mt=8\";\n }, []);\n\n const handleAndroidClick = useCallback(() => {\n window.location.href = \"https://play.google.com/store/apps/details?id=com.prostoapp&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1\";\n }, []);\n\n return (\n <div className={styles.Root}>\n <img className={styles.AppIcon} src={prostoAppIcon} />\n <div className={styles.UpperBlock}>\n <img className={styles.ActivatedIcon} src={activatedIcon} />\n <p className={styles.TitleText}>Промокод уÑпешно активирован</p>\n <p className={styles.Text}>\n Войдите в приложение под указанным email или номером телефона.\n Ð’Ñ‹ увидите Ñообщение, что получили подпиÑку в подарок\n </p>\n </div>\n <div className={styles.Buttons}>\n <CustomButton className={styles.Button} title={\"УÑтановить IOS\"} onClick={handleIOsClick} />\n <CustomButton className={styles.Button} title={\"УÑтановить Android\"} onClick={handleAndroidClick} />\n </div>\n <Footer />\n </div>\n );\n}\n\nexport default CodeActivated;\n","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport CodeActivation from '../screens/CodeActivation/CodeActivation';\nimport CodeActivated from \"../screens/CodeActivated/CodeActivated\";\n\nconst CodeRoutes: React.FC = () => {\n\n return (\n <div>\n <Switch>\n <Route\n exact path='/'\n component={CodeActivation}\n />\n <Route\n path='/activated'\n component={CodeActivated}\n />\n </Switch>\n </div>\n );\n}\n\nexport default CodeRoutes;\n","import React, { useCallback } from \"react\";\nimport styles from \"./CorporateRadio.module.css\";\nimport { Label, Radio } from \"theme-ui\";\nimport { TPayMethod } from \"../../types/TPayMethod\";\n\ninterface IProps {\n value?: TPayMethod;\n onChange?: (newValue: TPayMethod) => void;\n}\n\nconst CorporateRadio: React.FC<IProps> = ({ value= \"card\", onChange= () => {} }) => {\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.currentTarget.value;\n if (newValue !== value) {\n onChange(newValue as TPayMethod);\n }\n },\n [onChange, value],\n );\n\n return (\n <div className={styles.Root}>\n <Label className={styles.RadioItem}>\n <Radio\n className={styles.RadioInput}\n value=\"card\"\n checked={value === \"card\"}\n name=\"CorporateRadio\"\n onChange={handleChange}\n />\n <span className={styles.Text}>Оплатить онлайн</span>\n </Label>\n <Label className={styles.RadioItem}>\n <Radio\n className={styles.RadioInput}\n value=\"bill\"\n checked={value === \"bill\"}\n name=\"CorporateRadio\"\n onChange={handleChange}\n />\n <span className={styles.Text}>Ð’Ñ‹Ñтавить Ñчет</span>\n </Label>\n </div>\n );\n}\n\nexport default CorporateRadio;\n","import styles from \"./CorporateCalculator.module.css\";\nimport React, { useCallback, useState } from \"react\";\nimport CustomInput from \"../CustomInput/CustomInput\";\nimport Selector from \"../Selector/Selector\";\nimport CustomButton from \"../CustomButton/CustomButton\";\nimport CorporateRadio from \"./CorporateRadio\";\nimport { ICorporateScreenState } from \"../../types/ICorporateScreenState\";\nimport { TPayMethod } from \"../../types/TPayMethod\";\nimport PhoneInput from \"react-phone-input-2\";\nimport config from \"../../core/config/config\";\n\nexport interface ICorporateCalculatorProps {\n data: ICorporateScreenState;\n onClick?: () => void;\n onDataChange: (state: ICorporateScreenState) => void;\n}\n\nconst CorporateCalculator: React.FC<ICorporateCalculatorProps> = ({ data, onClick, onDataChange }) => {\n const [price, setPrice] = useState(\n {\n count: 1,\n newPrice: 379,\n discount: 34,\n corporateDiscount: 40,\n benefit: 0,\n month: 12\n }\n );\n\n const handlePhoneChange = useCallback((phoneNumber: string) => {\n onDataChange({\n ...data,\n phone: phoneNumber,\n });\n }, [data, onDataChange]);\n\n const handleEmailChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n onDataChange({\n ...data,\n email: event.target.value,\n });\n }, [data, onDataChange]);\n\n const handleCompanyChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n onDataChange({\n ...data,\n companyName: event.target.value,\n });\n }, [data, onDataChange]);\n\n const handleINNChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n onDataChange({\n ...data,\n inn: event.target.value,\n });\n }, [data, onDataChange]);\n\n const handleWorkPhoneChange = useCallback((phoneNumber: string) => {\n onDataChange({\n ...data,\n workPhone: phoneNumber,\n });\n }, [data, onDataChange]);\n\n const handleAddressChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n onDataChange({\n ...data,\n legalAddress: event.target.value,\n });\n }, [data, onDataChange]);\n\n const getPrice = useCallback((priceInfo) => {\n setPrice(priceInfo);\n onDataChange({\n ...data,\n subscriptionCount: priceInfo.count,\n subscriptionDuration: priceInfo.month,\n subscriptionPrice: (priceInfo.newPrice - priceInfo.benefit) * priceInfo.count,\n discount: priceInfo.discount,\n corporateDiscount: priceInfo.corporateDiscount,\n })\n }, [data, onDataChange]);\n\n const handlePromoCodeChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n const PROMO_CODE_SYMBOLS = /^[A-Z\\d]*$/;\n const newValue = event.target.value.toUpperCase();\n\n if (PROMO_CODE_SYMBOLS.test(newValue)) {\n onDataChange({\n ...data,\n promoCode: newValue,\n })\n }\n }, [data, onDataChange]);\n\n const handlePayMethodChange = useCallback((newValue: TPayMethod) => {\n onDataChange({\n ...data,\n payMethod: newValue\n })\n\n }, [data, onDataChange])\n\n\n return (\n <div className={styles.CalculatorBlock}>\n <div>\n <div className={styles.CalculatorTitleContainer}>\n <p className={styles.CalculatorTitle}>Подарить ÑпокойÑтвие Ñвоим Ñотрудникам Ñто проÑто.</p>\n </div>\n <div className={styles.PhoneInput}>\n <PhoneInput country={'ru'} value={data.phone} inputProps={{ required: true, autoFocus: true }} onChange={handlePhoneChange} specialLabel=\"\" />\n </div>\n <CustomInput type=\"email\" className={styles.Email} inputClassName=\"Email\" placeholder=\"Ваша ÑÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ð¿Ð¾Ñ‡Ñ‚Ð°\" onChange={handleEmailChange} />\n <p className={styles.CalculatorAdditionalText}>Ðа указанную почту будет отправлен Ñертификат</p>\n <div className={styles.CalculatorBottomBlock}>\n <div className={styles.CalculatorBottomLeftBlock}>\n <p className={styles.CalculatorTextFirst}>ЧиÑло подпиÑок</p>\n <p className={styles.CalculatorTextSecond}>Тип подпиÑки</p>\n <p className={styles.CalculatorText}>Цена</p>\n {!!price.discount && <p className={styles.CalculatorText}>Скидка за период</p>}\n {!!price.corporateDiscount && <p className={styles.CalculatorText}>Скидка корпоративнаÑ</p>}\n <p className={styles.CalculatorText}>Итого к оплате</p>\n </div>\n <div className={styles.CalculatorBottomRightBlock}>\n <Selector getPrice={getPrice} showCountSelector useCorporateDiscount />\n <div className={styles.CalculatorBottomRightBlockText}>\n <p className={styles.CalculatorText}>\n {price.newPrice.toLocaleString('ru-RU') || 0} <span className=\"RubleIcon\">₽</span>\n </p>\n {!!price.discount && <p className={styles.CalculatorText}>-{price.discount}%</p>}\n {!!price.corporateDiscount && <p className={`${styles.CalculatorText} ${styles.CalculatorText2x}`}>-{price.corporateDiscount}%</p>}\n <p className={styles.CalculatorText}>\n {((price.newPrice - price.benefit) * price.count).toLocaleString('ru-RU') || 0} <span className=\"RubleIcon\">₽</span>\n </p>\n </div>\n </div>\n </div>\n <div className={styles.Email}>\n <input\n className={styles.PromoCodeInput}\n placeholder=\"Промокод\"\n value={data.promoCode}\n onChange={handlePromoCodeChange}\n minLength={4}\n maxLength={16}\n />\n <p className={styles.CalculatorAdditionalText}>Ваше пожелание по тому, как должен выглÑдеть промокод</p>\n </div>\n </div>\n <div className={styles.CalculatorFooter}>\n\n <CorporateRadio value={data.payMethod} onChange={handlePayMethodChange} />\n\n {(data.payMethod === 'bill') &&\n <CustomInput type=\"text\" className={styles.Email} inputClassName=\"Email\" placeholder=\"Ðазвание компании\" onChange={handleCompanyChange} minLength={3} maxLength={100} />}\n {(data.payMethod === 'bill') &&\n <CustomInput type=\"text\" className={styles.Email} inputClassName=\"Email\" placeholder=\"ИÐÐ\" onChange={handleINNChange} minLength={10} maxLength={12} />}\n {(data.payMethod === 'bill') && <div className={styles.PhoneInput}>\n <PhoneInput value={data.workPhone} inputProps={{ required: true }} onChange={handleWorkPhoneChange} specialLabel=\"\" placeholder=\"Рабочий телефон\" />\n </div>}\n {(data.payMethod === 'bill') &&\n <CustomInput type=\"text\" className={styles.Email} inputClassName=\"Email\" placeholder=\"ЮридичеÑкий адреÑ\" onChange={handleAddressChange} minLength={3} maxLength={20} />}\n\n <div style={{ marginTop: 30, marginBottom: 15 }}>\n <CustomButton title={data.loading ? \"Обработка...\" : \"Оформить корпоративный подарок\"} onClick={onClick} disabled={!data.canPay} />\n </div>\n\n <p className={styles.CalculatorOffer}>\n {\"ОформлÑÑ Ð¿Ð¾ÐºÑƒÐ¿ÐºÑƒ, вы ÑоглашаетеÑÑŒ Ñ \"}\n <a className=\"CalculatorLink\" href={config.privacyUrl} target='_blanc'>Договором оферты</a>\n </p>\n </div>\n </div>\n );\n}\n\nexport default CorporateCalculator;\n","import React from \"react\";\nimport styles from \"./UpperCorporateBlock.module.css\";\nimport CorporateCalculator from \"../CorporateCalculator/CorporateCalculator\";\nimport { ICorporateScreenState } from \"../../types/ICorporateScreenState\";\n\ninterface IProps {\n data: ICorporateScreenState;\n onBuyClick: () => void;\n onDataChange: (newState: ICorporateScreenState) => void;\n}\n\n\nconst UpperCorporateBlock: React.FC<IProps> = ({ data, onBuyClick, onDataChange }) => {\n return (\n <div className={styles.Root}>\n <div className={styles.ProstoAppIcon} />\n <div className={styles.MainBlock}>\n <div className={styles.LeftTextContainer} />\n <div className={styles.MainContainer}>\n <CorporateCalculator data={data} onDataChange={onDataChange} onClick={onBuyClick} />\n </div>\n <a className={styles.HowItWorks} href=\"#advices\">Как Ñто работает?</a>\n <div className={styles.TextContainer}>\n <p className={styles.MainTitle}>Корпоративный подарок</p>\n <p className={styles.AdditionalText}>\n ПоделиÑÑŒ ÑпокойÑтвием, хорошим Ñном и оÑознанноÑтью.\n Подарочный Ñертификат открывает доÑтуп ко вÑем медитациÑм и образовательным видео Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Prosto\n </p>\n </div>\n </div>\n <div className={styles.BackgroundImageContainer}>\n <div className={styles.BackgroundImage} />\n </div>\n </div>\n );\n}\n\nexport default UpperCorporateBlock;\n","import React, { useCallback, useEffect, useState } from \"react\";\nimport UpperCorporateBlock from \"../../components/UpperCorporateBlock/UpperCorporateBlock\";\nimport BottomMainBlock from \"../../components/BottomMainBlock/BottomMainBlock\";\nimport Footer from \"../../components/Footer/Footer\";\nimport domainRouter from \"../../navigation/domainRouter\";\nimport config from \"../../core/config/config\";\nimport \"./CorporateSubscription.css\";\nimport { ICorporateScreenState } from \"../../types/ICorporateScreenState\";\nimport BuyCorporateSubscriptionController from \"../../core/buyCorporateSubscription/controller\";\nimport { useHistory } from \"react-router-dom\";\nimport debounce from \"lodash.debounce\";\nimport ym from \"react-yandex-metrika\";\n// import { withId } from 'react-yandex-metrika';\n\nconst controller = new BuyCorporateSubscriptionController();\nconst CorporateSubscription: React.FC = () => {\n console.log('corp')\n const [screenState, setScreenState] = useState<ICorporateScreenState>({\n phone: \"\",\n email: \"\",\n subscriptionCount: 0,\n subscriptionDuration: 0,\n subscriptionPrice: 0,\n discount: 0,\n corporateDiscount: 0,\n promoCode: \"\",\n payMethod: \"card\",\n canPay: false,\n companyName: \"\",\n inn: \"\",\n workPhone: \"\",\n legalAddress: \"\"\n });\n\n const [screenStateCard, setScreenStateCard] = useState<ICorporateScreenState>({\n phone: \"\",\n email: \"\",\n subscriptionCount: 0,\n subscriptionDuration: 0,\n subscriptionPrice: 0,\n discount: 0,\n corporateDiscount: 0,\n promoCode: \"\",\n payMethod: \"card\",\n canPay: false,\n });\n\n const history = useHistory();\n\n const handleDataChange = useCallback((newState: ICorporateScreenState) => {\n setScreenState({\n ...newState,\n canPay: (isValidEmail(newState.email) &&\n isValidPhone(newState.phone) &&\n isValidPromoCode(newState.promoCode) && newState.payMethod === 'card') || (\n isValidEmail(newState.email) &&\n isValidPhone(newState.phone) &&\n isValidPromoCode(newState.promoCode) && newState.payMethod === 'bill' &&\n isValidPhone(newState.workPhone!) &&\n isValidINN(newState.inn!) &&\n isValidName(newState.companyName!) &&\n isValidName(newState.legalAddress!))\n });\n setScreenStateCard({\n ...newState,\n canPay: (isValidEmail(newState.email) &&\n isValidPhone(newState.phone) &&\n isValidPromoCode(newState.promoCode) &&\n newState.payMethod === 'card')\n })\n }, []);\n\n const handleBuyClick = useCallback(debounce(async () => {\n // withId(92179976)('reachGoal','pressBuyCorpSubscription')\n // ym('reachGoal', 'oformitpodarok');\n window.generalPixel.postClick('a2');\n const promoCode = await controller.buyPromoCode({\n ...screenStateCard,\n });\n\n setScreenState({...screenState, loading: true})\n\n if (!promoCode) {\n setScreenState({...screenState, loading: false})\n alert(\"Ðе получилоÑÑŒ. Попробуйте ещё раз.\");\n return;\n }\n\n if (screenState.payMethod === \"card\") {\n if (promoCode.paymentLink) {\n window.location.href = promoCode.paymentLink\n } else {\n setScreenState({...screenState, loading: false})\n alert(\"Ðе получилоÑÑŒ Ñгенерировать форму Ð´Ð»Ñ Ð¾Ð¿Ð»Ð°Ñ‚Ñ‹! Попробуйте ещё раз.\");\n }\n } else {\n history.push(\"/manager_screen\");\n }\n }, 2000, { leading: true, trailing: false }), [screenState])\n\n const handleActivateClick = useCallback(() => {\n domainRouter.go(config.codeRoute);\n }, []);\n\n // useEffect(() => {\n // withId(92179976)('reachGoal', 'enteredCorp');\n // }, [withId])\n\n return (\n <div className=\"CorpSubRoot\">\n <UpperCorporateBlock\n data={screenState}\n onDataChange={handleDataChange}\n onBuyClick={handleBuyClick}\n />\n <BottomMainBlock\n onActivateClick={handleActivateClick}\n isCorp\n />\n <Footer />\n </div>\n );\n};\n\nconst EMAIL_REG = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\nfunction isValidEmail(value: string): boolean {\n return EMAIL_REG.test(value);\n}\n\nfunction isValidPhone(value: string): boolean {\n if (value.length >= 4 && value.length <= 20) {\n return true;\n } else {\n return false;\n }\n}\n\nconst INN_REG = /^[0-9]*$/;\nfunction isValidINN(value: string): boolean {\n return INN_REG.test(value);\n}\n\nconst PROMO_CODE_REG = /(^$)|(^[\\dA-Z]{4,16}$)/;\nfunction isValidPromoCode(value: string): boolean {\n return PROMO_CODE_REG.test(value);\n}\n\nfunction isValidName(value: string): boolean {\n if (value) {\n return true;\n } else {\n return false;\n };\n}\n\nexport default CorporateSubscription;\n","import { TPayMethod } from \"../../types/TPayMethod\";\nimport BuyGiftSubscriptionApi from \"../buyGiftSubscription/api\";\n\ninterface IPromoCode {\n id: number;\n text: string;\n price: number;\n amountTotal: number;\n paymentLink?: string;\n}\n\ninterface IBuyParams {\n phone: string;\n email: string;\n subscriptionCount: number;\n subscriptionDuration: number;\n subscriptionPrice: number;\n promoCode: string;\n payMethod: TPayMethod;\n discount: number;\n corporateDiscount?: number;\n companyName?: string,\n inn?: string,\n workPhone?: string,\n legalAddress?: string\n}\n\nclass BuyCorporateSubscriptionController {\n private api = new BuyGiftSubscriptionApi();\n\n async buyPromoCode(params: IBuyParams): Promise<IPromoCode | false> {\n const promoCode = await this.createPromoCode(params);\n if (!promoCode) return false;\n return promoCode;\n }\n\n private async createPromoCode(params: IBuyParams): Promise<IPromoCode | null> {\n const response = await this.api.createPromoCode({\n isCorporate: true,\n method: params.payMethod,\n amountTotal: params.subscriptionCount,\n text: params.promoCode || undefined,\n phone: params.phone,\n email: params.email,\n months: params.subscriptionDuration,\n price: params.subscriptionPrice,\n discount: params.discount,\n discountCorporation: params.corporateDiscount,\n paymentMethod: 'tinkoff',\n });\n\n if (!response) {\n return null;\n }\n\n return {\n id: response.id,\n text: response.text,\n price: response.price,\n amountTotal: response.amountTotal,\n paymentLink: response.link,\n }\n }\n\n // private async requestUserPayment({ subscriptionCount, subscriptionDuration, email }: IBuyParams, promoCode: IPromoCode): Promise<boolean> {\n // const form = this.createTinkoffForm({\n // totalPrice: promoCode.price,\n // orderId: promoCode.id,\n // description: `${subscriptionCount} подпиÑок на ${subscriptionDuration} меÑÑцев Ð´Ð»Ñ ${email}`,\n // email\n // })\n // window.pay(form);\n // return true;\n // }\n\n // private createTinkoffForm(params: {\n // totalPrice: number,\n // orderId: number,\n // description: string,\n // email: string,\n // }) {\n\n // const receiptData =\n // {\n // Email: params.email,\n // EmailCompany: \"help@prostoapp.com\",\n // Taxation: \"usn_income\",\n // Items: [{\n // Name: \"Cертификат на подпиÑку на приложение Prosto\",\n // Price: params.totalPrice * 100,\n // Quantity: 1.00,\n // Amount: params.totalPrice * 100,\n // Tax: \"none\",\n // }],\n // }\n\n // const form = document.createElement(\"form\");\n\n // const fields = document.createDocumentFragment();\n // fields.appendChild(this.createInput(\"terminalkey\", config.tinkoffTerminalKey));\n // fields.appendChild(this.createInput(\"frame\", \"true\"));\n // fields.appendChild(this.createInput(\"language\", \"ru\"));\n // fields.appendChild(this.createInput(\"amount\", params.totalPrice.toString()));\n // fields.appendChild(this.createInput(\"order\", params.orderId.toString()));\n // fields.appendChild(this.createInput(\"description\", params.description));\n // fields.appendChild(this.createInput(\"email\", params.email));\n // fields.appendChild(this.createInput(\"receipt\", JSON.stringify(receiptData)));\n\n // form.appendChild(fields);\n\n // return form;\n // }\n\n // private createInput(name: string, value: string) {\n // const input = document.createElement(\"input\");\n // input.type = \"hidden\";\n // input.name = name;\n // input.value = value;\n // return input;\n // }\n}\n\nexport default BuyCorporateSubscriptionController;\n","import React from 'react';\nimport Footer from '../../components/Footer/Footer';\nimport styles from \"./ManagerScreen.module.css\";\n\nconst prostoAppIcon = \"images/ProstoappIcon.png\";\nconst managerIcon = \"images/Manager.png\";\n\nconst ManagerScreen: React.FC = () => {\n\n return (\n <div className={styles.ManagerScreen}>\n <img className={styles.AppIcon} src={prostoAppIcon} />\n <img className={styles.ManagerIcon} src={managerIcon} />\n <p className={styles.TitleText}>Ðаш менеджер ÑвÑжетÑÑ Ñ Ð²Ð°Ð¼Ð¸</p>\n <Footer />\n </div>\n );\n}\n\nexport default ManagerScreen;\n","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport CertificateScreen from '../screens/CertificateScreen/CertificateScreen';\nimport CorporateSubscription from '../screens/CorporateSubscription/CorporateSubscription';\nimport ManagerScreen from '../screens/ManagerScreen/ManagerScreen';\n\nconst CorporativeRoutes: React.FC = () => {\n\n return (\n <div>\n <Switch>\n <Route\n exact path='/'\n component={CorporateSubscription}\n />\n <Route\n exact path='/manager_screen'\n component={ManagerScreen}\n />\n <Route\n exact path='/certificate'\n component={CertificateScreen}\n />\n </Switch>\n </div>\n );\n}\n\nexport default CorporativeRoutes;\n","import { TPayMethod } from \"../../types/TPayMethod\";\nimport config from \"../config/config\";\nimport httpService from \"../http/HttpService\";\n\nconst PROMO_CODES_URL = `${config.apiUrl}/promocodes`;\n\ninterface IBuyPromoCodeRequest {\n phone?: string;\n months: number;\n amountTotal: number;\n price: number;\n isCorporate: boolean;\n method: TPayMethod;\n text?: string;\n discount?: number;\n discountCorporation?: number;\n companyName?: string,\n inn?: string,\n workPhone?: string,\n legalAddress?: string\n}\n\ninterface IBuyPromoCodeResponse {\n id: number;\n text: string;\n amountTotal: number;\n amountLeft: number;\n months: number;\n price: number;\n phone: string;\n method: string;\n isCorporate: boolean;\n creationDate: string;\n paymentDate: string;\n}\n\nclass BuySubscriptionApi {\n async createSubscription(data: IBuyPromoCodeRequest): Promise<IBuyPromoCodeResponse | null> {\n const response = await httpService.post(`${PROMO_CODES_URL}/buy/binding`, data);\n return response.success ? response.data as IBuyPromoCodeResponse : null;\n }\n}\n\nexport default BuySubscriptionApi;\n","import React, { useCallback, useState } from 'react';\nimport Footer from '../../components/Footer/Footer';\nimport UpperMainBlock from '../../components/UpperMainBlock/UpperMainBlock';\nimport ym from 'react-yandex-metrika';\nimport { IMainScreenState } from \"../../types/IMainScreenState\";\nimport { useHistory } from 'react-router-dom';\nimport debounce from \"lodash.debounce\";\nimport BuySubscriptionController from '../../core/buySubscription/controller';\n\nconst controller = new BuySubscriptionController();\n\nconst BuySubscription: React.FC = () => {\n \n const [screenState, setScreenState] = useState<IMainScreenState>({\n email: \"\",\n confirmEmail: false,\n promocodeId: null,\n text: \"\",\n phone: \"\",\n months: 0,\n price: 0,\n discount: 0,\n canPay: false,\n paymentMethod: 'tinkoff',\n });\n const history = useHistory();\n\n const handleDataChange = useCallback((newState: IMainScreenState) => {\n setScreenState({\n ...newState\n });\n }, [setScreenState]);\n\n const handleBuyClick = useCallback(debounce(async () => {\n window.generalPixel.postClick('a2');\n const promocode = await controller.buySubscription(screenState.months, screenState.price, screenState.discount, screenState.phone);\n\n if (!promocode) {\n alert(\"Ðе получилоÑÑŒ Ñгенерировать промокод! Попробуйте ещё раз.\");\n return;\n }\n\n setScreenState({ ...screenState, promocodeId: promocode.id, text: promocode.text });\n // ym('reachGoal', 'buy_certificate');\n history.push({\n pathname: '/activated',\n state: {\n promocodeId: promocode.id,\n text: promocode.text,\n },\n });\n }, 2000, { leading: true, trailing: false }), [screenState.phone, screenState.months, screenState.price])\n\n return (\n <>\n <UpperMainBlock data={screenState} onDataChange={handleDataChange} onBuyClick={handleBuyClick} promoCalculator={true}/>\n <Footer />\n </>\n );\n}\n\nexport default BuySubscription;\n","import BuyGiftSubscriptionApi from \"./api\";\nimport config from \"../config/config\";\nimport \"./TinkoffFrameFix.css\";\n\ninterface IPromoCode {\n id: number;\n text: string;\n price: number;\n amountTotal: number;\n}\n\nclass BuySubscriptionController {\n private api = new BuyGiftSubscriptionApi();\n\n async buySubscription(months: number, price: number, discount: number, phone: string): Promise<IPromoCode | false> {\n const promoCode = await this.createSubscription(months, price, discount, phone);\n if (!promoCode) return false;\n\n // if (!await this.requestUserPayment(phone, promoCode, months)) {\n // return false;\n // }\n\n return promoCode;\n }\n\n\n private async createSubscription(months: number, price: number, discount: number, phone: string): Promise<IPromoCode | null> {\n const response = await this.api.createSubscription({\n isCorporate: false,\n method: \"card\",\n amountTotal: 1,\n months,\n price,\n phone,\n discount\n })\n\n if (!response) {\n return null;\n }\n\n return {\n id: response.id,\n text: response.text,\n price: response.price,\n amountTotal: response.amountTotal,\n }\n }\n\n // private async requestUserPayment(phone: string, promoCode: IPromoCode, months: number): Promise<boolean> {\n // const form = this.createTinkoffForm({\n // totalPrice: promoCode.amountTotal * promoCode.price,\n // orderId: promoCode.id,\n // description: `ПодпиÑка на ${months} меÑÑцев Ð´Ð»Ñ ${phone}`,\n // phone\n // })\n // window.pay(form);\n // return true;\n // }\n\n // private createTinkoffForm(params: {\n // totalPrice: number,\n // orderId: number,\n // description: string,\n // phone: string,\n // }) {\n // const receiptData = \n // {\n // Phone: params.phone,\n // EmailCompany: \"help@prostoapp.com\",\n // Taxation: \"usn_income\",\n // Items: [{\n // Name: \"Cертификат на подпиÑку на приложение Prosto\",\n // Price: params.totalPrice * 100,\n // Quantity: 1.00,\n // Amount: params.totalPrice * 100,\n // Tax: \"none\",\n // }],\n // }\n\n // const form = document.createElement(\"form\");\n\n // const fields = document.createDocumentFragment();\n // fields.appendChild(this.createInput(\"terminalkey\", config.tinkoffTerminalKey));\n // fields.appendChild(this.createInput(\"frame\", \"true\"));\n // fields.appendChild(this.createInput(\"language\", \"ru\"));\n // fields.appendChild(this.createInput(\"amount\", params.totalPrice.toString()));\n // fields.appendChild(this.createInput(\"order\", params.orderId.toString()));\n // fields.appendChild(this.createInput(\"description\", params.description));\n // fields.appendChild(this.createInput(\"phone\", params.phone));\n // fields.appendChild(this.createInput(\"receipt\", JSON.stringify(receiptData)));\n\n\n // form.appendChild(fields);\n\n // return form;\n // }\n\n // private createInput(name: string, value: string ) {\n // const input = document.createElement(\"input\");\n // input.type = \"hidden\";\n // input.name = name;\n // input.value = value;\n // return input;\n // }\n}\n\nexport default BuySubscriptionController\n","import React from \"react\";\nimport config from \"../core/config/config\";\nimport domainRouter from \"./domainRouter\";\nimport MainRoutes from \"./MainRoutes\";\nimport CodeRoutes from \"./CodeRoutes\";\nimport CorporativeRoutes from \"./CorporativeRoutes\";\nimport PromoRoutes from \"./PromoRoutes\";\nimport { YMInitializer } from 'react-yandex-metrika';\n\ninterface IProps {\n className?: string;\n}\n\nconst SCREENS = {\n [config.giftRoute]: MainRoutes,\n [config.codeRoute]: CodeRoutes,\n [config.corpRoute]: CorporativeRoutes,\n [config.promoRoute]: PromoRoutes,\n}\n\n// const YM_ACCOUNTS = {\n// 'podarok.prostoapp.ru': [86989752],\n// 'prosto-meditation.ru': [94588675],\n// 'corp.prostoapp.ru': [92179976],\n// }\n\nexport const ymOptions = {\n clickmap: true,\n trackLinks: true,\n accurateTrackBounce: true,\n webvisor: true,\n trackHash: true\n}\n\nconst DomainRoutes: React.FC<IProps> = ({ className }) => {\n const Screen = SCREENS[domainRouter.currentHost];\n /* @ts-ignore */\n // const yandexMetrikaCounters = YM_ACCOUNTS[domainRouter.currentHost] || [];\n // console.log('yandexMetrikaCounters', yandexMetrikaCounters)\n // console.log('domainRouter.currentHost', domainRouter.currentHost)\n return (\n <div className={className}>\n {/* <YMInitializer accounts={yandexMetrikaCounters} options={ymOptions} version=\"2\" /> */}\n {/* {domainRouter.currentHost === 'podarok.prostoapp.ru' &&\n <YMInitializer accounts={[86989752]} options={{ webvisor: true, trackHash: true }} version=\"2\" />\n }\n {domainRouter.currentHost === 'prosto-meditation.ru' &&\n <YMInitializer accounts={[94588675]} options={{ webvisor: true, trackHash: true }} version=\"2\" />\n } */}\n {Screen ? <Screen /> : <MainRoutes />}\n </div>\n );\n};\n\nexport default DomainRoutes;\n","import React from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport BuySubscription from '../screens/BuySubscription/BuySubscription';\nimport CodeActivated from '../screens/CodeActivated/CodeActivated';\n\nconst PromoRoutes: React.FC = () => {\n\n return (\n <div>\n <Switch>\n <Route\n exact path='/'\n component={BuySubscription}\n />\n <Route\n path='/activated'\n component={CodeActivated}\n />\n </Switch>\n </div>\n );\n}\n\nexport default PromoRoutes;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport {\n BrowserRouter as Router,\n} from \"react-router-dom\";\nimport DomainRoutes from \"./navigation/DomainRoutes\";\nimport './index.css';\n\nReactDOM.render(\n <Router>\n <React.StrictMode>\n {/* <YMInitializer accounts={[86989752]} options={{webvisor: true, trackHash: true}} version=\"2\" /> */}\n <DomainRoutes className=\"App\" />\n </React.StrictMode>\n </Router>,\n document.getElementById('root')\n);\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"CalculatorBlock\":\"CorporateCalculator_CalculatorBlock__3eJnk\",\"CalculatorTitleContainer\":\"CorporateCalculator_CalculatorTitleContainer__2SxZV\",\"PhoneInput\":\"CorporateCalculator_PhoneInput__3NKQ7\",\"CalculatorTitle\":\"CorporateCalculator_CalculatorTitle__39Fys\",\"Email\":\"CorporateCalculator_Email__1PqlM\",\"PromoCodeInput\":\"CorporateCalculator_PromoCodeInput__3cx_S\",\"CalculatorAdditionalText\":\"CorporateCalculator_CalculatorAdditionalText__d3NTC\",\"CalculatorText\":\"CorporateCalculator_CalculatorText__1Wch1\",\"CalculatorText2x\":\"CorporateCalculator_CalculatorText2x__2Ww70\",\"CalculatorBottomBlock\":\"CorporateCalculator_CalculatorBottomBlock__3logH\",\"CalculatorBottomLeftBlock\":\"CorporateCalculator_CalculatorBottomLeftBlock__2dHQ1\",\"CalculatorBottomRightBlock\":\"CorporateCalculator_CalculatorBottomRightBlock__YKlbq\",\"CalculatorTextFirst\":\"CorporateCalculator_CalculatorTextFirst__3ryaw\",\"CalculatorTextSecond\":\"CorporateCalculator_CalculatorTextSecond__1j4Sl\",\"CalculatorOffer\":\"CorporateCalculator_CalculatorOffer__49il9\",\"CalculatorLink\":\"CorporateCalculator_CalculatorLink__1gf6F\",\"CalculatorFooter\":\"CorporateCalculator_CalculatorFooter__3DUg7\",\"CalculatorBottomRightBlockText\":\"CorporateCalculator_CalculatorBottomRightBlockText__2quJl\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"ManagerScreen\":\"ManagerScreen_ManagerScreen__17mBw\",\"AppIcon\":\"ManagerScreen_AppIcon__W634N\",\"ManagerIcon\":\"ManagerScreen_ManagerIcon__2QmZE\",\"TitleText\":\"ManagerScreen_TitleText__3I3Ro\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Root\":\"CorporateRadio_Root__2l1fW\",\"RadioItem\":\"CorporateRadio_RadioItem__UNlcq\",\"RadioInput\":\"CorporateRadio_RadioInput__V-HJk\",\"Text\":\"CorporateRadio_Text__1tHoO\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"UpperMainRoot\":\"default_UpperMainRoot__2Idg1\",\"MainBlock\":\"default_MainBlock__3uZ8s\",\"ProstoAppIcon\":\"default_ProstoAppIcon__3ljWc\",\"BackgroundImage\":\"default_BackgroundImage__NxpsI\",\"MainTitle\":\"default_MainTitle__2VDUe\",\"AdditionalText\":\"default_AdditionalText__3RUhe\",\"MainContainer\":\"default_MainContainer__AR9Vc\",\"TextContainer\":\"default_TextContainer__36UL7\",\"LeftTextContainer\":\"default_LeftTextContainer__2kWLy\",\"HowItWorks\":\"default_HowItWorks__fQqpm\",\"BackgroundImageContainer\":\"default_BackgroundImageContainer__1GHyf\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"UpperMainRoot\":\"pink_UpperMainRoot__2O-OP\",\"MainBlock\":\"pink_MainBlock__1KfuH\",\"ProstoAppIcon\":\"pink_ProstoAppIcon__1dd1c\",\"TimerText\":\"pink_TimerText__2PmRj\",\"CustomButton\":\"pink_CustomButton__38L-w\",\"BackgroundImage\":\"pink_BackgroundImage__1wzE3\",\"MainTitle\":\"pink_MainTitle__2gVdF\",\"AdditionalText\":\"pink_AdditionalText__36b2O\",\"MainContainer\":\"pink_MainContainer__28vLb\",\"TextContainer\":\"pink_TextContainer__ajDmr\",\"LeftTextContainer\":\"pink_LeftTextContainer__2OSvv\",\"HowItWorks\":\"pink_HowItWorks__2aKc5\",\"AppIcon\":\"pink_AppIcon__2N8kx\",\"CertificatesTitleImage\":\"pink_CertificatesTitleImage__1O-7D\",\"CertificateTitleText\":\"pink_CertificateTitleText__2rXtG\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"UpperMainRoot\":\"black_UpperMainRoot__2L9hW\",\"MainBlock\":\"black_MainBlock__2xbZe\",\"ProstoAppIcon\":\"black_ProstoAppIcon__3vVbe\",\"Timer\":\"black_Timer__1uKk4\",\"TimerText\":\"black_TimerText__3drlK\",\"LeftTextContainer\":\"black_LeftTextContainer__5kxYw\",\"WavesBackground\":\"black_WavesBackground__p5Vqi\",\"BackgroundImage\":\"black_BackgroundImage__2NF6-\",\"MainTitle\":\"black_MainTitle__sqLjx\",\"MainSubtitle\":\"black_MainSubtitle__3ZNy0\",\"AdditionalText\":\"black_AdditionalText__JEyDi\",\"MainContainer\":\"black_MainContainer__FJeH1\",\"TextContainer\":\"black_TextContainer__32jdA\",\"HowItWorks\":\"black_HowItWorks__3UbDo\",\"MobileTitle\":\"black_MobileTitle__2ZPoR\",\"PayButton\":\"black_PayButton__F5163\",\"CertificateTitleText\":\"black_CertificateTitleText__1Oer3\",\"TitleTextBottom\":\"black_TitleTextBottom__fd4oG\",\"BackgroundImageContainer\":\"black_BackgroundImageContainer__KWnAG\",\"CalculatorSubitle\":\"black_CalculatorSubitle__3I1fE\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Root\":\"UpperCorporateBlock_Root__1jeU2\",\"MainBlock\":\"UpperCorporateBlock_MainBlock__3BrFC\",\"ProstoAppIcon\":\"UpperCorporateBlock_ProstoAppIcon__33dBO\",\"BackgroundImage\":\"UpperCorporateBlock_BackgroundImage__2PjJS\",\"MainTitle\":\"UpperCorporateBlock_MainTitle__3Y8JK\",\"AdditionalText\":\"UpperCorporateBlock_AdditionalText__1CFeY\",\"MainContainer\":\"UpperCorporateBlock_MainContainer__fAesJ\",\"TextContainer\":\"UpperCorporateBlock_TextContainer__ckX1m\",\"LeftTextContainer\":\"UpperCorporateBlock_LeftTextContainer__1qsMI\",\"HowItWorks\":\"UpperCorporateBlock_HowItWorks__2rE3A\",\"BackgroundImageContainer\":\"UpperCorporateBlock_BackgroundImageContainer__IPK9D\"};"],"sourceRoot":""}